TIDUBE5A January   2022  – October 2022

 

  1.   Description
  2.   Resources
  3.   Features
  4.   Applications
  5.   5
  6. 1System Description
    1. 1.1 Key System Specifications
  7. 2System Overview
    1. 2.1 Block Diagram
    2. 2.2 Design Considerations
    3. 2.3 Highlighted Products
      1. 2.3.1 TMS320F2800137
      2. 2.3.2 TMS320F280025C
      3. 2.3.3 TMS320F280039C
      4. 2.3.4 UCC28740
      5. 2.3.5 UCC27517
      6. 2.3.6 TLV9062
      7. 2.3.7 TLV76733
    4. 2.4 System Design Theory
      1. 2.4.1 Interleaved PFC
        1. 2.4.1.1 Full Bridge Diode Rectifier Rating
        2. 2.4.1.2 Inductor Ratings
        3. 2.4.1.3 AC Voltage Sensing
        4. 2.4.1.4 DC Link Voltage Sensing
        5. 2.4.1.5 Bus Current Sensing
        6. 2.4.1.6 DC Link Capacitor Rating
        7. 2.4.1.7 MOSFET Ratings
        8. 2.4.1.8 Diode Ratings
      2. 2.4.2 Three-Phase PMSM Drive
        1. 2.4.2.1 Field Oriented Control of PM Synchronous Motor
        2. 2.4.2.2 Sensorless Control of PM Synchronous Motor
          1. 2.4.2.2.1 Enhanced Sliding Mode Observer with Phase Locked Loop
            1. 2.4.2.2.1.1 Mathematical Model and FOC Structure of an IPMSM
            2. 2.4.2.2.1.2 Design of ESMO for the IPMSM
            3. 2.4.2.2.1.3 Rotor Position and Speed Estimation with PLL
        3. 2.4.2.3 Field Weakening (FW) and Maximum Torque Per Ampere (MTPA) Control
        4. 2.4.2.4 Compressor Drive with Automatic Vibration Compensation
        5. 2.4.2.5 Fan Drive with Flying Start
        6. 2.4.2.6 Hardware Prerequisites for Motor Drive
          1. 2.4.2.6.1 Motor Current Feedback
            1. 2.4.2.6.1.1 Current Sensing with Three-Shunt
            2. 2.4.2.6.1.2 Current Sensing with Single-Shunt
          2. 2.4.2.6.2 Motor Voltage Feedback
  8. 3Hardware, Software, Testing Requirements, and Test Results
    1. 3.1 Getting Started Hardware
      1. 3.1.1 Hardware Board Overview
      2. 3.1.2 Test Conditions
      3. 3.1.3 Test Equipment Required for Board Validation
      4. 3.1.4 Test Setup
    2. 3.2 Getting Started Firmware
      1. 3.2.1 Download and Install Software Required for Board Test
      2. 3.2.2 Opening Project Inside CCS
      3. 3.2.3 Project Structure
    3. 3.3 Test Procedure
      1. 3.3.1 Build Level 1: CPU and Board Setup
        1. 3.3.1.1 Start CCS and Open Project
        2. 3.3.1.2 Build and Load Project
        3. 3.3.1.3 Setup Debug Environment Windows
        4. 3.3.1.4 Run the Code
      2. 3.3.2 Build Level 2: Open Loop Check with ADC Feedback
        1. 3.3.2.1 Start CCS and Open Project
        2. 3.3.2.2 Build and Load Project
        3. 3.3.2.3 Setup Debug Environment Windows
        4. 3.3.2.4 Run the Code
      3. 3.3.3 Build Level 3: Closed Current Loop Check
        1. 3.3.3.1 Start CCS and Open Project
        2. 3.3.3.2 Build and Load Project
        3. 3.3.3.3 Setup Debug Environment Windows
        4. 3.3.3.4 Run the Code
      4. 3.3.4 Build Level 4: Full PFC and Motor Drive Control
        1. 3.3.4.1  Start CCS and Open Project
        2. 3.3.4.2  Build and Load Project
        3. 3.3.4.3  Setup Debug Environment Windows
        4. 3.3.4.4  Run the Code
        5. 3.3.4.5  Run the System
        6. 3.3.4.6  Tuning Motor Drive FOC Parameters
        7. 3.3.4.7  Tuning PFC Parameters
        8. 3.3.4.8  Tuning Field Weakening and MTPA Control Parameters
        9. 3.3.4.9  Tuning Flying Start Control Parameters
        10. 3.3.4.10 Tuning Vibration Compensation Parameters
        11. 3.3.4.11 Tuning Current Sensing Parameters
    4. 3.4 Test Results
      1. 3.4.1 Performance Data and Curves
      2. 3.4.2 Functional Waveforms
      3. 3.4.3 Transient Waveforms
      4. 3.4.4 MCU CPU Load, Memory and Peripherals Usage
        1. 3.4.4.1 CPU Load for Full Implementation
        2. 3.4.4.2 Memory Usage
        3. 3.4.4.3 Peripherals Usage
    5. 3.5 Migrate Firmware to a New Hardware Board
      1. 3.5.1 Configure the PWM, CMPSS, and ADC Modules
      2. 3.5.2 Setup Hardware Board Parameters
      3. 3.5.3 Configure Faults Protection Parameters
      4. 3.5.4 Setup Motor Electrical Parameters
      5. 3.5.5 Setup PFC Control Parameters
  9. 4Design and Documentation Support
    1. 4.1 Design Files
      1. 4.1.1 Schematics
      2. 4.1.2 Bill of Materials
      3. 4.1.3 Altium Project
      4. 4.1.4 Gerber Files
      5. 4.1.5 PCB Layout Guidelines
    2. 4.2 Software Files
    3. 4.3 Documentation Support
    4. 4.4 Support Resources
    5. 4.5 Trademarks
  10. 5Terminology
  11. 6Revision History

Run the Code

  1. Set the AC source output to 0 V at 50/60Hz, turn on the AC power supply, slowly increase the input voltage from 0-V to 220-V AC.
  2. The required motor parameters must be recorded in the header files (user_mtr1.h and user_mtr2.h) as shown in the following example codes. If the motor parameters are not well know by the user, the motor identification can be used to achieve the motor parameters if the FAST estimator is implemented in the reference design.
    #define USER_MOTOR1_Rs_Ohm                  (2.66273594f)
    #define USER_MOTOR1_Ls_d_H                  (0.00943629723f)
    #define USER_MOTOR1_Ls_q_H                  (0.00943629723f)
    #define USER_MOTOR1_RATED_FLUX_VpHz         (0.390171647f)
    Note:

    The motor identification is not supported by F28002x based reference design project, so the user must get the motor parameters from the motor manufacturer and set the parameters in user_mtr1/2.h files. The F28003x based reference design can support the motor parameters identification feature.

  3. Changes the userParams[MTR_1].flag_bypassMotorId value to "false" to enable the motor identification as the following example code for motor 1 (compressor).
    // true->enable identification, false->disable identification
        userParams[MTR_1].flag_bypassMotorId = false;
  4. Set the right identification variables value in the user_mtr1.h according to the specification of the motor 1 (compressor).
     #define USER_MOTOR1_RES_EST_CURRENT_A       (1.0f)      // A - 10~30% of rated current of the motor
    #define USER_MOTOR1_IND_EST_CURRENT_A       (-1.0f)     // A - 10~30% of rated current of the motor, just enough to enable rotation
    #define USER_MOTOR1_MAX_CURRENT_A           (4.5f)      // A - 30~150% of rated current of the motor
    #define USER_MOTOR1_FLUX_EXC_FREQ_Hz        (20.0f)     // Hz - 10~30% of rated frequency of the motor
  5. Rebuild the project and load the code into the controller, run the project by clicking on button , or click RunResume in the Debug tab. The systemVars.flagEnableSystem should be set to 1 after a fixed time, that means the offsets calibration have been done and the power relay for inrush is turned on. The fault flags for dual motor and PFC (motorVars[0].faultMtrUse.all, motorVars[1].faultMtrUse.all, and pfcVars.faultPFCUse.all) should be equal to '0' , if not, the user should check the current and voltage sensing circuit as described in Section 3.3.1.
  6. Set the variable motorVars[0].flagEnableRunAndIdentify to 1 in the Expressions window as shown in Figure 3-24, the motor identification will be executed, the whole process will take about 150s. Once motorVars[0].flagEnableRunAndIdentify is equal to 0, the motor parameters have been identified. Record the watch window values with the newly defined motor parameters in user_mtr1.h as follows:
    • USER_MOTOR1_Rs = motorVars[0].Rs_Ohm’s value
    • USER_MOTOR1_Ls_d = motorVars[0].Ls_d_H’s value
    • USER_MOTOR1_Ls_q = motorVars[0].Ls_q_H’s value
    • USER_MOTOR_RATED_FLUX = motorVars[0].flux_VpHz’s value
  7. Implement the same process for motor 2 (fan) if the motor parameters are not known and need to be identified.
  8. Set both userParams[MTR_1].flag_bypassMotorId and userParams[MTR_2].flag_bypassMotorId values to "true" after successfully identify the motors parameters, rebuild the project and load the code into the controller.
    • Set the variables motorVars[0].flagEnableRunAndIdentify equal to 1 again for starting to run the motor_1 (compressor), and motorVars[1].flagEnableRunAndIdentify equal to 1 again for starting to run the motor_2 (fan).
    • Set the variables motorVars[0].speedRef_Hz, motorVars[1].speedRef_Hz to a different value and watch how the motor shaft speed will follow.
    • To change the acceleration, enter a different acceleration value for the variable motorVars[0].accelerationMax_Hzps, motorVars[0].accelerationMax_Hzps.
  9. To enable PFC control, set the pfcVars.flagEnablePFC equal to 1, and set the variable pfcVars.VdcSet_V to a different value and watch how the dc bus voltage will follow the setting voltage.
  10. The controller can now be halted before setting the motorVars[0].flagEnableRunAndIdentify, motorVars[1].flagEnableRunAndIdentify and pfcVars.flagEnablePFC to 0, and the debug connection terminated. Fully halting the controller by first clicking the Halt button on the toolbar or by clicking TargetHalt. Finally, reset the controller by clicking on or clicking RunReset.
  11. Close CCS debug session by clicking on Terminate Debug Session or clicking RunTerminate.
Figure 3-24 Build Level 4: Expressions Window at Run Time
Figure 3-25 Build Level 4: Rotor Angle, Phase Current of Motor
Figure 3-26 Build Level 4: Voltage and Current of PFC