필터 지우기
필터 지우기

Plotting the bode plot of a high pass filter using matlab

조회 수: 6 (최근 30일)
Cagin Kaya
Cagin Kaya 2024년 5월 13일
답변: Star Strider 2024년 5월 13일
I am trying to theoretically find the frequency response of the circuit given below:
Firstly i found the impedance value of the RC Ladder by applying the equation below, then i defined this as "Z" in my MatLab Code.
Afterwards i wrote a matlab code to plot the filter's frequency response. Matlab Code is given below, the required nominal values shown in the schematic are defined in the code.
f = logspace(0, 5, 1000);
w=2*pi.*f;
s=1i.*w;
Ro=11960e3;
R1=2.17e3;
R2=118.44e3;
R3=496.82e3;
R4=1220e3;
R5=2530e3;
C1=536.29e-12;
C2=217.23e-12;
C3=201.41e-12;
C4=263.35e-12;
C5=556.27e-12;
Rload=200e3;
Z=((1/Ro)+(R1+(1./(s*C1)))+(R2+(1./(s*C2)))+(R3+(1./(s*C3)))+(R4+(1./(s*C4)))+(R5+(1./(s*C5)))).^-1;
H=abs(Rload./(Z+Rload));
semilogx(f, 20*log10(H))
The LTSpice plot (expected one) is like this:
My Matlab Plot is like this:
My mathematical approach seems correct to me let me know if i have anything missing on that part. I am unsure about the code, please let me know if there is something missing in code or my mathematical approach.

답변 (1개)

Star Strider
Star Strider 2024년 5월 13일
The ‘H’ calculation may be reversed. (I can’t read the axis values on the LTSpice plot image.)
Perhaps this —
f = logspace(0, 5, 1000);
w=2*pi.*f;
s=1i.*w;
Ro=11960e3;
R1=2.17e3;
R2=118.44e3;
R3=496.82e3;
R4=1220e3;
R5=2530e3;
C1=536.29e-12;
C2=217.23e-12;
C3=201.41e-12;
C4=263.35e-12;
C5=556.27e-12;
Rload=200e3;
Z=((1/Ro)+(R1+(1./(s*C1)))+(R2+(1./(s*C2)))+(R3+(1./(s*C3)))+(R4+(1./(s*C4)))+(R5+(1./(s*C5)))).^-1;
H=abs(Z./(Z+Rload));
semilogx(f, 20*log10(H))
.

카테고리

Help CenterFile Exchange에서 Pole and Zero Locations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by