• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. RF Design
  3. complex pole zero simulation into matlab bode plot

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 63
  • Views 15686
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

complex pole zero simulation into matlab bode plot

robert 21
robert 21 over 6 years ago

Hello, after succseeding to confirm with a simple circuit an AC sweep  with Matlab bode plot of pole zero simulation output.

I tried to match similarly a more complex circuit  which beyong poles and zeros it also gave me output with a significant Constant factorand  DC gain, futher more the peaks frequency  in matlab bode plot and in AC sweep didnt match.(As shown in the plots bellow)

I Have attached the pole zero simulation output txt file,the circuit netlist, and the MATLAB script transfer function that was built from the pole zero simulation output(the post didnt allow me to upload a *.m file)

General speaking for example , in my pole zero output i have poles (p1..p10) pole quality factor(q1 q10),zeros(z1..z10) zero quality factor(q1 q10) ,constant factor(K), DC gain(D)

maybe its suppose to have the follwing form ?

where did i were wrong defining the transfer function?

Fullscreen 1803.netlist.txt Download
// Library name: projectss
// Cell name: snr_main
// View name: schematic
R0 (net1 net5) resistor r=50
C35 (net049 net04) capacitor c=1p
C34 (net04 net034) capacitor c=1p
C33 (net049 0) capacitor c=1p
C32 (net04 0) capacitor c=1p
C31 (net019 net053) capacitor c=1p
C30 (net053 net038) capacitor c=1p
C29 (net053 0) capacitor c=1p
C28 (net019 0) capacitor c=1p
C27 (net021 0) capacitor c=1p
C26 (net020 0) capacitor c=1p
C25 (net020 net039) capacitor c=1p
C24 (net021 net020) capacitor c=1p
C23 (net055 0) capacitor c=1p
C22 (net052 0) capacitor c=1p
C21 (net055 net035) capacitor c=1p
C20 (net052 net055) capacitor c=1p
C3 (0 net1) capacitor c=1p
C4 (net08 net07) capacitor c=1p
C2 (net1 net6) capacitor c=390p
C5 (net08 0) capacitor c=1p
C13 (net014 0) capacitor c=1p
C14 (net013 0) capacitor c=1p
C6 (net07 0) capacitor c=1p
C8 (net05 net022) capacitor c=1p
C7 (net07 net023) capacitor c=1p
C9 (net05 0) capacitor c=1p
C10 (net06 0) capacitor c=1p
C11 (net06 net05) capacitor c=1p
C12 (net014 net013) capacitor c=1p
C15 (net013 net025) capacitor c=1p
C16 (net018 net017) capacitor c=1p
C18 (net016 0) capacitor c=1p
C19 (net016 net018) capacitor c=1p
C17 (net018 0) capacitor c=1p
C0 (net1 net5) capacitor c=390p
L27 (net041 net049) inductor l=1n
L26 (net034 net6) inductor l=1n
L25 (net04 net034) inductor l=1n
L24 (net043 net019) inductor l=1n
L23 (net038 net6) inductor l=1n
L22 (net053 net038) inductor l=1n
L21 (net020 net039) inductor l=1n
L20 (net039 net043) inductor l=1n
L19 (net045 net021) inductor l=1n
L18 (net055 net035) inductor l=1n
L17 (net035 net041) inductor l=1n
L16 (net042 net052) inductor l=1n
L9 (net05 net022) inductor l=1n
L2 (net1 net6) inductor l=2u
L4 (net5 net08) inductor l=1n
L8 (net022 net042) inductor l=1n
L5 (net07 net023) inductor l=1n
L6 (net023 net027) inductor l=1n
L7 (net027 net06) inductor l=1n
L10 (net5 net016) inductor l=1n
L11 (net013 net025) inductor l=1n
L12 (net025 net045) inductor l=1n
L13 (net026 net014) inductor l=1n
L14 (net017 net026) inductor l=1n
L15 (net018 net017) inductor l=1n r=20
L0 (net1 net5) inductor l=10n
V0 (net018 net017) vsource mag=1 type=dc
simulatorOptions options reltol=1e-3 vabstol=1e-6 iabstol=1e-12 temp=27 \
    tnom=27 scalem=1.0 scale=1.0 gmin=1e-12 rforce=1 maxnotes=5 maxwarns=5 \
    digits=5 cols=80 pivrel=1e-3 sensfile="../psf/sens.output" \
    checklimitdest=psf 
pz ( net1 net6 ) pz iprobe=V0 freq=1 
modelParameter info what=models where=rawfile
element info what=inst where=rawfile
outputParameter info what=output where=rawfile
designParamVals info what=parameters where=rawfile
primitives info what=primitives where=rawfile
subckts info what=subckts where=rawfile
saveOptions options save=allpub

Fullscreen pole_zero_output.txt Download
****************
PZ Analysis `pz'
****************
DC simulation time: CPU = 1 ms, elapsed = 565.052 us.
DC simulation time: CPU = 0 s, elapsed = 242.949 us.
                      Poles (Hz)

           Real                       Imaginary                 Qfactor

   1   -1.63601e-02                  0.00000e+00              5.00000e-01 
   2   -2.93921e-02                  0.00000e+00              5.00000e-01 
   3   -3.18408e-02                  0.00000e+00              5.00000e-01 
   4   -3.97838e-02                  0.00000e+00              5.00000e-01 
   5   -3.97866e-02                  0.00000e+00              5.00000e-01 
   6   -6.15560e-02                  0.00000e+00              5.00000e-01 
   7   -7.04742e-02                  0.00000e+00              5.00000e-01 
   8   -1.64334e-03              +/- 5.68434e+06              1.72950e+09 
   9   -4.06044e+06              +/- 8.02865e+07              9.89907e+00 
  10   -2.55686e+02              +/- 2.21772e+09              4.33681e+06 
  11   -6.21109e+03              +/- 2.31261e+09              1.86168e+05 
  12   -2.30225e+02              +/- 2.64997e+09              5.75517e+06 
  13   -2.83489e+03              +/- 3.04281e+09              5.36671e+05 
  14   -2.10592e+03              +/- 3.06838e+09              7.28514e+05 
  15   -9.66426e+02              +/- 3.29534e+09              1.70491e+06 
  16   -2.59758e+02              +/- 3.45230e+09              6.64523e+06 
  17   -1.35539e+02              +/- 3.79774e+09              1.40097e+07 
  18   -2.93730e+01              +/- 4.61102e+09              7.84906e+07 
  19   -4.42050e+03              +/- 6.30144e+09              7.12751e+05 
  20   -3.80191e+02              +/- 6.54472e+09              8.60715e+06 
  21   -7.80846e+02              +/- 6.60252e+09              4.22780e+06 
  22   -5.74363e+01              +/- 6.92779e+09              6.03084e+07 
  23   -3.97559e+02              +/- 7.04464e+09              8.85988e+06 
  24   -1.32259e+03              +/- 1.16857e+10              4.41772e+06 

                      Zeros (Hz)
                      at V(net1,net6)/V0

           Real                       Imaginary                 Qfactor

   1   -2.52933e-04                  0.00000e+00              5.00000e-01 
   2   -3.12784e-02              +/- 1.78701e-03              5.00815e-01 
   3   -3.35785e-02                  0.00000e+00              5.00000e-01 
   4   -3.94756e-02                  0.00000e+00              5.00000e-01 
   5   -6.16305e-02                  0.00000e+00              5.00000e-01 
   6   -1.56380e-01                  0.00000e+00              5.00000e-01 
   7   -4.61387e-01                  0.00000e+00              5.00000e-01 
   8    4.67146e-01                  0.00000e+00              -5.00000e-01
   9   -4.08025e+06              +/- 8.04815e+07              9.87499e+00 
  10   -1.28022e-02              +/- 2.21092e+09              8.63497e+10 
  11   -2.77470e-02              +/- 2.55409e+09              4.60247e+10 
  12   -2.62383e-02              +/- 3.06692e+09              5.84435e+10 
  13   -1.16794e+08              +/- 3.07766e+09              1.31851e+01 
  14    1.16793e+08              +/- 3.07766e+09              -1.31852e+01
  15   -2.69539e-02              +/- 3.43574e+09              6.37336e+10 
  16   -1.59476e-02              +/- 4.24387e+09              1.33057e+11 
  17    1.42797e-06              +/- 5.03292e+09              -1.76226e+15
  18   -3.29387e-03              +/- 6.51065e+09              9.88297e+11 
  19   -3.47367e+02              +/- 6.62013e+09              9.52902e+06 
  20    3.75036e+02              +/- 6.88285e+09              -9.17627e+06
  21   -7.23296e-03              +/- 7.00346e+09              4.84135e+11 

Constant factor =  8.54677e+59

DC gain =  1.14344e-19

Accumulated DC solution time = 1.63092 s.
Intrinsic pz analysis time =              -2.42433 s.
Total time required for pz analysis `pz': CPU = 13.997 ms, elapsed = 394.873 ms.
Time accumulated: CPU = 293.954 ms, elapsed = 1.46006 s.
Peak resident memory used = 55.9 Mbytes.
 

 

Fullscreen matlab_script.txt Download
p=[-1.63601e-02+0.00000e+00i;
    -2.93921e-02+0.00000e+00i;
    -3.18408e-02+0.00000e+00i;
    -3.97838e-02+0.00000e+00i;
    -3.97866e-02+0.00000e+00i;
    -6.15560e-02+0.00000e+00i;
    -7.04742e-02+0.00000e+00i;
    -1.64334e-03-5.68434e+06i;
    -1.64334e-03+5.68434e+06i;
    -4.06044e+06-8.02865e+07i;
    -4.06044e+06+8.02865e+07i;
    -2.55686e+02+2.21772e+09i;
    -2.55686e+02-2.21772e+09i;
    -6.21109e+03-2.31261e+09i;
    -6.21109e+03+2.31261e+09i;
    -2.30225e+02-2.64997e+09i;
    -2.30225e+02+2.64997e+09i;
    -2.83489e+03-3.04281e+09i;
    -2.83489e+03+3.04281e+09i;
    -2.10592e+03-3.06838e+09i;
    -2.10592e+03+3.06838e+09i;
    -9.66426e+02-3.29534e+09i;
    -9.66426e+02+3.29534e+09i;
    -2.59758e+02-3.45230e+09i;
    -2.59758e+02+3.45230e+09i;
    -1.35539e+02-3.79774e+09i;
    -1.35539e+02+3.79774e+09i;
    -2.93730e+01-4.61102e+09i;
    -2.93730e+01+4.61102e+09i;
    -4.42050e+03-6.30144e+09i;
    -4.42050e+03+6.30144e+09i;
    -3.80191e+02-6.54472e+09i;
    -3.80191e+02+6.54472e+09i;
    -7.80846e+02-6.60252e+09i;
    -7.80846e+02+6.60252e+09i;
    -5.74363e+01-6.92779e+09i;
    -5.74363e+01+6.92779e+09i;
     -3.97559e+02-7.04464e+09i;
      -3.97559e+02+7.04464e+09i;
      -1.32259e+03-1.16857e+10i;
      -1.32259e+03+1.16857e+10i]

  
  z=[-2.52933e-04+0.00000e+00i;
      -3.12784e-02-1.78701e-03i;
      -3.12784e-02+1.78701e-03i;
      -3.35785e-02+0.00000e+00i;
      -3.94756e-02+0.00000e+00i;
      -6.16305e-02+0.00000e+00i;
      -1.56380e-01+0.00000e+00i;
      -4.61387e-01+0.00000e+00i;
      4.67146e-01+0.00000e+00i;
      -4.08025e+06-8.04815e+07i;
      -4.08025e+06+8.04815e+07i;
      -1.28022e-02-2.21092e+09i;
      -1.28022e-02+2.21092e+09i;
      -2.77470e-02-2.55409e+09i;
      -2.77470e-02+2.55409e+09i;
      -2.62383e-02-3.06692e+09i;
      -2.62383e-02+3.06692e+09i;
      -1.16794e+08-3.07766e+09i;
      -1.16794e+08+3.07766e+09i;
      1.16793e+08-3.07766e+09i;
      1.16793e+08+3.07766e+09i;
      -2.69539e-02-3.43574e+09i;
      -2.69539e-02+3.43574e+09i;
      -1.59476e-02-4.24387e+09i;
      -1.59476e-02+4.24387e+09i;
      1.42797e-06-5.03292e+09i;
      1.42797e-06+5.03292e+09i;
      -3.29387e-03-6.51065e+09i;
      -3.29387e-03+6.51065e+09i;
      -3.47367e+02-6.62013e+09i;
      -3.47367e+02+6.62013e+09i;
      3.75036e+02-6.88285e+09i;
      3.75036e+02+6.88285e+09i;
      -7.23296e-03-7.00346e+09i;
      -7.23296e-03+7.00346e+09i;]
k=8.54677e+59;
sys=zpk(z,p,k)
bode(sys)


  • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago

    Not entirely sure what's going on here, but I suspect the numbers are so large because of the fact that you have very high Q in the network because of the ideal components. I can't repeat the Matlab results myself as I don't have the Control Systems Toolbox, but I certainly can see that your x-units are wrong (Spectre reports them in Hz rather than rad/s).

    I did try using svcvs in spectre but struggled to get it to converge with the complete list of poles and zeros, and I had to manually adjust the gain (not gainfactor) to -1.5227e-17 to try to get them to match. Since this is all related to the first terms in the numerator and denominator (not in pole-zero format), I didn't do the maths to work out what it was (I only got it to match with a smaller number of poles and zeros because I had convergence difficulties otherwise). Not sure this adds any value, but anyway it was all I had time for.

    You might also be better off comparing values at the flattish parts of the curve because the peaks are probably highly sensitive to where you placed the points in the ac sweep  (which you didn't provide in the netlist).  Also plotting both curves on a log X axis would make it easier to compare (the shape looks right - it's just a gain factor issue plus the wrong frequency units).

    Anyway, that's all the time I have to look at this. If you need more assistance, I suggest you contact customer support.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • robert 21
    robert 21 over 6 years ago in reply to Andrew Beckett

    Hello Andrew, Yes the peaks frequecny match i only had problem with amplitude,i raised it manually to somehow make them equal.

    i just wanted to know how pole zero output parameters  like  quality factor DC gain ,constant are playing a role in a classic transfer function formula (as thought by the developers of pole zero in cadence virtuoso)

    Thanks 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to robert 21

    Did you read the documentation? Or at least “spectre  -h pz” ? This explains what it outputs. 

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • robert 21
    robert 21 over 6 years ago in reply to Andrew Beckett

    Thank you very much for “spectre  -h pz”,i didnt know about this option

      i found a lot more information to look in to, i will use it

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information