Numerical integrator substitution
4.4 Network solution
With all the network components represented by Norton equivalents a nodal formulation is used to perform the system solution.
The nodal equation is:
[G]v(t) = i(t) + IHistory (4.35)
where:
[G] is the conductance matrix v(t) is the vector of nodal voltages
i(t) is the vector of external current sources
IHistoryis the vector current sources representing past history terms.
i12
i13
i14
i15
i1
Transmission line 5
2
3
1 4
Figure 4.10 Node 1 of an interconnected circuit
The nodal formulation is illustrated with reference to the circuit in Figure 4.10 [5] where the use of Kirchhoff’s current law at node 1 yields:
i12(t )+ i13(t )+ i14(t )+ i15(t )= i1(t ) (4.36) Expressing each branch current in terms of node voltages gives:
i12(t )= 1
R(v1(t )− v2(t )) (4.37)
i13(t )= t
2L(v1(t )− v3(t ))+ I13(t− t) (4.38) i14(t )=2C
t(v1(t )− v4(t ))+ I14(t− t) (4.39) i15(t )= 1
Zv1(t )+ I15(t− τ) (4.40)
Substituting these gives the following equation for node 1:
1 R +t
2L+2C
t + 1 Z
v1(t )− 1
Rv2(t )−t
2Lv3(t )−2C
tv4(t )
= I1(t− t) − I13(t− t) − I14(t− t) − I15(t− t) (4.41) Note that[G] is real and symmetric when incorporating network components. If con-trol equations are incorporated into the same [G] matrix, the symmetry is lost;
these are, however, solved separately in many programs. As the elements of[G]
are dependent on the time step, by keeping the time step constant[G] is constant and triangular factorisation can be performed before entering the time step loop. More-over, each node in a power system is connected to only a few other nodes and therefore
2C1
Figure 4.11 Example using conversion of voltage source to current source
the conductance matrix is sparse. This property is exploited by only storing non-zero elements and using optimal ordering elimination schemes.
Some of the node voltages will be known due to the presence of voltage sources in the system, but the majority are unknown. In the presence of series impedance with each voltage source the combination can be converted to a Norton equivalent and the algorithm remains unchanged.
Example: Conversion of voltage sources to current sources
To illustrate the incorporation of known voltages the simple network displayed in Figure 4.11(a) will be considered. The task is to write the matrix equation that must be solved at each time point.
Converting the components of Figure 4.11(a) to Norton equivalents (companion circuits) produces the circuit of Figure 4.11(b) and the corresponding nodal equation:
⎡
Equation 4.42 is first solved for the node voltages and from these all the branch currents are calculated. Time is then advanced and the current sources representing History terms (previous time step information) are recalculated. The value of the voltage source is recalculated at the new time point and so is the matrix equation.
The process of solving the matrix equation, calculating all currents in the system, advancing time and updating History terms is continued until the time range of the study is completed.
As indicated earlier, the conversion of voltage sources to Norton equivalents requires some series impedance, i.e. an ideal voltage source cannot be represented using this simple conductance method. A more general approach is to partition the nodal equation as follows:
[GU U] [GU K] where the subscripts U and K represent connections to nodes with unknown and known voltages, respectively. Using Kron’s reduction the unknown voltage vector is obtained from:
[GU U]vU(t )= iU(t )+ IUHistory− [GU K]vK(t )= IU (4.44) The current in voltage sources can be calculated using:
[GKU]vU(t )+ [GKK]vK(t )− IKHistory= iK(t ) (4.45) The process for solving equation 4.44 is depicted in Figure 4.12. Only the right-hand side of this equation needs to be recalculated at each time step. Triangular factorisation is performed on the augmented matrix[GU U GU K] before entering the time step loop. The same process is then extended to iU(t )− IHistoryat each time step (forward solution), followed by back substitution to get VU(t ). Once VU(t )has been found, the History terms for the next time step are calculated.
4.4.1 Network solution with switches
To reflect switching operations or time varying parameters, matrices [GU U] and [GU K] need to be altered and retriangulated. By placing nodes with switches last, as illustrated in Figure 4.13, the initial triangular factorisation is only carried out for the nodes without switches [6]. This leaves a small reduced matrix which needs altering following a change. By placing the nodes with frequently switching elements in the lowest part the computational burden is further reduced.
Transmission lines using the travelling wave model do not introduce off-diagonal elements from the sending to the receiving end, and thus result in a block diagonal structure for[GU U], as shown in Figure 4.14. Each block represents a subsystem (a concept to be described in section 4.6), that can be solved independently of the rest of the system, as any influence from the rest of the system is represented by the History terms (i.e. there is no instantaneous term). This allows parallel computation of the
=
(1) Triangulation of matrix (2) Forward reduction (3) Back substitution
Figure 4.12 Network solution with voltage sources
solution, a technique that is used in the RTDS simulator. For non-linear systems, each non-linearity can be treated separately using the compensation approach provided that there is only one non-linearity per subsystem. Switching and interpolation are also performed on a subsystem basis.
In the PSCAD/EMTDC program, triangular factorisation is performed on a sub-system basis rather than on the entire matrix. Nodes connected to frequently switched branches (i.e. GTOs, thyristors, diodes and arrestors) are ordered last, but other switching branches (faults and breakers) are not. Each section is optimally ordered separately.
A flow chart of the overall solution technique is shown in Figure 4.15.
4.4.2 Example: voltage step applied to RL load
To illustrate the use of Kron reduction to eliminate known voltages the simple circuit shown in Figure 4.16 will be used.
[G ] V I
0
Frequently switching components placed last
=
=
(1) Partial triangulation of matrix (prior to time step loop) (2) Complete triangulation
(3) Forward reduction of current vector (4) Back substitution for node voltages (1)
(2)
(3) (4)
Figure 4.13 Network solution with switches
VU
[GUU]
IU=IU– [GUK]VK 0
•
= + + +
Figure 4.14 Block diagonal structure
Figure 4.17 shows the circuit once the inductor is converted to its Norton equivalent. The nodal equation for this circuit is:
⎡
⎢⎣
GSwitch −GSwitch 0
−GSwitch GSwitch+ GR −GR
0 −GR GL_eff+ GR
⎤
⎥⎦
⎛
⎝v1
v2
v3
⎞
⎠ =
⎛
⎝ iv 0
−IHistory
⎞
⎠ (4.46)
Initialisation
Build upper part of triangular matrix
Is run finished Check switches for
change
Solve for history terms
User specified dynamics file
Network solution
User-specified output definition file
Interpolation, switching procedure and chatter removal
Write output files
Yes Stop
No
Solve for voltages Update source voltages and
currents
Figure 4.15 Flow chart of EMT algorithm
iv
Figure 4.16 Simple switched RL load
1 2
Figure 4.17 Equivalent circuit for simple switched RL load
As v1is a known voltage the conductance matrix is reordered by placing v1last in the column vector of nodal voltages and moving column 1 of [G] to be column 3;
then move row 1 (equation for current in voltage source) to become row 3. This then gives:
−GSwitch 0 GSwitch
⎤
which is of the form
[GU U] [GU K]
Note the negative IHistoryterm as the current is leaving the node. Performing Gaussian
Moving the known voltage v1(t )to the right-hand side gives:
GSwitch+ GR −GR
Alternatively, the known voltage could be moved to the right-hand side before performing the Gaussian elimination. i.e.
GSwitch+ GR −GR
Eliminating the element below the diagonal, and performing the same operation on the right-hand side will give equation 4.49 again. The implementation of these equa-tions in FORTRAN is given in Appendix H.2 and MATLAB in Appendix F.3. The FORTRAN code in H.2 illustrates using a d.c. voltage source and switch, while the MATLAB version uses an a.c. voltage source and diode. Note that as Gaussian elimi-nation is equivalent to performing a series of Norton–Thevenin conversion to produce one Norton, the RL branch can be modelled as one Norton. This is implemented in the FORTRAN code in Appendices H.1 and H.3 and MATLAB code in Appendices F.1 and F.2.
Table 4.2 compares the current calculated using various time steps with results from the analytic solution.
For a step response of an RL branch the analytic solution is given by:
i(t )= V R
1− e−tR/L
Note that the error becomes larger and a less damped response results as the time step increases. This information is graphically displayed in Figures 4.18(a)–4.19(b).
As a rule of thumb the maximum time step must be one tenth of the smallest time constant in the system. However, the circuit time constants are not generally known a priori and therefore performing a second simulation with the time step halved will give a good indication if the time step is sufficiently small.
Table 4.2 Step response of RL circuit to various step lengths
Time (ms) Current (amps)
Exact t= τ/10 t = τ t= 5τ t= 10τ
1.0000 0 0 0 0 0
1.0500 63.2121 61.3082 33.3333 – –
1.1000 86.4665 85.7779 77.7778 – –
1.1500 95.0213 94.7724 92.5926 – –
1.2000 98.1684 98.0785 97.5309 – –
1.2500 99.3262 99.2937 99.1770 71.4286 –
1.3000 99.7521 99.7404 99.7257 – –
1.3500 99.9088 99.9046 99.9086 – –
1.4000 99.9665 99.9649 99.9695 – –
1.4500 99.9877 99.9871 99.9898 – –
1.5000 99.9955 99.9953 99.9966 112.2449 83.3333
1.5500 99.9983 99.9983 99.9989 – –
1.6000 99.9994 99.9994 99.9996 – –
1.6500 99.9998 99.9998 99.9999 – –
1.7000 99.9999 99.9999 100.0000 – –
1.7500 100.0000 100.0000 100.0000 94.7522 –
1.8000 100.0000 100.0000 100.0000 – –
1.8500 100.0000 100.0000 100.0000 – –
1.9000 100.0000 100.0000 100.0000 – –
1.9500 100.0000 100.0000 100.0000 – –
2.0000 100.0000 100.0000 100.0000 102.2491 111.1111
2.0500 100.0000 100.0000 100.0000 – –
2.1000 100.0000 100.0000 100.0000 – –
2.1500 100.0000 100.0000 100.0000 – –
2.2000 100.0000 100.0000 100.0000 – –
2.2500 100.0000 100.0000 100.0000 99.0361 –
2.3000 100.0000 100.0000 100.0000 – –
2.3500 100.0000 100.0000 100.0000 – –
2.4000 100.0000 100.0000 100.0000 – –
2.4500 100.0000 100.0000 100.0000 – –
2.5000 100.0000 100.0000 100.0000 100.4131 92.5926
2.5500 100.0000 100.0000 100.0000 – –
2.6000 100.0000 100.0000 100.0000 – –
2.6500 100.0000 100.0000 100.0000 – –
2.7000 100.0000 100.0000 100.0000 – –
2.7500 100.0000 100.0000 100.0000 99.8230 –
2.8000 100.0000 100.0000 100.0000 – –
2.8500 100.0000 100.0000 100.0000 – –
2.9000 100.0000 100.0000 100.0000 – –
2.9500 100.0000 100.0000 100.0000 – –
3.0000 100.0000 100.0000 100.0000 100.0759 104.9383
0 0.5 1 1.5 2 2.5 3 3.5 4
×10–3
×10–3 Time (ms)
Actual step
Simulated step
isimulated
iexact
0 10 20 30 40 50 60 70 80 90 100
0 0.5 1 1.5 2 2.5 3 3.5 4
Time (ms) Actual step
Simulated step
isimulated
iexact
0 10 20 30 40 50 60 70 80 90 100 110
Current (amps)Current (amps)
(a)
(b)
Figure 4.18 Step response of an RL branch for step lengths of: (a) Δt = τ/10 and (b) Δt = τ
× 10–3
× 10–3
Current (amps)
Time (ms) Actual step
Simulated step
isimulated
iexact
0 20 40 60 80 100 120
0 0.5 1 1.5 2 2.5 3 3.5 4
0 0.5 1 1.5 2 2.5 3 3.5 4
Current (amps)
Time (ms) Actual step
Simulated step isimulated
iexact
0 20 40 60 80 100 120 (a)
(b)
Figure 4.19 Step response of an RL branch for step lengths of: (a) Δt = 5τ and (b) Δt = 10τ
The following data is used for this test system: t = 50 μs, R = 1.0 , L= 0.05 mH and RSwitch= 1010(OFF) 10−10(ON) and V1= 100 V.
Initially IHistory= 0
1.000000000 −1.000000000 −.1000000000E−09
−1.000000000 1.500000000 0.000000000
The multiplier is−0.999999999900000. After forward reduction using this multiplier the G matrix becomes:
1.000000000 −1.000000000 −.1000000000E−09 0.000000000 0.5000000001 −.9999999999E−10
Moving the known voltage v1to the right-hand side gives
1.000000000 −1.000000000
Back substitution gives: i = 9.9999999970E−009 or essentially zero in the off state. When the switch is closed the G matrix is updated and the equation becomes:
0.1000000000E+11 −1.000000000 −.1000000000E+11
−1.000000000 1.500000000 0.000000000
0.1000000000E+11 −1.000000000 −.1000000000E+11
−1.000000000 1.500000000 −.9999999999
Moving the known voltage v1to the right-hand side gives
1.000000000 −1.000000000