PDA

View Full Version : Boost converter (sepic)



lerameur
- 31st December 2014, 04:10
Hello,

Anyone has an algorithm for a sepic boost converter in picbasic ?
I have written a function that increments by one the duty cycle, but after further testing it is not a fats way to reach the necessary output. I have a voltage check on the output only (12v) and the duty cycle varies according to the output .
here is the code I have:

VoltageCheck:
ADCON0.2 = 1 'Start Conversion

adcin 4,VoltageInput

If voltageInput < voltageREF then ' voltageREF is 75 for 12v dc
VoltageDiff = VoltageREF - VoltageInput '=150+(150-115)=185
DutyCycle = voltageREF + ( voltageREF - VoltageDiff)
DutyCycle = DutyCycle/255 *100
HPWM 1,DutyCycle,Frequency 'channel, dutycycle, frequency
pause 20
ENDIF

If voltageInput = voltageREF then
HPWM 1,DutyCycle,Frequency 'channel, dutycycle, frequency
pause 20
else
VoltageDiff = VoltageInput - VoltageREF '=127-(182-127)
DutyCycle = voltageREF - ( VoltageDiff - voltageREF )
DutyCycle = DutyCycle/255 *100
HPWM 1,DutyCycle,Frequency 'channel, dutycycle, frequency
pause 20
endif

return

there must be better ways to accomplish this
regards,
K

Ioannis
- 31st December 2014, 17:37
I suppose what you did produces a small oscillation at the output.

I had a similar implementation with that result.

So I thought that PID routine made by Henrik could help me but had never managed to properly adjust the P-I-D settings:

http://www.picbasic.co.uk/forum/showthread.php?t=5874

Maybe you are in luck making it work for you.

Ioannis