Digital Sigal Processig, Fall 26 Lecture 1: Itroductio, Discrete-time sigals ad systems Zheg-Hua Ta Departmet of Electroic Systems Aalborg Uiversity, Demark zt@kom.aau.dk 1 Part I: Itroductio Itroductio (Course overview) Discrete-time sigals Discrete-time systems Liear time-ivariat systems 2 1
Geeral iformatio Course website http://kom.aau.dk/~zt/cources/dsp/ Textbook: Oppeheim, A.V., Schafer, R.W, "Discrete-Time Sigal Processig", 2d Editio, Pretice-Hall, 1999. Readigs: Steve W. Smith, The Scietist ad Egieer's Guide to Digital Sigal Processig, Califoria Techical Publishig, 1997. http://www.dspguide.com/pdfbook.htm (You ca dowload the etire book!) Kermit Sigmo, "Matlab Primer", Third Editio, Departmet of Mathematics, Uiversity of Florida. V.K. Igle ad J.G. Proakis, "Digital Sigal Processig usig MATLAB", Bookware Compaio Series, 2. 3 Geeral iformatio Duratio 2 ECTS (1 Lectures) Prerequisites: Backgroud i advaced calculus icludig complex variables, Laplace- ad Fourier trasforms. Course type: Study programme course (SE-course), meaig a writte exam at the ed of the semester! Lecturer: Associate Professor, PhD, Zheg-Hua Ta Niels Jeres Vej 12, A6-319 zt@kom.aau.dk, +45 9635-8686 4 2
Course at a glace MM1 Discrete-time sigals ad systems System MM2 Fourier-domai represetatio Samplig ad recostructio System structures MM5 System aalysis MM6 MM4 Filter z-trasform DFT/FFT Filter structures Filter desig MM3 MM9,MM1 MM7 MM8 5 Course objectives (Part I) To give the studets a comprehesio of the cocepts of discrete-time sigals ad systems To give the studets a comprehesio of the Z- ad the Fourier trasform ad their iverse To give the studets a comprehesio of the relatio betwee digital filters, differece equatios ad system fuctios To give the studets kowledge about the most importat issues i samplig ad recostructio 6 3
Course objectives (Part II) To make the studets able to apply digital filters accordig to kow filter specificatios To provide the kowledge about the priciples behid the discrete Fourier trasform (DFT) ad its fast computatio To make the studets able to apply Fourier aalysis of stochastic sigals usig the DFT To be able to apply the MATLAB program to digital processig problems ad presetatios 7 What is a sigal? A flow of iformatio. (mathematically represeted as) a fuctio of idepedet variables such as time (e.g. speech sigal), positio (e.g. image), etc. A commo covetio is to refer to the idepedet variable as time, although may i fact ot. 8 4
Example sigals Speech: 1-Dimesio sigal as a fuctio of time s(t);. Grey-scale image: 2-Dimesio sigal as a fuctio of space i(x,y) Video: 3 x 3-Dimesio sigal as a fuctio of space ad time {r(x,y,t), g(x,y,t), b(x,y,t)}. 9 Types of sigals The idepedet variable may be either cotiuous or discrete Cotiuous-time sigals Discrete-time sigals are defied at discrete times ad represeted as sequeces of umbers The sigal amplitude may be either cotiuous or discrete Aalog sigals: both time ad amplitude are cotiuous Digital sigals: both are discrete Computers ad other digital devices are restricted to discrete time Sigal processig systems classificatio follows the same lies 1 5
Types of sigals From http://www.ece.rochester.edu/courses/ece446 11 Digital sigal processig Modifyig ad aalyzig iformatio with computers so beig measured as sequeces of umbers. Represetatio, trasformatio ad maipulatio of sigals ad iformatio they cotai 12 6
Typical DSP system compoets Iput lowpass filter to avoid aliasig Aalog to digital coverter (ADC) Computer or DSP processor Digital to aalog coverter (DAC) Output lowpass filter to avoid imagig 13 ADC ad DAC Trasducers e.g. microphoes Aalog-to-digital coverters Physical sigals Aalog sigals Digital sigals Output devices Digital-to-Aalog coverters 14 7
Pros ad cos of DSP Pros Cos Easy to duplicate Stable ad robust: ot varyig with temperature, storage without deterioratio Flexibility ad upgrade: use a geeral computer or microprocessor Limitatios of ADC ad DAC High power cosumptio ad complexity of a DSP implemetatio: usuitable for simple, low-power applicatios Limited to sigals with relatively low badwidths 15 Applicatios of DSP Speech processig Ehacemet oise filterig Codig Text-to-speech (sythesis) Next geeratio TTS @ AT&T Recogitio Image processig Ehacemet, codig, patter recogitio (e.g. OCR) Multimedia processig Media trasmissio, digital TV, video coferecig Commuicatios Biomedical egieerig Navigatio, radar, GPS Cotrol, robotics, machie visio 16 8
History of DSP Prior to 195 s: aalog sigal processig usig electroic circuits or mechaical devices 195 s: computer simulatio before aalog implemetatio, thus cheap to try out 1965: Fast Fourier Trasforms (FFTs) by Cooley ad Tukey make real time DSP possible 198 s: IC techology boostig DSP 17 Part II: Discrete-time sigals Itroductio Discrete-time sigals Discrete-time systems Liear time-ivariat systems 18 9
Discrete-time sigals Sequeces of umbers x = { }, < < where is a iteger Periodic samplig of a aalog sigal = xa ( T ), < < wheret is called the samplig period. ] -1] 1] 2] 19 Sequece operatios The product ad sum of two sequeces ad y[: sample-by-sample productio ad sum, respectively. Multiplicatio of a sequece by a umber α : multiplicatio of each sample value by α. Delay or shift of a sequece y[ = ] where is a iteger 2 1
Basic sequeces Uit sample sequece (discrete-time impulse, impulse), δ[ = 1, Ay sequece ca be represeted as a sum of scaled, delayed impulses = a 3δ[ + 3] + a 2δ[ + 3] +... + a5δ[ 5] More geerally, =, k = x [ = k] δ[ k] 21 Uit step sequece Defied as 1, u[ =,, <, Related to the impulse by Coversely, u[ = δ[ + δ[ 1] + δ[ 2] +... or u[ = k = u[ k] δ[ k] = k = δ[ = u[ u[ 1] δ[ k] 22 11
Expoetial sequeces Extremely importat i represetig ad aalyzig LTI systems. Defied as If A ad are real umbers, the sequece is real. If < α < 1 ad A is positive, the sequece values are positive ad decrease with icreasig. If 1 < α <, the sequece values alterate i sig, but agai decrease i magitude with icreasig. If α > 1, the sequece values icrease with = 2 (.5) icreasig. 23 α = Aα = 2 (.5) = 2 2 Combiig basic sequeces A expoetial sequece that is zero for < Aα,, =, < = Aα u[ 24 12
Siusoidal sequeces x [ = Acos( ω + φ), for all φ with A ad real costats. The Aα with complex α has real ad imagiary parts that are expoetially weighted siusoids. If α = α e = jω ad Aα = A e jφ = A α = A α A = A e α e e j( ω+ φ ) the cos( ω + φ) + jφ, jω j A α si( ω + φ) 25 Complex expoetial sequece Whe α = 1, = A e ( ω + φ ) = A cos( ω + φ) + j A si( ω + φ ) j By aalogy with the cotiuous-time case, the quatity ω is called the frequecy of the complex siusoid or complex expoetial ad φ is call the phase. is always a iteger differeces betwee discrete-time ad cotiuous-time 26 13
A importat differece frequecy rage Cosider a frequecy ( ω + 2π ) j( ω j j j x Ae + 2π ) ω [ ] Ae e 2 π ω = = = Ae ( ω + 2πr ), r More geerally beig a iteger, j( ω r j j Ae + 2π ) ω [ ] = = Ae e 2 Same for siusoidal sequeces πr jω x = Ae = Acos[( ω + 2πr ) + φ] = Acos( ω + φ) 2π So, oly cosider frequecies i a iterval of such as π < ω π or ω < 2π 27 Aother importat differece periodicity I the cotiuous-time case, a siusoidal sigal ad a complex expoetial sigal are both periodic. I the discrete-time case, a periodic sequece is defied as where the period N is ecessarily a iteger. For siusoid, Acos( ω + φ) = x [ = + N], which requires that where k is a iteger. Acos( ω + ω N + φ) ω N = 2πk for all or N = 2πk / ω 28 14
Aother importat differece periodicity Same for complex expoetial sequece jω ( + N ) jω e = e, which is true oly for ω N = 2πk So, complex expoetial ad siusoidal sequeces are ot ecessarily periodic i with period 2π / ω ) ad, depedig o the value of, may ot be periodic at all. Cosider x [ = cos( π / 4), 1 2 ω with a period of N = 8 ( x [ = cos(3π / 8), with a period of N = 16 Icreasig frequecy icreasig period! 29 Aother importat differece frequecy For a cotiuous-time siusoidal sigal x( t) = Acos( Ω t + φ), as Ω icreases, x( t) oscillates more ad more rapidly For the discrete-time siusoidal sigal x [ = Acos( ω + φ), as ω icreases from towards π, oscillates more ad more rapidly as ω icreases from π towards 2π, the oscillatios become slower. 3 15
Frequecy 31 Part II: Discrete-time systems Itroductio Discrete-time sigals Discrete-time systems Liear time-ivariat systems 32 16
Discrete-time systems A trasformatio or operator that maps iput ito output y [ = T{ } T{.} y[ Examples: The ideal delay system y[ = d ], < < A memoryless system 2 y [ = ( ), < < 33 Liear systems A system is liear if ad oly if additivity property T{ x1[ + x2[ } = T{ x1[ } + T{ x2[ } = y1[ + y2[ ad T{ a } = at{ } = ay[ scalig property where a is a arbitrary costat Combied ito superpositio T { ax1[ + bx2[ } = at{ x1[ } + at{ x2[ } = ay1[ + ay2[ Example 2.6, 2.7 pp. 19 34 17
Time-ivariat systems For which a time shift or delay of the iput sequece causes a correspodig shift i the output sequece. x = ] y [ = y[ ] 1[ 1 Example 2.8 pp. 2 35 Causality The output sequece value at the idex = depeds oly o the iput sequece values for <=. Example y d [ = ], < < Causal for d >= Nocausal for d < 36 18
Stability A system is stable i the BIBO sese if ad oly if every bouded iput sequece produces a bouded output sequece. Example 2 y [ = ( ), < < stable 37 Part III: Liear time-ivariat systems Course overview Discrete-time sigals Discrete-time systems Liear time-ivariat systems 38 19
Liear time-ivariat systems Importat due to coveiet represetatios ad sigificat applicatios A liear system is completely characterised by its impulse respose y[ = T{ } = T{ k] δ[ k]} = Time ivariace k = k = k] T{ δ[ k]} = h k k = [ = h[ k] k] h [ k y[ = k] h[ k] k = = * h[ Covolutio sum 39 Formig the sequece h[-k] 4 2
Computatio of the covolutio sum k = y [ = * h[ = k] h[ k] Obtai the sequece h[-k] Reflectig h[k] about the origi to get h[-k] Shiftig the origi of the reflected sequece to k= Multiply k] ad h[-k] for < k < Sum the products to compute the output sample y[ 41 Computig a discrete covolutio Example 2.13 pp.26 Impulse respose 1, N 1, =, otherwise. iput = a u[, <, + 1 1 a y[ =, N 1, 1 a N N + 1 1 a a ( ), N 1<. 1 a 42 h[ = u[ u[ N] 21
Properties of LTI systems Defied by discrete-time covolutio Commutative Liear x [ * h[ = h[ * x [ *( h1[ + h2[ ) = * h1[ + * h2[ Cascade coectio (Fig. 2.11 pp.29) h [ = h1[ * h2[ Parallel coectio (Fig. 2.12 pp.3) h [ = h1[ + h2[ 43 Properties of LTI systems Defied by the impulse respose Stable k = S = h[ k] < Causality h[ =, < 44 22
MATLAB A iteractive, matrix-based system for umeric computatio ad visualizatio Kermit Sigmo, "Matlab Primer", Third Editio, Departmet of Mathematics, Uiversity of Florida. Matlab Help (>> doc) 45 Summary Course overview Discrete-time sigals Discrete-time systems Liear time-ivariat systems Matlab fuctios for the exercises i this lecture are available at http://kom.aau.dk/~zt/cources/dsp_e/mm1/ Thaks Borge Lidberg for providig the fuctios. 46 23