5
\$\begingroup\$

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?

\$\endgroup\$
8
  • \$\begingroup\$ That model is not in LTspice's database, where did you get it from? \$\endgroup\$ Jul 25 at 12:08
  • \$\begingroup\$ Seems no error in schematics \$\endgroup\$
    – Antonio51
    Jul 25 at 12:13
  • \$\begingroup\$ I got it from TI's website. It's the THS4551 PSpice model from the op-amp's design and development section. \$\endgroup\$ Jul 25 at 12:13
  • \$\begingroup\$ ti.com/lit/zip/sbomb92 PSpice model \$\endgroup\$
    – Antonio51
    Jul 25 at 12:26
  • \$\begingroup\$ Concerning stability margin: You are mentioning the word "simulation" only. However, WHAT did you simulate? The loop gain or the closed-loop gain? \$\endgroup\$
    – LvW
    Jul 25 at 12:48

2 Answers 2

2
\$\begingroup\$

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?

\$\endgroup\$
5
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ Jul 26 at 9:37
  • \$\begingroup\$ @FrüchteTony I dare say it's never a bad idea to use choices based on their cause and effect, rather than their appearance. ;-) \$\endgroup\$ Jul 26 at 10:12
  • \$\begingroup\$ Very complicated sometimes to compare simulators ... as some things can be really "different" at the GUI and higher levels. \$\endgroup\$
    – Antonio51
    Jul 26 at 15:41
  • 1
    \$\begingroup\$ @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). \$\endgroup\$ Jul 26 at 16:50
  • \$\begingroup\$ Ok. I thought that "some" parameters are chosen at a higher level than the SPICE "subroutines" / solver (3 methods) / optimizer (7 methods) ... \$\endgroup\$
    – Antonio51
    Jul 26 at 19:30
4
\$\begingroup\$

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

\$\endgroup\$
7
  • \$\begingroup\$ 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. \$\endgroup\$ Jul 25 at 13:02
  • \$\begingroup\$ No worries. Will try with TINA. \$\endgroup\$
    – Antonio51
    Jul 25 at 13:05
  • \$\begingroup\$ 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. \$\endgroup\$ Jul 25 at 13:09
  • \$\begingroup\$ Ok ... I did not read ... you had TINA already used :-( \$\endgroup\$
    – Antonio51
    Jul 25 at 13:14
  • 1
    \$\begingroup\$ Added in answer. \$\endgroup\$
    – Antonio51
    Jul 26 at 7:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.