How do I convert a transfer function of a low pass filter to bandpass?

조회 수: 11 (최근 30일)
Marian Vides
Marian Vides 2020년 10월 26일
편집: Rik 2020년 10월 28일
I obtained the transfer function like this:
syms s;
N=4;
for k=1:N
w=((2*k+N-1)/(2*N))*pi;
Skr(k) = cos(w);
Ski(k) = sin(w);
end
Sk=complex(Skr,Ski);
Sknum=prod(-Sk)
Skdem=(poly(Sk))
Hs=tf(Sknum, Skdem)
And now I need to replace s for the expression Op*(s^2+ Oi*Os)/s*BW, in where BW is the bandwith (Os- Oi)
I need help to find the new transfer function for the bandpass filter and to plot it like this:
%freqs(Sknum, Skdem);
%[Hs,w]=freqs(Sknum, Skdem);
%figure,
%plot(w, 20*log10(abs(Hs)))
Thanks!

답변 (1개)

Star Strider
Star Strider 2020년 10월 26일
If you want to use the Signal Processing Toolbox functions, this works:
syms s;
N=4;
for k=1:N
w=((2*k+N-1)/(2*N))*pi;
Skr(k) = cos(w);
Ski(k) = sin(w);
end
Sk=complex(Skr,Ski);
Sknum=prod(-Sk)
Skdem=(poly(Sk))
Hs=tf(Sknum, Skdem)
figure
bode(Hs)
Hs_ss = ss(Hs);
Wo = 25; % Centre Frequency
Bw = 10; % Bandwidth
[At,Bt,Ct,Dt] = lp2bp(Hs_ss.A, Hs_ss.B, Hs_ss.C, Hs_ss.D, Wo, Bw);
Hs_ss_bp = ss(At,Bt,Ct,Dt);
figure
bode(Hs_ss_bp)
.

카테고리

Help CenterFile Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by