Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Encoder Configuration Page

In the System Explorer window configuration tree, expand the Power Electronics Add-On custom device and select Circuit Model >> PMSM BLDC >> Encoder to display this page.  Use this page to configure the Encoder sensor model. 


Excerpt

This page includes the following components:

Encoder
NameSpecifies the name of the encoder.
DescriptionSpecifies a description for the encoder.
Configuration
Encoder Mode

Choose from one of the following modes.  The configuration parameters and section channels automatically populate depending on the selected Encoder Mode.

Anchor
QuadratureEncoder
QuadratureEncoder
Encoder Mode: Quadrature Encoder

When set to Quadrature Encoder mode, the sensor generates the A, B, and Z signals of a quadrature encoder module with a specific number of pulses per turn, according to an input angle or speed. Outputs A and B have a 90 degree phase difference that enables a decoder to retrieve the modulated signal angle and speed at any time.

Configuration Parameters

The following parameters are available:

Configuration

SymbolUnitsDefault ValueDescription
Number of Pole Pairspp
1

A gain applied to the mechanical angle of the machine, θm, before it is translated to an encoder signal.  Modify this parameter if the encoder is attached to a gear box rather than connected directly to the rotor.   In most applications, this is set to 1.

Angle OffsetθOffsetDegrees0Angle offset applied to the machine angle, θm
Number of Pulses/Revolutionppr
1000Number of pulses generated by the outputs A and B in a single revolution.
Rotation Type


A leads B

Select one of the following options:

  • A leads B - A is the first output pulse as the machine begins to rotate
  • B leads A - B is the first output pulse as the machine begins to rotate

If the machine appears to be turning backwards, consider switching this setting.

Polarity

Active High

Select one of the following options:

  • Active High - Output signals are pulled High to signify an encoder pulse
  • Active Low - Output signas are pulled Low to signify an encoder pulse


Section Channels

When set to Quadrature Encoder mode, this section includes the following custom device channels:

Channel Name

Symbol

Type

Default Value

Description

AAOutput0

Digital signal A generated by the encoder. When paired with B and Z, it can be used to determine the machine's position.

BBOutput0Digital signal B generated by the encoder. When paired with A and Z, it can be used to determine the machine's position.
ZZOutput0Digital signal Z generated by the encoder. One Z pulse occurs per full rotation at the 0° machine angle


Quadrature Encoder Description

A quadrature encoder is an angular position or motion sensor sometimes referred to as rotary encoder.  The quadrature encoder model generates three square-wave pulses (A, B, Z), which can then be interpreted into the angular position of the machine θm.  For an encoder with Active High polarity, a pulse is defined as a transition from low to high back to low.



Quadrature Encoder block typical behavior for a positive speed.pngImage RemovedImage Added


Figure 1. Quadrature encoder signals A, B, and Z, with A leading B at a standard 90 degree offset. The polarity of these signals is Active High.


Anchor
HallEffect
HallEffect
Encoder Mode: Hall Effect

When set to Hall Effect mode, the sensor generates the A, B, and C signals which correspond to the absolute angle position.  Typically A, B, and C are separated by 120° but other configurations are common.

Configuration Parameters

The following parameters are available:

Configuration

SymbolUnitsDefault ValueDescription
Number of Pole Pairspp
1A gain applied to the mechanical angle of the machine, θm, before it is translated to a Hall Effect signal.  Modify this parameter if the sensor is attached to a gear box rather than connected directly to the rotor.   In most applications, this is set to 1.
Speed Sign

Clockwise

Select one of the following options:

  • Clockwise - The sensor outputs a positive speed when the machine rotates clockwise.
  • Counter Clockwise - The sensor outputs a positive speed when the machine rotates counter clockwise.
Position AθADegrees0 DegreesSensor angle at which Channel A outputs a high signal pulse
Position BθB

Degrees

120 Degrees

Sensor angle at which Channel B outputs a high signal pulse

Position CθCDegrees-120 Degrees

Sensor angle at which Channel C outputs a high signal pulse

Section Channels

When set to Hall Effect mode, this section includes the following custom device channels:

Channel Name

Symbol

Type

Default Value

Description

AAOutput0Digital signal A generated by the Hall Effect sensor. When paired with B and C, it can be used to determine the machine's position.
BBOutput0Digital signal B generated by the Hall Effect sensor. When paired with A and C, it can be used to determine the machine's position.
CCOutput0Digital signal C generated by the Hall Effect sensor. When paired with A and B, it can be used to determine the machine's position.


Hall Effect Sensor Description

A Hall effect sensor is a device that is used to measure the magnitude of a magnetic field. Manufacturers of electrical machines will place magnetic materials on the machine at particular rotor angles to allow Hall Effect sensors to be able to detect when they are near the specific position on the machine.  Through simple signal processing the voltage induced by the magnetic materials can be transformed into digital signals that turn active (true) when the Hall Effect sensor reaches the angle of the machine.  The digital signals can then be used by a controller to calculate absolute position and/or speed.  This Hall Effect Sensor model supports three independent sensor positions.