Presentation is loading. Please wait.

Presentation is loading. Please wait.

Z-Transforms and Transfer Functions

Similar presentations


Presentation on theme: "Z-Transforms and Transfer Functions"— Presentation transcript:

1 Z-Transforms and Transfer Functions

2 Outline Signals and Systems Z-Transforms Transfer Functions
How to do Z-Transforms How to do inverse Z-Transforms How to infer properties of a signal from its Z-transform Transfer Functions How to obtain Transfer Functions How to infer properties of a system from its Transfer Function

3 Signals The signals we are studying in this course – Discrete Signals
A discrete signal takes value at each non-negative time instance

4 Example of a System Filter raw readings from a noisy temperature
sensor - Input Signal smooth temperature values after filtering - Output Signal A (SISO) system takes an input signal, manipulates it and gives a corresponding output signal.

5 Control System Reference Input Control error Controller Control Input
Target System Measured Output Transduced Output Transducer

6 Common Signals exponential (ak) |a|>1 impulse |a|<1
delayed impulse sine step cosine ramp exponentially modulated cosine/sine

7 Z-Transform of a Signal
U(z) Z u(0) · z0 +u(1) · z-1 +u(2) · z-2 +u(3) · z-3 +u(4) · z-4 u(k) Z-1 u(0) u(1) u(2) u(3) u(4)

8 Z-Transform – Cont’d Mapping from a discrete signal to a function of z
Many Z-Transforms have this form: Helps intuitively derive the signal properties Does it converge? To which value does it converge? How fast does it converges to the value? Rational Function of z

9 Z Transform of Unit Impulse Signal
uimpulse(k) Uimpulse(z) Z-1 u(0) = 1 u(1) = 0 u(2) = 0 u(3) = 0 u(4) = 0 1 · z0 +0 · z-1 +0 · z-2 +0 · z-3 +0 · z-4

10 Delayed Unit Impulse Signal
Z udelay(k) Udelay(z) Z-1 u(0) = 0 u(1) = 1 u(2) = 0 u(3) = 0 u(4) = 0 0 · z0 +1 · z-1 +0 · z-2 +0 · z-3 +0 · z-4

11 Z-Transform of Unit Step Signal
ustep(k) Ustep(z) Z-1 u(0) = 1 u(1) = 1 u(2) = 1 u(3) = 1 u(4) = 1 1 · z0 +1 · z-1 +1 · z-2 +1 · z-3 +1 · z-4

12 Unit Step Signal - continued
A little bit more math … assuming

13 Z-Transform of Exponential Signal
uexp(k) Uexp(z) Z-1 u(0) = 1 u(1) = a u(2) = a2 u(3) = a3 u(4) = a4 1 · z0 +a · z-1 +a2 · z-2 +a3 · z-3 +a4 · z-4 Remember this!

14 LTI Systems Linear, Time Invariant (LTI) System
Many systems we analyze or design are or can be approximated by LTI systems We have a well-established theory for LTI system analysis and design Example - A simple moving average y(k)=[u(k-1)+u(k-2)+u(k-3)]/3 3-MA u(k) y(k)

15 Control System Reference Input Control error Controller Control Input
Target System Measured Output Transduced Output Transducer

16 What does “Linear” mean exactly?
Scaling Superposition 3-MA u(k) y(k) 3-MA λu(k) λy(k) 3-MA u1(k) y1(k) 3-MA u2(k) y2(k) 3-MA u1(k)+u2(k) y1(k)+y2(k)

17 Time Invariance 3-MA 3-MA u(k) y(k) u’(k)=u(k-n) y’(k)=y(k-n) Idiom:
u(k-n) is u(k) delayed by n time units! y(k+1)=[u(k)+u(k-1)+u(k-2)]/3 y(k+1-n)=[u(k-n)+u(k-1-n)+u(k-2-n)]/3 y’(k+1)=[u’(k)+u’(k-1)+u’(k-2)]/3

18 Reality Check Typically speaking, are computing systems linear? Why?
Consider saturation … Typically speaking, are computing systems time-invariant? Why?

19 Unit Impulse Response 3-MA uimpulse(k) yimpulse(k) Claim:
If we know yimpulse(k), we can obtain y(k) corresponing to ANY input u(k)! yimpulse(k) contains ALL information about the input-output relationship of an LTI system.

20 An Example: 3-MA 3MA 3MA uimpulse(k) yimpulse(k) u (k) y (k) ?
+ uimpulse(k-1) 9 x u(k) = + uimpulse(k-2) 3 x +…

21 An Example: 3-MA 3MA 3MA uimpulse(k) yimpulse(k) u (k) y (k) ?
+ yimpulse(k-1) 9 x y(k) = + yimpulse(k-2) 3 x +…

22 Convolution y(5)= u(0) · yimpulse(k) + u(1) · yimpulse(k-1)
u(0) x + yimpulse(k-1) u(1) x y(k) = + yimpulse(k-2) u(2) x +…

23 Important Theorem = * Z Z-1 Z Z-1 Z Z-1 = · Time Domain u(k) v(k) y(k)
(convolution) v(k) y(k) Z Z-1 Z Z-1 Z Z-1 = U(z) (multiplication) V(z) Y(z) Z Domain

24 Z-Transform/Inverse Z-Transform
LTI: yimpuse(k)=0.3k-1 u (k)=0.7k y (k)? Z-1 = * (convolution) Z Z Transfer Function (multiplication) =

25 Delay the Unit Step Signal
y(k)=u(k-1) LTI: yimpuse(k) =udelayed(k) u (k) y (k) = ustep (k) * (convolution) udelayed(k) udstep(k) Z Z Transfer Function Z z-1 (multiplication) =

26 Delayed Unit Step Signal – Cont’d
Z udstep(k) Udstep(z) Z-1 u(0) = 0 u(1) = 1 u(2) = 1 u(3) = 1 u(4) = 1 0 · z0 +1 · z-1 +1 · z-2 +1 · z-3 +1 · z-4 Remember this!

27 Transfer Function Transfer function provides a much more intuitive way to understand the input-output relationship, or system characteristics of an LTI system Stability Accuracy Settling time Overshoot

28 Signals and Systems in Computer Systems
Spike, one-time fluctuation in input/output, or disturbance Change of reference value Multiple changes of reference value Sum of delayed step signals ustep(k)+8ustep(k-3)-4ustep(k-6) y(k)=u(k-n) Input got delayed for n time units

29 n-Delay y(k)=u(k-n) Transfer function: z-n

30 Unit Shift and n-Shift y(k)=u(k+1) Caveat: u(0) disappears y(k)=u(k+n)

31 Other properties of Z-Transform
Linearity Time Domain Z-Transform y(k)=au(k) Y(z)=aU(z) Scaling y(k)=u(k)+v(k) Y(z)=U(z)+V(z) Superposition

32 sin? cos?

33 From Exponential to Trigonometric
? Z[cos(kθ)]? Z[sin(kθ)]? Euler Formula:

34 Z-Transform of sin/cos
Time Domain Z-Transform

35 Exponentially Modulated sin/cos
A damped oscillating signal – a typical output of a second order system

36 An LTI System – Discrete Integrator
y(k)=y(k-1)+u(k-1) Y(k)=u(k-1)+u(k-2)+…+u(1)+u(0) LTI: yimpuse(k) =udstep(k) u (k) y (k) = ustep(k) * (convolution) udstep(k) uramp(k) Transfer Function Z-1 Z Z = (multiplication)

37 Inverse Z-Transform Z Z-1? Z-1? u(k) U(z)
Table Lookup – if the Z-Transform looks familiar, look it up in the Z-Transform table! Long Division Partial Fraction Expansion Z-1?

38 Long Division Sort both nominator and denominator with descending order of z first u(0)=3, u(1)=5, u(2)=7, u(3)=9, …, guess: u(k)=3ustep(k)+2uramp(k)

39 Partial Fraction Expansion
Many Z-transforms of interest can be expressed as division of polynomials of z May be trickier: complex root duplicate root where k>0

40 An Example Z-1 Z-1 Z-1 (z-2)(z-4) U1(z)=c0 u1(k)=c0*uimpulse(k)
u2(k)=c1*2k-1, k>0 Z-1 u2(k)=c2*4k-1, k>0 c0? c1? c2?

41 Get The Constants! (z-2)(z-4)

42 Partial Fraction Expansion – cont’d
How to get c0 and cj’s ? define

43 An Example – Complete Solution

44 Solving Difference Equations
Z Z-1 Transfer Function

45 A Difference Equation Example
Exponentially Weighted Moving Average y(k)=cy(k-1)+(1-c)u(k-1)

46 LTI: y(k)=0.4y(k-1)+0.6u(k-1)
Solve it! LTI: y(k)=0.4y(k-1)+0.6u(k-1) u (k)=0.8k y (k)? Z Z Z-1

47 Signal Characteristics from Z-Transform
If U(z) is a rational function, and Then Y(z) is a rational function, too Poles are more important – determine key characteristics of y(k) zeros poles

48 Why are poles important?
Z domain poles Z-1 Time domain components

49 Various pole values (1) p=1.1 p=-1.1 p=1 p=-1 p=0.9 p=-0.9

50 Various pole values (2) p=0.9 p=-0.9 p=0.6 p=-0.6 p=0.3 p=-0.3

51 Conclusion for Real Poles
If and only if all poles’ absolute values are smaller than 1, y(k) converges to 0 The smaller the poles are, the faster the corresponding component in y(k) converges A negative pole’s corresponding component is oscillating, while a positive pole’s corresponding component is monotonous

52 How fast does it converge?
U(k)=ak, consider u(k)≈0 when the absolute value of u(k) is smaller than or equal to 2% of u(0)’s absolute value Remember This!

53 LTI: y(k)=0.4y(k-1)+0.6u(k-1)
Example LTI: y(k)=0.4y(k-1)+0.6u(k-1) u (k)=0.8k y (k)? Z Z Z-1

54 When There Are Complex Poles …
If If Or in polar coordinates,

55 What If Poles Are Complex
If Y(z)=N(z)/D(z), and coefficients of both D(z) and N(z) are all real numbers, if p is a pole, then p’s complex conjugate must also be a pole Complex poles appear in pairs Z-1 Time domain

56 An Example Z-Domain: Complex Poles Time-Domain:
Exponentially Modulated Sin/Cos

57 Poles Everywhere

58 Observations Using poles to characterize a signal
The smaller is |r|, the faster converges the signal |r| < 1, converge |r| > 1, does not converge, unbounded |r|=1? When the angle increase from 0 to pi, the frequency of oscillation increases Extremes – 0, does not oscillate, pi, oscillate at the maximum frequency

59 Change Angles Im -0.9 Re 0.9

60 Changing Absolute Value
Im Re 1

61 Conclusion for Complex Poles
A complex pole appears in pair with its complex conjugate The Z-1-transform generates a combination of exponentially modulated sin and cos terms The exponential base is the absolute value of the complex pole The frequency of the sinusoid is the angle of the complex pole (divided by 2π)

62 Steady-State Analysis
If a signal finally converges, what value does it converge to? When it does not converge Any |pj| is greater than 1 Any |r| is greater than or equal to 1 When it does converge If all |pj|’s and |r|’s are smaller than 1, it converges to 0 If only one pj is 1, then the signal converges to cj If more than one real pole is 1, the signal does not converge … (e.g. the ramp signal)

63 An Example converge to 2

64 Final Value Theorem Enable us to decide whether a system has a steady state error (yss-rss)

65 Final Value Theorem If any pole of (1-z)Y(z) lies out of or ON the
unit circle, y(k) does not converge!

66 What Can We Infer from TF?
Almost everything we want to know Stability Steady-State Transients Settling time Overshoot

67 Bounded Signals

68 BIBO Stability Bounded Input Bounded Output Stability
If the Input is bounded, we want the Output is bounded, too If the Input is unbounded, it’s okay for the Output to be unbounded For some computing systems, the output is intrinsically bounded (constrained), but limit cycle may happen

69 Limit Cycle Output constrained, But oscillating – Bad!
Imagine CPU utilization Constantly switching from 1 to 0, 0 to 1, … Solution: make sure the system works in a linearized operating region

70 Are these BIBO? Unity y(k+1) = 1 P Controller y(k+1) = KP u(k)
Integrator y(k+1) = y(k) + u(k) I Controller y(k+1) = y(k) + KI u(k) M/M/1/K y(k+1) = 0.49y(k) u(k) Mystery y(k+1) = -1.3y(k) + 2.3u(k)

71 Better Way to Decide BIBO or NOT
Theorem: A system G(z) is BIBO stable iff all the poles of G(z) are inside the unit circle. System Time domain Eq Transfer Function Poles Unity y(k+1) = 1 G(z) = 1 N/A P Controller y(k+1) = KP u(k) G(z) = KP Integrator y(k+1) = y(k) + u(k) G(z) = 1/(z-1) z=1 I Controller y(k+1) = y(k) + KI u(k) G(z) = KI/(z-1) M/M/1/K y(k+1) = 0.49y(k) u(k) G(z) = 0.033/(z-0.49) z = 0.49 Mystery y(k+1) = -1.3y(k) + 2.3u(k) G(z) = 2.3/(z+1.3) z = -1.3

72 LTI: y(k)=0.4y(k-1)+0.6u(k-1)
Example LTI: y(k)=0.4y(k-1)+0.6u(k-1) u (k)=0.8k y (k)? Z Z BIBO? – only one pole at 0.4, so BIBO!

73 Steady State Gain yss

74 Steady-State Gain – Cont’d
Which value does the output converges to when the input is an unit step signal? First of all, it has to converge Final Value Theorem Unit Step Input

75 More General Cases Z z=1 Transfer Function

76 LTI: y(k)=0.4y(k-1)+0.6u(k-1)
Example LTI: y(k)=0.4y(k-1)+0.6u(k-1) u (k)=1 y (k)? Z Z Yss? G(1)=1, so yss=1

77 System Orders System Order = Number of Poles
The higher the system order is, the more complex the system behavior is Some poles are more important than others Why? If |pi|<|pj|,|pi/pj|k-1 approaches 0 when k is large (pik-1 converges faster than pjk-1)

78 Overshoot and Setting Time
If not all poles are positive real numbers, overshoot may happen Easy to figure out when the system is first order For higher order systems, approximation to first order systems works under certain conditions Setting time First order system Higher order systems

79 How fast does it converge?
U(k)=ak, consider u(k)≈0 when the absolute value of u(k) is smaller than or equal to 2% of u(0)’s absolute value Remember This!

80 Examples: Positive Pole
Dominant Pole: 0.9

81 Examples: Negative Pole
Dominant Pole: -0.9

82 Dominant Pole We can approximate a high-order system with a first-order system with the dominant pole of the high-order system IF the dominant pole DOES exist Can give a pretty good estimation of settling time Can give a reasonable estimate of the maximum overshoot Some high-order systems do not have dominant pole! – for example

83 No Dominant Pole

84 Dominant Pole – Cont’d If there is a dominant pole, it must be the pole with the maximum magnitude The largest pole should have at least twice the magnitude of the other poles! If the dominant pole is real (p’), the high-order system can be approximated by a first-order system

85 Summary Signals/Systems Characterize a signal with Z-transform
An LTI system can be specified by Difference equation Unit impulse response Transfer function If one is known, how to get the other two? Characterize a signal with Z-transform Z-domain (poles) -> Time domain (convergence, etc.) Characterize a system with Transfer function BIBO stability Steady-State Gain Transients: overshoot, settling time If there exists a dominant pole


Download ppt "Z-Transforms and Transfer Functions"

Similar presentations


Ads by Google