5

I tested the following circuit including a fully differential op-amp for stability in LTspice. The circuit has an inverting gain of 6 and a roll-off at 4 MHz. When exciting the circuit with a step, the op-amp starts oscillating.

Circuit for time domain analysis:

enter image description here

Step response:

enter image description here

So I decided to check the gain and phase margin with a loop gain simulation.

Circuit for loop gain analysis:

enter image description here

AC analysis:

enter image description here

The simulation gives me a phase margin of about 35° and a gain margin of about 8 dB, so the circuit should be stable. Does anybody know what the problem is? Did I wire the circuit incorrectly for loop gain simulation?

ocrdu
  • 8,705
  • 21
  • 30
  • 42
FrüchteTony
  • 109
  • 5

2 Answers2

4

Don't know if this can help.
Made with microcap v12.

EDIT: sometimes, some "parameters" need to be changed ... "standard" or "power" defaults ...
ITL1, ITL2, ITL4 (rarely), more often "trapezoidal" or "gear", VNTOL, TRTOL.

enter image description here

I used THS4521 (THS4551 not in my database) which is "equivalent".

No problems were encountered with TRAN Analysis and gain was verified.

enter image description here

Ac analysis

enter image description here

EDIT: I Added THS4551 in my database, very "similar" to THS4521.

enter image description here

enter image description here

Antonio51
  • 11,004
  • 1
  • 7
  • 20
  • Thanks for the THS4551 PSpice model. I tried to get it working in LTSpice, but unfortunately I always got some "floating and connected to current source" errors when trying to run a simulation. A simulation in Tina-TI looks fine though. I probably got some faulty model then. – FrüchteTony Jul 25 '22 at 13:02
  • No worries. Will try with TINA. – Antonio51 Jul 25 '22 at 13:05
  • Sorry, you got me wrong. I already simulated it with Tina-TI. Took me a while though as I am not used to the program. – FrüchteTony Jul 25 '22 at 13:09
  • Ok ... I did not read ... you had TINA already used :-( – Antonio51 Jul 25 '22 at 13:14
  • After seeing that you used Microcap 12, I did a simulation in LTspice and Microcap 12 with the exact same spice model from TI's website. The circuit only oscillates in LTspice. I somewhere read that LTspice has problems with some third-party models. Maybe this is the case here... – FrüchteTony Jul 26 '22 at 07:03
  • Ok. Probably, you should see if the general "parameters" are the same (sometimes, I adjust ITLx or others). Very rarely. Often change "standard" parameters to "power" parameters when simulating with power MOSFET, for example. – Antonio51 Jul 26 '22 at 07:20
  • 1
    Added in answer. – Antonio51 Jul 26 '22 at 07:26
3

You are using the startup flag which adds a fixed 10 μs ramp to the DC sources. In your case, the only sources that are DC are the power supplies, and the total simulation time is 1 μs. Which means that your opamp is powered by a ramp from 0...0.25 V for the duration of the simulation, obviously not enough.

Why do the oscillations appear? That's because of the way the .model is built, internally. You should know that the SPICE world is made of approximations, only, and some of them come at various costs. This seems to be one of them (BTW, did you notice that your input pulse is negative?):

unstable with startup

As soon as you remove the offending parameter you will see a different result:

problem solved

When comparing the behaviour of circuits under different simulators, first make sure that all the parameters are set so all of them work under the same conditions. In this case, startup is not needed. That flag is useful in oscillators (while accounting for the 10 μs ramp), or in power supplies that need a small ramp, instead of an abrupt power-up. It also causes the simulation to start in transient mode, making you wait the whole transitory period. If all you want is to analyze some I/O behaviour then startup is not a good choice. Instead, rely on the way SPICE solves for he operating point. After all, you're not interested in the initial, power-up phase, are you?

a concerned citizen
  • 21,167
  • 1
  • 20
  • 40
  • 1
    I remember using the startup function when testing an oscillator. I totally did not think that it would be harmful to activate it in this case. It seemed to me that "two" excitations would be even better. – FrüchteTony Jul 26 '22 at 09:37
  • 1
    @FrüchteTony I dare say it's never a bad idea to use choices based on their cause and effect, rather than their appearance. ;-) – a concerned citizen Jul 26 '22 at 10:12
  • Very complicated sometimes to compare simulators ... as some things can be really "different" at the GUI and higher levels. – Antonio51 Jul 26 '22 at 15:41
  • 1
    @Antonio51 The GUI has nothing to do with the undelying engine. Microcap, LTspice, ngspice, PSpice, HSPICE (maybe not this one, it has suffered a lot of changes in time, AFAIK), etc, all have a solver underneath, and the majority of them use the implicit trapezoidal. And the setting (`*tol` & co) have to be accessible, somewhere. The setting may not be easy for comparison purposes but it does help to know the "knobs". of course, if the solvers are different then the results are different, but even then it shouldn't be too much, since SPICE, in general, is made to be reliable (deterministic). – a concerned citizen Jul 26 '22 at 16:50
  • Ok. I thought that "some" parameters are chosen at a higher level than the SPICE "subroutines" / solver (3 methods) / optimizer (7 methods) ... – Antonio51 Jul 26 '22 at 19:30