Starting Point
While the example application required complexity to test all parts of the kernel, the target application had to fit the time limitations of the project. For that purpose, an espresso machine controller was chosen. It requires little domain-specific knowledge to understand the problem.
the figure shows a diagram of an espresso machine with a thermostat. The boiler heats the water and keeps it at a constant temperature. When the brew switch is flipped, cold water is pumped from the water reservoir into the boiler. That creates pressure on the water in boiler, which is pushed into the group head and through the coffee puck. Most home espresso machines are built using electromechanical components only, reducing cost and complexity.
Figure: Overview of an espresso machine with thermostat.
The main task of an espresso machine is to provide the user with water at a given temperature, typically 92..96°C. Some machines use PID control to achieve constant water temperature, but most machines use a bang-bang controller in the form of a thermostat. The latter for example turns the heater on when the temperature is below 90°C and turns off above 95°C. Thermostats are inexpensive, but the water temperature can vary depending on the hysteresis of the thermostat. The espresso machine used for the example application is a Rancilio Sivlia, which uses a thermostat. The temperature swing in the figure shows that the brew water reaches temperatures above 115°C and below 88°C, which affect the quality of the espresso notably.
Figure: Water temperature inside the boiler of the Rancilio Silvia espresso machine.