If one is to make a battery charger, lets say a Li-Ion battery charger (using a micro-controller with buck converter), is it necessary to do some kind of control implementation inside the micro-controller for e.g P , PI , PID ?
Like generally we would be measuring the voltage and current being fed to the battery, and try to keep the current constant (by adjusting PWM duty cycle being fed to the buck converter) for the first phase of charging. After that when a certain Voltage is reached, we would try to maintain that voltage by reducing the current, until a current value is reached where charging has to be terminated.
But my MAIN QUESTION is that, is it necessary always to implement some kind of control technique (P,PI or PID) in our micro-controller to adjust this value of voltage and current being fed to the battery (by adjusting the PWM cycle off course) ? If yes why ? and if not then why not ?
P.S i searched online and came to find out mostly people have implemented PID control in micro-controllers for running motors. I couldn't find much regarding this with respect to battery charging. I was thinking that may be its because the response time of the system (time to implement the current/voltage change needed) is very small in case of motors operation as that compared to battery charging. Am i right ?
Thankyou !