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

Adding SFRA Functionality

Texas Instruments' software frequency response analyzer (SFRA) library is designed to enable frequency response analysis on power converters using software only and without the need for an external frequency response analyzer. The optimized library can be used in high frequency power conversion applications to identify the plant, the closed loop and the open loop gain characteristics of a closed loop power converter, which can be used to get stability information such as gain margin, phase margin and open loop gain crossover frequency, to evaluate the control loop performance.

Consider a digitally controlled closed loop power converter, as shown in Figure 4-37, where:

  • H is the transfer function of the plant that needs to be controlled
  • G is the digital compensator
  • GH is referred to as the open loop transfer function
  • CL is referred to as the closed loop transfer function and is GH/(1+GH)
  • r is the instantaneous set point or the reference of the converter
  • Ref is the DC set point reference
  • y the analog-to-digital converter (ADC) feedback
  • e the instantaneous error
  • d the sensor noise and disturbance
  • u the PWM duty cycle
The key objectives of the compensator in a closed loop system can be summarized as:
  • Make sure that the system is stable (for example, the system tracks the reference asymptotically)
    Equation 64. e = lim t   e t = lim t r 1 + G H 0
  • System provides disturbance rejection to maintain robust operation
    Equation 65. S = y d = 1 1 + G H 0
TIDM-02018 Digitally
                    Controlled Power Converter Figure 4-37 Digitally Controlled Power Converter

Whether or not the system meets the objectives can be determined by knowing the open loop transfer function (GH), as shown in Equation 64 and Equation 65.

A Bode plot of the open loop transfer function GH is frequently used for this purpose and quantities such as gain margin (GM), phase margin (PM) and open loop gain crossover frequency (Folg_cf) are often used to comment on the stability and robustness of a closed loop power converter.

The closed loop transfer function (GH/(1+GH)) provides an idea of the tracking that is how good the system is able to track to the reference commanded.

The SFRA library can enable measurements of the GH, GH/(1+GH) and H frequency response by software. This data can be used to:

  • Verify the plant model (H) or extract the plant model (H)
  • Design a compensator (G) for the closed loop plant
  • Verify the close loop performance of the system by plotting the open loop (GH) or Closed Loop [GH÷(1+GH)] Bode diagram

As the frequency response of GH and H carry information of the plant, the data can be used to comment on the health of the power stage by periodically measuring the frequency response.

The SFRA library is based on sinusoidal injection principle, where the assumption is that the injection amplitude causes very small deviation to the normal operating point of the converter. The SFRA library can be integrated into the control code of the power converter, this document details the steps to do so. All computations for the GH, H and CL calculations are done on the MCU and the entire arrays of the GH, H and CL magnitude and phase response are stored on the controller.

Once integrated into the code, the SFRA library can be used to design or fine tune the controller. For this, a typical flow of using SFRA library is:

  1. Initiate a SFRA sweep in open loop and store the data in an excel file. This information can then be used to identify the plant model for the steady state operating point at which the SFRA sweep has been conducted.
  2. The MATLAB® script provided with this project can be used to read that data into MATLAB and then curve fit the response to a transfer function. Sisotool can then be used to design the compensator.
  3. New compensator values can be copied from the MATLAB into the Code Composer Studio™ project.
  4. Compile and load the code with new coefficients into the microcontroller controlling the power stage. SFRA algorithm (Step 1) can be re-run to verify the closed loop system performance by measuring the open loop gain GH (also referred to as loop gain in literature).

In summary, TI’s software frequency response analyzer provides a methodology to tune power converters in a systematic way and enables quick and easy frequency response analysis for power converters without the need of external connections and equipment. Since no external connections are used, the SFRA can be run repeatedly to periodically assess the health of the power converter and get diagnostic information.