This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F280049: SFRA question

Part Number: TMS320F280049
Other Parts Discussed in Thread: SFRA, C2000WARE

Dear Manish or C2000 expert,

Current I’m testing the SFRA feature, and have some questions about it, can you please share some comments on it? 

1. Phase vs frequence graph from sweeping result, at frequency above 2Khz, has much difference with calculation result from compensation designer GUI. I changed to use 2p2z compensation loop in SFRA example (C:\ti\c2000\C2000Ware_DigitalPower_SDK_2_00_01_00\libraries\sfra\examples), and the structure shown as below, d and y are used as input for SFRA_collection function.

I found that, the magnitude result from sweeping is almost the same with calculation from compensation designer GUI, but the phase result above 2khz has much difference with expected calculation, can you please help me know why? And what is the max frequency for accurate frequency response if my control ISR is 100Khz?

2. The default injection amplitude in example project is 0.005, what’s the criteria of setting this amplitude?

3. I have done some tests on this feature, and set different value for Ref, and see the sweeping result is different, what’s possible reason of causing this? The closed loop structure is the same as question 1, and the only differece in below 2 results is the Ref difference.

4. For UART configuration, the RXRDY and TXRDY interrupt were set, but there is no PIE configuration for those 2 interrupt, why? Is it possible disable those 2 interrupt?

   SCI_enableInterrupt(sci_base, SCI_INT_RXRDY_BRKDT | SCI_INT_TXRDY);

  • Three more questions:

    5. matlab script file, read the data from excel sheet, it will read to 102th row, but there is only 101 rows in excel file, is it a typo?

    6. Regarding to use matlab to compare the Curve filtted vs measure result, there are much differences for the phase vs frequency, why?

    7. The application note says it's better to run SFRA in ram to habe the best performace, but the example project didn't run from RAM, what's specific purpose of example project?

  • 5. Yes please adjust it to be accurate to the no of rows you have in the excel. 

    6. MATLAB has a setting to enable phase wrapping, you may want to check with that enabled, 360=0degrees 

    7. The project is FLASH and we copy the SFRA routines to ramfuncs to enable faster execution. I am not sure what the discrepancy here is it aligns with the document. 

  • 1. In the configuration you have shown the SFRA will measure 2p2z * Td where Td is the digital delay which will affect the phase at high frequency, if your control /ISR rate is 100kHz you can observe the effect of this digital delay. Hence the effect you are seeing is expected. 

    2. Typically you need to add injection that the system can sustain and give good results, it is empirically determined. If the gain in the system is high typically a lower injection is enough, otherwise, a higher injection may be needed to improve SNR. However, a higher SNR can cause the system to vary significantly from the operation point and this is also not desirable. It needs to be adjusted empirically for each system , I have use INJ from 0.5% to 2% in typical systems.

    3. Seems to me something in SW is saturating when you inject during Ref 0.5, 

    4. We just use polling method in background for the SCI hence you do not see PIE setting for it.  I think you can disable this interrupt without any issue. 

  • Hi Manish,

    Thanks for your great support here.

    3. I have done some test on it, and call DCL_runDF22_C1 without clamp feature. And set injection amplitude to 0.002, 0.005, 0.008, and 0.02. The result is related with injection amplitude when set the Ref to 0.5. Please see below result. Here is my testing code.example1_stb_f28004x_f32_coff.zip

    7. From the SFRA example (C:\ti\c2000\C2000Ware_DigitalPower_SDK_2_00_01_00\libraries\sfra\examples), I see the SFRA_F32_inject and SFRA_F32_collect are located at FLASH instead of RAM, therefor those 2 functions are not run from ram, is it?

    Address and symbols in map file.

    0 00081d1c __SFRA_F32_collect
    0 00082029 __SFRA_F32_inject

  • Jack,

    the example is missing the following in the linker command file to place the sfra routines in RAM

    GROUP
       {
           .TI.ramfunc
           {
           -l sfra_f32_coff.lib
           }
           ramfuncs
    
       } LOAD = FLASH_BANK0_SEC6,

    With this you should get the correct placement, also note you may have to change the lib name slightly based on eabi, tmu etc.

  • After this you should see the below happen to the code

    .TI.ramfunc 
    *          0    00086000    000004b7     RUN ADDR = 0000c000
                      00086000    0000020e     sfra_f32_coff.lib : sfra_f32_background.obj (.text)
                      0008620e    000001bc                       : sfra_f32_config_reset.obj (.text)
                      000863ca    00000064                       : sfra_f32_collect.obj (.text)
                      0008642e    00000026                       : sfra_f32_inject.obj (.text)
                      00086454    00000020                       : sfra_f32_config_reset.obj (SFRA_F32_Data) [fill = 0]
                      00086474    0000003f     driverlib_coff.lib : flash.obj (.TI.ramfunc:_Flash_initModule)
                      000864b3    00000004                        : sysctl.obj (.TI.ramfunc)

  • Hi Manish,

    Thanks for your great support here. I think the 7th could be closed.

    How about the 3rd question? I set the Ref = 0.5, and use different injection amplitude, 0.002, 0.005, 0.008, 0.2, the sweeping result seems have differences. The result seems not very good when Ref = 0.5 with using 0.002 INJ, but Ref = 0.03 with 0.002 INJ is good. What cause the differences?

    Hope everything is fine with you and your family. Best wishes in current special situation.

  • Hi Manish,

    May I have further comments from yours for the 3rd question? Thanks...

  • Jack, 

    With injection increase you are improving the SNR of the SFRA measurement, That behavior is expected. However one cannot increase injection amplitude too much as well because that can cause operation outside the linear region. 

    -Manish