EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: ANTALIFE on November 22, 2018, 10:58:13 pm

Title: Phase Shift Oscillator Question - UPDATE: Circuit is a ring oscillator
Post by: ANTALIFE on November 22, 2018, 10:58:13 pm
Hello

I am trying to figure out how this phase shift based oscillator is able to well oscillate.

From my understanding for oscillations to occur the phase (between input/output) must have a difference of 360deg or a multiple of.

Knowing that each RC section gives a phase shift of 60deg and each BJT gives a phase shift 180deg, adding these up I get an expected phase shift of 720deg (60+60+60+180+180+180). However when I simulate the circuit in LTspice and try to manually calculate the phase shift I get a value of ~250deg, am I missing something here?

UPDATE: Turns out the circuit is actually a ring oscillator, see orolo's & Hero999's comment
Title: Re: Phase Shift Oscillator Question
Post by: xavier60 on November 23, 2018, 08:38:36 am
I can't directly answer the question. I notice that R12 is 2K which will make the phase shift of the first stage much less than the others.
Title: Re: Phase Shift Oscillator Question
Post by: spec on November 23, 2018, 08:47:45 am
Hi ANTALIFE

I love your question. It is just the sort of thing that I get into a quandary about. :)

I am not going to work it out, because my brain is not functioning yet.

But here are some thoughts to consider.

The phase angle between a transistor(BJT) base and collector is 180 deg, as you rightly say.

But it in not correct to say that the phase angle across a CR network is always 60 degrees: the phase angle varies with frequency.

The capacitor connected between the BJT collector and base, as shown on the schematic, are what is physically fitted. But the vittual capacitance seen by the circuit is the value of the physical capacitor multiplied by the voltage gain (A) of the BJT stage.

A is worked out practically as follows: The value of a BJT internal emitter resistor (re) is 25/ie where re is in Ohms and ie is in mA. And, providing the BJT has a reasonable current gain (hFE), the A of a BJT is Rc/re, Rc being the external collector resistor. For a typical BJT, like a BC227, with an ie of 1ma and an Rc of 1k, A is 1000/25 = 40. For a lower conductance BJT, like a BC54x, the A may be a touch lower, say 30.
Title: Re: Phase Shift Oscillator Question
Post by: bson on November 23, 2018, 11:25:49 am
The capacitors bypass base-collector, so are there to limit the bandwidth, which in this circuit effectively sets the oscillation frequency.  If they weren't there the circuit would oscillate around the transistors' effective unity frequency.  They're in parallel with the transistor gain, not in series.  (You'll often see the practice of capacitively coupling input and output of a gain or buffer stage referred to as miller compensation.)
Title: Re: Phase Shift Oscillator Question
Post by: spec on November 24, 2018, 12:38:42 am
The capacitors bypass base-collector.
Not sure what you are saying here. How can a capacitor bypass two separate points on a circuit.

so are there to limit the bandwidth, which in this circuit effectively sets the oscillation frequency.
Again not sure what you are saying here. How can limiting the bandwidth set the frequency. The resistor and virtual capacitance set the phase angle which sets the frequency, just like a standard phase shift oscillator. You seem to be thinking about an amplifier where often a miller feedback capacitor is used to roll the gain off to ensure frequency stability. This approach is frequently used in the voltage amplification stage (VAG) of many audio power amplifiers.

If they weren't there the circuit would oscillate around the transistors' effective unity frequency.
Yes, maybe but cant see the relevance of this statement.

They're in parallel with the transistor gain, not in series. 

Afraid this does not make sense. How can anything be in parallel with gain- the dimensions do not match.

(You'll often see the practice of capacitively coupling input and output of a gain or buffer stage referred to as miller compensation.)

Yes, and Miller compensation uses the Miller effect as I describe.
Title: Re: Phase Shift Oscillator Question
Post by: ANTALIFE on November 24, 2018, 02:22:43 am
Thanks for the input everyone, looks like I will have to do a bit more digging.
Also as pointed out I should have said the RC sections give a phase difference of 60deg at a given frequency, and in the LTspice sims this frequency is 59mHz
Title: Re: Phase Shift Oscillator Question
Post by: xavier60 on November 24, 2018, 03:29:12 am
Thanks for the input everyone, looks like I will have to do a bit more digging.
Also as pointed out I should have said the RC sections give a phase difference of 60deg at a given frequency, and in the LTspice sims this frequency is 59mHz
Did you intend R12 to be 2k?
Title: Re: Phase Shift Oscillator Question
Post by: ANTALIFE on November 24, 2018, 03:33:48 am
Thanks for the input everyone, looks like I will have to do a bit more digging.
Also as pointed out I should have said the RC sections give a phase difference of 60deg at a given frequency, and in the LTspice sims this frequency is 59mHz
Did you intend R12 to be 2k?

Sorry forgot to reply, yup having it as 2K (instead of 100K) gives me a nicer waveform plus gets the oscillation going faster (see pic)
Title: Re: Phase Shift Oscillator Question
Post by: bson on November 24, 2018, 07:57:37 am
Not sure what you are saying here. How can a capacitor bypass two separate points on a circuit.
By placing it parallel with whatever else is between the two nodes.
Title: Re: Phase Shift Oscillator Question
Post by: awallin on November 24, 2018, 12:06:56 pm
maybe try the simulation "open loop" i.e. by removing the feedback wire completely.
compute bode-plots around the frequency where you expect it to oscillate and figure out where Barkhausen criteria are (are not) fulfilled:
https://en.wikipedia.org/wiki/Barkhausen_stability_criterion

Title: Re: Phase Shift Oscillator Question
Post by: orolo on November 24, 2018, 01:29:31 pm
This is not a phase shift oscillator. It's more like the classic LED chaser circut, a ring of switches that trigger each other. When Q4 is saturated, Q6 must be off to keep Q4's base high. Since Q4 is saturated, its collector is low, which will turn Q5 off. As Q5 turns off, its collector goes up, which then turns Q6 on. As Q6 turns on and goes into saturation, Q4 is turning off.

So the thing goes:   

Q4(sat), Q5(turn off), Q6(turn on) -> Q4(turn off) Q5(turn on) Q6(sat) -> Q4(turn on) Q5(sat) Q6(turn off) -> Q4(sat) Q5(turn off) Q6(turn on) -> etc.

If your circuit is symmetric, you should see identical waveforms in the transistor collectors, 120 degrees out of phase.
Title: Re: Phase Shift Oscillator Question
Post by: spec on November 24, 2018, 05:25:51 pm
This is not a phase shift oscillator. It's more like the classic LED chaser circut, a ring of switches that trigger each other. When Q4 is saturated, Q6 must be off to keep Q4's base high. Since Q4 is saturated, its collector is low, which will turn Q5 off. As Q5 turns off, its collector goes up, which then turns Q6 on. As Q6 turns on and goes into saturation, Q4 is turning off.

So the thing goes:   

Q4(sat), Q5(turn off), Q6(turn on) -> Q4(turn off) Q5(turn on) Q6(sat) -> Q4(turn on) Q5(sat) Q6(turn off) -> Q4(sat) Q5(turn off) Q6(turn on) -> etc.

If your circuit is symmetric, you should see identical waveforms in the transistor collectors, 120 degrees out of phase.
Wow!
Title: Re: Phase Shift Oscillator Question
Post by: spec on November 24, 2018, 05:50:03 pm
 @ ANTALIFE

What frequency is the circuit actually oscillating at? I can't make out the legend on the scope screen. Also what supply voltage does the circuit have.

My back of cigarette packet calculation shows around 500Hz.
Title: Re: Phase Shift Oscillator Question
Post by: Zero999 on November 24, 2018, 08:02:24 pm
This is not a phase shift oscillator. It's more like the classic LED chaser circut, a ring of switches that trigger each other. When Q4 is saturated, Q6 must be off to keep Q4's base high. Since Q4 is saturated, its collector is low, which will turn Q5 off. As Q5 turns off, its collector goes up, which then turns Q6 on. As Q6 turns on and goes into saturation, Q4 is turning off.

So the thing goes:   

Q4(sat), Q5(turn off), Q6(turn on) -> Q4(turn off) Q5(turn on) Q6(sat) -> Q4(turn on) Q5(sat) Q6(turn off) -> Q4(sat) Q5(turn off) Q6(turn on) -> etc.

If your circuit is symmetric, you should see identical waveforms in the transistor collectors, 120 degrees out of phase.
Yes, it's a ring oscillator.
Title: Re: Phase Shift Oscillator Question
Post by: ANTALIFE on November 24, 2018, 08:30:37 pm
@ ANTALIFE

What frequency is the circuit actually oscillating at? I can't make out the legend on the scope screen. Also what supply voltage does the circuit have.

My back of cigarette packet calculation shows around 500Hz.

Circuit oscillates at 59mHz (yup milli) also supply voltage is 4V
Title: Re: Phase Shift Oscillator Question
Post by: ANTALIFE on November 24, 2018, 08:39:27 pm
This is not a phase shift oscillator. It's more like the classic LED chaser circut, a ring of switches that trigger each other. When Q4 is saturated, Q6 must be off to keep Q4's base high. Since Q4 is saturated, its collector is low, which will turn Q5 off. As Q5 turns off, its collector goes up, which then turns Q6 on. As Q6 turns on and goes into saturation, Q4 is turning off.

So the thing goes:   

Q4(sat), Q5(turn off), Q6(turn on) -> Q4(turn off) Q5(turn on) Q6(sat) -> Q4(turn on) Q5(sat) Q6(turn off) -> Q4(sat) Q5(turn off) Q6(turn on) -> etc.

If your circuit is symmetric, you should see identical waveforms in the transistor collectors, 120 degrees out of phase.

Oh wow, the steps are quite cool. Also you are totally right, making all elements symmetrical gives "identical waveforms in the transistor collectors, 120 degrees out of phase" as you said. Thanks for solving the mystery :D
Title: Re: Phase Shift Oscillator Question - UPDATE: Circuit is a ring oscillator
Post by: xavier60 on November 24, 2018, 10:52:10 pm
You could have realized that earlier when it was pointed out  that  "R12 is 2K which will make the phase shift of the first stage much less than the others"
Title: Re: Phase Shift Oscillator Question - UPDATE: Circuit is a ring oscillator
Post by: ANTALIFE on November 24, 2018, 10:56:44 pm
You could have realized that earlier when it was pointed out  that  "R12 is 2K which will make the phase shift of the first stage much less than the others"

But the thing is that I was comparing the circuit to a wrong model (phase shift oscillator), I had no idea that I should have been looking at it as a ring oscillator
Title: Re: Phase Shift Oscillator Question - UPDATE: Circuit is a ring oscillator
Post by: spec on November 25, 2018, 09:11:07 am
Anybody like to give the formula for determining the frequency of that oscillator? 59miliHertz is hellishly low.