> 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/power-dq0-instantaneous.md).

# Power (dq0, Instantaneous)

## Description

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

The **Power (dq0, Instantaneous)** block, located in the **OPAL-RT SPS Software/Sensors and Measurements** library, computes the three-phase instantaneous active and reactive powers from a periodic set of three-phase voltages and currents expressed in the dq0 reference frame.

These formulas perform the calculations:

$$
P
=

\frac{3}{2}
\left(
V\_{d}, I\_{d}
\+
V\_{q}, I\_{q}
\+
2, V\_{0}, I\_{0}
\right)
\\\[8pt]

# Q

\frac{3}{2}
\left(
V\_{q}, I\_{d}
--------------

V\_{d}, I\_{q}
\right)
\\\[8pt]
$$

The inputs Vdq0 and Idq0 (direct axis, quadrature axis, and zero-sequence components) of the three-phase voltage and current are normally connected to the outputs of the abc-to-dqo Transformation block.

With these formulas, a current flowing into an RL circuit produces a positive P and a positive Q.

The computed instantaneous reactive power is accurate only for balanced and harmonic-free three-phase voltages and currents.

## Ports

### Input

| **Vdq0** — Voltage signal expressed in dq0 reference frame | Voltage signal expressed in the dq0 reference frame. |
| ---------------------------------------------------------- | ---------------------------------------------------- |
| **Idq0** — Current signal expressed in dq0 reference frame | Current signal expressed in the dq0 reference frame. |

### Output

| **P** — Three-phase instantaneous active power   | Three-phase instantaneous active power P, in watts.  |
| ------------------------------------------------ | ---------------------------------------------------- |
| **Q** — Three-phase instantaneous reactive power | Three-phase instantaneous reactive power Q, in vars. |

## Example

The power\_ThreePhasePower model compares the outputs of the block with the Power (Positive-Sequence) block and the Power (3ph, Instantaneous) block. It shows that the Power (dq0, Instantaneous) block gives accurate results when the voltages and currents are balanced and harmonic free. When the voltage supply becomes unbalanced, the P output exhibits a ripple, and an error appears on the Q output.

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 and change the **Simulation type** parameter of the Powergui block to Continuous 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/power-dq0-instantaneous.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.
