Analyzing a Wien-Bridge Oscillator using DC/AC analysis - Page 1
Forum section: electronics / beginners

author: renzoms
author_rank: Regular Contributor
timestamp: December 13, 2021, 04:47:47 pm
content: I wanted to analyzethis Wien Bridge Oscillatorso I could know how it works/why it oscillates rather than just using it. Before I dive in, someone linked me some resource on oscillators and it's something I could read but I'm seeking feedback on the DC/AC analysis I did on this circuit, first at least.1.Did I even approach this problem in an appropriate way?The problem being: Unraveling how the circuit works. Doing a DC analysis showed me this circuit used the non-inverting OP gain of 3. I assumed this circuit to have a AC steady-state given it's an oscillator, so then I tried to calculate Vout/and other V/I using AC steady state analysis.2. The weird/hard part for me was that there isn't any input voltage source. The output voltage, I guess, comes from the op-amp rising towards saturation, then falling towards saturation, as a sine wave because of the RC circuits.3. What's odd is I tried to do some AC analysis and found that 3 ≠ 3 + 1000j [I got -100j from using 330pF and given f0 = 1/2piRC]. You can see this result from the KCLs I did at both + / and - input terminals.4. I also tried looking at this circuit using a VSC between + and -. This would form an RC circuit - - -You can see this in the photo. It's easier to just look knowing I'm looking at these RC circuits. I just noticed/read that we have two sort of RC circuits. One in parallel at the bottom, one "in series" at the top (of the non-inverting input).5*. I'm tempted to build this circuit in SPICE as if I could learn something from disconnecting a Cap or R, but I believe no. In other words, is there something to gain from experimenting on SPICE? I also wonder where they got f0 from.Edit: Yeah, I'm going to build this in SPICE, ...., then compare to the irl circuit.ThanksI'd be blown away from any answers

author: RoGeorge
author_rank: Super Contributor
timestamp: December 13, 2021, 06:21:31 pm
content: 1. The wayanyoscillator works is based on three things:- amplification - or else any eventual oscillation that might appear will extinguish- feedback - a portion of the output signal must go back and interact with the input, so to keep everything in sync, because any non-synchronous signal is unwanted in an oscillator, that will be just noise- delay - that is the tricky part, the delay must be just right, so the feedback signal seen at the input will appear in sync with the output, in practice that needs to be a positive feedback, or zero phase shift overall.2. The reason oscillators will start oscillate by themselves is because there is a small (electric) noise in everything, so at some point a small deviation will appear at the input (because of noise), that deviation will get amplified, then it will arrive at the output, then the feedback loop will return at the input an even bigger signal of just the right phase, and so on the cycle repeats until the oscillator arrives to its nominal oscillations amplitude. Without a "push" from outside, being it a manual push or a small push caused by noise, in theory the oscillations will never start.There are many ways to look at an oscillator. Control theory is one of them, seems the most intuitive to me, and it is not tied to electronics only, the principles described at 1. stand true for any kind of self-oscillating phenomena.Simulating the circuit is a good approach, LTspice is the most popular, thought you may want to try QucsStudio, too. QucsStudio has a very nice feature that can come handy when understanding circuits: it can add a slider for any values used in a schematic, so it is possible to interact live with the circuit by dragging the sliders (short QucsStudio demo herehttps://www.eevblog.com/forum/eda/qucs-qucs-s-and-qucsstudio-simulators-are-not-the-same-thing/)

author: renzoms
author_rank: Regular Contributor
timestamp: December 13, 2021, 06:36:33 pm
content: Thanks RoGeorge,I built the circuit in LTSpice and I am getting weird output behavior.The output voltage is either constant 0.6 mV when I do a trans simulation for 2 seconds,or shoots up to 14 V when I do a trans simulation for 1 second.Weird.Ah I see it. Wrong inputs. Updating comment.Ah, that didn't do anything.

author: Keith956
author_rank: Regular Contributor
timestamp: December 13, 2021, 06:44:39 pm
content: It's quite difficult to simulate something like a Wien bridge oscillator in Spice. In the images below is a simple AC analysis of the circuit, considering the series/parallel RC network. As the analysis shows, you have 2 poles in the s plane, and the circuit will oscillate when the gain of the amplifier (+3) compensates for the loss in the RC network.In practise the gain has to be slightly greater than 3 initially so oscillation can build up from noise in the circuit, then fall to 3, else the opamp will clip and there will be significant distortion. Various techniques are used for this e.g. simple lamp bulb, thermistor or e.g. a jfet acting as a voltage dependent resistor.

author: Keith956
author_rank: Regular Contributor
timestamp: December 13, 2021, 06:47:18 pm
content: Forgot to attach the images...

author: RoGeorge
author_rank: Super Contributor
timestamp: December 13, 2021, 06:51:39 pm
content: Quote from: renzoms on December 13, 2021, 06:36:33 pmAs a general rule, it is a good practice to attach here the .asc file from LTspice, so others can run/modify the same circuit as yours without spending time to draw again the same circuit.The amplification for a Wien bridge oscillator must be kept to be exactly 3 (because 3 is how much attenuation will add the RC filter).Simulating the start of an oscillator can be trickier than in real life, because in a simulator there might be no noise, so no little "bump" to start the oscillations. One way to overcome this is to start with an initial condition different from equilibrium condition. For example, start with some disequilibrium in the initial conditions. Put some initial charge in the capacitors, as an initial condition for the transient simulation.

author: renzoms
author_rank: Regular Contributor
timestamp: December 13, 2021, 07:02:38 pm
content: Keith,Thanks. I'm interested where you got this information from. I'd like to see this content as you do. Right now I just recognize "# of negative poles", transfer function, etc. I recognize the content from exposure but I don't really get it instantly.So I'm going to dive in and see if I ever had a chance of knowing what's going on. Just going to review the section on poles in my circuits book I read, then take a look at the notes made about poles in a diff. eq. course, and finally tie it all together with the transfer function.Edit: I also found a bunch of yt videos about it i might watch

author: Keith956
author_rank: Regular Contributor
timestamp: December 13, 2021, 07:08:18 pm
content: It came from a textbook I had at university aeons ago - one of the clearest in explaining the basics though."Handbook of linear integrated electronics for research" by T.D.S Hamilton. McGraw-Hill ISBN 0-07-084483-6There are probably plenty of other books with a similar analysis, though.

author: renzoms
author_rank: Regular Contributor
timestamp: December 13, 2021, 07:09:03 pm
content: RoGeorge,Thanks. I will add these now and in future postsA-ha, now I see that reason for which my circuit does not properly oscillate.That capacitor i.c. idea sounds like a good idea, but I've got to get back to that after I do some studying. It would be nice to see this circuit work

author: renzoms
author_rank: Regular Contributor
timestamp: December 13, 2021, 07:12:32 pm
content: Keith,did you read that book in undergraduate or graduate? I wonder if I should dive into this study, or keep it in the back of my mind while I keep on doing other stuff (working on getting familiar with lab and finishing Sedra/Smith Microelectronic circuits / reviewing circuits and content in Practical Electronics for Inventors, and considering The Art of Electronics). Long term focused.Thanks, either way

author: Keith956
author_rank: Regular Contributor
timestamp: December 13, 2021, 07:28:21 pm
content: Undergraduate, back in the late 70's.Books like the Art of Electronics are useful but they don't really cover the basics like pole/zero analysis, laplace transforms etc.

author: renzoms
author_rank: Regular Contributor
timestamp: December 13, 2021, 07:31:43 pm
content: Alright

author: RoGeorge
author_rank: Super Contributor
timestamp: December 13, 2021, 07:46:33 pm
content: The usual posting habits on EEVblog is to not post replies that doesn't add content to a thread. Posts like "yes", "agree" or other chat-like replies are not encouraged on this forum.Back to the schematic, another way to give a start "bump" to an oscillator in SPICE would be to set an initial voltage on a node using the .ic SPICE directive, like in the modified attachment here.

author: renzoms
author_rank: Regular Contributor
timestamp: December 13, 2021, 07:54:32 pm
content: I like the casual experience I engage in, but if that's not allowed I get that, and I can go ahead and continue in a specific question/answer use.

author: rstofer
author_rank: Super Contributor
timestamp: December 13, 2021, 08:46:20 pm
content: Quote from: Keith956 on December 13, 2021, 07:28:21 pmI don't think you will find all of electronic engineering in a single book. I have all 3 volumes of the Art or Electronics and I still don't know what to make of them. At a hobby level, much of the theory isn't necessary. A little Ohm's Law, a dash of Kirchhoff's Laws and you're pretty much good to go. OK, add a little reactance/impedance if you worry about filters.There are tutorials all over the Internet.

author: renzoms
author_rank: Regular Contributor
timestamp: December 13, 2021, 09:14:45 pm
content: I like the way they did their AC analysis. Broke it up into a non-inverting amplifier providing A. Then set up VIN*A = VOUT, VIN/VOUT = AAnd then they used the Transfer Function Vout2/Vin2 = Zp/Zs+Zp,Then they solved for A. This was a really good thought provoking.Whatever I said may have been off but I and you know what I meanThanks everyone:)

author: rstofer
author_rank: Super Contributor
timestamp: December 13, 2021, 09:23:40 pm
content: Quote from: Keith956 on December 13, 2021, 07:08:18 pmUsed copies of the book are available at Alibris for about $16 - the ONLY seller is in the UKThrough Amazon (US), the book is a little over $2 but expedited shipping is $28. Same seller...https://www.alibris.com/booksearch?mtype=B&keyword=0-07-084483-6&hs.x=0&hs.y=0One of the truisms: Amplifiers oscillate, oscillators don't. I learned that in lab class!

author: rstofer
author_rank: Super Contributor
timestamp: December 13, 2021, 09:40:03 pm
content: As long as we're getting to poles and zeros, who can forget their first Spirule?https://www.nzeldes.com/HOC/Spirule.htmThere's a link to the Instruction Manual at the bottom of the page.And that's why I concentrated on digital. Analog math was just too ugly!

author: David Hess
author_rank: Super Contributor
timestamp: December 14, 2021, 01:19:09 am
content: AC analysis assumes linear response which is violated by the gain control of a Wien bridge circuit. Transient response analysis is more suitable and can produce useful results including distortion measurements.

author: KE5FX
author_rank: Super Contributor
timestamp: December 14, 2021, 04:26:30 am
content: Quote from: RoGeorge on December 13, 2021, 07:46:33 pmOr just change.tran 10msto.tran 10ms startup. (Or more realistically.tran 250 ms startup, since 10 ms isn't enough time for it to achieve steady-state operation.)