RES - Resolver

The resolver interface block decodes the feedback from a resolver and provides the position of the rotor for drive applications.

The B-Box RCP supports up to two resolvers through the Motor Interface for B-Box RCP. Usually, a resolver-to-digital converter IC handles this type of sensor by generating the excitation signal (EXC) and extracting the position of the rotor from the quadrature signals (SIN and COS). The resolver module configures the dedicated IC inside the Motor Interface, including the excitation frequency and resolution, and retrieves the decoded position angle. The latter is latched similarly and simultaneously to the sample-&-hold feature of the ADC inputs. Additionally, the Motor Interface also provides the estimated rotation speed.

Signal specification

  • The output signal is the mechanical angle in the range [0; 2π].
  • The sim input signal is used in simulation and represents the actual angle value in radian, computed by the simulation plant model.
  • The > input signal needs to be connected to the sampling clock generated by the CONFIG block to account for the exact sampling instant in simulation.
Screenshot of the resolver block for Simulink.

Parameters

  • Device ID selects which B-Box/B-Board to address when used in a multi-device configuration.
  • Motor Interface input selects which connector of the Motor Interface is used as an input.
  • Number of pole pairs defines the number of pole pairs of the resolver.
  • Direction defines if an increasing angle corresponds to a clockwise or counterclockwise rotation.
  • Excitation frequency defines the excitation frequency, in kHz. The excitation frequency admissible range depends on the resolution (cf. Excitation frequency admissible range section) and is set by increments of 250 Hz.
  • Resolution defines the resolution of the acquired position (10, 12, 14 or 16 bits).

PLECS block

Signal specification

  • The output signal is the mechanical angle in the range [0; 2π].
  • The sim input signal is used in simulation and represents the actual angle value in radian, computed by the simulation plant model.
  • The > input signal needs to be connected to the sampling clock generated by the CONFIG block to account for the exact sampling instant in simulation.
Screenshot of the resolver block for PLECS.

Parameters

  • Device ID selects which B-Box/B-Board to address when used in a multi-device configuration.
  • Motor Interface input selects which connector of the Motor Interface is used as an input.
  • Number of pole pairs defines the number of pole pairs of the resolver.
  • Direction defines if an increasing angle corresponds to a clockwise or counterclockwise rotation.
  • Excitation frequency defines the excitation frequency, in kHz. The excitation frequency admissible range depends on the resolution (cf. Excitation frequency admissible range section) and is set by increments of 250 Hz.
  • Resolution defines the resolution of the acquired position (10, 12, 14 or 16 bits).

C++ functions

void MotInt_EnableMotorInterface(unsigned int device=0);Code language: C++ (cpp)

Enables the drivers of the Motor Interface.

It has to be called in UserInit().

Parameters

  • device: the id of the addressed device (optional, used in multi-device configuration only).
void Res_SetNumberOfPolePairs(tMotIntMachine machine, unsigned int polePairs, unsigned int device=0);Code language: C++ (cpp)

Defines the number of pole pairs of the resolver.

It has to be called in UserInit().

Parameters

  • machine: the machine to configure (MACHINE_A or MACHINE_B).
  • polePairs: the number of pair of poles of the resolver.
  • device: the id of the addressed device (optional, used in multi-device configuration only).
void Res_ConfigureDirection(tMotIntMachine machine, tMotIntDirection direction, unsigned int device=0);Code language: C++ (cpp)

Configures what rotation direction leads to an increasing angle (positive direction).

It has to be called in UserInit().

Parameters

  • machine: the machine to configure (MACHINE_A or MACHINE_B).
  • direction: the positive direction, clockwise (CW) or counter-clockwise (CCW).
  • device: the id of the addressed device (optional, used in multi-device configuration only).
void Res_ConfigureExcitationFrequency(float frequency, unsigned int device);Code language: C++ (cpp)

Configures the excitation frequency of the resolvers, in kHz. The excitation frequency is set by increments of 250 Hz. Both resolvers (machine A and B) of a motor interface share the same excitation frequency.

It has to be called in UserInit().

Parameters

  • frequency: the excitation frequency to configure, in kHz and by increments of 250 Hz.
  • device: the id of the addressed device (optional, used in multi-device configuration only).
void Res_ConfigureResolution(tResResolution resolution, unsigned int device);Code language: C++ (cpp)

Configures the resolution of the acquired position, as 10, 12, 14 or 16 bits. Both resolvers (machine A and B) of a motor interface share the same resolution.

It has to be called in UserInit().

Parameters

  • resolution: the resolution to configure (RES10BIT, RES12BIT, RES14BIT or RES16BIT).
  • device: the id of the addressed device (optional, used in multi-device configuration only).
float Res_GetPosition(tMotIntMachine machine, unsigned int device=0);Code language: C++ (cpp)

Returns the mechanical angle (position) of the resolver.

It has to be called during the control interrupt.

Parameters

  • machine: the machine to configure (MACHINE_A or MACHINE_B).
  • device: the id of the addressed device (optional, used in multi-device configuration only).

Excitation frequency admissible range

The admissible range of the excitation frequency depends on the resolution.

The excitation frequency must be within:

  • [10; 20] kHz when the resolution is set to 10 bits;
  • [6; 20] kHz when the resolution is set to 12 bits;
  • [3; 12] kHz when the resolution is set to 14 bits;
  • [2; 10] kHz when the resolution is set to 16 bits.