Main Content

Fundamental (PLL-Driven)

Compute fundamental value of signal

Library

Simscape / Electrical / Specialized Power Systems / Sensors and Measurements

  • Fundamental (PLL-Driven) block

Description

The Fundamental (PLL-Driven) block computes the fundamental value of the input 3 over a running window of one cycle of fundamental frequency given by input 1. The reference frame required for the computation is given by the input 2.

Based on the Fourier analysis of a periodic signal, the fundamental value of a signal f(t) can be expressed as

Fundamental(f(t))=acos(ω0t)+bsin(ω0t)a=2T(tT)tf(t)cos(ω0t)dtb=2T(tT)tf(t)sin(ω0t)dtT=1f0       f0:Fundamental frequencyω0=2×Π×f0

The magnitude and phase of the fundamental is calculated by

Magnitude=a2+b2      Phase=atan(b/a)

To resolve these equations, the block uses the input 1 (Freq) for f0 and input 2 (wt) for ω0t. These two input signals are normally connected to the outputs of a PLL block.

As this block uses a running average window, one cycle of simulation must complete before the outputs give the correct magnitude and angle. For the first cycle of simulation, the outputs are held to the values specified by the initial input parameter.

Parameters

Initial frequency (Hz)

Specify the frequency of the first cycle of simulation. Default is 60.

Minimum frequency (Hz)

Specify the minimum frequency value that sets the buffer size of the Variable Time Delay block used inside the block to compute the fundamental value. Default is 45.

Initial input [ Mag, Phase-relative-to-PLL (degrees) ]

Specify the initial magnitude and phase in degrees of the input signal. Default is [1, 0].

Sample time

Specify the sample time of the block, in seconds. Set to 0 to implement a continuous block. Default is 0.

Inputs and Outputs

Freq

Fundamental frequency (Hz) required by the computation. This input is normally connected to the output Freq of a PLL block.

wt

Angle of the reference frame (rad/s) required for the computation. This input is normally connected to the output wt of a PLL block.

In

Connects to the signal to be analyzed. Typical input signals are voltages or currents measured by the Current Measurement or Voltage Measurement block.

|u|Magnitude

Returns the magnitude of the fundamental in the same unit as the input signal.

uPhase

Returns the phase of the fundamental, in degrees, relative to the reference frame wt (input 2).

Characteristics

Sample TimeSpecified in the Sample Time parameter
Continuous if Sample Time = 0
Scalar ExpansionYes, of the parameters
DimensionalizedYes, for Input 3 (In)

Examples

The power_FundamentalPLLDriven model compares the Fourier block (with a specified fundamental frequency of 60 Hz) output to the Fundamental (PLL-Driven) block output. The PLL-Driven block outputs accurate magnitude and phase even if the fundamental frequency of the input signal varies during the simulation.

The model sample time is parameterized by the Ts variable set to a default value of 50e-6 s. Set Ts to 0 in the command window to simulate the model in continuous mode.

Version History

Introduced in R2013a