• 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. Custom IC Design
  3. interpolation for xmin calculation

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 126
  • Views 14329
  • 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

interpolation for xmin calculation

RobinCommander
RobinCommander over 9 years ago

As an addition to phase margin & gain margin in some AC open loop simulations I have been also been calculating the vector margin which can be useful.

I calculate it thus:

stb_x = xmin((abs((v("/Ampout" ?result "ac") - complex(-1.0 0.0)))**2))

stb_dB = (- db20(value(v("/Ampout" ?result "ac") stb_x)))

To get more accurate results I need to add more points/decade which can slow things down in swept simulations, I assume this is because only the data points are used in the xmin calculation. I was wondering if interpolation could somehow be used in the xmin calculation so I can speed up the simulations. Or maybe there is some other way of doing this calculation.


Thanks,

Robin

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Robin,

    I don't think it's a case of getting xmin to interpolate - the minimum y value must inherently be a point that's in the original waveform unless you do some kind of spline fit of the curve. However, I think that probably you want to find the closest point on the Nyquist plot to -1,0 - and that may not be at a point. I'll have a think about that.

    It wasn't obvious to me why you have the **2 (squared) term in your expression?

    Also, assuming that an interpolated x-value could be found, I think you'd want to do value(db20(...) rather than db20(value(...)) because that way it would linearly interpolate something in db which I think would probably be more appropriate (even then it's not quite right because you really want to linearly interpolate on a log-log curve, I guess. Right now it doesn't matter because the x point you're using value() at is one of the original points, and so there's no interpolation in the value() either.

    Anyway, I'll have a think about possibiities of calculating this vector margin. Potentially it could be a good enhancement for spectre's stb analysis to output this figure of merit too.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Robin,

    I don't think it's a case of getting xmin to interpolate - the minimum y value must inherently be a point that's in the original waveform unless you do some kind of spline fit of the curve. However, I think that probably you want to find the closest point on the Nyquist plot to -1,0 - and that may not be at a point. I'll have a think about that.

    It wasn't obvious to me why you have the **2 (squared) term in your expression?

    Also, assuming that an interpolated x-value could be found, I think you'd want to do value(db20(...) rather than db20(value(...)) because that way it would linearly interpolate something in db which I think would probably be more appropriate (even then it's not quite right because you really want to linearly interpolate on a log-log curve, I guess. Right now it doesn't matter because the x point you're using value() at is one of the original points, and so there's no interpolation in the value() either.

    Anyway, I'll have a think about possibiities of calculating this vector margin. Potentially it could be a good enhancement for spectre's stb analysis to output this figure of merit too.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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