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

11 次查看(过去 30 天)
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