1、DSP实验答案Solutionlab5精Name :Section :Laboratory Exercise 5LINEAR, TIME-INVARIANT DISCRETE-TIME SYSTEMS: FREQUENCY-DOMAIN REPRESENTATIONS5.1 TRANSFER FUNCTION AND FREQUENCY RESPONSEProject 5.1 Transfer Function AnalysisAnswers:Q5.2The plot of the frequency response of the causal LTI discrete-time syste
2、m of Question Q5.2 obtained using the modified program is given below: The type of filter represented by this transfer function is - BF5.2 TYPES OF TRANSFER FUNCTIONSProject 5.2 FiltersAccording to Programme P4_1.Answers:Q5.8The required modifications to Program P4_1 to compute and plot the impulse
3、response of the FIR lowpass filter of Project 4.2 with a length of 20 and a cutoff frequency of c = 0.45are as indicated below:clf;fc = 0.45;n = -10:1:10;y = 2*fc*sinc(2*fc*n;k = n+10;stem(k,y;title(N = 20;axis(0 20 -0.2 0.6;xlabel(Time index n;ylabel(Amplitude;grid;The plot generated by running the
4、 modified program is given below: Q5.20 The plots of the impulse responses of the four FIR filters generated by running Program P4_3 are given below : From the plots we make the following observations:Filter #1 is of length _9_ with a _ symmetrical_ impulse response and is therefore a Type _1_ linea
5、r-phase FIR filter.Filter #2 is of length _10_ with a _ antisymmetric _ impulse response and is therefore a Type _2_ linear-phase FIR filter.Filter #3 is of length _9_ with a _ symmetrical _ impulse response and is therefore a Type _3_ linear-phase FIR filter.Filter #4 is of length _10_ with a _ ant
6、isymmetric _ impulse response and is therefore a Type _4_ linear-phase FIR filter.From the zeros of these filters generated by Program P4_3 we observe that:Filter #1 has zeros at z = 2.3273 + 2.0140i 2.3273 - 2.0140i-1.2659 + 2.0135i -1.2659 - 2.0135i-0.2238 + 0.3559i -0.2238 - 0.3559i0.2457 + 0.212
7、6i 0.2457 - 0.2126iFilter #2 has zeros at z = 2.5270 + 2.0392i 2.5270 - 2.0392i-1.0101 + 2.1930i -1.0101 - 2.1930i-1.0000-0.1733 + 0.3762i -0.1733 - 0.3762i0.2397 + 0.1934i 0.2397 - 0.1934iFilter #3 has zeros at z = -1.0000 0.2602 + 1.2263i0.2602 - 1.2263i 1.00000.6576 + 0.7534i 0.6576 - 0.7534i0.16
8、55 + 0.7803i 0.1655 - 0.7803iFilter #4 has zeros at z = 2.0841 + 2.0565i 2.0841 - 2.0565i-1.5032 + 1.9960i -1.5032 - 1.9960i1.0000-0.2408 + 0.3197i -0.2408 - 0.3197i0.2431 + 0.2399i 0.2431 - 0.2399iPlots of the phase response of each of these filters obtained using MATLAB are shown below :From these
9、 plots we conclude that each of these filters have _ linear _ phase .The group delay of Filter # 1 is - 4The group delay of Filter # 2 is 4.5The group delay of Filter # 3 is - 4The group delay of Filter # 4 is 4.55.3 STABILITY TESTAccording to Programme P4_4.Answers:Q5.23 The pole-zero plots of H1(z
10、 and H2(z obtained using zplane are shown below: From the above pole-zero plots we observe that -Q5.24 Using Program P4_4 we tested the stability of H1(z and arrive at the following stability test parameters ki : -0.9989 0.8500From these parameters we conclude that H1(z is _stable_ .Using Program P4
11、_4 we tested the stability of H2(z and arrive at the following stability test parameters ki : -1.0005 0.8500From these parameters we conclude that H2(z is _unstable_ . 5.4spectrogramsBackground: A spectrogram of a time signal is a two-dimension representation that displays time in its horizontal axi
12、s and frequency in its vertical axis. A gray scale is typically used to indicate the energy at each point. “white”: low energy, “black”: high energy.Tasks:Produce a spectrogram in Matlab and then compare it with specgram.m in Matlab toassure what you did is right.Outline:To produce a spectrogram, yo
13、u will need to assemble many individual spectral slices - produced via the Fourier transform - from successive segments of a speech signal. Thebasic operations required are loading a speech signal selecting individual time segments of the speech signal using the FFT to transform from the time domain
14、 to the frequency domain extracting the log magnitude spectrum assembling the sequence of spectra into a 2D time-frequency matrix displaying the matrix as an imageYou will learn how to write MATLAB scripts and functions to produce spectrograms from signals. You will also use MATLABs plotting facilit
15、ies to display signals as a means of checking that your code is doing the right thing.Q 5.25a. Load the supplied speech signal into MATLAB using the command:y,fs,nbits = wavread(oilyrag.wav;b. Design a programme to divide this speech into several frames, and compare it with thecommand buffer.x=wavre
16、ad(oilyrag.wav;%调用自己的分帧函数w=256;ov=128;y=fenzhen(x,w,ov;%调用 matlab 的分帧函数z=buffer(x,w,ov;function y=fenzhen(x,w,ov%=分帧函数if (size(x,1 size(x,2x = x;s = length(x;if nargin 2w = 256;endif nargin 3ov = w/2;endh=w-ov;c=1;ncols=1+fix(s-w/h;d=zeros(w,ncols;for b=0:h:(s-wd(:,c=x(b+1:(b+w;c=c+1;endy=d;c. Desig
17、n a programme to synthesize the framed speech to a section of speech. function y=hecheng(x,ov%=合成语音framleng framnum = size(x;if nargin size(x,2 x = x; end s = length(x; if nargin 2 sr = 1; end if nargin 3 w = 256; end if nargin 4 ov = w/2; end h=w-ov; win=hanning(w; c=1; ncols=1+fix(s-w/h; d=zeros(1
18、+w/2,ncols; for b=0:h:(s-w u=win.*x(b+1:(b+w; t=fft(u; % d(:,c=t(1:(1+w/2; c=c+1; end tt=0:h:(s-w/sr; ff=0:(w/2*sr/w; if nargout 1 axis xy xlabel(Time/s; ylabel(Frequency/Hz ; else y = d; imagesc(tt,ff,20*log10(abs(d; axis xy xlabel(Time/s; ylabel(Frequency/Hz end imagesc(tt,ff,20*log10(abs(d; Date: Signature:
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1