Author Topic: stability and phase margin in ltspice op amps  (Read 534 times)

0 Members and 1 Guest are viewing this topic.

Offline apraxophobiaTopic starter

  • Contributor
  • Posts: 19
  • Country: us
stability and phase margin in ltspice op amps
« on: December 01, 2024, 02:36:55 pm »
Following ltspice (and other) tutorials on measuring phase margin to ensure stability (breaking loop, adding AC source but allowing for DC operating point), I see dramatically different results with different op amps. I expect to see differences in the response of course, but many op amps just give nonsense results (negative gain), while others with drop-in replacement give reasonable results.

Examples shown attached- one op amp (ADA4891) gives a result I think looks reasonable (high DC gain, roll-off at higher frequencies), while another (ADA4625) gives nonsense.

I know these are quite different op amps, but the configurations are identical. Many work, and many others don't, and reading lots of datasheets I can't pin down the pattern.

Added important detail: in time-domain analysis (re-making the circuit), many of the op amps that give nonsense in a phase margin analysis seem to work fine..

Any idea whats going on? Or even where to look? I
 

Offline electron_plumber

  • Contributor
  • Posts: 24
  • Country: us
Re: stability and phase margin in ltspice op amps
« Reply #1 on: December 01, 2024, 05:11:29 pm »
When you're looking for simulation help, make sure you post the entire circuit so we don't have to guess about VCC and VEE, and how/whether your output feeds back to the input. 

In my experience, the amplifier gain and bandwidth should match the datasheet -- sometimes they don't get the higher frequency poles, but at least the dominant roll-off frequency should be captured. Otherwise, the op amp model isn't very useful.
 
The following users thanked this post: apraxophobia

Offline electron_plumber

  • Contributor
  • Posts: 24
  • Country: us
Re: stability and phase margin in ltspice op amps
« Reply #2 on: December 01, 2024, 05:48:51 pm »
I just wired up both amplifiers and ran a quick sim -- I set the power supplies equal to the default supply values in the datasheet spec table and the results look about right to me. You likely had the supplies misconfigured or something.
« Last Edit: December 01, 2024, 06:23:10 pm by electron_plumber »
 
The following users thanked this post: apraxophobia

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5485
  • Country: va
Re: stability and phase margin in ltspice op amps
« Reply #3 on: December 01, 2024, 06:14:15 pm »
The LTspice introduced a .FRA analysis which makes the stability analysis differently - the .AC analysis is not the best tool for it.

AC analysis decomposes the schematics into so called "small signal model" as the first step (no sources, no semiconductors), and then it does the ac analysis with that model.

The .FRA analysis provides the stability analysis (gain and phase margin plots) with the "real" schematics instead.

For example - https://www.eevblog.com/forum/metrology/lm399-based-10-v-reference/msg5347223/#msg5347223
« Last Edit: December 01, 2024, 06:24:46 pm by iMo »
Readers discretion is advised..
 
The following users thanked this post: mikerj, electron_plumber, apraxophobia

Offline apraxophobiaTopic starter

  • Contributor
  • Posts: 19
  • Country: us
Re: stability and phase margin in ltspice op amps
« Reply #4 on: December 02, 2024, 12:14:22 pm »
electron_plumber

That worked! I didn't have supplies mixed up, but was using rails I thought about using in the actual application (-4 - +7V) rather than those in the datasheet. I wonder what causes this since the rails I was using were more than enough to make a 1Vpp sine...

 

Online mawyatt

  • Super Contributor
  • ***
  • Posts: 4076
  • Country: us
Re: stability and phase margin in ltspice op amps
« Reply #5 on: December 02, 2024, 03:53:56 pm »
The LTspice introduced a .FRA analysis which makes the stability analysis differently - the .AC analysis is not the best tool for it.

AC analysis decomposes the schematics into so called "small signal model" as the first step (no sources, no semiconductors), and then it does the ac analysis with that model.

The .FRA analysis provides the stability analysis (gain and phase margin plots) with the "real" schematics instead.

For example - https://www.eevblog.com/forum/metrology/lm399-based-10-v-reference/msg5347223/#msg5347223

We are new to FRA but one issue we've found with this on a MAC running 17.2.4 is the limited frequency resolution available, it seems that FRA was developed more towards SMPS and broadband use.

For high Q oscillators one needs finer frequency resolution than FRA provides, and using the discrete fixed frequency analysis points gets tiresome inputing many points. Would be nice if FRA offered a Linear Sweep type where one can choose small increments about a center frequency, or lower and upper limits with small increments. Being new to FRA maybe this is already available but we couldn't find such.

Here's an example of a 16KHz Peltz Oscillator using the FRA feature and the AC Analysis Bode Technique, the FRA is really coarse.

Best
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 

Offline mtwieg

  • Frequent Contributor
  • **
  • Posts: 331
  • Country: us
Re: stability and phase margin in ltspice op amps
« Reply #6 on: December 02, 2024, 07:08:20 pm »
The LTspice introduced a .FRA analysis which makes the stability analysis differently - the .AC analysis is not the best tool for it.
I have to disagree here. If the circuit in question is linear and time-invariant (LTI) then the .AC analysis is the best option. In such a case the only advantage to the FRA analysis is that it can automatically print out stability margins. But this can also be done with a .meas statement with an .AC simulation.
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5485
  • Country: va
Re: stability and phase margin in ltspice op amps
« Reply #7 on: December 02, 2024, 07:57:03 pm »
..We are new to FRA but one issue we've found with this on a MAC running 17.2.4 is the limited frequency resolution available, it seems that FRA was developed more towards SMPS and broadband use..

Yep, currently the number of points per decade is rather limited. Perhaps good point to escalate into the EZone (the developers sit there).
On the other hand FRA might be much slower, so perhaps they targeted some balance.
But good for broadbanded stuff.

Btw. it seems to me they just put the method described some time back on ADI site - with the "measure commands" (perhaps a dozen lines with some math) - under the new "FRA"..

PS: with this you may go with a finer step

https://ltwiki.org/LTspiceHelpXVII/LTspiceHelp/html/Bode.htm

The ADI article with detailed guide and pictures below (the text seems to be the same as the above ltwiki link) - I cannot find it on ADI anymore.. :)
« Last Edit: December 02, 2024, 08:51:32 pm by iMo »
Readers discretion is advised..
 
The following users thanked this post: mawyatt

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5485
  • Country: va
Re: stability and phase margin in ltspice op amps
« Reply #8 on: December 02, 2024, 08:35:45 pm »
Here is an example - I did in past based on the MikeE's (the LTspice creator and maintainer who "left" ADI couple years back, btw) guide above..
The same as the FRA - but you may set the freq step as you need..
« Last Edit: December 02, 2024, 08:38:02 pm by iMo »
Readers discretion is advised..
 
The following users thanked this post: mawyatt


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf