> 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/pe-add-on-simulink/model-and-simulation/add-and-configure-a-circuit-model-to-the-system-definition/machine-section/6-phase-pmsm-bldc-section/resolver-6-phase-pmsm-bldc.md).

# Resolver (6-Phase PMSM BLDC)

## Resolver Configuration Page

In the System Explorer window configuration tree, expand the Power Electronics Add-On custom device and select Circuit Model >> 6-Ph PMSM BLDC >> Resolver to display this page.

### Resolver Model Description <a href="#resolver-model-description" id="resolver-model-description"></a>

A resolver is a sensor that provides feedback about the angular position and velocity of a rotating component, such as the rotor of an electrical motor.

<figure><img src="https://2999842053-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe9Kk9pJCHht2LLBSxPap%2Fuploads%2F7graETyPxtGY29AuVmV0%2Fimage.png?alt=media&amp;token=151866ae-f798-4c02-ac80-78e533b80ec9" alt="" width="361"><figcaption></figcaption></figure>

During operation, a sinusoidal excitation signal is provided to the resolver. The resolver modulates the input excitation signal to produce two outputs representing sin(x) and cos(x), where x is the angle of the rotor. From the sin(x) and cos(x) signals controllers are reconstituted to calculate angular position of the machine.

<figure><img src="https://2999842053-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe9Kk9pJCHht2LLBSxPap%2Fuploads%2FV81VHeFdnz8DtgbR5LrW%2F029e1ee3-804c-4ed2-b3a5-b738dce02212.jpg?alt=media&amp;token=e0940724-c911-404b-b10a-a99ab9eafce9" alt=""><figcaption><p>Sine and Cosine signals generated by a resolver with an input excitation sinusoidal signal.</p></figcaption></figure>

## Resolver Model Equations

The resolver model outputs are calculated using the following sets of equations:

$$
\text{Sine Output} =
(-1)^{R\_{dir}},
\Big\[
\text{Sin.Sin} \cdot \sin!\big(pp(\theta\_m - \theta\_{offset})\big)
\+
\text{Sin.Cos} \cdot \cos!\big(pp(\theta\_m - \theta\_{offset})\big)
\Big]
\cdot \text{Excitation}
\\\[8pt]

\text{Cosine Output} =
\Big\[
\text{Cos.Sin} \cdot \sin!\big(pp(\theta\_m - \theta\_{offset})\big)
\+
\text{Cos.Cos} \cdot \cos!\big(pp(\theta\_m - \theta\_{offset})\big)
\Big]
\cdot \text{Excitation}
\\\[8pt]
$$

Where **Sin.Sin**, **Sin.Cos**, **Cos.Sin**, and **Cos.Cos** represent gains that are applied to simulate a non-ideal resolver. To simulate an ideal resolver, set the **Sin.Sin** and **Cos.Cos** gains to 1, set the **Sin.Cos** and **Cos.Sin** gains to 0, set the **pp** to 1, and set the **θOffset** to 0. This results in the following equations:

$$
\text{Sine Output} = (-1)^{R\_{dir}} \cdot \sin(\theta\_m) \cdot \text{Excitation} \\\[8pt]

\text{Cosine Output} = \cos(\theta\_m) \cdot \text{Excitation} \\\[8pt]
$$

Depending on the selected [Hardware Configuration](https://www.opal-rt.com/docs/pe-add-on-simulink/hardware-configurations-reference/default-hardware-configurations.md), some resolvers allow for their excitation to come from an external source and/or some excitation signals can come from a simulated circuit. Typical excitation signals are sinusoidal and greater than 1 kHz frequency.

## Parameters

This page includes the following components:

### Resolver

<table><thead><tr><th width="199.77777099609375">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>Specifies the name of the resolver.</td></tr><tr><td><strong>Description</strong></td><td>Specifies a description for the resolver.</td></tr></tbody></table>

### Angle Conditioning

<table><thead><tr><th width="200.04437255859375">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Number of Pole Pairs</strong></td><td><p>A gain applied to the mechanical angle of the machine, θ<sub>m</sub>, before it is translated to an electrical resolver signal. Modify this parameter if the resolver is attached to a gear box rather than connected directly to the rotor. To generate resolver signals whose speed corresponds to the mechanical speed of the machine, set this value to 1.</p><p>See the <strong>Resolver Model Equations</strong> for more information,</p><p>PP (Default Value: 1).</p></td></tr><tr><td><strong>Angle Offset</strong></td><td><p>Offset from the mechanical angle of the machine, θm,</p><p>θ<sub>Offset</sub> (deg) (Default Value: 0°).</p></td></tr><tr><td><strong>Speed Sign</strong></td><td><p>Select one of the following options:</p><ul><li><strong>Clockwise</strong> - The resolver outputs a positive speed when the machine rotates clockwise.</li><li><strong>Counter Clockwise</strong> - The resolver outputs a positive speed when the machine rotates counter clockwise,</li></ul><p>R<sub>dir</sub> (Default Value: Clockwise).</p></td></tr></tbody></table>

### Gain Configuration

<table><thead><tr><th width="200.844482421875">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Sine.Sine Gain</strong></td><td>Sine gain applied to the <strong>Sine</strong> output signal. This value must be a number between 0 and 1. See the <strong>Resolver Model Equations</strong> for more information, (Default Value: 1).</td></tr><tr><td><strong>Sine.Cos Gain</strong></td><td>Cosine gain applied to the <strong>Sine</strong> output signal. This value must be a number between 0 and 1. See the <strong>Resolver Model Equations</strong> for more information, (Default Value: 0).</td></tr><tr><td><strong>Cos.Sin Gain</strong></td><td>Sine gain applied to the <strong>Cosine</strong> output signal. This value must be a number between 0 and 1. See the <strong>Resolver Model Equations</strong> for more information, (Default Value: 0).</td></tr><tr><td><strong>Cos.Cos Gain</strong></td><td>Cosine gain applied to the <strong>Cosine</strong> Output signals. This value must be a number between 0 and 1. See the <strong>Resolver Model Equations</strong> for more information, (Default Value: 1).</td></tr></tbody></table>

### Excitation Conditioning

<table><thead><tr><th width="201.3778076171875">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Carrier Sampling Time</strong></td><td>The period at which the Excitation Carrier signal is sampled to determine the <strong>Sine</strong> and <strong>Cosine</strong> outputs, T<sub>s</sub> (s) (Default Value: 1E-6).</td></tr><tr><td><strong>Carrier Phase Delay</strong></td><td>Creates a phase delay in the output <strong>Sine</strong> and <strong>Cosine</strong> signals. This is used to simulate a physical delay in non-ideal resolvers, T<sub>pd</sub> (s) (Default Value: 0).</td></tr><tr><td><strong>Carrier Measurement</strong></td><td>Selects the Analog Input channel to use as the carrier.</td></tr></tbody></table>

### Internal Carrier (Optional)

<table><thead><tr><th width="200.755615234375">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Initial Carrier Angle</strong></td><td><p>Angle of the resolver upon initialization,</p><p>θ<sub>init</sub> (deg) (Default Value: 0°).</p></td></tr><tr><td><strong>Excitation Frequency</strong></td><td>Sets the frequency of the internal excitation carrier, f<sub>ex</sub> (Hz) (Default Value: 10000).</td></tr><tr><td><strong>Enable Internal Carrier</strong></td><td>Enables the resolver model to use an internal excitation signal rather than an external signal from an Analog Input channel. (Default Value: False).</td></tr><tr><td><strong>Force Initial Angle</strong></td><td>Forces the <strong>Initial Carrier Angle</strong> parameter to be used during initialization. (Default Value: False).</td></tr><tr><td><strong>Enable Resolver Parameters as Channels</strong></td><td>Allows certain Resolver parameters to be exposed as tunable VeriStand Channels. See the Advanced Channels section below for more details. (Default Value: False).</td></tr></tbody></table>

## Resolver Channels

The following custom device channels are provided by the Resolver model.

<table><thead><tr><th width="200.93328857421875">Channel Name</th><th>Description</th></tr></thead><tbody><tr><td><strong>Sine (Output)</strong></td><td>Sine signal generated by the resolver. When combined with <strong>Cosine</strong>, can be used to determine the machine's position, Sin (Default Value: 0).</td></tr><tr><td><strong>Cosine (Output)</strong></td><td>Cosine signal generated by the resolver. When combined with <strong>Sine</strong>, can be used to determine the machine's position, Cos (Default Value: 0).</td></tr><tr><td><strong>Carrier (Output)</strong></td><td>The Excitation signal used to calculate <strong>Sine</strong> and <strong>Cosine</strong> outputs as defined in equations (1) and (2). (Default Value: 0).</td></tr><tr><td><strong>Angle (Output)</strong></td><td><p>The angle the resolver is "resolving," as defined by the equation <span class="math">\\[0pt] \theta_{\text{resolve}} = pp \, (\theta_m - \theta_{\text{offset}}) \\[0pt]</span>.</p><p>The <strong>Speed Sign</strong> parameter does not affect the output of this channel.</p><p>If this signal is routed to a <strong>Waveform Channel</strong> or an <strong>Analog Output Channel</strong>, its value is expressed in Turns. The signal ranges in value from 0 to 1, with 1 representing a full rotation, θ<sub>resolve</sub> (deg) (Default Value: 0).</p></td></tr></tbody></table>

### Advanced Resolver Channels

When "Enable Resolver Parameters as Channels" is enabled, the following VeriStand channels are exposed under the Advanced section. Input channel values can be modified dynamically at execution time.

<table><thead><tr><th width="200.04437255859375">Channel Name</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Angle Offset</strong></p><p><strong>(Input)</strong></p></td><td><p>When the <strong>Enable Resolver Parameters as Channels</strong> checkbox is checked, this value describes the offset from the mechanical angle of the machine, θ<sub>m</sub>.</p><p>This value can be modified while the simulation is running,</p><p>θ<sub>Offset</sub> (deg) (Default Value: Read from configuration page).</p></td></tr><tr><td><p><strong>Carrier Phase Delay</strong></p><p><strong>(Input)</strong></p></td><td><p>When the <strong>Enable Resolver Parameters as Channels</strong> checkbox is checked, this value creates a phase delay in the output <strong>Sine</strong> and <strong>Cosine</strong> signals. This is used to simulate a physical delay in non-ideal resolvers.</p><p>This value can be modified while the simulation is running, T<sub>pd</sub> (s) (Default Value: Read from configuration page).</p></td></tr><tr><td><p><strong>Cosine Cosine Gain</strong></p><p><strong>(Input)</strong></p></td><td><p>When the <strong>Enable Resolver Parameters as Channels</strong> checkbox is checked, this value applies a Cosine Gain to the <strong>Cosine</strong> Output signals. This value must be a number between 0 and 1.</p><p>See the <strong>Resolver Model Equations</strong> for more information.</p><p>This value can be modified while the simulation is running, Cos.Cos (Default Value: Read from configuration page).</p></td></tr><tr><td><p><strong>Cosine Sine Gain</strong></p><p><strong>(Input)</strong></p></td><td><p>When the <strong>Enable Resolver Parameters as Channels</strong> checkbox is checked, this value applies a Sine Gain to the <strong>Cosine</strong> Output signals. This value must be a number between 0 and 1.</p><p>See the <strong>Resolver Model Equations</strong> for more information, Cos.Sine (Default Value: Read from configuration page).</p></td></tr><tr><td><p><strong>Number of Pole Pairs</strong></p><p><strong>(Input)</strong></p></td><td><p>When the <strong>Enable Resolver Parameters as Channels</strong> checkbox is checked, this value applies a gain to the mechanical angle of the machine, θ<sub>m</sub>, before it is translated to an electrical resolver signal. Modify this parameter if the resolver is attached to a gear box rather than connected directly to the rotor. To generate resolver signals whose speed corresponds to the mechanical speed of the machine, set this value to 1.</p><p>See the <strong>Resolver Model Equations</strong> for more information.</p><p>This value can be modified while the simulation is running, pp (Default Value: Read from configuration page).</p></td></tr><tr><td><p><strong>Sine Cosine Gain</strong></p><p><strong>(Input)</strong></p></td><td><p>When the <strong>Enable Resolver Parameters as Channels</strong> checkbox is checked, this value applies a Cosine Gain to the <strong>Sine</strong> Output signals. This value must be a number between 0 and 1.</p><p>See the <strong>Resolver Model Equations</strong> for more information.</p><p>This value can be modified while the simulation is running, Sin.Cos (Default Value: Read from configuration page).</p></td></tr><tr><td><p><strong>Sine Sine Gain</strong></p><p><strong>(Input)</strong></p></td><td><p>When the <strong>Enable Resolver Parameters as Channels</strong> checkbox is checked, this value applies a Sine Gain to the <strong>Sine</strong> Output signals. This value must be a number between 0 and 1.</p><p>See the <strong>Resolver Model Equations</strong> for more information.</p><p>This value can be modified while the simulation is running, Sin.Sin (Default Value: Read from configuration page).</p></td></tr><tr><td><p><strong>Speed Sign</strong></p><p><strong>(Input)</strong></p></td><td><p>When the <strong>Enable Resolver Parameters as Channels</strong> checkbox is checked, this value determines the speed sign based on the rotation of the resolver as follows:</p><ul><li><strong>0</strong> - The resolver outputs a positive speed when the machine rotates <strong>Clockwise</strong>.</li><li><strong>1</strong> - The resolver outputs a positive speed when the machine rotates <strong>Counter Clockwise</strong>.</li></ul><p>This value can be modified while the simulation is running, R<sub>dir</sub> (Default Value: Read from configuration page).</p></td></tr></tbody></table>


---

# 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/pe-add-on-simulink/model-and-simulation/add-and-configure-a-circuit-model-to-the-system-definition/machine-section/6-phase-pmsm-bldc-section/resolver-6-phase-pmsm-bldc.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.
