4

I am trying to understand an example circuit of frequency compensation on driving capacitive loads with an op-amp from: https://www.allaboutcircuits.com/technical-articles/how-to-drive-large-capacitive-loads-op-amp-circuit/

I understand how the capacitive loads cause the stability issue and the idea of using a capacitor to neutralize the phase lag caused by the capacitive load.

It is just very confusing to me how the value of compensation capacitor Cf is determined in the below example.

enter image description here

enter image description here

enter image description here

The second condition imposes:

enter image description here

to make the phase lead introduced by Cf exactly neutralize the phase lag caused by CL. I tried to figure out how this condition was derived but still got no clue. Anyone can help on this? many thanks.

Alex H
  • 41
  • 1
  • This video series might help you -- it uses the same graphical approach to analyzing stability: [(link)](https://www.youtube.com/playlist?list=PL_rLquuhAChH88tZ8HICwdZ_rp9Djl-OB) It's a little slow going -- you might be able to start at video 3 or 4 in the series. – ErikR May 28 '21 at 04:23

3 Answers3

4

In addition to the nice answers you will no doubt get about this theoretical exercise (e.g. from V.V.T), I want to add a practical word of caution (it does not answer your question):

Capacitor values have large tolerances and Class II ceramics have strong DC dependence. Also the output impedance is not well known typically.

So even though you did all the calculations correctly, you might still end up with oscillations. To find a good value for the feedback capacitance will require some experimentation, if you really need the maximum possible bandwidth.

If you anyway are only going to use a bandwidth much below the possible bandwidth, you can and should be very generous about the value of the feedback capacitor. Making it larger than its critical value has no bad consequences other than restricting your bandwidth. Restricting bandwidth is often a good practise to help against interference and aliasing. By way overspeccing this capacitor (e.g. 10x) you also make yourself independent of component variations and guarantee that your designs always work.

tobalt
  • 18,646
  • 16
  • 73
  • Thanks tobalt, this is a very nice add-on to this question. – Alex H May 30 '21 at 23:22
  • @V.V.T the topic you linked discusses something entirely different. It's about bulk decoupling caps. Probably in the mF range.. this here is about picking a 100pF compensation cap instead of the e.g. 12.56 pF a calculation may suggest. But I see that it doesn't answer, which I will make more clear. It is relevant nonetheless. – tobalt Jun 01 '21 at 05:01
  • @V.V.T And I would argue that you cannot allow students to use a formula to calculate a compensation cap value, which 50% of the time will lead to oscillations anyway. And "Not a very relevant reference in my comment, but still more irrelevant is your post. " Come on... my post *is* about compensation caps. That other topic is not. End of argument. I don't see how you can be so offended, but please downvote, that is exactly what this function is there for. – tobalt Jun 01 '21 at 08:17
  • +1 for adding a touch of real world reality to a subject that is often presented in a very mathematical way. In my real world experience of designing op amp circuits, an approach of starting with an simple calculation (e.g. "let's try rolling off at 60kHz") followed by bench testing and a bit of trial and error has certainly been the dominant way of doing things. – danmcb Jun 01 '21 at 09:32
2

Actually, the equation $$ {f_2 \over f_1} = {R_2 \over R_1} \tag{0} $$ is a crucial point of the How to Drive Large Capacitive Loads.. article. Learning aids sometime equate the technique of straightening the transfer function of the linear circuit with pole/zero cancellation, which is bad, because the zero values are unstable w.r.t small variations of circuit parameters which makes the results of circuit analysis often simply wrong. So, if I need to analyze, I do a symbolic calculation on simple circuits like those of frequency compensation feedback designs by directly applying KCL. It is not extraordinary difficult, but takes a certain amount of time and effort.

In his article, Dr. Sergio Franco ingeniously applies a relation which connects only pole values: the pole values do not suffer the uncertainty of zero values. It seems this trick should be credited to him -- I have not found the eqn. 0 some other place.

As for derivation of this equation, he mentions only that "we wish the phase lead introduced by Cf to neutralize the phase lag due to CL". In my answer to the question, I am going to derive this equation and also calculate the recommended feedback capacitor and serial resistor values for the inloop frequency compensation circuit ab ovo.

Assuming the familiarity with Bode plots, for the purely capacitive linear feedback circuit I'd like to calculate the real negative pole values. Notice the values are real and I would rather not name these values "frequencies". My purpose is to derive the ratio of two real negative pole values for the linear circuit with two capacitors and four resistors:

inloopcompensationckt

Notice an internal output resistance Ro shown in the opamp symbol: the opamp output resistance is placed "in the loop" as well as the other elements discussed below. VA is the "internal" output of the opamp excluding the output resistance and the feedback circuit input, VFB is the opamp input and the feedback circuit output.

Let us draw a feedback loop and the capacitive load separately from opamp (only opamp output resistance is included in the loop):

feedbackckt

There are three nodes in this circuit; we write down KCL equations for three voltages at these nodes. The input signal \$V_{in}\$ for the feedback circuit is the opamp's internal output VA, \$V_3\$ is the output node connected to the opamp negative input. For this writing convenience, I use conductances g_x rather than resistances R_x, \$g_x = 1/R_x\$: $$ g_o·(V_1-V_{in}) + g_s·(V_1-V_2) + sC_f·(V_1-V_3) = 0 \\ g_s·(V_2-V_1) + g_2·(V_2-V_3) + sC_L·V_2 = 0 \\ g_2·(V_3-V_2) + g_1·V_3 + sC_f·(V_3-V_1) = 0 $$

We need to find the Rs and Cf component values that give the frequency-independent TF.

First we require that \$V_3(s=0) ≡ V_3(s=∞)\$ and immediately arrive at \$g_s = {g_o·g_1 \over g_2}\$ to fulfill this requirement (see the How To Drive... article, Equation 5). We substitute this value into the equations.

$$ g_o·(V_1-V_{in}) + {g_o·g_1 \over g_2}·(V_1-V_2) + s·C_f·(V_1-V_3) = 0 \tag {1} $$ $$ {g_o·g_1 \over g_2}·(V_2-V_1) + g_2·(V_2-V_3) + s·C_L·V_2 = 0 \tag {2} $$ $$ g_2·(V_3-V_2) + g_1·V_3 + sC_f·(V_3-V_1) = 0 \tag {3} $$

The equations are still unwieldy if we want to immediately derive the \$V_3(C_f)\$ formula and see what \$C_f\$ value makes TF frequency independent. To cope with this difficulty, I use the lemma declaring that for a transfer function, with two real LHP poles and two real LHP zeros, that satisfies the requirement \$TF(s=0)=TF(s=∞)\$, this statement is true: if its first derivative is zero at \$s=0\$, its poles and zeros mutually cancel one another and TF is constant everywhere (all the higher order derivatives are also zero). You can see the proof at the end of this answer.

By force of this lemma, for the frequency-independent TF, it is sufficient to verify that TF's first derivative is zero at \$s=0\$.

Let us write down the power expansions of V1, V2, V3 at \$s=0\$ (McLaurin series) to the first order on \$s\$: $$ V_1(s) = V0_1(1+s·τ_1) \\ V_2(s) = V0_2(1+s·τ_2) \\ V_3(s) = V0_3(1+s·τ_3) \tag {s-linearized voltage defs} $$

\$V0_1,V0_2,V0_3\$ are voltages at nodes 1, 2, 3 for a DC solution (notice that \$R_o + R_s + R_1 + R_2 = (R_o + R_2)(1 + R_1/R_2)\$. To further simplify the expressions, I introduce a variable \$k\$, the ratio of feedback resistor values \$k = R_2/R_1 = g_1/g_2\$. It's been shown that from \$V_3(s=0) ≡ V_3(s=∞)\$ also follows \$g_s = {g_o·g_1 \over g_2} = k·g_o \$: $$ V0_1/V_{in} = {\frac {R_0 R_1 / R_2 + R_1 + R_2} {(R_o + R_2)(1 + R_1/R_2)}} = {\frac {g_o} {g_o + g_2}} + {\frac {g_2} {(k+1)·(g_o + g_2)}} \\ V0_2/V_{in} = {\frac {R_1 + R_2} {(R_o + R_2)(1 + R_1/R_2)}} = {\frac {g_0} {(k+1)·(g_o + g_2)}} \\ V0_3/V_{in} = {\frac {R_1} {(R_o + R_2)(1 + R_1/R_2)}} = {\frac {g_o} {k·(k+1)·(g_o + g_2)}} $$ Substituting the linearized voltage defs into eqns. 1, 2, 3 and omitting second-order \$s\$ terms, we arrive at a new set of equations with unknown variables \$τ_1, τ_2, τ_3\$: $$ (k+1)·g_o·V0_1·s·τ_1 - k·g_o·V0_2·s·τ_2 = s·C_f(V0_3-V0_1) \\ k·g_o·V0_1·s·τ_1 + (k·g_o + g_2)·V0_2·s·τ_2 + g_2·V0_3·s·τ_3 = -s·C_L·V0_2 \\ -g_2·V0_2·s·τ_2 + (k+1)·g_2·V0_3·s·τ_3 = s·C_f·(V0_3-V0_1) $$ Notice that zero-order \$s\$ terms are gone because \$V0_1,V0_2,V0_3\$ satisfy the circuit's DC equations.

Now, one more time we are replacing unknown variables with a new set of new variables \$w_1=(V0_1/V_{in})·τ_1, \, w_2=(V0_2/V_{in})·τ_2, \, w_3=(V0_3/V_{in})·τ_3\$: $$ (k+1)·g_o·w_1 - k·g_o·w_2 = C_f·\left(\frac {g_o} {k·(k+1)·(g_o + g_2)} - {\frac {g_o} {g_o + g_2}} - {\frac {g_2} {(k+1)·(g_o + g_2)}}\right) \tag{4} $$ $$ k·g_o·w_1 + (k·g_o + g_2)·w_2 + g_2·w_3 = -C_L·{\frac {g_0} {(k+1)·(g_o + g_2)}} \tag{5} $$ $$ -g_2·w_2 + (k+1)·g_2·w_3 = C_f·{\frac {g_o} {k·(k+1)·(g_o + g_2)}} \tag{6} $$ After Gaussian elimination (reducing variables w1 and w2), we arrive at the formula for w3 $$ (g_2/k + k·g_o - g_2)·w_3 = -C_L·{\frac {g_0} {(k+1)·(g_o + g_2)}} + C_f{\frac {g_o} {g_o + g_2}}·{\frac {g_2} {(k+1)·(g_o + g_2)}}\left({k·g_o \over g_2}+1\right){1 \over {k+1}} $$ We need not even solve for w3: zeroing the right side gives you the formula for Cf $$ C_f = {\frac {(k+1)^2·g_o·g_2} {(k·g_o+g_2)^2}} C_L \tag {7} $$ In the approximation R0 << R1, R2 we arrive at Dr. Franco's formula $$ C_f = (R_o/R_2)(1 + R1/R_2)^2 C_L \tag {8} $$

To find the pole values for our feedback circuit, we are back to eqns. 1,2,3, where \$k·g_2\$ is substituted for \$g_1\$:

$$ ((k+1)·g_o + s·C_f)·V_1 - k·g_o·V_2 - s·C_f·V_3 = g_o·V_{in} \tag {9} $$ $$ -k·g_o·V_1 + (k·g_o + g_2 +s·C_L)·V_2 - g_2·V3 = 0 \tag {10} $$ $$ -s·C_f·V_1 - g_2·V_2 + ((k+1)·g_2 + s·C_f)·V_3 = 0 \tag {11} $$

Poles (singularities) are arisen at \$s\$ values where the determinant of the coefficient matrix for these equations $$ A = \begin{bmatrix} (k+1)·g_o + sC_f & -k·g_o & -s·C_f·V_3 \\ -k·g_o & (k·g_o + g_2 +s·C_L) & - g_2 \\ -s·C_f·V_1 & -g_2 & (k+1)·g_2 + s·C_f \end{bmatrix} $$ is zero: $$ \det[A] = k·(k+1)·g_o·g_2·(g_o+g_2) + \\ s·(C_L·(k+1)^2·g_o·g_2 + C_f·(k·g_o^2 + (k^2+1)·g_o·g_2 + k·g_o^2)) + \\ s^2·C_f·c_L·(k+1)·(g_o+g_2) = 0 $$ Substituting \$C_f\$ from eqn. 7 and solving the quadratic equation $$ k·(k+1)·g_o·g_2·(g_o+g_2) + s·C_L·(k+1)^2·g_o·g_2(k+1)(g_o+g_2)/(k·g_o+g_2) + s^2·c_L^2·(k+1)^3·g_o·g_2·(g_o+g_2) = 0 $$ we have two roots $$ s_{1,2} = -{\frac {k+1±|k-1|} {2}} {\frac {k·g_o + g_2} {C_L·(k+1)}} $$ The ratio of this two root values is $$ {s_2 \over s_1} = k = {R_2 \over R_1} $$ We have derived Sergio Franco's formula.

APPENDIX

LEMMA: Transfer Function of Two-Capacitor Linear Circuit with Zero First Derivative at s=0 is Constant

A two-capacitor linear circuit have two poles and two zeros: $$ \text {TF}(s) = {\frac {(1-s/z_1)(1-s/z_2)} {(1-s/p_1)(1-s/p_2)}} \\ \text {TF}(0) = 1; \, \text {TF}(∞) = p_1·p_2/z_1·z_2 $$ From \$\text {TF}(0) = \text {TF}(∞) = 1\$ we have \$p_1·p_2 = z_1·z_2\$. From \$d(\text {TF}(s))/ds|_{s=0} = (1/p_1 + 1/p_2 - 1/z_1 - 1/z_2) = 0\$ (the first derivative is zero at \$s=0\$) we have \$p_1+p_2 = z_1+z_2\$.

Let \$r_1 = p_1/z_2, \, r_2 = p_2/z_1\$, then \$r_1 = 1/r_2 = r\$. From \$p_1+p_2 = z_1+z_2\$ we have \$r·z_2 + (1/r)·z_1 = z_1 + z_2\$.

Ergo, either \$r=1\$ or \$z_1 = z_2 = 0\$.

V.V.T
  • 3,521
  • 7
  • 10
1

This is not an answer, but extended comment. The target readers of this post are visitors that come here through searches or links.

There are a few questions on electronics SE about frequency compensation techniques for opamp circuits with capacitive load. The questions have received answers of different quality, and one answer even insists on being "very generous about the value of the feedback capacitor."

Let us follow this instruction for stabilizing a circuit with a quite popular high bandwidth low noise OPA657:

OPA657noninv

The circuit is unstable with component values as given in the circuit drawing. The voltage at opamp's output demonstrates instability:

tranCf1Rs0.01

Following the instruction, we increase Cf to a value of 100 pF:

tranCf100Rs0.01

Instead of alleviating, the effect of Rf increase on stability is detrimental.

Back to Cf=1pF, then apply the out-of-loop frequency compensation trick with an isolation resistor. With Rs=10, the circuit is stable:

tranCf1Rs10

The reason for this behavior is, of course, the peculiar frequency characteristic of OPA657. The "advice" would work for some other opamps and in the frequency ranges where these opamp's poles satisfy certain requirements, but in a "real world" we have many opamp types for diverse applications.

The cited article on Frequency Compensation, How to Drive Large Capacitive Loads.., is about a circuit with the idealized one-pole opamp, and the OP question is about a missed link in the chain of formula derivations, not about capacitor tolerances or output impedance scattering. What's more, I cannot understand how "strong DC dependence" of "Class II ceramics" are the first class citizens for engineers and "guarantee that your designs always work" while symbolic calculations are inferior to the same ends. Why, indeed, the OP should be warned with "a practical word of caution" against learning in depth the frequency compensation techniques?

I hate to discuss the negative phenomena that sometimes can be noticed in engineering Q&A portals. To add positivity to my post, I dare to offer for the attention of electronics practitioners (as opposing to "theoreticians") an online course TI Precision Labs - Op amps, specifically, the section on Stability. If (or when) electronics practitioners master the content of this course, they can follow a more direct route to calculating, for example, the feedback capacitance for one important design, a Si photodiode and opamp circuit, in Hamamatsu's Handbook on Si photodiodes. Section Connection to an op amp (page 9) discusses gain peaking instability and the ways of its elimination, with equations and formulas at only the necessary minimum. Specifically, pay attention to Figure 1-20 Graphical representation of gain peaking with its f1/f2/f3/f4 frequency ranges and how these are used for optimal design. This is a perfect example of practical approach to circuit design, of which the electronics "practitioners" are fervent proponents.

V.V.T
  • 3,521
  • 7
  • 10