Clear Filters
Clear Filters

Chebyshev Low-Pass Filters with 0.1-dB Ripple calculating s value issue

2 views (last 30 days)
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

Answers (2)

Grégory SEABRA
Grégory SEABRA on 8 Nov 2016
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 Comment
Sercan Noyan Germiyanoglu
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 ?

Sign in to comment.


Star Strider
Star Strider on 8 Nov 2016
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 Comment
Sercan Noyan Germiyanoglu
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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!