Presentation is loading. Please wait.

Presentation is loading. Please wait.

Analog and Digital Control 1

Similar presentations


Presentation on theme: "Analog and Digital Control 1"— Presentation transcript:

1 Analog and Digital Control 1
Lecture 3 Kirsten Mølgaard Nielsen Based on lecture notes by Jesper Sandberg Thomsen

2 Outline Discrete equivalents Design by emulation
Overview (emulation – finding a discrete equivalent to the continuous system) Numerical integration Zero-Pole matching (mapping) Hold equivalents Design by emulation Evaluation of design Nyquist stability criterion Continuous case Discrete case

3 Discrete Equivalents - Overview
r(t) e(t) controller D(s) u(t) plant G(s) y(t) + - Translation to discrete plant Zero order hold (ZOH) Translation to discrete controller (emulation) Numerical Integration • Forward rectangular rule • Backward rectangular rule • Trapeziod rule (Tustin’s method, bilinear transformation) • Bilinear with prewarping Zero-Pole Matching Hold Equivalents • Zero order hold (ZOH) • Triangle hold (FOH) Emulation Purpose: Find a discrete transfer function which approximately has the same characteristics over the frequency range of interest. Digital implementation: Control part constant between samples. Plant is not constant between samples.

4 Numerical Integration
Fundamental concept Represent H(s) as a differential equation. Derive an approximate difference equation. We will use the following example Notice, by partial expansion of a transfer function this example covers all real poles. Example Transfer function Differential equation

5 Numerical Integration

6 Numerical Integration
Now, three simple ways to approximate the area. Forward rectangle approx. by looking forward from kT-T Backward rectangle approx. by looking backward from kT Trapezoid approx. by average kT-T kT kT-T kT kT-T kT

7 Numerical Integration
Forward rectangular rule (Euler’s rule) (Approximation kT-T)

8 Numerical Integration
Backward rectangular rule (app kT)

9 Numerical Integration
Trapezoid rule (Tustin’s Method, bilinear trans.) (app ½(old value + new value))

10 Numerical Integration
Comparison with H(s)

11 Numerical Integration
Transform s ↔ z Comparison with respect to stability In the s-plane, s = jw is the boundary between stability and instability.

12 Numerical Integration - stability
(Forward) Region of s-LHP (Trapezoid) Region of s-LHP (Backward) Region of s-LHP

13 Numerical Integration
Some conclusions Higher distortion with the forward and backward rule. The forward rectangular rule could cause a stable continuous filter to be mapped into an unstable digital filter. The trapezoid rule maps the stable region in the s-plane exactly into the stable region of the z-plane. Though, the jw-axis is compressed into the unit circle with length 2p. The trapezoid rule appears superior. But, let us make some further investigations..... let us calculate the power |H(jw)|2 at, for example, w = a – the change in frequency response.

14 Numerical Integration
What about HT(z) ? at which frequency is |HT(z)|2 = 0.5 ?

15 Numerical Integration
HT(z) as before but re-formulated (page 194) I.e. high sampling frequency

16 Numerical Integration
Trapezoid with pre-warping maintain the power at some specified frequency Choose a critical frequency w1 Replace w1 by a´ such that new a = a’, and insert in H(s). a’ = (2/T) tan(w1 T/2) Find the discrete filter H(z) based on the modified continuous transfer function H(s).

17 Numerical Integration
Plots for T = 0.1 ws ≈ 60 wb

18 Numerical Integration
Plots for T = 1 ws ≈ 6 wb Notice, prewarp

19 Numerical Integration
Plots for T = 2 ws ≈ 3 wb Notice, prewarp

20 Zero-Pole Matching Exact map between poles (z = esT) exists.
Basic idea, simply use same map for zeros. Rules 1. All poles are mapped by z = esT. For example, s = -a maps to z = e-aT 2. All finite zeros are mapped by z = esT. For example, s = -b maps to z = e-bT 3. Basically, zeros at jw = infinity maps to z = ejp = (representing the highest frequency) 4. Identical gain at some critical freq. (typically, s=0) H(s) at s=0 = H(z) at z=1

21 Zero-Pole Matching Example (1)
Compute the discrete equivalent by zero-pole matching

22 Zero-Pole Matching s-plane z-plane

23 Zero-Pole Matching Including delay in computer
Notice, u(k) depends on e(k). This comes from rule 3 Solution, first zero for s=infinity is mapped to z=infinity (as in Matlab). This gives

24 Hold Equivalents Purpose, design a discrete filter H(z), such that
input e(k) is samples of e(t) H(z) has an output u(k) u(k) approximates the output of the continuous filter H(s) whose input is the continuous signal e(t). Zero order hold (ZOH) (step invariant), approach below Hold Sampler H(s) e(t) e(k) u(k) eh(t) u(t)

25 Hold Equivalents Hold operation Q(s) Hold Sampler H(s) e(t) e(k) u(k)
eh(t) u(t)

26 Hold Equivalents ZOH transformation Notice, we can find H(z) by
Take inverse Laplace to find a continuous signal. Sample this continuous signal to find a discrete signal. Hold Sampler H(s) e(t) e(k) u(k) eh(t) u(t)

27 Hold Equivalents Continuous output signal
Discrete output signal and transfer function H(z)

28 Hold Equivalents Triangle hold equivalent
Extrapolate the samples to connect sample to sample in a straight line. Impulse response for triangle hold Hold System

29 Hold Equivalents Same third order filter as before + Zero-pole o ZOH
x Triangle T = 1 (next T=2)

30 Hold Equivalents Same filter as before + Zero-pole o ZOH x Triangle

31 Hold Equivalents Concluding remarks Methods, we have looked at
Numerical integration methods Zero-pole matching (mapping) Hold equivalents All methods works fine for high sample frequency Matlab

32 Evaluation of Design Discrete controller by emulation
Can be calculated using one of several techniques. Evaluation discrete equivalent (design) We need to analyze in the z-domain. Process expressed in z-domain (ZOH) Notice, other eval. might be necessary (simulation)

33 Evaluation of Design Example, using Matlab sysD_c = tf([10 1],[1 1]);
T = 0.2; % around 30*wn. Also use, T = 1 sysD_d = c2d(sysD_c,T,’matched’); % zero-pole matched sysG_c = tf([1],[ ]); sysG_d = c2d(sysG_c,T,’zoh’); % zero order hold sysCL_c = feedback(sysD_c*sysG_c,1); sysCL_d = feedback(sysD_d*sysG_d,1); step(sysCL_c); hold on; step(sysCL_d);

34 Evaluation of Design T = 0.2 (ws ≈ 30 wn)

35 Evaluation of Design T = 1 (ws ≈ 6 wn)
The sample delay gives phase lag. Thus, less PM which gives higher overshoot

36 Nyquist Stability Criterion
Check closed loop stability with controller KD(s) and plant G(s) Characteristic equation (CE) Notice, number of poles in CE equals number of open-loop poles in D(s)G(S). (known) Notice, zeros in CE are closed-loop poles! (unknown)

37 Nyquist Stability Criterion
Approach, check characteristic equation Let us follow a contour encircling the RHP. Basic idea: Evaluate CE = 1+KD(s)G(s) at the contour, and draw image. (We can just as well evaluate KD(s)G(s) and look at -1 ) Notice, poles or zeros gives encirclements

38 Nyquist Stability Criterion
Criterion (continuous case) Z = P + N Z = number of unstable closed-loop poles. Thus, for stability we want Z=0. (unknown) P = number of unstable open-loop poles of KDG (known). N = total number of encirclements of the point -1 by evaluation of KDG (taken in same direction as s. Thus, N might be negative).

39 Nyquist Stability Criterion
Interpretations and explanations If the s-plane contour encircles a zero of 1+KDG in a certain direction, the image contour will encircle the origin in the same direction. (related to Z) If the s-plane contour encircles a pole of 1+KDG in a certain direction, the image contour will encircle the origin in the opposite direction. (related to P) The net number of same-direction encirclements, N, equals the difference N = Z- P. Actually, we should investigate 1+KDG and encirclements around the origin, but easier to investigate KDG and encirclements around -1.

40 Nyquist Stability Criterion
Discrete case Same approach, almost... Unstable region is outside the unit circle. Easier to evaluate using the stable region.

41 Nyquist Stability Criterion
Discrete case CE: 0 = 1+KD(z)G(z) Total number of poles = n Number of stable zeros of 1+KD(z)G(z) is n-Z Number of stable poles of 1+KD(z)G(z) is n-P Criterion (discrete case) Z = (n-Z) – (n-P) or Z = P – N

42 Nyquist Stability Criterion
Discrete case Determin the number P of unstable poles of KDG Plot KD(z)G(z) for the unit circle. This is the counter-clockwise path around the unit circle. Set N equal to the number of Counter-clockwise encirclements of the point -1 on the plot Compute Z=P-N. The system is stable if and only if Z=0

43 Nyquist Stability Criterion
Example (7.9) Evaluate the stability of the unity feedback discrete system with the plant G(s) with sampling time T=2 and ZOH. Use controller KD(z) = K. K=1 Solution (matlab) sysC = tf([1],[1 1 0]); sysD = c2d(sysC,2); nyquist(sysD); The system is openloop stable and there are no encirkelments of -1 => the system is closed loop stable for K=1


Download ppt "Analog and Digital Control 1"

Similar presentations


Ads by Google