TIDUF67 April   2024  – December 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 Highlighted Products
      1. 2.2.1 AM263x Microcontrollers
        1. 2.2.1.1 TMDSCNCD263
        2. 2.2.1.2 LP-AM263
  9. 3System Design Theory
    1. 3.1 Three-Phase PMSM Drive
      1. 3.1.1 Mathematical Model and FOC Structure of PMSM
      2. 3.1.2 Field Oriented Control of PM Synchronous Motor
        1. 3.1.2.1 The (a, b) → (α, β) Clarke Transformation
        2. 3.1.2.2 The (α, β) → (d, q) Park Transformation
        3. 3.1.2.3 The Basic Scheme of FOC for AC Motor
        4. 3.1.2.4 Rotor Flux Position
      3. 3.1.3 Sensorless Control of PM Synchronous Motor
        1. 3.1.3.1 Enhanced Sliding Mode Observer With Phase Locked Loop
          1. 3.1.3.1.1 Design of ESMO for PMSM
          2. 3.1.3.1.2 Rotor Position and Speed Estimation with PLL
      4. 3.1.4 Hardware Prerequisites for Motor Drive
      5. 3.1.5 Additional Control Features
        1. 3.1.5.1 Field Weakening (FW) and Maximum Torque Per Ampere (MTPA) Control
        2. 3.1.5.2 Flying Start
  10. 4Hardware, Software, Testing Requirements, and Test Results
    1. 4.1 Hardware Requirements
    2. 4.2 Software Requirements
      1. 4.2.1 Importing and Configuring Project
      2. 4.2.2 Project Structure
      3. 4.2.3 Lab Software Overview
    3. 4.3 Test Setup
      1. 4.3.1 LP-AM263 Setup
      2. 4.3.2 BOOSTXL-3PHGANINV Setup
      3. 4.3.3 TMDSCNCD263 Setup
      4. 4.3.4 TMDSADAP180TO100 Setup
      5. 4.3.5 TMDSHVMTRINSPIN Setup
    4. 4.4 Test Results
      1. 4.4.1 Level 1 Incremental Build
        1. 4.4.1.1 Build and Load Project
        2. 4.4.1.2 Setup Debug Environment Windows
        3. 4.4.1.3 Run the Code
      2. 4.4.2 Level 2 Incremental Build
        1. 4.4.2.1 Build and Load Project
        2. 4.4.2.2 Setup Debug Environment Windows
        3. 4.4.2.3 Run the Code
      3. 4.4.3 Level 3 Incremental Build
        1. 4.4.3.1 Build and Load Project
        2. 4.4.3.2 Setup Debug Environment Windows
        3. 4.4.3.3 Run the Code
      4. 4.4.4 Level 4 Incremental Build
        1. 4.4.4.1 Build and Load Project
        2. 4.4.4.2 Setup Debug Environment Windows
        3. 4.4.4.3 Run the Code
    5. 4.5 Adding Additional Functionality to Motor Control Project
      1. 4.5.1 Using DATALOG Function
      2. 4.5.2 Using PWMDAC Function
      3. 4.5.3 Adding CAN Functionality
      4. 4.5.4 Adding SFRA Functionality
        1. 4.5.4.1 Principle of Operation
        2. 4.5.4.2 Object Definition
        3. 4.5.4.3 Module Interface Definition
        4. 4.5.4.4 Using SFRA
    6. 4.6 Building a Custom Board
      1. 4.6.1 Building a New Custom Board
        1. 4.6.1.1 Hardware Setup
        2. 4.6.1.2 Migrating Reference Code to a Custom Board
          1. 4.6.1.2.1 Setting Hardware Board Parameters
          2. 4.6.1.2.2 Modifying Motor Control Parameters
          3. 4.6.1.2.3 Changing Pin Assignment
          4. 4.6.1.2.4 Configuring the PWM Module
          5. 4.6.1.2.5 Configuring the ADC Module
          6. 4.6.1.2.6 Configuring the CMPSS Module
  11. 5General Texas Instruments High Voltage Evaluation (TI HV EVM) User Safety Guidelines
  12. 6Design and Documentation Support
    1. 6.1 Design Files
      1. 6.1.1 Schematics
      2. 6.1.2 BOM
      3. 6.1.3 PCB Layout Recommendations
        1. 6.1.3.1 Layout Prints
    2. 6.2 Tools and Software
    3. 6.3 Documentation Support
    4. 6.4 Support Resources
    5. 6.5 Trademarks
  13. 7About the Author

Using SFRA

Use the following steps to integrate the SFRA in the project:

  1. To enable the SFRA functionality, the predefine symbol SFRA_ENABLE must be added in the project properties as shown in Figure 4-2.
  2. To start an SFRA sweep, put the SFRA object in the watch window.
  3. Write SFRA_OBJ.start to 1, when you want the SFRA sweep to start as shown in Figure 4-39.
    TIDM-02018 Start SFRA
                            Functionality Figure 4-39 Start SFRA Functionality
  4. Monitor the SFRA_OBJ.FreqIndex variable; the variable gradually increments as SFRA sweep is performed.
  5. Once the SFRA_OBJ.FreqIndex reaches Vec_Length, the SFRA sweep is complete.
    TIDM-02018 SFRA Data
                            Arrays Figure 4-40 SFRA Data Arrays
  6. As part of the SFRA initialization, the Open Loop and Plant Magnitude and phase are stored in arrays called.
    __attribute__ ((section(".sfradata"))) float32_t plantMagVect[SFRA_FREQ_LENGTH];
    __attribute__ ((section(".sfradata"))) float32_t plantPhaseVect[SFRA_FREQ_LENGTH];
    __attribute__ ((section(".sfradata"))) float32_t olMagVect[SFRA_FREQ_LENGTH];
    __attribute__ ((section(".sfradata"))) float32_t olPhaseVect[SFRA_FREQ_LENGTH];
    __attribute__ ((section(".sfradata"))) float32_t freqVect[SFRA_FREQ_LENGTH];
  7. Put these in the watch window to inspect and study the response.
  8. Once the sweep is complete, click on View-> MemoryBrowser inside CCS.
  9. Inside Memory Browser, enter &freqVect to see the frequency vector and select 32-bit floating point,
    TIDM-02018 Memory Browser View of
                            Stored SFRA Vectors Figure 4-41 Memory Browser View of Stored SFRA Vectors
  10. Click on save memory, shown encircled in Figure 4-41.
  11. A pop-up window appears. Select TI data and specify the file name *.dat in the location you prefer.
    TIDM-02018 Save Memory Pop-Up
                            Window Figure 4-42 Save Memory Pop-Up Window
  12. Click on Next and specify the address from the memory browser for the start of the array and then the length.
  13. Make sure 32-bit floating point is selected. Click Finish.
    TIDM-02018 Save Memory
                            Options Figure 4-43 Save Memory Options
  14. This saves the data in *.dat file.
  15. Repeat this step for plantMagVect, plantPhaseVect, olMagVect, olPhaseVect, so you have 5 *.dat files.
  16. If you want to use this data in MATLAB or other tools, the data can be populated to an excel file.
  17. Open the SFRA.xlsx file located at <project directory>\libraries\SFRA\scripts in excel.
  18. You can choose to re-name and save the file.
  19. This excel sheet has five columns, in the first column is the frequency data.
  20. Open the *dat file that was saved.
    TIDM-02018 Selecting Data From
                            .dat File to Put in the Excel Figure 4-44 Selecting Data From .dat File to Put in the Excel
  21. Select the data from the second line onwards to the end of the file and do Ctrl+C to copy the data.
  22. Open the Excel File, go to the first element under the corresponding vector and do Ctrl+V to copy the array.
    TIDM-02018 SFRA Data Copied in
                            Excel File Figure 4-45 SFRA Data Copied in Excel File
  23. Repeat the steps for each column.
  24. Once the excel file is updated for all five columns, use the MATLAB script to import the SFRA data. Then, use the script inside sisotool to design compensator and carry out stability analysis.