Electronic – What type of controller is this

convertermicrocontrollerpower

In many simple microcontroller power controller applications, I see controllers that work in an "increment/decrement" on error with hysteresis implemented e.g.

if(targetvoltage<errorvoltage) PWM_Output++;
else if(targetvoltage>(errorvoltage+hysteresis)) PWM_Output--;
SetPWMOutput(PWM_Output);

It seems to be somewhere between a bang bang controller and a PI controller (error is integrated kind of and stored in PWM_Output, P scaling is most likely done by the transistor driver) but its not quite either. What kind of controller would this be?

Obviously its not a particularly fast controller but it seems to work OK for some of the applications I've tried.

Best Answer

I don't know of any particular name for this kind of controller.

The advantages of a fixed-slope system are great simplicity and inherent stability in most cases. As long as the output has settled a good way to the new steady steady state each loop iteration, the system will be stable and it won't overshoot. The drawback is that response is slow compared to more sophisticated control methods using the same plant.

The hysteresis prevents the system from "hunting" around the setpoint and avoids constant small tweaks.

This kind of controller is useful when the thing being controlled and the input signal are largely intended to be fixed. The controller is then compensating for variations due to temperature, wear, and the like, not actively trying to put a specific "signal" on the output.

Note that this system is NOT a integrator. A real integrator adds a fraction of the offset (desired - actual) to the control signal each iteration. This system adds a constant regardless of how far off the output is from the desired level.