LTSpice simulation with LM358, why ⌈Analysis Failed: Iteration limit reached⌋? - Page 1
Forum section: electronics / general

author: old-jo
author_rank: Contributor
timestamp: December 24, 2020, 01:31:02 pm
content: I encountered error message ⌈Analysis Failed: Iteration limit reached⌋ when simulating a circuit.The circuit I simulated was originally by James98 in the topicTransformer Tap Changer - Reducing TPD In Linear Bench Power Supplieson 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 simplicityThis 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:.option itl1=1e5I 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 pressedCtrl+H.So what is going on here, and how do I simulate this circuit correctly?(LTSpice schematic attached)

author: E-Design
author_rank: Regular Contributor
timestamp: December 24, 2020, 02:01:53 pm
content: Quote from: old-jo on December 24, 2020, 01:31:02 pmright there. try changing to a different OP and run again. If it works, the problem is in the model (unsurprising)

author: old-jo
author_rank: Contributor
timestamp: December 24, 2020, 02:20:57 pm
content: 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!

author: Warhawk
author_rank: Frequent Contributor
timestamp: December 30, 2020, 07:28:37 pm
content: 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.

author: old-jo
author_rank: Contributor
timestamp: December 30, 2020, 07:36:08 pm
content: 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.

author: SiliconWizard
author_rank: Super Contributor
timestamp: December 31, 2020, 05:23:26 pm
content: Quote from: Warhawk on December 30, 2020, 07:28:37 pmI 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.