Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

What is the frequency of this phase shift oscillator?

Status
Not open for further replies.

Megamox

New Member
I was asked to find out why this Treble Boost Filter is really a 3khz sinewave oscillator?
I think I can figure out why it's an oscillator:

The negative feedback set up of the circuit means the output is 180 deg out of phase with the inverting input at low to mid frequencies (assuming non inverting terminal grounded), but as the frequency gets even higher the op amp introduces a 90 deg phase shift meaning the output becomes a total of 270 deg out of phase. The RC network introduces another 90 deg phase shift at frequencies above cut off (usually in the region of 10xFo from simulations) and so you've got a total phase shift around the feedback loop of 360 deg which will reinforce the oscillation, is this right?

Also im thinking the RC network will attenuate the signal and so the open loop gain of the Op amp at the oscillation frequency must be high enough to counter this. If all this is correct, I'm not sure how we get to the actual value of 3khz for oscillation. I checked the data sheet on the 741 op amp and it appears to introduce a 90 deg phase lag way before 3 khz so again im not sure where 3khz comes from.

I've found some other examples on the web of formulas which look like they contain 2*pi*RC*sqrt(n) where n is the number of filters in the feedback loop, but I'm not sure if this applies.

Finally I tried looking at the RC network from an impedance point of view and worked out the capacitor behaves like a 530 ohm resistor at 3khz. In the potential divider this means it degrades the voltage of the op amp by a factor of 5000. This feels like the right ball park, because the open loop gain of the op amp at 3khz looks to be about 60db = 1000. Still a factor of 5 off though? The RC network is still degrading the signal integrity by a factor of 5 even after the op amp boosts it. So i'm a bit stuck now, what should I try next?

Thanks In advance,

Megamox
 
Just an update, have simulated the circuit above using Electronics Workbench 5.0 and it generates a 5khz Sinewave. Could not get it to simulate without a unity gain amplifier in the feedback path, perhaps the simulation had loading issues. I was under the impression Op amps had FET inputs so loading wouldnt be a problem? Anyway The unity gain amplifier is just a non inverting op amp amplifier with two 1K resistors producing a gain = 1. Perhaps the slew rate of the op amp might be a factor in the oscillation frequency? I can see it's beginning to look like a bit of a ramp generator (triangle wave).

Anyway any thoughts on how to derive the oscillation frequency for such a set up would be appreciated :)

Megamox
 
A noninverting unity gain amplifier (voltage follower) does not require any resistors. Perhaps you should post the actual schematic.
 
Last edited:
A lousy old LM741 opamp is 45 years old and does not have FET inputs. Its gain at 5kHz is about the same as the attenuation created by the RC filter. Then it might or might not oscillate. 5kHz at 42V p-p is too high for its low slew rate so its output is a triangle wave.
 
Hi Megamox.

The one stage amplifier is not an oscillator. It has an input! It looks like a badly designed high pass filter with a corner frequency of 15.9 Hz. Below that frequency the amplifier is unity gain. Above that frequency, the amplitude rises at 6 dB/octave....forever.

There is no "stop" to this rising frequency response, so the plot of the rising response gain crosses over the falling gain-bandwidth product plot of the op amp at a combined slope near 12dB/octave, so the only reason that it would oscillate is because it is unstable.

Where did the schematic come from? :confused:
 
Last edited:
Thanks guys! Sorry for any confusion, perhaps I'm using the term unity Gain incorrectly, I just meant an amplifier with a gain of 1 which is also in phase, so I used a non inverting amplifier with two identical resistors. Thanks for the info on the 741, I think the reason I simulate with the 741 is because when I learned about op-amps it was the one used in all the examples so much so, I guess in my head an op-amp has become synonymous with a 741. I know there are some much better alternatives out there and it would be nice if I could find a list of the new types of op-amps, and what benefit each one brings in terms of gain, bandwidth, input impedance, output impedance, slew rates etc. This would help me choose better suited components I'm sure.

You're right the circuit is supposed to be a well intentioned treble boost gain circuit, but the surprise is that it also oscillates and it's from a book called 'Electronic Systems' by MW Brimicombe, that I believe the class are studying. I've not seen the chapter but apparently it does make mention of the fact the instability does cause the circuit to oscillate, in much the same way as positive feedback might.

I think I've worked out the formula to derive the oscillation frequency, but it seems to be dependent on the response of the op amp as much as the RC filter characteristic. I'm not sure if there's a way to derive this equation without including this, so anywhere here goes:

Lets say you want to design a 31.62 Khz sinewave oscillator with this circuit (the most random number I could think of!)

Step 1) Find what the op-amp's open loop gain (A) is at 31.62khz. Had to run a bode plot on the 741 under simulation and found the Gain to be = 33.52db = 47.42
Step 2) Oscillation occurs when this gain, multiplied by the attenuation of the RC filter which is running well above cut off to give a 90 deg phase shift equals unity. I.e when A(@f) x Attenuation (@f) = 1
Step 3) Putting this into an equation and simplifying it down I got C = (A-1)/(2*pi*F*R)
Step 4) Not sure if there's a best way to choose R, but I just put in any reasonable value, say 100K
Step 5) C is then calculated for R =100K, A =47.42, F=31.62khz, to give 2.3nf

So R=100K, C=2.3nf with a 741 op amp should give us a sinewave generator of 31.62Khz right?

Well... the calculation comes pretty close! The simulation attached shows how close (I get 29.24Khz!), maybe there's a factor I'm missing either in my calculations or with the simulation (or even component tolerances?) that accounts for the slight difference. I avoided complex analysis and the above is just quick and dirty. If anyone can improve upon it, or spot if I've done things incorrectly I'd be glad to know. Perhaps not too bad for a rough ball park.

I'm not sure what the signal purity is like, probably not very good, but not bad when you want a simple sinewave generator with 3 components, I suppose. With a better op amp, I'm sure loading wouldnt be such an issue either.

Megamox
 
Last edited:
Megamox,

your calculation is correct. The circuit oscillates because the frequency selected is high enough to cause approx. a 90 deg phase shift of the opamp open-loop gain (perhaps 91 deg due to the second pole at a higher frequency). At the same time the RC time constant is large enough to cause another 90 deg phase shift (perhaps 89 deg) resulting in a net loop phase of 360 deg .
However, the frequency, of course, depends on the opamp type and its GBW.
The amplitude is limited by the slew rate of the opamp leading to the shown triangular shape at the opamp output, but an improved signal is available due to the lowpass filter action.
The circuit is something between a classical RC active oscillator and another topology called "Active R-oscillator" without any lumped capacitor. This latter alternative exploits the combined roll-off gain characteristic of two or 3 opamps. But, according to my knowledge, this R-oscillator concept has no practical meaning (more or less an academic exercise).

Remark 1: The circuit should work also without the unity-gain amplifier (perhaps with damped oscillations).
But note, you can realize a unity-gain amp with 100% feedback without any external resistors.

Remark 2: By grounding the non-inv. input and feeding the lower capacitor node with an input signal you have the classical differentiating circuit, which however does not work in practice because of the phase margin that is too low or even zero (oscillator).
 
Last edited:
Ah yes, I had initially planned on using the amplifier (sub circuit marked UNITYAMP) to provide whatever necessary gain it took to sustain the oscillation. When I realised it worked fine without this gain (must have just been a loading issue) I just left the resistors in, but yes for it to be a traditional and true Unity Gain Follower I could have left the resistors out and used a negative feedback connected Op-amp as a follower.

Not quite sure I understand your second remark about the phase margin, so a circuit such as this would not work if built in the lab? I'm no stranger to things working in simulation but not in the lab for sure! But was just curious as to why this circuit would fail, and perhaps where it might need bolstering.

I also did want to mention that the calculations above mean you can work out R and C to produce any Sinewave generator you want from the formula, you just need to know the typical Gain response of the Op-amp you're using. However I can't quite see a way of going in the other direction, i.e looking at a circuit and figuring out it's oscillation frequency from R and C. To rearrange my formula to calculate F, it is still a function of R, C and the Open Loop gain of the Op-amp, which itself is a function of frequency A(f). However, how do you get A(f), when you're looking for F in the first place? Puzzling. You could of course use the values of R and C to define the attenuation of the RC filter response and substitute its reciprocal in for A(f). But again, this is also a function of frequency. Going around in circles a bit!

Megamox
 
Ah okay, I had an idea to work out the frequency of oscillation from R and C. Essentially, just treat the op amp's frequency response as a low pass filter with open loop gain A. The low freq cut off for a 741 op amp seems to be about 10hz, so we can assume for the purposes of calculation, it's just an RC filter with say R= 10K and C=1uF multiplied by an open loop Gain of A = 100db. Oscillation will occur when Open loop Gain meets closed loop gain, in other words when AB = 1, where B is the feedback voltage. Shuffling the algebra around you get the equation below:

4*(pi^2)*RC*(F^2) + (2*pi + 200*pi*RC)*F - 9999900 = 0

I know it looks ugly right! But it seems to work, subbing in values from the original post of R=100K, C=100nf and solving the quadratic, you get F = 5Khz. And for R = 100K and C = 2.3nf it gives 32KHz.

1) So if you want to know the frequency of oscillation of the circuit, substitute and solve the quadratic below. It should be valid for any Op amp with an open loop gain of 100db and low freq cut off at 10 Hz.
4*(pi^2)*RC*(F^2) + (2*pi + 200*pi*RC)*F - 9999900 = 0

2) If you want to design your own Sinewave Frequency Generator, use:
C = (A-1)/(2*pi*F*R) - with reasonable R

Megamox
 
Last edited:
solve the quadratic below. It should be valid for any Op amp with an open loop gain of 100db and low freq cut off at 10 Hz.
Nope.
It is only for an antique opamp like the 45 years old 741.
An ordinary cheap LM741 opamp does not even have a minimum bandwidth spec. It is only 437kHz for the expensive LM741A.
If it is actually only 100kHz then its gain at 12.5kHz is only 8 times. But its horrible slew rate dominates above only 9kHz for a "typical" LM741 but the cheap LM741 does not even have a minimum slew rate spec.

Edit: An LM358 or LM324 is even worse.
 
Last edited:
Not quite sure I understand your second remark about the phase margin, so a circuit such as this would not work if built in the lab?

I also did want to mention that the calculations above mean you can work out R and C to produce any Sinewave generator you want from the formula, you just need to know the typical Gain response of the Op-amp you're using. However I can't quite see a way of going in the other direction, i.e looking at a circuit and figuring out it's oscillation frequency from R and C. To rearrange my formula to calculate F, it is still a function of R, C and the Open Loop gain of the Op-amp, which itself is a function of frequency A(f). However, how do you get A(f), when you're looking for F in the first place? Puzzling. You could of course use the values of R and C to define the attenuation of the RC filter response and substitute its reciprocal in for A(f). But again, this is also a function of frequency. Going around in circles a bit!

Megamox

As to your 1st question: The circuit given by you resembles a circuit called "differentiator" for an input signal applied to the capacitor (lift the ground of course). It is just the inverse of the classic MILLER integrator. However, as you didn`t change the pole distribution by applying an input signal the circuit will still oscillate and - therefore - cannot be used as intended. It is still an oscillator! And - by definition - an oscillator has a phase margin of zero deg (loop phase 360 deg).
Thus, you have a circuit that is intended to be used as a differentiating amplifier. However, it cannot be used as such because it (probably) oscillates.

As to your 2nd question (calculation of Fo for given R, C values).
First we need some theory. The circuit oscillates only if the loop phase is 360 deg. The feedback lowpass always provides a phase shift slightly BELOW 90 deg. Thus, the opamp must provide a phase shift slightly ABOVE 90 deg. This is possible due to the second opamp pole.
Thus, for a correct loop gain calculation we have to use a 1st order lowpass and a second-order gain function resulting in a 3rd-order loop gain low pass function. That`s quite normal since a pure 2nd-order lowpass reaches the -180 deg shift at infinite frequency only.
However, a much simpler approach is possible as you have assumed already in your former post assuming that BOTH parts contribute with 90 deg phase shift (because the cut-off frequencies are much lower than the operating frequency).

In this case we simply can set (GBW=wT=transit frequency):

Opamp gain A(s)=wT/s and low pass H(s)=1/(1+sRC) >>> 1/sRC.

Then we have a loop gain T(s)=- A(s)*H(s)=- wT/(s^2*RC) and with s=jw we get T(jw)=wT/(w^2*RC).

Now, the circuit oscillates for |T(w=wo)|=1 leading to

wo=SQRT(wT/RC) .
 
Last edited:
Hi,

I agree, i dont see any either.
 
Last edited:
...wo=SQRT(wT/RC) ...

Brilliant! I should have considered GBW, it makes the calculation much easier. I've applied that logic to a new equation and it works just fine.

2*Pi*F(^2)*RC + F - GBW = 0

Also the difference between the theoretical frequency calculated and the one simulated above was tiny but it still bugged me. So I went looking through the specs on the 741 as the simulator has them and I found the cause. The Simulation program has GBW down as 1.5 x 10^6, slightly higher than the 10^6 I've been using for calculation. That explains the difference exactly.

Using R=100K, C=2.3nf and GBW=1.5 x 10^6 into the equation above you get F = 31.8Khz (We were aiming for 31.62Khz). So at least that gets rid of that error factor, I'm sorry I didn't figure that out earlier.

In regards to the op-amps I did go looking for a comparison guide to see what other op-amps have to offer, but sadly I couldnt find one a cross reference guide at first look. The no min slew rate on the 741 is worrying. Do you all have particular op amps types which you keep as your GO TO's for Audio, RF, Small Signal and High Power applications? It would be nice if anyone has any model numbers to quote or to share of an all round op-amp which perhaps replaces the rather old 741.

Perhaps I should start a new thread for this? If so, apologies!

Megamox
 
Yes of course, I've attached an output from the equation editor online I used to make it look a bit easier. I've also included the final equations to calculate RC for any F, or F for any RC. Please let me know if you spot any mistakes!

Megamox

Edit: Also added in Sim Screen shot
 
Last edited:
Megamox,

sorry but I cannot follow your calculation.
*First question: Do you agree to my formula as given in post #16. Anything wrong?
*Second question: Where comes the formula from in your first attachement ( second line, below GB=1E6)?
 
Yes sure, your analysis looks fine. But It's been a really long time since I've worked with laplace transforms, maybe someone else here might be able to check it better than me.

In response to your question about the equation calculations. This is my reasoning, hopefully it's correct. Oscillation will occur at a particular frequency where the attenuation of the RC filter multiplied by the gain of the Op amp is unity. They sort of cancel eachother out, although that's probably not the correct terminology.

So Oscillation @ F occurs when [Op Amp's open loop gain A(@ F)] X [Attenuation by RC filter (@ F)] = 1
But Attenuation by RC filter = X/(R+X) - voltage divider type of equation.

So A(@F)[X/(R+X)] = 1
Rearrange: A(@F) = (R+X/X) = (1 + R/X)

But A(@F) is the op-amp's Gain response at F. If we know GBW for this op amp, then (A(@F))(F) = GBW.

Therefore Sub in GBW/F for A(@F) in above:

GBW/F = (1 + R/X)

GBW = (1 + R/X)F - which is the equation you mentioned, with X=1/2*pi*F*C

I know it's probably overkill to go into so much detail for a circuit that will probably not perform anywhere near this frequency in real life, or perhaps not even oscillate at all but I did want to convince myself that in general you were not able to perform a complete description of the oscillation frequency of such an oscillator without including the Op amp as a factor. Perhaps such a device could be used to determine the GBW of various op-amps, by measuring the frequency of the sinewave the circuit puts out?

Megamox
 
Last edited:
I know it's probably overkill to go into so much detail for a circuit that will probably not perform anywhere near this frequency in real life, or perhaps not even oscillate at all but I did want to convince myself that in general you were not able to perform a complete description of the oscillation frequency of such an oscillator without including the Op amp as a factor. Perhaps such a device could be used to determine the GBW of various op-amps, by measuring the frequency of the sinewave the circuit puts out?

Megamox

Of course, I can agree to this final statement. Nevertheless, don`t you see the difference between your and my formula?
Only one can be correct. At the moment I am a bit short in time, but I will go through your derivation tomorrow.
Till then - regards
W.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top