Motor Control Block Libraries

Learn about control, sensor less, and sensor decoder blocks

Use the library blocks in your algorithm for the motor control system.

Blocks

expand all

Control Reference

DQ LimiterSaturate voltages (or current) in the dq reference frame
PMSM Feed Forward ControlDecouple d-axis and q-axis current to eliminate disturbance
PMSM Torque EstimatorEstimate electromechanical torque and power
Position GeneratorGenerate position ramp of fixed frequency
MTPA Control ReferenceCompute reference currents for Maximum Torque Per Ampere (MTPA) and field-weakening operation
Vector Control ReferenceCompute d and q axis components of a reference vector

Controllers

Derating FunctionCompute derating factor
Discrete PI ControllerImplement discrete PI controller
Discrete PI Controller with anti-windup and resetImplement discrete PI controller with anti-windup and reset functionality
Field Oriented Control AutotunerAutomatically and sequentially tune multiple PID control loops in field-oriented control application

Math Transforms

3-Phase Sine Voltage GeneratorGenerate balanced three-phase sinusoidal signals
atan2Compute four-quadrant arctangent
Clarke TransformImplement ab to αβ transformation
Inverse Clarke TransformImplement αβ to abc transformation
Inverse Park TransformImplement dq to αβ transformation
Park TransformImplement αβ to dq transformation
Sine-Cosine LookupImplement sine and cosine functions using lookup table approach
Space Vector GeneratorGenerate space vector modulation signals

Inverters

Average Value InverterCompute three-phase AC voltage from inverter DC voltage

Motors

Interior PMSM Three-phase interior permanent magnet synchronous motor with sinusoidal back electromotive force
Surface Mount PMSMThree-phase exterior permanent magnet synchronous motor with sinusoidal back electromotive force
Protection RelayImplement protection relay with definite minimum time (DMT) trip characteristics
Host Serial ReceiveConfigure host-side serial communications interface to receive data from serial port
Host Serial SetupConfigure COM ports for the host-side Host Serial Receive and Host Serial Transmit blocks
Host Serial TransmitConfigure host-side serial communications interface to transmit data to serial port
Hall Speed and PositionCompute speed and estimate position of rotor by using Hall sensors
Hall ValidityCompute rotor spin direction and validity of Hall sensor sequence
Mechanical to Electrical PositionCompute electrical position of rotor from mechanical position
Quadrature decoderCompute position of quadrature encoder
Resolver DecoderCompute electrical angular position of resolver
Software Watchdog TimerOutput true until counter reaches maximum count limit
Speed MeasurementCompute speed from rotor angular position
Sliding Mode ObserverCompute electrical position and mechanical speed of rotor
Flux ObserverCompute electrical position, magnetic flux, and electrical torque of rotor
IIR FilterImplement infinite impulse response (IIR) filter