Wednesday, May 11, 2016

Thermal Systems Part 2

This was week 2 of thermal systems on MATLAB
Last time we simulated a thermal system of a cup of coffee on a hotplate, this week we are working with a real life thermal system! By using: a heater (whose power we controled), a thermal reservoir (with a resistor in a brass casing aka a "heat sink"), and a temperature sensor/thermistor.

Deliverable 1. Calculate the physical constants: using "testthermal.m" (given) find the two parameters: thermal resistance Rth and heat capacity C.

According to our math, our theoretical time constant is a little higher than the true time constant, but this makes sense since we had to estimate when calculating the slope that was used to find C.

After we found the physical constants Rth and C we experientially measured the heating curve with these new thermal parameters.


Deliverable 2.We then modified our heat simulation from last week to fit our new thermal parameters

The simulation and the experimental are pretty similar even though they are scaled differently when we look at them closely the slopes are almost identical. The biggest difference is the the fact that the experimental graph does not start at an initial temperature of 0. The peak temperature for experimental is 335K and simulated is 327K which is a difference, but not significant enough to be too concerned.

Deliverable 3. We then started to experiment with different types of control, starting with bang bang we modified test.thermal.m to change the power supply based on whether the measure temperature is above or below the target temperature.

Table of peak temperature

Experimental Bang Bang
Simulated Bang Bang
The main difference between the simulated and the experimental bang bang is the extremity of the temperature change, which in part has to do with the scale and the long amount of time it takes to heat things up in real life. Both the simulated and the experimental show the temperature reaching the "peak" or "goal" temperature then bouncing back and forth, as expected with Bang Bang control.

Deliverable 4.Then we implemented a proportional controller for a target temperature of 340 K using Kp= 0.05, 0.2, and 0.5 W/K


Kp=0.05
Kp=0.2
Kp=0.5
Upon looking at the graphs we can tell that the system does not reach the control set point when Kp is small, which makes sense because of the nature of proportional control to correct more and more once it is close to the goal, but due to Kp being too small it never reaches goal, which means it cannot correct and will be stuck never reaching the control. In this specific example the increases are so small that it plateaus before it even reaches control.
Conversely when Kp is high it tends to overshoot the control quickly, but then it takes a while to find it's way back. Considering this knowledge and the graphs .2 seems to be the optimal gain for our system because it is a happy median between the small .05 and the large .5

Final MATLab thoughts!
This week's real life thermal systems was far more complicated than last week's simply because of the nature of real life systems, we sometimes forgot to wait long enough for it to fully cool down which lead to many inaccurate results that we thought was our code.

No comments:

Post a Comment