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.

TMS320F280039C:TMS320F280039C

Part Number: TMS320F280039C

Tool/software:

I am currently working on a single-phase inverter, but I found that the Bode plot I ran in MATLAB is correct. However, after performing the Z-transform and implementing it in the MCU, it doesn't work. Additionally, my switching method is hybrid PWM. Could incorrect switching affect the circuit's functionality? Below is my program:

ei =  i_ref - i_feedbackcorrect;  
    ui_per = b0_i * ei + b1_i * ei1 + b2_i * ei2 - a1_i * ui1 - a2_i * ui2;

    ui_sat = ui_per;

    if (ui_per > UI_MAX)       ui_sat = UI_MAX;
    else if (ui_per < UI_MIN)  ui_sat = UI_MIN;

    awi = ui_sat - ui_per;
    ui1 += KAWI * awi;

    ui2 = ui1;
    ui1 = ui_sat;

    ei2 = ei1;
    ei1 = ei;
   
    ui = ui_sat;

//High frequency arm
    duty = fabsf(ui);                
    if (duty > 0.95f * 923)
    {
        duty = 0.95f * 923;
    }

    if(v_ref > 0)
    {

    EPwm1Regs.CMPA.bit.CMPA = duty;      

    }
    else if (v_ref < 0)
    {

    EPwm1Regs.CMPA.bit.CMPA = 923-duty;

    }
    else
    {

    EPwm1Regs.CMPA.bit.CMPA = 0;
    EPwm1Regs.CMPB.bit.CMPB = 0;
   
    }