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.
Hello,
I've code which is a running well for buck converter with closed loop control. I use run_PI codes for feedback loop.
However, I'm trying to implement soft starting feature to my code. Because, I'm trying to improve my turn-on characteristic.
Could you please help me about this issue.
Is there any structure available to easily implement to my code in order to stepwise increase duty value to maximum preset value?
What would you offer to me?
Thank you.
gG,
A number of example solutions from the Digital Power SDK use software-injected slew to moderate the rate of change on the output voltage, which resembles stair stepping.
The TIDM-DC-DC-BUCK might be a good example to see.
-Tommy
Hello Tommy,
I investigated the code of Buck_VMC_F2837xS (BOOSTXL-BUCKCONV). The code is complicated for beginners. However, I catch the point that I need to increase the output set voltage step by step.
QUESTION 1. I think softstart issue is done at this section of code. If yes, could you please explain the code more? Is there any graphical or detailed explanation document for this code.
#if INCR_BUILD == 1 if (Duty1A_Set > (float)0.45) // Clamp Duty command to 0.45 (Q24) Duty1A_Set = 0.45; Duty1A_slew_temp = Duty1A_Set - Duty1ASetSlewed; if (Duty1A_slew_temp >= Duty1ASlewRate) // Positive Command { Duty1ASetSlewed = Duty1ASetSlewed + Duty1ASlewRate; } else { if ((-1)*(Duty1A_slew_temp) >= Duty1ASlewRate) // Negative Command { Duty1ASetSlewed = Duty1ASetSlewed - Duty1ASlewRate; } else Duty1ASetSlewed = Duty1A_Set; } #else // Vout1SlewRate should be set as a positive value Vout1_slew_temp = Vref1 - Vout1SetSlewed; if (Vout1_slew_temp >= Vout1SlewRate) // Positive Command { Vout1SetSlewed = Vout1SetSlewed + Vout1SlewRate; } else { if ((-1)*(Vout1_slew_temp) >= Vout1SlewRate) // Negative Command { Vout1SetSlewed = Vout1SetSlewed - Vout1SlewRate; } else Vout1SetSlewed = Vref1; } #endif
QUESTION 2.For my code, I think that increasing max duty limit step by step for PI C1 controller at every ISR is easier for me. Is there any drawback of this approach?
I set a counter for soft start implementation. Soft-start counter increases at each ISR that is designated for control loop calculations. Counter is matched at a maximum duty value e.g. 0.1 to 1 for 50~70 pwm pulses. Then, using "if" structure or "swich-case" structure codes i load it to the "pi_cur.Umax = max_duty"
I couldn't tried the code at my design. After learning you explain question 1, i will think of it too.
// //===================================== // LOOP 1 - SOFT START LOOP // if(PWMenable == 1 & FAULT_LOW1 == 1 & FAULT_UP1 == 1) { EPwm5Regs.TBPRD = period; // Turn-on switching by loading period //SOFT-START FEATURE if(softstart_counter == 0) { max_duty=0.1f; pi_cur.Umax = max_duty; } } // //===================================== // LOOP 2 - SOFT START LOOP // if(PWMenable == 1 & FAULT_LOW1 == 1 & FAULT_UP1 == 1) { EPwm5Regs.TBPRD = period; // Turn-on switching by loading period //SOFT-START FEATURE if(softstart_counter == 8) { max_duty=0.2f; pi_cur.Umax = max_duty; } } // //===================================== // LOOP 3 - SOFT START LOOP // if(PWMenable == 1 & FAULT_LOW1 == 1 & FAULT_UP1 == 1) { EPwm5Regs.TBPRD = period; // Turn-on switching by loading period //SOFT-START FEATURE if(softstart_counter == 16) { max_duty=0.3f; pi_cur.Umax = max_duty; } softstart_counter++; }
Hello,
The page 66 only shows the waveforms. Could you please help me on implementation about where to find and how to use it.
gG said:QUESTION 1. I think softstart issue is done at this section of code. If yes, could you please explain the code more? Is there any graphical or detailed explanation document for this code.
Yes, this is where the slew is implemented, where for INCR_BUILD != 1:
Vref1 = Output voltage demanded by user
Vout1SlewRate = Maximum allowed step-size
Vout1SetSlewed = Current step voltage targeted by the controller
Vout1_slew_temp = Difference between demanded voltage vs current step voltage
So incrementally step the target voltage of the controller until it matches the demanded voltage.
The TIDM-DC-DC-BUCK implementation for BOOSTXL-BUCKCONV from the Digital Power SDK might be a little easier to follow if you wish to see other reference versions.
gG said:QUESTION 2.For my code, I think that increasing max duty limit step by step for PI C1 controller at every ISR is easier for me. Is there any drawback of this approach?
There's nothing functionally wrong with doing this in your ISR, but it will deduct from the real-time servicing budget of the system. The slew rate is typically very slow compared to the switching rate so it would not be an optimal implementation.
Hello,
Thank you for help. I'm making progress. However, I have some questions as below.
Question 1) For the code that I inserted (boostxl-buckconv), we only implement "step by step increase duty" or only implement step by step "increase desired output voltage" and both of them isn't implemented at the same time. Is it correct?
Question 2) For the code that I inserted (boostxl-buckconv), I couldn't find how and where to use this step increased duty cycle. Yes, I find a code section. However, I couldn't find where they are implemented in order to have soft start for closed loop.
Question 3) If I don't want to implement soft start at ISR loop in order not to reduce real time proccess effort, so, where should I implement it. Should I do it at main infinite loop and how? Because there should be time calculations for limiting soft start duration. Because I dont use state machine sequencing. I just have a pwm triggered ISR loop and make my new duty calculations at that interval.
gG said:Question 1) For the code that I inserted (boostxl-buckconv), we only implement "step by step increase duty" or only implement step by step "increase desired output voltage" and both of them isn't implemented at the same time. Is it correct?
No, only one method is compiled based on the INCR_BUILD level.
gG said:Question 2) For the code that I inserted (boostxl-buckconv), I couldn't find how and where to use this step increased duty cycle. Yes, I find a code section. However, I couldn't find where they are implemented in order to have soft start for closed loop.
This is done as a periodic task in the background loop. The user guide explains this concept.
gG said:Question 3) If I don't want to implement soft start at ISR loop in order not to reduce real time proccess effort, so, where should I implement it. Should I do it at main infinite loop and how? Because there should be time calculations for limiting soft start duration. Because I dont use state machine sequencing. I just have a pwm triggered ISR loop and make my new duty calculations at that interval.
It is certainly acceptable to use a scheme that is similar to the referenced example.