Op Amp Stability - How to calculate loop gain

Thread Starter

surfline

Joined Aug 12, 2009
39
I'm trying to understand how to determine stability of an op amp.
Upon studying op amp stability: I see finding the loop gain =(Aol* Betta) is essential for determining stability. Open Loop gain can be provided from datasheet from op amp. So then next step is to find Betta or feedback gain to calculate loop gain. .. In online examples with simple resistor dividers, it's easy to infer the feedback gain.
How do you do it for more complex examples like this band pass filter below?
1704328991812.png

Assuming the open loop gain (Aol) is high, can you assume that the Betta = 1 / A_close_loop gain ? Then you just need to simulate the closed loop gain to find Betta.

Then to find loop gain: 20log(Aol*Betta) = 20log(Aol) - 20log(1/Betta) =
20log(Aol*Betta) = 20log(Aol) - 20log(Acl).
Phase Margin = Phase of 20*log(Aol*Betta) or (Phase 20log(Aol) - 20log(Acl))

Is this a correct method?
 

Papabravo

Joined Feb 24, 2006
21,225
I'm trying to understand how to determine stability of an op amp.
Upon studying op amp stability: I see finding the loop gain =(Aol* Betta) is essential for determining stability. Open Loop gain can be provided from datasheet from op amp. So then next step is to find Betta or feedback gain to calculate loop gain. .. In online examples with simple resistor dividers, it's easy to infer the feedback gain.
How do you do it for more complex examples like this band pass filter below?
View attachment 311644

Assuming the open loop gain (Aol) is high, can you assume that the Betta = 1 / A_close_loop gain ? Then you just need to simulate the closed loop gain to find Betta.

Then to find loop gain: 20log(Aol*Betta) = 20log(Aol) - 20log(1/Betta) =
20log(Aol*Betta) = 20log(Aol) - 20log(Acl).
Phase Margin = Phase of 20*log(Aol*Betta) or (Phase 20log(Aol) - 20log(Acl))

Is this a correct method?
Do you get the same result as the Okawa-denshi website gives?
 

Papabravo

Joined Feb 24, 2006
21,225
So here is what it says for an LPF with a corner at 503 Hz. and a Q=0.707
1704331253236.png\1704331362444.png
1704331418390.png
Notice the Nyquist diagram does not encircle the point -1 + j0, so the filter as expected is unconditionally stable.
ETA: You basically get the same result with a band pass filter and the Nyquist never circles the point -1 + j0.
 
Last edited:

Thread Starter

surfline

Joined Aug 12, 2009
39
So here is what it says for an LPF with a corner at 503 Hz. and a Q=0.707
View attachment 311645\View attachment 311646
View attachment 311647
Notice the Nyquist diagram does not encircle the point -1 + j0, so the filter as expected is unconditionally stable.
ETA: You basically get the same result with a band pass filter and the Nyquist never circles the point -1 + j0.
Isn't this this closed loop analysis though? Don't you need to do open loop analysis for stability?
 

LowQCab

Joined Nov 6, 2012
4,075
What is "Open-Loop-Analysis" ???
As far as I know, ( which isn't much ), there's no such thing.
There's always an associated Circuit involved.

With no Feedback, the Output will go High or Low, and continue to sit there
until the Inputs change relative to each other by means of some outside influence.

No-Feedback usually turns an Op-Amp into a comparatively poor Comparitor.

Too much Reactance between the Op-Amp-Output, and it's Inverting-Input,
is a completely different situation that will quite often create an unpredictable Oscillator.

Sometimes You get what You paid for.
.
.
.
 

Papabravo

Joined Feb 24, 2006
21,225
Isn't this this closed loop analysis though? Don't you need to do open loop analysis for stability?
The problem you are thinking about is the construction of a control system with an unknown, or difficult to characterize plant transfer function. You propose a control scheme, and you see if you can determine the efficacy of that scheme. In the case of a filter, you know everything about the location of the poles and the zeros and can avoid creating the conditions for instability by having too much gain and the wrong amount of phase shift.

The tendency of a closed loop system to oscillate depends on the pole locations. For all the filters I have ever seen besides all the ones that I haven't – none have had poles anywhere near the -axis.

From the Wikipedia article on the Barkhausen criteria which posits for the closed loop system:

It states that if A is the gain of the amplifying element in the circuit and β(jω) is the transfer function of the feedback path, so βA is the loop gain around the feedback loop of the circuit, the circuit will sustain steady-state oscillations only at frequencies for which:
  1. The loop gain is equal to unity in absolute magnitude.
  2. The phase shift around the loop is zero or an integer multiple of 2π
Barkhausen's criterion is a necessary condition for oscillation but not a sufficient condition: some circuits satisfy the criterion but do not oscillate. Similarly, the Nyquist stability criterion also indicates instability but is silent about oscillation. Apparently there is not a compact formulation of an oscillation criterion that is both necessary and sufficient.
The full article is here:​
 
Last edited:

LvW

Joined Jun 13, 2013
1,759
What is "Open-Loop-Analysis" ???
As far as I know, ( which isn't much ), there's no such thing.
..................................
Too much Reactance between the Op-Amp-Output, and it's Inverting-Input,
is a completely different situation that will quite often create an unpredictable Oscillator.
And such a situation (additional phase shift in the feedback path) makes it really necessary to analyze the loop gain (open-loop analysis).
For such investigations we can/must apply one of the well-known stabilty criteria (including stability margin determination).
 

LvW

Joined Jun 13, 2013
1,759
I'm trying to understand how to determine stability of an op amp.
Upon studying op amp stability: I see finding the loop gain =(Aol* Betta) is essential for determining stability. Open Loop gain can be provided from datasheet from op amp. So then next step is to find Betta or feedback gain to calculate loop gain. .. In online examples with simple resistor dividers, it's easy to infer the feedback gain.
How do you do it for more complex examples like this band pass filter below?
View attachment 311644

Assuming the open loop gain (Aol) is high, can you assume that the Betta = 1 / A_close_loop gain ?
No that is not correct.
I suppose that you have remembered the closed-loop gain of a simple non-inv. opamp which is Acl=1/feedback factor beta.
But such a simple approach must not be applied for the shown filter stage.

The so called "loop gain" can be found by (a) grounding the input source and (b) find the gain between the two ports which are created when you open the closed loop at a suitable point.

What means "suitable"? Answer: You must find a point in the circuit which can be opened (a) without disturbing the DC operational point and (b) which does not alter the loading conditions at his point.
In your circuit, such a point is the low-resistive opamp output, when you place a test ac voltage (for injecting a test signal) between opamp output and the feedback network.

Moreover, it is not possible to find the phase margin just by calculation. Instead you must find (preferrably by simulation) the loop gain expression and display the function as a Nyquist or Bode diagram. Then, one of the existing methods can be applied for finding the stability margin.

Comment: Normally, it is not necessary to find the stability margin of a filter circuit as shown in the first post. We know that for a bandpass with a relatively high Q-value (Q>10) the closed-loop poles are rather close to the Im-axis of the s-plane - identical to a pretty low phase margin. This is no surprise and does not contain any new information for the user. Moreover, you cannot change (improve) the margin without changing the desired closed-loop filter function.
Of course, this assumes that
(a) the design of the filter (and the calculation of the parts values) was done correctly, and
(b) a suitable opamp was selected for the circuit because - during the design process - the opamp is treated as ideal (infinite gain and no unwanted phase shift).
 
Last edited:

Papabravo

Joined Feb 24, 2006
21,225
It also must be remembered that there is a difference between oscillation and instability. True instability means that poles have moved into the right half plane and the output will grow exponentially without bound. This is most easily demonstrated with a root locus diagram, and happens with 3rd order systems with poles close to the -axis. It is tough to make a 2nd order system do this.
 

Thread Starter

surfline

Joined Aug 12, 2009
39
What means "suitable"? Answer: You must find a point in the circuit which can be opened (a) without disturbing the DC operational point and (b) which does not alter the loading conditions at his point.
In your circuit, such a point is the low-resistive opamp output, when you place a test ac voltage (for injecting a test signal) between opamp output and the feedback network.

Moreover, it is not possible to find the phase margin just by calculation. Instead you must find (preferrably by simulation) the loop gain expression and display the function as a Nyquist or Bode diagram. Then, one of the existing methods can be applied for finding the stability margin.
So just like this?
1704406985938.png
Then loop gain = Simulation of Bode Plot: (V- terminal / Vout) ? Is that correct?
Do you have any other links/articles of this method of simulating loop gain?


Comment: Normally, it is not necessary to find the stability margin of a filter circuit as shown in the first post. We know that for a bandpass with a relatively high Q-value (Q>10) the closed-loop poles are rather close to the Im-axis of the s-plane - identical to a pretty low phase margin. This is no surprise and does not contain any new information for the user. Moreover, you cannot change (improve) the margin without changing the desired closed-loop filter function.
Of course, this assumes that
(a) the design of the filter (and the calculation of the parts values) was done correctly, and
(b) a suitable opamp was selected for the circuit because - during the design process - the opamp is treated as ideal (infinite gain and no unwanted phase shift).
But the band pass filter is still stable though right? Just low phase margin?

Thanks!
 

Attachments

Papabravo

Joined Feb 24, 2006
21,225
I don't think so. But hey, tell me what you get when you do that.
ETA: Here is what I got. With the jumper in place the normal low pass characteristic. Open the loop and we get a singular matrix. I don't know how to proceed from there.

1704416905532.png
 
Last edited:

neonstrobe

Joined May 15, 2009
190
No that is not correct.
I suppose that you have remembered the closed-loop gain of a simple non-inv. opamp which is Acl=1/feedback factor beta.
I would suggest that you are a little disingenuous because the loop gain for a conventional design is indeed Aol*beta, whereas you did not make it explicit that the O.P.'s response ( Betta = 1 / A_close_loop gain ) was actually what you pointed out was wrong, being too simple an approximation.
However, I agree that to ascertain the stability or otherwise of a feedback system you need to determine the gain and phase under actual operating (i.e. closed loop) conditions.
For this to be determined, the open loop gain is needed as a function of frequency. This, I take it, is what you mean by "open loop analysis". The open loop analysis will, or should, provide the open loop gain and phase as a function of frequency which is a key starting point to the closed loop analysis. Typically op-amps are internally compensated and that often means that a simple transfer function can be used, but this is not always the case.
It is also desirable, as you mention, to simulate the response in a feedback system where the feedback (and in this case the input netword) are frequency dependent, since it is easier than calculating the response by hand for several frequencies. On that score, I agree that the function the O.P. uses is not a complete representation of the circuit being discussed.
I also think you might have referred to Tian's paper (Striving for Small-Signal Stability, IEEE circuits and devices magazine, Jan. 2001, pp31-41) as one option for simulating closed loop stability. Not the easiest of reads, but has been widely used.
 

LvW

Joined Jun 13, 2013
1,759
I don't think so. But hey, tell me what you get when you do that.
ETA: Here is what I got. With the jumper in place the normal low pass characteristic. Open the loop and we get a singular matrix. I don't know how to proceed from there.
Sorry, but I do not know what you have simulated and how we can evaluate the results.
I see a signal source at the filters input node and - at the same time - an opening at the opamps output.
Does the graph shows the classical filter response or the loop gain or something else?
 

LvW

Joined Jun 13, 2013
1,759
So just like this?
View attachment 311738
Then loop gain = Simulation of Bode Plot: (V- terminal / Vout) ? Is that correct?
Do you have any other links/articles of this method of simulating loop gain?
.......................
.......................
But the band pass filter is still stable though right? Just low phase margin?

Thanks!
Yes, the signal spource Vin must be grounded for loop gain simulation.
The loop gain is (in dB) the ratio V(out)/Vs (with Vs: Voltage at the upper node of the test signal ac source).
This is the classical (and most simple) method for simulating the loop gain if the loop is broken at the opamps output node.

Is it stable? How can I know without knowing the parts values and the opamp type?
However, I can tell you that for a bandpass with Q=10 the phase margin will approximately be PM=5.7 deg and for Q=20 it will be app. PM=2.86 deg.
 
Last edited:

Papabravo

Joined Feb 24, 2006
21,225
Sorry, but I do not know what you have simulated and how we can evaluate the results.
I see a signal source at the filters input node and - at the same time - an opening at the opamps output.
Does the graph shows the classical filter response or the loop gain or something else?
The response is with the jumper in, and the singular matrix is the error with the jumper out. I was trying for both results on one screen. My point is that opening the loop does not seem to be a viable strategy for the acquisition of information. Maybe the TS could offer some guidance about how he imagines this might be done.
 

LvW

Joined Jun 13, 2013
1,759
The response is with the jumper in, and the singular matrix is the error with the jumper out. I was trying for both results on one screen. My point is that opening the loop does not seem to be a viable strategy for the acquisition of information. Maybe the TS could offer some guidance about how he imagines this might be done.
OK - I see. However, the TS was asking for an anylysis of a bandpass circuit (your circuit is a lowpass).
Regarding opening the loop (you think: "not ....a viable stratgy") I see no other "strategy" than to open the loop for performing a loop gain analysis (this is the basis for defining the loop gain which allows to find the stability margin). Do you know something about an alternative method?
 

Papabravo

Joined Feb 24, 2006
21,225
OK - I see. However, the TS was asking for an anylysis of a bandpass circuit (your circuit is a lowpass).
Regarding opening the loop (you think: "not ....a viable stratgy") I see no other "strategy" than to open the loop for performing a loop gain analysis (this is the basis for defining the loop gain which allows to find the stability margin). Do you know something about an alternative method?
After some additional research I was able to find the information I was missing. The steps are:
  1. Ground the input stimulus
  2. Break the loop at the opamp negative input
  3. Give the two nodes on either side of the break new net names. e.g. "fb" and "im"
  4. Insert a 0V DC source between nodes "fb" and "im"
  5. Give the voltage source an AC=1 stimulus
After running the AC Analysis simulation, Plot the ratio of V(fb)/V(im) to get open loop gain and phase. Place the cursor on the 0dB line and read the phase margin of 40°

1704464984110.png
 
Last edited:

LvW

Joined Jun 13, 2013
1,759
In post #10, the TS is clearly using the lowpass filter. He still has not explained the next steps after setting the input to GND and opening the loop. Simulators clearly have a problem and I'm unsure of how to proceed with the analysis. From the information provided so far, the technique is opaque to say the least.
I must admit - when I look at post#10 I can see the typical MFB-bandpass (the same as in post#1). This fact is easy to verify: C2 blocks DC.

The mentioned technique (open the loop for loop gain analysis) is a well-established method which was used since decades for analyzing stability properties for circuits witrh feedback. Well-known stability criteria (Nyquist, Bode,...) are based on this technique. It is described in many books and other publications.
Therefore, I must admit that I cannot follow your comments ("the technique is opaque to say the least")
 
Last edited:

Papabravo

Joined Feb 24, 2006
21,225
I must admit - when I look at post#10 I can see the typical MFB-bandpass (the same as in post#1). This fact is easy to verify: C2 blocks DC.

The mentioned technique (open the loop for loop gain analysis) is a well-established method which was used since decades for analyzing stability properties for circuits witrh feedback. Well-known stability criteria (Nyquist, Bode,...) are based on this technique. It is described in many books and other publications.
Therefore, I must admit that I cannot follow your comments ("the technique is opaque to say the least")
The technique as described by the TS was opaque. Here is the same open loop analysis for the bandpass case.
1704466638524.png
With the same 40° of phase margin as was the case for the LPF.
 

LvW

Joined Jun 13, 2013
1,759
The technique as described by the TS was opaque. Here is the same open loop analysis for the bandpass case.
OK - perhaps there was a misunderstanding between us.
In the context of your statement in post#15 ("My point is that opening the loop does not seem to be a viable strategy for the acquisition of information") I had the impression that you would generally reject the loop-opening method.
In your last example, however, you used precisely this method. Now we are in agreement.

Here is the same open loop analysis for the bandpass case.
With the same 40° of phase margin as was the case for the LPF.
Yes - I also agree. It is the denominator that determines the pole location resp. the quality factor Q.
Lowpass and bandpass have the same denominator for the same Q value and, therefore, the same stability margin.

Supplementary remark (to the TS "surfline"): In case of an opamp we always have two alternatives for opening the loop without remarkable change of the loading conditions at the opening:
* Opamp output where a very small output resistance is connected to a feedback path having at least (0.5-1)kOhms input resistance, or
* Inverting input terminal where the feedback network is connected to the very large opamps input resistance.

However, in both cases it is necessary to inject the test signal BETWEEN both nodes of the opening because the DC operating point must not be disturbed (DC feedback must remain unchanged).
 
Top