PLL TRACKER
Phase Error: --
PLL Mathematical Dynamics
A Phase-Locked Loop (PLL) is a closed-loop feedback control system. Its purpose is to continuously compare a reference signal with a locally generated signal and adjust the local oscillator until both signals have the same frequency and a constant phase relationship.
Fundamental Error Equation
This quantity is called the phase error. The PLL's objective is to drive this error toward zero (or a small constant value) through feedback.
The Three-Stage Process
1. Phase Detector (PD)
The phase detector compares the phase of the reference signal with the phase of the VCO output.
where:
- Vd = detector output voltage
- Kd = detector gain
- Īøerr = phase difference
For small phase errors:
Therefore:
2. Loop Filter (LPF)
The detector output contains both useful information and high-frequency components. The loop filter removes unwanted components and creates a smooth control voltage.
In many DSP implementations, a simple Exponential Moving Average (EMA) filter is used:
where:
- α = filter coefficient
- Vd = detector voltage
- Vc = control voltage
Larger α values produce faster tracking but can increase jitter. Smaller α values provide smoother operation but slower lock times.
3. Voltage Controlled Oscillator (VCO)
The filtered control voltage changes the oscillator frequency.
where:
- Ļfree = free-running frequency
- Kv = VCO sensitivity
- Vc = control voltage
If the VCO is running too slowly, the control voltage increases, causing the VCO frequency to rise. If the VCO is too fast, the voltage decreases, slowing it down.
Closed-Loop Interpretation
The PLL continuously repeats this cycle. Every correction reduces the difference between the reference signal and the oscillator output.
Lock Condition
A PLL is considered locked when the phase error becomes constant.
At lock:
- Reference frequency = VCO frequency
- Phase difference becomes constant
- Control voltage stabilizes
- The loop no longer needs large corrections
Simulator Parameter Mapping
| Simulator Label | Math Symbol | Description |
|---|---|---|
| Reference Frequency | fref | Target frequency |
| Phase Error | Īøerr | Difference between phases |
| Detector Gain | Kd | Phase detector sensitivity |
| Filter Alpha | α | Loop filter coefficient |
| VCO Gain | Kv | Frequency sensitivity of VCO |
| Control Voltage | Vc | Correction signal |
| VCO Frequency | fvco | Current oscillator frequency |