> 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/transformations/abc_to_dq0-transformation.md).

# abc\_to\_dq0 Transformation

## Description

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

The **abc\_to\_dq0 Transformation** block, located in the **OPAL-RT SPS Software/Transformations** library, performs Park transformation from three-phase (abc) reference frame to dq0 reference frame

{% hint style="info" %}
The new block features a mechanism that eliminates duplicate continuous and discrete versions of the same block by basing the block configuration on the simulation mode.\
If your legacy models contain the abc\_to\_dq0 Transformation block, they continue to work. However, for best performance, use the abc to dq0 block in your new models.
{% endhint %}

The abc\_to\_dq0 Transformation block computes the direct axis, quadratic axis, and zero sequence quantities in a two-axis rotating reference frame for a three-phase sinusoidal signal.

The following transformation is used:

$$
V\_{d}
======

\frac{2}{3}
\left(
V\_{a}\sin(\omega t)
\+
V\_{b}\sin!\left(\omega t - \frac{2\pi}{3}\right)
\+
V\_{c}\sin!\left(\omega t + \frac{2\pi}{3}\right)
\right)
\\\[8pt]

# V\_{q}

\frac{2}{3}
\left(
V\_{a}\cos(\omega t)
\+
V\_{b}\cos!\left(\omega t - \frac{2\pi}{3}\right)
\+
V\_{c}\cos!\left(\omega t + \frac{2\pi}{3}\right)
\right)
\\\[8pt]

# V\_{0}

\frac{1}{3}(V\_{a} + V\_{b} + V\_{c})
\\\[8pt]
$$

where ω = rotation speed (rad/s) of the rotating frame.

The transformation is the same for the case of a three-phase current; you simply replace the *V*<sub>*a*</sub>, *V*<sub>*b*</sub>, *V*<sub>*c*</sub>, *V*<sub>*d*</sub>, *V*<sub>*q*</sub>, and *V*<sub>0</sub> variables with the I<sub>a</sub>, I<sub>b</sub>, I<sub>c</sub>, I<sub>d</sub>, I<sub>q</sub>, and I<sub>0</sub> variables.

This transformation is commonly used in three-phase electric machine models, where it is known as a Park transformation \[[1](https://www.mathworks.com/help/sps/powersys/ref/abc_to_dq0transformation.html#bsews9k-1)]. It allows you to eliminate time-varying inductances by referring the stator and rotor quantities to a fixed or rotating reference frame. In the case of a synchronous machine, the stator quantities are referred to the rotor. I<sub>d</sub> and I<sub>q</sub> represent the two DC currents flowing in the two equivalent rotor windings (d winding directly on the same axis as the field winding, and q winding on the quadratic axis), producing the same flux as the stator I<sub>a</sub>, I<sub>b</sub>, and I<sub>c</sub> currents.

You can use this block in a control system to measure the positive-sequence component *V*<sub>1</sub> of a set of three-phase voltages or currents. The *V*<sub>*d*</sub> and *V*<sub>*q*</sub> (or I<sub>d</sub> and I<sub>q</sub>) then represent the rectangular coordinates of the positive-sequence component.

You can use the Math Function block and the Trigonometric Function block to obtain the modulus and angle of *V*<sub>1</sub>:

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

\sqrt{V\_{q}^{2} + V\_{d}^{2}}
\\\[8pt]

# \angle V\_{1}

\arctan2(V\_{q} / V\_{d})
\\\[8pt]
$$

This measurement system does not introduce any delay, but, unlike the Fourier analysis done in the Sequence Analyzer block, it is sensitive to harmonics and imbalances.

## Inputs and Outputs

<table data-header-hidden><thead><tr><th width="250.22222900390625"></th><th></th></tr></thead><tbody><tr><td><strong>abc</strong></td><td>Connect to the first input the vectorized sinusoidal phase signal to be converted [phase A phase B phase C].</td></tr><tr><td><strong>sin_cos</strong></td><td>Connect to the second input a vectorized signal containing the [sin(ωt) cos(ωt)] values, where ω is the rotation speed of the reference frame.</td></tr><tr><td><strong>dq0</strong></td><td>The output is a vectorized signal containing the three sequence components [d q o], in the same units as the abc input signal.</td></tr></tbody></table>

## References <a href="#references" id="references"></a>

\[1] Krause, P. C. *Analysis of Electric Machinery*. New York: McGraw-Hill, 1994, p.135.


---

# 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/transformations/abc_to_dq0-transformation.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.
