Documente Academic
Documente Profesional
Documente Cultură
1 State-variable models
Transfer function models are concerned only with input-output characteristics of a plant. Often a better insight into dynamics of a plant is needed. For example, the frequency response of a circuit does not provide information about voltages across components of the circuit. Yet, it is important to know those voltages, for instance, to ensure that they stay within linear opamp region. The state-variable method of plant representation is concerned not only with the input-output properties of the plant but also with its complete internal behavior. This is the feature that distinguishes the state-variable representation from the input-output representation given by a transfer function. Plant representation in terms of state-variables is accomplished by means of a set of n linear rst-order differential equations known as the plant equations. These equations take the general form x1 (t) = f1 (x1 , x2 , . . . , xn , u, t) x2 (t) = f2 (x1 , x2 , . . . , xn , u, t) . . . xn (t) = f2 (x1 , x2 , . . . , xn , u, t) (1)
variables xi (t) are the state coordinates and u(t) is the plant input. The column vector formed by the state coordinates x = (x1 , . . . , xn )T is called the state vector, or simply, the state. In addition, one needs an output expression, which relates measured variables such as sensor outputs to the state and control variables. This equation takes the form y(t) = h(x1 , x2 , . . . , xn , u, t). (2)
General analysis of nonlinear control systems is very complicated, and up to date there is no regular universal technique which would cover all instances of the nonlinear control problem. In this course, we restrict attention to linear control systems and nonlinear systems reducible to linear systems by means of the linearization technique. We begin with considering a resulting linearized system; the method of linearization will be discussed later. That is, consider a system described by a set of linear differential equations of the form x1 (t) = a11 x1 (t) + a12 x2 (t) + + a1n xn (t) + b1 u(t) x2 (t) = a21 x1 (t) + a22 x2 (t) + + a2n xn (t) + b2 u(t) . . . xn (t) = an1 x1 (t) + a 2 x2 (t) + + ann xn (t) + bn u(t). 1 (3)
We will keep using the notation xi (t) for the state coordinates and u(t) for the plant input. In addition, we consider an output expression, which after linearization becomes a linear algebraic equation relating the output of the plant to the state and input. This equation takes the form y(t) = c1 x1 (t) + c2 x2 (t) + + cn xn (t). (4)
The use of matrix notation permits the plant equations and the output expression to be written in a particularly simple and convenient form. Introduce matrices and vectors as follows: a11 a12 a21 a22 A= . . . . . . an1 an2
x1 (t)
x2 (t) x(t) = . , . .
xn (t)
x2 (t) x(t) = . . . .
b1 b2 B = . , . . bn x1 (t)
xn (t)
(5)
Here x(t) is the n-dimensional vector known as the state vector; its elements are called state variables, or state coordinates. The vector x(t) is the derivative of the state vector, and its elements are therefore the derivatives of the state variables. The n n matrix A is known as the plant matrix. The ndimensional vector b is referred to as the input vector since it describes how the control input u(t) affects the plant. The expanded form of Eq. (5) becomes
which, if the indicated matrix operations are completed, is equal to the initial plant equations (3). In a similar fashion, the output expression may be written as y(t) = Cx(t) where c is the n-dimensional vector of the form C = c1 c2 . . . c n known as the output vector. In expanded form equation (7) becomes
(6)
(7)
y(t) = c1 c2 . . . cn
(8)
Once again we see that this result is identical with the output expression of Eq. (4). The use of the vector-matrix formulation therefore allows us to write the state variable representation of the plant in terms of two simple equations (5) and (7). The simplicity of these equations in comparison with the original form is obvious. Of course, these equations only symbolize Eqs. (3) and (4). Whenever an actual calculation is made for a specic plant, either the original Eqs. (3) and (4) or the expanded form of the above matrix equations must be used, since only they contain the detailed information regarding the given plant. On the other hand, the compact symbolic representation is useful for general derivations and discussions. Example The differential equation describing a mass-spring system is m or equivalently, dy d2 y + b + ky = r(t), dt2 dt
The output of the system was y = x1 , hence the state-variable representation in the matrix form is the following: x1 (t) x2 (t) y = [1 0] = 0 1 k b m m x1 (t) + x2 (t) 0
1 m
u(t)
x1 (t) . x2 (t)
From this equation, we obtain the plant matrix A, the input matrix B and the output matrix C: A= 0 1 k b m m , B= 0
1 m
C = [1 0]. 3
denes the state of the plant at time t 0 . In precise mathematical language, the denition of state takes the following form.
Denition 1 The state of an nth-order plant at time t 0 is a set of n numbers, x1 (t0 ), x2 (t0 ), . . . , xn (t0 ), which along with the input to the plant for t t 0 , are sufcient to determine the behavior of the plant for all t t0 . In other words, the state of the plant represents a sufcient amount of information about the plant at time t0 to determine its future behavior without reference to the input before t 0 . The state of the plant at t0 represents a complete description of the plant in the sense that no other information except the input is needed to determine the plant response. In addition, any other plant variables may be determined from a knowledge of the state. Note The state variable representation is not unique. We can introduce a change of variables x = P x, where P is a non-singular matrix, and get another valid state variable representation. Indeed, from the above change of variables, x = Px x = P 1 x.
Hence, the substitution of the latter equation into equation (5) leads to the equation x x = A + Bu, where A = P AP 1 , y = Cx
B = P B, C = CP 1
It is clear that in general case, A = A, B = B. That is, the elements of matrices A, B, and C, depend on the set of state variables chosen for the plant. Again it must be emphasized that the plant does not change, only its representation does. There is, in fact, an innite number of state-variable representations for a given plant, depending on which set of state-variables has been selected for its representation. Although the method of representing the state information is not unique, any set of state variables we choose provides exactly the same information about the plant.
3 Block diagrams
A detailed block-diagram representation of the state variable equations can be easily formed by taking Laplace transforms of the expanded differential equations.
Example As an illustration, Fig. 1 shows the elementary block diagram for the most general secondorder plant. The state variable representation of this plant is x= b a11 a12 x+ 1 u b2 a21 a22
y = [c1 c2 ]x Assuming that the initial conditions are zero, we apply the Laplace transform: s X1 X2 = a11 a12 a21 a22 b X1 + 1 U b2 X2
The expanded form of these differential equations is sX1 = a11 X1 + a12 X2 + b1 U sX2 = a12 X1 + a22 X2 + b2 U. Then we can construct the block diagram shown in Fig. 1. Example: State-variable representation of armature controlled DC motor ture controlled DC motor are described by the set of equations La ia (t) + Ra ia (t) + ec (t) = e(t), Kirchhoff equation J 0 (t) = 0 (t) + (t), Newton equation (t) = K ia (t) d0 (t) ec (t) = Kv dt Dene state variables torque equation back EMF equation. Dynamics of arma(9) (10) (11) (12)
Also, dene the input variable u(t) = e(t) (input voltage), and the output variable y(t) = (t) = x1 (t) (shaft angle). Rewrite dening equations in terms of state variables: La x3 + Ra x3 + Kv x2 = u(t) J x2 + x2 = K x3 x1 = x2 The third equation follows from the denition. Now write down equations for the derivatives of the state variables (state equations) x1 = x2 K x 2 = x2 + x3 J J Kv Ra 1 x3 = x2 x3 + u(t) La La La 5
Figure 1: Elementary block diagram of the general second-order system and the equation for the output variable (output equation): y = x1 . Now let us write the state and output equations in matrix form
0 1 0 0 x1 x1 K x2 = 0 J J x2 + 0 u(t) 1 v a x3 x3 0 Ka Ra La L L x1 y = [1 0 0] x2 x3
Kv ____ La
1 __ La
sX3
1 __ s
X3
K ____ J
sX 2
1 __ s
X2
1 __ s
x =y 1
R a ____ La
__ J
Figure 2: The elementary block diagram of the state space model of DC motor That is, 0 1 0 K A = 0 J J , v a 0 Ka Ra L L C = [1 0 0].
0 B = 0 ,
1 La
The elementary block diagram of this state space model is shown in Fig. 2.
Note the direct feed-through term Du in the output equation. Then, the transfer function of the plant is completely and uniquely specied. To determine the transfer function of the plant Y (s)/U (s) from the above state-variable representation, we begin with the frequency domain form of the state-variable representation as given by equations sX(s) = AX(s) + BU (s) Y (s) = CX(s) + DU (s) (15) (16)
It must be remembered that, when writing these equations, we assume that all initial conditions are zero. Grouping the two X(s) terms in the rst equation we have (sI A)X(s) = BU (s) 7 (17)
where the identity matrix has been introduced to maintain dimensionality and to allow the indicated factoring. If both sides of this equation are premultiplied by the matrix (sI A) 1 , then Eq. (17) becomes X(s) = (sI A)1 BU (s) (18) If this result is substituted into Eq. (16), then Y(s) is given by Y (s) = C(sI A)1 BU (s) + DU (s) = (C(sI A)1 B + D)U (s) so that the transfer function Y (s)/U (s) is Y (s) = Gp (s) = C(sI A)1 B + D. U (s) Notation The matrix (s) = (sI A)1 is sometimes called the resolvent matrix of the matrix A. Using this denition, Eq. (19) becomes Gp (s) = C(s)BU (s) + D. Despite it is written in the matrix form G p (s) is still the ratio of a numerator polynomial to a denominator polynomial, that is, N (s) , (21) Gp (s) = Dp (s) Example Recall the state-variable representation of the mass-spring system x1 (t) x2 (t) y = [1 0] = 0 1 k b m m x1 (t) + x2 (t) 0
1 m
(19)
(20)
u(t),
x1 (t) . x2 (t)
That is, the matrix A, the input matrix B and the output matrix C are dened as follows A= 0 1 b k m m , B= 0
1 m
C = [1 0]. Now calculate the transfer function, using formula (19) with D = 0 Gp (s) = C(sI A)1 B = [1 0] s
k m
1 b s+ m
0
1 m b s+ m 1 k m s 1 m s m
= [1 0] =
1 2+ b s+ s m
k m
0
1 m
k m
1 2+ b s+ s m
[1 0] 8
1/m k b + ms + m 1 . = 2 + bs + k ms = s2 4.0.1 Notes: Poles and zeros of the system From the above result (21), we see that the values of s that satisfy the equation det(sI A) = 0 (22)
are the poles of the transfer function G p (s). In matrix terminology, these values of s are known as eigenvalues of the matrix A. Equation (22) is called the characteristic equation of the matrix A. Hence we see that the eigenvalues of A correspond to the poles of G p (s). Since matrix A of order n has n eigenvalues, then the denominator polynomial has n zeros. Zeros of the system By denition, zeros of the system are roots of the numerator polynomial. In the absence of the feed-through terms (D = 0), i.e, in the case of a strictly plant, the plant can have any number of poles from none to n 1. Zero-poles cancellation It would appear that an nth-order state-variable description always gives rise to an nth-order transfer function. However, when the transfer function G p (s) computed from Eq. (19) is factored to display its poles and zeros, the numerator and denominator may contain one or more common factors. Clearly, these common factors may be canceled, just as one cancels common factors in fractions. Such cancellations have no effect upon the value of the transfer function when considered as a function of a complex variable, but cancellations reduce the order of the transfer function.
0 1 0 A= 0 0 1 , a0 a1 a2
Y Z.
0 ,B = 0, 1
C = [1 0 0].
y(t) = c2 z (t) + c1 z(t) + c0 z(t). Or using the above state vector x, y(t) = c2 x3 (t) + c1 x2 (t) + c0 x1 (t) = [c0 c1 c2 ]x. We can now introduce the matrix C = [c 0 c1 c2 ] to complete the state variable model. The corresponding block diagram is shown in Fig. 3.
Figure 3: Block diagram of the phase-variable representation of a third-order plant with one zero For a general nth-order system with m zeros and m < n, the transfer function Gp (s) = cm sm + cm1 sm1 + + c0 sn + an1 sn1 + + a0
11
is expressed in phase-variable state space as 0 ... 0 0 0 1 ... 0 . .. . x + . u, . . . x= . . . . 0 0 0 0 ... 1 a0 a1 a2 . . . an1 1 y(t) = [c0 c1 . . . cm 0 . . . 0]x(t). Note that the elements of B are all zero except for the last element, which is always equal to 1, and that the rst n 1 rows of A are always of the same form. This form of state variable representation is referred to as phase variable canonical form, or more often, controllable canonical form.
0 0 . . .
1 0 . . .
in which the state vector x, say, represents a physical state. Along with this, consider another statespace model of the same plant x x = A + Bu, y = Cx + Du; (26) (27)
here the state vector x, say, represents the physical state relative to some other reference, or even a mathematical coordinate vector. It is known that that when one set of coordinates can be transformed into another set of coordinates of the same dimension using an algebraic coordinate transformation (or change of variables), such transformation can be written in the mathematical form as a change of variables, x = Tx x = T 1 x.
As was observed earlier, the substitution of the latter equation into the plant equations (24), (25) leads to the equations of the form (26), (27), whose coefcients are related as follows A = T 1 AT, B = T 1 B, C = CT. 12
The above transformation of equations describing the state-space model of the plant is known as the similarity transformation. Again it must be emphasized that the similarity transformation does does not change the plant, only its representation changes. It is possible to show that the matrices A and A have the same characteristic polynomial, and the same poles. Also, the transfer functions G(s) and G(s) are identical. In the special case where x is the vector of phase coordinates, and the matrices A, B, C, and D represent the canonical controllable form of the plant, the corresponding similarity transformation is very easy to obtain using the characteristic polynomial of the matrix A, if such a transformation exists. Specically, let the characteristic polynomial be det(sI A) = sn + an1 sn1 + . . . + a0 , then the corresponding similarity transformation is T = Wc M, where the matrix Wc is called the controllability matrix and has the special formis constructed from matrices A and B as follows Wc = B AB . . . An1 B . Also, the n n matrix M has the special form, a1 a2 a3 . . . an1 a a a ... 1 3 4 2 a3 a4 a5 . . . 0 M = . . . .. . . . . . . . . . . an1 1 0 . . . 0 1 0 0 ... 0
that is, this matrix is made of the coefcients of the denominator of the transfer function, except for a0 . Note that det M = (1)n , and hence M 1 always exists. On the other hand Wc can be singular or, if the plant is multi-input, can even be non-square. Therefore, for single-input single-output plants, the similarity transformation which transforms a state-space form of the plant to the controllable form exists if and only if the controllability matrix W c is nonsingular. In this case, we say that the plant is controllable via input u. The controllability property means that all coordinates of the state vector can directly or indirectly (i.e., via state other variables) be affected by control, and hence the system can be steered into any desired state from any initial condition over a desired time. Uncontrollable plants have co-located poles and zeros, which cancel out. As a result, the minimum length state vector of an uncontrollable plant is usually shorter than that of the original plant.
0 0
1 0 0 . , . .
13