This is the circuit diagram that i made in matlab. I want in to design a controller for the it such that it works as a boost converter in one direction and buck in the other direction. But i don't know how to implement it.
1 Answer
\$\begingroup\$
\$\endgroup\$
At least you could simplify it:
simulate this circuit – Schematic created using CircuitLab
buck mode:
- M1 turns on for specified duty time with regard to stepping down ratio
- M2 synchronously switches on while M1 is off
- M2 also switches off if a back flow is detected with comparator CMP2
boost mode:
- M2 turns on for specified duty time with regard to stepping up ratio
- M1 synchronously switches on while M2 is off
- M1 also switches off if a back flow is detected with comparator CMP1
Code:
if (V1/10) * hyst > V2 then
do buck()
else if V2*10 * hyst > V1 then
do boost()
else
do nothing()
end_if