MATLAB Answers

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

조회 수: 23(최근 30일)
Marian Vides 26 Oct 2020
편집: Rik 28 Oct 2020
이 질문에 1명의 참여자가 플래그를 지정함
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

Rik 28 Oct 2020
Restored from Google cache.

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

### 답변(1개)

Star Strider 26 Oct 2020
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)
.

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

### Community Treasure Hunt

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

Start Hunting!

Translated by