dragontamer 9 hours 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 3 hours 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.

  • FunkyDuckling 7 hours 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.

    • dsv3099i 4 hours 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.

    • arijo 7 hours 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.

Buttons840 6 hours ago

This is tangential, but I took an EE class at community college and the very first thing they did was start teaching op-amps. I don't remember ever getting any insight from working with them, only that we had to follow instructions and build one in the lab.

When I see people asking questions about op-amps and doing "deep dives" into op-amps, I'm left wondering what's so deep about these things we do in week 2 of EE 101.

I've forgotten almost everything from that class though, so maybe it was just a bad class? I switched majors and never took another EE class.

  • masspro 5 hours ago

    It is a headscratchingly bad idea to put op-amps in week 2 of course #1. I can’t even remember for sure if we did them in the first course, but if so, it was at the very end, after you already know how to do algebraic working-out of values in a circuit. From there, they give a couple algebraic rules to figure out what an op-amp circuit does. And a key point that is usually glossed over is: op-amps are basically useless when not in a feedback configuration, and some of the analysis rules are based on already assuming the op-amp is in a feedback configuration.

  • analog31 6 hours ago

    I'd say that nothing can be covered deeply in an introductory survey class. If it's being taught at the 101 level, the students don't yet have the math to scratch anything beneath the surface. And one of the points of op amps, if not the main point, is the correspondence between their mathematical representation, and their real world behavior.

    There are entire books about op amps and their uses. They're a cornerstone of analog design.

    • Buttons840 5 hours ago

      Now that you mention it, I remember the point was the difference between the theoretical math and the actual behavior.

      • WJW 4 hours ago

        I can definitely see how a more advanced student can get a ton of valuable insights about the "abstraction leaks" of opamps, and I would even submit that opamps could be a particularly fertile place of such leaks (for our more software minded brethren: opamps are like databases: they are perfect until you start to push their boundaries and then you very quickly start to see just how imperfect they are), but I doubt you can teach a student enough about the theoretical math to get a useful intuition about the behavior of opamps in under 2 weeks.

      • analog31 3 hours ago

        Indeed, but you have to grasp one before it makes sense to learn about the other, and neither is going to happen in a 101 class.

  • michaelt 5 hours ago

    > I'm left wondering what's so deep about these things we do in week 2 of EE 101.

    Part core concept, part outdated nonsense that's taught due to tradition.

    If you've got components that can halve a voltage, then by putting that in a feedback loop you can double a voltage.

    And you can make an accurate amplifier even if some of your components - like the op-amp's gain - are inaccurate. So long as your voltage-halving components are accurate, your voltage doubler will be accurate whether your op-amp's gain is 10000x or 20000x

    You can chuck other components into the feedback loop too - want a higher current output from your voltage doubler? Have the op-amp control a high-power transistor.

    You know how a feedback loop can turn a voltage-halver into a voltage-doubler? It can invert other mathematical functions too. Put a capacitor into your op-amp circuit and you can integrator or differentiate. There are even op-amp circuits for summing inputs!

    You now understand feedback loops, precise gains, power output stages, integration and differentiation. You can now make a PID controller - a key concept in control theory! Just what you need to position control a robot's joints.

    Except making PID controllers out of op-amps is obsolete; they're all done in software these days.

  • fourier54 6 hours ago

    If your only interaction was "follow instructions and build one in the lab", doesn't that tell you exactly there is something deep you didn't understand at all?

  • szundi 6 hours ago

    These are pesky little things

  • Metacelsus 5 hours ago

    Yeah I was very confused by them in high school, I just internalized "op amps are weird" and then became a biologist. This article was a great explainer. Similar feedback loops happen in biology!

  • pbazarnik 2 hours ago

    When I first discovered OPAMPs I my teen years while self learning the electronics I was astonished by the beauty and power of an abstract opamp: the mythical component with infinite differential voltage gain, zero common mode gain, infinite input impedance and zero output resistance. This marvelous device can only exist, without destroying the world by its infinite output power, by staying in equilibrium defined by negative feedback. /s

    You have to appreciate the reason it was invented in Bell Labs: analog computers, which primary applications at that time were in military applications for computing artillery solutions.

    Now, as a professional EE, I still think fondly of them, even though I know well about their real life limitations. My advice is to try to stay first at ideal OPAMP abstraction level to appreciate the mathematical usefulness of that abstract construct. This is almost entirely how professionals use them.

    I can only lament the educational system, which invariably makes the students miss the forrest for the trees by not presenting well the power of ideal opamp

neuralRiot 5 hours 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.

RossBencina 3 hours ago

If you want an actual deep dive watch James K. Roberge's OCW course and/or get the book "Operational Amplifiers Theory and Practice".

buildsjets 8 hours ago

But the ringing, sustained oscillations, and excessive gain are sometimes desired characteristics of a particular op-amp implementation.

https://youtu.be/SrS9EtfcANg?si=MwbtbuPWu85Tbjzq

  • analog31 8 hours ago

    Sure, the Wien bridge oscillator. But then, oddly enough, even sustained oscillations need to be controlled in their amplitude, and the Wien Bridge has a secondary feedback loop for that purpose -- the temperature dependent resistance of a light bulb.

  • ericwood 8 hours ago

    Those op amp characteristics aren't really coming into play for that delay sound, it's just vanilla digital delay. Most of the "vibe" of the DD-3 is coming from the companding and filtering scheme it uses to work around the limitations of the digital pieces.

    You will hear the effects of this in many hard clipping distortion circuits, though, where the amplifier gain factor will far exceed the voltage rails and be pushed into undefined clipping territory. Behaviors in this range can be an important part of the sound, e.g. the Proco Rat and the infamous LM308 op amp with its slow slew rate. Some like the TL072 exhibit a really nasty phase inversion that results in a pretty horrific (usually undesired) distortion.

    It's a balancing act, though; search "op amp motorboating" in any DIY stompbox forum and you'll find thread after thread of people trying to keep op amp gain stages from oscillating. I know more than a few noisier artists who enjoy when designs can be tortured into doing that, though :)

    • kazinator 2 hours ago

      Motorboating feels like a strawman version of op-amp oscillation. It occurs because the tinkerers are using single supply circuits, without adequate bypassing to ensure that their virtual ground network has very low resistance. Thus the current dumped to ground by any circuit generates a voltage which appears to it and all the other circuits (ground loop). Another ingredient in motorboating is that there are multiple amplification circuits cascaded together which are coupled using capacitors (due to the single supply operation, again, which tends to discourage DC coupling). The ground loop creates a feedback path across multiple amplifiers, and the coupling capacitors create the phase shift.

      • ericwood an hour ago

        I'm not sure what you mean by "strawman version of op amp oscillation"; for many it's the colloquial term for oscillation. You can accomplish it very easily with many classic distortion circuits, especially on a breadboard. Guitar pedals are almost always run off a unipolar 9V supply. Large bypass caps are the normal (usually cargo culted over as a 100u at the input).

        There's a lot of constraints that either remain due to the restrictive power supply requirements on top of tradition or people building off designs from the 90s that were hand assembled and took BOM golf to the next level.

davidhyde 4 hours ago

What an absolute goldmine of a website. So many varied topics. Just amazing.

Metacelsus 5 hours ago

Until reading this article I never really understood what an op-amp actually did (I remember coming across them as high schooler and being confused).

082349872349872 8 hours ago

to what degree does the Gartner hype cycle resemble the Gibbs phenomenon?

  • marcosdumay 7 hours ago

    To the degree that society is a complex system with feedback.

    But notice that the Gartner hype cycle is full of unjustifiable hidden assumptions (like the fact that the thing being hyped is useful at all) so it has no predictive power. It only happens that some times people act like that.

    Also, there's no guarantee that the society's response to a change will be stable.

    • WJW 4 hours ago

      One of the most "useful" insights I ever had is that

      0. Any transfer function higher than 2nd order overshoots.

      1. Society is super complex, has a ton of internal feedback loops and would easily be higher than 2nd order.

      2. So of course it overshoots all the time.

      I haven't been able to actually "use" it for anything but it does describe a lot of what we see every day in society.

      • RossBencina 3 hours ago

        > Any transfer function higher than 2nd order overshoots.

        That's false. Any LTI system higher than first order might overshoot. But it's easy to design high-order systems that don't overshoot. Consider for example a cascade of first-order sections. Related terms: Bessel filter, complex vs real poles, overdamped system.

sobriquet9 8 hours ago

The tape delay methaphor confused me. Tape recorders do not record DC or other frequencies much lower than, say, 20 Hz. So that circuit would run into one of the rails just as quickly as the previous cirquit without DC feedback.

  • mrob 7 hours ago

    It must be an FM encoded tape, which can record DC. There were upgraded versions of both VHS and Betamax with FM audio support (although I expect in practice the inputs were AC coupled).

    • sobriquet9 2 hours ago

      FM audio does not carry DC either. PLL in the receiver/decoder will eventually catch up with the constant frequency shift.