Question #203171

raw the filter of the equation x(t) given below. Design the filter using a Butterworth filter. Verify the filter design and adjust n as needed. - Test the filter and explain what you get? x(t) = 3 sin(51130t)+ 15cos(61250t)

Expert's answer

**Script:**

clc;close all;clear all;

%plot x(t)

t=0:2*(10^(-4)):0.05;

x=(cos(2*pi*100*t))+(cos(2*pi*500*t));

figure;

subplot(311)

plot(t,x);xlabel('t');ylabel('y(t)');;grid;

title('Input x(t) ')

%design Butterworth Lpf for N=20

[b,a]=butter(20,2*pi*300,'s');

Hsys=tf(b,a);

%Magntiude response of butterworth lpf

w=2*pi.*(0:800);

H=freqs(b,a,w);

subplot(312)

plot([0:800],abs(H));grid;

xlabel('f in Hz');ylabel('|H|')

title('Magntitude response of butterworth LPF for N=20')

%filtering

y=lsim(Hsys,x,t);

subplot(313)

plot(t,y);grid;

xlabel('t');ylabel('y(t)');

title('Output y(t) after filtering')

**Observation:**

The output y(t) has only one frequency component f=1/0.01s=100hz. The high-frequency component is not available at the output.

Learn more about our help with Assignments: Electrical Engineering

## Comments

## Leave a comment