SPRAD32 May   2022 AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1

 

  1.   Trademarks
  2. 1Introduction
  3. 2AM26x FOC ISR Benchmarks
  4. 3Typical Application Scenarios for Traction Inverters
    1. 3.1 Sample ADC in Cycle 0 and Update PWM in Cycle 1
    2. 3.2 Sample ADC in First Half of Cycle 0 and Update PWM in Second Half of Cycle 0
  5. 4Summary
  6. 5References

AM26x FOC ISR Benchmarks

This section presents benchmarks of major functions in FOC ISR. They are visualized in Figure 2-1, Figure 2-2, Figure 2-3 and Figure 2-4. The order of items, top to bottom, in Bar Charts at Figure 2-3 and Figure 2-4 follows the execution flow. The Sunburst Charts in Figure 2-3 and Figure 2-4 are organized to have execution time from long to short in a clockwise direction. More details are summarized in Table 2-1. From Figure 2-4, the FOC ISR with TI R5F math library takes 3.9us from PWM time base counting Zero to PWM duty cycle updated. As shown in Figure 2-2, among the 3.9 µs, hardware interface costs 40% or 1.565 µs, and computation consumes 60% or 2.335 µs. Within the computation time, trigonometric functions take 26% or 600 ns. The Field Oriented Control excluding trigonometric functions and hardware operation is less than 1 µs, roughly 42% of computation time. The software resolver example without trigonometric functions requires 150 ns, 7% of computation time. The rest 25% computation time is spent on processing feedback and generating control reference in demo logic. The log function at the end of ISR is not counted in this benchmark as it is part of debug function.

GUID-20220418-SS0I-MLBH-TW6N-S7R4CVQ6ZM3T-low.png Figure 2-1 AM26x Software Computation vs Hardware Interface for FOC Loop With Standard C lib
GUID-20220418-SS0I-22CR-9PBG-KN5Z4VLPL9GM-low.png Figure 2-2 AM26x Software Computation vs Hardware Interface for FOC Loop With TI R5F lib
GUID-20220418-SS0I-QD5C-3BMH-MZRQ72KNX5P8-low.png GUID-20220420-SS0I-PFZK-T15D-GGXWLH1MB6NZ-low.png Figure 2-3 AM26x Time Consumption Breakdown for FOC Loop With Standard C lib
GUID-20220418-SS0I-HZKK-HH2M-7S1DWX7WMXDC-low.png GUID-20220420-SS0I-DVT4-TBMQ-X3G2QBGTBCZ6-low.png Figure 2-4 AM26x Time Consumption Breakdown for FOC Loop With TI R5F lib
Table 2-1 AM26x FOC Loop Benchmarks
Field Oriented Control Interrupt Service Routine Description Operation Type Execution Time (ns)
ADC Acquisition and Conversion
  1. PWM hardware trigger ADC
  2. ADC hardware sample, convert, and trigger interrupt
Hardware Interface 300
ISR Entry
  1. R5F hardware process interrupt
  2. Interrupt handler load ISR
Hardware Interface 600
Read Feedback
  1. Read 8 ADC results including 3-phase currents, resolver sin and cos, dc link voltage and others
Hardware Interface 440
Process Feedback Remove effects, adjust scales, and filter noises Computation 300
Run Trigonometric Functions - Option 1, Standard C Library Run 3 times of sinf() and cosf() from libc.a
  1. Run one time for software resolver
  2. Run one time for Park transformation
  3. Run one time for iPark transformation
Computation 2400
Run Trigonometric Functions - Option 2, TI R5F Math Run 3 times of ti_r5fmath_sincos() from TI R5F Math
  1. Run one time for software resolver
  2. Run one time for Park transformation
  3. Run one time for iPark transformation
Computation 600
Get Rotor Position with Software Resolver resolver_run() is given as an example to take resolver feedback at the excitation frequency Computation 150
Update PWM Write PWM Duty Cycle Hardware Interface 225
Field Oriented Control
  1. Speed Loop Controller
  2. Slip Compensation for Induction Motor
  3. Park and Clark Transformation
  4. Id Controller
  5. Iq Controller
  6. Output Limiter
  7. iPark Transformation
  8. Space Vector Generation
  9. Duty Cycle Limiter
Computation 985
Demo Logic
  1. Dummy theta generator for open loop and current loop tests
  2. Test profile generator for speed loop test
Computation 300
Total From PWM time base count Zero to PWM duty cycle update Hardware Interface and Computation 3900