  Forum Pages: 1 why bode plot of a linear pll model got from spectre is different from simulink? (Read 2260 times)
 lwzunique Community Member   Offline Posts: 34 why bode plot of a linear pll model got from spectre is different from simulink? Jan 19th, 2017, 11:03pm   I tried to build pll linear model in cadence spectre. but when i do ac simulation, I found that the magnitude of the bode response plot is different from that I got from matlab simulink model, why there is this diference?in the figure below, the bode plot of these three model are the same.and the veriloga model is: Code:// VerilogA for pllveriloga, plltransferfunction, veriloga `include "constants.vams" `include "disciplines.vams" module plltransferfunction(in,out); input in; output out; electrical in,out; parameter ICP=125u from(0:inf);//charge pump current parameter R1=33K from(0:inf);//loop filter R1 parameter C1=161p from(0:inf);//loop filter C1 parameter C2=2p from(0:inf);//loop filter C2 parameter R3=36K from(0:inf);//loop filter R3 parameter C3=2p from(0:inf);//loop filter C3 parameter KVCO=40M from(0:inf);// vco gain(MHz/V) parameter N=115 from(0:inf);//divider ratio real K,a1,a0,b4,b3,b2,b1,b0; real a[0:1]; real b[0:4]; analog begin K=KVCO*2*3.1415926*ICP/2/3.1415926/N; a1=K*R1*C1; a0=K*1; b4=R1*R3*C1*C2*C3; b3=R1*C1*(C2+C3)+R3*C3*(C1+C2); b2=(C1+C2+C3); b1=0; b0=0; a=a1; a=a0; b=b4; b=b3; b=b2; b=b1; b=b0; //V(out)<+ laplace_nd(V(in),{a0,a1},{b0,b1,b2,b3,b4});//this expression can't work because laplace function can't handle varible, it must be in vector version V(out)<+ laplace_nd(V(in),a,b); //V(out)<+ laplace_nd(V(in),{41,2.6e-4},{0,0,2.41e-10,1.1e-16,3.74e-24}); end endmodule Back to top  IP Logged
 lwzunique Community Member   Offline Posts: 34 Re: why bode plot of a linear pll model got from spectre is different from simulink? Reply #1 - Jan 19th, 2017, 11:11pm   matlab simulink simulation result:kpfd=124uA/(2*pi)Kvco=40M/vdivider ratio N=115R1=33KR3=36KC1=161pC2=C3=2pFthese values are the same in spectre and simulink.as we can see the loop bandwidth is very similar, and the phase margin is also almost the same. why the magnitude is so different? in spectre simulation the magnitude at the beginning is about 200dB, but in simulink is about 60dB. Back to top  IP Logged
 lwzunique Community Member   Offline Posts: 34 Re: why bode plot of a linear pll model got from spectre is different from simulink? Reply #2 - Jan 19th, 2017, 11:23pm   really sorry for my mistake, I know why, the beginning of the frequency is not the same. Back to top IP Logged Pages: 1