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

Tuning Vibration Compensation

The automatic vibration compensation function can optionally be called in the motor drive ISR to calculate feedforward torque current. Add the predefined symbol MOTOR1_VIBCOMPA in the compiler settings of the project as described in Section 3.2.2.1 to enable vibration compensation.

Add the variables motorVars_M1.vibCompAlpha, motorVars_M1.vibCompGain, and motorVars_M1.vibCompIndexDelta to Expressions window in CCS Debug perspective, and tuning these parameters to achieve the expectation performance for the vibration compensation according to the compressor and air-conditioner system.

  • motorVars_M1.vibCompAlpha is used as the learning speed. The higher this value (with a maximum of 1.0) the slowest it learns the algorithm. A high value is desirable though, since it provides noise immunity.
  • motorVars_M1.vibCompIndexDelta is to advance the output waveform into the future by a little bit so that the resulting current will be very close to the desired value by the time the mechanical angle reaches that point. A typical value of 10 is recommended, but ultimately needs to be fine-tuned by the user.
  • motorVars_M1.vibCompGain is the gain factor of the feedforward torque reference torque current value (with a maximum of 1.0).

Change speed reference (motorVars_M1.speedRef_Hz) and speed controller gains (motorSetVars_M1.Kp_spd and motorSetVars_M1.Ki_spd). This step is used to take the motor and load to where the motor vibrates due to the pulsating load. For vibration compensation to work better, increase the values of the speed controller gains. Make sure the speed controller is still stable though.

Adding the predefined symbol SPEED_MONITOR_EN in build configuration of the project for enabling the motor running speed vibration. Now enable the vibration compensation output by setting this flag, motorVars_M1.vibCompFlagEnable = 1. Then let it run for a 5 to 10 seconds, and then get the new speed variation by setting this bit: motorVars_M1.flagClearRecord = 1. Record that the speed variation is about 2Hz.

If the vibration was not reduced, try increasing the speed controller gains. Also try increasing the learning speed of the vibration compensation algorithm by decreasing the value of motorVars_M1.vibCompAlpha in decrements of 0.02, so try: 0.99, 0.97, 0.95, etc. each time you change motorVars_M1.vibCompAlpha, let it run for a few seconds and get a reading of the speed variation by resetting that calculation: motorVars_M1.flagClearRecord = 1.

After tuned and fixed these variables value, record the watch window values with the newly defined parameters in user_mtr1.h file.

  • USER_MOTOR1_VIBCOMPA_ALPHA = motorVars_M1.vibCompAlpha's value, the learning rate of the vibration compensation module from 0.0 to 1.0
  • USER_MOTOR1_VIBCOMPA_GAIN = motorVars_M1.vibCompGain's value, the gain of the vibration compensation module from 0.0 to 1.0
  • USER_MOTOR1_VIBCOMPA_INDEX_DELTA = motorVars_M1.vibCompIndexDelta's value, the phase advance of the vibration compensation module from 0 to 360

Controlling motor current based on compressor torque vs angle is an alternate technique to counter the speed ripple variations. Adding the predefined symbol MOTOR1_VIBCOMPT in the compiler settings of the project to enable this vibration compensation method.

Depending upon the rolling piston angle, an additional torque current component can be either added or subtracted from the speed PI controller output. The current needs to be added during compression stage and subtracted during exhaustion (where it aids the movement of piston leading to increase in speed) and its magnitude can be computed empirically to match the torque profile of the compressor. Algorithm has split the 360 mechanical deg into 3 sector and compensation current can be added separately through variables motorVars_M1.vibCompAlpha0, 120 and 240. With rough tuning of the compensation, the speed ripple is reduced from 200Hz to under 100Hz @ 1200rpm. Further reduction in speed ripple is possible, when tuning matches the torque profile to the closest. Usually vibration compensation is enabled for compressor speeds between 1200 - 2000rpm (100Hz), post which its impact tends to be smaller.