Digital Signal Processing Lab Introduction The Digital Signal Processing Laboratory is an integral and important component of the course.The laboratory has two basic objectives: (1)Reinforce concepts from the lecture. (2)Strengthen your ability to processing signals by using computers. Laboratory Reports There is no specific format required for laboratory reports.Lab reports should contain the following information: m-files. Properly labeled graphs. Simple discussion if applicable. Reports prepared with word processor software is highly recommended(e.g.,Microsoft Word).You don't have to print your lab reports.Send your lab reports to an electronic mail box provided by the TA. Laboratory reports must be turned in by the end of the seventeenth week of this semester. Report Title is ID NAME.docx,ex 517030910123.docx Email to TA:bingxuexuerong @situedu.cn before 2020/1/12 (include 1/12)
Digital Signal Processing Lab Introduction The Digital Signal Processing Laboratory is an integral and important component of the course. The laboratory has two basic objectives: (1) Reinforce concepts from the lecture. (2) Strengthen your ability to processing signals by using computers. Laboratory Reports There is no specific format required for laboratory reports. Lab reports should contain the following information: m-files. Properly labeled graphs. Simple discussion if applicable. Reports prepared with word processor software is highly recommended (e.g., Microsoft Word). You don’t have to print your lab reports. Send your lab reports to an electronic mail box provided by the TA. Laboratory reports must be turned in by the end of the seventeenth week of this semester. Report Title is ID_NAME.docx, ex 517030910123_张三.docx Email to TA: bingxuexuerong@sjtu.edu.cn before 2020/1/12(include 1/12)
Lab 1 Discrete-Time Fourier Transform (DTFT) In this lab,you will investigate the Matlab implementation of the DTFT.You may use the following Matlab functions: zeros(),ones(,exp(),cos(),abs(,angle(,plotO,subplot(),title(,xlabel(,ylabel(),figure(,stem(,eye(), filter(). (1)Generate and plot the discrete-time signal x(n)=0.93”cos(0.14πn+π/3),0≤n≤30 (2)Determine and plot the DTFT of the signal x(n)=0.89[u(n)-u(n-30)] (3)A linear and time-invariant system is described by the difference equation y(n)-0.65y(n-1)+0.35y(n-2)=ax(n)-bx(n-1)+cx(n-2)-dx(n-3)where abcd is equal to the last four digits of your student ID number. (i)Is the system BIBO-stable? (ii)Determine and sketch the impulse response h(n),0sns100,of the system.Determine the stability of the system by observing h(n) (iii)Determine and plot the output of the system y(n),0sn<200,if the input is x(n)=[d+ccos(0.27πn)+dsin(0.77πn]u(n)
Lab 1 Discrete-Time Fourier Transform (DTFT) In this lab, you will investigate the Matlab implementation of the DTFT. You may use the following Matlab functions: zeros(), ones(), exp(), cos(), abs(), angle(), plot(), subplot(), title(), xlabel(), ylabel(), figure(), stem(), eye(), filter(). (1) Generate and plot the discrete-time signal ( ) 0 93 cos 0 14 3 0 30 ( ) n xn . . = πn + ≤≤ π , n (2) Determine and plot the DTFT of the signal ( ) 0 89 ( ) ( 30) n xn . un un = −− (3) A linear and time-invariant system is described by the difference equation y n . y n . y n ax n bx n cx n dx n ( ) − −+ − = − −+ − − − 0 65 1 0 35 2 ( ) ( ) ( ) ( 1 2 3 ) ( ) ( ) where abcd is equal to the last four digits of your student ID number. (i) Is the system BIBO-stable? (ii) Determine and sketch the impulse response hn n ( ), 0 100 ≤ ≤ , of the system. Determine the stability of the system by observing h n( ) . (iii) Determine and plot the output of the system yn n ( ), 0 200 ≤ ≤ , if the input is xn d c . ( ) =+ + cos 0 27 sin 0 77 ( πnd . ) ( πn un ) ( )
Lab 2 Spectral Analysis This lab will use discrete Fourier transform(DFT)to analyze the spectra of signals.You may use the following Matlab functions: sin(),fft(),max(),min(),hold(),randn(),sin(),length(),dft(),exp(). (1)A signal x(t)=cos(2zft)+cos(2),where=50 Hz and =100 Hz,is plagued by a Gaussian white noise g().Suppose that the signal-to-noise ratio is-3 or 0 dB and the sampling rate is 1000 samples/sec.Plot the speetra of and (g(n)=[()( 0≤n≤N-1,N=1024. (2)An analog signal x()=e()is sampled with a sampling rate of=20 kHz.Suppose that the data record length isL20or=100.Determine the 200-point DFT of(=xPlot X(k)
Lab 2 Spectral Analysis This lab will use discrete Fourier transform (DFT) to analyze the spectra of signals. You may use the following Matlab functions: sin(), fft(), max(), min(), hold(), randn(), sin(), length(), dft(), exp(). (1) A signal xt ft ft ( ) cos 2 cos 2 = + ( π π 1 2 ) ( ), where 1f = 50 Hz and 2f =100 Hz , is plagued by a Gaussian white noise g t( ). Suppose that the signal-to-noise ratio is -3 or 0 dB and the sampling rate is 1000 samples/sec sf = . Plot the spectra of / ( ) () s t nT n f xn xt ∆ = = = and [ ] / ( ) ( ) () () s t nT n f xn gn xt gt ∆ = = +=+ , 0 1, 1024 ≤≤ − = nN N . (2) An analog signal () () t a x t e ut − = is sampled with a sampling rate of 20 kHz sf = . Suppose that the data record length is L = 20 or L =100 . Determine the 200-point DFT of / ( ) () s t nT n f xn xt ∆ = = = . Plot X k( )
Lab 3 Digital Filter Design This lab involves the design of FIR and IIR filters.You may use the following Matlab functions: filter(),ones(),zeros(),zp2tf(,ceil(),buttap(),real(),poly(,impulse(),hanning(),hamming(),round(),sin(), freqz(),angle(),abs(). (1)The transfer function of a discrete-time system is 1-az+bz2-cz3+de4 H(9)F1+0.222+0.03722+0.142z9-0.107z-0.013z where abcd is equal to the last four digits of your student's ID number. Determine the impulse response and step response of the system. (2)Plot the magnitude squared frequency response of 5th-,10th-,20th-,and xth-order lowpass Butterworth filter,where mod20 c=your class number I,:the ith digit in your student ID number Ifx happens to be 5 or 10,then let x=2. (3)Design an FIR bandstop filter with the following specifications: Lower transition band:oa=0.4π,oa=0.4dr Upper transition band:=0.6dz,=0.7 Apas =0.c dB,Aop=4d dB Determine and ploth(nm)and|H(eo))
Lab 3 Digital Filter Design This lab involves the design of FIR and IIR filters. You may use the following Matlab functions: filter(), ones(), zeros(), zp2tf(), ceil(), buttap(), real(), poly(), impulse(), hanning(), hamming(), round(), sin(), freqz(), angle(), abs(). (1) The transfer function of a discrete-time system is ( ) 123 4 1 2 34 5 1 1 0.22 0.037 0.142 0.107 0.013 - az bz cz dz H z zz zzz −−− − −− − − −+−+ = ++ + − − where abcd is equal to the last four digits of your student’s ID number. Determine the impulse response and step response of the system. (2) Plot the magnitude squared frequency response of 5th-, 10th-, 20th-, and xth-order lowpass Butterworth filter, where mod 20 your class number : the th digit in your student ID number If happens to be 5 or 10, then let 2. i i i xc I c I i x x = + = = ∑ (3) Design an FIR bandstop filter with the following specifications: Lower transition band: 0.4 , 0.4 Upper transition band: 0.6 , 0.7 0.c dB, 4 dB pa sa sb pb pass stop d d A Ad ω πω π ω πω π = = = = = = Determine and plot h n( ) and ( ) j H e ω