`Modelling of control systems: State-Variable RepresentationV. Ougrinovski April 10, 20071 State-variable modelsTransfer 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 first-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) The plant equation may be written as    x2 (t)  x(t) =  .  ,   .   . . . . a1n . . . a2n   .. .  , . .  .  . . . annxn (t)    x2 (t)  x(t) =  .  .  .   . b1    b2  B =  . ,  .   .  bn x1 (t)xn (t)x(t) = Ax(t) + Bu(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) becomeswhich, 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) becomesa11 a12 x1 (t)       x2 (t)   a21 a22  . = . .  .   . . .  .   . xn (t)  an1 an2. . . a1n x1 (t) b1 . . . a2n   x2 (t)   b2      . . .   .  +  .  u(t) . .  .   .  .  .   .  . . . ann xn (t) bn(6)(7)y(t) = c1 c2 . . . cnx1 (t)    x2 (t)   . .  .   .  xn (t)(8)2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 specific 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 dtb dy k 1 d2 y + + y = r(t). 2 dt m dt m m Now select state variables as follows x1 = y, dy x2 = . dtAlso, the input variable is chosen as u = r. Then, x1 =  dy = x2 , dt d2 y b dy k 1 x2 = 2 = -  - y + r(t) dt m dt m m b 1 k = - x1 - x2 + u(t). m m mWe arrive at the following state-variable representation: x1 = x2  x2 = -  k b 1 x1 - x2 + u(t) m m mThe 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) 01 mu(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= 01 m,C = [1 0]. 32 The concept of StateAs mentioned previously, the variables x 1 (t), x2 (t), . . . , xn (t) are known as state variables. At any fixed time t0 , the vector   x1 (t0 )    x2 (t0 )   x(t0 ) =  .  .  .   xn (t0 )defines the state of the plant at time t 0 . In precise mathematical language, the definition of state takes the following form.Definition 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 sufficient to determine the behavior of the plant for all t  t0 . In other words, the state of the plant represents a sufficient 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 infinite 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 diagramsA detailed block-diagram representation of the state variable equations can be easily formed by taking Laplace transforms of the expanded differential equations.4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 a22y = [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 X2The 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 Define state variables torque equation back EMF equation. Dynamics of arma(9) (10) (11) (12)x1 (t) = 0 (t)  x2 (t) = 0 (t) x3 (t) = ia (t)shaft angle angular velocity armature currentAlso, define the input variable u(t) = e(t) (input voltage), and the output variable y(t) = (t) = x1 (t) (shaft angle). Rewrite defining 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 definition. 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 form0 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 6Kv ____ Lau1 __ La- + -sX31 __ sX3K' ____  J+ -sX 21 __ sX21 __ sx =y 1R a ____ La __ JFigure 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 LaThe elementary block diagram of this state space model is shown in Fig. 2.4 Relation to Transfer FunctionThe question that must naturally arise: How are the state variable representation and the input-output representation related? In particular, one would like to know how to find the transfer function of a plant, given its state-variable representation, and how to find its state-variable representation, given its transfer-function representation. Let a state-variable representation of a plant be be given by equations x = Ax + Bu,  y = Cx + Du. (13) (14)Note the direct feed-through term Du in the output equation. Then, the transfer function of the plant is completely and uniquely specified. 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 first 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 definition, 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) 01 m(19)(20)u(t),x1 (t) . x2 (t)That is, the matrix A, the input matrix B and the output matrix C are defined as follows A= 0 1 b k -m -m , B= 01 m,C = [1 0]. Now calculate the transfer function, using formula (19) with D = 0 Gp (s) = C(sI - A)-1 B = [1 0] sk m-1 b s+ m-101 m b s+ m 1 k -m s 1 m s m= [1 0] × =1 2+ b s+ s mk m01 mk m1 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)Poles of the systemare 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 definition, 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.4.1 Matlab notesThe matlab command ss forms a state space model from given matrices A, B, C, D or from transfer function sys1=ss(A,B,C,D); sys2=ss(G); Conversely, the data can be extracted from the model using the matlab function ssdata: [A,B,C,D]=ssdata(G); The matlab commands tf2ss, ss2tf perform the conversion from the transfer function form given as (numerator, denominator) to the A,B,C,D state space model and vice versa: [A,B,C,D]=tf2ss(num, den); [num, den]=ss2tf(A,B,C,D);95 Phase variables. Controllable canonical form of the systemAlthough there are an infinite number of ways of selecting the state-variables for any plant, and hence an infinite number of state-variable representations, only a limited number are in common use. These representations have either mathematical advantage or physical meaning. The method of phase variables presented in this section falls into the category of representations that possess mathematical advantage. Phase variables are defined as a particular set of state-variables. To introduce the method, consider a 3rd-order plant with the transfer function Gp (s) = Write this as Gp (s) = where Z(s) 1 = 3 , 2+a s+a U (s) s + a2 s 1 0 Y (s) = c 2 s2 + c 1 s + c 0 . Z(s) In fact we have introduced the intermediate variable Z. Z(s) First consider the transfer function U (s) . It represents the nth-order plant with unity numerator. Therefore the above expression can be written as s3 + a2 s2 + a1 s + a0 Z(s) = U (s). Take the inverse Laplace transform: d2 z(t) dz d3 z(t) + a2 + a1 + a0 z(t) = u(t) 3 2 dt dt dt To express this equation in phase-variable form, we choose state variables as follows: x1 (t) = z(t), x2 (t) = z(t),  x3 (t) = z (t). ¨ If these definitions are substituted into Eq. (23), the result is x3 (t) + a2 x3 (t) + a1 x2 (t) + a0 x1 (t) = u(t)  In addition, we have 2 defining equations x1 (t) = x2 (t)  x2 (t) = x3 (t)  and the output equation z(t) = x1 (t) 10 (23) c2 s2 + c 1 s + c 0 . s3 + a2 s2 + a1 s + a0 Y (s) Z(s) Y (s) = U (s) Z(s) U (s)Combining these equations in state-variable form, we have 0 1 0 0     x= 0  0 1 x + 0u -a0 -a1 -a2 1 z = [1 0 0]x That is,   Now consider the second transfer function0 1 0   A= 0 0 1 , -a0 -a1 -a2Y Z.0   ,B = 0, 1 C = [1 0 0].By taking inverse Laplace transform, we findy(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 &lt; n, the transfer function Gp (s) = cm sm + cm-1 sm-1 + · · · + c0 sn + an-1 sn-1 + · · · + a011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 . . . -an-1 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 first 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 . . . 6 Similarity transformations. Controllability.As noted before, the phase-variables method provides a simple, direct, and systematic method of translating the transfer function information into the state-variable form. At the same time, phase variables in general lack physical significance. In contrast, the state-space representation which uses physical variables, because of its close relation to the physical plant, does not produce a unique form for the resulting state-variable representation; that is, the same transfer function may yield two or more different representations, depending on the particular selection of physical coordinates. On the other hand, the state-variables used in this approach are, by their very definition, real, physically meaningful variables or variables that are direct related to physically meaningful variables. It is desirable to have a means of transforming one state-space representation into another. This is achieved using so-called similarity transformations. Consider a state-space model of the form (13), (14), x = Ax + Bu,  y = Cx + Du, (24) (25)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 coefficients 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. Specifically, let the characteristic polynomial be det(sI - A) = sn + an-1 sn-1 + . . . + 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 . . . An-1 B . Also, the n × n matrix M has the special form, a1 a2 a3 . . . an-1  a a a ... 1 3 4  2   a3 a4 a5 . . . 0 M = . . . .. .  . . . . .  . . . .   an-1 1 0 . . . 0 1 0 0 ... 0that is, this matrix is made of the coefficients 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 01 0  0  . , . . 13`

13 pages

#### Report File (DMCA)

Our content is added by our users. We aim to remove reported files within 1 working day. Please use this link to notify us:

Report this file as copyright or inappropriate

835081