chapter 2
play

Chapter 2 Review of Fundamentals of Digital Signal Processing 1 - PowerPoint PPT Presentation

Chapter 2 Review of Fundamentals of Digital Signal Processing 1 Outline DSP and Discrete Signals LTI Systems z-Transform Representations Discrete-Time Fourier Transform (DTFT) Discrete Fourier


  1. Transform Representations • z-Transform ↔ x n [ ] X z ( ) ∞ ∑ = − Infinite power series in z -1 , with n X z ( ) x n z [ ] x [ n ] as coefficients of term in z - n =−∞ n 1 ∫ − =  n 1 [ ] ( ) • direct evaluation using residue theorem x n X z z dz π 2 j C ( 留数定理 ) • partial fraction expansion ( 部分分式展 开 )of X ( z ) • long division ( 长除法 ) • power series expansion( 幂级数展开 ) 33

  2. Transform Representations • X ( z ) converges (is finite) only for certain values of z – Sufficient condition for convergence ∞ ∑ − < ∞ n [ ] x n z =−∞ n • region of convergence < < R z R 1 2 34

  3. Examples of Converge Regions = δ − 1. Delayed impulse x n [ ] [ n n ] 0 > > < ∞ < ∀ = z − = n converges for z 0, n 0; z , n 0; z n , 0 X z ( ) 0 0 0 0 = − − 2. Box pulse x n [ ] u n [ ] u n [ N ] − − − N N 1 1 z ∑ = − = < < ∞ n converges for 0 X z ( ) z z − − 1 1 z = n 0 < < ∞ all finite length sequences converge in the region 0 z = < 3. n [ ] [ ] ( 1) x n a u n a ∞ 1 ∑ = − = − > n n X z ( ) a z converges for z a − 1 1 az = n 0 all infinite duration sequences which are non-zero for n ≥ 0 > converge in the region z R 1 35

  4. Examples of Converge Regions = − − − n 4. x n [ ] b u [ n 1] − 1 1 ∑ < = − − = − converges for z b n n X z ( ) b z − 1 1 bz =−∞ n all infinite duration sequences which are non-zero for n <0 < converge in the region z R 2 x [ n ] non-zero for - ∞ < n < ∞ can be viewed as a combination of 5. < < 3 and 4, giving a convergence region of the form R z R 1 2 > sub-sequence for n ≥ 0 ⇒ z R – 1 < sub-sequence for n <0 ⇒ – z R 2 < < total sequence ⇒ – R z R 1 2 36

  5. Examples If x [ n ] has z-transform X ( z ) with ROC of r i <| z |< r o , find the z- transform, Y ( z ), and the region of convergence for the sequence y [ n ]= a n x [ n ] in terms of X ( z ) ∞ ∑ = − Solution n X z ( ) x n z [ ] =−∞ n ∞ ∞ ∑ ∑ − − = = n n n Y z ( ) y n z [ ] a x n z [ ] =−∞ =−∞ n n ∞ ∑ − = = n x n z a [ ]( / ) X z a ( / ) =−∞ n < < ROC: a r z a r i o 37

  6. Examples The sequence x [ n ] has z-transform X ( z ). Show that the sequence nx [ n ] has z-transform – z d X ( z )/ d z Solution ∞ ∑ = − n X z ( ) x n z [ ] =−∞ n ∞ ∞ dX z ( ) 1 ∑ ∑ = − − − = − − n 1 n nx n z [ ] nx n z [ ] dz z =−∞ =−∞ n n 1 = − Z nx n ( [ ]) z 38

  7. Inverse z-Transform 1 ∫ = −  n 1 x n [ ] X z z ( ) dz π 2 j C where C is a closed contour that encircles the origin of the z- plane and lies inside the region of convergence for X ( z ) rational( 有理 ), can use a partial fraction expansion ( 部分分式展开 ) for finding inverse transforms 39

  8. Partial Fraction Expansion 40

  9. Example of Partial Fractions 41

  10. Transform Properties + + Linearity ax n [ ] bx n [ ] aX ( ) z bX ( ) z 1 2 1 2 − − n Shift [ ] x n n ( ) z X z 0 0 Exponential − n 1 a x n [ ] X a z ( ) Weighting − nx n [ ] d ( ) / d Linear Weighting z X z z − X z − 1 x [ n ] Time Reversal ( ) ∗ Convolution X z H z ( ) ( ) x n [ ] h n [ ] Multiplication of 1 ∫ −  1 C X v W z v v dz ( ) ( / ) x n w n [ ] [ ] π Sequences 2 j 42

  11. Discrete-Time Fourier Transform (DTFT) 43

  12. Discrete-Time Fourier Transform • evaluation of X ( z ) on the unit circle in the z-plane ∞ ∑ ω − ω = = j j n ( ) ( ) [ ] X e X z x n e ω = j z e =−∞ n π 1 ∫ = ω ω ω j j n x n [ ] X e ( ) e d π − π 2 • sufficient condition for existence of Fourier transform is ∞ ∞ ∑ ∑ − = < ∞ = n [ ] [ ] , since 1 x n z x n z =−∞ =−∞ n n 44

  13. Simple DTFTs Impulse Delayed impulse Step function Rectangular window Exponential Backward exponential 45

  14. DTFT Examples 46

  15. DTFT Examples X e ω − π < ω < π j Within interval is comprised of a pair of , ( ) ± ω impulses at 0 47

  16. DTFT Examples 48

  17. DTFT Examples 49

  18. Fourier Transform Properties • Periodicity in ω ω ω + π = ( 2 ) j j k X e ( ) X e ( ) • Period of 2 π corresponds to once around unit circle in the z- plane • normalized frequency: f, 0 → 0.5 → 1 (independent of Fs) • normalized radian frequency: ω , 0 →π → 2 π (independent of Fs) • digital frequency : f D =f*Fs, 0 → 0.5Fs → Fs • digital radian frequency : ω D = ω *Fs, 0 →π Fs → 2 π Fs 50

  19. Discrete Fourier Transform (DFT) 51

  20. Discrete-Time Fourier Series • consider a periodic signal with period N (samples) = + − ∞ < < ∞   x n [ ] x n [ N ], n  can be represented exactly by a discrete sum of x n [ ] sinusoids − N 1 ∑  − π =  j 2 kn N / X k [ ] x n e [ ] • N Fourier series coefficients = n 0 − N 1 1 ∑  • N -sequence values π =  j 2 kn N / x n [ ] X k e [ ] N = k 0 52

  21. Finite Length Sequences • consider a finite length (but not periodic) sequence, x [ n ], that is zero outside the interval 0 ≤ n ≤ N -1 − N 1 = ∑ − n X z ( ) x n z [ ] = n 0 • evaluate X ( z ) at equally spaced points on the unit circle, π = = − j 2 k N / z e , k 0,1,..., N 1 k − 1 N ∑ = π = − π = − j 2 k N / j 2 kn N / X k [ ] X e ( ) x n e [ ] , k 0,1,..., N 1 = n 0 – looks like discrete-time Fourier series of periodic sequence 53

  22. Relation to Periodic Sequence  • consider a periodic sequence, , consisting of an infinite x n [ ] sequence of replicas of [ ] x n ∞ ∑ = +  x n [ ] x n [ rN ] =−∞ r  • The Fourier coefficients, , are then identical to the values X k [ ] π of for the finite duration sequence ⇒ j 2 k N / X e ( ) a sequence of N length can be exactly represented by a DFT representation of the form − N 1 ∑ − π = ≤ ≤ − j 2 kn N / X k [ ] x n e [ ] , 0 k N 1 = n 0 − N 1 1 ∑ = π ≤ ≤ − j 2 kn N / x n [ ] X k e [ ] , 0 n N 1 N = 54 n 0

  23. Periodic and Finite Length Sequences 55

  24. Sampling in Frequency (Time Domain Aliasing) 56

  25. Sampling in Frequency (Time Domain Aliasing) 57

  26. Time Domain Aliasing Example 58

  27. DFT Properties Periodic Sequence Finite Sequence Period = N Length = N Sequence defined for all n Sequence defined for n = 0,1,…, N -1 DTFT defined for all ω DFS defined for k = 0,1,…, N -1 • when using DFT representation, all sequences behave as if they were infinitely periodic ⇒ DFT is really the representation of ∑ ∞ = +  the extended periodic function [ ] [ ] x n x n rN −∞ 59

  28. DFT Properties for Finite Sequences • X [ k ], the DFT of the finite sequence x [ n ], can be viewed as a sampled version of the z-transform (or Fourier transform) of the finite sequence (used to design finite length filters via frequency sampling method) • the DFT has properties very similar to those of the z-transform and the Fourier transform • the N values of X [ k ] can be computed very efficiently (time proportional to N log N ) using the set of FFT methods • DFT used in computing spectral estimates, correlation functions, and in implementing digital filters via convolutional methods 60

  29. DFT Properties N-point sequences N-point DFT + + Linearity ax n [ ] bx n [ ] aX k [ ] bX [ ] k 1 2 1 2 − − π Shift j 2 kn / N x n ([ n ]) N e X k [ ] 0 0 − Time Reversal x ([ n ]) N * [ ] X k − N 1 ∑ − Convolution x m h n [ ] ([ m ]) X k H k [ ] [ ] N = m 0 − N 1 1 ∑ − x n w n [ ] [ ] Multiplication X r W [ ] ([ k r ]) N N = r 0 61

  30. Circular Shifting Sequences 62

  31. Digital Filters 63

  32. Digital Filters • digital filter is a discrete-time linear, shift invariant system with input-output relation ∞ ∑ = ∗ = − y n [ ] x n [ ] h n [ ] x m h n [ ] [ m ] =−∞ m = ⋅ Y z ( ) X z ( ) H z ( ) H e ω is the system function ( 系统函数 ) with as the j • H z ( ) ( ) complex frequency response ( 频率响应 ) ω = ω + ω j j j H e ( ) H e ( ) jH e ( ) r i ω ω = ω j j j j arg[ H e ( )] H e ( ) H e ( ) e ω ω ω = + j j j log H e ( ) log H e ( ) j arg[ H e ( )] ω ω = j j log H e ( ) Re[log H e ( )] ω ω = j j arg[ H e ( )] Im[log H e ( )] 64

  33. Digital Filters • causal linear shift-invariant ⇒ h [ n ]=0 for n <0 • stable system ⇒ every bounded input produces a bounded output ⇒ a necessary and sufficient condition for stability and for the H e ω j existence of ( ) ∞ ∑ < ∞ h n [ ] =−∞ n 65

  34. Digital Filters • input and output satisfy linear difference equation ( 线性差分 方程 ) of the form N M ∑ ∑ − − = − y n [ ] a y n [ k ] b x n [ r ] k r = = k 1 r 0 • evaluating z-transforms of both sides gives: N M ∑ ∑ − − = − k r Y z ( ) a z Y z ( ) b z X z ( ) k r = = 1 0 k r M ∑ − r b z r ( ) Y z = = = r 0 H z ( ) N ∑ X z ( ) − − k 1 a z k = k 1 66

  35. Digital Filters • H ( z ) is a rational function of z -1 with M zeros and N poles M ∏ − − 1 A (1 c z ) r = = r 1 H z ( ) N ∏ − − 1 (1 d z ) k = k 1 • converges for | z |> R 1 , with R 1 <1 for stability ⇒ all poles of H ( z ) inside the unit circle for a stable, causal system 67

  36. Ideal Filter Responses 68

  37. FIR System • If a k =0, all k , then M ∑ = − = + − + + − ⇒ y n [ ] b x n [ r ] b x n [ ] b x n [ 1] ... b x n [ M ] r 0 1 M = r 0 = ≤ ≤ 1) h n [ ] b 0 n M n = 0 otherwise M M ∑ ∏ − − = = − 1 2) ⇒ M zeros n H z ( ) b z (1 c z ) n m = = n 0 m 1 = ± − 3) if (symmetric, anti-symmetric) h n [ ] h M [ n ] ω ω − ω = j j j M /2 ( ) ( ) H e A e e ω = j ( ) A e real(symmetric), imaginary(anti-symmetric) 69

  38. Linear Phase Filter • no signal dispersion ( 散布 ) because of non-linear phase ⇒ precise time alignment of events in signal 70

  39. FIR Filters • cost of linear phase filter designs – can theoretically approximate any desired response to any degree of accuracy – requires longer filters than non-linear phase designs • FIR filter design methods – window approximation ⇒ analytical, closed form method – frequency sampling approximation ⇒ optimization method – optimal (minimax error) approximation ⇒ optimization method 71

  40. Matlab FIR Design 72

  41. Lowpass Filter Design Example 73

  42. FIR Implementation • linear phase filters can be implemented with half the multiplications (because of the symmetry of the coefficients) 74

  43. IIR Systems N M ∑ ∑ = − + − [ ] [ ] [ ] y n a y n k b x n r k r = = k 1 r 0 • y [ n ] depends on y [ n -1],…, y [ n - N ] as well as x [ n ], …, x [ n - M ] • for M<N M ∑ − r b z r N A ∑ = = = r 0 k H z ( ) (partial fraction expansion) − − N 1 ∑ 1 d z − − = k k 1 1 a z k k = k 1 N ∑ = n (for casual systems) h n [ ] A d ( ) u n [ ] k k = k 1 an infinite duration impulse response 75

  44. IIR Filters • IIR filter issues – efficient implementations in terms of computations – can approximate any desired magnitude response with arbitrarily small error – non-linear phase ⇒ time dispersion of waveform 76

  45. IIR Design Methods • Analog filter design – Butterworth designs: maximally flat amplitude – Bessel designs: maximally flat group delay – Chebyshev designs: equi-ripple in either passband or stopband – Elliptic designs: equi-ripple in both passband and stopband Transform to digital filter • – Impulse invariant transformation 冲击不变法 • match the analog impulse response by sampling • resulting frequency response is aliased version of analog frequency response – Bilinear transformation 双线性变换法 • use a transformation to map an analog filter to a digital filter by warping the analog frequency scale (0 to infinity) to the digital frequency scale (0 to pi) • use frequency pre-warping to preserve critical frequencies of transformation (i.e., filter cutoff frequencies) 77

  46. Matlab Elliptic Filter Design 78

  47. Matlab Elliptic Filter Design 79

  48. IIR Filter Implementation 80

  49. IIR Filter Implementation 81

  50. IIR Filter Implementation 82

  51. Sampling 83

  52. Sampling of Waveforms = − ∞ < < ∞ x n [ ] x nT ( ), n a = ↔ = = µ F 8000Hz T 1/ 8000 125 sec s = ↔ = = µ F 10000Hz T 1/10000 100 sec s = ↔ = = µ F 16000Hz T 1/16000 62.5 sec s = ↔ = = µ F 20000Hz T 1/ 20000 50 sec s 84

  53. The Sampling Theorem If a signal x a ( t ) has a bandlimited Fourier transform X a ( jΩ ) such that X a ( jΩ ) =0 for Ω ≥ 2πF N , then x a ( t ) can be uniquely reconstructed from equally spaced samples x a ( nT ), - ∞< n <∞, if 1/ T ≥ 2 F N ( F S ≥ 2 F N ) (A-D or C/D converter) 85

  54. Sampling Theorem Equations 86

  55. Sampling Theorem Interpretation 87

  56. Sampling Rates • F N = Nyquist frequency (highest frequency with significant spectral level in signal) • must sample at least twice the Nyquist frequency to prevent aliasing (frequency overlap) – telephone speech (300-3200 Hz) ⇒ F S =6400 Hz – wideband speech (100-7200 Hz) ⇒ F S =14400 Hz – audio signal (50-21000 Hz) ⇒ F S =42000 Hz – AM broadcast (100-7500 Hz) ⇒ F S =15000 Hz • can always sample at rates higher than twice the Nyquist frequency (but that is wasteful of processing) 88

  57. Recovery from Sampled Signal • If 1/ T > 2 F N , the Fourier transform of the sequence of samples is proportional to the Fourier transform of the original signal in the baseband, i.e., π 1 Ω = Ω Ω < j T X e ( ) X ( j ), a T T • can show that the original signal can be recovered from the sampled signal by interpolation using an ideal LPF of bandwidth π /T, i.e.,   π − ∞ sin( ( ) / ) ∑ t nT T =   x t ( ) x nT ( ) π − a a   ( t nT ) / T =−∞ n – digital-to-analog converter 89

  58. Decimation( 抽取 ) and Interpolation( 内插 ) of Sampled Waveforms • CD rate (44.06 kHz) to DAT rate (48 kHz)—media conversion • Wideband (16 kHz) to narrowband speech rates (8kHz, 6.67 kHz)—storage • oversampled to correctly sampled rates--coding 90

  59. Decimation and Interpolation of Sampled Waveforms 91

  60. Decimation • Standard Sampling: begin with digitized signal • can achieve perfect recovery of x a ( t ) from digitized sample under these conditions 92

  61. Decimation • to reduce sampling rate of sampled signal by factor of M ≥ 2 • to compute new signal x d [ n ] with sampling rate = = = F ' 1/ T ' 1/ ( MT ) F / M s s such that x d [ n ]= x a ( nT’ ) with no aliasing • one solution is to downsample x [ n ]= x a ( nT ) by retaining one out of every M samples of x [ n ] , giving x d [ n ]= x [ nM ] 93

  62. Decimation • need F s ’ ≥ 2 F N to avoid aliasing for M =2 • when F s ’ < 2 F N , we get aliasing for M =2 94

  63. Decimation • to decimate by factor of M with no aliasing, need to ensure that the highest frequency in x [ n ] is no greater than F s /(2 M ) • thus we need to filter x [ n ] using an ideal lowpass filter with response  ω < π  1 / M ω =  j H ( e ) d π < ω ≤ π   0 / M • using the appropriate lowpass filter, we can downsample the reuslting lowpass-filtered signal by a factor of M without aliasing 95

  64. Interpolation • assume we have x [ n ]= x a ( nT ) (no aliasing) and we wish to increase the sampling rate by the integer factor of L • we need to compute a new sequence of samples of x a ( t ) with period T ’’= T / L , i.e., x i [ n ]= x a ( nT’’ )= x a ( nT/L ) • It is clear that we can create the signal x i [ n ]= x [ n/L ] for n = 0, ± L , ± 2 L , … but we need to fill in the unknown samples by an interpolation process can readily show that what we want is •  π −  ∞ sin( ( nT '' kT ) / T ) ∑ = = [ ] ( '') ( )   x n x nT x kT π − i a a   ( nT '' kT ) / T =−∞ k • equivalently with T ’’= T / L, x [ n ]= x a ( nT ) , we get  π −  ∞ sin( ( / n L k )) ∑ = = x n [ ] x nT ( '') x k [ ]   π − i a   ( / n L k ) =−∞ k which relates x i [ n ] to x [ n ] directly 96

  65. Interpolation implementing the previous equation by filtering the upsampled sequence • = ± ±  [ / ] 0, , 2 ,... x n L n L L =  x n [ ] u  0 otherwise x u [ n ] has the correct samples for n = 0, ± L , ± 2 L , … , but it has zero-valued • samples in between (from the upsampling operation) The Fourier transform of x u [ n ] is simply • e Ω • Thus is periodic with two periods, namely with period 2π/ L due to j T '' ( ) X u upsampling and 2π due to being a digital signal 97

  66. Interpolation 98

  67. Interpolation • Original signal, x [ n ] , at sampling period, T , is first upsampled to give signal x u [ n ] with sampling period T ’’= T / L • lowpass filter removes images of original spectrum giving x i [ n ]= x a ( nT’’ )= x a ( nT/L ) 99

  68. SR Conversion by Non-Integer Factors • T ’= MT / L ⇒ convert rate by factor of M / L • need to interpolate by L , then decimate by M (why can’t it be done in the reverse order?) – can approximate almost any rate conversion with appropriate values of L and M – for large values of L , or M , or both, can implement in stages, i.e., L =1024, use L 1=32 followed by L 2=32 100

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend