AM243x Motor Control SDK  11.00.00
Observer algorithms

Introduction

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.

Features Supported

Sensored:

  • Encoder (eQEP based)
  • Hall sensor

Sensorless:

  • Enhanced Sliding Mode Observer (eSMO)

Speed measurement:

  • speedcalc: Encoder speed calculation (SPDCALC)
  • speedfr: Frequency estimation for eSMO (SPDFR)

Encoder

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

Enhanced Sliding Mode Observer (eSMO) estimates rotor angle to achieve a sensorless FOC.

Hall

The Hall algorithm uses an external Hall effect sensor to calculate speed and rotor angle for a sensored FOC design.

Speed measurement

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.

Benchmark Results

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

  • Ran with TI Clang Compiler v3.2.0.LTS, with -Os flag, obtained the average result from 600 consecutive readings of running the controller with DPL CycleCountP minus the overhead, simulating a control loop scenario.
  • Actual result may vary depending on provided datasets and memory configuration. For Arm Cortex-R5F, it is recommended for users to map control loops to TCM for the best performance.

API

APIs for Observers and Encoders

Note
Arm is a registered trademark of Arm Limited (or its subsidiaries or affiliates) in the US and/or elsewhere.