Chebyshev Low-Pass Filters with 0.1-dB Ripple calculating s value issue
조회 수: 2 (최근 30일)
이전 댓글 표시
I have a project to design low-pass filter via Chebyshev. I use 0.1-dB Ripple (ε = 0.15262) value but I don't know how to calculate s value. I use n= 6; (s2 + 0.22939s + 1.12939) (s2 + 0.62670s + 0.69637) (s2 + 0.85608s + 0.26336).
Here my code is below.
clear all;
w=0;
H=0;
wn=0;
wi=0;
for j=1:2000
wi(j)=j;
wn=w;
% calculate s value........
a1=1.12939/(s^2+0.22939*s+1.12939);
a2=0.69637/(s^2+0.62670*s+0.69637);
a3=0.26336/(s^2+0.85608*s+0.26336);
H(j)=abs( a1*a2*a3 );
plot(wi,H);
end
댓글 수: 0
답변 (2개)
Grégory SEABRA
2016년 11월 8일
Are you trying to draw a bode plot?
If so, "s" is an imaginary number which is equal to "w*i" (i being the imaginary unit)
You can thus establish, in your script, that s=wi*1i
Star Strider
2016년 11월 8일
Your design does not produce what I would expect from a Chebyshev Type I filter.
You need to make a few changes to your loop to make it work correctly. I will leave it to you to troubleshoot the filter design:
w=0;
H=0;
wn=0;
wi=0;
for j=1:2000
wi(j)=j;
wn=w;
s=wi(j)*1i; % <— Subscript ‘wi’ Here
s2 = s*conj(s); % <— ‘s’ Is Complex, So Multiply By The Complex Conjugate To Square It
% a1=1.12939/(s^2+0.22939*s+1.12939);
% a2=0.69637/(s^2+0.62670*s+0.69637);
% a3=0.26336/(s^2+0.85608*s+0.26336);
a1=1.12939/(s2+0.22939*s+1.12939);
a2=0.69637/(s2+0.62670*s+0.69637);
a3=0.26336/(s2+0.85608*s+0.26336);
H(j)=abs( a1*a2*a3 );
% plot(wi,H);
end
figure(1)
semilogy(wi,H); % <— Put The Plot Outside The Loop
grid
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!