Linear Systems Linear systems?!? (Roughly) Systems which obey properties of superposition Input u(t) output Our interest is in dynamic systems Dynamic system means a system with memory of course including those without memory - memoryless Linear memoryless system y(t) =Ku(t) Causal dynamic system eg y(t) =L(u(t)) L( u 1 (t)+ u (t)) = L(u 1 (t)) + L(u (t)) y(t) = Z t t e (t y(t) =fn(u( ) : apple t) ) u( ) d linearity of the integral implies linearity of this system See the discussion in Kailath Chapter 1 for the subtleties of linearity We like linear systems because of: their simplicity, the availability of tools (like matlab), their local approximation of many physical systems, their amenability for control system design, their propensity for conceptualization 1
Continuous-time State-space Linear Systems Continuous time: time t is a real variable on a connected interval ẋ(t) =A(t)x(t)+B(t)u(t), y(y) =C(t)x(t)+D(t)u(t), x() x R n,u R k y R m t [, 1) signals are the input, state and output The first equation is the state equation and the second is the output or measurement equation u :[, 1)! R k,x:[, 1)! R n,y:[, 1)! R m The state equation is incomplete It needs to have its initial value x() specified in order to yield a unique solution for the state and for the output Linearity ensures that the response is the sum of the input response (zero state response) and the initial condition response (zero input response) For scalar inputs, k=1, we say the system is single-input For k 1, we say the system is multi-input Likewise, single-output for m=1 and multi-output for m 1 SISO - single-input/single-output MIMO - multi-input/multi-output MISO and SIMO sometimes also used State-space encompasses MIMO as easily (with as much difficulty) as SISO
Discrete-time State-space Linear Systems Discrete time: time t takes on discrete values t=kt, k=,-1,,1,, as multiples of the sampling time T We often take just the sample number k as the index and start at So t N there is a need for care if T changes x(t + 1) = A(t)x(t)+B(t)u(t), x(), y(t) =C(t)x(t)+D(t)u(t), x R n,u R k y R m We can write this as x + = A t x + B t u, y = C t x + D t u, x The state equation is a first-order n-vector difference equation Sometimes, we denote a system just by its matrices S = apple At C t B t D t 3
Linear Time-invariant State-space Systems Time-invariance of a system is the property that the response y(t) to input u (t) =u 1 (t + ) y (t) =y 1 (t + ) is for any value of Note that we need to be careful that we handle the time interval properly here, eg t [, 1), so we need to consider the zero state response LTI continuous-time system ẋ(t) =Ax(t)+Bu(t), x() y(t) =Cx(t)+Du(t) LTI discrete-time system x(t + 1) = Ax(t)+Bu(t), x() y(t) =Cx(t)+Du(t) Briefly ẋ = Ax + Bu, x,y= Cx + Du x + = Ax + Bu, x,y= Cx + Du More briefly S : apple A C B D
Where do linear state-space systems come from? Basic principles: physics, chemistry, finance, computation System identification (MAE83A/B): time-series analysis of experimental data Example: Rocket motion We need two initial conditions Define the state Then ẋ(t) = M(t)ÿ(t) = Dẏ(t)+u(t) y(), ẏ() appleẏ(t) x(t) = y(t) appleÿ(t) apple appleẏ(t) apple D/M(t) 1/M (t) = ẏ(t) 1 y(t) + = A(t)x(t)+ B(t)u(t) u(t) x() = appleẏ() y() y(t) = 1 apple ẏ(t) y(t) + u(t) = C(t)x(t)+ D(t)u(t) 5
The concept of state The state of a system at time t is a sufficient set of information so that, given all future (t>t) inputs, we can compute exactly all future outputs y(t) This is a fundamental of systems theory and does NOT coincide with the use of the word state in most other realms, notably quantum mechanics The state provides a distinct separation between past and future hence the connection to dynamics and memory Note the connection to initial conditions and ODEs A finite-dimensional system can restart from a finite set of initial data An infinite-dimensional system, such as ẏ(t) = y(t 1) + u(t), cannot In many physical problems, the state variables are related to the elements figuring in energy position and velocity in the rocket, inductor currents and capacitor voltages in circuits memory storage stability dissipation
input u(t) + _ R i L A Circuit Example output + C v(t) - KVL: Ri(t)+L di (t)+v(t) =u(t) dt i(t) =C dv dt (t) capacitor relation =) Use the initial conditions to define the state di(t) dt dv(t) dt x(t) = = 1 [ Ri(t) v(t)+u(t)] L = 1 C i(t) apple i(t) v(t) This yields the LTI state-space system ẋ = apple R/L 1/L 1/C v = 1 x apple il () x() = v C () State-space ideas really took hold first in circuit theory Capacitor voltages and inductors currents are the natural state variables Resistors are memoryless Note the connection between memory and energy storage here 7 x + apple 1/L u
State-space realization of ODEs Consider the LTI n th -order system described by the ODE d n y dt n + a 1 d n Clearly, we need initial conditions to solve this so let us define a state x(t) = y (n y (n 3 1) (t) ) (t) 7 5 y (t) y(t) 3 y (n) (t) 1) (t) 7 y (t) 5 y (t) y (n Then =ẋ(t) = 1 y dt n 1 + + a n 1 dy dt + a ny = u 3 3 a 1 a a n 1 a n 1 1 1 x(t)+ u(t) 7 7 5 5 1 y(t) = 1 x(t) 8
More General State-space Realization of ODEs Consider a general LTI n th -order system described by an ODE Define the state similarly to (but not the same as) before Then Why? d n y dt n + a 1 1 y dt n 1 + + a dy n 1 dt + a d n 1 u ny = b 1 dt n 1 + + b n 1 d n (more on that later) Same initial conditions 3 z (n) (t) 1) (t) 7 z (t) 5 z (t) z (n =ẋ(t) = z(t)=xn is the response to u, so xn-1 is the response to u, etc du dt + b nu y(), y (), y (),,y (n 1) () 3 3 a 1 a a n 1 a n 1 1 1 x(t)+ u(t) 7 7 5 5 1 y(t) = b 1 b b n 1 b n x(t) This is known as the controllable canonical form state-space realization of the transfer function describing the ODE system 9
State-space Realization of LTI Difference Systems y(t + n)+a 1 y(t + n 1) + + a n y(t) =u(t) An n th -order ODE Initial conditions are clearly Take as state Then y(), y(1),,y(n 1) That is, given these values and {u(i): i=,1, } we can uniquely determine the future values of the output {y(i): i=n,n+1, } y(t + 1) y(t) x(t) = y(t n + 3) y(t n + ) 3 7 5 y(t) y(t 1) y(t n + ) y(t n + 1) = x(t + 1) = 3 7 5 3 3 a 1 a a n 1 a n 1 1 1 x(t)+ 7 7 5 5 1 y(t) = 1 x(t) u(t) 1
Same initial conditions vector x(t) More General LTI Difference System y(t + n)+a 1 y(t + n 1) + + a n y(t) =b 1 u(t + n 1) + + b n u(t) x(t + 1) = but a slightly different state y(), y(1),,y(n 1) 3 3 a 1 a a n 1 a n 1 1 1 x(t)+ u(t) 7 7 5 5 1 y(t) = b 1 b b n 1 b n x(t) This difference equation corresponds to the z-domain transfer function z n Y (z)+a 1 z n 1 Y (z)+ + a n Y (z) =b 1 z n 1 U(z)+ + b n U(z) (z n + a 1 z n 1 + + a n )Y (z) =(b 1 z n 1 + + b n )U(z) Y (z) = b 1 z n 1 + + b n z n + a 1 z n 1 U(z) + + a n = b 1z 1 + b z + + b n z n 1+a 1 z 1 + + a n z n U(z) 11
The ODE d n y dt n + a 1 d n Transfer Function Realization 1 y dt n 1 + + a dy n 1 dt + a d n 1 u ny = b 1 dt n 1 + + b n 1 du dt + b nu corresponds to the s-domain transfer function Y (s) = b 1s n 1 + b s n + + b n s n + a 1 s n 1 + + a n U(s) = G(s)U(s) Take Laplace transforms of the state equation ẋ(t) =Ax(t)+Bu(t) y(t) =Cx(t) sx(s) x( )=AX(s)+BU(s) Y (s) =CX(s) (si A)X(s) =x( )+BU(s) X(s) =(si A) 1 BU(s)+(sI A) 1 x( ) Y (s) =C(sI A) 1 BU(s)+C(sI A) 1 x( ) The transfer function is given by Discrete-time is identical G(s) =C(sI A) 1 B G(z) =C(zI A) 1 B 1
Transfer Function Realization continued Recall the formula for the inverse of a matrix det is the determinant adj M is the adjoint of M - the matrix of cofactors [cofij M] Try the example cofij M is the determinant of the submatrix of M obtained by deleting row i and column j multiplied by (-1) i+j G(s) =C(sI A) 1 B 1 = det(si A) C[adj (si A)]T B 3 1 8 A = 1 5, B = 1 C = 1 1 M 1 = 1 det M 3 1 5 (adj M)T Now try the same A, B and Next try A = C = 1 3 3 3 1 1 1 5, B = 5, C = 1 1 1 13
Now About Those Initial Conditions Discrete-time first Initial conditions for n th -order system: state-space realization: Can we reconstruct x() from Start by solving the equation x(t + 1) = Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) y(), y(1),,y(n 1) and y(), y(1),,y(n 1) u(),,u(n 1) x(1) = Ax() + Bu() x() = Ax(1) + Bu(1) = A x() + ABu() + Bu(1) x(3) = Ax() + Bu() = A 3 x() + A Bu() + ABu(1) + Bu() x(n 1) = A n 1 x() + A n Bu() + A n 3 Bu(1) + + ABu(n 3) + Bu(n ) 1
From state recursion Initial Conditions y() = Cx() y(1) CBu() = CAx() y() CABu() CBu(1) = CA x() whence y(n 1) CA n Bu() CBu(n ) = CA n 1 x() C CA CA CA n 1 3 x() = 7 5 y() y(1) CBu() y() CABu() CBu(1) y(n 1) CA n Bu() CBu(n ) 3 7 5 If the matrix at left is full rank, ie rank n, then we can solve uniquely for the initial state, x(), in terms of the initial ys and us if present This conditions is called observability and is a property of the state-variable realization Failing observability is having too high a state dimension for the system which is like having a pole-zero cancellation in the transfer function 15
Improper Transfer Functions What if the degree of the numerator exceeds that of the denominator? G(z) = z3 z +z +1 z z +5 z +5 =z +1+ z z +5 =z +1+ 5 apple z 1 5 1 z Note that this corresponds to an anticipatory transfer function Outputs depend on future inputs - not physical 1 apple 1 At best the output depends on the current and past inputs G(z) =D + C(zI A) 1 B x(t + 1) = Ax(t)+Bu(t) Proper transfer functions are non-anticipatory and Strictly proper transfer functions are proper and y(t) =Cx(t)+Du(t) D = lim G(z) < 1 z!1 D = lim G(z) = z!1 In continuous-time properness means that the system does not yield derivatives of the input 1
Impulse Responses of LTI State-space Systems Recall the definition of the impulse response This is the zero-state response when the input is an impulse x()= and u(t)=δ(t) continuous Dirac-δ function or discrete Kronecker δt With MIMO mxk systems we need to specify the input channel which of the k possible input rows contains the impulse For such a system, the impulse response is a sequence of mxk matrices {h i : i =, 1,}, h i R m k ẋ(t) =Ax(t)+Bu i (t), x() =, u j (t) = (t)e j y j (t) =Cx(t), j =1,,,k, {e j } standard basis of R k Laplace transforms Y j (s) =C(sI A) 1 Be j = C(sI A) 1 B :,j The mxk matrix transfer function C(sI A) 1 B comprises the k individual impulse response Laplace transforms side-by-side Discrete-time uses the same argument with z-transforms 17
Equivalent State-space Realizations Consider our LTI state-space system For nonsingular matrix Then define the vector So [A, B, C, D, x()] and [T AT 1,TB,CT 1,D,Tx()] realize the same system for any nonsingular T The input-output behaviors are identical These realizations are called equivalent T is called an equivalence transformation or similarity transformation Note the following x(t) =T ẋ(t), T R n n = T Ax(t)+TBu(t) = T AT 1 x(t)+tbu(t) y(t) =Cx(t)+Du(t) =CT ẋ = Ax(t)+Bu(t), y(t) =Cx(t)+Du(t) x() = Tx() 1 x(t)+du(t) x(t) =Tx(t) CT 1 (si T AT 1 ) 1 TB + D = CT [T (si A)T 1 ] so the transfer functions and impulse responses are identical 1 TB + D = CT 1 T (si A) 1 T 1 TB + D = C(sI A) 1 B + D 18