Author Topic: Can't get phase shift oscillator to oscillate (Help)  (Read 5028 times)

0 Members and 1 Guest are viewing this topic.

Offline mahmoodTopic starter

  • Newbie
  • Posts: 5
  • Country: sa
Can't get phase shift oscillator to oscillate (Help)
« on: July 03, 2016, 04:49:46 pm »
Hi ,
good day to all of you EE fellows .
I have been trying to design a low frequency sine wave oscillator to use it in a power supply design .
The problem is i'm trying to simulate a phase shift oscillator but it's not oscillating (using a single op amp with three RC sections) .
i copied designs from TI application notes but it doesn't seem to work either .
Can you give me any tips that can help me to get the simulation right so i have a proof of concept of my idea .
I'm using NI multisim 10 software which is based on spice .
Thanks
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #1 on: July 03, 2016, 05:12:51 pm »
Sometimes the simulations are better than the real world in the way they evaluate the steady state.  Try unbalancing the timing constants a little bit.  Change the values of C1 vs C2 or R3 vs R4
 
 
The following users thanked this post: mahmood

Online TimFox

  • Super Contributor
  • ***
  • Posts: 7949
  • Country: us
  • Retired, now restoring antique test equipment
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #2 on: July 03, 2016, 05:15:50 pm »
That's a Wien-Bridge oscillator, and it requires an exact match on the components to work properly.  Therefore, one of the resistors in the negative feedback path must be non-linear or controlled by a servo loop.  I would suggest simulating it by breaking the positive feedback loop (connecting the + input to your bias source of +0.833 V instead of the R-C network) and measuring the AC gain/phase from the positive input to the output, looking for unity gain at zero phase.
 
The following users thanked this post: mahmood

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #3 on: July 03, 2016, 07:10:03 pm »
You say 3 RC sections but schematic only shows 2 ?

Whats the TI ap note number ?

If you are using this ap note http://www.ti.com/lit/an/sloa060/sloa060.pdf
notice there is a Vref required, or a filament lamp in the second diagram.


Regards, Dana.
« Last Edit: July 03, 2016, 07:14:33 pm by danadak »
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline mahmoodTopic starter

  • Newbie
  • Posts: 5
  • Country: sa
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #4 on: July 03, 2016, 08:02:27 pm »
Sometimes the simulations are better than the real world in the way they evaluate the steady state.  Try unbalancing the timing constants a little bit.  Change the values of C1 vs C2 or R3 vs R4

I tried that and it started to oscillate after i gave each passive element a 1%tolerance and played with values , but it took some time in steady state before that. now i have to deal with the signal being clipped out when it hits the rails . thanks for the advice   :)

You say 3 RC sections but schematic only shows 2 ?

Whats the TI ap note number ?

If you are using this ap note http://www.ti.com/lit/an/sloa060/sloa060.pdf
notice there is a Vref required, or a filament lamp in the second diagram.


Regards, Dana.

I meant another circuit with the RC sections but i forgot to attach it here .
Both circuits i got from the exact same note you referred to .
Thanks .

That's a Wien-Bridge oscillator, and it requires an exact match on the components to work properly.  Therefore, one of the resistors in the negative feedback path must be non-linear or controlled by a servo loop.  I would suggest simulating it by breaking the positive feedback loop (connecting the + input to your bias source of +0.833 V instead of the R-C network) and measuring the AC gain/phase from the positive input to the output, looking for unity gain at zero phase.

Thank you :)

 
 
 

Offline uncle_bob

  • Supporter
  • ****
  • Posts: 2441
  • Country: us
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #5 on: July 03, 2016, 08:58:59 pm »
Sometimes the simulations are better than the real world in the way they evaluate the steady state.  Try unbalancing the timing constants a little bit.  Change the values of C1 vs C2 or R3 vs R4

I tried that and it started to oscillate after i gave each passive element a 1%tolerance and played with values , but it took some time in steady state before that. now i have to deal with the signal being clipped out when it hits the rails . thanks for the advice   :)

You say 3 RC sections but schematic only shows 2 ?

Whats the TI ap note number ?

If you are using this ap note http://www.ti.com/lit/an/sloa060/sloa060.pdf
notice there is a Vref required, or a filament lamp in the second diagram.


Regards, Dana.

I meant another circuit with the RC sections but i forgot to attach it here .
Both circuits i got from the exact same note you referred to .
Thanks .

That's a Wien-Bridge oscillator, and it requires an exact match on the components to work properly.  Therefore, one of the resistors in the negative feedback path must be non-linear or controlled by a servo loop.  I would suggest simulating it by breaking the positive feedback loop (connecting the + input to your bias source of +0.833 V instead of the R-C network) and measuring the AC gain/phase from the positive input to the output, looking for unity gain at zero phase.

Thank you :)

Hi

The unity gain at zero phase constraint is known as Barkenhausen's Criteria. It applies to any steady state oscillator when running in a stable fashion. In order to *start* oscillating, the circuit needs more gain that in the steady state. That is why some form of limiter is always present in any practical oscillator. The amount of "excess gain" is dependent on a lot of things.  In general 3 db isn't enough and 12 db is usually way to much.

Bob
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #6 on: July 03, 2016, 10:37:57 pm »
Sometimes the simulations are better than the real world in the way they evaluate the steady state.  Try unbalancing the timing constants a little bit.  Change the values of C1 vs C2 or R3 vs R4

I tried that and it started to oscillate after i gave each passive element a 1%tolerance and played with values , but it took some time in steady state before that. now i have to deal with the signal being clipped out when it hits the rails . thanks for the advice   :)

You say 3 RC sections but schematic only shows 2 ?

Whats the TI ap note number ?

If you are using this ap note http://www.ti.com/lit/an/sloa060/sloa060.pdf
notice there is a Vref required, or a filament lamp in the second diagram.


Regards, Dana.

I meant another circuit with the RC sections but i forgot to attach it here .
Both circuits i got from the exact same note you referred to .
Thanks .

That's a Wien-Bridge oscillator, and it requires an exact match on the components to work properly.  Therefore, one of the resistors in the negative feedback path must be non-linear or controlled by a servo loop.  I would suggest simulating it by breaking the positive feedback loop (connecting the + input to your bias source of +0.833 V instead of the R-C network) and measuring the AC gain/phase from the positive input to the output, looking for unity gain at zero phase.

Thank you :)

Hi

The unity gain at zero phase constraint is known as Barkenhausen's Criteria. It applies to any steady state oscillator when running in a stable fashion. In order to *start* oscillating, the circuit needs more gain that in the steady state. That is why some form of limiter is always present in any practical oscillator. The amount of "excess gain" is dependent on a lot of things.  In general 3 db isn't enough and 12 db is usually way to much.

Bob

I haven't thought about Barkenhausen's Criteria in a very long time.  But I will always remember "Amplifiers oscillate and oscillators don't."
 

Offline uncle_bob

  • Supporter
  • ****
  • Posts: 2441
  • Country: us
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #7 on: July 03, 2016, 10:48:26 pm »
Hi

The gain of one, net phase shift zero (modulo one cycle) is one of the most basic ways to look at an oscillator. That makes it broadly applicable to an enormous class of oscillators. In some cases a negative resistance model is more helpful (one port vs two), but it is not as generally applicable or quite as easy to "calibrate".

Bob
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #8 on: July 04, 2016, 12:24:02 am »
The figure 10 (a Wien bridge oscillator using a light bulb as a level limiter) in TI's applications note will not work because it is missing the important 0.833V reference voltage to bias the opamp correctly.
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #9 on: July 04, 2016, 01:48:01 am »
Sim, attached.


Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #10 on: July 04, 2016, 02:09:36 am »
In the previous post, with G set to 3, NI path, I found osc died in sim when run out to 10mS.

So I increased G, osc is sustained, but as expected distorted since no agc loop.


Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 
The following users thanked this post: mahmood

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #11 on: July 04, 2016, 02:11:26 am »
Sim, attached.
Regards, Dana.
Your sim program is showing the input of the Wien Bridge oscillator, not its clipping output that has crossover distortion.
The output level is dropping in 1ms and the oscillator might stop in about 1 second because it has nothing to limit its output level.
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #12 on: July 04, 2016, 09:48:51 am »
The second sim runs w/o amplitude drop out to 1 s.

The output as well as the feedback has distortion as mentioned earlier
because of a lack of agc.


Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #13 on: July 04, 2016, 10:30:02 am »
 

Offline mahmoodTopic starter

  • Newbie
  • Posts: 5
  • Country: sa
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #14 on: July 04, 2016, 10:53:22 am »
I had the same problem with G earlier and the oscillation was dying within milliseconds , i tried then to re-initiate it using a switch but it kept decaying , as for some changes to G i increased it but the output looked more clipped and the positive input was largely distorted .
when i did the analysis on paper everything looked OK (unity gain + 180 phase shift), now i'm questioning the distortion stuff that is happening , it looks good for the application i'm designing but what if i wanted something more reliable ?.
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #15 on: July 04, 2016, 11:49:03 am »
The circuit needs the right gain: Just a bit too low gain and it will stop oscillating. A bit too much and it will start clipping because the amplitude increases until it hits the supply rail.
That's why nonlinear feedback (PTC) is used to provide some amplitude stabilization.
 

Offline uncle_bob

  • Supporter
  • ****
  • Posts: 2441
  • Country: us
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #16 on: July 04, 2016, 02:00:05 pm »
I had the same problem with G earlier and the oscillation was dying within milliseconds , i tried then to re-initiate it using a switch but it kept decaying , as for some changes to G i increased it but the output looked more clipped and the positive input was largely distorted .
when i did the analysis on paper everything looked OK (unity gain + 180 phase shift), now i'm questioning the distortion stuff that is happening , it looks good for the application i'm designing but what if i wanted something more reliable ?.

Hi

An oscillator with slightly to little loop gain (say  -0.0000001 db) will start from the turn on transient and eventually die out. There is not enough gain to keep it running.

An oscillator with slightly more than 0 db gain ( say + 0.0000001 db) will eventually run up to the point that it clips.

That's the way all oscillators work.

Bob
 

Offline mahmoodTopic starter

  • Newbie
  • Posts: 5
  • Country: sa
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #17 on: July 04, 2016, 02:11:39 pm »
I had the same problem with G earlier and the oscillation was dying within milliseconds , i tried then to re-initiate it using a switch but it kept decaying , as for some changes to G i increased it but the output looked more clipped and the positive input was largely distorted .
when i did the analysis on paper everything looked OK (unity gain + 180 phase shift), now i'm questioning the distortion stuff that is happening , it looks good for the application i'm designing but what if i wanted something more reliable ?.

Hi

An oscillator with slightly to little loop gain (say  -0.0000001 db) will start from the turn on transient and eventually die out. There is not enough gain to keep it running.

An oscillator with slightly more than 0 db gain ( say + 0.0000001 db) will eventually run up to the point that it clips.

That's the way all oscillators work.

Bob

So we are faced with a trade off since it's difficult to achieve absolute 0dB gain (i assume :-\) , i guess that's where the nonlinear resistor come into play
 

Offline uncle_bob

  • Supporter
  • ****
  • Posts: 2441
  • Country: us
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #18 on: July 04, 2016, 02:39:41 pm »
I had the same problem with G earlier and the oscillation was dying within milliseconds , i tried then to re-initiate it using a switch but it kept decaying , as for some changes to G i increased it but the output looked more clipped and the positive input was largely distorted .
when i did the analysis on paper everything looked OK (unity gain + 180 phase shift), now i'm questioning the distortion stuff that is happening , it looks good for the application i'm designing but what if i wanted something more reliable ?.

Hi

An oscillator with slightly to little loop gain (say  -0.0000001 db) will start from the turn on transient and eventually die out. There is not enough gain to keep it running.

An oscillator with slightly more than 0 db gain ( say + 0.0000001 db) will eventually run up to the point that it clips.

That's the way all oscillators work.

Bob

So we are faced with a trade off since it's difficult to achieve absolute 0dB gain (i assume :-\) , i guess that's where the nonlinear resistor come into play

Hi

As a practical thing, you have to have some sort of AGC or a limiter. Often you have both. An AGC tends to be slow and give you cycle to cycle amplitude variation. A limiter gives you some finite amount of distortion on the output.

Bob
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline LvW

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: de
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #20 on: July 04, 2016, 08:44:55 pm »
As a practical thing, you have to have some sort of AGC or a limiter. Often you have both. An AGC tends to be slow and give you cycle to cycle amplitude variation. A limiter gives you some finite amount of distortion on the output.

You have several options for stabilizing the amplitude:

* The most simple method is to use two anti-parallel diodes across the gain determining resistor - thus performing something like "soft-clipping.

* A bit more efficient (better THD) is a FET which is used as a variable resistor using a control voltage that is derived from the output amplitude (after rectification).
This is a kind of AGC - however, it is NOT true that this AGC loop gives you  a "cycle to cycle amplitude variation".  Exactly the opposite is true because the AGC time constant can/should be selected much larger than one cycle.

* As another option you can accept hard-limiting (power suplly rails) if the frequency-determining network provides enough damping of the third harmonic (lowpass or bandpass filtering). In this case, you can use THIS output node using another opamp which works as a buffer amplifier.

*Further alternatives: Thermistors, light bulb, OTA as resistor or as controllable amplifier.
« Last Edit: July 04, 2016, 08:48:03 pm by LvW »
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #21 on: July 05, 2016, 12:18:41 am »
Here is a way to make a sine osc with a DAC and a seed value in an IIR
filter, attached.



Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline mahmoodTopic starter

  • Newbie
  • Posts: 5
  • Country: sa
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #22 on: July 05, 2016, 12:08:00 pm »
I got better results after using AGC but i had less amplitude(can be solved with another amplifier stage) , sim attached
 

Offline uncle_bob

  • Supporter
  • ****
  • Posts: 2441
  • Country: us
Re: Can't get phase shift oscillator to oscillate (Help)
« Reply #23 on: July 06, 2016, 01:57:33 am »
Hi

There is only so much you can do with simulation on an oscillator. At some point you need to wire up real circuits and see how they actually work. You likely will find that the startup behavior (or lack of) is *very* different on a real circuit.

Bob
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf