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.

CCS/SFRA: SFRA settings

Part Number: SFRA

Tool/software: Code Composer Studio

Hello! I am  trying  to implement SFRA in my design.

1. Unfortunately the design does not allow using so fast frequency of PWM. I only can use 100 KHz , and another part work on 50 KHz. . How should I change  coefficients like:

#define SFRA_FREQ_START 100
#define SFRA_FREQ_LENGTH 100
//SFRA step Multiply = 10^(1/No of steps per decade(40))
#define FREQ_STEP_MULTIPLY (float)1.059253
may be others .....

2. What for  "Inductor current feedback for buck stage"   ILFB-1  is using?
Only for visualisation? It seems it does not take part in calculations.

Thanks.

  • Michael,

    you need to select the frequencies you want to measure the frequency response at and also determine how long of a buffer you can accommodate in the code.

    The above #defines you have pointed to do just that,

    Please refer to the SFRA Library user guide section 3.4.3 step 2

    """

    Create and add module structure to {ProjectName}-Main.c for SFRA, which also defines the frequency
    at which the SFRA is called (SFRA_ISR_FREQ), starts the frequency of the SFRA analysis
    (SFRA_FREQ_START), the number of points in SFRA analysis (SFRA_FREQ_LENGTH) and the step
    size between individual points (SFREQ_STEP_MULTIPLY). The end frequency of the SFRA analysis
    is dependent on the start frequency, the length and the step size.
    ...
    #define SFRA_ISR_FREQ 200000
    #define SFRA_FREQ_START 100
    #define SFRA_FREQ_LENGTH 100
    //SFRA step Multiply = 10^(1/No of steps per decade(40))
    #define SFREQ_STEP_MULTIPLY (float)1.059253

    SFRA_IQ SFRA1;
    //extern to access tables in ROM


    """

    Your second question is too open ended for me to comment, can you provide more details.. 

  • Thank for answer.
    1. So these parametres do not depend on sample frequency only on demands of designer.
    2. I could never find tracks of ILFB-1 variable except in main.c . May be this variable is used in some *.lib modules, that is why I asked.
  • 1. SFRA_ISR_FREQUENCY cannot be greater than the control frequency i.e. the frequency at which control is executed or updated.
    other variables are upto the user to decide, i,.e. start frequency, step and injection amplitude

    2. I still cannot understand the ILFB-1 question, which code are you looking at? ILFB-1 is not part of the SFRA lib,
  • Yes, I named it wrongly. This one is part of SFRA project (DPSWrkShpKit_SFRA-Main.c ):

    // Current measurement calculated by:
    // Gui_Ifb = IfbAvg * K_Ifb, where IfbAvg = sum of 8 IfbR samples
    //BoxCar Averages - Input Raw samples into History arrays

    Hist_IL1[HistPtr] = IL1R; // Raw ADC result (Q12)

    temp_Scratch=0;
    for(i=0; i<HistorySize; i++) temp_Scratch = temp_Scratch + Hist_IL1[i]; // Q12 * 8 = Q15
    if (temp_Scratch > 1549) temp_Scratch = temp_Scratch - 1549; //offset adjust
    else temp_Scratch = 0;
    Gui_IL1 = ( (long) temp_Scratch * (long) K_IL1 ) >> 15; // (Q15 * Q15)>>15 = Q15

    I don't measure current in my own project for purpose of calculations of coefficients. Is it possible?
  • The full project implement a PCMC project for which inductor current is used,

    the code section you are pointing to is for visualization only.