필터 지우기
필터 지우기

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

답변 (2개)

Grégory SEABRA
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
  댓글 수: 1
Sercan Noyan Germiyanoglu
Sercan Noyan Germiyanoglu 2016년 11월 8일
Yes , I am trying to show low filter graph via plot.
So, The code is shown as
clear all;
w=0;
H=0;
wn=0;
wi=0;
for j=1:2000
wi(j)=j;
wn=w;
s=wi*i;
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
Is it right ?

댓글을 달려면 로그인하십시오.


Star Strider
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
  댓글 수: 1
Sercan Noyan Germiyanoglu
Sercan Noyan Germiyanoglu 2016년 11월 9일
Can you say me where I troubleshoot the code to get right Chebyshev Type I filter. Its formula is ok and its equation is solved and I get the right result but I want to get it without solving the algoritm.
Here the code is after solution and I changed the loop's number as 1000 .
wn=0;
w=0;
wi=0;
H=0;
Ha=0;
for w=1:1000
wi(w)=w;
wn=w;
H(w)=(112939)*(696370)*(263360)/((-wn*wn + 229.39*i*wn + 112939)*(-wn*wn + 626.70*i*wn + 696370)*(-wn*wn + 856.08*i*wn + 263360));
Ha(w)=abs(H(w));
plot(wi,Ha);
end
How I do that.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by