# Does PLL stabilize the frequency variations of a crystal oscillator?

I don't know inner workings of phased locked loop and only know that PLL can be used to multiply the clock frequency of a crystal oscillator for instance for a micro-controller.

My question is: does it also take care of the stability or precision of the oscillator?

For example, imagine I use a 8 MHz quartz resonator as an external clock source and my aim is to achieve 72 MHz for the system by using MCU's PLLs by multiplication factor of 9. And let's say the measured real frequency of the external oscillator is 7.9 MHz and it also drifts to 7.8 MHz after several hours due to temperature ect.

Does that mean the MCU's system frequency will be blindly and directly affected from this variation and will be 70.2 MHz; or will the PLL will still keep it at around 72 MHz?

If you draw a block diagram of a typical PLL, the answer becomes obvious. The frequency divider is inserted in the feedback path.

PLL from Wikipedia

The output frequency will always eventually follow the input frequency. There will be a slight lag because of the loop filter. So, fast variations in the input frequency will be smoothed out. Long term variations will not.

A slow time constant in the PLL can filter phase noise and make the clock more stable for short time periods.
But the crystal will be responsible for the long time drift (long in terms of longer that 1s or so...?). The PLL will follow the crystals frequency drift with the speed of the filter. If the crystal has a temperature drift or suffers aging, the PLL output will follow suit.

To avoid long term changes in the frequency you have to keep the crystal oscillator stable, e.g. by using a TCXO or OCXO.

A PLL multiplies the running average of the input frequency over past cycles. A running average is a low pass filter, so it essentially low pass filters the rate of change of the input from the crystal. If you have high frequency variation in the input frequency, this will be suppressed. If you have slow drift (low frequency changes), this will pass through the filter unchanged.

If you plot the instantaneous frequency of the crystal and the PLL divided down to the input frequency you will see that the PLL output is a smoothed fit through the input frequencies, so it will track them as they drift. If you need absolute frequency accuracy, use an accurate input to the PLL.

With a digital PLL multiplying your reference, the MCU clock will always be N times your reference. If the reference changes 1%, the MCU clock will change 1%.

100 ppm (0.01%) variation is trivial and cheap to achieve, buying any old crystal or crystal oscillator. Read some data sheets and spend a small amount of money and you can get 1 ppm.