All About Circuits
Volume 
Designing Analog Chips
Chapter
Timers and Oscillators
PDF Version

Simulation of Oscillators



You’ve just drawn up a great idea for an oscillator, and you start the simulation. Nothing happens. You get nothing but DC levels.

This situation is all too common. The simulator is trained to first find an operating point— in other words, to set the DC voltages and currents so all the device equations are satisfied. In simulator-speak, it finds convergence. Then, the transient analysis starts, and the computer finds that all the voltages and currents remain unchanged over time.

In real life, the circuit may start at exactly the same point, but no voltage or current stays unchanged. There is noise. Without any noise or some sort of transient disturbance, no circuit would oscillate. It would just sit there, precariously balanced.

No matter how tiny these fluctuations are, they move the circuit to a slightly different operating point. The gain and feedback in the circuit then cause the signal to grow. In this way, the oscillation gradually builds momentum.

 

Addressing the Challenges

Having a simulator that allows real-time noise is a great advantage. Real-time noise means that all currents and resistors actually produce the appropriate amount of noise—not only for a small-signal AC simulation, but during a transient analysis as well.

With this feature, a properly designed oscillator will always start. If you are using a simulator that has no real-time noise, you may have to coax the oscillator by jarring it with a pulse. For example, you could step the supply voltage abruptly to a higher level.

However, there’s a second potential problem: it may take a long time for the oscillation to build up. For the circuits discussed so far in this chapter, this is no great worry. For the type of circuits we are about to encounter, however, this can be very frustrating.

Take a crystal oscillator, for example. A high-quality crystal can take up to a second to start oscillating. At 10 MHz, that amounts to 10 million cycles the simulator has to go through, in very small timesteps, to catch any movement. If you aren’t aware of this nuisance, you may sit there watching flat lines and come to the conclusion that your oscillator doesn’t work.