Modeling and Analysis of Dynamic Systems Dr. Guillaume Ducard Fall 2017 Institute for Dynamic Systems and Control ETH Zurich, Switzerland G. Ducard c 1 / 57
Outline 1 Lecture 13: Linear System - Stability Analysis 2 Definitions Equilibrium Sets 3 G. Ducard c 2 / 57
Outline 1 Lecture 13: Linear System - Stability Analysis 2 Definitions Equilibrium Sets 3 G. Ducard c 3 / 57
Zero Dynamics The dynamic behavior of linear system described as d dtx(t) = ẋ(t) = Ax(t)+Bu(t) y(t) = Cx(t)+Du(t) can be studied through its poles (eigenvalues of A) for the stability of the state vector x. See previous lecture. Let s consider the dynamic behavior when the output equation is considered y(t) through the output matrix C. In the Laplace domain, the relationship between input and output can be represented by a transfer function matrix: P(s) = C [si A] 1 B +D G. Ducard c 4 / 57
SISO Case: Transfer Function In the SISO case, the transfer function matrix: P(s) = C [si A] 1 B +D is a scalar rational transfer function which can always be written in the following form P(s) = Y(s) U(s) = k s n r +b n r 1 s n r 1 +...+b 1 s+b 0 s n +a n 1 s n 1 +a n 2 s n 2 +...+a 2 s 2 +a 1 s+a 0 G. Ducard c 5 / 57
SISO Case: Transfer Function P(s) = Y(s) U(s) = k s n r +b n r 1 s n r 1 +...+b 1 s+b 0 s n +a n 1 s n 1 +a n 2 s n 2 +...+a 2 s 2 +a 1 s+a 0 Discussions: The order of the highest power of s is n. Input gain: k The relative degree r: difference between highest power of s at denominator and the highest power of s at numerator. r plays an important role in the discussion of system zeros. A dynamic system can possess - not only poles - but also zeros. Question: What is the influence of the zeros? G. Ducard c 6 / 57
There is an equivalence between the transfer function P(s) = Y(s) U(s) = k s n r +b n r 1 s n r 1 +...+b 1 s+b 0 s n +a n 1 s n 1 +a n 2 s n 2 +...+a 2 s 2 +a 1 s+a 0 and its state-space representation (controller canonical form). 0 1 0... 0 0 d dt x(t) = 0 0 1... 0 0 0 0... 1 x(t)+ 0 0 a 0 a 1 a 2... a n 1 k u(t) y(t) = [ b 0... b n r 1 1 0... 0 ] x(t) = Cx(t) The state vector is x(t) = [ x(t) ẋ(t) ẍ(t)... x (n) (t) ] Controller canonical form with gain k (min. number of parameters) The terms involved in the numerator are those of the C output vector ( transmission zeros ). G. Ducard c 7 / 57
Zero Dynamics - Definition The Zero Dynamics of a system: corresponds to its behavior for those special non-zero inputs u (t) and initial conditions x for which its output y(t) is identical to zero for a finite interval. 1 Study of the influence of the zeros on the dynamic properties of the system. 2 Study of the internal dynamics : analyze the stability of the system states, which are not directly controlled by the input u(t). G. Ducard c 8 / 57
Zero Dynamics - Problem In all the reference-tracking control problems, the controller tries to force the error to zero. ǫ = y ref y If y ref = 0, then y(t) is to be zero for all times, all its derivatives are to be zero as well. If a plant has internal dynamics, which are unstable, but not visible at the system s output, problems are to be expected. Let s see the form of the derivatives. G. Ducard c 9 / 57
The relative degree r is the number of differentiations needed to have the input u(t) explicitly appear in the output y (r) (t) y(t) = Cx(t), ẏ(t) = Cẋ(t) = CAx(t)+CBu(t) = CAx(t),. y (r 1) (t) = d dt y(r 2) (t) = CA r 1 x(t)+ca r 2 Bu(t) = CA r 1 x(t), y (r) (t) = d dt y(r 1) (t) = CA r x(t)+ca r 1 Bu(t) = CA r x(t)+ku(t) where k 0 and r n. G. Ducard c 10 / 57
The relative degree r z 1 = y = Cx = [b 0 x 1 +b 1 x 2 +...+b n r 1 x n r +x n r+1 ] z 2 = ẏ = CAx = [b 0 x 2 +b 1 x 3 +...+b n r 1 x n r+1 +x n r+2 ].. z r = y (r 1) = CA r 1 x = [b 0 x r +b 1 x r+1 +...+b n r 1 x n 1 +x n ] y (r) = CA r x+ku = [b 0 x r+1 +b 1 x r+2 +...+b n r x n +ẋ n ] ẋ n is found from the state-space representation: 0 1 0... 0 d dt x(t) = 0 0 1... 0 0 0 0... 1 a 0 a 1 a 2... a n 1 x(t)+ 0 0 0 k u(t) G. Ducard c 11 / 57
Outline 1 Lecture 13: Linear System - Stability Analysis 2 Definitions Equilibrium Sets 3 G. Ducard c 12 / 57
Formulation The following coordinate transformation z = Φx is introduced z 1 = y = Cx = [b 0 x 1 +b 1 x 2 +...+b n r 1 x n r +x n r+1 ] z 2 = ẏ = CAx = [b 0 x 2 +b 1 x 3 +...+b n r 1 x n r+1 +x n r+2 ]. z r = y (r 1) = CA r 1 x = [b 0 x r +b 1 x r+1 +...+b n r 1 x n 1 +x n ] G. Ducard c 13 / 57
Formulation The remaining n r coordinates are chosen such that the transformation Φ is regular and such that their derivatives also do not depend on the input u. Obviously the choice z r+1 = x 1 z r+2 = x 2... z n = x n r satisfies both requirements. To simplify notation the vector z is partitioned into two subvectors [ ] ξ z =, ξ = z 1..., η = z r+1... η z r z n G. Ducard c 14 / 57
Formulation In the new coordinates the system has the form [ ξ η ] = 0 1 0... 0 0 0 1... 0 0...... 0 1 r T 0......... 0 0......... 0 0......... 0 p T 0......... 0 0......... 0 0......... 0 s T 0 1 0... 0 0 0 1... 0 0...... 0 1 q T [ ξ η ] + 0... 0 k 0...... 0 u and obviously y = z 1 = ξ(1). In order to have an identically vanishing output it is therefore necessary and sufficient to choose the following control and initial conditions ξ = 0, u (t) = 1 k st η (t) where the initial condition η 0 0 can be chosen arbitrarilyġ. Ducard c 15 / 57
Formulation The internal states (zero dynamics states) evolve according to the equation 0 1 0... 0 0 0 1... 0 d dt η(t) = Minimum phase system 0...... 0 1 q T η (t) = Qη (t), η (0) = η 0 If the matrix Q is asymptotically stable (all eigenvalues with negative real part) then the system is minimum phase. Equivalence: a minimum phase system, is a system whose zeros have all negative real parts. These two definitions are consistent: see definition of the vector q T q T = [ b 0, b 1,..., b n r 2, b n r 1 ] G. Ducard c 16 / 57
Unstable Zero dynamics As soon as there is a zero with positive real part: system is non-minimum phase, system has its zero dynamics unstable, its internal states η can diverge without y(t) being affected. Consequences: the input u(t) may not be chosen such that the output y(t) is (almost) zero before the states η associated with the zero dynamics are (almost) zero. Feedback control more difficult to design. This imposes a constraint of the bandwidth of the closed-loop system: significantly slower than the slowest non-minimum phase zero. G. Ducard c 17 / 57
Formulation This equation can be derived using the definition of z n, the original system equation, the definition of z 1 (1), again the coordinate transformation, ż n = ẋ n r = x n r+1 = z 1 b 0 x 1... b n r 1 x n r = z 1 b 0 z r+1... b n r 1 z n = z 1 +q T η Therefore, the eigenvalues of Q coincide with the transmission zeros of the original system and with the roots of the numerator of its transfer function. G. Ducard c 18 / 57
Formulation u η n r 1 η s T 1 k ξ r ξ r 1 ξ 1 = q T r T p T G. Ducard c 19 / 57
Outline 1 Lecture 13: Linear System - Stability Analysis 2 Definitions Equilibrium Sets 3 G. Ducard c 20 / 57
Zero Dynamics Analysis on a Small SISO System P(s) = Y(s) U(s) = k s 2 +b 1 s+b 0 s 4 +a 3 s 3 +a 2 s 2 +a 1 s+a 0 Step 1: Convert the plant s transfer function into a state-space controller canonical form number of states n = 4, relative degree r = 2. d dt x(t) = 0 1 0 0 0 0 1 0 0 0 0 1 a 0 a 1 a 2 a 3 x(t)+ 0 0 0 k u(t) y(t) = [ b 0 b 1 1 0 ] x(t) + [ 0 ] u(t) G. Ducard c 21 / 57
Step 2: Coordinate transformation Relative degree r = 2, therefore y(t) = b 0 x 1 (t)+b 1 x 2 (t)+x 3 (t) ẏ(t) = b 0 x 2 (t)+b 1 x 3 (t)+x 4 (t) ÿ(t) = a 0 x 1 (t) a 1 x 2 (t)+(b 0 a 2 )x 3 (t)+(b 1 a 3 )x 4 (t)+ku(t) The coordinate transformation z = Φ 1 x has the form z 1 = y = b 0 x 1 +b 1 x 2 +x 3 z 2 = ẏ = b 0 x 2 +b 1 x 3 +x 4 z 3 = x 1 z 4 = x 2 G. Ducard c 22 / 57
Step 3: Find the transformation matrices Φ 1, such that z = Φ 1 x and then compute Φ b 0 b 1 1 0 0 b 0 b 1 1 Φ 1 = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 Φ = 1 0 b 0 b 1 and b 1 1 b 0 b 1 b 2 1 b 0 Remark: Notice that, by construction, det(φ) = det(φ 1 ) = 1 G. Ducard c 23 / 57
[ ξ Step 4: Build a new state-space representation in z = η ] ξ = [ z1 in the new coordinates the system z 2 ], η = [ z3 z 4 ] d dt d dt z(t) = Φ 1 AΦ z(t)+φ 1 Bu(t), y(t) = C Φ z (t) ξ 1 (t) ξ 2 (t) η 1 (t) = 0 1 0 0 r 1 r 2 s 1 s 2 0 0 0 1 ξ 1 (t) ξ 2 (t) η 1 (t) + 0 k 0 u(t) η 2 (t) 1 0 b 0 b 1 η 2 (t) 0 G. Ducard c 24 / 57
The coefficients r 1,r 2,s 1,s 2 are listed below r 1 = b 0 a 2 b 1 (b 1 a 3 ) r 2 = b 1 a 3 s 1 = b 0 b 1 (b 1 a 3 ) a 0 b 0 (b 0 a 2 ) s 2 = (b 1 a 3 )(b 2 1 b 0) a 1 (b 0 a 2 )b 1 G. Ducard c 25 / 57
u s 2 k η 2 η 1 s 1 ξ 2 ξ 1 b 1 r 2 b 0 r 1 Figure: System structure of the example s zero dynamics. G. Ducard c 26 / 57
Step 5: Study the submatrix Q of à = Φ 1 AΦ corresponding to the zero-dynamics vector η Choosing the following initial conditions ξ1 (0) = ξ 2 (0) = 0 and control signal u (t) = 1 k [s 1η1(t)+s 2 η2(t)] yields a zero output y(t) = 0 for all t 0. The initial conditions η1 (0) 0 and η 2 (0) 0 may be chosen arbitrarily. The trajectories of state variables η 1 (t) and η 2 (t), in this case, are defined by the equations [ d dt η (t) = 0 1 b 0 b 1 ] η (t) = Q η (t) G. Ducard c 27 / 57
Step 6: Conclude on the conditions to have Q asymptotically stable [ d dt η (t) = 0 1 b 0 b 1 ] η (t) = Q η (t) G. Ducard c 28 / 57
Definitions Equilibrium Sets Outline 1 Lecture 13: Linear System - Stability Analysis 2 Definitions Equilibrium Sets 3 G. Ducard c 29 / 57
Definitions Equilibrium Sets Lyapunov Stability Nonlinear differential equation d dt x(t) = f(x(t),u(t),t), x(t 0) = x 0 0 (1) Equilibrium x e is such that f(x e,t) = 0, t. G. Ducard c 30 / 57
Definitions Equilibrium Sets Stability of Equilibrium Points The point x e is Uniformly Lyapunov Stable (ULS) if for each scalar R > 0, there is a scalar r(r) > 0, such that if the initial condition x 0 satisfies x 0 < r, (2) the corresponding solution of (1) will satisfy the condition for all times t greater than t 0. x(t) < R (3) Remark: The notion uniformly indicates that neither r not R depend on t 0. G. Ducard c 31 / 57
Definitions Equilibrium Sets Lyapunov Stability For isolated equilibrium points: Lyapunov stability is the most useful stability concept. always connected to an equilibrium point x e of a system. The same point x e is asymptotically stable if it is ULS and attractive, i.e. lim t x(t) = x e G. Ducard c 32 / 57
Definitions Equilibrium Sets Lyapunov Stability A system is exponentially asymptotically stable if there exist constant scalars a > 0 and b > 0 such that Remarks: x(t) a e b (t t 0) x 0 1 In general, only an exponentially asymptotically stable equilibrium is acceptable for technical applications, 2 this form of stability is robust with respect to modeling errors. G. Ducard c 33 / 57
Definitions Equilibrium Sets Outline 1 Lecture 13: Linear System - Stability Analysis 2 Definitions Equilibrium Sets 3 G. Ducard c 34 / 57
Definitions Equilibrium Sets Equilibrium Sets For linear systems an equilibrium set can be: one isolated point; entire subspaces; periodic orbits (same frequency but arbitrary amplitude). G. Ducard c 35 / 57
Definitions Equilibrium Sets Equilibrium Sets Nonlinear systems can have (infinitely) many isolated equilibrium points. An equilibrium point can: have a finite region of attraction; be non-exponentially asymptotically stable; and be unstable the state of the system can escape to infinity in finite time. G. Ducard c 36 / 57
Outline 1 Lecture 13: Linear System - Stability Analysis 2 Definitions Equilibrium Sets 3 G. Ducard c 37 / 57
Stability of Nonlinear First-Order Systems First-order nonlinear systems are easy d x(t) = f(x(t),u(t)), x,u R dt because they can be separated for u(t) = 0 dx f(x) = dt = t+c The constant c is needed to satisfy the initial condition x(t 0 ) = x 0. G. Ducard c 38 / 57
Example: Non-Exponential Asymptotic Stability System d dt x(t) = x3 (t)+u(t), x(0) = x 0 Explicit solution for u(t) = 0 dx x 3 = and, therefore dt 1 2x 2 = t+c x(t) = x 0 (2 t x 2 0 +1) 1/2 Therefore, the system is asymptotically stable. G. Ducard c 39 / 57
Example: Non-Exponential Asymptotic Stability But the solution approaches the equilibrium slower than exponentially. To see this use the inequality x(t) = x 0 (2 t x 2 0 +1) 1/2 a e bt x 0 which yields 1 a e bt (2 t x 2 0 +1)1/2 For limt, the right-hand side of this inequality tends to 0 for all possible 0 < a,b <. Contradiction! No exponential asymptotic stability. G. Ducard c 40 / 57
Outline 1 Lecture 13: Linear System - Stability Analysis 2 Definitions Equilibrium Sets 3 G. Ducard c 41 / 57
Stability of Second-Order Systems Two variables involved: x 1 and x 2 d dt x 1(t) = f 1 (x 1,x 2 ), x 1 (0) = x 1,0 (4) d dt x 2(t) = f 2 (x 1,x 2 ), x 2 (0) = x 2,0 G. Ducard c 42 / 57
Taylor expansion d dt x 1(t) = a 11 x 1 (t)+a 12 x 2 (t)+ f 1 (x 1,x 2 ), x 1 (0) = x 1,0 d dt x 2(t) = a 21 x 1 (t)+a 22 x 2 (t)+ f 2 (x 1,x 2 ), x 2 (0) = x 2,0 a i,j = f i f i (x 1,x 2 ), i,j = 1,2 lim = 0 x j x 0 x [ ] a11 a 12 A 2 2 = a 21 a 22 Linear system is given by: d dt δx(t) = A δx(t), δx(t) = [δx 1(t),δx 2 (t)] T (5) G. Ducard c 43 / 57
Outline 1 Lecture 13: Linear System - Stability Analysis 2 Definitions Equilibrium Sets 3 G. Ducard c 44 / 57
2nd-Order Systems Excluding the case where the matrix A has two eigenvalues with zero real part, the local behavior of the nonlinear system (4) and the behavior of the linear system (5) are topologically equivalent (i.e., they have the same geometric characteristics ). eigenvalues linearized system nonlinear system λ 1 C,λ 2 C Stable Focus Stable Focus λ 1 R,λ 2 R Stable Node Stable Node λ 1 R +,λ 2 R Saddle Saddle λ 1 R +,λ 2 R + Unstable Node Unstable Node λ 1 C +,λ 2 C + Unstable Focus Unstable Focus Re(λ 1,2 ) = 0 Center??? G. Ducard c 45 / 57
1 Stable Focus Stable Node Saddle 1 1 0.5 0.5 0.5 x2 0 x2 0 x2 0-0.5-0.5-0.5-1 -1 0 x 1 1-1 -1 0 x 1 1-1 -1 0 x 1 1 1 Unstable Node Unstable Focus Center 1 1 0.5 0.5 0.5 x2 0 x2 0 x2 0-0.5-0.5-0.5-1 -1 0 x 1 1-1 -1 0 x 1 1-1 -1 0 1 x 1 G. Ducard c 46 / 57
Example Critical Nonlinear System d dt x 1 = x 1 +x 2 d dt x 2 = x 3 2 System has only one isolated equilibrium at x e,1 = x e,2 = 0. Linearization has one eigenvalue at 1 and one at 0. Observations: The solution of the linear system is stable (although not asymptotically stable), while the nonlinear system is unstable (it has even finite escape times). x 2,0 x 2 (t) = 1 2tx 2 2,0 With limt 1/(2x 2 2,0 ) x 2(t) escapes to infinity. G. Ducard c 47 / 57
General Systems 1 The is valid for all finite-order systems: as long as the linearized system has no eigenvalues on the imaginary axis, 2 The local stability properties of an arbitrary-order nonlinear system are fully understood once the eigenvalues of the linearization are known. 3 Particularly, if the linearization of a nonlinear system around an isolated equilibrium point x e is asymptotically stable (unstable resp.), then this equilibrium is an asymptotically stable (unstable resp.) equilibrium of the nonlinear system as well. G. Ducard c 48 / 57
General Systems Remarks: 1 Nothing is said about the large signal behavior. 2 In the critical case (Re{λ i } = 0), the nonlinear system s behavior is not defined by its first-order approximation, but by the higher-order terms f(x). G. Ducard c 49 / 57
Outline 1 Lecture 13: Linear System - Stability Analysis 2 Definitions Equilibrium Sets 3 G. Ducard c 50 / 57
Local stability properties of equilibrium x = 0 of system fully described by ẋ(t) = f(x(t)), x(0) 0 (6) A = f x x=0 provided A has no eigenvalues with zero real part. If this is not true or if one is interested in non-local results for more general systems, then use Lyapunov s direct method. G. Ducard c 51 / 57
Definitions A scalar function α(p) with α : R + R + is a nondecreasing function if α(0) = 0 and α(p) α(q) p > q. A function V : R n+1 R is a candidate global Lyapunov function if the function is strictly positive, i.e., V(x,t) > 0 x 0, t and V(0) = 0; and there are two nondecreasing functions α and β that satisfy the inequalities β( x ) V(x, t) α( x ). Obviously, if these conditions are met only in a neighborhood of the equilibrium point x = 0 only local assertions can be made. G. Ducard c 52 / 57
Theorem 1 The system ẋ(t) = f(x(t),t), x(t 0 ) = x 0 0 is globally/locally stable in the sense of Lyapunov if there is a global/local Lyapunov function candidate V(x, t) for which the following inequality holds true x(t) 0 and t Theorem 2 V(x(t),t) = V(x,t) t + V(x,t) f(x(t),t) 0 x The system (6) is globally/locally asymptotically stable if there is a global/local Lyapunov function candidate V(x, t) such that V(x(t),t) satisfies all conditions of a global/local Lyapunov function candidate. G. Ducard c 53 / 57
In general, it is very difficult to find a suitable function V(x,t) Hint: use physical insight, Lyapunov functions can be seen as generalized energy functions. Linear systems are simple V(x) = x T Px where P = P T > 0 is the solution of the Lyapunov equation PA+A T P = Q For arbitrary Q = Q T > 0, a solution to this equation exists iff A is Hurwitz matrix. Remark: Lyapunov theorems provide sufficient but not necessary conditions. Many extension proposed (LaSalle, Hahn, etc.). G. Ducard c 54 / 57
Example System d dt x 1 = x 1 (x 2 1 +x2 2 1) x 2 (7) d dt x 2 = x 1 +x 2 (x 2 1 +x2 2 1) One isolated equilibrium at x 1 = x 2 = 0. Linearizing the system around this equilibrium yields A = [ 1 1 1 1 Eigenvalues are λ 1,2 = 1±j, system is locally asymptotically stable (Lyapunov principle). ] G. Ducard c 55 / 57
Example System has a finite region of attraction. Use a Lyapunov analysis to obtain a conservative estimation of the region of attraction. Candidate Lyapunov function V(x) = x 2 1 +x 2 2 Time derivative of V along a trajectory of (7) V(t) = 2(x 2 1 +x2 2 )(x2 1 +x2 2 1) Therefore, at least the region x 2 = x 2 1 +x2 2 < 1 must be part of the region of attraction. G. Ducard c 56 / 57
Vector field 0.1 f(x), x=end point 1.5 1 0.5 x2 0-0.5-1 -1.5-1.5-1 -0.5 0 0.5 1 1.5 x 1 G. Ducard c 57 / 57