Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS6501: Basics Z-Transforms and Transfer Functions (Tools for analyzing the dynamics of systems) Spring 2015.

Similar presentations


Presentation on theme: "CS6501: Basics Z-Transforms and Transfer Functions (Tools for analyzing the dynamics of systems) Spring 2015."— Presentation transcript:

1 CS6501: Basics Z-Transforms and Transfer Functions (Tools for analyzing the dynamics of systems) Spring 2015

2 CS6501: Basics Outline Signals and Systems Z-Transforms –What are Z-Transforms –What are inverse Z-Transforms –How to infer properties of a signal from its Z-transform Transfer Functions –What are Transfer Functions –How to infer properties of a system from its Transfer Function

3 CS6501: Basics Important Z-transforms and transfer functions enable you to analyze signals and systems (general techniques) –With or without a controller!!!

4 CS6501: Basics Signals The signals we are studying – Discrete Signals –A discrete signal takes value at each non- negative time instance

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

6 CS6501: Basics Control System ControllerTarget System Transducer Reference Input Control error Control Input Measured Output Transducer Output

7 CS6501: Basics Common Signals impulse delayed impulse step ramp exponential |a|<1 |a|>1 sine cosine exponentially modulated cosine/sine (a k )

8 CS6501: Basics Other Signals – (arbitrary) From a temperature sensor From an acoustic sensor

9 CS6501: Basics Z-Transform of a Signal u(k) Z -1 u(0) u(1) u(2) u(3) u(4) … U(z) Z u(0) · z 0 +u(1) · z -1 +u(2) · z -2 +u(3) · z -3 +u(4) · z -4 …

10 CS6501: Basics 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

11 CS6501: Basics Z Transform of Unit Impulse Signal u impulse (k)U impulse (z) Z Z -1 u(0) = 1 u(1) = 0 u(2) = 0 u(3) = 0 u(4) = 0 … 1 · z 0 +0 · z -1 +0 · z -2 +0 · z -3 +0 · z -4 …

12 CS6501: Basics Delayed Unit Impulse Signal u delay (k)U delay (z) Z Z -1 u(0) = 0 u(1) = 1 u(2) = 0 u(3) = 0 u(4) = 0 … 0 · z 0 +1 · z -1 +0 · z -2 +0 · z -3 +0 · z -4 …

13 CS6501: Basics Z-Transform of Unit Step Signal u step (k)U step (z) Z Z -1 u(0) = 1 u(1) = 1 u(2) = 1 u(3) = 1 u(4) = 1 … 1 · z 0 +1 · z -1 +1 · z -2 +1 · z -3 +1 · z -4 …

14 CS6501: Basics Unit Step Signal - continued A little bit of math … assuming

15 CS6501: Basics Z-Transform of Exponential Signal u exp (k)U exp (z) Z Z -1 u(0) = 1 u(1) = a u(2) = a 2 u(3) = a 3 u(4) = a 4 … 1 · z 0 +a · z -1 +a 2 · z -2 +a 3 · z -3 +a 4 · z -4 … Remember this!

16 CS6501: Basics What about an arbitrary signal? Apply z-transform to any signal Just use the z-transform formula May not have a convenient formula that summarizes the signal

17 CS6501: Basics 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)

18 CS6501: Basics What does “Linear” mean exactly ? Scaling Superposition 3-MA u(k)y(k) 3-MA λu(k)λy(k) 3-MA u 1 (k)y 1 (k) 3-MA u 2 (k)y 2 (k) 3-MA u 1 (k)+u 2 (k)y 1 (k)+y 2 (k)

19 CS6501: Basics Time Invariance 3-MA u(k)y(k) 3-MA u’(k)=u(k-n)y’(k)=y(k-n) Idiom: u(k-n) is u(k) delayed by n time units!

20 CS6501: Basics Reality Check Typically speaking, are computing systems linear ? Why/why not ? –Consider saturation … –Assume RT for one job alone in system is X Is RT for 3 jobs 3X? Typically speaking, are computing systems time-invariant ? Why/why not ? –Resource allocations are in different states at different times

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

22 Key Points Impulse Response – input impluse - basis of convolution (time domain) Frequency Response – input sine wave – basis of DFT CS6501: Basics

23 An Example: 3-MA 3MA u impulse (k)y impulse (k) 3MA u (k)y (k) ? 6 x 9 x 3 x u(k) = + + +… u impulse (k) u impulse (k-1) u impulse (k-2) Input: Scaled and delayed

24 CS6501: Basics An Example: 3-MA 3MA u impulse (k)y impulse (k) 3MA u (k)y (k) ? 6 x 9 x 3 x + + +… y impulse (k-1) y impulse (k-2) y(k) = y impulse (k)

25 CS6501: Basics Convolution y(5)= u(0) · y impulse (k) + u(1) · y impulse (k-1) + u(2) · y impulse (k-2) + u(3) · y impulse (k-3) + u(4) · y impulse (k-4) u(0) x u(1) x u(2) x + + +… y impulse (k-1) y impulse (k-2) y(k) = y impulse (k)

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

27 CS6501: Basics Z-Transform/Inverse Z-Transform LTI: y impuse (k)=0.3 k-1 u (k)=0.7 k y (k) ? * (convolution) Z = · (multiplication) = Z -1 Z Transfer Function

28 CS6501: Basics Delay the Unit Step Signal u step (k)u delayed (k) u dstep (k) * (convolution) = y(k)=u(k-1) Z Transfer Function · (multiplication) Z z -1 = Z LTI: y impuse (k) =u delayed (k) u (k)y (k)

29 CS6501: Basics Delayed Unit Step Signal – Cont’d u dstep (k)U dstep (z) Z Z -1 u(0) = 0 u(1) = 1 u(2) = 1 u(3) = 1 u(4) = 1 … 0 · z 0 +1 · z -1 +1 · z -2 +1 · z -3 +1 · z -4 … Remember this!

30 CS6501: Basics Signals in Computer Systems Spike, one-time fluctuation in input/output, or disturbance Change of reference value Multiple changes of reference value

31 CS6501: Basics Transfer Function Z-transforms can be used to describe signals They can also be used to describe systems (called a transfer function) G(z) = Y(z)/U(z) or Y(z) = G(z)U(z) Output/Input U(k) Y(k)

32 CS6501: Basics 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

33 CS6501: Basics An LTI System – Discrete Integrator LTI: y impuse (k) =u dstep (k) u (k)y (k) u step (k)u dstep (k) u ramp (k) * (convolution) = y(k)=y(k-1)+u(k-1) Z -1 Transfer Function · (multiplication) Z Y(k)=u(k-1)+u(k-2)+…+u(1)+u(0) Z =

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

35 CS6501: Basics Long Division Sort both nominator and denominator with descending order of z first u(0), u(1), u(2), u(3), …, are coefficients of the z terms in the answer above (remember, a list of signal values is encoded with z terms: 3,5,7,9…)

36 CS6501: Basics Partial Fraction Expansion Many Z-transforms of interest can be expressed as division of polynomials of z May be trickier: complex root duplicate root wherek>0

37 CS6501: Basics An Example (z-2)(z-4) U 1 (z)=c 0 Z -1 u 1 (k)=c 0 *u impulse (k) Z -1 u 2 (k)=c 1 *2 k-1, k>0 u 3 (k)=c 2 *4 k-1, k>0 c 0 ? c 1 ? c 2 ?

38 CS6501: Basics Get The Constants! (z-2)(z-4)

39 CS6501: Basics An Example – Complete Solution

40 CS6501: Basics Solving Difference Equations Z Z -1 Transfer Function

41 CS6501: Basics 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

42 CS6501: Basics Determine Properties of System Most properties only require knowledge of roots of denominator –SASO properties Denominator is called the characteristic polynomial Roots of denominator may have complex poles –Represented in rectangular or polar coordinates

43 CS6501: Basics Why are poles important ? Z -1 Z domain Time domain poles components

44 CS6501: Basics Various pole values (1) p=1.1 p=1 p=0.9 p=-1.1 p=-1 p=-0.9

45 CS6501: Basics Various pole values (2) p=0.9 p=0.6 p=0.3 p=-0.9 p=-0.6 p=-0.3

46 CS6501: Basics 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 monotonic

47 CS6501: Basics How fast does y(k) converge ? U(k)=a k, 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!

48 CS6501: Basics Property - Settling Time (k units of time) Use Formula for k a is the magnitude of the (dominant) pole

49 CS6501: Basics Example LTI: y(k)=0.4y(k-1)+0.6u(k-1) u (k)=0.8 k y (k) ? Z Z Z -1 Settling Time

50 CS6501: Basics Transfer Function Z Z -1 Transfer Function

51 CS6501: Basics When There Are Complex Poles … If Or in polar coordinates,

52 CS6501: Basics 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

53 CS6501: Basics An Example Z-Domain: Complex Poles Time-Domain: Exponentially Modulated Sin/Cos

54 CS6501: Basics Poles on Complex Plane

55 CS6501: Basics Observations Using poles to characterize a signal –The smaller is |r|, the faster the signal converges |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

56 CS6501: Basics Change Angles 0.9 -0.9 Re Im

57 CS6501: Basics Changing Absolute Value Im Re 1

58 CS6501: Basics 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π)

59 CS6501: Basics Steady-State Analysis If a signal finally converges, what value does it converge to ? When it does not converge –Any |p j | is greater than 1 –Any |r| is greater than or equal to 1 When it does converge –If all |p j |’s and |r|’s are smaller than 1, it converges to 0 –If only one p j is 1, then the signal converges to c j If more than one real pole is 1, the signal does not converge

60 CS6501: Basics An Example (one pole is = 1) converge to 2

61 CS6501: Basics Final Value Theorem Enable us to decide whether a system has a steady state error (y ss -r ss )

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

63 CS6501: Basics What Can We Infer from TF ? Almost everything we want to know –Stability –Steady-State –Transients Settling time Overshoot –…–…

64 CS6501: Basics Bounded Signals

65 CS6501: Basics 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

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

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

68 CS6501: Basics Steady State Gain y ss

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

70 CS6501: Basics More General Case Z z=1 Transfer Function Recall y(ss) = G(1) (that is, when z = 1)

71 CS6501: Basics Example of Steady State Gain LTI: y(k)=0.4y(k-1)+0.6u(k-1) u (k)=1y (k) ? Z Z Y ss ? G(1)=1, so y ss =1

72 CS6501: Basics System Order 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 |p i |<|p j |,|p i /p j | k-1 approaches 0 when k is large (p i k-1 converges faster than p j k-1 )

73 CS6501: Basics Overshoot and Settling 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 Settling time –First order system –Higher order systems

74 CS6501: Basics How fast does y(k) 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!

75 CS6501: Basics Examples: Positive Pole Dominant Pole: 0.9

76 CS6501: Basics Examples: Negative Pole Dominant Pole: -0.9

77 CS6501: Basics 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!

78 CS6501: Basics 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

79 CS6501: Basics Summary Signals/Systems –An LTI system can be specified by Difference equation Unit impulse response Transfer function 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

80 CS6501: Basics Extra Slides z-transforms of sin and cos and exponentially modulated sine

81 CS6501: Basics sin ? cos ?

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

83 CS6501: Basics Z-Transform of sin/cos Time Domain Z-Transform

84 CS6501: Basics Exponentially Modulated sin/cos A damped oscillating signal – a typical output of a second order system

85 CS6501: Basics Are these BIBO ? Unityy(k+1) = 1 P Controllery(k+1) = K P u(k) Integratory(k+1) = y(k) + u(k) I Controllery(k+1) = y(k) + K I u(k) M/M/1/Ky(k+1) = 0.49y(k) + 0.033u(k) Mysteryy(k+1) = -1.3y(k) + 2.3u(k)

86 CS6501: Basics 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. SystemTime domain EqTransfer FunctionPoles Unityy(k+1) = 1G(z) = 1N/A P Controller y(k+1) = K P u(k)G(z) = K P N/A Integratory(k+1) = y(k) + u(k)G(z) = 1/(z-1)z=1 I Controllery(k+1) = y(k) + K I u(k)G(z) = K I /(z-1)z=1 M/M/1/Ky(k+1) = 0.49y(k) + 0.033u(k)G(z) = 0.033/(z-0.49)z = 0.49 Mysteryy(k+1) = -1.3y(k) + 2.3u(k)G(z) = 2.3/(z+1.3)z = -1.3

87 CS6501: Basics No Dominant Pole

88 CS6501: Basics Why do we need Z-Transform? A signal can be characterized with its Z-transform (poles, final value …) In an LTI system, Z-transform Y(z) is the multiplication of Z-transform U(z) and the transfer function The LTI system can be characterized by the transfer function, or the Z- transform of the unit impulse response


Download ppt "CS6501: Basics Z-Transforms and Transfer Functions (Tools for analyzing the dynamics of systems) Spring 2015."

Similar presentations


Ads by Google