controlling the temperature of coffee with a heater. (bang-bang control)
Here, I modified the heatsim.m code a little bit in order to have the program always pick up any changes in the coffee temperature over the defined period of time. To do this, I made the ambient temperature and the initial temperature manual inputs, and added a variable to represent the desired temperature, as well as different values for power- basically power on or power off. Then, I added an if, then statement, telling the program what P value to use according to the current temperature of the coffee.
Using ambient temp = 293, current = 400, and desired = 340, the program produced a graph like this:
We can see the line is very wobbly/jerky, which is concurrent with bangbang control.
No comments:
Post a Comment