Complex systems
The classic application before the industrial revolution was the control of waterways to drive water mills for processing grain or powering machinery. Complex systems of reservoirs and dams were constructed to store and release water (and the potential energy it contained) when required.