Compute fundamental value of signal

Control and Measurements/Measurements

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

$$\begin{array}{l}Fundamental\left(f(t)\right)=a\mathrm{cos}({\omega}_{0}t)+b\mathrm{sin}({\omega}_{0}t)\\ a=\frac{2}{T}{\displaystyle \underset{(t-T)}{\overset{t}{\int}}f(t)\mathrm{cos}({\omega}_{0}t)dt}\\ b=\frac{2}{T}{\displaystyle \underset{(t-T)}{\overset{t}{\int}}f(t)\mathrm{sin}({\omega}_{0}t)dt}\\ T=\frac{1}{{f}_{0}}\text{}{f}_{0}:\text{Fundamentalfrequency}\\ {\omega}_{0}=2\times \Pi \times {f}_{0}\end{array}$$

The magnitude and phase of the fundamental is calculated by

$$Magnitude=\sqrt{{a}^{2}+{b}^{2}}\text{}Phase=a\mathrm{tan}(b/a)$$

To resolve these equations, the block uses the input 1 (Freq)
for *f*_{0} and input 2 (wt)
for ω_{0}*t*. 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.

**Initial frequency (Hz)**Specify the frequency of the first cycle of simulation.

**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.

**Initial input [ Mag, Phase-relative-to-PLL (degrees) ]**Specify the initial magnitude and phase in degrees of the input signal.

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

`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.

- $$\angle \text{u}$$
`Phase`

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

Sample Time | Specified in the Sample Time parameterContinuous if Sample Time = 0 |

Scalar Expansion | Yes, of the parameters |

Dimensionalized | Yes, for Input 3 (In) |

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.

Was this topic helpful?