prabhu575
Newbie level 1
C2=input ('value of the capacitor C2: ');
C1=input ('value of the capacitor C1: ');
R2=input ('value of the resistor R2: ');
R2C1=R2*C1;
C1_C2=C1+C2;
C1C2R2=C1*C2*R2;
b=[R2C1 1];
a=[C1C2R2 C1_C2 0];
[A,B,C,D] = tf2ss(b,a)
a2=[C1C2R2 C1_C2 0 0];
kvco=20e6;
kphi=5e-3;
RFout=900e6;
Fref=200e3;
N=RFout/Fref;
omegap=2*3.14*20e3;
T1=0.414/omegap;
T2=1/omegap^2*T1;
C1=T1/T2*(kphi*kvco/omegap^2*N)*sqrt(1+(omegap*T2)^2/1+(omegap*T1)^2);
C2=C1*(T2/T1-1);
R2=T2/C2;
gain=kvco*kphi/N;
s=tf('s');
Z=(s*(C2*R2)+1/s^2*(C1*C2*R2)+(s*C1)+(s*C2));
Bode(Z)
grid on
*****can some one code this two pole passive low pass filter using transfer in matlab ....im not gettin the phase margin as 45deg...bode plot is completely wrong...though im an intermediate level in matlab codin...im just freakin out...
C1=input ('value of the capacitor C1: ');
R2=input ('value of the resistor R2: ');
R2C1=R2*C1;
C1_C2=C1+C2;
C1C2R2=C1*C2*R2;
b=[R2C1 1];
a=[C1C2R2 C1_C2 0];
[A,B,C,D] = tf2ss(b,a)
a2=[C1C2R2 C1_C2 0 0];
kvco=20e6;
kphi=5e-3;
RFout=900e6;
Fref=200e3;
N=RFout/Fref;
omegap=2*3.14*20e3;
T1=0.414/omegap;
T2=1/omegap^2*T1;
C1=T1/T2*(kphi*kvco/omegap^2*N)*sqrt(1+(omegap*T2)^2/1+(omegap*T1)^2);
C2=C1*(T2/T1-1);
R2=T2/C2;
gain=kvco*kphi/N;
s=tf('s');
Z=(s*(C2*R2)+1/s^2*(C1*C2*R2)+(s*C1)+(s*C2));
Bode(Z)
grid on
*****can some one code this two pole passive low pass filter using transfer in matlab ....im not gettin the phase margin as 45deg...bode plot is completely wrong...though im an intermediate level in matlab codin...im just freakin out...