0% found this document useful (0 votes)
48 views3 pages

Signals, Spectra & Signal Processing IIR (Infinite Impulse Response) Filters Chebyshev Filter Response Type 1

The document discusses different types of IIR filters including low pass, high pass, band pass, and band stop Chebyshev filters. It provides MATLAB code to generate signals, apply the filters, and plot the frequency response and bode plots. Specifically, it generates 3 sinusoidal signals, applies various Chebyshev filters to filter the signals, and plots the frequency content of the original and filtered signals as well as bode plots of the different filters.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views3 pages

Signals, Spectra & Signal Processing IIR (Infinite Impulse Response) Filters Chebyshev Filter Response Type 1

The document discusses different types of IIR filters including low pass, high pass, band pass, and band stop Chebyshev filters. It provides MATLAB code to generate signals, apply the filters, and plot the frequency response and bode plots. Specifically, it generates 3 sinusoidal signals, applies various Chebyshev filters to filter the signals, and plots the frequency content of the original and filtered signals as well as bode plots of the different filters.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Signals, Spectra & Signal Processing

IIR (Infinite Impulse Response) Filters


Chebyshev Filter Response Type 1

M agnitude (dB )

-100
-200

%Low Pass IIR Filter (Chebyshev Filter Response Type 1)

-300
-400

% Frequency Content of the Given Signals


Fs = 100;
t= (1:1/100:150);
S1 = 5*sin(2*pi*25*t);
S2 = 5*sin(2*pi*15*t);
S3 = 5*sin(2*pi*35*t);
s = S1+S2+S3;
a2 = fft(s,512);
w=(0:255)/256*(Fs/2);
figure(1), plot(w,abs([a2(1:256)'])),grid on
xlabel('Frequency(Hz)'), ylabel('Amplitude')
title('Frequency Content of the Signal')

A m plitude

40

45

50

10

15

20
25
30
Frequency (Hz)

35

40

45

50

40

45

50

Frequency Content of the Filtered Signal

P has e (degrees )

0.7

A m plitude

0.6
0.5
0.4
0.3
0.2
0.1
0

200

40

45

10

15

20
25
30
Frequency(Hz)

35

% Frequency Content of the Given Signals


Fs = 100;
t= (1:1/100:150);
S1 = 5*sin(2*pi*25*t);
S2 = 5*sin(2*pi*15*t);
S3 = 5*sin(2*pi*35*t);
s = S1+S2+S3;
a2 = fft(s,512);
w=(0:255)/256*(Fs/2);
figure(1), plot(w,abs([a2(1:256)'])),grid on
xlabel('Frequency(Hz)'), ylabel('Amplitude')
title('Frequency Content of the Signal')

400

35

% High Pass IIR Filter(Chebyshev Filter Response Type 1)

600

20
25
30
Frequency(Hz)

35

0.8

800

15

20
25
30
Frequency (Hz)

0.9

1000

10

15

1200

10

-500

-1500

Frequency Content of the Signal

-1000

%Frequency Content of the Filtered Signal


y = filter(b,a,s);
aa = fft(y,512);
w = (0:255)/256*(Fs/2);
figure(3), plot(w,abs([aa(1:256)'])), grid on
xlabel('Frequency(Hz)'), ylabel('Amplitude')
title('Frequency Content of the Filtered Signal')

%Bode Plot
% n is the order
% wn is the cutoff freq(normalized)
n =15;
wn = 20/(Fs/2);
b = cheby1(n,0.5,wn,'low');
a =1;
% constant
figure(2), freqz(b,a,1024,Fs), grid on,
title('Bode Plot')

1400

Bode Plot

50

%Bode Plot
% n is the order
% wn is the cutoff freq(normalized)
n =10;
wn = 20/(Fs/2);
b = cheby1(n,0.5,wn,'high');
a =1;
% constant
figure(2), freqz(b,a,1024,Fs), grid on,
title('Bode Plot')
%Frequency Content of the Filtered Signal
y = filter(b,a,s);
aa = fft(y,512);
w=(0:255)/256*(Fs/2);
figure(3), plot(w,abs([aa(1:256)'])), grid on
xlabel('Frequency(Hz)'), ylabel('Amplitude')
title('Frequency Content of the Filtered Signal')

Frequency Content of the Signal

1400

%Bode Plot
% n is the order
% wn is the cutoff freq(normalized)
n =20;
wn = [20 30]/(Fs/2);
b = cheby1(n,0.5,wn);
a =1;
% constant
figure(2), freqz(b,a,1024,Fs), grid on,
title('Bode Plot')

1200
1000

A m plitude

800
600
400
200
0

10

15

20
25
30
Frequency(Hz)

35

40

45

50

Bode Plot

100

M agnitude (dB )

-100
-200
-300
-400

10

15

20
25
30
Frequency (Hz)

35

40

45

%Frequency Content of the Filtered Signal


y = filter(b,a,s);
aa = fft(y,512);
w=(0:255)/256*(Fs/2);
figure(3), plot(w,abs([aa(1:256)'])), grid on
xlabel('Frequency(Hz)'), ylabel('Amplitude')
title('Frequency Content of the Filtered Signal')
Frequency Content of the Signal

1400

50

200

1200

P has e (degrees )

0
1000

-400
-600
-800

10

15

20
25
30
Frequency (Hz)

35

40

45

50

800

A m plitude

-200

600
400

Frequency Content of the Filtered Signal

900

200

800

700

10

15

600

A m plitude

40

45

50

M agnitude (dB )

-200

400

-300

300

-400
-500

200

-600

100
5

10

15

20
25
30
Frequency(Hz)

35

40

45

% Band Pass IIR Filter(Chebyshev Filter Response Type 1)


% Frequency Content of the Given Signals
Fs = 100;
t= (1:1/100:150);
S1 = 5*sin(2*pi*25*t);
S2 = 5*sin(2*pi*15*t);
S3 = 5*sin(2*pi*35*t);
s = S1+S2+S3;
a2 = fft(s,512);
w=(0:255)/256*(Fs/2);
figure(1), plot(w,abs([a2(1:256)'])),grid on
xlabel('Frequency(Hz)'), ylabel('Amplitude')
title('Frequency Content of the Signal')

10

15

20
25
30
Frequency (Hz)

35

40

45

50

10

15

20
25
30
Frequency (Hz)

35

40

45

50

40

45

50

50

P has e (degrees )

-500

-1000
-1500

-7

Frequency Content of the Filtered Signal

x 10

4.5
4
3.5

A m plitude

35

Bode Plot

-100

500

20
25
30
Frequency(Hz)

2.5
2

1.5
1
0.5
0

10

15

20
25
30
Frequency(Hz)

35

% Band Stop IIR Filter (Chebyshev Filter Response Type 1)


M agnitude (dB )

% Frequency Content of the Given Signals


Fs = 100;
t= (1:1/100:150);
S1 = 5*sin(2*pi*25*t);
S2 = 5*sin(2*pi*15*t);
S3 = 5*sin(2*pi*35*t);
s = S1+S2+S3;
a2 = fft(s,512);
w=(0:255)/256*(Fs/2);
figure(1), plot(w,abs([a2(1:256)'])),grid on
xlabel('Frequency(Hz)'), ylabel('Amplitude')
title('Frequency Content of the Signal')

-150

A m plitude

35

40

45

50

10

15

20
25
30
Frequency (Hz)

35

40

45

50

40

45

50

Frequency Content of the Filtered Signal

1000
900
800

A m plitude

700
600
500
400
300
200
100
0

600
400
200

20
25
30
Frequency(Hz)

20
25
30
Frequency (Hz)

P has e (degrees )

-400

800

15

15

-300

1000

10

10

-200

1200

Frequency Content of the Signal

-100

%Frequency Content of the Filtered Signal


y = filter(b,a,s);
aa = fft(y,512);
w=(0:255)/256*(Fs/2);
figure(3), plot(w,abs([aa(1:256)'])), grid on
xlabel('Frequency(Hz)'), ylabel('Amplitude')
title('Frequency Content of the Filtered Signal')

0
-50

-100

%Bode Plot
% n is the order
% wn is the cutoff freq(normalized)
n =3;
wn = [20 30]/(Fs/2);
b = cheby1(n,0.5,wn,'stop');
a =1;
% constant
figure(2), freqz(b,a,1024,Fs), grid on,
title('Bode Plot')

1400

Bode Plot

50

35

40

45

50

10

15

20
25
30
Frequency(Hz)

35

You might also like