Question

ON MATLAB:  ii. Using FIR low-pass filter, remove signal S2, considering fc = 20 Hz as a...

ON MATLAB:  ii. Using FIR low-pass filter, remove signal S2, considering fc = 20 Hz as a cut-off frequency and consider two sets of filter coefficients: 11 and 301. Plot the time and frequency domain of the filtered signal, and comment.

the process x(n) is sum of two signals S1 and S2; mathematically be described as:

?(?) = ?1 + ?2

where ?1 = ?1cos(2??1??? ) and ?2 = ?2cos(2??2??? ),

A1 = A2 = 1; f1 = 10Hz; f2 = 50; fs =0.5 kHz (sampling frequency).

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Script:

fc=20;fs=500;
%For N=301
N=301
wc=2*fc/fs
h=fir1(N-1,wc)


%input
n=0:1:N-1
s1=cos(2*pi*10*n/fs)
s2=cos(2*pi*50*n/fs)
x=s1+s2
f=[-fs/2:fs/N:fs/2-fs/N];
subplot(211)
plot(f,fftshift(abs(fft(x))),'m');grid;
xlim([0,max(f)])
xlabel('f in Hz')
ylabel('|X(f)|')
title('Frequency domain of input')

y=filter(h,1,x)
subplot(212)
plot(f,fftshift(abs(fft(y))),'m');grid;
xlim([0,max(f)])
xlabel('f in Hz')
ylabel('|Y(f)|')
title('Frequency domain of Output')

Conclsuion:

The high frequency component 50 Hz(signal S2) is removed from the signal x(N).

The output spectrum has only one peak at 10 Hz. The 50 Hz peak is not present.

Add a comment
Know the answer?
Add Answer to:
ON MATLAB:  ii. Using FIR low-pass filter, remove signal S2, considering fc = 20 Hz as a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Using the windowing functions discussed in class, design a low-pass FIR filter with a cutoff freq...

    Using the windowing functions discussed in class, design a low-pass FIR filter with a cutoff frequency of 2 kHz, a minimum stop band attenuation of 40 dB, and a transition width of 200Hz. The sampling frequency is 10kHz. 1. Using the windowing functions discussed in class, design a low-pass FIR filter with a cutoff frequency of 2 kHz, a minimum stop band attenuation of 40 dB, and a transition width of 200 Hz. The sampling frequency is 10 kHz 2....

  • design a FIR low-pass filter using the window method in MATLAB. Select an appropriate cutoff frequency...

    design a FIR low-pass filter using the window method in MATLAB. Select an appropriate cutoff frequency (fc) to attenuate the 1 MHz signal

  • using Matlab: 1) Design an FIR notch filter using zero placement to remove power-line noise at...

    using Matlab: 1) Design an FIR notch filter using zero placement to remove power-line noise at 60 Hz (use file ecg_60hz_200, fs = 200 Hz). 2) Design a LP Butterworth filter with cut-off frequency of 40 Hz to remove high-frequency noise (use file ecg_hfn.dat, fs = 1000 Hz). 3) Design an Elliptic HP filter with passband ripple of 0.01 dB and stopband attenuation of 50 dB and cut-off frequency of 0.5 Hz to remove low-frequency noise (use file ecg_lfn.dat, fs...

  • Below is the MATLAB code of low-cut shelving filter which can cut the low frequency of given music signal and low-boost...

    Below is the MATLAB code of low-cut shelving filter which can cut the low frequency of given music signal and low-boost shelving filter which can boost the low frequency of given music signal. Design your low-boost shelving filter and low-cut shelving filter to have noticeablly different sound. Compare the sounds of two music signals after filtering, and explain the difference in sounds briefly. If there are any mistakes in code, correct them.   Low-cut shelving filter code: close all, clear all,...

  • Using filterDesigner in MATLAB, design a second order low pass IIR Butterworth filter whose sampling frequency...

    Using filterDesigner in MATLAB, design a second order low pass IIR Butterworth filter whose sampling frequency (Fs) is 1 kHz and cutoff frequency (Fc) is 10 Hz. Find the numerator and denominator coefficients. Write its transfer function H(z) = Y(z) / X(z). Write its difference function y(k). Draw (copy from Filter Designer) the magnitude response plot. Draw (copy from Filter Designer) the phase response plot. Draw (copy from Filter Designer) the impulse response plot.

  • MUST BE IN MATLAB Design a low pass filter for this signal. Set the pass band...

    MUST BE IN MATLAB Design a low pass filter for this signal. Set the pass band frequency to 4.9 GHz and the stop band frequency to 5.6 GHz. Allow for 1 dB of attenuation in the pass band and require at least 20 dB of attenuation in the stop band. a. First design a Butterworth filter. Use the command buttord() to determine the order and the normalizing frequency for the filter. Use [Num,Den]=butter() to determine the numerator and denominator coefficients...

  • Using filterDesigner in MATLAB, design a second order low pass IIR Butterworth filter whose sampling frequency (Fs) is 1...

    Using filterDesigner in MATLAB, design a second order low pass IIR Butterworth filter whose sampling frequency (Fs) is 1 kHz and cutoff frequency (Fc) is 10 Hz. Find the numerator and denominator coefficients. Write its transfer function H(z) = Y(z) / X(z). Write its difference function y(k). Draw (copy from Filter Designer) the magnitude response plot. Draw (copy from Filter Designer) the phase response plot. Draw (copy from Filter Designer) the impulse response plot.

  • A 250Hz continuous time signal is sampled at Fs = 700Hz and then filtered by the FIR filter with ...

    A 250Hz continuous time signal is sampled at Fs = 700Hz and then filtered by the FIR filter with impulse response h [ n ] = [ 1 3 − 2 − 4 ] . What is the magnitude of the gain imparted by the filter at that frequency? Your answer should have one decimal place of accuracy.

  • NB! This task is required to be solved in matlab. this task also requires the use...

    NB! This task is required to be solved in matlab. this task also requires the use of the function displayDualSpectrum(); which i have pasted in the bottom. the tasks that i need help with are A), B) and C). this is a multi-part question. Task - Frequency mixing We use a basic signal that can be described mathematically as follows: with this We shall then make an amplitude modulated signal: where fc is the carrier frequency. the code below specifies...

  • 1. Design a custom FIR band-pass filter using the Fourier series and the Hanning window. The...

    1. Design a custom FIR band-pass filter using the Fourier series and the Hanning window. The filter should be of order 8. We need to pass the signal in two audio bands 400-1600Hz and 4000-8000Hz and attenuate it elsewhere. The sampling frequency is 20 kHz. a) Calculate with pencil and paper the impulse response of the filter and the numerical values of the coefficients.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT