SPRAD03 March   2022 AM2431 , AM2431 , AM2432 , AM2432 , AM2434 , AM2434 , AM6411 , AM6411 , AM6412 , AM6412 , AM6421 , AM6421 , AM6422 , AM6422 , AM6441 , AM6441 , AM6442 , AM6442

 

  1.   Trademarks
  2. System Overview
  3. Hardware Prerequisites
  4. Hardware Configuration
  5. HW Pinouts, Default Jumpers, and Connections
  6. Schematics
  7. Jumper Settings and Descriptions
  8. LEDs
  9. Software Architecture
  10. Actuation and Feedback Timing
  11. 10Benchmark Results
    1. 10.1 Motor Control R5F Processing Time
    2. 10.2 Trigger/Capture Point to R5F ISR Entry
  12. 11Detailed Demo User's Guide
    1. 11.1 Step 0. Getting the Software and Building
    2. 11.2 Step 1. Getting Started With the Hardware
    3. 11.3 Step 2. Configure ROQ437 EnDat2.2 Encoder for Faster EnDat 2.2 Recovery Time (only needs to be done once the first time you use the ROQ437 encoder)
    4. 11.4 Step 3. Open Loop Iq Control (BUILDLEVEL == OPEN_LOOP_IQ_ID)
    5. 11.5 Step 4. Closed Loop Iq/Id Control (BUILDLEVEL == CLOSED_LOOP_IQ_ID)
    6. 11.6 Step 5. Closed Loop Speed Control (BUILDLEVEL == CLOSED_LOOP_SPEED)
    7. 11.7 Step 6. Closed Loop Position Control (BUILDLEVEL == CLOSED_LOOP_POSITION)
  13. 12Build Using MCU+SDK 08.00.00.21 & CCS 10.3.1
  14. 13Summary
  15. 14Appendix A: Detailed Motor Control R5F Processing Time
  16. 15References

Motor Control R5F Processing Time

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':

Table 10-1 Build Options
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
Table 10-2 R5F Motor Control Processing Time
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