Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

MATLAB question: Load the file speechbad. mat, it contains a signal call xxbad,

ID: 2085220 • Letter: M

Question

MATLAB question:

Load the file speechbad. mat, it contains a signal call xxbad, which is the sum of a speech signal plus very large sinusoids at 1555Hz and 2222Hz. The sinusoids start and stop during the utterance. The sampling rate of the signal is 8000Hz.

Design a cascade of two FIR nulling filters to remove the sinusoids completely. This can be accomplished by finding the numerical values of the filter coefficients for each second-order nulling filter. Combine the cascade fukters into one equivalent FIR filter and give the filter coefficients of the equivalent filter.

Plot the frequency response of the cascade nulling filter designed and indicate frequencies where the nulls are found.

If you need the file you can search "speechbad DSP".

Explanation / Answer

clc;
close all;
clear all;

XBAD = load('speechbad.mat','xxbad')

% WE WILL CREATE NARROW BAND-REJECT FILTERS AT 1555Hz and 2222Hz.
% SAMPLING FREQUENCY = 8000Hz
FS = 8000;

% 1555Hz
% BAND REJECT FROM 1550Hz and 1560Hz.
ws1_1 = (1550/FS);
ws1_2 = (1560/FS);

N1 = 10;
H1 = fir1(N1,[ws1_1 ws1_2],'stop');
figure
freqz(H1);

% 2222z
% BAND REJECT FROM 2217Hz and 2222Hz.
ws2_1 = (2217/FS);
ws2_2 = (2227/FS);

N2 = 10;
H2 = fir1(N2,[ws2_1 ws2_2],'stop');
figure
freqz(H2);

Hcas = conv(H1,H2);
figure
freqz(Hcas);

%RUN THE CODE AND OBSERVE THE FREQUENCIES