> 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/alpha-beta-zero-to-dq0-dq0-to-alpha-beta-zero.md).

# Alpha Beta Zero to dq0, dq0 to Alpha Beta Zero

## Description

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

The **Alpha Beta Zero to dq0, dq0 to Alpha Beta Zero** block, located in the **OPAL-RT SPS Software/Control** library, performs a transformation of αβ0 Clarke components in a fixed reference frame to dq0 Park components in a rotating reference frame.

The dq0 to Alpha-Beta-Zero block performs a transformation of dq0 Park components in a rotating reference frame to αβ0 Clarke components in a fixed reference frame.

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

The block supports the two conventions used in the literature for Park transformation:

* Rotating frame aligned with A axis at t = 0. This type of Park transformation is also known as the cosine-based Park transformation.
* Rotating frame aligned 90 degrees behind A axis. This type of Park transformation is also known as the sine-based Park transformation. Use it in SPS models of three-phase synchronous and asynchronous machines.

Knowing that the position of the rotating frame is given by ω.t (where ω represents the frame rotation speed), the αβ0 to dq0 transformation performs a −(ω.t) rotation on the space vector U<sub>s</sub> = u<sub>α</sub> + j· u<sub>β</sub>. The homopolar or zero-sequence component remains unchanged.

Depending on the frame alignment at t = 0, the dq0 components are deduced from αβ0 components as follows.

When the rotating frame is aligned with A axis, the following relations are obtained:

$$
U\_{s} = u\_{d} + j \cdot u\_{q} = (u\_{\alpha} + j \cdot u\_{\beta}) \cdot e^{-j \omega t}
\\\[8pt]

\begin{bmatrix}
u\_{d} \\
u\_{q} \\
u\_{0}
\end{bmatrix}
=============

\begin{bmatrix}
\cos(\omega t) & \sin(\omega t) & 0 \\
-\sin(\omega t) & \cos(\omega t) & 0 \\
0 & 0 & 1
\end{bmatrix}
\begin{bmatrix}
u\_{\alpha} \\
u\_{\beta} \\
u\_{0}
\end{bmatrix}
\\\[8pt]
$$

The inverse transformation is given by

$$
u\_{\alpha} + j \cdot u\_{\beta}
================================

(u\_{d} + j \cdot u\_{q}) \cdot e^{j \omega t}
\\\[8pt]

\begin{bmatrix}
u\_{\alpha} \\
u\_{\beta} \\
u\_{0}
\end{bmatrix}
=============

\begin{bmatrix}
\cos(\omega t) & -\sin(\omega t) & 0 \\
\sin(\omega t) & \cos(\omega t) & 0 \\
0 & 0 & 1
\end{bmatrix}
\begin{bmatrix}
u\_{d} \\
u\_{q} \\
u\_{0}
\end{bmatrix}
\\\[8pt]
$$

When the rotating frame is aligned 90 degrees behind A axis, the following relations are obtained:

$$
U\_{s}
======

# u\_{d} + j \cdot u\_{q}

(u\_{\alpha} + j \cdot u\_{\beta})
\cdot e^{-j \left(\omega t - \frac{\pi}{2}\right)}
\\\[8pt]

\begin{bmatrix}
u\_{d} \\
u\_{q} \\
u\_{0}
\end{bmatrix}
=============

\frac{2}{3}
\begin{bmatrix}
\sin(\omega t) &
\sin!\left(\omega t - \frac{2\pi}{3}\right) &
\sin!\left(\omega t + \frac{2\pi}{3}\right)
\\
\cos(\omega t) &
\cos!\left(\omega t - \frac{2\pi}{3}\right) &
\cos!\left(\omega t + \frac{2\pi}{3}\right)
\\
\frac{1}{2} & \frac{1}{2} & \frac{1}{2}
\end{bmatrix}
\begin{bmatrix}
u\_{a} \\
u\_{b} \\
u\_{c}
\end{bmatrix}
\\\[8pt]
$$

The inverse transformation is given by

$$
u\_{\alpha} + j \cdot u\_{\beta}
================================

(u\_{d} + j \cdot u\_{q})
\cdot e^{j \left(\omega t - \frac{\pi}{2}\right)}
\\\[8pt]
$$

The abc-to-Alpha-Beta-Zero transformation applied to a set of balanced three-phase sinusoidal quantities u<sub>a</sub>, u<sub>b</sub>, u<sub>c</sub> produces a space vector U<sub>s</sub> whose u<sub>α</sub> and u<sub>β</sub> coordinates in a fixed reference frame vary sinusoidally with time.

In contrast, the abc-to-dq0 transformation (Park transformation) applied to a set of balanced three-phase sinusoidal quantities u<sub>a</sub>, u<sub>b</sub>, u<sub>c</sub> produces a space vector U<sub>s</sub> whose u<sub>d</sub> and u<sub>q</sub> coordinates in a dq rotating reference frame stay constant.

## Ports

### Input

<table data-header-hidden><thead><tr><th width="249.5555419921875"></th><th></th></tr></thead><tbody><tr><td><strong>αβ0</strong> — Vectorized αβ0 signal<br>Vector</td><td>Vectorized αβ0 signal.</td></tr><tr><td><strong>dq0</strong> — Vectorized dq0 signal<br>Vector</td><td>Vectorized dq0 signal.</td></tr></tbody></table>

#### Output

<table data-header-hidden><thead><tr><th width="249.5555419921875"></th><th></th></tr></thead><tbody><tr><td><strong>wt</strong> — Angular position of dq rotating frame<br>Scalar</td><td>The angular position, in radians, of the dq rotating frame relative to the stationary frame.</td></tr></tbody></table>

## Parameters

<table data-header-hidden><thead><tr><th width="250.4444580078125"></th><th></th></tr></thead><tbody><tr><td><strong>Rotating frame alignment (at wt=0)</strong> — Alignment of rotating frame<br>90 degrees behind phase A axis (default) | Aligned with phase A axis</td><td><p>Alignment of the rotating frame, when wt = 0, of the dq0 components of a three-phase balanced signal:<br><span class="math">\\[8pt] [u_{a} = \sin(\omega t) \\[8pt] u_{b} = \sin\!\left(\omega t - \frac{2\pi}{3}\right) \\[8pt] u_{c} = \sin\!\left(\omega t + \frac{2\pi}{3}\right) \\[8pt]</span></p><p>(positive-sequence magnitude = 1.0 pu; phase angle = 0 degree) When you select Aligned with phase A axis, the dq0 components are d = 0, q = −1, and zero = 0.</p><p>When you select 90 degrees behind phase A axis, the default option, the dq0 components are d = 1, q = 0, and zero = 0.</p></td></tr></tbody></table>

## Example

The power\_Transformations example shows various uses of blocks performing Clarke and Park transformations.


---

# 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/alpha-beta-zero-to-dq0-dq0-to-alpha-beta-zero.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.
