Main Content

Position Generator

Generate position ramp of fixed frequency

Since R2020a

Libraries:
Motor Control Blockset / Controls / Control Reference
Motor Control Blockset HDL Support / Controls / Control Reference

Description

The Position Generator block generates a position ramp signal (with a frequency that is identical to that of the reference voltage signal) using the position increment value of the reference signal.

We recommend that you use fixed-step discrete solver for this block to enable code generation and ensure accurate simulation.

Examples

Ports

Input

expand all

Position increment value of a fixed frequency reference voltage signal (in either per unit, radians, or degrees). These equations describe how you can compute the position increment value:

  • Δθ (per unit) = Frequency × Sample Time

  • Δθ (radians) = 2π × Frequency × Sample Time

  • Δθ (degrees) = 360 × Frequency × Sample Time

Note

If the preceding Δθ computation causes a precision loss in the block input, the block might not replicate the actual Frequency accurately.

Data Types: single | double | fixed point

External pulse that resets the position ramp output based on the value of the External reset parameter.

Dependencies

To enable this port, set External reset to either active high resets to zero or active high resets to initial condition.

Data Types: single | double | fixed point

Output

expand all

Position or phase value of the reference voltage signal (in either per unit, radians, or degrees).

Data Types: single | double | fixed point

Parameters

expand all

Unit of the input position increment value and the output reference voltage position.

Output position ramp value (in either per unit, radians, or degrees) at initial time (0 seconds).

Output position ramp value (in either per unit, radians, or degrees) at the time when the block receives an active high external reset pulse. You can reset the output to either zero or to equal the value of the Initial theta output parameter.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Fixed-Point Conversion
Design and simulate fixed-point systems using Fixed-Point Designer™.

Version History

Introduced in R2020a