Skip to content

Encoder (fast) block

Juliano Laganá edited this page Jan 26, 2015 · 1 revision

Encoder (fast) block

Description

Similarly to the Encoder block, this block simulates the output of a parameterized quadrature encoder based on the true angular position of a system. However, instead of mimicking the behavior of a real encoder, this block mathematically calculates what the output would be. For this reason, this block is not reliable to supply position information to the encoder-based velocity estimation blocks. (M, T and M/T blocks)

Parameters and ports

Parameters

Nr: 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

Compares the true angular position and the encoder's measured position of a system that goes from rest to 72 degrees with constant velocity. To notice the difference in the time required to simulate this model, compare this to the Encoder block example 1.

Note: Only at the simulation steps does the output of this example behaves exactly like the one in the normal encoder.

Additional information

As stated in the description, this block should not be used to supply position information to the encoder-based velocity estimation blocks.