[10.3 A SYSTEMATIC](#page-14-0) PROCEDURE TO DETERMINE STATE EQUATIONS
← Back to LINEAR SYSTEMS AND SIGNALS Overview
10.3 A SYSTEMATIC PROCEDURE TO DETERMINE STATE EQUATIONS
We shall discuss here a systematic procedure to determine the state-space description of linear time-invariant systems. In particular, we shall consider systems of two types: (1) RLC networks and (2) systems specified by block diagrams or Nth-order transfer functions.
10.3-1 Electrical Circuits
The method used in Ex. 10.2 proves effective in most of the simple cases. The steps are as follows:
-
- Choose all independent capacitor voltages and inductor currents to be the state variables.
-
- Choose a set of loop currents; express the state variables and their first derivatives in terms of these loop currents.
-
- Write loop equations, and eliminate all variables other than state variables (and their first derivatives) from the equations derived in steps 2 and 3.
EXAMPLE 10.3 State Equations of an RLC Circuit
Write the state equations for the network shown in Fig. 10.2.
Figure 10.2 Circuit for Ex. 10.3.
Step 1. There is one inductor and one capacitor in the network. Therefore, we shall choose the inductor current q1 and the capacitor voltage q2 as the state variables.
Step 2. The relationship between the loop currents and the state variables can be written by inspection:
1
Step 3. The loop equations are
Now we eliminate i1, i2, and i3 from the state and loop equations as follows. From Eq. (10.21), we have
We can eliminate i1 and i2 from this equation by using Eqs. (10.18) and (10.20) to obtain
The substitution of Eqs. (10.18) and (10.22) in Eq. (10.19) yields
These are the desired state equations. We can express them in matrix form as
\n(10.23)
The derivation of state equations from loop equations is facilitated considerably by choosing loops in such a way that only one loop current passes through each of the inductors or capacitors.
AN ALTERNATIVE PROCEDURE
We can also determine the state equations by the following procedure.
-
- Choose all independent capacitor voltages and inductor currents to be the state variables.
-
- Replace each capacitor by a voltage source equal to the capacitor voltage, and replace each inductor by a current source equal to the inductor current. This step will transform the RLC network into a network consisting only of resistors, current sources, and voltage sources.
-
- Find the current through each capacitor and equate it to Cq˙i, where qi is the capacitor voltage. Similarly, find the voltage across each inductor and equate it to Lq˙j, where qj is the inductor current.
EXAMPLE 10.4 Alternate Procedure to Determine State Equations
Use the three-step alternative procedure just outlined to write the state equations for the network in Fig. 10.2.
In the network in Fig. 10.2, we replace the inductor by a current source of current q1 and the capacitor by a voltage source of voltage q2, as shown in Fig. 10.3. The resulting network consists of four resistors, two voltage sources, and one current source.
Figure 10.3 Equivalent circuit of the network in Fig. 10.2.
We can determine the voltage vL across the inductor and the current ic through the capacitor by using the principle of superposition. This step can be accomplished by inspection. For example, vL has three components arising from three sources. To compute the component due to x, we assume that q1 =0 (open circuit) and q2 =0 (short circuit). Under these conditions, the entire network to the right of the 2 resistor is opened, and the component of vL due to x is the voltage across the 2 resistor. This voltage is clearly (1/2)x. Similarly, to find the component of vL due to q1, we short x and q2. The source q1 sees an equivalent resistor of 1 across it, and hence vL = −q1. Continuing the process, we find that the component of vL due to q2 is −q2. Hence,
Using the same procedure, we find
These equations are identical to the state equations [Eq. (10.23)] obtained earlier.†
10.3-2 State Equations from a Transfer Function
It is relatively easy to determine the state equations of a system specified by its transfer function.‡ Consider, for example, a first-order system with the transfer function
The system realization appears in Fig. 10.4. The integrator output q serves as a natural state variable since, in practical realization, initial conditions are placed on the integrator output. The
† This procedure requires modification if the system contains all-capacitor and voltage-source tie sets or all-inductor and current-source cut sets. In the case of all-capacitor and voltage-source tie sets, all capacitor voltages cannot be independent. One capacitor voltage can be expressed in terms of the remaining capacitor voltages and the voltage source(s) in that tie set. Consequently, one of the capacitor voltages should not be used as a state variable, and that capacitor should not be replaced by a voltage source. Similarly, in all-inductor and current-source tie sets, one inductor should not be replaced by a current source. If there are all-capacitor tie sets or all-inductor cut sets only, no further complications occur. In all-capacitor voltage-source tie sets and/or all-inductor current-source cut sets, we have additional difficulties in that the terms involving derivatives of the input may occur. This problem can be solved by redefining the state variables. The final state variables will not be capacitor voltages and inductor currents.
‡ We implicitly assume that the system is controllable and observable. This implies that there are no pole-zero cancellations in the transfer function. If such cancellations are present, the state variable description represents only the part of the system that is controllable and observable (the part of the system that is coupled to the input and the output). In other words, the internal description represented by the state equations is no better than the external description represented by the input–output equation.
integrator input is naturally q˙. From Fig. 10.4, we have
q˙ = −aq+x and y = q
In Sec. 4.6 we saw that a given transfer function can be realized in several ways. Consequently, we should be able to obtain different state-space descriptions of the same system by using different realizations. This assertion will be clarified by the following example.
EXAMPLE 10.5 State-Space Description from a Transfer Function
Consider a system specified by the transfer function
The procedure developed in Sec. 4.6 allows us to realize H(s) as, among others, direct form II (DFII), transpose DFII (TDFII), cascade, and parallel. These realizations are depicted in Fig. 10.5. Determine state-space descriptions for each of these realizations. As mentioned earlier, the output of each integrator serves as a natural state variable.
Direct Form II and Its Transpose
Here we shall realize the system using the canonical form (direct form II and its transpose) discussed in Sec. 4.6. If we choose the state variables to be the three integrator outputs q1, q2, and q3, then, according to Fig. 10.5a,
Figure 10.5 (a) DFII, (b) TDFII, (c) cascade, and (d) parallel realizations of H(s).
922 CHAPTER 10 STATE-SPACE ANALYSIS
Also, the output y is given by
In matrix form, these state and output equations become
and
We can readily verify the state equations of the DFII structure by using MATLAB’s tf2ss command:
>> num = [2 10]; den = [1 8 19 12];>> [A,B,C,D] = tf2ss(num,den) A = -8 -19 -12 100 010 B= 1 0 0 C = 0 2 10 D= 0MATLAB’s convention for labeling state variables q1,q2,…,qn in a block diagram, such as shown in Fig. 10.5a, is reversed. That is, MATLAB labels q1 as qn, q2 and qn−1, and so on. Keeping this in mind, we see that MATLAB indeed confirms our earlier results.
It is also possible to determine the transfer function from the state-space representation using the ss2tf and tf commands:
>> [num,den] = ss2tf(A,B,C,D); H = tf(num,den) H = 2 s + 10 ----------------------- s^3 + 8 s^2 + 19 s + 12Transpose Direct Form II
We can also realize H(s) by using the transpose of the DFII form, as shown in Fig. 10.5b. If we label the output of the three integrators as the state variables v1, v2, and v3, then, according
to Fig. 10.5b,
\n
\n
and the output y is given by
y = v3
The matrix form of these state and output equations become
and
Observe closely the relationship between the state-space descriptions of H(s) by means of the DFII and TDFII realizations. The A matrices in these two cases are the transpose of each other; also, the B of one is the transpose of C in the other, and vice versa. Hence,
This is no coincidence. This duality relation is generally true [1].
Cascade Realization
The three integrator outputs w1, w2, and w3 in Fig. 10.5c are the state variables. Writing equations for the summer outputs yields
, , and
Since w˙ 2 = 2w1 −3w2, we see that w˙ 3 = 2w1 +2w2 −4w3. From Fig. 10.5c, we further see that y = w3. Put into matrix form, the state and output equations are therefore
and
924 CHAPTER 10 STATE-SPACE ANALYSIS
Parallel Realization (Diagonal Representation)
The three integrator outputs z1, z2, and z3 in Fig. 10.5d are the state variables. The state equations are
z˙1 = −z1 +x z˙2 = −3z2 +x z˙3 = −4z3 +x
and the output equation is
In matrix form, these equations are
A GENERAL CASE
It is clear that a system has several state-space descriptions. Notable among these are the variables obtained from the DFII, its transpose, and the diagonalized variables (in the parallel realization). State equations in these forms can be written immediately by inspection of the transfer function. Consider the general Nth-order transfer function
=
=
(10.25)
The realizations of H(s) found by using direct form II [Eq. (10.24)] and the parallel form [Eq. (10.25)] appear in Figs. 10.6a and 10.6b, respectively.
The N integrator outputs q1, q2, … , qN in Fig. 10.6a are the state variables. By inspection of this figure, we obtain
Figure 10.6 (a) Direct form II and (b) parallel realizations for an Nth-order LTIC system.
and output y is
We can eliminate q˙N in this output equation by using the last state equation to yield
=
where bˆ*i* = bi −b0ai. In matrix form, we obtain
and
In Fig. 10.6b, the N integrator outputs z1, z2, … , zN are the state variables. By inspection of this figure, we obtain
\n
\n
\n
and
or
(10.26)
zN
and
Observe that the diagonalized form of the state matrix [Eq. (10.26)] has the transfer function poles as its diagonal elements. The presence of repeated poles in H(s) will modify the procedure slightly. The handling of these cases is discussed in Sec. 4.6.
It is clear from the foregoing discussion that a state-space description is not unique. For any realization of H(s) obtained from integrators, scalar multipliers, and adders, a corresponding state-space description exists. Since there are uncountable possible realizations of H(s), there are uncountable possible state-space descriptions.
The advantages and drawbacks of various types of realization were discussed in Sec. 4.6.