Skip to content
Juliano Laganá edited this page Jan 26, 2015 · 2 revisions

Encoder block

Description

Simulates the output of a parameterized quadrature encoder based on the true angular position of a system.

Parameters and ports

Parameters

Número de pulsos por revolução: Determines the number of pulses per rotation (ppr) this encoder will have, e.g., setting this at 30 means that for each complete revolution (each 360 degrees) of the measured system the output signal will have 30 pulses.

Inputs

Theta: The angular position (in degrees) of what is being measured, e.g., if this block is to simulate the behavior of an encoder measuring the angular position of a motor, then this signal is the motor's true angular position.

Outputs

Theta_amostrado: The angular position (in degrees) that an encoder would output if it was coupled to the system in question.

Examples

###Example 1 Compares the true angular position and the encoder's measured position of a system that goes from rest to 72 degrees with constant velocity.

###Example 2 Compares the true angular position and the encoder's measured position of a BLDC with block commutation. Since the output angular position of the BLDC block is in radians, a conversion is needed.

Additional information

It is mandatory that the step size of the simulation is smaller than 360/(4.Nr.Vmax), where Nr is the Número de pulsos por revolucao parameter and Vmax is the maximum value of the angular speed (the time derivative of the Theta input) during the simulation.