This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TINA/Spice/OPA197: as a Comparator Simulation Convergence Problem

Part Number: OPA197
Other Parts Discussed in Thread: TINA-TI,

Tool/software: TINA-TI or Spice Models

Hello Team,

There is a convergence problem simulating OPA197 in comparator circuit with hysteresis 10k-ohm and 300k-ohm resistor; however using 100k-ohm and 3M-ohm resistor can solve the problem.

The simulation file is attached here.

OPA197 Comparator.TSC
Could you let us know why 10k-ohm and 300k-ohm show convergence problem?

Thank you.
Regards,
Ting

  • Hi Ting,

    add a negative supply voltage of 0V. This will make it work for me:

    OPA197 Comparator-1_1.TSC

    Kai

  • Hi Ting,

    The convergence issue appears to be caused by the portion of the OPA197 macromodel responsible for modelling the OPA197's claw curve, and may be caused by the rapid change of output voltage on the OPA (especially since this circuit uses positive feedback). While Kai's suggestion of adding a 0V negative supply as a "node-breaker" didn't work for me, I was able to get the simulation to run by changing the following analysis parameters (configured through Analysis > Set Analysis Parameters):

    This should cause TINA to segment both the transient excitation and simulation time interval into smaller segments, which helps improve convergence with rapid transients. 

    Another setting which had some impact on my simulation's convergence was by changing the Transient Integration Method (found in Analysis > Options) from Gear to Trapezoidal. 

    Switching to a higher resistance may have caused the simulation to converge for a number of reasons. First off, the larger resistance would have reduced output current from the OPA197, causing TINA to find a different operating point and therefore simulate under a slightly different set of conditions. It's also possible that the larger feedback resistance combined with the input capacitance of the OPA197 slowed the circuit response down, which would have a similar effect to the change in parameters I recommend above. 

  • Hi Alexander,

    thanks for the tip!

    Is this the usual method to make a simulation run when it hangs? Or is it only working with this certain OPA197 circuit here?

    Kai
  • Hi Kai,
    This may not always work, but it's definitely a good method to try in situations like these. It may help convergence when the circuit experiences fast transients, as it forces TINA to use a smaller simulation timestep. This can also help reduce artifacts around step responses, as TINA sometimes doesn't reduce its simulation timestep quickly enough around edges.
  • Hello Alex,

    Thank you for the prompt supports!
    It solves the problem!

    Regards,
    Ting
  • Hi Alexander,

    that's very good information. I will keep an eye on this in my next simulations...

    Thank you!!

    Kai
  • Hi Alexander,

    your trick already worked...

    e2e.ti.com/.../2939374

    Kai