wien bridge oscillator LTSpice simulation - Page 1
Forum section: electronics / projects

author: Rami
author_rank: Newbie
timestamp: November 25, 2016, 11:58:31 pm
content: Hello,I am trying to simulate the circuit described in the art of electronics called Wien Bridge low distortion oscillator. My experience with LTSpice is not extensive and I am not sure what I am doing wrong here. I am not getting the sine wave output. I would appreciate the help in getting this simulation to work, so I can understand the theory better. I have attached what I have done so far. Since there is no lamp in LTSpice, I put a resistor and set its value to R=1+1000*time to get the incremental increase in resistance with time.

author: Zero999
author_rank: Super Contributor
timestamp: November 26, 2016, 12:30:25 am
content: It seems to work. The problem is gain stabilisation. Either there's too much gain so it clips or too little and it dies away.What about implementing automatic gain control with a J-FET?

author: Rami
author_rank: Newbie
timestamp: November 26, 2016, 04:19:35 am
content: yeah but implementing automatic gain control with J-FET is too complicated for this application and not necessary but could be a solution.The voltage gain from the non-inverting input to op-amp output should be exactly +3.00 to keep the amplitude of the oscillation within the linear region of the amplifier. With less gain the oscillation will cease and with more gain the output will saturate. An incandescent lamp (which is represented by the variable resistor R4) is used as feedback element to to maintain the +3.00 gain.I believe I almost figured it out! my mistake was having the value of the variable resistor, R4, as a linear function of time. After reading the book more carefully, I noticed that it should be a function of the output voltage, not time. In real life, the temperature of the incandescent lamp will increase with increased applied voltage and therefore increase of resistance. I changed the value of the variable resistor from a linear function of time (R = 1+1000*time) to a quadratic function of the output voltage (R=1+100*V(out)**2).Now finally, I have a sinusoidal output signal but not at the desired frequency. I calculated the resistors and capacitors to be 80K ohm and 10nF for 2KHz and the output signal is measured at 160Hz.I wonder if the problem could be related to a phase shift? The idea is to make a feedback amplifier with 180 degrees phase shift at the desired frequency. Any ideas?I have attached my latest simulation results for reference.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: November 26, 2016, 11:50:34 am
content: Hi,This is classic. The Wien bridge oscillator requires a non-linear element to control the amplitude. JFETs, incandescent bulbs and thermistors have been used to stabilize the amplitude. One the simplest, and cheapest, ways to do this is add diodes to the feedback path of the op-amp:Without the non-linearity, the oscillator will stop, or not start or the amplitude is controlled by the amplifier clipping.The diode method introduces some distortion, the model has about 2% distortion.I have attached the modified model.Regards,Jay_Diddy_B

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: November 26, 2016, 12:22:37 pm
content: I found a model for an incandescent bulb. The bulb is 28V 25mA. If I modify the model like this:Now R4 has been changed from being a resistor to a bulb. This is done by right clicking on R4 and changing the attributes to:The prefix was changed from R to X, X is used for a subcircuit. The SpiceModel was changed to LAMP to match the subcircuit name.If I run this model, you can see the lamp stabilizing the amplitude:I have attached the model.Regards,Jay_Diddy_B

author: Zero999
author_rank: Super Contributor
timestamp: November 26, 2016, 07:27:23 pm
content: Quote from: Rami on November 26, 2016, 04:19:35 amIt needn't be too complicated, see attached.QuoteYes, the trouble is, there's no way to make an amplifier with an exact gain. It'll always be a little too high or a little low.QuoteI think you've got your oscillators mixed up. A Wien bridge oscillator needs a phase shift of 360o.

author: Rami
author_rank: Newbie
timestamp: November 27, 2016, 12:57:22 am
content: Thank you both @hero999 and @Jay_diddy_B for the help. This is the very first time I have ever participated in an online forum and it has been an amazing experience! It made me realize how awesome the internet is where 3 guys across the globe help out others!I know it is a classic problem which is why I was frustrated with solving it. it seemed very simple and I reread the explanation multiple times.Hopefully other can find this post resourceful.QuoteThe 180 degrees shift is a quote from the Art of Electronics book.

author: Zero999
author_rank: Super Contributor
timestamp: November 27, 2016, 01:22:03 am
content: Are you sure you weren't reading about a phase shift oscillator with three RC circuits?Here's a site which takes you through the calculations for the Wien bridge oscillator.http://www.electronics-tutorials.ws/oscillator/wien_bridge.html