Linear Systems and Control Lecture # 1 State models – p. 1/3 We will deal with dynamical systems modeled by n coupled first-order ordinary differential equations: ẋ1 = f1 (t, x1 , . . . , xn , u1 , . . . , um ) ẋ2 = f2 (t, x1 , . . . , xn , u1 , . . . , um ) .. .. . . ẋn = fn (t, x1 , . . . , xn , u1 , . . . , um ) ẋi = dxi dt , t is the time variable u1 , . . . , um are the input variables x1 , . . . , xn are the state variables – p. 2/3 Vector Notation: x1 u1 x2 u2 .. x = . , u = .. . . .. um xn , f (t, x, u) = f1 (t, x, u) f2 (t, x, u) .. . .. . fn (t, x, u) ẋ = f (t, x, u) – p. 3/3 Output equation: y= y1 y2 .. . yp y = h(t, x, u) , h(t, x, u) = h1 (t, x, u) h2 (t, x, u) .. . hp (t, x, u) State Model: ẋ = f (t, x, u) State equation y = h(t, x, u) Output equation – p. 4/3 Example: Consider a single-input–single-output (SISO) system represented by the nth-order differential equation y (n) = g t, y, y (1) , . . . , y (n−1) , u where u is the input, y is the output, and y (i) = di y dti State variables: x1 = y, x2 = y (1) , · · · , xn = y (n−1) – p. 5/3 y (n) = g t, y, y (1) , . . . , y (n−1) , u x1 = y, x2 = y (1) , · · · , xn = y (n−1) ẋ1 = x2 ẋ2 = x3 .. .. . . ẋn−1 = xn ẋn = g(t, x1 , x2 , . . . , xn , u) – p. 6/3 f = x2 x3 .. . xn g(t, x1 , x2 , . . . , xn , u) , h = x1 ẋ = f (t, x, u) y = h(x) – p. 7/3 Example: Consider a SISO system represented by the input-output relation ÿ + a1 ẏ + a2 y = b0 ü + b1 u̇ + b2 u where u is the input, and y is the output Rewrite equation as follows: ÿ = b0 ü + (b1 u̇ − a1 ẏ) + (b2 u − a2 y) Z Z Z y = b0 u + (b1 u − a1 y) + (b2 u − a2 y) {z } | x2 | {z } x1 – p. 8/3 Define: x1 = x2 = Z Z (b1 u − a1 y)dt + Z Z (b2 u − a2 y)dt dt (b2 u − a2 y)dt Then, y = b0 u + x1 ẋ1 = b1 u − a1 y + x2 = (b1 − b0 a1 )u − a1 x1 + x2 ẋ2 = b2 u − a2 y = (b2 − b0 a2 )u − a2 x1 – p. 9/3 " #" # " −a1 1 b 1 − b 0 a1 x1 f = + −a2 0 x2 b 2 − b 0 a2 " # h i x 1 + b0 u h = 1 0 x2 # u ẋ = f (t, x, u) y = h(x) – p. 10/3 Example: Pendulum Equation l θ • mg mℓ2 θ̈ = −mgℓ sin θ − kℓ2 θ̇ + u m ℓ u k Mass of the bob Length of the rod Applied torque Friction coefficient – p. 11/3 mℓ2 θ̈ = −mgℓ sin θ − kℓ2 θ̇ + u θ̈ = −(g/ℓ) sin θ − (k/m)θ̇ + (1/mℓ2 )u State variables : x1 = θ, x2 = θ̇ Output variable : y = θ f = " x2 −(g/ℓ) sin x1 − (k/m)x2 + (1/mℓ2 )u # , h = x1 ẋ = f (x, u) y = h(x) – p. 12/3 Existence and Uniqueness of Solutions Consider ẋ = f (t, x, u) y = h(t, x, u) Assume that f and h are continuously differentiable in (x, u) and continuous in t Then there is a unique solution x(t) of ẋ = f (t, x, u), x(t0 ) = x0 over some time interval [t0 , t1 ]. Consequently, the output y(t) is unique – p. 13/3 Classification of State models Time-varying system: ẋ = f (t, x, u) y = h(t, x, u) Time-invariant system: ẋ = f (x, u) y = h(x, u) The response of a time-invariant system is invariant to shifts of the time origin. Therefore, without loss of generality, we can take the initial time to be t0 = 0 Why? – p. 14/3 Let x(t) be the solution of ẋ = f (x(t), u(t)), x(t0 ) = x0 and x̃(t) be the solution of x̃˙ = f (x̃(t), ũ(t)), x̃(t0 + a) = x̃0 Take x̃0 = x0 and ũ(t) = u(t − a), for t ≥ t0 + a – p. 15/3 τ =t−a ψ(τ ) = x̃(τ + a) = x̃(t) dψ dτ dψ = dx̃ dt = f (x̃(τ + a), ũ(τ + a)) = f (ψ(τ ), u(τ )), dτ By the uniqueness of solution ψ(τ ) = x(t) ψ(t0 ) = x0 t=τ x̃(t) = ψ(τ ) = ψ(t − a) = x(t − a) – p. 16/3 Classification of State models Nonlinear system: ẋ = f (t, x, u) y = h(t, x, u) Linear system: ẋ = A(t)x + B(t)u y = C(t)x + D(t)u A is n × n, B is n × m, C is p × n, D is p × m The response of a linear system satisfies the superposition principle: Let (xa (t), ya (t)) be the response to xa (t0 ) = xa0 & ua (t) (xb (t), yb (t)) be the response to xb (t0 ) = xb0 & ub (t) then, for any real numbers α and β , αxa (t) + βxb (t) is the response to x(t0 ) = αxa0 + βxb0 & u(t) = αua (t) + βub (t) – p. 17/3 Let x(t) be the solution of ẋ = A(t)x + B(t)u x(t0 ) = αxa0 + βxb0 , and u(t) = αua (t) + βub (t) Let ψ(t) = αxa (t) + βxb (t) ψ̇ = = = = αẋa + β ẋb α[A(t)xa + B(t)ua ] + β[A(t)xb + B(t)ub ] A(t)(αxa + βxb ) + B(t)(αua + βub ) A(t)ψ + B(t)u By the uniqueness of solutions x(t) = ψ(t) = αxa (t) + βxb (t) – p. 18/3 Classification of Linear models Time-varying: ẋ = A(t)x + B(t)u y = C(t)x + D(t)u Time-invariant: ẋ = Ax + Bu y = Cx + Du The response of a linear time-invariant system is invariant to shifts of the time origin. Therefore, without loss of generality, we can take the initial time to be t0 = 0 – p. 19/3 Linearization Consider the nonlinear state equation ẋ = f (t, x, u) Let x̃(t) be the solution when u(t) = ũ(t) and x̃(t0 ) = x̃0 Suppose the input and initial state are slightly perturbed u(t) = ũ(t) + uδ (t), x0 = x̃0 + x0δ where kuδ (t)k and kx0δ k are small q kxk = x21 + · · · + x2n – p. 20/3 Let x(t) be the solution of ẋ = f (t, x, u), x(t0 ) = x0 and write x(t) = x̃(t) + xδ (t) It is reasonable to expect kxδ (t)k to be small ẋ = f (t, x, u), x(t0 ) = x0 x̃˙ + ẋδ = f (t, x̃ + xδ , ũ + uδ ), x̃(t0 ) + xδ (t0 ) = x̃0 + x0δ Expand the R.H.S. in a Taylor series about the nominal solution – p. 21/3 fi (t, x̃ + xδ , ũ + uδ ) = fi (t, x̃, ũ) ∂fi n + Σj=1 (t, x̃, ũ)xδj ∂xj m ∂fi (t, x̃, ũ)uδj + Σj=1 ∂uj + Higher order terms – p. 22/3 fi (t, x̃ + xδ , ũ + uδ ) ≈ fi (t, x̃, ũ) + + ∂fi ∂x1 ∂fi ∂u1 ,..., ,..., ∂fi ∂xn ∂fi ∂um xδ1 .. . xδn uδ1 .. . uδm and ∂f ∂u such that ∂f ∂fi the (i, j) element of is ∂u ∂uj Define the Jacobian matrices ∂f ∂x – p. 23/3 ˙x̃ + ẋδ ≈ f (t, x̃, ũ) + ∂f (t, x̃, ũ)xδ ∂x ∂f + (t, x̃, ũ)uδ , ∂u x̃(t0 ) + xδ (t0 ) = x̃0 + x0δ x̃˙ = f (t, x̃, ũ), ẋδ ≈ ∂f ∂x x̃(t0 ) = x̃0 (t, x̃, ũ)xδ + ∂f ∂u (t, x̃, ũ)uδ , xδ (t0 ) = x0δ – p. 24/3 Let A(t) = ∂f ∂x (t, x̃, ũ), B(t) = ẋδ ≈ A(t)xδ + B(t)uδ , ∂f ∂u (t, x̃, ũ) xδ (t0 ) = x0δ Similarly yδ ≈ C(t)xδ + D(t)uδ C(t) = ∂h (t, x̃, ũ), ∂x Approximate Linear Model: D(t) = ∂h ∂u (t, x̃, ũ) ẋδ = A(t)xδ + B(t)uδ yδ = C(t)xδ + D(t)uδ – p. 25/3 Example ẋ1 = x2 ẋ2 = −x22 + u y = sin x1 + x2 u Let t0 = 0, ũ(t) ≡ 0, ∀ t ≥ 0, x̃0 = Nominal solution : x̃(t) = " " 1 1 1 + ln(1 + t) 1 1+t # # Linearize the system about the nominal solution – p. 26/3 f (x, u) = ∂f " ∂f1 ∂x1 ∂f2 ∂x1 " ∂f1 ∂x2 ∂f2 ∂x2 x2 −x22 + u # " # 0 1 = = 0 −2x2 ∂x # " ∂f 0 1 A(t) = (x̃, ũ) = 2 0 − 1+t ∂x " # " # ∂f1 ∂f 0 ∂u = ∂f2 = =B 1 ∂u ∂u # – p. 27/3 h(x, u) = sin x1 + x2 u ∂h ∂x C(t) = = ∂h ∂x h ∂h ∂x1 (x̃, ũ) = ∂h ∂u ∂h ∂x2 h i = h cos x1 u i cos(1 + ln(1 + t)) = x2 ⇒ D(t) = 1 0 i 1+t – p. 28/3 Calculation of the nominal solution dx2 x22 ẋ1 = x2 , x1 (0) = 1 ẋ2 = −x22 , x2 (0) = 1 = −dt ⇒ Z x2 1 dz z2 = − Z t dτ 0 x 2 1 1 1 − = −t ⇒ − + 1 = −t ⇒ x2 = z 1 x2 1+t Z t 1 x1 (t) = 1 + dτ = 1 + ln(1 + t) 0 1+τ – p. 29/3 Special Case Consider the state equation ẋ = f (x) and suppose that x̄ is an equilibrium point f (x̄) = 0 x(0) = x̄ ⇒ x(t) ≡ x̄, ∀ t ≥ 0 Linearization about x̄: ẋδ = Axδ , A= ∂f ∂x (x̄) – p. 30/3 Example: The Pendulum equation(with u = 0) ẋ1 = x2 ẋ2 = −(g/ℓ) sin x1 − (k/m)x2 y = x1 f = " x2 −(g/ℓ) sin x1 − (k/m)x2 # , h = x1 Equilibrium Points: ẋ1 = ẋ2 = 0 ⇒ x2 = 0, x̄ = " kπ 0 # , sin x1 = 0 k = 0, ±1, ±2, . . . – p. 31/3 " # x2 f = −(g/ℓ) sin x1 − (k/m)x2 " # ∂f 0 1 = −(g/ℓ) cos x1 −(k/m) ∂x " # 0 1 Linearization at (0, 0) : A= −(g/ℓ) −(k/m) " # 0 1 Linearization at (π, 0) : A= (g/ℓ) −(k/m) – p. 32/3