This section goes over a collection of control algorithms and techniques used in motors such as PMSM and BLDC. The library source code can be found in motor_control_sdk/source/control.
Supported algorithms:
Field weakening control (FWC) is a control methodology used in iPMSM motors to expand operating limits and enable higher than rated speed while allowing optimal control across speed and voltage range.
Maximum Torque Per Ampere (MTPA) technique is used for iPMSM to optimize torque generation in the constant torque region. As iPMSM motor's total torque has a non-linear relationship with respect to the rotor angle.
Stator Voltage Frequency Generator (VS_FREQ) can be used in scalar volts/hertz motor control scheme. It generates an output command voltage based on the specified volts/hertz profile and the inputted command frequency.
A benchmark on R5F core has been conducted to observe the following results when running controller arithmetic:
Functions | Cpu Cycles |
---|---|
Single-shunt DC-Link | |
DCLINK_SS_runCurrentReconstruction | 14 |
DCLINK_SS_runFastCurrentReconstruction | 5 |
DCLINK_SS_runPWMCompensation | 201 |
DCLINK_SS_runFastPWMCompensation | 107 |
Field weakening control | |
FWC_computeCurrentAngle | 35 |
Maximum torque per ampere | |
MTPA_computeCurrentReference | 101 |
MTPA_computeCurrentAngle | 85 |
Strator voltage frequency generator | |
VS_FREQ_run | 29 |
N/A