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.

Note

The blocks listed here are compliant with the MISRA C®guidelines.

Blocks

expand all

Control Reference

ACIM Control Reference Compute reference currents for field-oriented control of induction motor
ACIM Feed Forward Control Decoupled-axis andq-axis current to eliminate disturbance
ACIM Slip Speed Estimator Calculate slip speed of AC induction motor
ACIM Torque Estimator Estimate electromechanical torque and power
DQ Limiter Saturate voltages (or current) in thedqreference frame
MTPA Control Reference Compute reference currents for Maximum Torque Per Ampere (MTPA) and field-weakening operation
PMSM Feed Forward Control Decoupled-axis andq-axis current to eliminate disturbance
PMSM Torque Estimator Estimate electromechanical torque and power
Position Generator Generate position ramp of fixed frequency
Six Step Commutation Generate switching sequence for six-step commutation of brushless DC (BLDC) motor
Vector Control Reference Computedandqaxis components of reference vector

Controllers

Derating Function Compute derating factor
PI Controller Discrete-time PID Controller
Field Oriented Control Autotuner Automatically and sequentially tune multiple PID control loops in field-oriented control application

Math Transforms

3-Phase Sine Voltage Generator Generate balanced three-phase sinusoidal signals
atan2 计算四象限反正切
Clarke Transform Implementabtoαβtransformation
Inverse Clarke Transform Implementαβtoabctransformation
Inverse Park Transform Implementdqtoαβtransformation
Park Transform Implementαβtodqtransformation
Sine-Cosine Lookup Implement sine and cosine functions using lookup table approach
PWM Reference Generator Generate modulated signals from phase voltages
Protection Relay Implement protection relay with definite minimum time (DMT) trip characteristics
Host Serial Receive Receive binary data over serial port
Host Serial Setup Configure parameters for serial port
Host Serial Transmit Send binary data over serial port
Hall Speed and Position Compute speed and estimate position of rotor by using Hall sensors
Hall Validity Compute rotor spin direction and validity of Hall sensor sequence
Mechanical to Electrical Position Compute electrical position of rotor from mechanical position
Quadrature Decoder Compute position of quadrature encoder
Resolver Decoder Compute electrical angular position of resolver
Software Watchdog Timer Output true until counter reaches maximum count limit
Speed Measurement Compute speed from rotor angular position
Sliding Mode Observer Compute electrical position and mechanical speed of a surface-mount PMSM
Flux Observer Compute electrical position, magnetic flux, and electrical torque of rotor
IIR Filter Implement infinite impulse response (IIR) filter
Vector plot Plot vectors in space domain

Topics