> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/blocks-functions-tools/control-and-measurements/analysis/positive-sequence-pll-driven.md).

# Positive-Sequence (PLL-Driven)

## Description

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-b9ce49c9177b425a3687d90d95eaf5afa4162d33%2Fpos-seq_PLLdriven_block.png?alt=media" alt=""><figcaption></figcaption></figure>

The **Positive-Sequence (PLL-Driven)** block, located in the **OPAL-RT SPS Software/Sensors and Measurements** library, computes the positive-sequence component (magnitude and phase) of the input 3 signal over a running window of one cycle of the fundamental frequency given by input 1. The reference frame required for the computation is given by the input 2. The first two inputs are normally connected to a PLL block.

The positive-sequence component of a three-phase signal (V<sub>1</sub> or current I<sub>1</sub>) is computed as

$$
V\_{1}
======

\frac{1}{3}
\left(
V\_{a}
\+
a \cdot V\_{b}
\+
a^{2} \cdot V\_{c}
\right)
\\\[8pt]

V\_{a},, V\_{b},, V\_{c} : \text{three voltage phasors at the fundamental frequency}
\\\[8pt]

a = e^{j 2\pi/3} = 1\angle 120^\circ\ \text{complex operator}
\\\[8pt]
$$

A Fourier analysis over a sliding window of one cycle of the fundamental frequency (input 1) is first applied to the three input signals. The block evaluates the phasor values at the fundamental. Then the transformation is applied to obtain the positive sequence.

As the block uses a running average window to perform the Fourier analysis, one cycle of simulation must complete before the outputs give the correct magnitude and angle. For example, the block response to a step change of V<sub>1</sub> is a one-cycle ramp. For the first cycle of simulation, the output is held constant to the values specified by the initial input parameters.

## Parameters

<table data-header-hidden><thead><tr><th width="250.00006103515625"></th><th></th></tr></thead><tbody><tr><td><strong>Initial frequency (Hz)</strong></td><td><p>Specify the frequency of the first cycle of simulation.</p><p>Default is 60.</p></td></tr><tr><td><strong>Minimum frequency (Hz)</strong></td><td><p>The minimum frequency value determines the buffer size of the Variable Time Delay block used inside the block to compute the phasors.</p><p>Default is 45.</p></td></tr><tr><td><strong>Initial input (positive component) [ Mag, Phase-relative-to-PLL (degrees) ]</strong></td><td><p>Specify the initial positive-sequence magnitude and phase (relative to the PLL phase), in degrees, of the input signals.</p><p>Default is [1, 0].</p></td></tr><tr><td><strong>Sample time</strong></td><td><p>Specify the sample time of the block, in seconds.</p><p>Set to 0 to implement a continuous block.</p><p>Default is 0.</p></td></tr></tbody></table>

## Inputs and Outputs

<table data-header-hidden><thead><tr><th width="250.48895263671875"></th><th></th></tr></thead><tbody><tr><td><strong>Freq</strong></td><td><p>Fundamental frequency (Hz) required by the computation.</p><p>This input is normally connected to the Freq output of a PLL block.</p></td></tr><tr><td><strong>wt</strong></td><td><p>Angle of the reference frame (rad/s) required for the computation.</p><p>This input is normally connected to the wt output of a PLL block.</p></td></tr><tr><td><strong>abc</strong></td><td><p>The vectorized signal of the three [a b c] sinusoidal signals.</p><p>Typical input signals are voltages or currents measured by Current Measurement or Voltage Measurement blocks.</p></td></tr><tr><td>|u| <strong>Magnitude</strong></td><td>Outputs the magnitude of the positive-sequence component in the same unit as the input signal.</td></tr><tr><td><span class="math">\angle u</span> <strong>Phase</strong></td><td>Outputs the phase of the positive-sequence component, in degrees, relative to the reference frame wt (input 2).</td></tr></tbody></table>

## Characteristics

<table data-header-hidden><thead><tr><th width="249.77777099609375"></th><th></th></tr></thead><tbody><tr><td>Sample Time</td><td>Specified in the <strong>Sample Time</strong> parameter Continuous if <strong>Sample Time</strong> = 0</td></tr><tr><td>Scalar Expansion</td><td>No</td></tr><tr><td>Dimensionalized</td><td>No</td></tr></tbody></table>

## Examples

The power\_PositiveSequencePLLDriven model computes the positive-sequence component of a three-phase signal containing harmonics. It shows that the 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/smart-power-simulation-software-sps/blocks-functions-tools/control-and-measurements/analysis/positive-sequence-pll-driven.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
