ACI signal-chain benchmark

This example measures the execution time of a Field-Oriented Control (FOC) signal chain on the device, using a simulated Asynchronous Current Induction (ACI) motor model as the test load.

Expected output

ACI Benchmark - per-module averages (samples 500..599, <F> MHz clock):
  Step  0  ADC read          : <N> cycles
  Step  1  Clarke            : <N> cycles
  Step  2  Park              : <N> cycles
  Step  3  3x PID            : <N> cycles
  Step  4  Inverse Park      : <N> cycles
  [Step  5  ACI model (sim)] : <N> cycles
  Step  6  Flux estimator    : <N> cycles
  Step  7  Speed estimator   : <N> cycles
  Step  8  SVGEN             : <N> cycles
  Step  9  PWM write         : <N> cycles
  [Step 10  IClarke (sim)]   : <N> cycles
  ---------------------------------------------------
  Total real ISR (FOC only)  : <N> cycles
  Full signal chain          : <N> cycles

Motor speed at end of test (expected ): <value>
ACI benchmark PASS/FAIL

Implementation notes

TMU hardware acceleration

  • sinf, cosf, atan2f are remapped to TMU CDE intrinsics (sinf_tmu, cosf_tmu, atan2f_tmu)

  • The speed estimator (step 7) slip computation uses divf_tmu for the rotor flux division (w_slip / psi_r_2)

External Connections

None — phase currents are fed back in software via the IClarke loopback.