TIDUF17 November   2022 TMS320F2800152-Q1 , TMS320F2800153-Q1 , TMS320F2800154-Q1 , TMS320F2800155 , TMS320F2800155-Q1 , TMS320F2800156-Q1 , TMS320F2800157 , TMS320F2800157-Q1

 

  1.   Description
  2.   Resources
  3.   Features
  4.   Applications
  5.   5
  6. 1System Description
  7. 2System Overview
    1. 2.1 Block Diagram
    2. 2.2 Design Considerations
    3. 2.3 Highlighted Products
      1. 2.3.1 TMS320F280039C
      2. 2.3.2 UCC21530-Q1
      3. 2.3.3 OPA607-Q1
      4. 2.3.4 LM25184-Q1
      5. 2.3.5 TCAN1044A-Q1
    4. 2.4 System Design Theory
      1. 2.4.1 Three-Phase PMSM Drive
      2. 2.4.2 Field Oriented Control of PM Synchronous Motor
      3. 2.4.3 Field Weakening (FW) and Maximum Torque Per Ampere (MTPA) Control
      4. 2.4.4 Compressor Drive with Automatic Vibration Compensation
      5. 2.4.5 Hardware Prerequisites for Motor Drive
        1. 2.4.5.1 Motor Current Feedback
          1. 2.4.5.1.1 Current Sensing with Three-Shunt
          2. 2.4.5.1.2 Current Sensing with Single-Shunt
        2. 2.4.5.2 Motor Voltage Feedback
  8. 3Hardware, Software, Testing Requirements, and Test Results
    1. 3.1 Hardware Requirements
      1. 3.1.1 Hardware Board Overview
      2. 3.1.2 Test Conditions
      3. 3.1.3 Test Equipment Required for Board Validation
    2. 3.2 Test Setup
      1. 3.2.1 Hardware Setup
      2. 3.2.2 Software Setup
        1. 3.2.2.1 Code Composer Studio Project
        2. 3.2.2.2 Software Structure
    3. 3.3 Test Procedure
      1. 3.3.1 Level 1 Incremental Build
        1. 3.3.1.1 Project Setup
        2. 3.3.1.2 Running the Application
      2. 3.3.2 Level 2 Incremental Build
        1. 3.3.2.1 Project Setup
        2. 3.3.2.2 Running the Application
      3. 3.3.3 Level 3 Incremental Build
        1. 3.3.3.1 Project Setup
        2. 3.3.3.2 Running the Application
      4. 3.3.4 Level 4 Incremental Build
        1. 3.3.4.1 Project Setup
        2. 3.3.4.2 Running the Application
        3. 3.3.4.3 Tuning Field Weakening and MTPA Control
        4. 3.3.4.4 Tuning Vibration Compensation
        5. 3.3.4.5 CAN FD Command Interface
    4. 3.4 Test Results
      1. 3.4.1 MCU CPU Load, Memory, and Peripheral Usage
  9. 4Design and Documentation Support
    1. 4.1 Design Files
      1. 4.1.1 Schematics
      2. 4.1.2 BOM
    2. 4.2 Tools and Software
    3. 4.3 Documentation Support
    4. 4.4 Support Resources
    5. 4.5 Trademarks

Running the Application

Run the code by going to RunResume or clicking the Resume button in the tool bar. Check the following:

  • systemVars.flagEnableSystem needs to be set to 1 after a fixed time, meaning the offset calibration has been done. The fault flags, motorVars_M1.faultMtrUse.all, should be equal to 0. Set the variable motorVars_M1.flagEnableRunAndIdentify to 1.
  • The motor will run with v/f open loop. Tune the v/f profile parameters in user_mtr1.h as below according to the specification of the motor if the motor doesn't spin smoothly.
    #define USER_MOTOR1_FREQ_LOW_Hz   (10.0f)   // Hz
    #define USER_MOTOR1_FREQ_HIGH_Hz  (200.0f)  // Hz
    #define USER_MOTOR1_VOLT_MIN_V    (10.0f)   // Volt
    #define USER_MOTOR1_VOLT_MAX_V    (200.0f)  // Volt
  • After that, the motor spins with a setting speed in the variable motorVars_M1.speedRef_Hz, check the value of motorVars_M1.speed_Hz in Expressions window, the values of these two variables should be very close as shown in Figure 3-10.

  • Use the DATALOG module with the CCS Graph utility to check the current sensing signals. Go to ToolsGraphDual Time to launch the tool and use the Import button to navigate to the file <SDK install location>\solutions\tidm_02012_ecompressor\common\debug\motor_datalog_fp2.graphProp. Click OK and the graphed current readings should be displayed as shown in Figure 3-11. The code below shows how the variables to be logged are configured in sys_main.h. For more details about about the DATALOG module, see the Motor Control SDK Universal Project and Lab User's Guide.
        // set datalog parameters
        datalogObj->iptr[0] = &motorVars_M1.adcData.I_A.value[0];
        datalogObj->iptr[1] = &motorVars_M1.adcData.I_A.value[1];
  • Verify the over current fault protection by decreasing the value of the variable motorVars_M1.overCurrent_A, the over current protection is implemented by the CMPSS modules. The over current fault will be triggered if the motorVars_M1.overCurrent_A is set to a value less than the motor phase current actual value. When the fault occurs the PWM output will be disabled, the motorVars_M1.flagEnableRunAndIdentify will be cleared to 0, and the motorVars_M1.faultMtrUse.all will be set to 0x10 (16) as shown in Figure 3-10.
  • Set the variable motorVars_M1.flagEnableRunAndIdentify to 0 to stop the motor. Terminate the debug session and power off the power supply to the inverter board.
GUID-20221101-SS0I-36B2-MQM0-NXDV2KMQRXHH-low.png Figure 3-10 Build Level 2 Variables in the Expressions View

The Graph tool can be used to display the DATALOG buffers.

GUID-20221101-SS0I-XSJ8-GJ4J-MDZLBW784Z4F-low.png Figure 3-11 Build Level 2 Data Logged Current Readings in the CCS Graph Tool

The over current fault will trip the PWM output and also be reflected in the fault flag variables.

GUID-20221101-SS0I-F9KT-NC1P-36TW6XMS5J2X-low.png Figure 3-12 Build Level 2 Over Current Protection Check in the Expressions View