System Modeling and Identification Lecture Note #6 (Chap.) CBE 7 Korea University Prof. Dae Ryook Yang
Chap. Model Approximation Model approximation Simplification, approximation and order reduction of models Model reduction Model order reduction in a linear system Balanced realization Pade approximation Moment matching Continued fraction approximation Model approximation of a nonlinear system by a linear one Linearization Describing function analysis Approximation of the nonlinear system by ignoring higher-order harmonics
Linearization Nonlinear differential equation: x= f( xu, ) Linearization: x f + f ( x, u )( x x ) + f ( x, u )( u u ) Discretization Sampling time: h xt () = Fx() t + Gu() t x + = Φx + Γu yt () = Cx() t yk = Cxk where h Fh Fs Φ e and Γ e Gds = = Some heuristic model reduction methods (For linear system only) H( z) =. z /(.7z.8 z ) =. z /(.8 z )(+. z ) Polynomial truncation H ( z ).3 z /(.7 z = ) Method of dominating poles H ( z ). z /(.8 z = ) Pole-zero cancellations 3 ( ). /(. ) x u k k k H z = z + z Cancel (-.8z - ) with (-.78z - )
Balanced Realization and Model Reduction The Reachability Gramian xk+ = Φxk + Γuk n S : xk R yk = Cxk What states can be reached with a given input energy assuming that x =? N T Given finite input energy: Ju ( ) = e = uu E uu k= k k States: x = N Φ N k Γu [ Φ N Φ N ][ u u N-] T U k = Γ = ψ = T T Input Sequence for desired x N : U = ( ψ ψ ) ψ x N k N N N T T T k= k k N N N N N Ju ( ) = uu = U U = x P x E T N k T T k N N N k = N N N N N where P = ψ ψ = Φ ΓΓ ( Φ ) Bound on the reachable states at time N P N : Reachability Gramian T T T T P = N ΦPNΦ + ΓΓ + ΦPΦ P + ΓΓ = Lyapunov equation
The Observability Gramian What states energy is necessary for all u k = in order to obtain a specified output energy? Specified output energy: J T ( y ) = e = y y = E T J( y) = y y = xq x = E k = k k T yy k= k k k yk = Cxk = CΦxk = = CΦ x ( uk =, k) where ( T ) k T k Q = Φ CCΦ k= Q: Observability Gramian T T T T Q = Φ QΦ + CC Φ QΦ Q+ CC= Lyapunov equation ( Φ T QΦ + CC T = ( Φ T ) k+ CC T Φ k+ + CC T = Φ ) k = Reachability Gramian decides the minimum input energy to drive a system from x to x N. Observability Gramian decides the maximum output energy that the initial state x can generate.
Balanced Realization Reachability and observability Gramians P and Q define matrices that describe the sensitivity of the input-output map in different directions of state space. Consider a state-space transformation z k =Tx k, then the system becomes T zk+ = TΦT zk + TΓuk Pz = TPT S : T yk = CT zk Qz = T QT Different state-space realization may result in different Gramians Balanced realization: P z =Q z P = Q = Σ = diag( σ, σ ) (where σ = λ ( PQ)) z z i i Algorithm using Cholesky factorization T Q = QQ QPQ = UΣ U ( UU = I) Σ T T T = Σ Σ T Hankelsingular value T = Σ U Q T If some σ i s are relatively small, the Σ can be reduced and the resulting transformation produces a balanced model resuction.
Example. (Balanced model reduction) S : H( z) =. z /(.7z.8 z ) Controllable canonical realization.7.8 xk+ = xk + uk yk = Balanced realization.57.7 P.39.886 = Q =.7.7.886.39.546.763 Q =.3 T.4579.88 =.8.95.55 Σ =.69.7869.79.4579 z = z + u.79.869.8 k+ k k (. ) y Σ k x k From Lyapunov equation.743 =.3 (.4579.8) = z k
Reduced model Since first singular value is dominant, second variable can be reduced as if it has no dynamics (z k+ = z k )..55 Σ z = k+ Φ Φ zk Γ.69 = u + z Φ k Φ z Γ + k z = Φ z + Φ z + Γ u z = ( I Φ ) ( Φ z + Γ u ) k k k k k k k z = Φ z + Φ ( I Φ ) ( Φ z + Γ u ) + Γ u k+ k k k k = ( Φ + Φ ( I Φ ) Φ ) z + ( Γ + Φ ( I Φ ) Γ ) u k y = Cz + C ( I Φ ) ( Φ z + Γ u ) k k k k = ( C + C ( I Φ ) Φ ) z + C ( I Φ ) Γ u k z =.7976z + +.4478u k k k y =.4478z +.95u k k k k k k
Balanced model reduction for continuous systems x A A x B x u = + y = ( C C) + Du x A A x B x x is assumed to have no dynamics x = and x = A A x A B u This method preserves the essential low-frequency properties (gain). The reduced-order state-space model x = ( A A A A ) x + ( B A A B ) u y = ( C CA A) x + ( D CA B) u Other choices x, x = Ax + Bu y = Cx + Du x α x x = ( A A ( αi A ) A ) x + ( B A ( αi A ) B ) u, Comparison Direct transmission term (non-zero even if D=) y = ( C C ( αi A ) A ) x + ( D C ( αi A ) B ) u x Gred () = G() x G ( ) ( ) x red = G αx Gred ( α) = G( α)
Example. (Rohr s system).6683.6355.666.36 x =.6355 8. 7.47 x+.338 u.666 7.47.6.5634 y =.36.338.5634 x ( ).8.36 38.654 345.49 Σ =.9 T =.338 3.678 6.876.7.5634 5.65 5.795 /(s+) Reduced second-order model.65.849.979 x = x u.849.6884 +.566 y = (.979.566) x+.44u 9 Gs ( ) = Reduced first-order model ( s+ ) s + 3s+ 9 x =.9686x+.46u.8955s +.556 G() s = +.44 y =.46x.37u s +.3395s+.353 G( s) = /( s+ )
Continued Fraction Approximation Routh array For an asymptotically stable system Bs () Gs () = R() s R() s As () c + c3 + c5 + c c4 c6 + R () s + R() s + R3() s s s s With m coefficients, the approximating transfer function is m-th order. Bm() s Gm() s = (with Rm ) Am () s Calculation of coefficients ( ) ( ) As () = a + as + = P () s Bs () = b + bs + = P () s a a a c a/ b b b b c b/ p () () () p p p c 3 p / p = () i ( i ) ( i ) ( i ) ( i ) p k = p k p p k / p + + () i () i () i i i p c i+ p / p p p
Interpretation of continued fraction approximation The model reduction presuppose that the inner most TF block may be eliminated. R () m s The condition for good approximation: c / s R () s m m s= For discrete-time system Y( z) = c z U ( z) + Y ( z) i i i+ i+ U ( z) = c Y( z) + U ( z) i+ i i i Yi+ ( z) + c Y( ) i i i i z c z c z Ui+ ( z) = c ( ) i Ui z Yi( z) c ( ) iz Yi+ z Ui( z) = c U i ( z) i + c i c iz + (Used in lattice algorithms) Unimodular (det=)
Example.3 458 Gs () = s + 3s + 59s+ 9 = +.3s+.354s +.44s 3 3 Routh array..3.354.44. c.3.354.44 c.394.78 c.986.44 c.9 c.44 c Reduced-order models G () s = =.5 + s/.7683 +.3s G() s =.5+ /(.7683/ s+ /( 4.736 s/.473)) /(s+).65s = +.985s +.986s 3 4 5 6 =.5 =.7683 = 4.74 =.47 = 34.9 =.659
Moment Matching Transfer function as infinite series H( z ) = h + hz + hz + Matching of the reduced-order model, B m /A m H m m = m m m Am( z ) = + az + + amz M k = nh k n = ( z ) Moment: k n= Moment matching M M M = H m z = dh = dz m B ( z ) b + bz + + bz z= dhm dh m = + dz dz z = z= (,,3, )
Example.4 (Moment matching).z 3 H( z ) =.z.54z.54z.7z.8z = + + + Reduced-order model Bm ( z ) b bz Hm ( z ) = Am ( z ) = + + az Moment matching b + b Hm = = z = + a m z= ( + a) dh ab + b = = 4.99 dz dh ( ab ab) = = 39.74 dz m 3 ( + a ) z = Reduced first-order model H ( z ) =.49+.858z.7993z
Pade Approximation Truncated Taylor series expansion Bs () Gs () = Gm() s = g+ gs + + gm s As () Pade approximation B () s = G () sa () s m m m Example.5 First order: m Ys () 458 Gs ().6s.876s.898s Us () s + 3s + 59s+ 9 3 = = + + 3 B ()/ s A() s = b /( + as) b/( + as ) =.6 s B()/ s A() s = /(+.3 s) Second order: B ()/ s A () s = ( b + bs)/( + as+ as ) ( b + bs)/( + as+ as ) =.6s+.876s.898s 3 B s A s = s + s+ s ()/ () (.645 )/(.987.989 )
Example.6 (Unstable Pade approximation) B () s (+ ) s A () s ( + s+ s ) b ( ) 3 = = + s s + s + ( g gs ) b g ( ag g) s ags + as = + + = + + + + B() s b b = g = B() s = = A() s ( + as ) a = g/ g = A() s ( s) Unstable The Pade approximation can be very poor.
Describing Function Analysis Analysis of Linear systems Laplace and Fourier transforms Describing function analysis Extension of frequency analysis to nonlinear systems Based on harmonic analysis Assumptions Assumed periodic solution is sufficiently close to sinusoidal oscillation y(t)=csin(ωt). The nonlinearity can be represented by u=n(x,x ). Fourier series expansion f ( x ikx ) = cos( ) sin( ) k k k k k k a + a kx + a kx ce = = = = / / where a T T k = ()cos( ), k ()sin( ) T f t kt dt b = f t kt dt T / T T/ ( +ϕ ) c = a + b, ϕ = arctan( a / b ) k k k k k k k
Description of periodic oscillation with input amplitude C c( C) iϕ b + ia NC ( ) = e = Describing function C C T / where ak = nc ( sin tc, cos t)cos( kt) dt, T ω ω ω T / T / bk = nc ( sin ωtc, ωcos ωt)sin( kt) dt T T / Describing function N(C) is obtained as the amplitude dependent gain N(C) and its phase shift ϕ (ω) for the nonlinear elements. Harmonics caused by nonlinearities are ignored in describing function analysis Characteristic equation Bs () G () s = Apxt ( ) () + Bpnxx ( ) (, ) =, p d/ dt As () ( + G ( pnc ) ( )) xt () = G ( p) = / NC ( ) If the Nyquist curves of G (iω) and /N(C) cross, it indicates the possible existence of a limit cycle with amplitude C and frequency ω.
Example.7 (A rate-limited servo) (tan S S / ), + S C C> S NC ( ) = π C C, C S Saturating amplifier For small C, /N(C) (max.) Phase angle of /N(C) is π G (.44 i ) =.667 The Nyquist contour and the describing function cross when K>6. This implies that the limit cycle appears when K>6. K= K=6 K=
Condition of application Assumption: the input to nonlinearity is a sinusoid Linear element is usually low-pass: higher harmonics will be attenuated The conditions G ( ikω) G ( iω) for k =,3, and G ( ikω) as k G (s) must not have any imaginary poles s=ik. The function n(x,x ) should have finite partial derivatives w.r.t. x and x and must not be an explicit function of time. The zero-order coefficient c = of n(x,x ). If the prerequisites are not satisfied, the describing function analysis may predict oscillations that do not exist and may fail to predict periodic solutions that indeed do exist.
Example.8 (Pulse-width modulation, PWM) PWM leads to asymmetric inputs It requires more complicated analysis with a nonzero constant term c of the describing function. Consider a PWM system with switching nonlinearity The pulse-width modulating signal z is often a sawtooth-shaped signal of high frequency. The pulse-width modulated signal is a square wave with nonzero mean. ut () = nvv (, ) (/ z) xt () + nz If the modulating frequency ω z is high compare to G (s), the high frequency components deriving from z are efficiently absorbed by the low-pass link G (s). ut () (/ z )() xt (linearizedform) (n is the ordinary describing function terms)
Balanced Model Reduction in Identification Usage of balanced model reduction Further reduction from a linearized model Identify a reduced-order linear model Identification assisted with model reduction Estimation of high-order model (with sufficient excitation) Model reduction with elimination of less important states Example.9 (Model reduction in identification) S: yk+ =.9yk+. uk + d ( d = ) Identification as first-order model: biased yk+ =.9838yk +.638uk Estimate -th order model, then reduce to first-order model xk+ =.9466xk +.9uk.9z +.9 Y( z) = U( z) y =.9x.9u z.9466 k k k
Example. (An impulse response test) Impulse response data t t gt () =. (.5) +. (.75) State-space model for impulse response, g xk+ = xk + uk Balanced model reduction with n= t gt () =.38 (.53) +.38 (.73) t ( ) y = g g g g x k n n k Impulse response coefficients