Author Topic: LTSpice simulation with LM358, why ⌈Analysis Failed: Iteration limit reached⌋?  (Read 4921 times)

0 Members and 1 Guest are viewing this topic.

Offline old-joTopic starter

  • Contributor
  • Posts: 24
  • Country: id
    • Blog Joshua
I encountered error message ⌈Analysis Failed: Iteration limit reached⌋ when simulating a circuit.

The circuit I simulated was originally by James98 in the topic Transformer Tap Changer - Reducing TPD In Linear Bench Power Supplies on Reply #6. Please see that topic for the context of what I was trying to simulate.

The changes I made to James98's circuits are:
  • Changed the opamps to LM358. In LTSpice I included the LM358 subcircuit from Texas Instruments: LMx58_LM2904 PSPICE Model (Rev. A)
  • Ommitted the BJTs and relays for simplicity

This was the circuit that I simulated:


(Sorry, I do not understand how to add inline image. The image is below, at the end of the post.)

To mimic the adjustable regulator, change the value of V3.
As I simulated using V3 values from 6V to 18V, the DC operating point analysis run without problem.
But when I simulated with V3 values from 19V and greater, I encountered the error message ⌈Analysis Failed: Iteration limit reached⌋.

Can anyone tell me why?

I have searched the web and found this page: Overcoming SPICE Convergence Issues. All I understand from that page is that the simulation can be controlled by those Spice directives. So I tried adding this directive:

Code: [Select]
.option itl1=1e5
I tried to up the V3 to 32V and run the simulation again, and this time it run and never finishes. After around 10 minutes I just give up the simulation and pressed Ctrl+H.

So what is going on here, and how do I simulate this circuit correctly?

(LTSpice schematic attached)
« Last Edit: December 24, 2020, 01:34:51 pm by old-jo »
 

Online E-Design

  • Regular Contributor
  • *
  • Posts: 206
  • Country: us
  • Hardware Design Engineer



right there. try changing to a different OP and run again. If it works, the problem is in the model (unsurprising)
The greatest obstacle to discovery is not ignorance - it is the illusion of knowledge.
 
The following users thanked this post: old-jo

Offline old-joTopic starter

  • Contributor
  • Posts: 24
  • Country: id
    • Blog Joshua
You are right: it was the model.

As replacement, I chose TLV2372 because I saw a suggestion in the topic: Recommended single supply rail-to-rail jellybean op-amp? on Reply #4 by T3sl4co1l.
The TLV2372 model is from Texas Instruments: TLV2372 TINA-TI Spice Model (Rev. A).

I tried V3 value 18V, no problem.
19V no problem.
22V no problem.
32V no problem.
To clarify, the simulation no longer use the itl1 directive.

So it was the LM358 model that was problematic all along.

Thank you, E-Design!
« Last Edit: December 24, 2020, 02:23:18 pm by old-jo »
 
The following users thanked this post: T3sl4co1l

Offline Warhawk

  • Frequent Contributor
  • **
  • Posts: 832
  • Country: 00
    • Personal resume
For reasons, that are beyond my understanding, some spice models use the net "0" for the internal circuitry. Isn't this the case? The problem is that once you start drawing a diagram outside of the subcircuit and you use "0" net for the reference point you may short some internals. This is often true for circuits using floating opamps.

 

Offline old-joTopic starter

  • Contributor
  • Posts: 24
  • Country: id
    • Blog Joshua
I have no idea. All I know is that after I change the opamp model/subcircuit, the simulation runs without that error message anymore. I'll have to do more reading about net "0" that you talk about, because that is new to me.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15321
  • Country: fr
For reasons, that are beyond my understanding, some spice models use the net "0" for the internal circuitry. Isn't this the case? The problem is that once you start drawing a diagram outside of the subcircuit and you use "0" net for the reference point you may short some internals. This is often true for circuits using floating opamps.

I have never run into such a model myself (or I don't remember), but such models are just plain wrong.

The "0" net is not just a convenience to represent ground that you can change to anything else. AFAIK, PSpice uses the "0" net for DC bias, so a PSpice circuit without a "0" net can't be simulated.

The consequence is: any model using the "0" net would force you to define another net for your circuit ground, and then reference all voltages relative to this net (for measuring/plotting/...), which is a royal pain. And as you said, that is assuming you KNOW. If you don't know the model has this issue, then you might just short signals without knowing it.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf