I was reading more about the crystal oscillators and had this question in mind.

During the initial start up, the gain of the oscillator should be large and later on, the gain should be greater or equal to 1.

I'd like to understand on how this is done? Initially gain is high and later on it decreases to a lower value. How and when does this happen?

  • 1
    \$\begingroup\$ Please give a reference which source says the gain should work like that? \$\endgroup\$
    – Justme
    Commented May 25, 2022 at 16:34

2 Answers 2


If you are wanting a square wave output such as for a microcontroller then you keep the gain reasonably high because you want the inverting gate's output (such as in a Pierce oscillator) to saturate to logic levels. No gain control needed.

If you are making a crystal controlled sinewave generator then you need to reduce gain to close to unity (to ensure sinewave purity) once oscillations have begun.

This can be achieved by diodes clipping the signal entering the crystal or by using a voltage controlled attenuator that seeks to maintain the AC output at a level that is well within the power rails of the circuit thus avoiding sinewave clipping.


For a point of reference, think of the gain stage that is used for crystal oscillator in a microcontroller. This is often a simple NMOS/PMOS un-buffered inverter configuration that is DC-biased near its mid-point with a large-value feedback resistance.
I have measured the transconductance gain of a similar inverter (74HCU04). While this chip is more robust than a microcontroller gain stage, its basic characteristic behaviour is similar. Gain is maximum (near 0.023 A/V) when biased near its mid-point: 74HCU04 transconductance

So when its output is biased near half-Vdd (near 2.5V) the 74HCU04 gain is very close to maximum for small signals. If this gain is large enough that the crystal feedback path allows loop gain > 1, oscillations begin.

As amplitude rises, peak output voltage swings into the lower-gain regions near zero volts and near +5V. At large amplitudes, peaks spend more and more time in these low-gain regions, which also means that gate output waveform becomes more and more square. On average, loop gain is lower.
It is the non-linear behaviour that changes start-up loop gain > 1 to an average loop gain = 1.

edit: Shown below are two models of a 74HCU04 inverter - an amplifier that can serve as a gain element in an oscillator. Both models are simulated in LTspice.

  • one model (INV0) contains NMOS and PMOS devices that are non-linear, meaning that output voltage can never exceed the DC supply range of 0V to +5V.
  • The other linear model (G1) has nearly-identical AC characteristics, but has no restrictions on output swing.

74HCU04 LTspice schematic...two models:one non-linear, other linear

A 1kHz sine wave voltage is applied to the input port of both models (Vin) with various amplitudes. The lowest peak amplitude shown Vin=0.2V is amplified and inverted by both models, yielding output voltage nearly identical. Both outputs are sinusoidal in shape, with V(out) in green over-laying V(linear_model) in purple. Both models are running linearly. When the oscillator starts up, amplitude is small, and the amplifier runs linearly: LTspice output waveforms from two models

Since there is excess gain, amplitude of the oscillator grows with time, with Vin remaining sinusoidal in shape, but having larger swing. With Vin=0.4v peak, the non-linear model has already begun clipping peaks. The linear model never clips - if it were used in an oscillator, amplitude would grow eventually to a -sinewave of megavolts.
Clipping of the non-linear model has a squarish shape rather than sinusoidal. With peaks severely clipped, you can consider that amplifier gain is less than it was with lower amplitude. But speaking of "gain" of a non-linear amplifier is really not acceptable, because gain depends on input amplitude.

  • 1
    \$\begingroup\$ Very nicely diagrammed and the words combine well, too. This explanatory model is easily acquired. \$\endgroup\$
    – jonk
    Commented May 25, 2022 at 21:34
  • \$\begingroup\$ @glen_geek, could you please explain a bit more clear and simple terms? I feel it difficult to understand this transconductance term related explain and how does the gate output waveform become more and more square and how gain is less? Could you explain with a bit more simple terms and a analogy so that I can understand better? \$\endgroup\$
    – user220456
    Commented Jun 27, 2022 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.