0% found this document useful (0 votes)
6 views

Pes1ug21ec120 Pdsp Project2 3

The document outlines a project focused on designing IIR Butterworth and Chebyshev Type-1 filters to reduce noise from a signal using Matlab. It details the methods for designing IIR filters, their advantages and disadvantages, and provides code for implementation along with results demonstrating the effectiveness of the filters. The conclusion emphasizes successful noise reduction and compares the order of the filters, noting that a higher order leads to better noise reduction.

Uploaded by

nandanvadeyar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Pes1ug21ec120 Pdsp Project2 3

The document outlines a project focused on designing IIR Butterworth and Chebyshev Type-1 filters to reduce noise from a signal using Matlab. It details the methods for designing IIR filters, their advantages and disadvantages, and provides code for implementation along with results demonstrating the effectiveness of the filters. The conclusion emphasizes successful noise reduction and compares the order of the filters, noting that a higher order leads to better noise reduction.

Uploaded by

nandanvadeyar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Name: - Jeevan R Segu

Semester: - 4
Section: - C
SRN: - PES1UG21EC120

Project-2
Principles of Digital Signal Processing
IIR Butterworth and Chebyshev Type-1 Filter
To reduce noise from a signal.
Problem Statement:
Given a signal with noise design an IIR Butterworth and Chebyshev type-I filter
to reduce noise and implement the same using Matlab.

IIR filter:
The infinite impulse response(IIR) is a type of digital filter that is used in digital
signal processing applications. A filter’s job is to allow certain types of signals
to pass and block the rest. The IIR filter is unique because it uses a feedback
mechanism. It requires current as well as past output data. Though they are
harder to design, IIR filters are computationally efficient and generally cheaper.

Methods to design Infinite Impulse Response Filter:


 Direct Method: - Designing analog filters and then converting them into
digital
 Approximation of Derivatives Method: - Approximating a differential
equation by an equivalent difference equation.
 Impulse Invariance Method: - Simple s-plane to z-plane mapping.
 Bilinear Transformation Method: - An improvement over the impulse
invariance method.
 Approximation of Analog Filters: -Butterworth, Chebyshev analog filters
can be approximated as IIR filters. These analog filters have an infinite
response too.
Advantages of IIR Filters:
 IIR filters are more versatile.
 They are computationally easier to implement.
 They are cheaper too.
 The infinite response of an IIR filter is a cool feature when you are
looking for amplification of signals.
Disadvantages of IIR Filters:
 Practically realizable digital IIR filters do not have a linear phase.
 IIR filters have a higher chance of being unstable.
Code:
clc;
clear;
close all;
t=0:0.01:2*pi;
y=sin(2*pi*1*t)+0.5*sin(2*pi*1.5*t)+0.2*sin(2*pi*3*t);%Signal
Generation
noise = randn(size(t));%Noise generation
y_noisy = y + noise; %Signal and Noise
figure(1);
plot(t,y_noisy,'r');
legend('Noisy signal');
xlabel('Time (s)');
ylabel('Amplitude');
title('Input signal');
rp=1;
rs=45;
fp=1;%Passband frequency
fs=6;%Stopband frequency
fn=50;%Normalized Sampling frequency
fpn=fp/fn;
fsn=fs/fn;
[N,wc]=buttord(fpn,fsn,rp,rs);
[N1,wc1]=cheb1ord(fpn,fsn,rp,rs);
disp('Order of the butterworth filter,N=');
disp(N);
disp('Cutoff freq of butterworth filter,wc=');
disp(wc);
disp('Order of chebyshev type 1 filter,N1=');
disp(N1);
disp('Cutoff freq of chebyshev type 1 filter,wc1=');
disp(wc1);
[b,a]=butter(N,wc);
[b1,a1]=cheby1(N1,rp,wc1);
filter1=filter(b,a,y_noisy);
filter2=filter(b1,a1,y_noisy);
figure(2);
subplot(2,1,1);
plot(t,filter1,'b');
legend('Butterworth');
xlabel('Time (s)');
ylabel('Amplitude');
title('Signal Through Butterworth Filter');
subplot(2,1,2);
plot(t,filter2,'g');
legend('ChebyshevType1');
xlabel('Time (s)');
ylabel('Amplitude');
title('Signal Through ChebyshevType1 Filter');
Transferfunc1=tf(b,a,(1/(fn*2)))
Transferfunc2=tf(b1,a1,(1/(fn*2)))
[H,f]=freqz(b,a,256,(fn*2));
H_mag=20*log10(abs(H));
[H1,f1]=freqz(b1,a1,256,(fn*2));
H_mag1=20*log10(abs(H1));
figure(3);
plot(f,H_mag,'b',f1,H_mag1,'g');
xlabel('Frequency in Hz');
ylabel('Magnitude in dB');
legend('Butterworth Magnitude Response','Chebyshev Type 1
Magnitude Response');
Result:

Input Signal:
Signal through Butterworth and Chebyshev Type-1 Filter:

Magnitude response for both:


Conclusion:
We have successfully removed noise from the signal by designing Butterworth
and Chebyshev type-1 filters.
For the same specifications, the order of Butterworth filter > order of
Chebyshev Type-1 filter.
As the order of the filter increases, the reduction of noise increases, i.e., signal
becomes more stable and noise free.

You might also like