# Op amp oscillator circuit help

Discussion in 'General Electronics Chat' started by jut, Feb 2, 2011.

1. ### jut Thread Starter AAC Fanatic!

Aug 25, 2007
224
2
Good evening folks,

I'm trying to derive an expression for the osc. freq. in terms of C1, C2, and L. I already the formula for freq. of osc., but I still want to understand the circuit. I started by summing the currents at the V1 node. So for oscillation to occur, V1 must be in phase with Vo and the overall gain needs to be 1. To satisfy the phase requirement, there cannot be an j's in my eqn for V1. In other words, wL/R1 = 0. But that doesn't make sense. Where is my thinking flawed? • ###### Colpitts.asc
File size:
2 KB
Views:
18
Last edited: Feb 2, 2011
2. ### Wendy Moderator

Mar 24, 2008
21,698
3,000
Looks more like a phase shift relationship to me. As in inverting.

Sorry, missed the bottom part of your post. But for it to oscillate you must have a 180° phase shift.

3. ### jut Thread Starter AAC Fanatic!

Aug 25, 2007
224
2
Ah, yes. Makes sense, the inverting gain changes the phase to 180, so the LC network needs to move the phase another 180. I will take another look at my equations.

4. ### Wendy Moderator

Mar 24, 2008
21,698
3,000
Don't forget, R1 is a resistor going to ground as far as the network is concerned.

5. ### jut Thread Starter AAC Fanatic!

Aug 25, 2007
224
2
Yup, took that into account when I summed currents at node V1. What worries me, and what I didn't take into account is C1.

Another problem that reared it's head: the phase shift, in my last equation for V1, will never get to 180. Why? The angle(V1/Vo) = -ArcTan(bunch of stuff). But obviously the ArcTan function never gets to 180 degrees. This is another clue that my overall thinking is flawed. Can someone come to the rescue.  Are those equations scaring everyone away?

Last edited: Feb 2, 2011
6. ### Wendy Moderator

Mar 24, 2008
21,698
3,000
So where does C1 fit into the problem? The op amp is an extremely low output impedance. If you remove C1 does it make any difference?

If C1 is ignored the problem resembles a low pass filter. I am not great at these kind of problems myself.

7. ### jut Thread Starter AAC Fanatic!

Aug 25, 2007
224
2
I think you're right about C1. I re-ran my simulation without C1, and it stilled oscillated at 3.5kHz. (I uploaded an LTspice file to first post).

I'm not good at these kind of circuits either. But I'd like to beef up my AC chops.

8. ### bitrex Active Member

Dec 13, 2009
79
4
Remember you can extend the arctangent function to include and .

if a = 0 and b is positive, and
if a = 0 and b is negative.

http://en.wikipedia.org/wiki/Atan2

I haven't looked over your derivation completely, but I do see a way you might simplify the problem, if you're willing to have an approximate answer: assume that R1 and R2 are large, so that R1 doesn't load the tank circuit and the virtual ground isn't loaded much by the tank. Then the problem is just superposition: .

Edit: The above analysis won't really describe the full behavior of the circuit - an oscillator is an inherently nonlinear system and doing a Laplace transform analysis assumes a LTI system. Basically you can determine from the above equation that oscillations will start when the gain of the circuit at Vin is enough to overcome the losses in the tank, and what frequency the oscillations will occur at.

Last edited: Feb 2, 2011
9. ### bitrex Active Member

Dec 13, 2009
79
4
V1 needs to be 180 degrees out of phase with Vo, because the output of the tank is going to the op amp's inverting input. So to satisfy your requirement, the denominator of the transfer fuction must have 0 real part (see info about atan2 above). So oscillation will occur when .

Edit: Wrong! I shouldn't do this when tired.

Last edited: Feb 2, 2011
10. ### jut Thread Starter AAC Fanatic!

Aug 25, 2007
224
2
Good point about atan2, let me see if I can make sense of this. As an example: atan2(x,y) = 180 if x=-1 and y=0

Now, the angle of V1/Vo from my last equation, written in terms of atan2: Setting the numerator to 0, or setting the denominator to -1 doesn't yield a correct result.

11. ### bitrex Active Member

Dec 13, 2009
79
4
a = x, y = b. Set the denominator equal to zero because it's the real part of the complex number which has to be 0 for the transfer function to equal either pi/2 or -pi/2. Y can be any positive number, and since it's an inductive term it should be positive. You should get pi/2, and you have correctly put a negative sign in front of the atan because the transfer function is in the form 1/(a + bi). So the phase shift at the resonant frequency will be -180 degrees.

Edit: The above is incorrect, I really shouldn't do this when I'm tired! pi/2 != 180 degrees! Let me take another look to see where I went wrong.

Last edited: Feb 2, 2011

Dec 26, 2010
2,147
302
................

Last edited: Feb 2, 2011
13. ### bitrex Active Member

Dec 13, 2009
79
4
Adjuster's post is gone now, but the point he brought up was correct and showed my error: at the resonant frequency the phase shift is only 90 degrees, pi/2, not pi. If the tank circuit shown were a real circuit with an inductance with some resistance, the circuit would be damped and would actually oscillate at a frequency higher than the resonant frequency, high enough that the real part of the denominator of the transfer function of the circuit will be negative and the phase shift through the circuit will be -180 degeres. What was throwing me in my analysis is that if R1 is not taken into account this is essentially a circuit with no damping, so the transfer function is . If you try to take the atan2 of the denomiantor of that function you find that when the real part is greater than zero the phase shift is zero, when the real part is less than zero the phase shift is 180 degrees, and when both parts are zero it's undefined. What that means is that the phase shift graph basically has a vertical discontinuity at the resonant frequency where the phase jumps from zero degrees to 180 degrees.

In the case of a circuit where there is damping like yours, I don't believe the phase will ever make it all the way to 180 degrees, so there has to be a source of additional phase shift.

Sorry for leading you astray earlier, I didn't think the problem through thoroughly enough.

Last edited: Feb 2, 2011
14. ### jut Thread Starter AAC Fanatic!

Aug 25, 2007
224
2
OK, I thought I was going crazy there. I kept wondering, how is he getting pi/2 (90 degrees) all the time??

I plotted the phase of the transfer function from Vo to V1 last night. And it asymptotes to -180 for large values of freq. So yes, I agree, there needs to be more phase shift from somewhere else. 15. ### bitrex Active Member

Dec 13, 2009
79
4
If you put a resistor from the op amp output to the tank input, you'll find that the transfer function is:

.

If you then set and set the imaginary part of the transfer function equal to zero (the condition for -180 degree phase shift) the frequency of oscillation should come out to be .

16. ### Wendy Moderator

Mar 24, 2008
21,698
3,000
How does this work for the circuit you built jut?

C1 is involved in the ringing, but it isn't obvious. I was thinking the low output impedance of the op amp would swamp it.

17. ### bitrex Active Member

Dec 13, 2009
79
4
I don't want to speak for Jut, but just to throw in my 2 cents: I believe you're correct. As it stands now, you could probably remove C1 and the circuit would still operate because of parasitic capacitances adding to the phase shift. However, if the resistance going into the virtual ground of the opamp isn't large enough, the tank will be damped and there may not be enough gain in the tank circuit to make the circuit oscillate at the frequency where the phase is -180 degrees. You can compensate by increasing the gain of the opamp, but I think the frequency of oscillation will be unpredictable. The effect of adding resistance at the op amp output makes it so there is a well defined frequency where the phase shift is -180 degrees. It's amazing how such a seemingly simple circuit can have such subtlety!

18. ### jut Thread Starter AAC Fanatic!

Aug 25, 2007
224
2
Here's the circuit I built. Simulation says the output is a distorted sine wave at 7.2kHz. Note that R2 is a pot; I'm tweak the gain until sustained oscillations occur. Actual V(out): Actual V(out) WITHOUT C1 So, it's oscillating at 5.8kHz. But the formula predicts f = 1/(2*∏*sqrt(4.8mH*100nF)) = 10.3kHz.

Note: I measured the inductance manually with a function generator/scope. So the predicted freq of oscillation will be a little bit off, but inductance tolerance doesn't account for the massive error. This is turning out to be an unruly circuit. However I'm determined to understand what's going on. Back to the bench.

19. ### Wendy Moderator

Mar 24, 2008
21,698
3,000
What op amp was this again? If it is an old slow one it will have a substantial amount of phase shift too.

20. ### jut Thread Starter AAC Fanatic!

Aug 25, 2007
224
2
It's an LM741. I also tried a LT1006 and got the same result.