> 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/frequency-phasor.md).

# Frequency (Phasor)

## Description

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

The **Frequency (Phasor)** block, located in the **OPAL-RT SPS Software/Sensors and Measurements** library, measures the frequency of a phasor voltage or current by calculating the derivative of the phase angle variation of the signal, with respect to a synchronous phasor rotating at the specified nominal frequency.

A low-pass filter is filtering out the high frequency components of the computed frequency. The unwrapped phase angle is computed and provided at the **ΔPhi** output.

This diagram shows an example of the Frequency (phasor) block measuring the frequency of a three-phase voltage phasor.

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

Use this block to measure the frequency of a phasor signal in a power system.

## Ports

### Input

<table data-header-hidden><thead><tr><th width="250.0888671875"></th><th></th></tr></thead><tbody><tr><td><strong>Phase (rad)</strong> — Phase angle<br>Scalar</td><td>Phase angle variation of the measured signal, in rad.<strong>Data Types:</strong>single | double</td></tr></tbody></table>

### Output

<table data-header-hidden><thead><tr><th width="250.13336181640625"></th><th></th></tr></thead><tbody><tr><td><strong>Freq (Hz)</strong> — Frequency<br>Scalar</td><td>Frequency of the input signal, in Hz.<strong>Data Types:</strong>single | double</td></tr><tr><td><strong>ΔPhi (rad)</strong> — Phase angle<br>Scalar</td><td><p>Unwrapped phase angle without 2*pi discontinuities, in rad.</p><p><strong>Data Types:</strong>single | double</p></td></tr></tbody></table>

## Parameters

<table data-header-hidden><thead><tr><th width="249.5555419921875"></th><th></th></tr></thead><tbody><tr><td><strong>Nominal frequency (Hz)</strong> — Fundamental frequency<br>60 (default) | positive scalar</td><td>Nominal frequency of the input signal, in Hz.</td></tr><tr><td><strong>Time constant T for derivative (s)</strong> — Filter time constant<br>0.1 (default) | scalar in the range [0.01,0.1]</td><td>The low-pass filter time constant, in seconds.</td></tr></tbody></table>

## Examples

[Performance of Frequency Measurement (Phasor)](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/example-models/control-and-measurements/performance-of-frequency-measurement-phasor.md)

The use of two Frequency (Phasor) blocks to measure the frequency variation in a network following a line outage.


---

# 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/frequency-phasor.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.
