Main Content

Control Algorithm Design

Create controller algorithm for motor control system

Create the torque-control and speed-control subsystems, verify the target execution time, and tune the control gains.

Blocks

expand all

Control Reference

ACIM Control ReferenceCompute reference currents for field oriented control of induction motor
ACIM Feed Forward ControlDecouple d-axis and q-axis current to eliminate disturbance
ACIM Slip Speed EstimatorCalculate slip speed of AC induction motor
ACIM Torque EstimatorEstimate electromechanical torque and power
DQ LimiterSaturate voltages (or current) in the dq reference frame
MTPA Control ReferenceCompute reference currents for Maximum Torque Per Ampere (MTPA) and field-weakening operation
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
Six Step CommutationGenerate switching sequence for six-step commutation of brushless DC (BLDC) motor
Vector Control ReferenceCompute d and q axis components of 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
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 communication ports used by 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
Vector plotPlot vectors in space domain

Topics

Design Field-Oriented Control Algorithm

Design and integrate the torque-control and speed-control subsystems.

Estimate Control Gains from Motor Parameters

Perform control parameter tuning for speed and torque control subsystems.

Code Verification and Profiling Using Processor-In-the-Loop Testing

Verify the torque-control and speed-control subsystems.