Main Content

Mechanical to Electrical Position

从机械计算电机转子的位置al position

  • Library:
  • Motor Control Blockset / Sensor Decoders

Description

TheMechanical to Electrical Positionblock computes the electrical position of rotor by using its mechanical position and mechanical offset value.

Ports

Input

expand all

The mechanical position of rotor (as output by the rotor position sensor) in either radians (0 to 2 π ), degrees (0 to 360), or per unit (0 to 1).

Data Types:single|double|fixed point

The deviation of the rotor's electrical zero from the mechanical zero position. Unit of offset is identical to the unit of the mechanical position input.

Dependencies

  • To enable this port, setSpecify offset viatoInput port.

  • Inputs must be of the same data type.

Data Types:single|double|fixed point

Output

expand all

The electrical position of the rotor with a range that is identical to that of the mechanical position input. Data type of the electrical position is identical to that of the input.

Data Types:single|double|fixed point

Parameters

expand all

Number of pole pairs available in the motor.

Unit of the mechanical position of the rotor.

The method you want to use to specify the mechanical position offset. SelectInput portto enable and use the input portOffset. SelectSpecify via dialogto provide the offset value using the dialog box.

The unit of the offset is identical to that of the unit of the mechanical position input.

Dependencies

To enable this parameter, setSpecify offset viatoSpecify via dialog.

The data type that you want to use for the input ports.

Note

The block runs faster, if you select eitherfixdt(1,16,0)orfixdt(1,16,2^0,0)input data type and provide fixed point values to the input ports.

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