Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
MCE441: Intr. Linear Control Systems Lecture 16: State-Space Realizations TF-SS Conversion Linearization of a nonlinear system about an equilibrium point Dorf Ch.3 Cleveland State University Mechanical Engineering Hanz Richter, PhD Instructor MCE441 – p.1/22 State-Space Modeling The state-space approach takes into account intermediate variables between input and output: state variables The state variables may correspond to actual physical quantities or may be just mathematical constructs The state vector is composed of n state variables, where n is the system order Unlike transfer functions, state-space models can include nonlinearities. Here we focus on linear, time-invariant state-space systems Digital controllers are based on state-space representations of the control TF It is possible to make conversions between TF and SS. MCE441 – p.2/22 State-Space Modeling... To go from TF to SS is to obtain a SS realization of the TF A given TF admits an infinite number of SS realizations A general (possibly nonlinear) nth-order state-space model with m inputs and p outputs has the form: ẋ1 = f1 (x1 , x2 , ...xn , u1 , u2 , ...um ) ẋ2 = f2 (x1 , x2 , ...xn , u1 , u2 , ...um ) ẋn = fn (x1 , x2 , ...xn , u1 , u2 , ...um ) y1 = h1 (x1 , x2 , ...xn , u1 , u2 , ...um ) = hp (x1 , x2 , ...xn , u1 , u2 , ...um ) .. . .. . yp MCE441 – p.3/22 State-Space Modeling... With SS, we replace a single n − th order ODE by n 1st order ones. The column vector x = [x1 , x2 , ...xn ]T is called the state vector The set where x belongs is the state space For MCE441 we use Rn as the state space. Others can be used too. The column vector u = [u1 , u2 ...um ]T is the input vector The column vector y = [y1 , y2 , ...yp ]T is the output vector MCE441 – p.4/22 Linear State-Space Systems In a linear SS system, the fi and hi are linear functions, so that: ẋ = Ax + Bu , y = Cx + Du A is an n-by-n matrix, B is n-by-m, C is p-by-n and D is p-by-m. Conversion to TF (prove it using Laplace transform) Y (s) U (s) = G(s) = C(sI − A)−1 B + D It can be shown that the poles of G(s) are the eigenvalues of A. MCE441 – p.5/22 Example b k m u Mass-spring-damper system. Choosing position and velocity as states, we find the following representation: # " #" # # " " 0 x1 0 1 ẋ1 + u = b 1 x2 − kb − m ẋ2 m MCE441 – p.6/22 Example Following our I/O approach we would have found: mÿ + bẏ + ky = u which gives a transfer function G(s) = Y (s) 1 = U (s) ms2 + bs + k We can check that G(s) = C(sI − A)−1 B + D MCE441 – p.7/22 Another Example Find a ss description of the the following RLC circuit. Find the TF between the input and output voltages. L R Vo i C Vi MCE441 – p.8/22 Solution MCE441 – p.9/22 Solution MCE441 – p.10/22 Realization of Transfer Functions If there are no zeros, obtain the I/O differential equation and define the n states to be succesive derivatives of the output, starting with the 0th order (the output itself) until the derivative of order (n − 1). Write equations of the form ẋi = xi+1 for i = 1, 2..n − 1. Find ẋn from the I/O equation itself Example: Realize G(s) = 2 s2 +s+1 MCE441 – p.11/22 Solution MCE441 – p.12/22 Realization of Transfer Functions Often, zeros are present. That is: b0 sn + b1 sn−1 + ... + bn−1 s + bn G(s) = n s + a1 sn−1 + ... + an−1 s + an Use a canonical realization (one choice among infinite) State definition: x1 = y − β0 u x2 = ẏ − β0 u̇ − β1 u = ẋ1 − βu .. . xn = y (n−1) − β0 u(n−1) − ... − βn−1 u = ẋn−1 − βn−1 u MCE441 – p.13/22 Realization of Transfer Functions... Coefficient definition: β0 = b0 β1 = b1 − a1 β0 .. . βn = bn − a1 βn−1 − ... − an β0 System Matrices: A= 0 0 .. . 1 0 .. . 0 1 .. . ... ... .. . 0 0 .. . 0 0 0 ... 1 −an −an−1 −an−2 ... −a1 MCE441 – p.14/22 Realization of Transfer Functions... System Matrices... B = [β1 β2 , ...βn−1 , βn ]T C = [1, 0, ...0] D = β0 = b0 System Description: ẋ = Ax + Bu y = Cx + Du MCE441 – p.15/22 Example (Dorf 3.1) Find a state-space realization of the transfer function 2s2 + 8s + 6 G(s) = 3 s + 8s2 + 16s + 6 MCE441 – p.16/22 Solution MCE441 – p.17/22 Solution MCE441 – p.18/22 State-Space to TF Conversions in Matlab Old-fashioned method: To go from tf to ss: [A,B,C,D]=tf2ss(num,den) To go from ss to tf: [num,den]=ss2tf(A,B,C,D) New method: Create a tf object: >>tf_sys=tf(num,den) Convert to ss: >>sys_ss=ss(tf_sys) Extract system matrices: [A,B,C,D]=ssdata(sys_ss) Go back to tf: tf_sys=tf(sys_ss) Note: The ss realization in the old method uses the control canonical form. The new method uses an efficient numerical procedure. The second method is preferred since it is required for conversions to and from discrete time. MCE441 – p.19/22 Linearization - Equilibrium Points An equilibrium point or fixed point of a control system under constant control u0 is defined by the property ẋ = f (x, u0 ) = 0 In nonlinear systems, multiple equilibrium points can exist. For example, the system ẋ1 = x21 − u ẋ2 = x1 x22 − x2 u has 4 equilibrium points for u0 = 1. Find them. MCE441 – p.20/22 Linearization - Equilibrium Points We may linearize a nonlinear system about an equilibrium point by using the Jacobian of f . In doing so, we obtain a linear state-space ˙ = A∆x + B∆u. As an system for state and control deviations: ∆x example, we linearize the above system about u0 = 1 and x0 = [1, 0]T ∂f ∂f ∂f 1 1 1 ˙ 1 = ∆u ∆x + ∆x + ∆x 1 2 ∂x1 u0 ,x0 ∂x2 u0 ,x0 ∂u u0 ,x0 ∂f ∂f ∂f 2 2 2 ˙ 2 = ∆u ∆x + ∆x + ∆x 1 2 ∂x1 ∂x2 ∂u u0 ,x0 u0 ,x0 u0 ,x0 MCE441 – p.21/22 Linearization - Equilibrium Points The matrix A is obtained by taking all partial derivatives of f with ∂fi ), evaluated at (u0 , x0 ). The respect to all variables (A = {aij } = ∂x j matrix B is obtained by taking partial derivatives w.r.t. all control ∂fi . components: B = {bi } = ∂u i Note that the linearized system is valid only in close proximity to (u0 , x0 ). MCE441 – p.22/22