r/ControlTheory • u/mahditr • 3d ago
Technical Question/Problem Digital controller for power supply
A long time ago I was involved in this project where I had to control a 2kW switching mode power supply in CC and CV modes. I designed a cascade control loop where the internal loop was CC and the external loop setting the reference for the internal one was the CV loop. Both signals were coming from voltage and current sensing at the output of the converter.
What I learnt was it is not so easy to tune these controllers as the gain of the system from Iout to Vout is directly depended on the load. It is not just a disturbance that can be resolved, the gain changes and accommodating gains from close to short circuit down to open circuit and covering the nominal range was very difficult.
I want to see if anyone has had similar experience of implementing digital controllers for power supplies and they can share how they dealt with these issues.
•
u/seekingsanity 3d ago
Have you looked at SMC, sliding mode control?
•
u/mahditr 1d ago
I learnt about it in my control courses but these controllers sometimes feel too exotic. Have you had experience implementing one on such plants?
•
u/seekingsanity 1d ago
Not on power supplies, but I have seen numerous articles of SMC used on power supplies. It basically becomes a switching power supply. I have only used SMC for motion control on a hydraulic system. It worked well but some modifications were required to avoid chattering. Unlike electrical circuits, mechanical things don't respond instantly so they chatter. I fixed this by using a tanh() function. After computing s, I used 100*tanh(gain*s) where 100 was the output range of +/- 100 % and gain is the gain around when s is at 0. This works well. I was researching making a hydraulic servo control that would be robust, cheap, and easy to implement for less sophisticated applications and environments. This simple SMC controller would not be a precise as our normal product but it would be more forgiving. We decided not to build the simple controller because it would probably undercut sales of our more sophisticated controller.
•
u/Jhonkanen 3d ago
I have done a lot of control design for power supplies and in most cases the load is not purely resistive, but some kind of constant current/power or combination of those. So first thing is to find the worst case scenario where it needs to work and test for multiple operation points.
The second trick is not to use duty ratios or other pwm values directly but have control calculate the voltage over inductor and then solving the duty which imposes the control voltage over the inductor. Since control is only producing voltage, the power supply is now essentially immune to variations of input and output voltage as those are usually measured anyway and hence can directly be applied to modulation.
If you are doing a boost type converter then use similar trick for solving the converter current. The current goes through a voltage level conversion so if you need to control the voltage of a boost converter, have the voltage loop calculate the current of the capacitor and then multiply this by the input and output voltage ratio. This way you are always solving for output current that is linear and the variation of the dynamics is again compensated by measuremenys. This does not remove the nonminimum phase behavior, but makes a wide range converter behave more predictably.
Third is to do proper modulation. This usually means adding the compensation of voltage drop due to deadtime and converter series resistances.
If you really need maximum performance, then a load current measurement/load current observer is really powerful. Additional oberservers can be used for improving the phase lags of measurements.
•
u/mahditr 1d ago
what do you do with the nonlinearity of the inductor cores? especially going from low H fields at lower currents to somehow saturated nominal current. I remember back in the time I was looking at my converter I ended up using iron powder cores like -26 -52. They would make sense physically but in general they are used like 30% into their slow saturation which changes the inductance
•
u/Jhonkanen 16h ago
Tune your system to worst case and check that it works with all inductance values you expect.
•
u/JessieAndEcho 3d ago
That load-dependent gain problem is very real. In practice I’d usually avoid trying to make one fixed digital compensator behave perfectly from near-short to open-circuit. Gain scheduling, separate CC/CV loop tuning, bandwidth separation between the inner current loop and outer voltage loop, anti-windup during mode transitions, and some form of load/operating-point detection all help. The CV loop especially needs to be conservative because the output impedance/load can make the plant look totally different across the range. I pulled some related references from Patsnap Eureka here: https://eureka.patsnap.com/share/?id=edf14ad01ebc5f431bca4bb2340c82b5&from=invite-eureakplg-result&content=