Main Content

Compute electrical angular position of resolver

**Library:**Motor Control Blockset / Sensor Decoders

The Resolver Decoder block calculates the electrical angular position of the resolver from the resolver sine and cosine output signals.

The resolver uses a primary sinusoidal excitation input signal to generate the modulated secondary sine and cosine waveforms.

You must normalize these waveforms (within the range of [-1,1] and centered at 0) and sample them to obtain the secondary sine and cosine input signals of the Resolver Decoder block.

The block computes and outputs the resolver position in [0, 2π] radians. The block can also add a phase delay to the sampled sine and cosine signals with respect to the excitation signal.

**Note**

The block inputs should have identical amplitude and data types (either signed fixed or floating point).

The block computes the average, peak amplitude values, and the sign of the peak amplitude of a signal cycle as

${\u212b}_{average}=\frac{1}{n}{\displaystyle \sum}_{i=0}^{n-1}(\left|{\u212b}_{i}\right|)$

${\u212b}_{peak}={\u212b}_{average}\times \frac{\pi}{2}$

$SignofPeak=Signof\text{}\left[{\displaystyle \sum}_{i=phasedelay}^{\frac{n}{2}-1+phasedelay}{\u212b}_{i}\right]$

where:

${\u212b}_{average}$ is the average amplitude value of a signal cycle

$$n$$ is the number of samples per excitation cycle

${\u212b}_{peak}$ is the peak amplitude value of a signal cycle

The block computes the electrical angular position of the resolver as

$\theta =\text{atan}2\frac{{u}_{\text{sin}\_peak}\text{}}{{u}_{\text{cos}\_peak}\text{}}$

where:

${u}_{\text{sin}\_peak}$ is the ${\u212b}_{peak}$ of the secondary sine signal

${u}_{\text{cos}\_peak}$ is the ${\u212b}_{peak}$ of the secondary cosine signal

$\theta $ is the electrical angular position of the resolver