Sunteți pe pagina 1din 5

Simulation:

Filter Order, N=18:


Coding:
'off';,'MATLAB:dispatcher:InexactCaseMatch';
clc;
N=18;
%order
Fs=8000; %low sampling frequency
fcL=800;
%low cutoff frequency
fcH=1600;
%high cutoff frequency
w1=fcL/(Fs/2); %nominal lower cutoff frequency
w2=fcH/(Fs/2); %nominal lower cutoff frequency
Wn = [w1 w2];
[B,A]= CHEBY1(N,0.5,Wn,'bandpass');
% vectors B (numerator) and A (denominator)

[h,f1]=freqz(B,A,100,Fs);
%frequency respond of chebyshev filter
figure(3); subplot(211);plot(f1,abs(h));
title('Graph of Chebyshev Filter Frequency Response, N=18','FontWeight','bold')
xlabel('Frequency, f/Hz','Fontsize',10)
ylabel('Gain, G/dB')
figure(3); subplot(212);plot(f1,unwrap(angle(h)));
title('Graph of Chebyshev Filter Frequency Response, N=18','FontWeight','bold')
xlabel('Frequency, f/Hz','Fontsize',10)
ylabel('Phase, radians')
display('Numerator,B/ Denominator,A');
display([B' A'])

Numerator,B
1.0e-007 *

Denominator,A
1.0e+007 *

-0.0000
0
0.0003
0
-0.0026
0
0.0140
0
-0.0526
0
0.1472
0
-0.3189

0.0000
-0.0000
0.0000
-0.0002
0.0008
-0.0037
0.0133
-0.0414
0.1118
-0.2671
0.5693
-1.0915
1.8940

0
0.5468
0
-0.7518
0
0.8353
0
-0.7518
0
0.5468
0
-0.3189
0
0.1472
0
-0.0526
0
0.0140
0
-0.0026
0
0.0003
0
-0.0000

-2.9888
4.3056
-5.6782
6.8703
-7.6374
7.8072
-7.3410
6.3473
-5.0424
3.6750
-2.4520
1.4934
-0.8272
0.4147
-0.1870
0.0752
-0.0267
0.0083
-0.0022
0.0005
-0.0001
0.0000
-0.0000
0.0000

Filter Order, N=8:


Coding:
'off';,'MATLAB:dispatcher:InexactCaseMatch';
clc;
N=8;
%order
Fs=8000; %low sampling frequency
fcL=800;
%low cutoff frequency
fcH=1600;
%high cutoff frequency
w1=fcL/(Fs/2); %nominal lower cutoff frequency
w2=fcH/(Fs/2); %nominal lower cutoff frequency
Wn = [w1 w2];
[B,A]= CHEBY1(N,0.5,Wn,'bandpass');
% vectors B (numerator) and A (denominator)

[h,f1]=freqz(B,A,100,Fs);
%frequency respond of chebyshev filter
figure(3); subplot(211);plot(f1,abs(h));
title('Graph of Chebyshev Filter Frequency Response, N=8','FontWeight','bold')
xlabel('Frequency, f/Hz','Fontsize',10)
ylabel('Gain, G/dB')
figure(3); subplot(212);plot(f1,unwrap(angle(h)));
title('Graph of Chebyshev Filter Frequency Response, N=8','FontWeight','bold')
xlabel('Frequency, f/Hz','Fontsize',10)
ylabel('Phase, radians')
display('Numerator,B/ Denominator,A');
display([B' A'])

Numerator,B
1.0e-003 *

Denominator,A
1.0e+003 *

0.0016
0
-0.0127
0
0.0443
0
-0.0886
0
0.1108
0
-0.0886
0
0.0443
0
-0.0127

0.0010
-0.0090
0.0422
-0.1335
0.3163
-0.5909
0.8964
-1.1236
1.1746
-1.0269
0.7487
-0.4510
0.2206
-0.0851
0.0245

0
0.0016

-0.0048
0.0005

~The higher order of filter, the larger number of coefficient numerator and
denominator. From the frequency response, higher order of filter cannot achieve a
good passband and sharp transition band. Moreover, the phase response of higher
order becomes non-linear and thus affect the output of filter due to the frequency
delay differently in vary frequency. For lower order, there is existence of ripple within
passband, however, the ripple is smaller enough and thus affect the output
insignificantly. The phase response of lower order is smoother than higher order

TMS320C6713 Implementation:

Graph of Amplitude Vs Frequency


(Band Pass Filter N=8th order)
2.5
2

1.98

Amplitude (Vpp/V)

2
1.5

1.4

1.5
1

0.396

0.5
0.0094 0.0118

0.16

400

Fc = 1600Hz

Fc = 800Hz

0
200

0.158

600

800

1000

1200

1400

1600

1800

2000

Frequency

~ The lower cutoff frequency of bandpass filter, FcL = 800 Hz and the higher cutoff frequency,
FcH = 1600 Hz.

S-ar putea să vă placă și