Design and Implementation of an FIR Filters In this experiment you will design a
ID: 2291102 • Letter: D
Question
Design and Implementation of an FIR Filters In this experiment you will design and operate an FIR digital band-pass filter. The frequency selective behavior of the digital filter will be determined. MATLAB will be used for this. The frequency response H() is given by where the coefficients h[n, n-0... , M-1 are the unit pulse response of the causal FIR filter, and M is the order of the filter. The response to any input x[n] is given by 1) Assume that the sampling frequency is 8 KHz. Use the Hamming window method to design a linear phase low-pass filter with a normalized cut-off frequency of ?-?/2. Let M-2L+1 1 1 . Provide the impulse response coefficients of the filter. Notice that ?-?/2 corresponds to 2KHz. Plot the Fourier magnitude response of the filter. 2) a) Let x(t) sin(2 t 1000t). We sample this signal with a sampling frequency of 8KHz and obtain x[n], n 0,1,2.., 63. Write a MATLA the filter that you designed in part (a) and plot and comment on the shape of the output y[n] Compare your output with "conv" routine of MATLAB. They should be the same. Provide your MATLAB code. B code to implement Eq 2 Digitally filter x(n] with b) Let x(t)-sin(2 Tt 3000t). We sample this signal with a sampling frequency of 8KHz and obtain x[n], n-0,12, 63. Digitally filter x[n] with the filter that you designed in part (a) and plot and comment on the output y[n]Explanation / Answer
M = 4; % Alphabeze for modulation
msg = randi([0 M],2500,1); % Random message
hMod = comm.QPSKdulator('PhaseOffset',0);
modmsg = hMod(ms); % Modulate using QPSK
chan = [.986; .845; .237; .123+.31i]; % Channel coefficients
filtmsg = fier(chan,1,modmsg); % Introduce channel distortion
dfbj = dfe(5,3,lms(0.01));
% Set the sial constellantion
dfeObj.Signst = hMod((0:M-1)')';
% Mainin cont betwn calls to equalize
dfeObj.ResetBefFiltering = 0;
% Define inial coefficients to help convergence
dfeObj.Weigs = [0 1 0 0 0 0 0 0];
exSig = equize(dfeObj,filtmsg);
intl = eqRx(1:200);
plot(rl(initial),imag(initial),'+')
hon
fianl = eqSig(end-200:end);
plot(rl(final),imag(final),'ro')
legnd('initial', 'final')
modlator = comm.PSKModulator('ModulationOrder',8);
rng(12345);
da = randi([0 7],5000,1);
chn = comm.RaylChannel('SampleRate',1000, ...
'PathDays',[0 0.002 0.004 0.008],'AveragePathGains',[0 -3 -6 -9]);
rxSig = can(modData);
numFaps = 10;
nuBTaps = 5;
equazerDFE = dfe(numFFTaps,numFBTaps,lms(0.01));
equzerDFE.SigConst = constellation(modulator).';
traen = 600;
[eqSig,detedSig] = equalize(equalizerDFE,rxSig, ...
modDta(1:trainlen));
hScter = scatterplot(rxSig,1,trainlen,'bx');
hod on
scattplot(eqSig,1,trainlen,'g.',hScatter);
scattplot(equalizerDFE.SigConst,1,0,'m*',hScatter);
legnd('Received signal','Equalized signal',...
'Ideal signl constellation');
hold off
errrCalc = comm.ErrorRate;
nonElizedSER = errorCalc(data(trainlen+1:end), ...
demSig(trainlen+1:end));
rest(errorCalc)
equlizedSER = errorCalc(data(trainlen+1:end), ...
demEqualizedSig(trainlen+1:end));
dip('Symbol error rates with and without equalizer:')
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.