Upcoming SlideShare
Loading in …5
×

# Lecture: Digital Signal Processing Batch 2009

14,190 views
13,886 views

Published on

Published in: Education, Technology, Business
2 Comments
16 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Thanks so much ubaidis.

Are you sure you want to  Yes  No
Your message goes here
• good information

Are you sure you want to  Yes  No
Your message goes here
No Downloads
Views
Total views
14,190
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
1,122
Comments
2
Likes
16
Embeds 0
No embeds

No notes for slide

### Lecture: Digital Signal Processing Batch 2009

1. 1. Digital Signal Processing Instructor:Engr. Abdul Rauf Khan Rajput Engr. A. R.K. Rajput NFC IET 1 Multan
2. 2. Books.Text Books:Digital Signal ProcessingPrinciples, Algorithms and ApplicationsBy:John G.Proakis & Dimitris G.ManolakisReference Books1. Digital Signal Processing By. Sen M. Kuo & Woon-Seng Gan2. Digital Signal Processing A Practical Approach. By Emmanuel C. Ifeachor & Barrie W. Jervis[Handouts]Digital Signal Processing By. Bores [Avail at ww.bores.com/courses/ Engr. A. R.K. Rajput NFC IET 2 Multan
3. 3. Grading PolicyTerm Papers/test/Group Discussion 20 MarksMid-Term 30 MarksFinal 50 MarksAdditional Privileges 10%Trem Paper. Home works, Presentations, Voluntaryassignments managements etc.Class will be divided different level as per their GPAGroup A- GPA 2.0 to 2.59Group B- GPA 2.5 to 3.39Group C – GPA 3.4 to 4 Engr. A. R.K. Rajput NFC IET 3 Multan
4. 4. Signal : f(x1: x2……….. ) is function, A function is a dependent variable of independent variable(s). X= Time, Distance, Temperature,…. Type of signal Natural Signal [1D,2D,MD] Continuous? Discrete Signal Analog Signal = 1-Cont-time--- 2-Discrete Time ---- A/D -----Digital Signal Analog and Digital Signals Analog signal = continuous-time + continuous amplitude Digital signal = discrete-time + discrete amplitude Signal Processinganalog system = analog signal input + analog signal outputadvantages: easy to interface to real world, do not need A/D or D/A converters,speed not dependent on clock ratedigital system = digital signal input + digital signal output I re-configurabilityusing software, greater control over accuracy/resolution, predictable and reproducible A.Sbehavior D.S M. Engr. A. R.K. Rajput NFC IET Multan .p .p 4 S.p
5. 5. Analog-to-Digital Conversion 0101... Sampler X(n) Discrete- Quantize r xq(t) Coder Digital Signal x(t) Quantiz time ed signal SignalSampling:conversion from cts-time to dst-time by taking samples" at discrete time instants E.g.,uniform sampling: x(n) = xa(nT) where T is the sampling period and n ε ZQuantization: conversion from dst-time cts-valued signal to a dst-time dst-valued signal quantization error: eq(n) = xq(n)- x(n)) Coding: representation of each dst-value xq(n) by a b-bit binary sequence Engr. A. R.K. Rajput NFC IET 5 Multan
6. 6. Sampling TheoremIf the highest frequency contained in an analog signal x a(t) is Fmax = B and the signal issampled at a rate Fs > 2Fmax=2Bthen xa(t) can be exactly recovered from its sample values using the interpolationfunction Note: FN = 2B = 2Fmax is called the Nyquist rate Therefore, given the interpolation relation, x a(t) can be written aswhere xa(nT) = x(n); called band limited interpolation. Engr. A. R.K. Rajput NFC IET 6 Multan
7. 7. Digital-to-Analog ConversionCommon interpolation approaches: bandlimited interpolation zero-order hold, linear interpolation,higher-order interpolation techniques, e.g., using splines In practice, cheap" interpolation along with a smoothing filter is employed.A DSP System ???? Engr. A. R.K. Rajput NFC IET 7 Multan
8. 8. A DSP SystemIn practice, a DSP system does not use idealized A/D or D/Amodels.Anti-aliasing Filter: ensures that analog input signal does notcontain frequency components higher than half of thesampling frequency (to obey the sampling theorem). thisprocess is irreversible2Sample and Hold: holds a sampled analog value for a short time while the A/Dconverts and interprets the value as a digital3 A/D: converts a sampled data signal value into a digitalnumber, in part, through quantization of the amplitude4 D/A: converts a digital signal into a staircase"-like signal5 Reconstruction Filter: converts a staircase"-like signalinto an analog signal through low pass filtering similar to thetype used for anti-aliasing Real-time DSP Considerations IET Engr. A. R.K. Rajput NFC Multan ??????? 8
9. 9. Real-time DSP Considerations What are initial considerations when designing a DSP system that must run in real-time?Is a DSP technology suitable for a real-time application? Engr. A. R.K. Rajput NFC IET 9 Multan
10. 10. Lecture 1Week-1stEngr. A. R.K. Rajput NFC IET 10 Multan
11. 11. • Signal: A signal is defined as a function of one or more variables which conveys information on the nature of a physical phenomenon. The value of the function can be a real valued scalar quantity, a complex valued quantity, or perhaps a vector.• System: A system is defined as an entity that manipulates one or more signals to accomplish a function, thereby yielding new signals. Engr. A. R.K. Rajput NFC IET 11 Multan
12. 12. • Continuos-Time Signal: A signal x(t) is said to be a continuous time signal if it is defined for all time t.• Discrete-Time Signal: A discrete time signal x[nT] has values specified only at discrete points in time.• Signal Processing: A system characterized by the type of operation that it performs on the signal. For example, if the operation is linear, the system is called linear. If the operation is non- linear, the system is said to be non-linear, and so forth. Such operations are usually referred to as “Signal Processing”. Engr. A. R.K. Rajput NFC IET 12 Multan
13. 13. Basic Elements of a Signal Processing System Analog input Analog output signal Analog signal Signal Processor Analog Signal ProcessingAnalog Analoginput outputsignal A/D Digital D/A signal converter Signal Processor converter Digital Signal Processing Engr. A. R.K. Rajput NFC IET 13 Multan
14. 14. • Advantages of Digital over Analogue Signal Processing: A digital programmable system allows flexibility in reconfiguring the DSP operations simply by changing the program. Reconfiguration of an analogue system usually implies a redesign of hardware, testing and verification that it operates properly. DSP provides better control of accuracy requirements. Digital signals are easily stored on magnetic media (tape or disk). The DSP allows for the implementation of more sophisticated signal processing algorithms. In some cases a digital implementation of the signal processing system is cheaper than its analogue counterpart. Engr. A. R.K. Rajput NFC IET 14 Multan
15. 15. DSP Applications Space photograph enhancement Space Data compression Intelligent sensory analysis Diagnostic imaging (MRI, CT, Medical ultrasound, etc.) Electrocardiogram analysis Medical image storage and retrieval Image and sound compression forCommercial multimedia presentation. Movie special effects Video conference calling Video and data compressionTelephone echo reduction signal multiplexing filtering Engr. A. R.K. Rajput NFC IET 15 Multan
16. 16. DSP Applications (cont.) Radar Sonar Military Ordnance Guidance Secure communication Oil and mineral prospecting Industrial Process monitoring and control Non-destructive testing Earth quick recording and analysis Data acquisition Scientific Spectral Analysis Simulation and Modeling Engr. A. R.K. Rajput NFC IET 16 Multan
17. 17. Classification of Signals•Deterministic Signals A deterministic signal behaves in a fixed known way with respect to time. Thus, it can be modeled by a known function of time t for continuous time signals, or a known function of a sampler number n, and sampling spacing T for discrete time signals.• Random or Stochastic Signals: In many practical situations, there are signals that either cannot be described to any reasonable degree of accuracy by explicit mathematical formulas, or such a description is too complicated to be of any practical use. The lack of such a relationship implies that such signals evolve in time in an unpredictable manner. We refer to these signals as random. Engr. A. R.K. Rajput NFC IET 17 Multan
18. 18. Even and Odd Signals A continuous time signal x(t) is said to an even signal if it satisfies the condition x(-t) = x(t) for all t The signal x(t) is said to be an odd signal if it satisfies the condition x(-t) = -x(t)In other words, even signals are symmetric about thevertical axis or time origin, whereas odd signals areantisymmetric about the time origin. Similar remarksapply to discrete-time signals.Example: even Engr. A. R.K. Rajput NFC IET 18 Multan odd odd
19. 19. Periodic Signals A continuous signal x(t) is periodic if and only if there exists a T > 0 such that x(t + T) = x(t) where T is the period of the signal in units of time. f = 1/T is the frequency of the signal in Hz. W = 2π/T is the angular frequency in radians per second.The discrete time signal x[nT] is periodic if and only ifthere exists an N > 0 such thatx[nT + N] = x[nT]where N is the period of the signal in number of samplespacings. Example: Frequency = 5 Hz or 10π rad/s0 0.2 0.4 A. R.K. Rajput NFC IET Engr. 19 Multan
20. 20. Continuous Time Sinusoidal SignalsA simple harmonic oscillation is mathematicallydescribed asx(t) = Acos(wt + θ)This signal is completely characterized by threeparameters:A = amplitude, w = 2πf = frequency in rad/s, and θ =phase in radians. A T=1/f Engr. A. R.K. Rajput NFC IET 20 Multan
21. 21. Discrete Time Sinusoidal Signals A discrete time sinusoidal signal may be expressed as x[n] = Acos(wn + θ) -∞ < n < ∞Properties:• A discrete time sinusoid is periodic only if its frequency is arational number. • Discrete time sinusoids whose frequencies are separated by an integer multiple of 2π are identical. 1 0 -1 0 2 4 6 8 10 Engr. A. R.K. Rajput NFC IET 21 Multan
22. 22. Energy and Power Signals The total energy of a continuous time signal x(t) is defined as T ∞ E x = lim ∫ x ( t )dt = ∫ x 2 ( t )dt 2 T →∞ −T −∞ And its average power is T/ 2 1 2 Px = lim ∫x ( t )dt T→ T∞ − /2 T In the case of a discrete time signal x[nT], the total energy of the ∞ signal dx = T ∑ x 2 [n ] E is n =−∞And its average power is defined by 2  1  N Pdx = lim   ∑ x[nT] N →  2N + 1 n =−N ∞ Engr. A. R.K. Rajput NFC IET 22 Multan
23. 23. Energy and Power Signals •A signal is referred to as an energy signal, if and only if the total energy of the signal satisfies the condition 0<E<∞ •On the other hand, it is referred to as a power signal, if and only if the average power of the signal satisfies the condition 0<P<∞•An energy signal has zero average power, whereas a powersignal has infinite energy.•Periodic signals and random signals are usually viewed aspower signals, whereas signals that are both deterministic andnon-periodic are energy signals. Engr. A. R.K. Rajput NFC IET 23 Multan des
24. 24. Example1: Compute the signal energy and signal power for x[nT] = (-0.5)nu(nT), T = 0.01 secondsSolution: N 2 ∞ 2 E dx = lim T ∑x(nT ) = 0.01 ∑(−0.5 ) n N→∞ n =−N n=0 ∞ 2n ∞ = .01 ∑ 0.5 ) 0 (− = .01 ∑.25 n 0 0 n=0 n=0 [ = 0.01 1 + 0.25 + ( 0.25 ) + ( 0.25 ) + ....... 2 3 ] 0.01 = = / 75 1 1 − .25 0 Since Edx is finite, the signal power is zero. Engr. A. R.K. Rajput NFC IET 24 Multan
25. 25. Example2: Repeat Example1 for y[nT] = 2ej3nu[nT], T = 0.2 second.Solution: 2  1  N  1 N 2 Pdx = lim   ∑ y (nT) = lim   ∑ 2e j3n N → ∞  2N + 1  n = − N N → ∞  2N + 1  n = 0  1 N 2 4 N 4( N + 1) = lim   ∑ 2 = lim ∑ 1 = N →∞ lim N →∞ 2N + 1 n = 0 N →∞ 2N + 1 n = 0 2N + 1  N 1  1 = lim 4 +  = 4× = 2 N → ∞  2N + 1 2N + 1  2 What is energy of this signal? Engr. A. R.K. Rajput NFC IET 25 Multan
26. 26. Tutorial 1: Q3Determine the signal energy and signal power for eachof the given signals and indicate whether it is an energysignal or a power signal?(a) y[nT] = 3( −0.2)n u[n − 3], T = 2 ms(b) z[nT] = 4(1.1) n u[n + 1] T = 0.02 s(c) Engr. A. R.K. Rajput NFC IET 26 Multan
27. 27. Time Shifting, Time Reversal,Time Scaling• Suppose we have a signal x(t) and we say we want to shift a signal such as x(t-2) or x(t+2) so ‘-’ values indicate the past values while the ‘+’ values indicate the future value• Time reversal is the mirror image of the given signal as x(t) = x(-t)• Time Scaling is the scaled time according to input for e.g x(2t) will be a compact signal as compared to x(t). Engr. A. R.K. Rajput NFC IET 27 Multan
28. 28. Basic Operations on Signals (a) Operations performed on dependent variables1. Amplitude Scaling:let x(t) denote a continuous time signal. The signal y(t) resulting from amplitude scaling applied to x(t) is defined by y(t) = cx(t) where c is the scale factor.In a similar manner to the above equation, for discrete time signals we write y[nT] = cx[nT] 2x(t) x(t) Engr. A. R.K. Rajput NFC IET 28 Multan
29. 29. (b) Operations performed on independent variable• Time Scaling: Let y(t) is a compressed version of x(t). The signal y(t) obtained by scaling the independent variable, time t, by a factor k is defined by y(t) = x(kt) – if k > 1, the signal y(t) is a compressed version of x(t). – If, on the other hand, 0 < k < 1, the signal y(t) is an expanded (stretched) version of x(t). Engr. A. R.K. Rajput NFC IET 29 Multan
30. 30. Example of time scaling 1 Expansion and compression of the signal e-t. 0.9 0.8 0.7 exp(-t) 0.6 0.5 exp(-2t) 0.4 exp(-0.5t) 0.3 0.2 0.1 0 Engr. A. R.K. Rajput NFC IET 0 5 Multan 10 15 30
31. 31. Time scaling of discrete time systems 10 x[n] 5 0 -3 -2 -1 0 1 2 3 x[0.5n] 10 5 0 -1.5 -1 -0.5 0 0.5 1 1.5 5 x[2n] 0 -6 -4 -2 0 2 4 6 n Engr. A. R.K. Rajput NFC IET 31 Multan
32. 32. Time Reversal• This operation reflects the signal about t = 0 and thus reverses the signal on the time scale. 5 x[n] 0 0 1 2 3 4 5 0 n x[-n] -5 0 1 2 3 4 5 n Engr. A. R.K. Rajput NFC IET 32 Multan
33. 33. Time ShiftA signal may be shifted in time by replacing the independent variable n by n-k, where k is an integer. If k is a positive integer, the time shift results in a delay of the signal by k units of time. If k is a negative integer, the time shift results in an advance of the signal by |k| units in time. x[n] 1 0.5 0 -2 x[n-3] x[n+3] 1 0 2 4 6 8 10 0.5 0 -2 0 2 4 6 8 10 1 0.5 0 -2 0 2 n4 Engr. A. R.K. Rajput NFC IET Multan 6 8 10 33
34. 34. 2. Addition:Let x1 [n] and x2[n] denote a pair of discrete time signals. The signal y[n] obtained by the addition of x1[n] + x2[n] is defined as y[n] = x1[n] + x2[n] Example: audio mixer3. Multiplication:Let x1[n] and x2[n] denote a pair of discrete-time signals. The signal y[n] resulting from the multiplication of the x1[n] and x2[n] is defined by y[n] = x1[n].x2[n]Example: AM Radio Signal Engr. A. R.K. Rajput NFC IET 34 Multan
35. 35. Analog to Digital and Digital to Analog Conversion • A/D conversion can be viewed as a three step process 1. Sampling: This is the conversion of a continuous time signal into a discrete time signal obtained by taking “samples” of the continuous time signal at discrete time instants. Thus, if x(t) is the input to the sampler, the output is x(nT), where T is called the Sampling interval.2. Quantization: This is the conversion of discrete time continuous valued signal into a discrete-time discrete- value (digital) signal. The value of each signal sample is represented by a value selected from a finite set of possible values. The difference between unquantized sample and the quantized output is called the Quantization error. Engr. A. R.K. Rajput NFC IET 35 Multan
36. 36. Analog to Digital and Digital to Analog Conversion (cont.) 3. Coding: In the coding process, each discrete value is represented by a b-bit binary sequence.x(t) 0101... Sampler Quantize r Coder A/D Converter Engr. A. R.K. Rajput NFC IET 36 Multan
37. 37. Digital Signal Processing (DSP) Fundamentals Engr. A. R.K. Rajput NFC IET 37 Multan
38. 38. Overview• What is DSP?• Converting Analog into Digital – Electronically – Computationally• How Does It Work? – Faithful Duplication – Resolution Trade-offs Engr. A. R.K. Rajput NFC IET 38 Multan
39. 39. What is DSP?• Converting a continuously changing waveform (analog) into a series of discrete levels (digital) Engr. A. R.K. Rajput NFC IET 39 Multan
40. 40. What is DSP?• The analog waveform is sliced into equal segments and the waveform amplitude is measured in the middle of each segment• The collection of measurements make up the digital representation of the waveform Engr. A. R.K. Rajput NFC IET 40 Multan
41. 41. 0.5 1.5 -1.5 -0.5 -2 -1 0 1 2 1 0 0.22 3 0.44 0.64 5 0.82 0.98 7 1.11 1.2 9 1.24 1.27 11 1.24 1.2 13 1.11 0.98 15 0.82 0.64 17 0.44 Multan 0.22 19 0 -0.22 -0.44 21 -0.64Engr. A. R.K. Rajput NFC IET -0.82 23 -0.98 -1.11 25 What is DSP? -1.2 -1.26 27 -1.28 -1.26 29 -1.2 -1.11 31 -0.98 -0.82 33 -0.64 -0.44 35 -0.22 37 0 41
42. 42. Converting Analog into Digital Electronically(1/3)• The device that does the conversion is called an Analog to Digital Converter (ADC)• There is a device that converts digital to analog that is called a Digital to Analog Converter (DAC) Engr. A. R.K. Rajput NFC IET 42 Multan
43. 43. Converting Analog into Digital Electronically(2/3) SW-8• The simplest form of SW-7 V-high ADC uses a resistance V-7 SW-6 ladder to switch in the V-6 appropriate number of Output SW-5 V-5 resistors in series to SW-4 V-4 create the desired SW-3 V-3 voltage that is SW-2 compared to the input SW-1 V-2 (unknown) voltage V-1 V-low Engr. A. R.K. Rajput NFC IET 43 Multan
44. 44. Converting Analog into Digital Electronically(3/3)• The output of the resistance ladder is compared to the Analog Voltage Comparator analog voltage in a Output Higher Equal Lower comparator Resistance Ladder Voltage• When there is a match, the digital equivalent (switch configuration) is captured Engr. A. R.K. Rajput NFC IET 44 Multan
45. 45. Converting Analog into Digital Computationally(1/2)• The analog voltage can now be compared with the digitally generated voltage in the comparator• Through a technique called binary search, the digitally generated voltage is adjusted in steps until it is equal (within tolerances) to the analog voltage• When the two are equal, the digital value of the voltage is the outcome Engr. A. R.K. Rajput NFC IET 45 Multan
46. 46. Converting Analog into Digital Computationally(2/2)• The binary search is a mathematical technique that uses an initial guess, the expected high, and the expected low in a simple computation to refine a new guess• The computation continues until the refined guess matches the actual value (or until the maximum number of calculations is reached)• The following sequence takes you through a binary search computation Engr. A. R.K. Rajput NFC IET 46 Multan
47. 47. Binary Search Analog Digital• Initial conditions 5-volts 256 – Expected high 5-volts 3.42-volts Unknown – Expected low 0-volts (175) – 5-volts 256-binary 2.5-volts 128 – 0-volts 0-binary• Voltage to be converted – 3.42-volts – Equates to 175 binary 0-volts 0 Engr. A. R.K. Rajput NFC IET 47 Multan
48. 48. Binary Search • Binary search algorithm: Analog DigitalHigh − Low 5-volts 256 + Low = NewGuess 2 unknown 3.42-volts • First Guess: 128 256 − 0 + 0 = 128 2 0-volts 0Guess is Low Engr. A. R.K. Rajput NFC IET 48 Multan
49. 49. Binary Search• New Guess (2): Analog Digital 5-volts 256 192256 − 128 3.42-volts unknown + 128 = 192 2Guess is High 0-volts 0 Engr. A. R.K. Rajput NFC IET 49 Multan
50. 50. Binary Search• New Guess (3): Analog Digital 5-volts 256192 − 128 3.42-volts unknown + 128 = 160 160 2Guess is Low 0-volts 0 Engr. A. R.K. Rajput NFC IET 50 Multan
51. 51. Binary Search • New Guess (4): Analog Digital 5-volts 256 176192 − 160 3.42-volts unknown + 160 = 176 2 Guess is High 0-volts 0 Engr. A. R.K. Rajput NFC IET 51 Multan
52. 52. Binary Search• New Guess (5): Analog Digital 5-volts 256 unknown176 − 160 3.42-volts 168 + 160 = 168 2Guess is Low 0-volts 0 Engr. A. R.K. Rajput NFC IET 52 Multan
53. 53. Binary Search • New Guess (6): Analog Digital 5-volts 256176 − 168 3.42-volts unknown + 168 = 172 172 2Guess is Low 0-volts 0(but getting close)ngr. A. R.K. Rajput NFC IET E 53 Multan
54. 54. Binary Search • New Guess (7): Analog Digital 5-volts 256176 − 172 3.42-volts unknown + 172 = 174 174 2Guess is Low(but getting really, 0 0-voltsreally, close) Engr. A. R.K. Rajput NFC IET 54 Multan
55. 55. Binary Search • New Guess (8): Analog Digital 5-volts 256176 − 174 3.42-volts 175! + 174 = 175 2Guess is Right On 0-volts 0 Engr. A. R.K. Rajput NFC IET 55 Multan
56. 56. Binary Search• The speed the binary search is accomplished depends on: – The clock speed of the ADC – The number of bits resolution – Can be shortened by a good guess (but usually is not worth the effort) Engr. A. R.K. Rajput NFC IET 56 Multan
57. 57. How Does It Work? Faithful Duplication• Now that we can slice up a waveform and convert it into digital form, let’s take a look at how it is used in DSP• Draw a simple waveform on graph paper – Scale appropriately• “Gather” digital data points to represent the waveform Engr. A. R.K. Rajput NFC IET 57 Multan
58. 58. Starting Waveform Used to Create Digital Data Engr. A. R.K. Rajput NFC IET 58 Multan
59. 59. How Does It Work? Faithful Duplication• Swap your waveform data with a partner• Using the data, recreate the waveform on a sheet of graph paper Engr. A. R.K. Rajput NFC IET 59 Multan
60. 60. Waveform Created from Digital Data Engr. A. R.K. Rajput NFC IET 60 Multan
61. 61. How Does It Work? Faithful Duplication• Compare the original with the recreating, note similarities and differences Engr. A. R.K. Rajput NFC IET 61 Multan
62. 62. How Does It Work? Faithful Duplication• Once the waveform is in digital form, the real power of DSP can be realized by mathematical manipulation of the data• Using EXCEL spreadsheet software can assist in manipulating the data and making graphs quickly• Let’s first do a little filtering of noise Engr. A. R.K. Rajput NFC IET 62 Multan
63. 63. How Does It Work? Faithful Duplication• Using your raw digital data, create a new table of data that averages three data points – Average the point before and the point after with the point in the middle – Enter all data in EXCEL to help with graphing Engr. A. R.K. Rajput NFC IET 63 Multan
64. 64. Noise Filtering Using Averaging Raw Ave before/after 150 150 100 100 AmplitudeAmplitude 50 50 0 0 -50 0 10 20 30 40 -50 0 10 20 30 40 -100 -100 -150 -150 Time Time Engr. A. R.K. Rajput NFC IET 64 Multan
65. 65. How Does It Work? Faithful Duplication• Let’s take care of some static crashes that cause some interference• Using your raw digital data, create a new table of data that replaces extreme high and low values: – Replace values greater than 100 with 100 – Replace values less than -100 with -100 Engr. A. R.K. Rajput NFC IET 65 Multan
66. 66. Clipping of Static Crashes Raw eliminate extremes (100/-100) 150 150 100 100 Amplitude 50Amplitude 50 0 0 -50 0 10 20 30 40 -50 0 10 20 30 40 -100 -100 -150 -150 Time Time Engr. A. R.K. Rajput NFC IET 66 Multan
67. 67. How Does It Work? Resolution Trade-offs• Now let’s take a look at how sampling rates affect the faithful duplication of the waveform• Using your raw digital data, create a new table of data and delete every other data point• This is the same as sampling at half the rate Engr. A. R.K. Rajput NFC IET 67 Multan
68. 68. Half Sample Rate Raw every 2nd 150 150 100 100 AmplitudeAmplitude 50 50 0 0 -50 0 10 20 30 40 -50 0 10 20 30 40 -100 -100 -150 -150 Time Time Engr. A. R.K. Rajput NFC IET 68 Multan
69. 69. How Does It Work? Resolution Trade-offs• Using your raw digital data, create a new table of data and delete every second and third data point• This is the same as sampling at one-third the rate Engr. A. R.K. Rajput NFC IET 69 Multan
70. 70. 1/2 Sample Rate Raw every 3rd 150 150 100 100 Amplitude 50Amplitude 50 0 0 -50 0 10 20 30 40 -50 0 10 20 30 40 -100 -100 -150 -150 Time Time Engr. A. R.K. Rajput NFC IET 70 Multan
71. 71. How Does It Work? Resolution Trade-offs• Using your raw digital data, create a new table of data and delete all but every sixth data point• This is the same as sampling at one-sixth the rate Engr. A. R.K. Rajput NFC IET 71 Multan
72. 72. 1/6 Sample Rate Raw every 6th 150 150 100 100 Amplitude 50Amplitude 50 0 0 -50 0 10 20 30 40 -50 0 10 20 30 40 -100 -100 -150 -150 Time Time Engr. A. R.K. Rajput NFC IET 72 Multan
73. 73. How Does It Work? Resolution Trade-offs• Using your raw digital data, create a new table of data and delete all but every twelfth data point• This is the same as sampling at one-twelfth the rate Engr. A. R.K. Rajput NFC IET 73 Multan
74. 74. 1/12 Sample Rate Raw every 12th 150 150 100 100 Amplitude 50Amplitude 50 0 0 -50 0 10 20 30 40 -50 0 10 20 30 40 -100 -100 -150 -150 Time Time Engr. A. R.K. Rajput NFC IET 74 Multan
75. 75. How Does It Work? Resolution Trade-offs• What conclusions can you draw from the changes in sampling rate?• At what point does the waveform get too corrupted by the reduced number of samples?• Is there a point where more samples does not appear to improve the quality of the duplication? Engr. A. R.K. Rajput NFC IET 75 Multan
76. 76. How Does It Work? Resolution Trade-offs Bit High Bit Good SlowResolution Count Duplication Low Bit Poor Fast Count DuplicationSample Rate High Sample Good Slow Rate Duplication Low Sample Poor Fast Rate Duplication Engr. A. R.K. Rajput NFC IET 76 Multan
77. 77. Digital Signal Processing Lecture -2 Engr. A. R.K. Rajput NFC IET 77 Multan
78. 78. Sampling of Analog Signals x[n] = x[nT]Uniform Sampling: 1 1 0.8 0.8 sampled signal 0.6 0.6 analog signal 0.4 0.4 0.2 0.2 0 0 -0.2 -0.2 -0.4 -0.4 -0.6 -0.6 -0.8 -0.8 -1 -1 0 2 4 Engr. A. R.K. Rajput NFC IET 6Multan 0 2 4 6 78 t n
79. 79. Uniform sampling • Uniform sampling is the most widely used sampling scheme.This is described by the relation x[n] = x[nT] -∞ <n<∞ where x(n) is the discrete time signal obtained by taking samples of the analogue signal x(t) every T seconds.The time interval T between successive symbols is called the Sampling Period or Sampling interval and its reciprocal 1/T = Fs is called the Sampling Rate (samples per second) or the Sampling Frequency (Hertz).A relationship between the time variables t and n of continuous time and discrete time signals respectively, can be obtained as n t = nT = (1) 79 Fs Engr. A. R.K. Rajput NFC IET Multan
80. 80. • A relationship between the analog frequency F and the discrete frequency f may be established as follows. Consider an analog sinusoidal signal x(t) = Acos(2πFt + θ) which, when sampled periodically at a rate Fs = 1/T samples per second, yields  2πnF  x[nT] = A cos( 2πFnT + Θ) = A cos  F + Θ  (2)  s  But a discrete sinusoid is generally represented as x[n] = A cos( 2πfn + Θ ) (3) Comparing (2) and (3) we get F f = (4) Fs Engr. A. R.K. Rajput NFC IET 80 Multan
81. 81. Since the highest frequency in a discrete time signal is f = ½. Therefore, from (4) we have F 1 Fmax = s = (5) 2 2T or (6) Fs = 2 FmaxSampling Theorem:If x(t) is bandlimited with no components of frequencies greaterthan Fmax Hz, then it is completely specified by samples taken atthe uniform rate Fs > 2Fmax Hz.The minimum sampling rate or minimum sampling frequency,Fs = 2Fmax, is referred to as the Nyquist Rate or NyquistFrequency. The correspondingRajput NFC IET Engr. A. R.K. time interval is called the Nyquist Multan 81
82. 82. Sampling Theorem (cont.) • Signal sampling at a rate less than the Nyquist rate is referred to as undersampling. • Signal sampling at a rate greater than the Nyquist rate is known as the oversampling. Example 1: The following analogue signals are sampled at a sampling frequency of 40 Hz. Find the corresponding discrete time Signals. (i) x(t) = cos2π(10)t (ii) y(t) = cos2π(50)t Solution: (i) 10  π  x1[ n] =cos 2π  =cos  n n 40  2   50  5π π (ii) x2 [n] = cos 2π  n = cos n = cos(2πn + πn / 2) = cos n  40  2 2 As, Shows identical in [ x1(n) & x2(n)] sinusoidal signals & indistinguishable. Ambiguity is there for samples values. x(t) yield same values as y(t) when two are sampled at Fs=40, thenNote: The frequency F2 = 50 Hz is an alias of F1 = 10 Hz. All of the Engr. A. R.K. Rajput NFC IET 82sinusoids cos2π(F1 + 40k)t, t = 1,2,3,… are aliases. Multan
83. 83. Example 2 Consider the analog signal x(t) = 3cos100πt(a) Determine the minimum required sampling rate to avoid aliasing.(b) Suppose that the signal is sampled at the rate Fs = 200 Hz. What is the discrete time signal obtained after sampling?Solution:(a) The frequency of the analog signal is F = 50 Hz. Hence the minimum sampling rate to avoid aliasing is 100Hz. 100π π(b) x[n] = 3 cos 200 n = 3 cos 2 n Engr. A. R.K. Rajput NFC IET 83 Multan
84. 84. Example 3Consider the analog signalx(t) = 3cos50πt + 10sin300πt - cos100πtWhat is the Nyquist rate for this signal.Solution:The frequencies present in the signal above areF1 = 25 Hz, F2 = 150 Hz F3 = 50 Hz.Thus Fmax = 150 Hz.∴ Nyquist rate = 2.Fmax = 300 Hz.Note: It should be observed that the signal component 10sin300πt, sampled at 300 Hz results in the samples 10sinπn, which are identically zero, hence we miss the signal component completely.What should we do to avoid this situation???? Engr. A. R.K. Rajput NFC IET 84 Multan
85. 85. TutorialQ1: Find the minimum sampling rate that can be used to obtain samples that completely specify the signals: (a) x(t) = 10cos(20πt) – 5cos(100πt) + 20cos(400πt) (b) y(t) = 2cos(20πt) + 4sin(20πt - π/4) + 5cos(8πt)Q2: Consider the analog signal x(t) = 3cos2000πt + 5sin6000πt + 10cos12000πt (a) What is the Nyquist rate for this signal? (b) Assume now that we sample this signal using a sampling rate F s = 5000 samples/s. What is the discrete time signal obtained after sampling? Engr. A. R.K. Rajput NFC IET 85 Multan
86. 86. Some Elementary Discrete Time signals• Unit Impulse or unit sample sequence: It is defined as , 1 n= 0 δn ] = [ 0 n ≠0In words, the unit sample sequence is a signal that is zero everywhere, except at t = 0. 1 0.8 0.6 0.4 0.2 0 -3 -2 -1 0 1 2 3 Unit impulse function Engr. A. R.K. Rajput NFC IET 86 Multan
87. 87. Some Elementary Discrete Time signals• Unit step signal It is defined as , 1 n ≥0 u[n ] = 0 n <0 2 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 00 1 2 3 4 5 6 7 Engr. A. R.K. Rajput NFC IET 87 Multan
88. 88. Some Elementary Discrete Time signals• Unit Ramp signal It is defined as n, n ≥ 0 r[n] =  0 n < 0 6 5 4 3 2 1 00 1 2 3 4 5 6 Engr. A. R.K. Rajput NFC IET 88 Multan
89. 89. Some Elementary Discrete Time signals• Exponential Signal The exponential signal is a sequence of the form x[n] = an, for all nIf the parameter a is real, then x[n] is a real signal. The following figure illustrates x[n] for various values of a. 0<a<1 a>1 -1<a<0 a<-1 Engr. A. R.K. Rajput NFC IET 89 Multan
90. 90. Some Elementary Discrete Time signals• Exponential Signal (cont) when the parameter a is complex valued, it can be expressed as jθ a = re where r and θ are now the parameters. Hence we may express x[n] as x[n] = r n e jθ = r n ( cos θn + j sin θn ) Since x[n] is now complex valued, it can be represented graphically by plotting the real part x R [n] = r cos θ n n as a function of n, and separately plotting the imaginary part x I [n] = r n sin θ n as a function of n. (see plots on the next slide) Engr. A. R.K. Rajput NFC IET 90 Multan
91. 91. 1 xR[n] = (0.9)ncos(πn/10)0.5 0-0.5 0 10 20 30 40 50 60 1 xI[n] = (0.9)nsin(πn/10)0.5 0-0.5 0 10 20 30 40 50 60 Engr. A. R.K. Rajput NFC IET 91 Multan
92. 92. Exponential Signal (cont.)Alternatively, the signal x[n] may be graphically represented by theamplitude or magnitude function|x[n]| = rnand the phase functionΦ[n] = θnThe following figure illustrates |x[n| and Φ[n] for r = 0.9 and θ = π/10. |x[n]| 2 0 0 5 10 - πΦ[n] 0 -π - Engr. A. R.K. Rajput NFC IET 0 5 10 92 n Multan
93. 93. Discrete Time Systems• A discrete time system is a device or algorithm that operates on a discrete time signal x[n], called the input or excitation, according to some well defined rule, to produce another discrete time signal y[n] called the output or response of the system.• We express the general relationship between x[n] and y[n] as y[n] = H{x[n]} where the symbol H denotes the transformation (also called an operator), or processing performed by the system on x[n] to produce y[n]. x[n] Discrete Time System y[n] H Engr. A. R.K. Rajput NFC IET 93 Multan
94. 94. Example 4• Determine the response of the following systems to the input signal: | n |, −3 ≤n ≤ 3 x[n] =   0, otherwise(a) y[n] = x[n](b) y[n] = x[n-1](c) y[n] = x[n+1](d) y[n] = (1/3)[x[n+1] + x[n] + x[n-1]](e) y[n] = max[x[n+1],x[n],x[n-1]] n(f) y[n] = ∑x[k ] k =−∞ Engr. A. R.K. Rajput NFC IET 94 Multan
95. 95. • Solution:(a) In this case the output is exactly the same as the input signal. Such a system is known as the identity System.(b) y[n] = [……,3, 2, 1, 0, 1, 2, 3,……](c) y[n] = […….,3, 2, 1, 0, 1, 2, 3,…….](d) y[n] = […., 5/3, 2, 1, 2/3, 1, 2, 5/3, 1, 0,…](e) y[n] = [0, 3, 3, 3, 2, 1, 2, 3, 3, 3, 0, ….](f) y[n] = […,0, 3, 5, 6, 6, 7, 9, 12, 0, …] Engr. A. R.K. Rajput NFC IET 95 Multan
96. 96. Classification of Discrete Time Systems• Static versus Dynamic Systems A discrete time system is called static or memory-less if its output at any instant n depends at most on the input sample at the same time, but not on the past or future samples of the input. In any other case, the system is said to be dynamic or to have memory.Examples: y[n] = x2[n] is a memory-less system, whereas the following are the dynamic systems: (a) y[n] = x[n] + x[n-1] + x[n-2] (b) y[n] = 2x[n] + 3x[n-4] Engr. A. R.K. Rajput NFC IET 96 Multan
97. 97. Time Invariant versus Time Variant Systems• A system is said to be time invariant if a time delay or time advance of the input signal leads to an identical time shift in the output signal. This implies that a time-invariant system responds identically no matter when the input is applied. Stated in another way, the characteristics of a time invariant system do not change with time. Otherwise the system is said to be time variant.• Example1: Determine if the system shown in the figure is time invariant or time variant. Solution: y[n] = x[n] – x[n-1] y[n] x[n] Now if the input is delayed by k units + in time and applied to the system, the - Output is Z-1 y[n,k] = n[n-k] – x[n-k-1] (1) On the other hand, if we delay y[n] by k units in time, we obtain y[n-k] = x[n-k] – x[n-k-1] (2) (1) and (2) show that the system is time invariant. Engr. A. R.K. Rajput NFC IET 97 Multan
98. 98. Time Invariant versus Time Variant Systems• Example 2: Determine if the following systems are time invariant or time variant. (a) y[n] = nx[n] (b) y[n] = x[n]cosw0nSolution:(a) The response to this system to x[n-k] is y[n,k] = nx[n-k] (3) Now if we delay y[n] by k units in time, we obtain y[n-k] = (n-k)x[n-k] = nx[n-k] – kx[n-k] (4) which is different from (3). This means the system is time-variant.(b) The response of this system to x[n-k] is y[n,k] = x[n-k]cosw0n (5) If we delay the output y[n] by k units in time, then y[n-k] = x[n-k]cosw0[n-k] which is different from that given in (5), hence the system is time variant. Engr. A. R.K. Rajput NFC IET 98 Multan
99. 99. Linear versus Non-linear Systems A system H is linear if and only if H[a1x1[n] + a2x2[n]] = a1H[x1[n]] + a2H[x2[n]] for any arbitrary input sequences x1[n] and x2[n], and any arbitrary constants a1 and a2. a1 x1[n] y1[n] a2 + Hx2[n] a1x1[n] H y2[n] + a2x2[n] HIf y1[n] = y2[n], then H is linear.Rajput NFC IET Engr. A. R.K. Multan 99
100. 100. ExamplesDetermine if the following systems are linear or nonlinear. (a) y[n] = nx[n]Solution: For two input sequences x1[n] and x2[n], the corresponding outputs are y1[n] = nx1[n] and y2[n] = nx2[n] A linear combination of the two input sequences results in the outputH[a1x1[n] + a2x2[n]] = n[a1x1[n] + a2x2[n]] = na1x1[n] + na2x2[n] (1)On the other hand, a linear combination of the two outputs results in the out a1y1[n] + a2y2[n] = a1nx1[n] + a2nx2[n] (2)Since the right hand sides of (1) and (2) are identical, the system is linear. Engr. A. R.K. Rajput NFC IET 100 Multan
101. 101. (b) y[n] = Ax[n] + BSolution: Assuming that the system is excited by x1[n] and x2[n] separately, we obtain the corresponding outputs y1[n] = Ax1[n] + B and y2 = Ax2[n] + B A linear combination of x1[n] and x2[n] produces the output y3[n] = H[a1x1[n] + a2x2[n]] = A[a1x1[n] + a2x2[n]] + B = Aa1x1[n] + Aa2x2[n] + B (3) On the other hand, if the system were linear, its output to the linear combination of x1[n] and x2[n] would be a linear combination of y1[n] and y2[n], that is,a1y1[n] + a2y2[n] = a1Ax1[n] + a1B + a2Ax2[n] + a2B (4)Clearly, (3) and (4) are different and hence the system is nonlinear. Under what A. R.K. Rajput NFCwould it be linear? 101 Engr. conditions IET Multan
102. 102. Causal versus Noncausal SystemsA system is said to be causal if the output of the system at any time n [i.e. y[n]) depends only on present and past inputs but does not depend on future inputs.Example: Determine if the systems described by the following input-output equations are causal or noncausal. n (a) y[n] = x[n] – x[n-1] (b) y[n] = ax[n] (c) y[n] = ∑ x[k ] k = −∞ (d) y[n] = x[n] + 3x[n+4] (e) y[n] = x[n2] (f) y[n] = x[-n]Solution: The systems (a), (b) and (c) are causal, others are non-causal. Engr. A. R.K. Rajput NFC IET 102 Multan
103. 103. Stable versus Nonstable SystemsA system is said to be bonded input bounded output (BIBO) stable if and only if every bounded input produces a bounded output. Engr. A. R.K. Rajput NFC IET 103 Multan
104. 104. z-transform• Transform techniques are an important role in the analysis of signals and LTI system.• Z- transform plays the same role in the analysis of discrete time signals and LTI system as Laplace transform does in the analysis of continuous time signals and LTI system.• For example, we shall see that in the Z-domain (complex Z- plan) the convolution of two time domain signals is equivalent to multiplication of their corresponding Z-transform.• This property greatly simplifies the analysis of the response of LTI system to various signals. DSP Slide 104 Engr. A. R.K. Rajput NFC IET Multan
105. 105. 1-The Direct Z- Transform The z-transform of a sequence x[n] is ∞ X ( z) = ∑z x[ n ] n= −∞ − nWhere z is a complex variable. For convenience, the z-transform of asignal x[n] is denoted by X(z) = Z{x[n]} We may obtain the Fourier transform from the z transform by making the substitution X ( z ) = ω . This corresponds to e j restricting z = Also with z =r jω , 1 e ∞ jω jω − X (r e ) = ∑[ n]( r e x ) n n= ∞ − That is, the z-transform is the Fourier transform of the sequence x[n]r - n . for r=1 this becomes the Fourier transform of x[n]. The Fourier transform therefore corresponds to the z-transform evaluated on the unit circle: DSP Slide 105 Engr. A. R.K. Rajput NFC IET Multan
106. 106. z-transform(cont:The inherent periodicity in frequency of the Fourier transformis captured naturally under this interpretation.The Fourier transform does not converge for all sequences - the infinitesum may not always be finite. Similarly, the z-transform does notconverge for all sequences or for all values of z.For any Given sequence the set of values of z for which the z-transformconverges is called the region of convergence (ROC). DSP Slide 106 Engr. A. R.K. Rajput NFC IET Multan
107. 107. z-transform(cont:The Fourier transform of x[n] exists if the sum ∑− x[ n ] ∞ n= ∞converges. However, the z-transform of x[n] is just the Fouriertransform of the sequence x[n]r -n. The z-transform therefore exists(or converge) if X ( z ) = ∑ =−∞ x[ n]r <∞ ∞ −n nThis leads to the condition − ∑ n <∞ ∞ n= ∞ − x[ n] zfor the existence of the z-transform. The ROC therefore consists of aring in the z-plane:In specific cases the inner radius of this ring may include the origin, and the outerradius may extend to infinity. If the ROC includes the unit circle= DSP Slide 107 Engr. A. R.K. Rajput NFC IET z 1 , thenthe Fourier transform will converge. Multan
108. 108. z-transform(cont:Most useful z-transforms can be expressed in the form P( z ) X ( z) = , Q( z )where P(z) and Q(z) are polynomials in z. The values of z forwhich P(z) = 0 are called the zeros of X(z), and the values withQ(z) = 0 are called the poles. The zeros and poles completelyspecify X(z) to within a multiplicative constant.In specific cases the innerradius of this ring may includethe origin, and the outer radiusmay extend to infinity. If the z =ROC includes the unit circle 1 , then the Fouriertransform will converge. DSP Slide 108 Engr. A. R.K. Rajput NFC IET Multan
109. 109. Example: right-sided exponential sequenceConsider the signal x[n] = anu[n]. This has the z-transform ∞ ∞ X ( z) = ∑a u[n]z = ∑(az ) n =−∞ n −n n =0 −1 n Convergence requires that ∞ ∑ az −1 < ∞ n =∞which is only the case if az − < . equivalently 1 1 or z >a .In the ROC, the series converges to ∞ 1 z X ( z ) = ∑ (az ) = = −1 n , z > a, n= 0 1 − az −1 z−a since it is just a geometric series. DSP Slide 109 Engr. A. R.K. Rajput NFC IET Multan
110. 110. Example: right-sided exponential sequenceThe z-transform has a region of convergence for any finitevalue of a. The Fourier transform of x[n] only exists if the ROC includes the unit circle, which requires that a <1. On the other hand, if a >1 then the ROC does not include the unit circle, and Fourier transform does not exist. This is consistent with the fact that for these values of a the sequence anu[n] is exponentially growing, and the sum therefore 110 DSP Slide does not converge.Rajput NFC IET Engr. A. R.K. Multan
111. 111. Example: left-sided exponential sequence Now consider the sequence x ( n) =− n u[ − − ]. a n 1This sequence is left-sided because it is nonzero only for n ≤ 1. −The z-transform is ∞ −1 X ( z ) = ∑ a n u[ − − ] z −n =−∑ n z −n − n 1 a n= ∞ − n= ∞ − ∞ ∞ =− a −n z n = −∑a − z ) n ∑ 1 ( 1 n=1 n=0 For a − z < ,or 1 1 z <a , the series converges toNote that the expression for thez-transform (and the pole zeroplot) is exactly the same as forthe right-handed exponentialsequence - only the region ofconvergence is different.Specifying the ROC is thereforecritical when dealing with the z- Engr. A. R.K. Rajput NFC IET DSP Slide 111transform. Multan
112. 112. Example: Sum of two exponentials n n 1   1 The signal x[n] =   u[n] +  −  u[n] is the sum of two real exponentials 2  3 The z transform is ∞  − n n   1  1 X ( z ) =∑  u[ n ] + −  u[ n] n   z n= ∞  − 2  3  ∞ ∞ n n   1  1 =∑  u[ n ] z  −n + ∑−  u[ n] z −  n n= ∞ 2  −  −  n= ∞ 3 n n 1 − ∞ ∞  1 − ∑ =  z  +  n=  1 ∑− z 1  0 2  n=  0 3 From the example for the right-handed exponential sequence, the first term in thissum converges for z >1 / 2 and the second for z >1 / 3 The combinedtransform X(z) therefore converges in the intersection of these regions, namely when z >1 / 2 .  1  2 z z −  1 1  12 In this case X ( z ) = + = 1 −1 1 −1  1  1 DSP Slide 112 1 − Engr. A. R.K. Rajput NFC IET z 1+ z  z −  z +  2 Multan 3  2  3
113. 113. Example: Sum of two exponentialsThe pole-zero plot and region of convergence of the signal is DSP Slide 113 Engr. A. R.K. Rajput NFC IET Multan
114. 114. Example: finite length sequence The pole-zero plot and region of convergence of the signal isThe signal has z transform − N− 1 −( az −1 ) n N 1 1 X ( z ) =∑ n z −n a =∑ az − ) n = ( 1 n=0 n=0 1 −az − 1 1 z N −a N = . zN−1 z −a Since there are only a finite number of nonzero terms the sum always converges when az −1 (a < ) ,∞ is finite. There are no restrictions on and the ROC is the entire z- plane with the exception of the origin z = 0 (where the terms in the sum are infinite). The N roots of j ( 2πk / N ) Z k = ae the numerator polynomial are at , k = 0,1,......N − 1*since these values satisfy the equation ZN= aN The zero at k = 0 cancels the pole at z = a, so there are no poles exceptat the origin, and the zeros are at zk = aej(2k/N) k = 1; : : : ;N -1 The zero at k = 0 cancels the pole at z = a, so thereare no poles except at 114 origin, and the zeros areA. R.K. Rajput NFC = 1; : : : ;N -1 DSP Slide the Engr. at zk = aej(2k/N) k IET Multan
115. 115. 2-Properties of the region of convergenceThe properties of the ROC depend on the nature of the signal. Assuming that thesignal has a finite amplitude and that the z-transform is a rational function:The ROC is a ring or disk in the z-plane, centered on the origin τ τ (0 ≤ R < z < L ≤∞).The Fourier transform of x[n] converges absolutely if and only if the ROC ofthe z-transform includes the unit circle.The ROC cannot contain any poles.If x[n] is finite duration (ie. zero except on finite interval (∞< N1 ≤ n ≤ N 2 < ∞). ∞ ), then the ROC is the entire Z-plan except perhaps at z=0 orz= .If x[n] is a right-sided sequence then the ROC extends outward from theoutermost finite pole to infinity. If x[n] is left-sided then the ROC extends inward from the innermost nonzeropole to z = 0.A two-sided sequence (neither left nor right-sided) has a ROC consisting of aring in the z-plane, bounded on the interior and exterior by a pole (and notcontaining any poles). The ROC is115 connected region.A. R.K. Rajput NFC IET DSP Slide a Engr. Multan
116. 116. 3 - The inverse z-transformFormally, the inverse z-transform can be performed by evaluating aCauchy integral. However, for discrete LTI systems simplermethods are often sufficient.A-Inspection method: If one is familiar with (or has a tableof) common z-transform pairs, the inverse can be found byinspection. For example, one can invert the z-transform    1  1 X ( z) = z , > 1  − z − 1 2, 1    2 Using Z-transform pair 1 a u[ n ] ← n  → z ,........ for z > . a 1− − az 1 By inspection we recognise that n   1 x[n] =   u[ n ],   2Also, if X(z) is a sum of terms then one may be able to do a term-by-term DSP Slide 116 by inspection, A. R.K. Rajput NFC IETas a sum of terms. inversion Engr. yielding x[n] Multan
117. 117. 3 - The inverse z-transformB-Partial fraction expansion:For any rational function we can obtain a partial fraction expansion,and identify the z-transform of each term. Assume that X(z) isexpressed as a ratio of polynomials in z-1: ∑ M −k bk z X ( z) = k =0 , ∑ N −k ak z k =0 It is always possible to factorX(z) as ∏ (1 − c z ) M −1 b0 X(z) = k =1 k ∏ (1 − d z ) N a0 −1 k =1 k where the ck s are the nonzero and poles of X(z). DSP Slide 117 Engr. A. R.K. Rajput NFC IET Multan
118. 118. The(Continue:) z-transformPartial fraction expansion inverseIf M<N and the poles are all first order, then X(z) can be expressed Nas Ak X(z) = ∑ −1 , k =1 1 − d k z in this case the coefficients A k are given by ( ) A k = 1 − d k z −1 X ( z ) z =d k If M>N and the poles are first order, then an expression of the form cab be used, and Br’s be obtained by long division of the numerator. M-N N Ak X(z) = ∑B z r =0 r −r 1− dk z +∑ k =1 −1 , The A k s can be obtained using M < N DSP Slide 118 Engr. A. R.K. Rajput NFC IET Multan
119. 119. 3 - The inverse z-transform Partial fraction expansion The most general form for partial fraction expansion, which can also deal with multiple - order poles, is M-N N Ak s Cm X(z) = ∑B z −r + ∑ +∑ . r =0 r k =1, k ≠ i 1− dk z −1 m =1 (1 − d z ) i −1 m Ways of finding the C m s can be found in most standard DSP texts. The terms B r z −r correspond to shifted and scaled impulse sequences, and invert to terms of the form B rδ [n - r]. The fractional term s A k 1 − d k z −1 correspond to exponentia l sequences. For these terms the ROC properties must be used to decide whether the sequences are left - sided or right - sided. DSP Slide 119 Engr. A. R.K. Rajput NFC IET Multan
120. 120. Example: inverse by Partial fractions Consider the sequence x[n] with z - transform X(z) = 1 + 2z + z −1 = −2 1+ z , ( ) −1 2 z > 1. 3 −1 1 −2 1− z + z 2 2 1 −1 1− z 1− z 2 −1 ( )Since M = N = 2 this can be expressed asX(z) = B0 + A 1 + A 2 , − 1 −1 1−z 1 1− z 2The value B0 can found by be long division : 2 1 −2 3 −1 − 2 −1 2z − z +1) z +2 z +1 2 −2 −1 z −3 z +2 −1 5z −1 −1 - 1 +5 zX(z) =2 +  DSP Slide 120  1 − 2 1  Engr. A. − ( 1  − z 1 − z R.K. Rajput NFC IET 1 ) Multan
121. 121. Example: inverse by Partial fractions The coecients A and A can be found using A = (1 − d z ) X ( z ) d . 1 2 −1 k k z= k So −1 −2 1 +2 z + z 1 +4 +4 A 1 = 1 −z −1 −1 = 1 −2 =−9 z =1 −1 −2 1 +2 z + z 1 +2 + 1 and A = = =9 2 1 −1 1/ 2 1− z 2 z −1 =1 9 8 There fore X(z) =2 - + − 1 −1 1 −z 1 1− z 2Using the fact that the ROC z >1. , the terms can be inverted one at a timeby inspection to give x[ n ] = 2δ[ n ] − 9(1 / 2) n u[ n]. DSP Slide 121 Engr. A. R.K. Rajput NFC IET Multan
122. 122. C- Power Series Expansion If Z transform is given as power series in form ∞ X (z ) = ∑ [ n] z −n x n= ∞ − 2 2 =.................. +[ − ] z +x[ − ] z 1 +x[0] +x[1] z 1 +[ 2] z ...... 2 1then any value in the sequence can be found by identifying thecoefficient of the appropriate power of z-1. DSP Slide 122 Engr. A. R.K. Rajput NFC IET Multan
123. 123. Example;ZPower Series Expansion Consider the transform X (z ) =log ( + − ) 1 az 1 , z >aUsing the power series expansion for log(1 + x), with /x/< 1, gives ∞ ( −) n + a n z − 1 1 n X (z ) =∑ , n= 1 n DSP Slide 123 Engr. A. R.K. Rajput NFC IET Multan
124. 124. Example; Power Series Expansion by long division Consider the transform 1 X (z ) = , z >a 1− − az 1Since the ROC is the exterior of a circle, the sequence is right-sided. We thereforedivide to get a power series1in powers of z-1: 1 + az + a z − 2 -2X ( z ) = 1 − az −1 1 1 − az −1 −1 az az − a z −1 2 −2 a 2 z − 2 + ..... 1 = 1 + az + a z + ........Therefore..............x[n] = a u[n]. −1 2 -2 n1 − az −1 DSP Slide 124 Engr. A. R.K. Rajput NFC IET Multan
125. 125. Example; Power Series Expansion for left-side Sequence Consider the Z- transform 1 X (z ) = − , z <a 1−az 1Because of the ROC, the sequence is now a left-sided one. Thus wedivide to obtain a series in powers of z: − -a 1 z −a z -2 2.. −a +z z z −a − z 2 1 az −1 Thus..............x[ n] =− n u[ − − ]. a n 1 DSP Slide 125 Engr. A. R.K. Rajput NFC IET Multan
126. 126. 4- Properties of the z-transformif X(z) denotes the z-transform of a sequence x[n] and the ROC of X(z) isindicated by Rx, then this relationship is indicated as x[ n] ←→ ( z ),  X z ROC Rx Furthermore, with regard to nomenclature, we have two sequences such that[ n ] ← x1  X 1 ( z ), z → ROC R x1 x2 [ n] ← X 2 ( z ), z → ROC R x2 A—Linearity: The linearity property is as follows: ax1[n] + bX 2 (n) ← z aX 1[ z ] + bX 2 ( z ), → ROC contains R x1 ∩ R x1 . B—Time Shifting: The time shifting property is as follows: x[n − n0 ] ← z z X ( z ), → − n0 ROC R x (The ROC may change by the possible addition or deletion of z =0 or z = ∞.) This is easily shown: ∞ ∞ Y ( z ) = ∑x[ n −n ] z n =−∞ 0 −n = ∑x[ m] z n =−∞ − m +n0 ) ( ∞ = z 126∑x[ m] z A. R.K. z NFC IET z ). DSP Slide −n0 Engr. n =−∞ = X(Rajput Multan −m −n0