Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 5 On-Line Computer Control – The z Transform.

Similar presentations


Presentation on theme: "Chapter 5 On-Line Computer Control – The z Transform."— Presentation transcript:

1 Chapter 5 On-Line Computer Control – The z Transform

2 Analysis of Discrete-Time Systems 1. The sampling process 2. z-transform 3. Properties of z-transforms 4. Analysis of open-loop and closed-loop discrete time systems 5. Design of discrete-time controllers

3 Continuous signal and its discrete-time representation with different sampling rates 3 t (sec) y*y* 6 9 12 3 t (sec) 1 y 79115 3 t (sec) 1 y*y* 6 912 yy*y* Continuous signal Disontinuous signal tt t = nTt y*y* tt t y*y* t y*y* From the response of a real sampler to the response of an ideal impulse sample (a) (b) (c) (a)(b) (c) T = 1 sec T = 3 sec

4 The Sampling Process 1. At sampling times, strength of impulse is equal to value of input signal. 2. Between sampling times, it is zero. Impulse Sampler y (t)y*y* or Laplacing

5 The Hold Process : From Discrete to Continuous Time Zero – Order Hold : m * (t)m (t) Continuous output discrete impulses Hold Device t m * (t) T m (t) 1 Transfer Function : Response of an impulse input :  (t)

6 First Order Hold Response to an impulse input 1 1 2 T 2T Transfer function:

7 First Order versus Zero Order Hold Comparison of reconstruction with zero-order and first-order holds, for slowly varying signals. Comparison of reconstruction with zero-order and first-order holds, for rapidly changing signals. 02T4T6T8T10Tt m * (nT) 02T4T6T8T10Tt m (t) 02T4T6T8T 10T t m (t) 0 1T3T5T7T t m (t) 0 1T3T5T7T t m (t) 0 1T3T5T7T t m * (nT) (a) (b) (c)

8 Z-Transforms y(t) y z (t) Remarks 1. z-transform depends only on the discrete values y(0), y(ז),y(ז)..etc. If two continuous functions have the same sampled values, then z-transform will be the same. 2. It is assumed that the summation exists and is finit. 3. We can also view t in the form Z[ y (s) ] = ŷ(z) Sample

9 Z-Transforms of Basic Functions 1. Unit Step Function 2. Exponential Function

10 Z-Transforms of Basic Functions - Continued 3. Ramp Function 4. Trigonometric Functions

11 Z-Transforms of Basic Functions - Continued 5. Translation

12 Z-transform for Numerical Derivative z -1 is like a back shift operator

13 Properties of z-Transforms 1. Linearity 2. Final Value Theorem

14 Numerical Integration in z-transform Using Trapezoidal Rule or solving

15 1.Partial fraction expansion λ 1, λ 2,… λ n are low-order polynomials in z -1 compute c 1,c 2,…c n. Invert each part separately, we able Inversion of z-transforms

16 y(nT) = -1/2 + 1/2 e 11n y:0,1,4,13,0,… 2.Inversion by Long-Division 1z -1 +4z -2 +13z -3 1-4z -1 +3z- 2 z -1 z -1 -4z -2 +3z -3 4z -2 +3z -3 4z -2 -16z -3 +12z -4 13z -3 -12z -4 y(0) = 0 y(T) = 1 y(2T) = 4 y(3T) = 13 From Tables of z-transforms

17 z-transforms of various functions Function Lalpace transform z-transform in time domain unit impluse 1 unit step 1/s ramp: f(t) = at a/s 2 f(t) = t n n!/s n+1 f(t) = e -at 1/s+a f(t) =te -at 1/(s+a) 2

18 z-transforms of various functions Function Lalpace transform z-transform in time domain f(t) = sinωt f(t) = cosωt f(t) = 1-e -at f(t) = e -at sinωt f(t) = e -at cosωt

19 Discrete-Time Response of systems In computer control: measurements are taken periodically and control actions implemented periodically, This results in a discrete input/discrete output dynamic system. Discrete System enen cncn

20 Example of Discrete Systems Let a discrete time approximation is Taking z-transform

21 Z-transform for a given continuous system with transfer function G(s) and a ZOH

22 Example: Pure Integrator with Hold c*(s)y*(s) Step response Hence of which impulse a ramp response

23 Example : First order lag system

24 Step Response for 1st order lag system y(t) time * * * * * ******* Note: Compare with discrete approximation to First-order system From tables, for

25 Generalization or D (z)=Transfer function relating e and c Analogous to Laplace transfer Discrete time input/output model Remark : Note that D(z) is the z-transform of the response of the system to an impulse input

26 Z-transform of a continuous process with Sample and Hold Hold H (s) Process Gp (s) discrete input c*(s) continuous variables y (s)y*(s) discrete output we seek a relationship (Z-transfer function) between c and y. Consider a impulse input c*(z)=1 c*(s)=1 HGp(z) called the pulse transfer function (since it represents the z-transform of the pulse response of Gp (s) ) Then

27 Properties of pulse Transfer Function 1. 2.An impulse input is converted into a pulse input by the first order hold element. Hence HG(z) is the pulse response of G(s) sampled at z internals of T. 3.The pulse transfer function of two systems in series can be combined if there is a sample and hold in between. G 1 (z)G 2 (z) c1c1 T c3c3 c2c2

28 Closed-Loop System D (z)H (s)Gp (s) set point Hold Process disturbance ysp (z) + - T m (s) T y(2) y1(s) sampled output or 1. Roots of the Characteristic equation 1+HGp(z)D(z)=0 Determine stability of the closed-loop system 2. Note similarity to continuous system.

29 Example: closed-loop response of a first-order system For proportional control where

30 For a unit step change in set point and

31 The response is very similar to continuous control. The steady state value of y(t) is Hence the offset is

32 Stability of Discrete Systems A system is consider to be stable if output remains bounded for bounded Inputs. Consider a discrete system with transfer function Where P 1,P 2,…,P n are n roots of:

33

34 Im Unstable roots real Unit circle STABLE REGION

35

36 Example: Stability of closed-loop

37 Example: Stability of closed- loop - Continued

38 Digital Feedback - Control

39 1. No initialization is necessary. [ C s is not needed ]  Bumpless transfer from manual / automatic 2. Automatic ‘reset-windup’ protection. 3. Protection in case of computer failure 1. Since different modes are indistinguishable, on-line tuning methods will not work. 2. Difficult to put constraints on integral and / or derivative term. 1. Ziegler – Nichols 2. Cohen – Coon settings 3. Time - integral performance criteria Disadvantages: Tuning Digital Controllers: Advantages of velocity Form

40 Y(t) actual time ideal

41 Derivation of Deadbeat Controller- Continued

42 Deadbeat

43 0~10 sec

44 Deadbeat control for (1/(s+1) 3 ) Sampling time: 2

45 Ringing and Pole-placement Ringing refers to excessive value movement caused by a widely oscillating controller output. Caused by negative poles in D(z). Hence avoid poles near -1. Change controller design such that poles are on the side or near zero on negative side

46 SYS = TF(1,[1 3 3 1]) Transfer function: 1 --------------------- s^3 + 3 s^2 + 3 s + 1 >> sysd=c2d(SYS,2) Transfer function: 0.3233 z^2 + 0.3073 z + 0.01584 -------------------------------------- z^3 - 0.406 z^2 + 0.05495 z - 0.002479 Sampling time: 2 0.3233 0.6306 0.3231 0.0158 >> p1=[1 -1];p2=[0.3233 0.3073 0.01584] p2 = 0.3233 0.3073 0.0158 >> c=conv(p1,p2) c = 0.3233 -0.0160 -0.2915 -0.0158

47 Canceling the ringing pole at z=-0.8958 ans = 1.0000 -0.8958 -0.0547 >> p1=[1 0];p2=[1 -0.99];p3=[1 0.0547]; >> c=conv(p1,p2) c = 1.0000 -0.9900 0 >> c=conv(c,p3) c = 1.0000 -0.9353 -0.0542 0 Warning: Using a default value of 1 for maximum step size. The simulation step size will be limited to be less than this value. >>

48 Smoothing the Control Action p=[0.3233 -0.016 -0.2915 -0.01584]; r=roots(p) r = 1.0001 -0.8959 -0.0547 Delete the unstable pole z=-0.8959 p1=[1 -0.99]; p2=[1 0.0547]; c=conv(p1,p2) c = 1.0000 -0.9353 -0.0542

49 Reconstruct the Control Loop

50

51 The treatment of unstable poles sysd=c2d(SYS,1) Transfer function: 0.0803 z^2 + 0.1544 z + 0.01788 ----------------------------------- z^3 - 1.104 z^2 + 0.406 z - 0.04979 >> p2=[ 0.0803 0.1544 0.01788] p2 = 0.0803 0.1544 0.0179 >> p1=[1 -1] p1 = 1 -1 >> c=conv(p1,p2) c = 0.0803 0.0741 -0.1365 -0.0179

52 The treatment of unstable poles >> roots(c) ans = -1.7990 1.0000 -0.1238 >> p1=[1 0];p2=[1 -0.99];p3=[1 0.1238]; >> c=conv(p1,p2) c = 1.0000 -0.9900 0 >> c=conv(c,p3) c = 1.0000 -0.8662 -0.1226 0

53 3.Dahlin’s Method Require that the closed–loop system behave like a first-order system with dead-time. 1.Choose ,  such that D(z) is realizable 2.Lot of algebra Solving for D we want for

54 Dahlin’s Method

55 0~10sec 0~50 sec

56 Dahlin’s Method for for (1/(s+1) 3 ) Sampling time: 2

57 Regulatory Control Consider a process described by y n = a 1 y n-1 + a 2 y n-2 + … + b 1 m n-1 + … + b k m n-k In regulatory control, we want to keep y close to zero in presence of disturbances. Ideally choose m n such that y n ≡ y sp  y sp = a 1 y n + a 2 y n-2 + … + b k y n-k+1 + b 1 m n + b 2 m n-1 + b k m n-k+1 Orm n = -1/b 1 [ y sp – a 1 y n – a y n-1 - a k y n-k+1 – b 2 m n-1 + … - b k m n-k+1 ] Remark 1. Problems can arise in practice if model parameters are not known 2. The above choice is equivalent to minimizing 3. If dead-time is present control will be unrealizable


Download ppt "Chapter 5 On-Line Computer Control – The z Transform."

Similar presentations


Ads by Google