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

Consider the analog signal given as: f(t) = 3 + sin(1500t) + sin(4000t) Design a

ID: 2082829 • Letter: C

Question

Consider the analog signal given as: f(t) = 3 + sin(1500t) + sin(4000t) Design a digital filter such that only the frequency component sin(1500t) is passed and the rest are suppressed. Use a chebyshev type 1 filter with 2 dB for the maximum allowable ripple in the passband. Clearly show how you arrived at a proper sampling time, cut of frequencies of the filter, and the order of filter. Plot the magnitude response of the filter as well as the original signal, f(t), and it filtered version using your designed filter. Include the Matlab work (script, not print out of the entire Matlab workspace/command window) with your handout (that is I need a script that I can run to verify your work).

Explanation / Answer

clc;
close all;
clear all;


t = 0:0.01:50;

ft = 3 + sin(1500*t) + sin(4000*t);

FFTft = fft(ft);

figure
plot(abs(FFTft));
title('Magnitude spectrum of original signal');

stopf = [1400 1600];
wstopf = (stopf/4000);

passf = [1450 1550];
wpassf = (passf/4000);

[n,Wp] = ellipord(wpassf,wstopf,2,30)


[b,a]=ellip(n,2,30,passf,'s')

figure
freqz(b,a);

yt = filter(b/a,1,ft);

figure
plot(yt);