State variable analysis
3.3 Formation of the state equations
As already explained, the simplest method of formulating state equations is to accept all capacitor charges and inductor fluxes as state variables. Fictitious elements, such as the phantom current source and resistors are then added to overcome the dependency problem without affecting the final result significantly. However the elimination of the dependent variables is achieved more effectively with the transform and graph theory methods discussed in the sections that follow.
3.3.1 The transform method
A linear transformation can be used to reduce the number of state variables. The change from capacitor voltage to charge at the node, mentioned in section 3.2, falls within this category. Consider the simple loop of three capacitors shown in Figure 3.2, where the charge at the nodes will be defined, rather than the capacitor charge.
The use of a linear transformation changes the[C] matrix from a 3 × 3 matrix with only diagonal elements to a full 2×2 matrix. The branch–node incidence matrix, Kbnt , is:
Kbnt =
⎡
⎣1 0 1 −1
0 1
⎤
⎦ (3.1)
a b C2
C3
C1
Figure 3.2 Capacitive loop
and the equation relating the three state variables to the capacitor voltages:
⎛
Using the connection between node and capacitor charges (i.e. equation 3.1):
qa Substituting equations 3.2 and 3.4 in 3.3 yields:
qa Use of this transform produces a minimum set of state variables, and uses all the capacitor values at each iteration in the integration routine. However, there is a restric-tion on the system topology that can be analysed, namely all capacitor subnetworks must contain the reference node. For example, the circuit in Figure 3.3 (a) cannot be analysed, as this method defines two state variables and the[C] matrix is singular and cannot be inverted. i.e.
qa This problem can be corrected by adding a small capacitor, C2, to the reference node (ground) as shown in Figure 3.3 (b). Thus the new matrix equation becomes:
qa
C1
R1 R2
C1
R1
C2 R2
det =C1C2
(a)
(b)
Figure 3.3 (a) Capacitor with no connection to ground; (b) small capacitor added to give a connection to ground
However this creates a new problem because C2needs to be very small so that it does not change the dynamics of the system, but this results in a small determinant for the[C] matrix, which in turn requires a small time step for the integration routine to converge.
More generally, an initial state equation is of the form:
[M(0)]˙x(0)= [A(0)]x(0)+ [B(0)]u + [B1(0)]˙u (3.8) where the vector x(0) comprises all inductor fluxes and all capacitor charges.
Equation 3.8 is then reduced to the normal form, i.e.
˙x(0)= [A]x + [B]u + ([B1]˙u . . .) (3.9) by eliminating the dependent variables.
From equation 3.8 the augmented coefficient matrix becomes:
M(0), A(0), B(0)
(3.10)
Elementary row operations are performed on the augmented coefficient matrix to reduce it to echelon form [3]. If M(0)is non-singular the result will be an upper trian-gular matrix with non-zero diagonal elements. Further elementary row operations will reduce M(0)to the identity matrix. This is equivalent to pre-multiplying equation 3.10 by M(0)−1, i.e. reducing it to the form
I, A, B
(3.11) If in the process of reducing to row echelon form the jthrow in the first block becomes a row of all zeros then M(0)was singular. In this case three conditions can occur.
• The jthrow in the other two submatrices are also zero, in which case the network has no unique solution as there are fewer constraint equations than unknowns.
• The jthrow elements in the second submatrix (A) are zero, which gives an incon-sistent network, as the derivatives of state variables relate only to input sources, which are supposed to be independent.
• The jth row elements in the second submatrix (originally [A(0)]) are not zero (regardless of the third submatrix). Hence the condition is [0, 0, . . . , 0]˙x = [aj1, aj2, . . . , aj n]x + [bj1, bj2, . . . , bj m]u. In this case there is at least one non-zero value aj k, which allows state variable xk to be eliminated. Rearranging the equation associated with the kthrow of the augmented matrix 3.10 gives:
xk = −1
aj k(aj1x1+ aj2x2+ · · · + aj k−1xk−1+ aj k+1xk+1+ · · · + aj nxn
+ bj1u1+ bj2u2+ · · · + bj mum) (3.12) Substituting this for xkin equation 3.8 and eliminating the equation associated with
˙xkyields:
[M(1)]˙x(1)= [A(1)]x(1)+ [B(1)]u + [B(1)]˙u (3.13) This process is repeatedly applied until all variables are linearly independent and hence the normal form of state equation is achieved.
3.3.2 The graph method
This method solves the problem in two stages. In the first stage a tree, T, is found with a given preference to branch type and value for inclusion in the tree. The second stage forms the loop matrix associated with the chosen tree T.
The graph method determines the minimal and optimal state variables. This can be achieved either by:
(i) elementary row operations on the connection matrix, or (ii) path search through a connection table.
The first approach consists of rearranging the rows of the incidence (or connection) matrix to correspond to the preference required, as shown in Figure 3.4. The dimension of the incidence matrix is n× b, where n is the number of nodes (excluding the
1
Figure 3.4 K matrix partition
Branches forming tree
Figure 3.5 Row echelon form
reference) and b is the number of branches. The task is to choose n branches that correspond to linearly independent columns in[K], to form the tree.
Since elementary row operations do not affect the linear dependence or inde-pendence of a set of columns, by reducing[K] to echelon form through a series of elementary row operations the independent columns that are required to be part of the tree are easily found. The row echelon form is depicted in Figure 3.5. The branches above the step in the staircase (and immediately to the right of a vertical line) are linearly independent and form a tree. This method gives preference to branches to the left, therefore the closer to the left in the connection matrix the more likely a branch will be chosen as part of the tree. Since the ordering of the n branches in the
connection matrix influences which branches become part of the tree, elements are grouped by type and within a type, by values, to obtain the best tree.
The net effect of identifying the dependent inductor fluxes and capacitor charges is to change the state variable equations to the form:
˙x = [A]x + [B]u + [E]z (3.14)
y= [C]x + [D]u + [F ]z (3.15)
z= [G]x + [H ]u (3.16)
where
u is the vector of input voltages and currents x is the vector of state variables
y is the vector of output voltages and currents
z is the vector of inductor fluxes (or currents) and capacitor charge (or voltages) that are not independent.
In equations 3.14–3.16 the matrices[A], [B], [C], [D], [E], [F ], [G] and [H] are the appropriate coefficient matrices, which may be non-linear functions of x, y or z and/or time varying.
The attraction of the state variable approach is that non-linearities which are functions of time, voltage or current magnitude (i.e. most types of power system non-linearities) are easily handled. A non-linearity not easily simulated is frequency-dependence, as the time domain solution is effectively including all frequencies (up to the Nyquist frequency) every time a time step is taken. In graph terminology equation 3.14 can be restated as shown in Figure 3.6.
Capacitor
Figure 3.6 Modified state variable equations