570 likes | 581 Views
This chapter covers the principles and analysis of discrete-time systems using the z-transform method. It includes topics such as sampling process, properties of z-transforms, analysis of open-loop and closed-loop systems, and design of discrete-time controllers.
E N D
Chapter 5 On-Line Computer Control – The z Transform
Analysis of Discrete-Time Systems • The sampling process • z-transform • Properties of z-transforms • Analysis of open-loop and closed-loop discrete time systems • Design of discrete-time controllers
Continuous signal Disontinuous signal y y* y y* 9 12 t (sec) 1 3 5 7 9 11 t (sec) 1 3 6 y* y* Dt y* Dt y* 9 12 t = nT t t (sec) 6 3 t = nT t t = nT t T = 1 sec • Continuous signal and its discrete-time representation with different sampling rates (a) (b) T = 3 sec (c) (b) (a) (c) • From the response of a real sampler to the response of an ideal impulse sample
Impulse Sampler y (t) y* The Sampling Process • At sampling times, strength of impulse is equal to value of input signal. • Between sampling times, it is zero. Laplacing or
discrete impulses Continuous output m* (t) m (t) Hold Device 1 m (t) m* (t) T t The Hold Process :From Discrete to Continuous Time • Zero – Order Hold : • Transfer Function : Response of an impulse input : d (t)
2 1 2T T 1 -1 First Order Hold Response to an impulse input Transfer function:
m* (nT) m (t) m (t) 0 t 1T 3T 5T 7T 0 t 1T 3T 5T 7T 0 t 1T 3T 5T 7T m* (nT) m (t) m (t) 0 2T 4T 6T 8T 10T t 0 2T 4T 6T 8T 10T t t 10T 0 2T 4T 6T 8T First Order versus Zero Order Hold Comparison of reconstruction with zero-order and first-order holds, for slowly varying signals. (a) (b) (c) (a) (b) (c) Comparison of reconstruction with zero-order and first-order holds, for rapidly changing signals.
Sample Z-Transforms y(t) yz(t) Remarks 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. It is assumed that the summation exists and is finit. We can also view t in the form Z[ y (s) ] = ŷ(z)
Z-Transforms of Basic Functions 1. Unit Step Function 2. Exponential Function
Z-Transforms of Basic Functions - Continued 3. Ramp Function 4. Trigonometric Functions
Z-Transforms of Basic Functions - Continued 5. Translation
Z-transform for Numerical Derivative z-1 is like a back shift operator
Properties of z-Transforms 1. Linearity 2. Final Value Theorem
Numerical Integration in z-transform Using Trapezoidal Rule or solving
Inversion of z-transforms 1.Partial fraction expansion λ1, λ2,… λn are low-order polynomials in z-1 compute c1,c2,…cn. Invert each part separately, we able
From Tables of z-transforms y(nT) = -1/2 + 1/2 e11n 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
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/s2 f(t) = tn n!/sn+1 f(t) = e-at 1/s+a f(t) =te-at 1/(s+a)2
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
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. cn en Discrete System
Example of Discrete Systems Let a discrete time approximation is Taking z-transform
Z-transform for a given continuous system with transfer function G(s) and a ZOH
c*(s) y*(s) Example: Pure Integrator with Hold Step response Hence of which impulse a ramp response
y(t) * * * * * * * * * * * * time Step Response for 1st order lag system From tables, for Note: Compare with discrete approximation to First-order system
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
Hold H (s) Process Gp (s) c*(s) y (s) y*(s) discrete input discrete output continuous variables Z-transform of a continuous process with Sample and Hold we seek a relationship (Z-transfer function) between c and y. Consider a impulse input c*(z)=1 c*(s)=1 Then HGp(z) called the pulse transfer function (since it represents the z-transform of the pulse response of Gp (s) )
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. c2 c1 c3 G1(z) G2(z) T
disturbance Process Hold T T + D (z) H (s) Gp (s) y(2) set point m (s) ysp (z) - y1(s) sampled output Closed-Loop System 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.
Example: closed-loop response of a first-order system For proportional control where
The response is very similar to continuous control. The steady state value of y(t) is Hence the offset is
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 P1,P2,…,Pn are n roots of:
Im Unstable roots real STABLE REGION Unit circle
Advantages of velocity Form • No initialization is necessary. [ Cs is not needed ] Bumpless transfer from manual / automatic • Automatic ‘reset-windup’ protection. • Protection in case of computer failure • Disadvantages: • Since different modes are indistinguishable, on-line tuning methods will not work. • Difficult to put constraints on integral and / or derivative term. • Tuning Digital Controllers: • Ziegler – Nichols • Cohen – Coon settings • Time - integral performance criteria
actual ideal time Y(t)
Deadbeat 0~10 sec
Deadbeat control for (1/(s+1)3) • Sampling time: 2
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
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
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. • >>
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