Bang–bang control

For example, if it is desired for a car starting at rest to arrive at a certain position ahead of the car in the shortest possible time, the solution is to apply maximum acceleration until the unique switching point, and then apply maximum braking to come to rest exactly at the desired position.

A closed-loop household example is most thermostats, wherein the heating element or air conditioning compressor is either running or not, depending upon whether the measured temperature is above or below the setpoint.

Mathematically or within a computing context there may be no problems, but the physical realization of bang–bang control systems gives rise to several complications.

First, depending on the width of the hysteresis gap and inertia in the process, there will be an oscillating error signal around the desired set point value (e.g., temperature), often saw-tooth shaped.

Alternatively, a narrow hysteresis gap will lead to frequent on/off switching, which is often undesirable (e.g. an electrically ignited gas heater).

A water heater that maintains desired temperature by turning the applied power on and off (as opposed to continuously varying electrical voltage or current ) based on temperature feedback is an example application of bang–bang control. Although the applied power switches from one discrete state to another, the water temperature will remain relatively constant due to the slow nature of temperature changes in materials. Hence, the regulated temperature is like a sliding mode of the variable structure system setup by the bang–bang controller.
Symbol for a bang–bang control