continuous time and discrete time systems
play

Continuous-time and discrete-time systems Comparison similarities - PowerPoint PPT Presentation

Continuous-time and discrete-time systems Comparison similarities and differences Continuous-time systems Discrete-time systems signals = functions signals = sequences ODE:s difference equations Operator: p = d qy ( k ) = y ( k + 1) dt


  1. Continuous-time and discrete-time systems Comparison — similarities and differences Continuous-time systems Discrete-time systems signals = functions signals = sequences ODE:s difference equations Operator: p = d qy ( k ) = y ( k + 1) dt � � x = Ax + Bu ˙ qx = Fx + Gu y = Cx y = Hx � � � � A n − 1 B F n − 1 G S = S = B AB . . . G FG . . .     C H  CA   HF      O = O = . .     . .  .   .      CA n − 1 HF n − 1 1 / 13 hans.rosth@it.uu.se Sampling 1

  2. Continuous-time and discrete-time systems Continued Continuous-time systems Discrete-time systems L -transform Z -transform G ( s ) = C ( sI − A ) − 1 B = b ( s ) G ( z ) = H ( zI − F ) − 1 G = d ( z ) a ( s ) c ( z ) Poles: 0 = det( sI − A ) = a ( s ) Poles: 0 = det( zI − F ) = c ( z ) Static gain = G (0) Static gain = G (1) Stability region: Left half plane Interior of the unit circle 2 / 13 hans.rosth@it.uu.se Sampling 1

  3. Sampled data control Continuous-time system and discrete-time controller 2 4 2 1.5 u ( t ) y ( t ) 0 u(t i ) y(t) System 1 −2 Hold ✲ ✲ −4 0.5 −6 u ( t i ) 0 −8 0 2 4 6 0 2 4 6 t t y ( t i ) ✛ 2 4 Sampling Controller ✛ 2 r ( t i ) 1.5 ✛ r ( t ) 0 y(t i ) u(t) 1 −2 −4 0.5 −6 0 −8 0 2 4 6 0 2 4 6 t t The controller operates in discrete time. ◮ Sampling: Convert continuous-time signal to discrete-time signal. ◮ Hold circuit: Convert discrete-time signal to continuous-time. ◮ Notation (mild abuse of): y ( k ) = y ( kh ) = y ( t ) | t = kh , where h = sampling time/interval/period. 3 / 13 hans.rosth@it.uu.se Sampling 1

  4. Sampled data control Continuous- and discrete-time domains — how do we deal with that? The hold circuit: Typically we use zero-order-hold (ZOH), u ( t ) = u ( kh ) for kh ≤ t < kh + h. Two ways to proceed: I: Work in continuous time: Design a continuous-time controller F ( s ) . For implementation (in a computer), approximate F ( s ) by use of a discrete-time controller, F d ( z ) . II: Work in discrete time: Produce a discrete-time model of the system, and design a discrete-time controller F ( z ) directly. 4 / 13 hans.rosth@it.uu.se Sampling 1

  5. Method I Work in continuous time Use a continuous-time model and your favourite control design method ⇒ a continuous-time controller F ( s ) . The approximation of F ( s ) with a discrete-time controller F d ( z ) is called discretization, and there are several approaches: ◮ Impulse-invariant mapping ◮ Pole-zero matching ◮ Frequency response matching (e.g. by least squares) ◮ Zero-order-hold (ZOH) — we will get to this soon ... ◮ Approximation of the time derivative (numerical differentiation and/or integration) 5 / 13 hans.rosth@it.uu.se Sampling 1

  6. Method I: Discretization Approximation of the time derivative Three methods for approximation of the time derivative: ◮ Forward difference (Euler’s method): dty ( kh ) ≈ y ( kh + h ) − y ( kh ) s ← z − 1 d ⇔ h h ◮ Backward difference: dty ( kh ) ≈ y ( kh ) − y ( kh − h ) s ← z − 1 d ⇔ h hz d ◮ Tustin’s approximation: dt y ( kh ) ≈ ∆ y ( kh ) ∆ y ( kh + h ) + ∆ y ( kh ) = y ( kh + h ) − y ( kh ) s ← 2( z − 1) ⇔ 2 h ( z + 1) h (Tustin’s approximation ⇔ trapezoidal rule in numerical integration.) 6 / 13 hans.rosth@it.uu.se Sampling 1

  7. Method I: Performance How well does it work? For sufficiently fast sampling the performance with these techniques will be almost as good as for the continuous-time controller (if it could be implemented). But how fast should the sampling be? ◮ The sampling frequency ω s = 2 π h . ◮ The Nyquist frequency ω n = ω s 2 = π h . ◮ Aliasing: For a sampled signal the frequency components for frequencies ω > ω n will be interpreted as components for frequences in [0 , ω n [ . (Measure at least twice in a period.) Rule of thumb: For acceptable performance, choose ω s ≥ 20 ω B , where ω B is the desired bandwidth of the closed loop system. 7 / 13 hans.rosth@it.uu.se Sampling 1

  8. Method II Work in discrete time Find a discrete-time model representation of the system. Then use your favourite control design method to obtain a discrete-time controller, which can be implemented directly as it is. We have the continuous-time model � x ( t ) = Ax ( t ) + Bu ( t ) , ˙ ZOH sampling ⇒ y ( t ) = Cx ( t ) u ( t ) is piecewise constant We want to obtain a discrete-time model � x ( k + 1) = Fx ( k ) + Gu ( k ) , ( x ( k ) = x ( kh ) etc ) y ( k ) = Hx ( k ) If possible, we also want x ( k ) = x ( t ) | t = kh , k = 0 , 1 , . . . 8 / 13 hans.rosth@it.uu.se Sampling 1

  9. System sampling A.k.a. ZOH sampling Use the solution of the continuous-time state equation (eq. (3.2)): � t x ( t ) = e A ( t − t 0 ) x ( t 0 ) + e A ( t − τ ) Bu ( τ ) dτ t 0 Here we have u ( t ) = u ( kh ) for kh ≤ t < kh + h . Set t 0 = kh and t = kh + h ⇒ � kh + h x ( k + 1) = x ( kh + h ) = e Ah x ( kh ) + e A ( kh + h − τ ) Bu ( τ ) dτ kh � 0 = [ s = kh + h − τ ] = e Ah x ( kh ) + e As Bu ( kh )( − ds ) h �� h � = e Ah x ( kh ) + e As Bds u ( kh ) 0 9 / 13 hans.rosth@it.uu.se Sampling 1

  10. ZOH sampling Theorem 4.1 Consider the continuous-time system � x ( t ) = Ax ( t ) + Bu ( t ) , ˙ with u ( t ) = u ( kh ) y ( t ) = Cx ( t ) , for kh ≤ t < kh + h. Then x ( k ) = x ( t ) | t = kh , ∀ k ∈ Z , where x ( k ) is given by the discrete-time system � x ( k + 1) = Fx ( k ) + Gu ( k ) , y ( k ) = Hx ( k ) , where � h F = e Ah , e At Bdt G = and H = C. 0 10 / 13 hans.rosth@it.uu.se Sampling 1

  11. Examples of sampled systems The harmonic oscillator ◮ Continuous-time system: � � � �  0 − 1 1  x = ˙ x + u, 1   1 0 0 Y ( s ) = s 2 + 1 U ( s ) ⇔ � �  y =  0 1 x  ◮ Discrete-time state space model: � � � �  cos( h ) − sin( h ) sin( h )  x ( k + 1) = x ( k ) + u ( k ) ,   sin( h ) cos( h ) 1 − cos( h ) � �   y ( k ) = 0 1 x ( k ) .  ◮ Discrete-time transfer function: G ( z ) = H ( zI − F ) − 1 G = (1 − cos( h ))( z + 1) z 2 − 2 cos( h ) z + 1 11 / 13 hans.rosth@it.uu.se Sampling 1

  12. Examples of sampled systems The double integrator ◮ Continuous-time system: � � � �  0 0 1  x = ˙ x + u,  Y ( s ) = 1  1 0 0 s 2 U ( s ) ⇔ � �   y = 0 1 x  ◮ Discrete-time state space model: � � � �  1 0 h  x ( k + 1) = x ( k ) + u ( k ) ,   0 . 5 h 2 h 1 � �   y ( k ) = 0 1 x ( k ) .  ◮ Discrete-time transfer function: � − 1 � = 0 . 5 h 2 ( z + 1) � � z − 1 0 � h � G ( z ) = 0 1 0 . 5 h 2 − h z − 1 ( z − 1) 2 12 / 13 hans.rosth@it.uu.se Sampling 1

  13. Examples of sampled systems DC motor ◮ Continuous-time system: � � � �  0 0 1  x = ˙ x + u,  1  0 − 1 1 Y ( s ) = s ( s + 1) U ( s ) ⇔ � �   y = 1 − 1 x  ◮ Discrete-time state space model: � � � �  1 0 h  x ( k + 1) = x ( k ) + u ( k ) ,   e − h 1 − e − h 0 � �  y ( k ) = x ( k ) .  1 − 1  ◮ Discrete-time transfer function: G ( z ) = H ( zI − F ) − 1 G = ( h − 1 + e − h ) z + 1 − (1 + h ) e − h ( z − 1)( z − e − h ) ◮ Zero in z ′ = − 1 − (1+ h ) e − h h − 1+ e − h , and − 1 < z ′ < 0 for h > 0 . 13 / 13 hans.rosth@it.uu.se Sampling 1

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend