# Phase-locked loop

A phase-locked loop (PLL) is to frequency what an operational amplifier is to voltage.

An op-amp has two inputs and the it tries to make its output whatever voltage it takes to make the two input voltages equal. A PLL is a variable oscillator that has two control inputs. It tries to make its output frequency whatever it takes to make the two input frequencies equal.

A Phase-locked Loop

The Reference input is the equivalent to the non-inverting input of an op-amp and the Feedback input is equivalent to the inverting input.

## Frequency Follower

A phase-locked loop is usually used as either a frequency follower (comparable to an op-amp voltage follower) or as a frequency multiplier (comparable to an op-amp non-inverting amplifier). A voltage follower has the output connected directly to the inverting input of the op-amp. A frequency follower has the output connected directly to the Feedback input of the PLL.

A PLL Frequency Follower

A frequency follower is often used to reshape the wave of the input signal without changing its frequency. For example, the input may be a square wave with a 10% duty cycle and the output is a square wave with a 50% duty cycle.

One use for a phase-locked loop, a PLL frequency follower converts a square wave with a
10% duty cycle to a square wave with a 50% duty cycle

Most phase-locked loops produce square waves. However, some produce other wave shapes including sine waves. As such, a PLL frequency follower can be used to change virtually any input wave shape into any desired output wave shape.

## PLL Frequency Multiplier

A PLL frequency multiplier works much like an op-amp non-inverting amplifier. With the non-inverting amplifier, if you put a voltage divider in the feedback loop such that half of the output voltage is applied to the inverting input, the output voltage will be twice the voltage applied to the non-inverting input (see op-amp non-inverting amplifier in analog circuits).

An Op-amp Non-inverting Amplifier

With a PLL frequency multiplier, if you put a frequency divider in the feedback loop such that the frequency applied to the feedback input is half of the output frequency, the output frequency will be double the frequency applied to the reference input.

A PLL Frequency Doubler

The gain of an op-amp non-inverting amplifier is determined by voltage divider in the feedback loop. Likewise, the multiplication factor of a PLL frequency multiplier is determined by the frequency divider in its feedback loop.

## Frequency Synthesizer

If you put a variable frequency divider (aka a divide-by-n counter) in the feedback loop of a PLL frequency multiplier you have a frequency synthesizer.

A PLL Frequency Synthesizer

By properly selecting the base frequency, any desired frequency can be obtained in the desired steps. A frequency synthesizer makes a digitally controlled variable oscillator.

Frequency dividers used in frequency synthesizers are digital counter circuits. These will be covered in the Digital Circuits module.

## PLL Internals

A Phase-locked Loop consists essentially of a phase comparator (aka a frequency comparator), a low-pass filter and a voltage-controlled oscillator (VCO). The voltage that controls the VCO is available as an output on integrated circuit PLLs. This provides a voltage that is proportional to the output frequency that can have various uses. For example, if the reference frequency changes, as in frequency modulation, this voltage changes with the frequency. As such it acts as an FM demodulator. This would be used in an FM receiver to recreate the signal used to modulate the FM radio signal.

The basic PLL circuit