SPRAD03 March 2022 AM2431 , AM2431 , AM2432 , AM2432 , AM2434 , AM2434 , AM6411 , AM6411 , AM6412 , AM6412 , AM6421 , AM6421 , AM6422 , AM6422 , AM6441 , AM6441 , AM6442 , AM6442
Measurements are taken for the duration of approximately 30 seconds (approximately 3 millions iterations) with motor spinning in the loop. Max values are used for all top-level reported results.
GPIO output toggle is measured at 180 ns. This value was subtracted from maximum measured times in the 'Max normalized' rows below in the Detailed results tables.
50 KHz PWM cycle with 2x update (100 KHz processing cycle time).
Compile flags: -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -O3
Settings are used in 'settings.h':
BUILDLEVEL | OPEN_LOOP_IQ_ID | CLOSED_LOOP_IQ_ID | CLOSED_LOOP_ SPEED |
CLOSED_LOOP_ POSITION |
CLOSED_LOOP_ CIA402 |
PID_TUNE_LEVEL | NO_TUNING | NO_TUNING | NO_TUNING | NO_TUNING | NO_TUNING |
DEBUG_LEVEL | DEBUG_BUFFERS_OFF | DEBUG_BUFFERS_OFF | DEBUG_BUFFERS_OFF | DEBUG_BUFFERS_OFF | DEBUG_BUFFERS_OFF |
Function | Motor Control R5F Processing Time | Unit | ||||
---|---|---|---|---|---|---|
Open Loop Iq/Id | Closed Loop Iq/Id | Closed Loop Speed | Closed Loop Position | Closed Loop CiA402 | ||
Angle/Position/Speed Calculations | 132 | 128 | 156 | 156 | ns | |
Phase Current Scaling, conversion to FP | 20 | 180 | 316 | 236 | ns | |
FOC loop and PI controllers | 180 | 252 | 340 | 404 | ns | |
Write to PWM outputs and save state for next cycle | 84 | 84 | 84 | 84 | ns | |
Total (Aggregate Added from above) | 416 | 644 | 896 | 880 | ns | |
Total (Measured all at once) (PRECOMPUTE_LEVEL = NO_PRECOMPUTE) |
388 | 644 | 884 | 892 | 860 | ns |
Total (Measured all at once) ADC values and Clarke ran early (PRECOMPUTE_LEVEL = PRECOMPUTE_CLARKE |
396 | 484 | 740 | 772 | ns |
For detailed motor control R5F processing time, see the Section 14