Connect with us

PSpice worst case simulation

Discussion in 'Electronic Design' started by Joerg, Mar 21, 2011.

Scroll to continue with content
  1. Joerg

    Joerg Guest

    Hi Folks,

    Reached an end of a rope here: How do you make a worst case simulation
    in PSpice (or even Monte Carlo for that matter) properly find the
    extremes for an opamp offset voltage and input bias current?

    For example, for the opamp we have:

    VOS: Offset voltage
    VOS_DIST: Distribution, I assume
    VOS_NTOL: What gets entered here?
    VOS_PTOL: ... and here?

    If I enter 7mV or whatever for VOS and set the distributuion to flat the
    sim acts as if there was always +7mV. No variation. But we all know that
    it'll be +/-7mV. How can I make PSpice understand that? The manual
    appears to be silent about it and a web search doesn't even find
    expressions such as VOS_NTOL.

    Same goes for input bias current except that there it's called IB,
    IB_DIST, IB_NTOL and IB_PTOL. Having to massage all these by hand gets
    old in a larger simulation.
     
  2. Charlie E.

    Charlie E. Guest

    Joerg,
    Well, that should be
    VOS: Offset voltage,
    VOS_DIST: Distribution type, probably FLAT
    VOS_NTOL: Negative tolerance
    VOS_PTOL: Positive tolerance

    So, if you wanted +/- 7mV, then VOS = 0, VOS_DIST = FLAT, VOS_NTOL =
    7mv, VOS_PTOL = 7mv

    At least, that is what I think it should be. Could be NTOL should be
    -7mV...

    Charlie
     
  3. Joerg

    Joerg Guest

    I had already tried both. It no workie :-(

    Looked around to find a description of this stuff but no dice either.
    Maybe this is restricted to an inner circle of gurus who know the secret
    knock on the back door ;-)
     
  4. Joerg

    Joerg Guest

    For the test it's an LM324. I took it from the PSpice advanced analysis
    directory and assume (but not sure) that PSpice should have sounded some
    siren if it wasn't MC-ready and you run a MC. Plus it has all the entry
    fields.

    But Confucius also say customer is king and if customer want Capture
    then use Capture :)
     
  5. Joerg

    Joerg Guest

    Yes, I read that and the others cover to cover. But VOS isn't described
    in there. It describes how to do MC and worst case on LOT and DEV
    variations in BJTs and so on. I only need to do worst case, plus MC as a
    sanity check.

    Ok, but how does one know? Why would it have a gazillion attribute
    entries such as VOS_NTOL and VOS_PTOL if those can't be used? AFAIU
    worst case and MC are the only sims that could use such information. I'd
    expect PSpice to refuse entry if I tried entering data that isn't
    supported by a model.
     
  6. Joerg

    Joerg Guest

    The LM324 model doesn't have DEV and LOT (I don't need both) but it does
    have fields for high/low of the offset parameters and various others:

    http://www.analogconsultants.com/ng/sed/LM324_pspice.jpg

    If this model can't support MC or worst case, why would there even be
    those Postol and Negtol fields? They appear to be editable because when
    I change them the values stick.
     
  7. Joerg

    Joerg Guest

    That's still the same in 16.3. It is set to Monte Carlo, output variable
    to output node of opamp, 10 runs, uniform distribution, save all data.

    I also tried worst case, same thing, won't wiggle the opamp offset a
    bit. It does work on resistors and stuff though. Although even there
    PSpice is a bit odd because it only lets you find the min _or_ the max
    of the output, but not both together in one plot. Doesn't make sense,
    but then again it seems a few other things don't make much sense either.
     
  8. Joerg

    Joerg Guest

    No, it doesn't. Other opamps don't either, so far I only saw them in
    discretes. Why would it need them if there are NTOL and PTOL entries?
     
  9. Charlie E.

    Charlie E. Guest

    Joerg,
    Don't know for sure, but those may be Advanced Analysis parameter,
    only useful if you have the AA option for PSpice. They didn't sound
    familiar to me from plain vanilla...

    Charlie
     
  10. Charlie E.

    Charlie E. Guest

    Ok, I bet you don't have Advanced Analysis, or if you do, you aren't
    using the Advanced Analysis menu to do the WC and MC sims. They are
    in a different place than the regular menus in the simulation profile!

    Charlie
     
  11. Joerg

    Joerg Guest

    But then why wouldn't those fields be grayed out or refusing entries in
    the simulator? I can enter data there and it sticks, meaning after
    saving it's still there.

    Oh, I was. But on the couch and half dozed off. Caught some sort of flu
    bug :-(

    This season there are some really good candidates, lots of talent. And
    Bruno is promising to live up to his usual exuberant outbursts pretty soon.
     
  12. Joerg

    Joerg Guest

    Yes, that's what I am afraid may be true. I'll open a support ticket
    then, to find out for sure. I just wonder, what good would it do if they
    provide worst case analysis in the regular PSpice and then you can't
    scoot an offset for tolerance?
     
  13. Joerg

    Joerg Guest

    I don't have the license for Advanced. But the menu items I described
    where in regular PSpice. They just don't do anything there.
     
  14. Charlie E.

    Charlie E. Guest

    To be honest, it all depends on the models. Most opamp models don't
    have those variable set up to tolerance offsets, etc. The AdvAnal
    models were custom made to be able to add in all those extras, to
    justify some of the added expense of the option!

    You can always modify the existing models to add those tolerances. Jim
    gave you a few clues on how to do that.

    Charlie
     
  15. Joerg

    Joerg Guest

    Oh, I've made models in the past. Just not opamps, and not with a
    pounding flu-infested head like right now ;-)

    Maybe I just place a voltage source in front of every opamp and let it
    step the voltage. I can already hear the comments ... "GAAAAAH" ... and
    .... "EEEUW" ... :)
     
  16. Joerg

    Joerg Guest

    Using the roached on voltage sources right now. Found out another thing
    tho: WC does not like math expressions for the output variable, such as
    ABS(V(yadayada)). It errors on that. Oh man. Ok, I can make a kludge for
    that as well but I must say this is all a bit disappointing. Looks like
    in the end I'll have a sim with two dozen kludges, a couple of car
    jacks, five shims and 10ft of duct tape.
     
  17. Joerg

    Joerg Guest

    Result remains as usual:

    ..WCASE TRAN {ABS(V(PORTLEFT-L))} YMAX VARY DEV HI
    ------------$
    ERROR -- Invalid Expression: Specify either current(I) or voltage(V) or
    digital(D).

    Jamie, same for your version :-(

    Ok, maybe PSpice really can't do that (which would be sad), but if it
    somehow can, what's so difficult about having a more intuitive user
    interface? It could say "Expression "xxxyyxx" errored, did you mean
    "xxxyxx" instead?". Better yet they should keep nomenclature consistency
    between probe and other parts of the program. Because the probe window
    eats and displays it properly, without curly brackets.

    Guess another band aid is needed, an ideal rectifier or a behavioral
    thingamagic with a voltage output. More duct tape :)
     
  18. Jamie

    Jamie Guest

    Did you try (ABS(V(xxxx))) ?

    Jamie
     
  19. Joerg

    Joerg Guest

    Yup, in the function library, and it's in there now :)

    Band aids, band aids ...

    It's a port name. Orcad picked it so I figured PSpice ought to eat it.
    But I'll name all that differently in the real thing. This was just a
    kicking the tires test.
     
  20. Joerg

    Joerg Guest

    Quick follow-up after receiving a response from support: Charlie was
    right, PSpice quietly ignores this stuff unless you buy a license for
    the advanced analysis package. So I'll just kludge voltage and current
    sources in there to get around this.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-