ECE 431 Digital Signal Processing Lecture Notes

3y ago
64 Views
13 Downloads
2.54 MB
107 Pages
Last View : 2d ago
Last Download : 3m ago
Upload by : Rosa Marty
Transcription

ECE 431Digital Signal ProcessingLecture NotesProf. Dan CobbContents1 Introduction22 Review of the DT Fourier Transform2.1 De nition and Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.2 Periodic Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.3 Fourier Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33793 Sampling3.1 Time and Frequency Domain Analysis3.2 Aliasing . . . . . . . . . . . . . . . . .3.3 The Nyquist Theorem . . . . . . . . .3.4 Anti-Aliasing Filters . . . . . . . . . .3.5 Downsampling . . . . . . . . . . . . . .3.6 Upsampling . . . . . . . . . . . . . . .3.7 Change of Sampling Frequency . . . .12121314151618204 CT4.14.24.34.44.5Signal ReconstructionHybrid Systems . . . . . . .Ideal Signal ReconstructionThe Zero-Order Hold . . . .A/D and D/A Converters .Digital Filters . . . . . . . .2121252731335 The5.15.25.35.4Discrete Fourier TransformDe nition and Properties . . . . . .Circular Operations . . . . . . . . .Fast Fourier Transform AlgorithmsZero-Padding . . . . . . . . . . . .34343738416 Applications of the DFT6.1 Spectral Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.2 Linear Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.3 Windowing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41414245.1.

7 The7.17.27.3z-TransformThe CT Laplace Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .The DT Laplace Transform and the z-Transform . . . . . . . . . . . . . . . . . . . .Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .525253568 DT8.18.28.38.48.58.68.78.8Systems and the ZTLTI Systems . . . . . . . . . . . . . . . . . . . .Di erence Equations . . . . . . . . . . . . . . .Rational Transfer Functions . . . . . . . . . . .Poles and Zeros . . . . . . . . . . . . . . . . . .Partial Fraction Expansion . . . . . . . . . . . .Causality and Stability of Di erence EquationsChoice of Initial Conditions . . . . . . . . . . .Zeroth-Order Di erence Equations . . . . . . .5757596364656870729 Analog Filter Design9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . .9.2 The Butterworth Filter . . . . . . . . . . . . . . . . . . . . .9.3 The Chebyshev Filter . . . . . . . . . . . . . . . . . . . . . .9.4 Causality . . . . . . . . . . . . . . . . . . . . . . . . . . . .9.5 Frequency Scaling, Highpass, and Bandpass Transformations9.6 Zero Phase Filters . . . . . . . . . . . . . . . . . . . . . . . .9.7 Phase Delay, Linear Phase, and Phase Distortion . . . . . .7373737577788284FiltersConversion of CT to DT Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Recursive Structures for Causal IIR Filters . . . . . . . . . . . . . . . . . . . . . . .The Anti-Causal Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8787929610 IIR10.110.210.311 FIR Filters11.1 Causal FIR Filters . . . . . . . . . .11.2 Zero-Phase FIR Filters . . . . . . . .11.3 Choice of Window Length . . . . . .11.4 Linear Phase FIR Filters . . . . . . .11.5 Di erence Equation Implementation .11.6 DFT Implementation . . . . . . . . .1.989899101104105107IntroductionDigital Signal Processing (DSP) is the application of a digital computer to modify an analog ordigital signal. Typically, the signal being processed is either temporal, spatial, or both. For example,an audio signal is temporal, while an image is spatial. A movie is both temporal and spatial. Theanalysis of temporal signals makes heavy use of the Fourier transform in one time variable and onefrequency variable. Spatial signals require two independent variables. Analysis of such signals relieson the Fourier transform in two frequency variables (e.g. ECE 533). In ECE 431, we will restrictourselves to temporal signal processing.2

Our main goal is to be able to design digital LTI lters. Such lters are using widely in applications such as audio entertainment systems, telecommunication and other kinds of communicationsystems, radar, video enhancement, and biomedical engineering. The rst half of the course willbe spent reviewing and developing the fundamentals necessary to understand the design of digital lters. Then we will examine the basic types of lters and the myriad of design issues surroundingthem.From the outset, the student should recognize that there are two distinct classes of applicationsfor digital lters. Real-time applications are those where data streams into the lter and mustbe processed immediately. A signi cant delay in generating the lter output data cannot betolerated. Such applications include communication networks of all sorts, musical performance,public address systems, and patient monitoring. Real-time ltering is sometimes called on-lineprocessing and is based on the theory of causal systems.Non-real-time applications are those where a lter is used to process a pre-existing (i.e. stored) le of data. In this case, the engineer is typically allotted a large amount of time over which theprocessing of data may be performed. Such applications include audio recording and mastering,image processing, and the analysis of seismic data. Non-real-time ltering is sometimes calledo -line processing and is based on the theory of noncausal systems. In these applications, thefact that noncausal lters may be employed opens the door to a much wider range of lters andcommensurately better results. For example, one problem typical of real-time ltering is phasedistortion, which we will study in detail in this course. Phase distortion can be eliminated completelyif noncausal lters are permitted.The rst part of the course will consist of review material from signals and systems. Throughoutthe course, we will rely heavily on the theory of Fourier transforms, since much of signal processingand lter theory is most easily addressed in the frequency domain. It will be convenient to refer tocommonly used transform concepts by the following acronyms:CTFT: Continuous-Time Fourier TransformDTFT: Discrete-Time Fourier TransformCFS: Continuous-Time Fourier SeriesDFS: Discrete-Time Fourier SeriesLT: Laplace TransformDFT: Discrete Fourier TransformZT: z-TransformAn “I” preceding an acronym indicates “Inverse” as in IDTFT and IDFT. All of these conceptsshould be familiar to the student, except the DFT and ZT, which we will de ne and study in detail.22.1Review of the DT Fourier TransformDe nition and PropertiesThe CT Fourier transform (CTFT) of a CT signal x (t) isZ 1F fx (t)g X (j!) x (t) ej!tdt:1The Inverse CT Fourier Transform (ICTFT) isF1Z1fX (j!)g 2311X (j!) ej!t d!:

Recall the CT unit impulse (t) ; the DT unit impulse [n] ; and their basic properties:Zx (t) (tx (t)(t1(t) dt 1;1[n] 1n 1) x ( ) (t) x (t1X););x [n]x [n] [n[nm] x [m] [nm] x [nm]m](sifting property).For any DT signal x [n] ; we may de ne its DT Fourier transform (DTFT) by associating with x [n]the CT impulse train1Xx (t) x [n] (t n)n 1and taking the transformX (j!) Z1X1x [n] (t1 n 11Xj!nx [n] en 11Xj!nx [n] eZn) e1(tj!tdtn) dt1:n 1Thus we may writeX (j!) 1Xnx [n] ej!;n 1expressing X as a function of ej! : For this reason, the DTFT is normally writtenX ej! 1Xx [n] ej!n:n 1Technically, this is an abuse of notation, since the two X’s are actually di erent functions, butthe meaning will usually be clear from context. In order to help distinguish between CT and DTtransforms, we will henceforth denote the frequency variable in DT transforms as :jX e 1Xx [n] ej n(2.1):n 1Although your text writes frequency as ! for both CT and DT transforms, thenotation hasnumerous advantages. For example, it keeps the units of frequency straight: ! is in rad/sec, whileis in radians.By Euler’s formula,ej cos j sin ;so ej is periodic with fundamental period 2 : Hence, X ejF fx [n]g X ej4has period 2 : We also write

and! X ejx [n]:The Inverse DTFT isF1 x [n] 2j1X eZ2X ejejnd :0The integral may be evaluated over any interval of length 2 :Properties: (See O&S Table 2.1 on p. 55 and Table 2.2 on p. 58.)Periodicity:X ej( 2 ) X ejLinearity:x [n] ! X ejx1 [n] x2 [n] ! X1 ej X2 e jTime Shift:x [n!en0 ]j n0X ejFrequency Shift:ej0n! X ej(x [n]0)Time/Frequency Scaling:nNx0;x(N ) [n] nNan integerelse;! X ejx(N ) [n]Convolution:1Xx1 [n] x2 [n] Nx1 [nm] x2 [m]m 1! X1 ejx1 [n] x2 [n]Multiplication:1!2x1 [n] x2 [n]Time Di erencing:x [n]Accumulation:x [nnX1]2X1 ej()X2 ej0! 1e1ex [m]!nx [n]dX ej!jdx [n]!Xm 1Frequency Di erentiation:ZX2 ej1jConjugation:5ejjX ejX ejd

Re‡ection:j!X ex [ n]Real Time Signal:X ej\X ejx [n] real ()Even-Odd:x [n] even () X ejx [n] odd () X ejevenoddrealimaginaryParseval’s Theorem:1Xn 1x1 [n] x2 [n] 21Z2X ejejYd0Example 2.1 The DT unit impulse1; n 00; n 6 0[n] has DTFTF f [n]g 1X[n] ej n 1:n 1Example 2.2 The unit impulse train in frequencyX ej1X (2 k)k 1has Inverse DTFT1x [n] 2Z1X20k 11 Z 21 X 2 k 1 01 Z 21 X 2 k 1 0ButZ(2 k) ej2(2 k) d :2 k) d 0sox [n] and1!21Xk 162 k) ej(2(!d1; k 0;0; k 6 012(knn2 k) :d

Example 2.3 De ne the DT rectangular window1;n0; elsewN [n] N1:The DTFT isjWN e 1XwN [n] ej nn 1 NX1n 0NX1j nejenn 0 1 e jN1 e jej2ej 2Nej 2ej(N1)2ej1ej N2ej(N 1)2e(Nej(N1)2j1)2ej 2 e j 2(N 1)sin N2 e j 2 :sin 2The real factor in WN ejis the “periodic sinc” function:Figure 2.1(See O&S Table 2.3 on p. 62 for further examples.)2.2Periodic ConvolutionThe multiplication property involves the periodic convolutionZ 2jjX1 eX2 e X1 ej( ) X2 ej07d :

Since X ej and Y ej both have period 2 ; the linear (i.e. ordinary) convolution blows up(except in trivial cases):Z 11 Z 2 (i 1)Xjj()X1 ej( ) X2 ej dX2 e d X1 e1 i 1 2 i1 Z 2XX1 ej()X2 e jd0i 1 1:On the other hand, the periodic convolution is well-de ned with period 2 :Example 2.4 Consider the square waveX ej1; 00; 2with period 2 : We wish to convolve X ej with itself. We need to look at two cases:1) 0 Z 2Zj()jX eX e d 1d 00Figure 2.22) 2Z2j(X e)X ejd 0Z1d 2Figure 2.3The periodic convolution is the triangle waveX ejX ej ;2with period 2 :80; 2

Periodic convolution may also be de ned for sequences. If x1 [n] and x2 [n] have period N; thenx1 [n] x2 [n] NX1x1 [nm] x2 [m]m 0has period N:2.3Fourier SeriesLet ak be a sequence of complex numbers with period N and02:N Suppose we restrict attention to DT signals whose DTFT’s are impulse trains of the formX ej1X 2ak ((2.2)0 k) :k 1Then1x [n] 2Z 2 ZX ej1X1XZk 1ak ej0 knZ0 k)0 k) ej nd2(0 k) d1; 0 k0; else 0sod:02(nak (k 1Butej00 2x [n] NX1ak ej0 knN1;(2.3):k 0Note thatej0 k(n N ) ej0 kn ej ej0 kn ej2 ej0 kn0 kNk;so ej 0 kn and, therefore, x [n] have period N:Formula (2.3) is the DT Fourier series (DFS) representation of the periodic signal x [n] : The(complex) numbers ak are the Fourier coe cients of x [n] : In this case, we writex [n]! ak :9

Every DT signal x [n] with period N has DTFT (2.2) and DFS (2.3). The Fourier coe cients alsohave period N and may be derived from x [n] via the summationN 11 Xx [n] eN n 0ak j0 kn(2.4):In both the DFS (2.3) and its inverse (2.4), the sum may be taken over any interval of length N:The properties of the DFS are similar to those of the DTFT. (See O&S Table 8.1 on p. 634.)Linearity:x [n] ! akx1 [n] x2 [n] ! ak bkTime-Shift:x [nj!en0 ]0 kn0akFrequency Shiftej0 k0 n! akx [n]k0Time/Frequency Scaling:!x(M ) [n]Convolution:NX1x1 [n1ak (period M N )M! N a k bkm] x2 [m]m 0Multiplication:!x1 [n] x2 [n]Time Di erencing:Accumulation:nXx [n]x [nx [m]!1ejm 11ak i b ii 0! 11]1eNX1j0kej0kak(only for a0 0)akFrequency Di erencing:0n! akx [n]ak1Conjugation:x [n]!akx [ n]!akRe‡ection:Real Time Signal:x [n] real ()jak j even\ak oddEven-Odd:x [n] even () ak realx [n] odd () ak imaginary10

Parseval’s Theorem:N 1NX11 Xx1 [n] x2 [n] ak b kN n 0k 0Many of the properties of the DFS appear to be “mirror images”of one another. This principle iscalled duality and is the result of the similarity of equations (2.3) and (2.4). The same phenomenoncan be seen with regard to transforms of speci c signals.Example 2.5 Find the DTFT and DFS of1Xx [n] [nmN ] :m 1The coe cients areN 111 X X[nak N n 0 m 1ButjmN ] eNX1[n0 kn11 X eN m 1so ak 0 kmN[nn 0!mN ] :1; m 0;0; m 6 0mN ] n 01NjNX1for every k: The DFS isx [n] N 11 X jeN k 00 knand the DTFT isX ej1X 2ak (0 k) 0k 11X(0 k) :k 1Example 2.6 From Example 2.5, the Fourier coe cients corresponding to an impulse train areconstant. Now nd the Fourier coe cients of x [n] 1: By duality, we should get an impulse train.N 11 Xak x [n] eN n 0N 11 Xe N n 0(1; 1 1 (eN1 eButesoak j0kNjj0k0 knnk mNj 0k N)j 0k e; elsej2 k 1;1X1; k mN 0; elsei 111[kiN ] :

33.1SamplingTime and Frequency Domain AnalysisFor any T 0; we may sample a CT signal x (t) to generate the DT signalx [n] x (nT ) :This amounts to evaluating x (t) at uniformly spaced points on the t-axis. The number T is thesampling period,1fs Tis the sampling frequency, and2!s 2 fs Tis the radian sampling frequency. Normally, the units of fs are Hertz or samples/sec. The units of!s are rad/sec. The time interval [nT; (n 1) T ] is called the nth sampling interval. The processof sampling is sometimes depicted as a switch which closes momentarily every T units of time:Figure 3.1A useful expression for the DTFT of x [n] can be obtained by writing x (t) in terms of its inversetransform:Z 11X (j!) ej!t d!x (t) 21x [n] x (nT )Z 11 X (j!) ej!nT d!211 Z (k 1)!sX1 X (j!) ej!nT d!2 k 1 k!s1 Z 21 X 2 k j( 2 k)n X jed2 T k 1 0T!Z 2111 X 2 k X jej n d2 0T k 1TThe analysis shows thatXDT ej 11 XXCTT k 1j 2 kTExpression (3.1) is referred to as the Poisson summation formula.12( !T:2 k)(3.1)

3.2AliasingWe say a CT signal x (t) is bandlimited if there exists !B 1 such that XCT (j!) 0 for j!j !B :Suppose XCT has transform depicted (very roughly) in Figure 3.2. (We use a signal with XCT (0) 1for reference.)Figure 3.2The number !B is the bandwidth of the signal. If x (t) is bandlimited, (3.1) indicates that XDT ejlooks like Figure 3.3Figure 3.3or Figure 3.4.13

Figure 3.4Figure 3.3 is drawn assuming2!B T !B Tor, equivalently,!s 2!B :In this case, (3.1) indicates thatXDT ej XCTjTfor : This establishes the fundamental relationship between the CT and DT frequencyvariables ! and under sampling: !T:(3.2)We will encounter equation (3.2) under a variety of circumstances when sampling is involved.For !s 2!B ; the picture reverts to Figure 3.4. In this case, the shifts of XCT j T overlap– a phenomenon called aliasing. As we will see, aliasing is undesirable in most signal processingapplications. The minimum radian sampling frequency !s 2!B required to avoid aliasing is calledthe Nyquist rate.3.3The Nyquist TheoremConsider the set CT of all CT signals x (t) and the set DT of all DT signals x [n] : For a givensampling period T; the process of sampling may be viewed as a mapping from CT into DT :x (t) 7 ! x [n] x (nT ) :That is, each CT signal generates exactly one DT signal. The following example shows that themapping changes if the sampling period changes.Example 3.1 Let x (t) sin t and T 2 : Thenx [n] sin nOn the other hand, setting T 2( 1)0; n 12; n odd :n evenyieldsx [n] sin (n ) 0:Thus sampling sin t results in di erent signals for di erent T:14

The next example shows that the sampling map may not be 11:Example 3.2 Let x1 (t) sin t and x2 (t) 0: For T ;x1 [n] x2 [n] 0;so the distinct CT signals x1 (t) and x2 (t) map into the same DT signal.Now let !BCT be the set of all CT signals with bandwidth at most !B : In Example 3.2,both x1 (t) and x2 (t) belong to 1 : Yet, they map into the same DT signal for T : In otherwords, the sampling map may not be 1 1 even on !B : Also, note that in Example 3.2,2 2 2!B ;Tso we are sampling at exactly the Nyquist rate. The situation is clari ed by the Nyquist SamplingTheorem:!s Theorem 3.1 The sampling map is 11 on!Bi !s 2!B :The Nyquist theorem states that, if we are given a signal x (t) and we sample at greater thanthe Nyquist rate, then there is no loss of information in replacing x (t) by its samples x [n] : In otherwords, x (t) can be recovered from x [n] : However, if we sample at or below the Nyquist rate, thenknowledge of x [n] is insu cient to determine x (t) uniquely.3.4Anti-Aliasing FiltersIn order to avoid aliasing, we may set the sampling rate !s 2!B : However, in certain applicationsit is desirable to achieve the same end by reducing the bandwidth of x (t) prior to sampling. Thiscan be done by passing x (t) through a CT lter. De ne the ideal CT low-pass lter (LPF) to bethe CT LTI system with transfer function1; j!j 1:0; j!j 1HLP (j!) (3.3)If we pass x (t) through the frequency-scaled lter HLP j !!B ; then X (j!) is “chopped”down tobandwidth !B : An LPF used in this way is called an anti-aliasing lter and must be built fromanalog components.The impulse response of HLP (j!) ishLP (t) F 1 fHLP (j!)gZ 11 HLP (j!) ej!t d!21Z 11 ej!t d!211 ejt e jtj2 tsin t :tLetsinc t 1;sin( t);t15t 0:t 6 0

Figure 3.5We may writehLP (t) 1sinct(3.4)Note that hLP (t) has a couple of unfortunate features:1) hLP (t) 6 0 for t 0; so the ideal LPF is noncausal.2)Z 1Z1 1 sin ( t)jhLP (t)j dt dtt11Z2 1 sin ( t) dtt01 Z2 X n sin ( t) dttn 1 n 1Z12X 1 njsin ( t)j dtn n 1n 1Z12X 1 1 sin ( t) dtn0n 112 X1 2nn 1 1:Hence, the ideal LPF is not BIBO stable.Although an ideal LPF cannot be realized in practice, we will eventually study approximations tothe ideal LPF that can actually be built.3.5DownsamplingLet x [n] be a DT signal and N 0 an integer, and de nexd [n] x [nN ] :16

xd [n] is obtained from x [n] be selecting every N values and discarding the rest. Hence, we mayview downsampling as “sampling a DT signal”. If x [n] was obtained by sampling a CT signal x (t)with period T; thenxd [n] x [nN ] x (nN T )corresponds to sampling x (t) at a lower rate with period N T:Downsampling leads to a version of the Poisson summation formula. This may be derived bymimicking the analysis leading to (3.1), but in DT:Z 21X ej ej n dx [n] 2 0xd [n] x (nN )Z 21 X ej ej nN d2 0N 1Z 21 X N (k 1) X ej ej nN d2 k 0 2N kN 1Z 2 k1 X 2 X ej Nej( 2 k)n d2 N k 0 0!Z 2N 1 2 k1 X1X ej Nej n d 2 0N k 0Xd ejN 11 XX ej N k 0 2 kN( N:2 k)(3.5)Expression (3.5) is analogous to (3.1). They both state that sampling in time corresponds to addingshifts of the original transform. However, unlike sampling a CT signal, downsampling x [n] resultsin a nite sum of shifts of X ej :Suppose x [n] has bandwidth B :Figure 3.6Then xd [n] has spectrum17

Figure 3.7To avoid aliasing, we needNB 2NBor:N BIf x [n] comes from sampling a CT signal x (t) with bandwidth !B ; thenN 3.6!B T B !B T and we need!s:2!BUpsamplingFor any DT signal x [n] ; the Time/Frequency Scaling property of the DTFT states that the expandedsignalx Nn ; Nn an integerx(N ) [n] 0;elsehas DTFTF x(N ) [n] X ejN:This is only one kind of interpolation scheme obtained by setting missing data values to 0: Analternative is to assume that x [n] was ob

Digital Signal Processing (DSP) is the application of a digital computer to modify an analog or digital signal. Typically, the signal beingprocessedis eithertemporal, spatial, orboth. For example, an audio signal is temporal, while an image is spatial. A movie is both temporal and spatial. The

Related Documents:

most of the digital signal processing concepts have benn well developed for a long time, digital signal processing is still a relatively new methodology. Many digital signal processing concepts were derived from the analog signal processing field, so you will find a lot o f similarities between the digital and analog signal processing.

Advanced Digital Signal Processing . techniques for processing detecting, estimating and exploiting signals (communications, electronics, and sensors). – Multirate signal processing, estimation theory, adaptive signal processing . 1965. ISBM: 07-048448-1. ECE 3800 7. ECE 3800 8 Id

Electrical & Computer Engineering Student Affairs Office ece.ucsd.edu . ECE 174. ECE 175A: ECE 175B* Year 4: ECE 171B* ECE 172A* DESIGN. PROF. ELECTIVE: PROF. ELECTIVE. TECH. ELECTIVE: TECH. ELECTIVE. MACHINE LEARNING & CONTROLS DEPTH *Pick one of ECE 171B, 172A or 175B to complete the 4th Depth course requirement.

ECE 429: Audio Electronics ECE 461: Introduction to VLSI ECE 466: RF and Microwave Integrated Circuits ECE 468: Advanced Analog CMOS Circuits and Systems ECE 469: High Speed Integrated Electronics . Computer Design and Computer Engineering Concentration Requirements . ECE 401: Advanced Computer Architecture Two of the following .

11. ECE 6020 Multirate Systems 2 0 0 4 3 12. ECE 6021 Adaptive Signal Processing 2 0 0 4 3 13. ECE 6022 Optical Broadband Access Networks 2 0 0 4 3 14. ECE 6023 RF MEMS 3 0 0 0 3 15. CSE 6051 Information and Network Security 3 0 0 0 3 3. ECE 5011 Advance

A DSP System A/D DSP D/A Analog signal Analog signal Sampled data signal Analog signal Cts-time dst-amp staricase signal Digital signal Digital signal DSP System Antialiasing Filter Sample and Hold Reconstruction Filter A/D: Iconverts a sampled data signal value into a digital number, in part, through quantization of the amplitude

Modulation onto an analog signal m(t) baseband signal or modulating signal fc carrier signal s(t) modulated signal. Chap. 4 Data Encoding 2 1. Digital Data Digital Signals A digital signal is a sequence of discrete, dis

Animal nutrition is gained from grasses, grain crops, and pro-cessed products. Objectives: 1. Explain the functions of feed. 2. Describe the various types of feed. Key Terms: Functions of Feed Feed is any product consumed by an animal to meet nutritional needs. Feed provides the animal with energy to be mobile, protein to grow new or repair damaged cells, and vitamins and minerals to support .