Discrete-time models and control Silvano Balemi University of Applied Sciences of Southern Switzerland Zürich, 2009-2010 Discrete-time signals 1
Step response of a sampled system Sample and hold 2
Sampling Multiplication with a train of unit impulses (operation is linear but time-variant) Train of impulses and its Fourier epansion 3
Sampled signal with Spectrum of Sampled signal 4
Hold Linear operation 1(t) 1(t - T) Impulse response of a ZOH Z transform Laplace transformation with where The z transform corresponds to the sequence with the function 5
Relation between different transforms Z transform: Eamples and properties 6
Eamples of z transforms Some transformations 7
Properties of the z transform Linearity Delay Anticipation Damping Product Initial value End value z transform 1. From the Laplace transformation Factorization Using primitives 8
Inverse z transform 1. Inverse trasform via factorization 2. Inverse transform via recursion Sampled Systems 9
Discrete-time Transfer function from time domain No transfer function between u and y but between u* and y* and with variable substitution l=k-m Discrete-time Transfer function from frequency domain with variable substitution m=k+n 10
Transfer function with ZOH G zoh (z) Eample Transfer function with ZOH 11
State space representation u constant from 0 to T from Transfer function Description of Linear Time-invariant Discrete-time Systems 12
Stability of sampled systems Step responses 13
Closed-loop Control Closed-loop sampled systems Digital controller Cont.-time process Digital part Analog part 14
Closed-loop Discrete-time system (2) model of program model of D/A conv model of process model of A/D conv G zoh (z) Eample: system stability 0.09 15
Eample of a program for a controller Eample of a program for a controller: C-code C-code ek_1=0; ek_2=0; uk_1=0; uk_2=0; while TRUE { yk=read_yk(); ek=yrefk-yk; uk=-uk_1-uk_2+ek_1-3*ek_2; write(uk); uk_2=uk_1; uk_1=uk; ek_2=ek_1; ek_1=ek; } ek_1=0; ek_2=0; uk_1=0; uk_2=0; while TRUE { uk=-uk_1-uk_2+ek_1-3*ek_2; yk=read_yk(); write(uk); ek=yrefk-yk; uk_2=uk_1; uk_1=uk; ek_2=ek_1; ek_1=ek; } Minimize control delay! 16
Control design Controller designed in discrete-time domain Controller designed in continuous-time domain and then transformed into discrete-time domain 17
Discrete-time controllers: design of G TOT (z) Choice of G TOT (z) and calculation of G c (z) Same order of G TOT (z) as of G ZOH (z) Numerator of G TOT (z) with order n-1 all zeroes at 1 Possible amplification for static error reduction Controller obtained from process G ZOH (z) and from G TOT (z) Discrete-time controllers: design of G TOT (z) Eample Plant Desired closed-loop discrete-time poles Closed-loop tr. function Controller 18
Discrete-time controllers: deadbeat control All poles at the origin Choice of starting from Controller obtained with The fastest controller of the west Discrete-time controllers: deadbeat control Eample 19
Discrete-time controllers: Transformation of poles Transformation with Eample: Discrete-time controllers: Discrete PID equivalent 20
Discrete-time controllers: bilinear transformation Transformation 1 2 3 4 5 Stretching of the band π/π onto the s-plane Π Π Discrete-time controllers: bilinear transformation 1. 2. 3., pole at -b 4. 5. 21
Pole assignement: Polynomial approach Characteristic polynomial compared with desired characteristic polynomial gives 2n C +1 variables for n C +n G unknowns Eample: first (second) order controller is sufficient for control of second (third) order system Controllability Property of a system to reach any given state from the origin in a finite time through an appropriate input signal Controllability matri indicates controllability if full rank Controllable subspace 22
Pole assignment: State-feedback controller If system satisfies a property called controllability state feedback yields Any chosen set of closed-loop poles can be obtained through an appropriate matri K Observability Property of a system to estimate the value of the states looking at the inputs and at the outputs Observability matri indicates observability if full rank unobservable subspace 23
Observer/estimator If system satisfies a property called observability State estimate feedback with L yields state error system satisfying Any chosen set of poles for the error system can be obtained through an appropriate matri L State-feedback controller with static error compensation Controller for plant with etended matrices 24
discrete-time controllers: continuous or discrete-time design? G(s) G(w) discrete-time modeling G ZOH (z) continuous-time design G c (s) G c (w) discrete-time approimation G c (z) discrete-time design Saturations and Wind-up 25
Control Wind-up Actuation signal Output signal PID controller with Anti-Wind-up Or limitation of output 26
Anti-Wind-up through saturated feedback and FIR filter implementation All signals bounded! Anti-Wind-up through saturated feedback and IIR filter implementation If Anti-windup measure is too fast (actuation signal may jump from bound to bound) slow-down with low-pass filter F(z) F(z) is polynomial in z -1 with well stable poles (inside unit circle) Case F(z)=1 corresponds to previous case. 27
Anti-Wind-up in state-feedback controllers Anti-Wind-up through saturated feedback for state-feedback controllers All signals bounded! 28
Anti-Wind-up through saturated feedback for state-feedback controllers F(z) is polynomial in z -1 with stable poles (inside unit circle) 29