SPRUIK4A September   2018  – June 2019 TMS320F280021 , TMS320F280021-Q1 , TMS320F280023 , TMS320F280023-Q1 , TMS320F280023C , TMS320F280025 , TMS320F280025-Q1 , TMS320F280025C , TMS320F280025C-Q1 , TMS320F280040-Q1 , TMS320F280040C-Q1 , TMS320F280041 , TMS320F280041-Q1 , TMS320F280041C , TMS320F280041C-Q1 , TMS320F280045 , TMS320F280048-Q1 , TMS320F280048C-Q1 , TMS320F280049 , TMS320F280049-Q1 , TMS320F280049C , TMS320F280049C-Q1 , TMS320F28075 , TMS320F28075-Q1 , TMS320F28076 , TMS320F28374D , TMS320F28374S , TMS320F28375D , TMS320F28375S , TMS320F28375S-Q1 , TMS320F28376D , TMS320F28376S , TMS320F28377D , TMS320F28377D-Q1 , TMS320F28377S , TMS320F28377S-Q1 , TMS320F28378D , TMS320F28378S , TMS320F28379D , TMS320F28379D-Q1 , TMS320F28379S

 

  1.   C2000 Software Frequency Response Analyzer (SFRA) Library and Compensation Designer in SDK Framework
    1.     Trademarks
    2. 1 Introduction
    3. 2 Installing the SFRA Library
      1. 2.1 SFRA Library Package Contents
      2. 2.2 How to Install the SFRA Library
    4. 3 Module Summary
      1. 3.1 SFRA Library Function Summary
      2. 3.2 Principle of Operation
      3. 3.3 Per Unit Format
      4. 3.4 Floating Point (Singe Precision)
        1. 3.4.1 Object Definition
        2. 3.4.2 Module Interface Definition
        3. 3.4.3 Adding SFRA Library to the Project
        4. 3.4.4 Adding Support for SFRA GUI
      5. 3.5 Script for Importing Frequency Response and Designing Compensation
      6. 3.6 SFRA GUI Options and How to Run
    5. 4 Compensation Designer
      1. 4.1 Launching Compensation Designer
        1. 4.1.1 Standalone From SFRA GUI Folder
        2. 4.1.2 From Solution Adapter Page
      2. 4.2 Compensation Style and Number
    6. 5 Case Study
      1. 5.1 Plant TF Extraction
      2. 5.2 Designing Compensator Using Compensation Designer
      3. 5.3 OL Measurement
      4. 5.4 Comparing SFRA Measured Frequency Response Versus Modeled
    7. 6 Running Software Test Bench Example for SFRA
    8. 7 Using SFRA Without SFRA GUI Integration
    9. 8 FAQ
  2.   Revision History

FAQ

  • GUI will not connect
  • Make sure the SCI pins are configured to be used as SCI and the SCI module clock rate value provided to the SCI init routine is correct.

  • GUI will connect but start button does not become active
  • If your native language is not English (USA) and the above behavior is observed, try selecting the English (USA). To do this, go to “Region and Language” using search in the Start Button → select under Formats → English (USA) → Apply.

  • For measurable response, what is the maximum frequency SFRA?
  • Maximum frequency measurable is determined by the SFRA_ISR_FREQ and is milted by the nyquist criterion (half of the switching frequency or the frequency at which the SFRA routine is called).

  • What is the lowest amplitude signal measurable by SFRA?
  • SFRA uses the on-chip ADC whose noise floor for a 12-bit ADC is at approxmiately 60dB-70dB. Therefore, readings of the FRA below 60dB should be interpreted with caution as there may be significant noise elements.

  • Why does the SFRA sweep take so long?
    The time taken by the SFRA depends on two factors:
    • The ISR frequency in which the SFRA routine is called.
    • The rate at which the background task is called, therefore, it is expected that SFRA will run much quicker when used to measure the response of a 200 kHz power converter compared to a one running at 10 kHz-20 kHz.
  • How to make sure SFRA does not run in production code.
  • Unless the SFRA is started by writing a '1' to the 'start' variable in the SFRA object (the SFRA GUI also writes to this variabale to initiate a sweep when the start sweep button is clicked), the SFRA injection routine will not do anything to the reference value (inject/collect).

    If it is desired to completely remove the SFRA routines, the call to run the SFRA routines can be put under a #define and for release code that #define can be defined as something else or none. As shown below in a typical code, the SFRA may be needed on the voltage or the current and typically the software has a define for this. Hence, to remove the SFRA routines, it can be defined as SFRA_NONE, which will make sure SFRA routines are not compiled into the object.

    Also note that although the parameters to the collect routine are passed by reference, the parameters are not modified by the routine.

    //SFRA Options #define SFRA_NONE 0 #define SFRA_CURRENT 1 #define SFRA_VOLTAGE 2 #define SFRA_TYPE SFRA_NONE ...... #if SFRA_TYPE == SFRA_VOLTAGE gv_out=GV_RUN(&gv, SFRA_F32_inject(vBusRefSlewed), vBus_sensed); #else gv_out=GV_RUN(&gv, vBusRefSlewed,vBus_sensed); #endif #if SFRA_TYPE == SFRA_VOLTAGE SFRA_F32_collect(&gv_out,&vBus_sensedFiltered_notch2); #endif