# Help needed with RC Phase Shift Oscillator Analysis

I simulated the following circuit from page 439 of “The Art of Electronics, fig.7.23”. It works fine and outputs $$\\approx 1\ \rm{kHz}\$$ as expected. My question is around the theory, I expected the 3 RC stages to give a phase shift of 60˚ each at around 1 kHz, providing the necessary 180˚ phase shift to get the circuit oscillating, but by my calculations each stage only shifts by -22˚;

By my calculations;

$$R = 10\ \rm K\Omega, \quad C = 39\ nF$$

$$X_c = \frac{1}{2\pi fC} = \frac{1}{2\pi \cdot 1000\ \rm {Hz} \cdot 39\times 10^{-9}} = 4.08\ \rm K\Omega$$

$$\Phi = \arctan \frac{X_c}{R} = \arctan \frac{4.08\ \rm K\Omega}{10\ \rm K\Omega} = -22.2˚$$

I've checked over this calculation and I can't see where I went wrong, if I did, I tried it with online calculators too and so on. The book describes it as each successive stage of RC filter rotates the signal at the chosen frequency around by 60˚, but is the actual behaviour more complex than simply additive?

• Do your calculations match the simulation? Can you see that only first stage RC is driven from nearly zero output impedance, but the following stages are driven by the previous stages? Commented Jun 12 at 18:49
• The whole chain should amount to 180 degrees. But probe the phase difference between each RC stage. Like Justme mentions, you have to consider the loading effects. Fun exercise: Put voltage followers between each stage and redo the analysis. Commented Jun 12 at 18:57
• Thanks both, the fog is clearing a little. But I think I may be in a little over my head.. I can see that only the first stage can be directly computed as I did. Using 1/(1/Xc + 1/R) I think the output impedance of the previous stage will be roughly 2.9k, but then adding this to the next stage phase shift makes the angle even less than 22˚, do you need to consider the real and complex parts of the output impedance separately? I probed individually and see the increasing shift stage by stage (I think), voltage followers WERE fun, not sure I understood it to well though! Commented Jun 12 at 20:10

### overview

The nub of it is that each following stage loads down the prior stage. So that changes things. I'll call all three resistors as $$\R\$$ and all three capacitors as $$\C\$$:

It's really just three voltage dividers fed by a non-ideal source and feeding a load of some kind:

simulate this circuit – Schematic created using CircuitLab

But you should be able to see that following divider stages load down prior ones. And, therefore, when working out each divider you need to take into account their load in parallel with their $$\C\$$.

### specifics

In your case the non-ideal source impedance is low -- likely very much smaller than $$\10\:\text{k}\Omega\$$. So just assume it's zero for now. But you do have a load, which is $$\R_{_\text{L}}=50\:\text{k}\Omega\$$. I'd like to also ignore it, for now. Just to keep things simple. Feel free to include it on your own, though.

With that setup, you have a very simple transfer function for each stage: $$\G_i=\frac1{1+\frac{R}{Z_{_\text{C}}\:\mid\mid \:Z_{_{i+1}}}}\$$. So the net transfer function here is: $$\G=\prod_{i=1}^3 G_i\$$ (assume $$\Z_4=R_{_\text{L}}=\infty\:\Omega\$$ for now):

\require{cancel}\begin{align*} G_s&=\frac1{1+\frac{R}{Z_{_\text{C}}\:\mid\mid \:Z_{2}}}\cdot\frac1{1+\frac{R}{Z_{_\text{C}}\:\mid\mid \:Z_{3}}}\cdot \frac1{1+\frac{R}{Z_{_\text{C}}\:\mid\mid \:Z_{4}}}\\\\ &=\frac1{1+\frac{R}{Z_{_\text{C}}\:\mid\mid \:\left(R+\left[Z_{_\text{C}}\:\mid\mid \:\left(R+Z_{_\text{C}}\right)\right]\right)}}\cdot\frac1{1+\frac{R}{Z_{_\text{C}}\:\mid\mid \:\left(R+Z_{_\text{C}}\right)}}\cdot \frac1{1+sRC}\\\\ &=\frac1{1+5R^2C^2s^2+s\left(6RC+R^3C^3s^2\right)} \end{align*}

Setting $$\s=0+j\omega\$$ ($$\\sigma=0\$$) and setting $$\\tau=RC\$$ the above reduces to:

\begin{align*} G_\omega&=\frac1{1-5\tau^2\omega^2+j\left(6\tau\omega-\tau^3\omega^3\right)} \end{align*}

For a phase shift of $$\180^\circ\$$ the imaginary part must go to zero, so:

\begin{align*} 6\tau\omega-\tau^3\omega^3&=0\\\\ 6\tau\omega&=\tau^3\omega^3\\\\ 6&=\tau^2\omega^2\\\\ \omega&=\frac{\sqrt{6}}{\tau} \end{align*}

Since $$\f=\frac{\omega}{2\pi}\$$ then $$\f=\frac{\sqrt{6}}{2\pi\,\tau}=\frac{\sqrt{6}}{2\pi\,10\:\text{k}\Omega\,\cdot\,39\:\text{nF}}\approx 999.6\:\text{Hz}\$$.

Which is pretty close to $$\1\:\text{kHz}\$$.

### returning to the $$\50\:\text{k}\Omega\$$ load

Feel free to now add in the $$\50\:\text{k}\Omega\$$ load to see how that adjusts this value.

If you get all the bits right it will work out to $$\f=\frac{\sqrt{6\,+\,\frac{4\,R}{R_{_\text{L}}}}}{2\pi\,\tau}\$$. Here, with $$\R_{_\text{L}}=50\:\text{k}\Omega\$$ then $$\f\approx 1064\:\text{Hz}\$$.

### output magnitude

The three stages, ignoring the $$\50\:\text{k}\Omega\$$ load, also dampen the input by a factor of $$\\mid\:G\left(j\omega\right)\mid\:=\frac{1}{29}\$$. This means that the tap seen by the lower opamp will be diminished by that much. Since the input source is close to $$\10\:{\text{V}_\text{PP}}\$$ that the output at that node will be about $$\345\:{\text{mV}_\text{PP}}\$$. With a gain of $$\1+\frac{40\:\text{k}\Omega}{10\:\text{k}\Omega}=5\$$ this means I'd expect the sinusoidal output to be $$\\approx 1.72\:{\text{V}_\text{PP}}\$$ or $$\\approx 860\:{\text{mV}_\text{PK}}\$$.

A quick glance at your red output line seems to confirm this. Less, perhaps a little, due to the $$\50\:\text{k}\Omega\$$ loading that I didn't account for.

I'm not uncomfortable with what you see.

• Thanks this is amazing, I'll be digging into understanding it, we haven't yet covered some of the transfer function stuff you use (we've just derived first and second order RC and RL etc.) but I'm looking to get ahead over the summer. Thanks so much! Just as a slight aside, I did label them R1 R2 and R3, the {R} on the bottom is just the value taken from the parameter statement, but I can TRY do the homework and find the more general formula if I can get my head round dit all! Commented Jun 12 at 21:19
• @OwenM Edited to correct my mistake about numbering the parts. But yes, this is a "simple" divider problem. If you want to get a feel for it without capacitors and inductors, just replace all the C values with a different R value. It's still the same process. But you will be able to see better how one stage loads down its prior stage, perhaps. Commented Jun 12 at 21:26

It may be a reasonable approach to approximate the lag through 3 RC filters in series as the sum of 3 independent RC filters, which is what I think you are doing. This is not exactly correct, because you need to consider the loading due to subsequent filters, but it may be close.

Your problem is you are not calculating the phase lag of an RC filter correctly. You find the capacitive reactance and then take the inverse tangent of the ratio of the capacitive reactance and the resistance. Why are you doing this?

What you should be doing is finding the transfer function of an RC filter. This is simple to derive or find online. Then, you take the inverse tangent of the imaginary part over the real part. I get 67.8 degrees of phase lag for a single RC segment at 1 kHz.

• Thanks, I think I am getting mixed up with doing a phasor transform, in my head I was thinking of getting the angle between the real and imaginary parts, ie the impedance triangle. But thats not applicable here I can see as it's a filter and we are taking the output over the cap. Thanks for the help, I'll rewind and look at it again. Commented Jun 12 at 21:02