1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | % analyse Nyquist stability criteria for PLL-type II function [RE,IM,W]=pll_typeII_nyquist_stab(Icp,kvco,pm,bw,N) % Icp: charge pump current [A] % kvco: VCO gain [Hz/V] % pm: phase margin [deg] % bw: 3dB closed loop bandwidth [Hz] % N: feeback divider ratio [R1,C1,C2]=pll_typeII_get_loop_filter (Icp,kvco,pm,bw,N); % get loop filter components z1=1/R1/C1; p1=(C1+C2)/C1/C2/R1; % open loop transfer function A(s)=Icp*kvco*Z(s)/s/N = Icp*kvco/C2/N/s^2*(s+z1)/(s+p1) num=Icp*kvco/C2/N*[1 z1]; den=[1 p1 0 0]; s1=tf(num,den); wi=logspace(5.5,8,10000); [RE,IM,W] = nyquist(s1,wi); phi=atan2(IM(1),RE(1)); z=sqrt(RE(1)^2+IM(1)^2)*exp(j*[phi:-phi/100:-phi]); figure plot(RE,IM,'-b','linewidth',2); hold on; plot(RE,-IM,'-r','linewidth',2); plot(real(z),imag(z),'--k','linewidth',1); plot(-1,0,'xm','markers',12,'linewidth',3); plot(-1+cos(pi/180*[0:4:360]),sin(pi/180*[0:4:360]),'-.k','linewidth',2); grid on; legend({"+w","-w","contour","-1+j0"}) title(['Nyquist plot'],'fontsize',18); ylabel('IMG','fontsize',16); xlabel('RE','fontsize',16); maxR=max(sqrt(RE.^2+IM.^2))+1; axis([-maxR maxR -maxR maxR],"square"); set(gca,'fontsize',14,'xtick',[-maxR,-1,0,maxR],'xticklabel',{'-\infty','-1','0','+\infty'},'ytick',[-maxR,0,maxR],'yticklabel',{'-\infty','0','+\infty'}); saveas(gcf,'figures/nyquist_stability.png','png') |
Wednesday, January 3, 2018
PLL type-II Nyquist stability
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment