Contenuto principale

PLL

(To be removed) Determine frequency and fundamental component of signal phase angle

The Specialized Power Systems library will be removed in R2026a. Use the Simscape™ Electrical™ blocks and functions instead. For more information on updating your models, see Upgrade Specialized Power System Models to use Simscape Electrical Blocks.

  • PLL block

Libraries:
Simscape / Electrical / Specialized Power Systems / Control

Description

The PLL block models a Phase Lock Loop (PLL) closed-loop control system, which tracks the frequency and phase of a sinusoidal signal by using an internal frequency oscillator. The control system adjusts the internal oscillator frequency to keep the phases difference to 0.

The figure shows the internal diagram of the PLL.

The input signal is mixed with an internal oscillator signal. The DC component of the mixed signal (proportional to the phase difference between these two signals) is extracted with a variable frequency mean value. A Proportional-Integral-Derivative (PID) controller with an optional automatic gain control (AGC) keeps the phase difference to 0 by acting on a controlled oscillator. The PID output, corresponding to the angular velocity, is filtered and converted to the frequency, in hertz, which is used by the mean value.

Characteristics

Sample TimeSpecified in the Sample Time parameter.
Continuous when Sample Time = 0.
Scalar ExpansionNo
DimensionalizedNo
Zero-Crossing DetectionYes

Ports

Input

expand all

Normalized input signal, in pu.

Output

expand all

Measured frequency, in hertz.

Angle (rad) varying between 0 and 2*pi, synchronized on zero crossings (rising) of the fundamental of the input signal.

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Minimum expected frequency of the input signal. This parameter sets the buffer size of the Mean (Variable Frequency) block used inside the block to compute the mean value.

Initial phase and frequency of the input signal.

Proportional, integral, and derivative gains of the internal PID controller. Use the gains to tune the PLL response time, overshoot, and steady-state error performances.

Time constant for the first-order filter of the PID derivative block.

Maximum positive and negative slope of the signal frequency.

Second-order lowpass filter cut-off frequency.

Sample time of the block, in seconds. Set to 0 to implement a continuous block.

When you select this parameter, the PLL block optimizes its performances by scaling the PID regulator signal according to the input signal magnitude. Select this option when the input signal is not normalized.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2013a