Simple Op-Amp Oscillator in LTspice

Thread Starter

janizer

Joined Nov 17, 2016
2
Hey! I'm having trouble simulating a simple oscillator in LTspice. I'm not overly experienced with the software, but I'm pretty sure I built exactly this circuit in real life, so I'm confused as to why it's not working. Any suggestions?
 

Attachments

RichardO

Joined May 4, 2013
2,271
Try using a "real" op-amp in the simulation. For some reason the generic models in LTspice don't work. I think everyone gets burned by that.

I put a LT1013 in your circuit and it looks like it works right.
 

crutschow

Joined Mar 14, 2008
27,755
Do you have an explanationas to why that works?
Yes.
Normally Spice does a DC bias calculation with no inductors or capacitors in the circuit before it does the transient analysis.
This can result in the circuit ending up a a quasi-stable state with no oscillations.
In a real circuit, intrinsic noise would start the oscillations, but there no such noise in the simulation.
If you avoid this initial bias calculation by using the UIC command, then Spice immediately starts the transient simulation with the initial voltages at zero, and thus the oscillation will start.

You can also start the oscillations by adding a small perturbation in the feedback loop to simulate normal circuit noise, for example a pulse from a signal source, as shown below.
The circuit starts to oscillate after V3 inserts a single 1μV pulse into the feedback loop.

upload_2016-11-19_13-9-17.png
 
Last edited:

RichardO

Joined May 4, 2013
2,271
This can result in the circuit ending up a a quasi-stable state with no oscillations.
In a real circuit, intrinsic noise would start the oscillations, but there no such noise in the simulation.
OK. So what do you think is different between the generic op-amp model and a real op-amp model that makes this work?
 

crutschow

Joined Mar 14, 2008
27,755
OK. So what do you think is different between the generic op-amp model and a real op-amp model that makes this work?
Not sure.
Perhaps just the non-idealities of the real op amp as compared to the ideal.
My simulation shows that the Lt1013 take nearly 80ms to start oscillations with a normal Spice startup.

upload_2016-11-19_13-28-48.png
 
Last edited:

RichardO

Joined May 4, 2013
2,271
Not sure.
Perhaps just the non-idealities of the real op amp as compared to the ideal.
My simulation shows, that the Lt1013 take nearly 80ms to start oscillations with a normal Spice startup.
Interesting. You have given me lots of food for thought.

Thanks.
 

crutschow

Joined Mar 14, 2008
27,755
Thinking about it, may be the small input offset voltage of the real op amp model that eventually causes it to start oscillating.
The ideal model has zero offset.
 

RichardO

Joined May 4, 2013
2,271
Thinking about it, may be the small input offset voltage of the real op amp model that eventually causes it to start oscillating.
The ideal model has zero offset.
I would not think so for that circuit. Unlike "resonate" oscillators this circuit will always start. No matter what the initial conditions the output will charge the cap until the hysteresis threshold is exceeded and the output flips.

There is only one exception I can think of. In a real op-amp the inputs could be out of the input common range at power up and, therefore, not start. This could happen with an op-amp that has the problem that its feedback phase can be wrong under overdrive conditions.

Of course, this doesn't explain why the ideal op-amp does not start since its input common range is can't be exceeded.
 

crutschow

Joined Mar 14, 2008
27,755
Of course, this doesn't explain why the ideal op-amp does not start since its input common range is can't be exceeded.
I think my explanation covered it.
Spice initially finds the initial (stable) DC solution with no capacitors (for the example, all voltages are at 0V).
The capacitors are then put in, and when the transient simulation starts, the circuit sits there in this quasi-stable state (like being perfectly balanced on the head of a pin) with nothing to start the oscillations with the ideal op amp.
But as my simulation shows (post #8), even a 1μV pulse will start it oscillating.
 
Top