• 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. Oscillator frequency shifting during transient simulati...

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 125
  • Views 18518
  • 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

Oscillator frequency shifting during transient simulation

mangk
mangk over 6 years ago

Hi,

I found some strange phenomenon during my oscillator simulation..

When I inserted a VSIN to the osc test bench, which is not connected to any node, the osc frequency changes suddenly after the VSIN generates its signal.

(VSIN is a delayed sine wave, VSIN=100m*sin(2pi*900M*(t-td)), frequency changing occurs at td second)

The test bench consists of a 5 stage ring oscillator, 1 V dc voltage source supporting the osc, and VSIN.

I don't know how to interpret that result, and How can I avoid the unwanted frequency changing ?

A delayed VSIN will be used in later simulation with the oscillator.

Thank you in advance!

c.f.) errpreset: conservative, fosc: 120.5 MHz, delta fosc: 60 kHz)

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

    You might want to set method=traponly on the tran analysis because conservative uses gear2only which has some damping (not usually so good for an oscillator). I'm guessing that the forced tilmestep at the beginning of the sine wave is causing a disturbance in the solution - which might be due to you not having enough timepoints in the early part of the simulation for the oscillation to have stabilised (simulating oscillators in transient in circuit simulators always requires some care).

    However, it's really hard to give more specific advice without being able to see what's going on. Can you contact customer support?

    Regards,

    Andrew.

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

    For now, I cannot access to the customer support, since addtional information is required.

    * Could you explain a little more detail about damping?

    (such as what is damping in computing, why does it not good for osc simulation?)

    and I found that

      1) the total number of data point is increased by 14 % when VSIN starts.

      2) when 'maxstep' is set to 1 ps, the frequency changing does not occur. (only changes by 4.3 Hz at the very moment VSIN starts, which might be ignorable)

      3) with method=traponly, the frequency changing is reduced by ~40 %, which is still undesirable.

    * Would it be okay if I use maxstep sufficiently small not to disturbe the result?

    Regards,

    Sangkwon

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

    One of the things that circuit simulators have to do is place time steps and control the error when placing the time steps. Too few time steps can lead to increased error, and too many leads to slow simulation. They have to both solve the equations at a particular time point (in essence find a solution to the set of simultaneous differential equations, which is done to a given accuracy - using an iterative approach), and also integrate the area under the curve. There are three primary methods for doing this integration - Euler (a first order method), Trapezoidal (similar to what you learned at school by summing up the area of the trapezoids under the curve) and Gear (a 2nd order method which uses a quadratic equation to represent the curve between two points). The trapezoidal method is quite simple to understand but does tend to suffer a little from numerical oscillation (a phenomenon known as "trapezoidal ringing"), particularly in high gain circuits. The gear method is often a good compromise for accuracy, and tends to eliminate this numerical oscillation because it in effect has some numerical damping (think of it as a numerical filter). That damping is small, but it can't distinguish between numerical and real oscillation - so an effect can be that real oscillations get affected or reduced. Note that the Euler method is heavily damped and is primarily there for helping when there's a discontinuity (often in the derivative, such as when a pulse source changes) - you wouldn't normally ever choose euler yourself but it's used internally in the simulator in some cases.

    That's a quick high-level overview (lacking a bit in detail) which might give you a clue about the background. In general using trapezoidal integration is the wisest choice with oscillators - particularly to get them started (we still might use gear2only during the shooting method if using PSS on an oscillator, but you use traponly to get the oscillator started).

    I can't answer the other questions without being able to see the circuit and the symptoms you are seeing. That's why I suggested you contact customer support. Guessing the problem with a blindfold over my eyes isn't really going to work here...

    Regards,

    Andrew.

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

    It was a greatly helpful advice!

    Then, would there be a qualitative way to decide osc simulation is performed well ?

    I am now guessing that measuring a jitter can be a representative value in no-noise environment, since it should be 0 s without noise.

    However, in noisy condition, since it is likely that an unexpected noise might affect a time-step, thus causing irregularity to an osc output,

    it would be difficult to decide whether the resultant output signal is from a noise or from a simulation inaccuracy by irregularity.

    (I assumed that every time steps of a clean periodic osc signal have a regular pattern)

    Regards,

    Sangkwon

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • mangk
    mangk over 6 years ago in reply to Andrew Beckett

    It was a greatly helpful advice!

    Then, would there be a qualitative way to decide osc simulation is performed well ?

    I am now guessing that measuring a jitter can be a representative value in no-noise environment, since it should be 0 s without noise.

    However, in noisy condition, since it is likely that an unexpected noise might affect a time-step, thus causing irregularity to an osc output,

    it would be difficult to decide whether the resultant output signal is from a noise or from a simulation inaccuracy by irregularity.

    (I assumed that every time steps of a clean periodic osc signal have a regular pattern)

    Regards,

    Sangkwon

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to mangk

    Hi Sangkwon,

    Unfortunately oscillators are always difficult to simulate in circuit simulators, and inherently suffer from numerical noise which tends to accumulate.

    If you think about it simply, the first thing that happens when you simulate in transient is that you find the DC operating point (found by removing capacitors and shorting inductors - including those within other devices). This means you reach a stable DC condition and the transient starts from there. The trouble is that when you start the transient, nothing has changed, so it's quite possible that the circuit will fail to start oscillating. Often you have to provide a kick (such as an initial condition) to get it to move. Then, the tilmestep control mechanism struggles to ensure that there are enough points for the oscillation to build - so sometimes you have to force the simulator to take more time steps to encourage that.

    Once started, the issue is that the simulator is having to decide upon timestep placement error using the "local truncation error" mechanism (this is where it predicts where it thinks the signals should be, and then compares them against the result of solving the equations at that time point). This happens in all simulation, and that error is usually small. With a driven circuit, the error doesn't tend to accumulate, because there are driving signals which pull the solution back into line again; with an oscillator though, there's nothing to correct it and so any error just accumulates and is effectively like numerical phase noise. You'd see the issue as variation in the instantaneous frequency. You also can't guarantee that the time steps will be the same in each cycle.

    So often you would need to tighten the accuracy - but without more knowledge of the circuit, I can't give specific advice on how best to control the accuracy here. It's also really hard to be absolutely certain that the results are good, but stability of the frequency is probably a pretty reasonable test (although it won't ever be 0 variation).

    Andrew.

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

    Yes! I definitely have observed that the accumulation.

    Your words-like numerical noise and numerical phase noise-exactly definitize what I have felt ambiguously,

    Thank you for your clear explanation. All information was very invaluable...

    Regards,

    Sangkwon

    • 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