The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 28th, 2024, 4:31am
Pages: 1
Send Topic Print
why bode plot of a linear pll model got from spectre is different from simulink? (Read 3488 times)
lwzunique
Community Member
***
Offline



Posts: 38

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[1]=a1;
  a[0]=a0;
  b[4]=b4;
  b[3]=b3;
  b[2]=b2;
  b[1]=b1;
  b[0]=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
 

loop1.png
View Profile   IP Logged
lwzunique
Community Member
***
Offline



Posts: 38

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/v
divider ratio N=115
R1=33K
R3=36K
C1=161p
C2=C3=2pF

these 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
 

loop2.png
View Profile   IP Logged
lwzunique
Community Member
***
Offline



Posts: 38

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
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.