This section covers the provided encoder/observer algorithms used in both sensored/sensorless field oriented control (FOC). The library source code can be found in motor_control_sdk/source/observer.
Sensored:
Sensorless:
Speed measurement:
The encoder (ENC) algorithm leverages the Enhanced Quadrature Encoder Pulse (eQEP) feature on the device for a sensored-based FOC. It calculates rotor angle based on eQEP encoder.
Enhanced Sliding Mode Observer (eSMO) estimates rotor angle to achieve a sensorless FOC.
The Hall algorithm uses an external Hall effect sensor to calculate speed and rotor angle for a sensored FOC design.
Speed measurement is a supplemental algorithm that measures speed based on the rotor angle. It consists of two different implementations: speedfr (SPDFR) calculates speed from an eQEP encoder signal whereas speedcalc (SPDCALC) estimates frequency of the eSMO observer.
A benchmark on Arm® Cortex®-R5F core has been conducted to observe the following results when calling each function:
Functions | CPU Cycles |
---|---|
Encoder | |
ENC_run (w/o calibration) | 16 |
ENC_run (w/ calibration) | 30 |
ENC_runHall | 16 |
Enhanced Sliding Mode Observer | |
EMSO_run | 307 |
Hall | |
HALL_run | 73 |
Sensorless speed measurement | |
SPDCALC_run | 53 |
Sensored speed measurement | |
SPDFR_run | 32 |
APIs for Observers and Encoders