stability and phase margin in ltspice op amps - Page 1
Forum section: electronics / projects

author: apraxophobia
author_rank: Contributor
timestamp: December 01, 2024, 02:36:55 pm
content: 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

author: electron_plumber
author_rank: Regular Contributor
timestamp: December 01, 2024, 05:11:29 pm
content: When you're looking for simulation help, make sure you post theentirecircuit 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.

author: electron_plumber
author_rank: Regular Contributor
timestamp: December 01, 2024, 05:48:51 pm
content: 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.

author: iMo
author_rank: Super Contributor
timestamp: December 01, 2024, 06:14:15 pm
content: 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

author: apraxophobia
author_rank: Contributor
timestamp: December 02, 2024, 12:14:22 pm
content: electron_plumberThat 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...

author: mawyatt
author_rank: Super Contributor
timestamp: December 02, 2024, 03:53:56 pm
content: Quote from: iMo on December 01, 2024, 06:14:15 pmWe 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

author: mtwieg
author_rank: Frequent Contributor
timestamp: December 02, 2024, 07:08:20 pm
content: Quote from: iMo on December 01, 2024, 06:14:15 pmI 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.

author: iMo
author_rank: Super Contributor
timestamp: December 02, 2024, 07:57:03 pm
content: Quote from: mawyatt on December 02, 2024, 03:53:56 pmYep, 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 stephttps://ltwiki.org/LTspiceHelpXVII/LTspiceHelp/html/Bode.htmThe 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..

author: iMo
author_rank: Super Contributor
timestamp: December 02, 2024, 08:35:45 pm
content: 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..