Home > Community > Forums > Custom IC Design > Irregularity during DC Sweep Simulation

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Irregularity during DC Sweep Simulation 

Last post Thu, Nov 3 2011 2:21 AM by aditeman. 9 replies.
Started by aditeman 02 Nov 2011 07:13 AM. Topic has 9 replies and 2680 views
Page 1 of 1 (10 items)
Sort Posts:
  • Wed, Nov 2 2011 7:13 AM

    • aditeman
    • Not Ranked
    • Joined on Wed, Jul 14 2010
    • Posts 11
    • Points 160
    Irregularity during DC Sweep Simulation Reply
    Hi all (or specifically to Andrew), I have noticed a strange irregularity during a DC Sweep simulation scenario and I would like to know if anyone knows what could be wrong. I ran DCOp simulations on a test circuit changing a parameter (the supply voltage, VDD) and got certain results. I used nodeset statements to aid convergence. (values from 0.1V to 1.1V) Then I reran the simulations using a DC Sweep on the same parameter (VDD) from 0.1V to 1.1V, however the results were completely different, specifically at the same points I simulated independently. For reference, I measured the DC voltage at a certain node with VDD=1.1V. In case A it was 513mV and in case B it was 81mV. I played around a bit - for example, I marked "restart=yes" (even though this should be the default) thinking that maybe it was using the former solution as the next nodeset. Same result. Then - and this is what completely throws me off - I changed the sweep region to 0.2V to 1.1V and I got the expected results (i.e. with VDD=1.1V I got 513mV). The only thing I can think of is that the 0.1V point is used as a nodeset for subsequent sweeps even though restart=yes. If that is the reason - is there a workaround? Thanks, Adi Teman
    • Post Points: 20
  • Wed, Nov 2 2011 8:17 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,535
    • Points 14,940
    Re: Irregularity during DC Sweep Simulation Reply

    Hi Adi,

    perhaps the circuit has two or more DC operating points, in other words the solutions are metastable states? One solution is a dcOp and the other starts from a dcOp and the voltage is swept - this can lead to different solutions.  What kind of circuit is it?  Have you tried using initial conditions rather than nodesets?  I believe the former is a "suggested starting point" whereas the latter is more of a fixed quantity - if the nodeset values are not correct, this will force the simulation in a certain direction which may be why you arrive at a different solution?

    Andrew will have more useful input I'm sure (and may even correct me if I'm wrong), but hopefully the above might be useful to you?

    Regards,

    Lawrence.

    • Post Points: 20
  • Wed, Nov 2 2011 8:25 AM

    • aditeman
    • Not Ranked
    • Joined on Wed, Jul 14 2010
    • Posts 11
    • Points 160
    Re: Irregularity during DC Sweep Simulation Reply
    Thanks, Lawrence. I'm actually quite familiar with the operation of IC and nodeset and I believe I am using them correctly. In fact, IC's are ignored during DC simulations, so they would have no affect. I think that the problem does have something to do with a metastable state, as you mentioned. However, the DC Sweep should have the exact same result when simulating the same point as the DCOp - I think they're equivalent by definition (a DC Sweep is a sweep of DCOps)... Adi
    • Post Points: 20
  • Wed, Nov 2 2011 8:47 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,535
    • Points 14,940
    Re: Irregularity during DC Sweep Simulation Reply

     Hi Adi,

    I'm not sure that the statement that a DC Sweep is a sweep (or set) of DCops is correct - I think that a sweep starts from a dcOp and then the parameter is swept, so this means that you could arrive at a different solution than a single dcOp - i.e. it picks "the wrong" metastable state for the operating point solution. IC's are used for transient simulations and a transient starts from a dcOp, so I assumed that IC's would apply, my apologies if this is incorrect, and also if I've got the nodeset vs. the IC mixed up!  The fact that you need to use nodesets tells me that there has already been difficulty arriving at "the correct" solution, so this does indeed sound like a metastable state problem. Have you tried sweeping down from 1.1 to see if the solution is different?  What can a transient simulation tell you?

    Regards,

    Lawrence.

    • Post Points: 5
  • Wed, Nov 2 2011 8:49 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,535
    • Points 14,940
    Re: Irregularity during DC Sweep Simulation Reply

    Adi,

    what about a parametric sweep of dcOps? 

    Lawrence.

    • Post Points: 20
  • Wed, Nov 2 2011 9:03 AM

    • aditeman
    • Not Ranked
    • Joined on Wed, Jul 14 2010
    • Posts 11
    • Points 160
    Re: Irregularity during DC Sweep Simulation Reply
    Thanks again. I think your observations are accurate. I think the problem, as you said, is that the convergence at the first sweep point is to a metastable point and it uses this for the next point. But this is what I'm trying to work around. From what I could understand the "restart=yes" option for the DC simulation is supposed to recalculate the convergence for every point, but I might be mistaken. In any case, it didn't help. Using a parameteric sweep works fine but it takes a lot more time than the DC Sweep (even though I don't exactly understand why... something to do with re-setting up the simulation rather than a batch run - Andrew once told me something on that level). I will try the sweep from high to low - that might be a workaround. I'm just worried that I might miss something in a future simulation when I don't pay attention to the difference from what I'd expect... Thanks, Adi
    • Post Points: 20
  • Wed, Nov 2 2011 9:19 AM

    Re: Irregularity during DC Sweep Simulation Reply

    Adi,

    Try using rebuild_matrix=yes (on the Analog Options form). This will force spectre to restart completely at each point. Note that you effectively have multiple operating points - so this can disguise the fact you may have such a scenario.

    Regards,

    Andrew.

    • Post Points: 20
  • Wed, Nov 2 2011 9:43 AM

    • aditeman
    • Not Ranked
    • Joined on Wed, Jul 14 2010
    • Posts 11
    • Points 160
    Re: Irregularity during DC Sweep Simulation Reply
    Andrew, Thanks for the suggestion, but alas, it doesn't have any affect... (this smells like a bug to me... shouldn't "restart" fix this?) Actually, Lawrence's suggestion worked - sweeping from 1.1 down to 0 produces the correct result. I didn't understand your note. I know I have multiple operating points, but I still think/understand that the same DCOp and DC Sweep point should produce the same result. Right? Thanks again, Adi
    • Post Points: 20
  • Wed, Nov 2 2011 11:13 AM

    Re: Irregularity during DC Sweep Simulation Reply
    Adi,

    It may be a bug, although I don't expect it is. If you have multiple operating points, it is very hard to guarantee which you will get - the slightest little thing can cause it to roll down either side of the mountain into the two valleys (to use an analogy).

    Restart does start the op point from scratch, but it is using the matrix built from the previous run, and so the ordering within the matrix can affect the solution. Rebuilding the matrix usually then forces the sim to start from scratch.

    That said, if you are doing a dc sweep vs a parametric sweep of dcOp (I can't see the previous posts in the threads as I'm travelling), that could explain it. The restart won't cause it to reset within a DC sweep (I think - it's primarily for how it handles a dc sweep within a parametric analysis or sweep analysis, rather than between the points in the sweep) and rebuilding the matrix won't help.

    I don't think there's an easy solution other than the one you've done.

    Andrew
    • Post Points: 20
  • Thu, Nov 3 2011 2:21 AM

    • aditeman
    • Not Ranked
    • Joined on Wed, Jul 14 2010
    • Posts 11
    • Points 160
    Re: Irregularity during DC Sweep Simulation Reply
    Thanks, Andrew. I think that explains it. So from what I understand (please correct me if I'm mistaken), the next point in a DC sweep uses the previous point as an initial guess, therefore I am converging in the same area (in this case, my metastable point). I would imagine that this "feature" makes DC Sweeps faster than and equivalent parametric sweep of DC Ops. The solution is to make sure I don't "fall" into the wrong area - for example, by sweeping from high to low instead of low to high in this case. Thanks, Adi
    • Post Points: 5
Page 1 of 1 (10 items)
Sort Posts:
Started by aditeman at 02 Nov 2011 07:13 AM. Topic has 9 replies.