TIDUF56 January   2024

 

  1.   1
  2.   Description
  3.   Resources
  4.   Features
  5.   Applications
  6.   6
  7. 1System Description
    1. 1.1 Terminology
    2. 1.2 Key System Specifications
  8. 2System Overview
    1. 2.1 Block Diagram
    2. 2.2 Design Considerations
    3. 2.3 Highlighted Products
      1. 2.3.1 TMS320F28P65x-Q1
      2. 2.3.2 DRV3255-Q1
      3. 2.3.3 LM25184-Q1
      4. 2.3.4 TCAN1044A-Q1
  9. 3System Design Theory
    1. 3.1 Three-Phase PMSM Drive
      1. 3.1.1 Field-Oriented Control of PM Synchronous Motor
        1. 3.1.1.1 Space Vector Definition and Projection
          1. 3.1.1.1.1 ( a ,   b ) ⇒ ( α , β ) Clarke Transformation
          2. 3.1.1.1.2 α , β ⇒ ( d ,   q ) Park Transformation
        2. 3.1.1.2 Basic Scheme of FOC for AC Motor
        3. 3.1.1.3 Rotor Flux Position
    2. 3.2 Field Weakening (FW) Control
  10. 4Hardware, Software, Testing Requirements, and Test Results
    1. 4.1 Hardware Requirements
      1. 4.1.1 Hardware Board Overview
      2. 4.1.2 Test Conditions
      3. 4.1.3 Test Equipment Required for Board Validation
    2. 4.2 Test Setup
      1. 4.2.1 Hardware Setup
      2. 4.2.2 Software Setup
        1. 4.2.2.1 Code Composer Studio™ Project
        2. 4.2.2.2 Software Structure
    3. 4.3 Test Procedure
      1. 4.3.1 Project Setup
      2. 4.3.2 Running the Application
    4. 4.4 Test Results
  11. 5Design and Documentation Support
    1. 5.1 Design Files
      1. 5.1.1 Schematics
      2. 5.1.2 BOM
      3. 5.1.3 PCB Layout Recommendations
        1. 5.1.3.1 Layout Prints
    2. 5.2 Tools and Software
    3. 5.3 Documentation Support
    4. 5.4 Support Resources
    5. 5.5 Trademarks

Running the Application

Run the code by going to RunResume or clicking the Resume button in the tool bar. The project can now run and the variables display in the Expressions window. Check the following to confirm the application and hardware set up are working:

  • The green power LED on the gate-drive boards must be on. This indicates the auxiliary power supply to the board is enabled.
  • If the initializations occur correctly and the FreeRTOS scheduler is working, the red and blue LEDs are supposed to blink. If the DRV3255 gate driver is initialized correctly without any faults, the fault bits corresponding to the DRV, faultStatusFlags.DRVnFLT1 and faultStatusFlags.DRVFLT is supposed to be 0.
  • Similarly other variables in the faultStatusFlags structure show the status of other faults. If no fault flags are set, to run the test motor, the runMotor can be set to runMotor. Variables need to appear similar to what is shown in Figure 4-5.
  • Start with a conservative value of IqRef and slowly increase IqRef during testing. Compare the actual IQ feedback against reference by viewing the variables in motor1 structure.
  • If the motor does not operate as expected, try to disable SKIP_QEP_CALIB in the pre-defined symbols. This forces the control loop to perform initial position calibration. In this case, when runMotor is set, the control algorithm automatically sets IdRef for alignment, then set IqRef to spin the motor with a generated angle and finally once the index pulse of the ABI position output is detected, reset IdRef and IqRef to 0. At this point, slowly start increasing IqRef.
  • Check the calibration offsets of the motor inverter board. The offset values of the motor phase current sensing values must be half per unit value, that is, around 0.5.
  • The PWM output for motor drive can also be probed with an oscilloscope.
GUID-20231214-SS0I-ZH5F-R62N-FC7V7PBXH4CT-low.svg Figure 4-5 Runtime Control and Debug Through Expressions View

Halt the CPU by first clicking the Suspend button on the toolbar or by selecting TargetSuspend. To run the application from the start again, reset the controller by clicking on the CPU Reset tool bar button or clicking RunResetCPU Reset and then click on the Restart button or RunRestart. Close the CCS debug session by clicking the Terminate button or by clicking RunTerminate. This halts the program and disconnects CCS from the controller.

It is not necessary to terminate the debug session each time the code is changed. Instead go to RunLoadLoad Program... (or Reload Program... if using the same file). If CSS detects the executable was rebuilt, CCS automatically inquires if reloading the executable is desired.