Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
M agnitude (dB )
-100
-200
-300
-400
A m plitude
40
45
50
10
15
20
25
30
Frequency (Hz)
35
40
45
50
40
45
50
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
400
35
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
-1000
%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')
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
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
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
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
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
-150
A m plitude
35
40
45
50
10
15
20
25
30
Frequency (Hz)
35
40
45
50
40
45
50
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
-100
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