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.

SFRA: Magnitude and Phase values switch to +Inf

Other Parts Discussed in Thread: SFRA, CONTROLSUITE

Hi,


I've implemented the SFRA Open Loop with CLA according to the SPRUHZ5A.

In ISR:

	//Add SFRA injection into the duty cycle for the open loop converter
	Duty_pu = SFRA_F_INJECT(Duty_pu_DC);

	// Call CLA1Task2
	Cla1ForceTask2andWait();

	// Collect Data
	SFRA_F_COLLECT(&Duty_pu, &Vout1_Read);

On Task 2:

        ...
	// Read 16Bit ADC and computer Fbk Value
	Vout1_Read = (((float32)AdcaResultRegs.ADCRESULT0) / ((float32)65536.0));
        ...
// Set phase shift value (PWM) EPwm5Regs.TBPHS.bit.TBPHS = Duty_pu; ...

//----

Problem:

After starting the SFRA_GUI.exe or set the SFRA1.start bit to 1 the magnitude and phase values in the SFRA1 struct switch to {+inf}.

The Duty_pu value doesn't change.

Is there something wrong with the way I use the arguments of the function SFRA_F_COLLECT(&Duty_pu, &Vout1_Read) ?

Duty_pu and Vout1_Read are float32 and in the Cla1Data1 section.

All the code is running out of RAM.

The controlSuite is up to date.

Thank you for your help!

  • Basterix the SFRA works in PU format,

    Hence once you create the Duty_pu variable it needs to be multiplied to the TBPRD for the duty?

    EPwm5Regs.CMPA.bit.CMPA = (uint16_t)(Duty_pu *(float) EPwm5Regs.TBPRD);

    Next,

    I see you are updating the TBPHS register, so you are doing phase control not duty control ???


    regards
    Manish
  • Dear Manish,

    yes I'm using the PSFB in HRPWM - so I do some calculation with the Duty_pu before writing the TBPHS register...
    If I change the Duty_pu_DC value, the PWM generation works fine.

    The problem appears after start the SFRA and calling the SFRA_F_COLLECT(&Duty_pu, &Vout1_Read); in the moment when SFRA1.state is turning into state 5.
    As shown in the picture above the Magnitude and Phase Vector values change to {+inf}.

    Do you have any Idea? If you need, I could provide you some more information.

    Thanks a lot,
    Basterix

  • Basterix,

    I need to inform you we have not tested SFRA with PSFB, it have been tested on Buck, Boost, LLC, Inverter (current and voltage mode), flyback, sepic etc,

    1. When you start the injection process , do you see Duty_pu change ???

    2. Are all the variables in CPU and CLA accessible memory and correct permissions granted to those memory blocks using the MemCfg Registers ???

    I am assuming this is F28379 device?

    One reason i can think of the divide by zero is the the C28x does not have access to the Vout Value and does a sum zero for it.. and divide by zero is giving infinity.

    with 1. you can at least verify if the injection is working correctly?
  • Manish,

    I moved the SFRA struct into an other memory block.
    The inject and collect function seam to work fine so far.
    Thank you.