I am designing buck-boost converter with Maximum Power Point Tracker. The idea is to build feedback loop that regulates input voltage by changing output current. Output will be connected to Li-Ion battery. Constant voltage output and MCU driven MPPT algorithm will be implemented in the future, the main objective now is to build constant INPUT voltage converter.
I am doing simulations in LTspice but all designs that I try are unstable. I attach one of the designs which after some fluctuations starts to regulate input voltage but there are only few degrees of phase margin.
Could someone suggest the right feedback loop design that would be more stable than that? Would it be enough just to add Type III compensation network instead of Type I or maybe there is completely smarter way to do the feedback loop?
In the end, after designing stable input voltage regulation loop, the idea is to multiply input voltage and current with MCU and with perturb and observe method find the MPP. MCU will regulate input voltage by changing resistance in digital potentiometer which will be connected instead of bottom resistor in voltage divider of the feedback loop.