From Alignment Error to Synchronization

In When the Reference Frame Is Wrong, the synchronous reference frame was shown to depend on correct alignment between the observer and the rotating space vector.

When alignment is achieved:

q=0q = 0

The space vector lies entirely along the d-axis and the dq quantities remain constant.

When alignment is lost:

q0q \neq 0

A component appears along the q-axis, indicating that the observer is not correctly aligned with the vector.

When the Reference Frame Is Wrong also showed that frequency mismatch causes angular error to grow continuously, producing oscillating dq quantities.

As angular error grows, the observer and the space vector no longer rotate together. The vector therefore appears to rotate within the dq frame, causing the d and q components to oscillate.

The practical challenge is preventing this loss of alignment. The Phase-Locked Loop is introduced as the mechanism that continuously adjusts the observer so that synchronization is maintained.

This article is part of the Reference Frames in Power Systems series.


The Alignment Problem

The alignment between the observer and the space vector can be described by:

θerr=θvecθobs\theta_{err} = \theta_{vec} - \theta_{obs}

The objective is to maintain:

θerr0\theta_{err} \rightarrow 0

The observer requires the correct angular position and the correct angular speed. These quantities are not known in advance and must be estimated continuously while the electrical system evolves.

This is the problem solved by the Phase-Locked Loop (PLL).


What Is a PLL?

A Phase-Locked Loop is a synchronization mechanism.

Its purpose is to continuously align the rotating reference frame with the rotating space vector.

The PLL does not change the electrical system. It adjusts the observer.

The PLL can be viewed as an automatic observer-alignment mechanism. Its purpose is to continuously rotate the observer until the rotating reference frame remains aligned with the space vector. In doing so, it continuously corrects the angle and speed errors discussed in Synchronous Reference Frame (dq) and When the Reference Frame Is Wrong.

The PLL therefore solves the alignment problem that arises whenever the observer loses synchronization with the electrical quantity being observed.

Its objective is to:

  • Estimate the correct angle.
  • Estimate the correct frequency.
  • Maintain alignment with the space vector.

The q-Component as an Error Signal

When the observer is aligned:

q=0q = 0

When the observer is not aligned:

q0q \neq 0

For small angular errors:

qVθerrq \approx V\theta_{err}

Larger angular errors produce larger q-components.

The sign of q indicates the direction of misalignment.


Conceptual Feedback Process

The PLL operates as a feedback loop:

  1. Measure the q-component.
  2. Estimate the correction required.
  3. Adjust the observer speed.
  4. Update the observer angle.
  5. Reduce q toward zero.

The purpose of this process is to reduce angular error.

As discussed in When the Reference Frame Is Wrong, a non-zero q-component indicates that the observer is not correctly aligned with the space vector. Reducing q therefore reduces the alignment error between the observer and the vector.

When q approaches zero, the observer becomes aligned with the space vector and the rotating reference frame reaches the condition required for steady dq quantities.


Angle Tracking

The PLL continuously maintains an estimate of:

θobs\theta_{obs}

The objective is to ensure that this estimate follows:

θvec\theta_{vec}

When the estimates match, angular error approaches zero.


Frequency Tracking

The PLL also maintains an estimate of:

ωobs\omega_{obs}

If the frequency estimate is incorrect, angular error accumulates over time.

The PLL continuously adjusts its frequency estimate to maintain synchronization.


Acquiring Lock

Initially:

  • Angular error may be large.
  • q may be large.
  • The observer may be significantly misaligned.

The PLL progressively:

  1. Detects alignment error.
  2. Adjusts its frequency estimate.
  3. Updates its angle estimate.
  4. Reduces angular error.
  5. Converges toward alignment.

This process is known as lock acquisition.


Locked State

A PLL is said to be locked when the observer remains synchronized with the space vector.

In the locked condition:

  • Angular error remains close to zero.
  • q remains close to zero.
  • Estimated frequency matches actual frequency.
  • Estimated angle follows the space-vector angle.

The rotating reference frame remains aligned and balanced steady-state quantities appear nearly constant.

Once locked, the observer and the space vector have essentially no relative motion. The rotating reference frame therefore behaves exactly as described in Synchronous Reference Frame (dq). The space vector appears stationary, the d-axis remains aligned with the vector, and balanced steady-state quantities appear nearly constant in the dq frame.


Unlocked State

A PLL is considered unlocked when synchronization is lost.

Angular error becomes significant, q deviates from zero, and the observer no longer remains aligned with the space vector.


Behaviour During a Frequency Change

Following a frequency step:

  • The space vector rotates faster or slower.
  • Angular error develops.
  • q becomes non-zero.
  • The PLL adjusts its frequency estimate.
  • Synchronization is restored.

Behaviour During a Phase Jump

Following a phase jump:

  • Angular error appears immediately.
  • q becomes non-zero.
  • The PLL adjusts its angle estimate.
  • Alignment is restored.

Interactive Visualization

Manual Mode — You are the controller. Use Observer Faster / Slower to adjust the observer's speed and Phase Nudge to correct its angle. Your goal: keep q near 0 and θerr near 0. Then switch to Auto (PLL) to see how the PLL handles it automatically.
Speed:
Initial conditions:A: A – Large Error (90°, 2 Hz) B: B – Angle Only (30°, 0 Hz) C: C – Frequency Only (0°, 2 Hz)
Observer:Phase:
Locked·err| = 0.0°·ωobs = 50.000 Hz·● Manual
Panel 1 – Actual System
αβθvec
θvec = 0.0°|V| = 1.000
Panel 2 – Observer Frame
dq
θobs = 0.0°θerr = 0.0°q = 0.0000
Panel 3 – PLL Signals
q-component — drive this to zero
+1−10q → 0
Angular error θerr (degrees)
+180°−180°θerr
Observer frequency ωobs (Hz)
55 Hz45 Hz50 Hzωobs
θvec0.0°
θobs0.0°
θerr0.0°
q0.0000
ωobs50.000 Hz
StatusLocked

Your task: keep q = 0 and θerr = 0. Press Observer Faster if the space vector is running ahead of your d-axis (q growing positive). Press Observer Slower if the observer is running ahead (q growing negative). Use Phase Nudge for a quick angle correction.

Notice how difficult this becomes at faster speeds. The continuous, exact correction needed is precisely what the PLL automates. When you are ready, switch to Auto (PLL) to see the automatic version.

The visualization above shows a first-order PI PLL continuously aligning its rotating observer frame with the actual space vector.

  • Panel 1 (Actual System): The blue arrow is the space vector rotating at 50 Hz. Its angle is θvec.
  • Panel 2 (Observer Frame): The d-axis (amber) and q-axis (green) are the observer's rotating axes. The red arc is the angular error θerr between observer and space vector. When the PLL is locked, d aligns with the space vector and the arc disappears.
  • Panel 3 (PLL Behaviour): Three time traces — q (the error signal the PLL drives to zero), θerr (reducing to zero when locked), and ωobs (the observer frequency the PLL adjusts to maintain synchronization).

Use Scenario A to watch lock acquisition from a large initial error. Use Scenario B to observe frequency-step recovery. Use the Disturbance buttons while locked to inject phase or frequency steps.

Synchronous Reference Frame PLL

Many grid-connected converters use a synchronous-reference-frame PLL (SRF-PLL).

The SRF-PLL operates directly within the rotating dq frame introduced in Stationary Reference Frame (αβ), Synchronous Reference Frame (dq), and When the Reference Frame Is Wrong.

By continuously driving the q-component toward zero, the SRF-PLL maintains alignment between the rotating reference frame and the grid-voltage space vector.


Summary

The synchronous reference frame depends on maintaining correct alignment between the observer and the rotating space vector.

The Phase-Locked Loop continuously solves this alignment problem. By monitoring the q-component, estimating corrections, and updating angle and frequency, the PLL maintains synchronization between the rotating reference frame and the electrical system.

The PLL therefore provides the mechanism that allows the rotating reference frame introduced earlier in this series to remain aligned during both steady-state operation and system disturbances.


Series Complete

You have completed the Reference Frames in Power Systems series.

The series developed the following progression:

  1. From Sinusoids to Rotating Vectors — sinusoidal quantities as projections of rotating vectors, the concept of an observer, and the definition of a reference frame.
  2. Stationary Reference Frame (αβ) — the Clarke transformation, space vector representation, and the stationary αβ frame.
  3. Synchronous Reference Frame (dq) — the Park transformation, synchronous rotation, and the conditions under which dq quantities become constant.
  4. When the Reference Frame Is Wrong — the effects of angular error and frequency mismatch on dq quantities.
  5. Phase-Locked Loop (PLL) — the feedback mechanism that continuously maintains alignment between the rotating frame and the space vector.

View the Reference Frames in Power Systems series landing page for a structured overview of all articles.