For the second half of our thermal systems work in MATLAB, we got to test out our coffee simulation in real life with simple 50 ohm heater, a thermal reservoir, and a temperature sensor. After some initial setup of the MATLAB program, we are ready to begin.
Deliverable 1:
For the first deliverable, we were given a code to run and examine. By examining the graph the program produced of the rise in temperature of the heater and using a few equations we've learned about and used in part one, we were able to solve for the Rth(resistance) and C(capacitance) that would allow us to simulate a similar scenario.
By estimating the initial slope and using our handy dandy equations, we found values of 6.9 and 16.2 for Rth and C repectively. Given the equation to the right, we calculated a theoretical time constant of 112.1 s. At time 112.1 s, the temperature of the system was 338.6. K
The time constant is defined as the time the system takes to reach 63.2% of it's final value. So, in order to calculate the actual constant, we found the total temperature change and calculated 63.2% of that. Added that number to the original temperature of the system and we calculated a temperature of 333.4 K. This tells us that our theoretical time constant is a little bit larger than the actual time constant.
Deliverable 2:
When we recreated our simulation of the heating coffee and compared it to the more realistic scenario with the heater, we founded that both graphs were very similar. The graph from deliverable 1 is scaled a little differently, but when you zoom in closer it has a very similar curve to the one we find in deliverable 2. The most apparent difference is that the room temperature from our simulation does not match up with the actual initial temperature of the heater. We also found that while our simulated version gets a temperature of ~335, in our deliverable 1, we only managed to raise our temperature to ~327 K.
Deliverable 3:
|
Here's a close up of the section of temperature values at the plateau |
|
as we can see from the right side of the graph the bang bang is being implemented |
|
Our simulated bang bang graph |
Deliverable 4:
When the proportional gain is small, the system is unable to reach the control set point because it is increasing temperature at a such a small rate, the it reaches an asymptotic state long before the temperature can reach the goal of 340K. When the proportional gain is larger, the temperature rises very quickly in the beginning and plateaus. This suggests to us that the optimal gain is a Kp value around 0.2 in which the temperature more gradually reaches the goal of 340K.
|
Kp = 0.5 – reaches 340K really quickly |
|
Kp = 0.2 – gradually reaches 340K |
|
Kp = 0.05 – never reaches 340K |
Overall, we found that working with circuits on the MATLAB was pretty neat, but it was not without it's challenges. In comparison to the simulations, the actual heating took a lot more time to produce really similar results. Unlike in the simulations, every time we ran the program we had to wait for the heater to run for the time determined AND the time necessary for the mechanism to cool down. This was especially frustrating when in the midst of debugging. But, all in all, this was an interesting exercise in coding and the various methods of heating an object (bang bang v. proportional).
No comments:
Post a Comment