TIDUF60 December   2023

 

  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 TMS320F2800137
      2. 2.3.2 MSPM0G1507
      3. 2.3.3 TMP6131
      4. 2.3.4 UCC28881
      5. 2.3.5 TPS54202
      6. 2.3.6 TLV9062
      7. 2.3.7 TLV74033
    4. 2.4 System Design Theory
      1. 2.4.1 Hardware Design
        1. 2.4.1.1 Modular Design
        2. 2.4.1.2 High-Voltage Buck Auxiliary Power Supply
        3. 2.4.1.3 DC Link Voltage Sensing
        4. 2.4.1.4 Motor Phase Voltage Sensing
        5. 2.4.1.5 Motor Phase Current Sensing
        6. 2.4.1.6 External Overcurrent Protection
        7. 2.4.1.7 Internal Overcurrent Protection for TMS320F2800F137
      2. 2.4.2 Three-Phase PMSM Drive
        1. 2.4.2.1 Field-Oriented Control of PM Synchronous Motor
          1. 2.4.2.1.1 Space Vector Definition and Projection
            1. 2.4.2.1.1.1 ( a ,   b ) ⇒ ( α , β ) Clarke Transformation
            2. 2.4.2.1.1.2 α , β ⇒ ( d ,   q ) Park Transformation
          2. 2.4.2.1.2 Basic Scheme of FOC for AC Motor
          3. 2.4.2.1.3 Rotor Flux Position
        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 Hardware Prerequisites for Motor Drive
          1. 2.4.2.4.1 Motor Current Feedback
            1. 2.4.2.4.1.1 Three-Shunt Current Sensing
            2. 2.4.2.4.1.2 Single-Shunt Current Sensing
          2. 2.4.2.4.2 Motor Voltage Feedback
  9. 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
    2. 3.2 Getting Started GUI
      1. 3.2.1 Test Setup
      2. 3.2.2 Overview of GUI Software
      3. 3.2.3 Setup Serial Port
      4. 3.2.4 Motor Identification
      5. 3.2.5 Spin Motor
      6. 3.2.6 Motor Fault Status
      7. 3.2.7 Tune Control Parameters
      8. 3.2.8 Virtual Oscilloscope
    3. 3.3 Getting Started C2000 Firmware
      1. 3.3.1 Download and Install Software Required for Board Test
      2. 3.3.2 Opening Project Inside CCS
      3. 3.3.3 Project Structure
      4. 3.3.4 Test Procedure
        1. 3.3.4.1 Build Level 1: CPU and Board Setup
          1. 3.3.4.1.1 Start CCS and Open Project
          2. 3.3.4.1.2 Build and Load Project
          3. 3.3.4.1.3 Setup Debug Environment Windows
          4. 3.3.4.1.4 Run the Code
        2. 3.3.4.2 Build Level 2: Open-Loop Check With ADC Feedback
          1. 3.3.4.2.1 Start CCS and Open Project
          2. 3.3.4.2.2 Build and Load Project
          3. 3.3.4.2.3 Setup Debug Environment Windows
          4. 3.3.4.2.4 Run the Code
        3. 3.3.4.3 Build Level 3: Closed Current Loop Check
          1. 3.3.4.3.1 Start CCS and Open Project
          2. 3.3.4.3.2 Build and Load Project
          3. 3.3.4.3.3 Setup Debug Environment Windows
          4. 3.3.4.3.4 Run the Code
        4. 3.3.4.4 Build Level 4: Full Motor Drive Control
          1. 3.3.4.4.1 Start CCS and Open Project
          2. 3.3.4.4.2 Build and Load Project
          3. 3.3.4.4.3 Setup Debug Environment Windows
          4. 3.3.4.4.4 Run the Code
          5. 3.3.4.4.5 Tuning Motor Drive FOC Parameters
          6. 3.3.4.4.6 Tuning Field Weakening and MTPA Control Parameters
          7. 3.3.4.4.7 Tuning Current Sensing Parameters
    4. 3.4 Test Results
      1. 3.4.1 Load and Thermal Test
      2. 3.4.2 Overcurrent Protection by External Comparator
      3. 3.4.3 Overcurrent Protection by Internal CMPSS
    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
    6. 3.6 Getting Started MSPM0 Firmware
  10. 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 PCB Layout Recommendations
      4. 4.1.4 Altium Project
      5. 4.1.5 Gerber Files
    2. 4.2 Software Files
    3. 4.3 Documentation Support
    4. 4.4 Support Resources
    5. 4.5 Trademarks
  11. 5About the Author
Three-Shunt Current Sensing

The current through the motor is sampled by microcontroller as part of the motor control algorithm during every one PWM cycle. TMS320F2800137 daughter board supports 1-3 shunt current sensing, MSPM0G1507 daughterboard supports 1-2 shunt current sensing. To measure bidirectional currents of the motor phase, that is, positive and negative currents, the circuits below require a reference voltage of 1.65 V. This offset reference voltage is created by a voltage follower as shown in Figure 2-29.

GUID-20231103-SS0I-822H-MJQ6-9C83NHX2VWVQ-low.svg Figure 2-29 1.65-V Reference From 3.3-V Input Circuit

Figure 2-30 shows how the motor current is represented as a voltage signal, with filtering, amplification, and offset to the center of the ADC input range for TMS320F2800137 daughterboard. This circuit is used for each phase of the 3-phase PMSM of compressor and fan. The transfer function of this circuit is given by Equation 52.

Equation 52. V O U T = V O F F S E T + I I N × R S H U N T × G i

where

  • Rshunt = 0.05 Ω
  • Voffset = 1.65 V

The calculated resistance values lead to the sensing circuit shown in Figure 2-36, Gi is given by Equation 53.

Equation 53. G i = R f b R i n = R 18 ( R 97 + R 15 ) = 10 kΩ 20 + 2 . 4 kΩ = 4 . 132

The maximum peak-to-peak current measurable by the microcontroller is given by Equation 54.

Equation 54. I s c a l e _ m a x = V A D C _ m a x R S H U N T × G i = 3 . 3 0 . 05 × 4 . 132 = 15 . 97 A

This has the peak-to-peak value of ±7.99 A. The following code snippet shows how this is defined for compressor motor in user_mtr1.h file:

//! \brief Defines the maximum current at the AD converter
#define USER_M1_ADC_FULL_SCALE_CURRENT_A         (15.97f)

Correct polarity of the current feedback is also important so that the microcontroller has an accurate current measurement. In this hardware board configuration, the negative pin of the shunt resistor, which is connected to ground, is also connected to the inverting pin of the operational amplifier. The highlighted sign is required to be configured to have the correct polarity for the current feedback in software as shown in the following code snippet in user.mtr1.h:

// define the sign of current feedback based on hardware board
#define USER_M1_SIGN_CURRENT_SF     (1.0f)
GUID-20231030-SS0I-J8JN-8CLD-G1FLWKPMGX8R-low.svg GUID-20231103-SS0I-SZ7R-1FLC-NGFLZFSVVHQD-low.svg Figure 2-30 Three-Shunt Current Sensing Circuit for TMS320F2800137

On the MSPM0 daughterboard, two shunt current sensing are implemented with the two high-end internal amplifiers to save system cost. The amplifier gain is also 4.132, and the cutoff frequency is 70 kHz. Figure 2-31 shows the two-shunt current sensing circuit for the MSPM0G1507 daughterboard.

GUID-20231030-SS0I-33CK-FD1D-8P6H6GTDWNVK-low.svg Figure 2-31 MSPM0G1507 Two-Shunt Current-Sensing Circuit