Deep dive: the instability of op-amps

lapnect | 115 points | 7mon ago | lcamtuf.substack.com

dragontamer|7mon ago

It's almost criminal that all of these bode plots are missing their phase diagrams.

Phase diagrams + OpAmp phase shift specs / phase margin are what you need to predict instability.

-------

EDIT: IMO it's also a lot easier to explain in the frequency domain. At 180-degree phase shift, all your negative feedback turns into positive feedback, causing instability. You need your amplifier to stay as far away from 180-degree phase shift as possible.

I get that what the author was trying to get to with the 'Tape Delay OpAmp' example. But it should be double downed upon and the starting point of the discussion rather than something brought up later IMO.

ChuckMcM|7mon ago

I appreciate what you're saying. That said, not everyone learns the same way and for me, his explanations have always been clear and insightful. My theory is that different brain architectures ingest information in different ways (this is actually studied but not conclusively proven AFAICT) and that the language of exposition has a sort of 'impedance match' with brain architecture. So sometimes you can say something and the person hearing/reading it will just "get it" right away, and sometimes they will look at you like "that didn't help at all."

That said, I agree that if you're used to thinking about things in the frequency domain it makes sense to explain it in those terms. Myself, as a young EE in college found thinking about things in the frequency domain to be useless, in part because I didn't understand the math, and in part because I didn't really understand sinusoidal waveforms. It wasn't until I started diving into SDRs and really unpacking the FFT and how it worked and why did I manage to connect a lot of dots that retroactively gave me a better insight into what my control systems professor was trying to teach me back in the day.

H8crilA|7mon ago

You don't actually need to reach for theories about the inner workings of a brain. A person's education history can strongly bias towards one form of information presentation over another. For example imagine a self learned musician who doesn't even know the notation vs a classically trained one.

FunkyDuckling|7mon ago

I agree.

Phase Margin (How far away you are from 180 Phase Shift) is a critical parameter used whenever designing any kind of feedback loop and testing for stability.

This is very to measure at the 0dB gain he pointed out, but lacked the phase diagram to show this shift.

arijo|7mon ago

This is only true for LTI (linear time-invariant systems).

Nonlinear systems responses to a sine signal are in general not just a change in phase and amplitude.

It works if the perturbation stays small and within a linearised version of the dynamics.

dsv3099i|7mon ago

I agree the overall math is easier in the frequency domain, especially because you don’t know which frequencies are problematic so best to look at all of them, but I think the concept is best explained at first, in the time domain.

Here’s my attempt in a couple of sentences.

It takes time for the signal to propagate from input to output in any real circuit. If that time is a substantial fraction of the period under consideration then the input of the amplifier, which includes the feedback signal, cannot effect the output before it has moved. And if the delay through the amplifier is just wrong relative to the signal period one can end up in a dog chasing its own tail situation and the output oscillates.

The rest is just math. :)

P.S. this explanation also explains why we use phase and not seconds to measure the delay of the circuit. Because everything is relative to the input signal period and if we use phase we get that for free. No extra divide.

neuralRiot|7mon ago

Ahh the good times I remember designing and building some configurable audio crossovers with “memories” so they could be adjusted and stored. This was of course before DSPs were even a thing. We gave up because the only solutions were inserting mosfets on the opamp loop or using transconductance opamps. Both solutions were terrible in terms of audio quality, we decided for “cartridges” that were the whole x-over stage.