Control systems in state space Paula Raica Department of Automation 71-73 Dorobantilor Str., room C21, tel: 0264 - 401267 26-28 Baritiu Str., room C14, tel: 0264 - 202368 email: [email protected] http://rocon.utcluj.ro/st Technical University of Cluj-Napoca Control systems in state space Analysis of systems in state-space Control systems in state space State-space models The state equation and the output equation : ẋ(t) = Ax(t) + Bu(t) y(t) = Cx(t) + Du(t) x(t) is an (n × 1) state vector, where n is the number of states or system order u(t) is an (m × 1) input vector, where m is the number of input functions y(t) is a (p × 1) output vector where p is the number of outputs A is an (n × n) square matrix called the system matrix or state matrix B is an (n × m) matrix called the input matrix C is a (p × n) matrix called the output matrix D is a (p × m) matrix which represents any direct connection between the input and the output. It as called the feedthrough matrix. Control systems in state space Stability in state-space The system poles are given by the solutions of the characteristic equation that are also the eigenvalues of matrix A: sX(s) = AX(s) + BU(s) Y(s) = CX(s) + DU(s) If we separate X(s) in the state equation we obtain: X(s) = (sI − A)−1 BU(s) and then the output is: Y(s) = [C(sI − A)−1 B + D]U(s) If the system has one input and one output the transfer function is: H(s) = C adj(sI − A) B+D det(sI − A) The characteristic equation of the system is given by: det(sI − A) = 0 Control systems in state space Example Given the system represented in spate-space by: 0 1 0 ẋ(t) = x(t) + u(t) −2 −3 1 y (t) = 1 0 x(t) The eigenvalues of the matrix A are obtained from: λ −1 (λI − A) = det(λI − A) = (λ + 1)(λ + 2) = 0 2 λ+3 λ1 = −1, λ2 = −2 The system transfer function is computed from " # s+3 1 0 (s+1)(s+2) (s+1)(s+2) H(s) = C(sI − A)−1 B = 1 0 −2 s 1 (s+1)(s+2) (s+1)(s+2) H(s) = 1 , (s + 1)(s + 2) ⇒ The poles: − 1, −2 Control systems in state space System poles and the eigenvalues of A. Example In special cases, it is possible that a part of the system poles are canceled by some of the system zeros when transforming a state-space model into a transfer function. Example. Consider a system with the input u(t) and the output y (t) having the state-space model: 0 1 0 ẋ(t) = Ax(t) + Bu(t) = x(t) + u(t) 1 0 1 y (t) = Cx(t) = −1 1 x(t) The characteristic equation is: s −1 det(sI − A) = det = s 2 − 1 = (s − 1)(s + 1) −1 s The eigenvalues of the system matrix, or the system poles are λ1 = 1 and λ2 = −1. Control systems in state space System poles and the eigenvalues of A. Example The transfer function is computed from: " s (s−1)(s+1) −1 H(s) = C(sI − A) B = −1 1 1 (s−1)(s+1) or H(s) = 1 (s−1)(s+1) s (s−1)(s+1) # 0 1 1 s −1 = (s − 1)(s + 1) s +1 The transfer function has only one pole at −1 because the other pole (s = 1) was canceled with the zero at s = 1. A state-space formulation will give more information about the system than the input-output formulation described by a transfer function. Control systems in state space Stability in state-space internal stability - given by the eigenvalues of the system matrix external stability - given by the transfer function poles System poles or eigenvalues of the system matrix: λi = σi + jωi . Stability condition Stable Marginally stable Unstable Root values σi < 0, for all i = 1, n (All the roots are in the left-half s-plane) σi = 0 for any i for simple roots and no σi > 0, for i = 1, n (At least one simple root and no multiple roots on the jω axis and the other roots on the left-half s-plane) σi > 0 for any i or σi = 0 for any multipleorder root, i = 1, n (At least one simple root in the right-half s-plane or at least one multiple-order root on the jω axis) Control systems in state space Stability in state-space When we use state-space descriptions of dynamic systems we discuss the following types of stability: Internal stability that refers to the state variables. Stability conditions in this case are applied for the eigenvalues of system matrix λi = σi + jωi (or the system poles) External stability that refers to the output signal. Stability conditions are analyzed for the transfer function poles pi = σi + jωi . Transfer functions can only be used to analyze the external stability of systems. State-space descriptions can be used to analyze both internal and external stability. Control systems in state space Example Consider the system in state-space form: −2 0 1 ẋ(t) = x(t) + u(t) 0 3 2 y (t) = 1 0 x(t) Eigenvalues: λ1 = −2 < 0, λ2 = 3 > 0. The system is internally unstable (λ2 > 0). The transfer function for this system: H(s) = C(sI-A)−1 B = 1 s −3 = (s − 3)(s + 2) s +2 After the pole-zero cancelation, the transfer function has only one stable pole at −2, therefore the system is externally stable. Control systems in state space Example The output equation: y (t) = x1 (t). Figure: Block diagram of the system Control systems in state space Controllability and observability The goal for control design: controlling the system with a signal u(t) that is a function of several measurable state variables. If all the state variables are measurable use a full-state feedback control law: If not all the states can be measured: use an observer to estimate the states connected to the full-state feedback control law. Control systems in state space Controllability and observability A system is said to be controllable at time t0 if it is possible to transfer the system from any initial state x(0) to any other state in finite time, by means of an unconstrained control vector u(t). A system is said to be observable at time t0 if, with the system in state x(t0 ), it is possible to determine this state from the observation of the output over a finite time interval. (i.e. the ability to determine the state variables from the knowledge of the input u(t) and the output y(t)). The solution to the control problem may not exist if the system considered is not controllable. Control systems in state space Controllability test For an n-th order system: ẋ(t) = Ax(t) + Bu(t) Build the controllability matrix: PC = B AB A2 B · · · An−1 B The system is controllable if PC has full rank n: rank PC = n If the system has one input, then PC is an n × n matrix. In this case it is easy to test the rank of PC by making sure the determinant of PC is non-zero. Control systems in state space Controllability. Example Determine if the system ẋ(t) = Ax + Bu is controllable, where 2 3 1 A= , B= 0 5 0 Construct the matrix PC : PC = B AB 1 where B = and 0 1 2 ⇒ PC = 0 0 2 3 AB = 0 5 1 2 = 0 0 Since det PC = 0, the rank of PC is less than 2. Hence, the system is not controllable. Control systems in state space Observability test For an n-th order system: ẋ(t) = Ax(t) + Bu(t) y(t) = Cx(t) Build the observability matrix: C CA PO = ··· CAn−1 The system is completely observable (all states are observable) if PO has rank n: rank PO = n Control systems in state space Observability. Example Consider a system described by the state and output equations: 0 1 0 0 ẋ(t) = Ax(t) + Bu(t) = 0 0 1 x(t) + 0 u(t) −4 −3 −2 1 y (t) = Cx(t) = 0 5 1 x(t) The observability matrix is: C PO = CA , where C = 0 5 1 , CA = −4 −3 3 CA2 0 5 1 CA2 = −12 −13 −9 ⇒ PO = −4 −3 3 −12 −13 −9 Since the determinant det PO = −344, PO is full rank equal to 3. The system is thus observable. Control systems in state space Design of state variable feedback systems Control systems in state space Design of state variable feedback systems The method: pole placement for SISO systems Assume: All state variables are measurable and available for feedback. The system is completely state controllable The poles of the closed-loop system may be placed at any desired location by means of state feedback through an appropriate state feedback matrix. Assign a set of closed-loop poles that will correspond to satisfactory dynamic response in terms of transient response specifications. We will consider first that the reference input is zero r (t) = 0 and then, we shall discuss the case when the reference is non-zero. Control systems in state space Selection of pole locations One method: choose the closed-loop poles for a higher order system as a desired pair of dominant second-order poles and select the rest as real non-dominant poles. Remember the relation p between the pole location s1,2 = −ζωn ± ωn 1 − ζ 2 j and the transient response characteristics Settling time: ts = Peak time: tp = Rise time: tr = π ωd π−β ωd 4 ζωn = = ωn √π ωn 1−ζ 2 π−β √ 1−ζ 2 √ Overshoot Mp : Mp = e −πζ/ Control systems in state space 1−ζ 2 Design of full-state feedback control law by pole placement Consider a SISO system described in state-space by: ẋ(t) = Ax(t) + Bu(t) y (t) = Cx(t) The reference input is considered zero: r (t) = 0, i.e. all state variables must approach zero in steady-state. We shall choose the control law (control signal) to be a linear combination of the state variables: u(t) = −Kx(t) = −k1 x1 − k2 x2 − · · · − kn xn Control systems in state space Design of full-state feedback control law by pole placement Full state feedback control law Full state feedback control law (figure showing all states) Control systems in state space Design of full-state feedback control law by pole placement The closed-loop system (with the feedback gain): ẋ(t) = Ax(t) − BKx(t) = (A − BK)x(t) The characteristic equation of the closed-loop system is: det[sI − (A − BK)] = 0 (1) When evaluated, this gives an n-th order polynomial in s containing the elements of the gain matrix K: k1 , k2 , ..., kn . The desired location of the closed-loop poles are: p1 , p2 , · · · , pn and the corresponding desired characteristic equation is: (s − p1 )(s − p2 ) · · · (s − pn ) = 0 The required elements of K are obtained by matching coefficients of equations (1) and (2). Control systems in state space (2) Example. Inverted pendulum Consider the problem of balancing the inverted pendulum. The angle subsystem of the pendulum is given for some specific values of the parameters by: 0 1 0 ẋ(t) = x(t) + u(t) 9 0 −2 T where the state vector is x(t) = θ(t) θ̇(t) . Control systems in state space Example. Inverted pendulum The open-loop system poles are given by: λ −1 det(λI − A) = det = λ2 − 9 = (λ − 3)(λ + 3) = 0 −9 λ The system poles are: 3 and −3. The open-loop system is unstable. Check the controllability matrix: 0 −2 PC = B AB = , det PC = −4 −2 0 The rank of the controllability matrix is 2, thus the system is controllable. The design specifications: a state variable feedback matrix K that will give a closed-loop response with an overshoot of about 4.3% and a settling time of about 1 second. The angle θ and the angular velocity θ̇ will be zero in steady state. Control systems in state space Example. Inverted pendulum We compute the desired poles of the closed-loop system that will give the desired behavior: The damping ratio that gives √ an overshoot of 4.3% can be computed as equal to ζ = 2/2. The settling time is ts = 4 = ζωn 4 √ 2 2 · ωn ⇒ 8 ωn = √ 2 The complex poles result as: p1,2 = −ζωn ± jωn p 1 − ζ 2 = −4 ± 4j The characteristic equation for the desired poles is: (s − p1 )(s − p2 ) = (s + 4 − 4j)(s + 4 + 4j) = s 2 + 8s + 32 = 0 Control systems in state space Example. Inverted pendulum The characteristic equation of the closed-loop system with the feedback gain K = k1 k2 is: s 0 0 1 0 det[sI−(A − BK)] = det − + k1 k2 = 0 0 s 9 0 −2 or s −1 s 0 0 1 det − = det =0 −9 − 2k1 s − 2k2 0 s 9 + 2k1 2k2 and: s(s − 2k2 ) − (9 + 2k2 ) = s 2 − 2sk2 − 9 − 2k1 = 0 By setting the characteristic equation of the closed loop system equal to the characteristic equation for the desired poles we obtain: −2k2 = 8, −9 − 2k1 = 32, and k1 = −20.5, k2 = −4 and the feedback gain matrix is: K = −20.5 −4 Control systems in state space Example. Inverted pendulum A plot of the closed-loop system response to initial conditions (and zero input) is shown below. Response to Initial Conditions 1.2 1 Amplitude 0.8 0.6 0.4 0.2 0 −0.2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Time (sec) Figure: Inverted pendulum response to initial conditions (closed-loop system) From the figure, the settling time is about 1 second. The ”overshoot” is, in this case, the difference between the minimum value and the steady state value (i.e. 0) and, as shown in the figure, it is about 4%. Control systems in state space State feedback for tracking systems Consider the system described by the state-space model: ẋ(t) = Ax(t) + Bu(t) y (t) = Cx(t) The goal is to drive the output y (t) to a given reference input r , with zero-steady-state error. One solution is to scale the reference input r and choose the control law to be a linear combination of the states (with r and N scalar values for SISO) u(t) = Nr − Kx(t) = Nr − k1 x1 − k2 x2 − · · · − kn xn Control systems in state space State feedback for tracking systems The closed-loop system is then: ẋ(t) = Ax(t) + B(Nr − Kx(t)) = (A − BK)x(t) + BNr y (t) = Cx(t) The feedback matrix K is determined by pole placement. At steady-state ẋ = 0. xss , yss = the steady-state values of the state vector and the output 0 = (A − BK)xss + BNr ⇒ xss = −(A − BK)−1 BNr yss = Cxss = −C(A − BK)−1 BNr The steady-state error is zero if yss = r , ⇒ N can be computed from: yss = −C(A − BK)−1 BNr = r , ⇒ N = − 1 C(A − BK)−1 B Control systems in state space State feedback for tracking systems. Example Consider the system described 2 ẋ = 1 y (t) = 1 in state-space by: 3 1 x(t) + u(t) 0 0 −1 x(t) Design a state-feedback control system so that the closed-loop poles are p1,2 = −1 ± j and the steady-state error for a step input is zero. We check controllability first. The controllability matrix, the determinant and the rank are: 1 2 PC = B AB = , det PC = 1, ⇒ rankPC = 2 0 1 The system is controllable. Control systems in state space State feedback for tracking systems. Example The feedback gain matrix K is obtained by pole placement. If the desired poles of the closed-loop system are p1,2 = −1 ± j, the characteristic equation for these poles is: (s + 1 − j)(s + 1 + j) = s 2 + 2s + 2 = 0 The characteristic equation of the closed-loop system with the feedback gain K = k1 k2 is: s − 2 + k1 −3 + k2 det[sI − (A − BK)] = =0 −1 s or: s(s − 2 + k1 ) − (−1)(−3 + k2 ) = s 2 + (−2 + k1 )s − 3 + k2 = 0 By setting the characteristic equation of the closed loop system equal to the characteristic equation for the desired poles we obtain: −2 + k1 = 2, −3 + k2 = 2, and k1 = 4, k2 = 5 Control systems in state space State feedback for tracking systems. Example The feedback gain matrix is: K= 4 5 This matrix will only ensure the desire transient characteristics and not the zero steady-state error for a step input. Compute N from: 1 N=− C(A − BK)−1 B 2 3 1 −2 −2 (A − BK) = − 4 5 = 1 0 0 1 0 0 1 (A − BK)−1 = −1/2 −1 1 0 1 1 −1 C(A − BK) B = 1 −1 = 1/2 1 = 1/2 −1/2 −1 0 0 1 N=− = −2 1/2 Control systems in state space State feedback for tracking systems. Example The step response of the closed-loop system: Step Response Amplitude 1 0.5 0 −0.5 0 1 2 3 4 5 6 7 8 Time (sec) Figure: Step response of the closed-loop system The output follows the unit step, thus yss = 1 and the steady-state error is zero: ess = 0. Control systems in state space
© Copyright 2024 Paperzz