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).