loop_analysis_for_pll
Cs=132e-12;
Cp=10.2e-12;
Rs=45e3;
Ip=3e-6;
Kv=40e6;
M=8;
D=8;
sys=tf([Ip*Kv*Rs*(Cs+Cp) Ip*Kv],[D*Rs*Cs*Cp D*(Cs+Cp) 0 0]);
%sys=tf([Ip*Kv*Rs*Cs Ip*Kv],[D*Rs*Cs*Cp D*(Cs+Cp) 0 0]);
%H(s)=K/N*(RCp+1)/(RCpCss^3+(cs+cp)s^2)
bode(sys);
wn=sqrt(Ip*Kv/M/Cs);
damping=Rs/2*sqrt(Ip*Kv*Cs);
fprintf('\nNatural Frequency = %d\n', wn);
fprintf('\nDamping Ratio = %d\n\n', damping);