Figure 1. Experimentally measured heat curve. (K/s)
In order to properly model this thermal system, we needed to find Rth and C of our system. To do this, we measured the temperature of the system (using test_thermal.m) as we applied power over a five minutes, producing the heat curve in Figure 1. Then, solving for Rth & C...
Rth = (∆Tf/P) = (Teq - Tair)/P
Knowing that P = 6.5W
Tair = 303.72K
Teq = 426.56K
so Rth = 19 K/W
C = (P/initial slope)
Pt 1 = (10,308.8), P2 = (33,336.2)
Initial Slope = 1.187
C = 5.5 J/K
Now, plugging these new values for Rth & C into heatsim.m and running the simulation...
Figure 2. heatsim.m with new values of Rth & C. (K/s)
To compare Figure 2. to Figure 1., we will study the trend within the temperatures of focus aka room temperature (303K) and higher. From there, it looks like Figure 1. is a part of Figure 2. - the curves look very similar once Figure 2. passes room temperature. The highest temperature that both the simulation and the actual system get to is the same - approximately 426K. It seems like the value that we calculated model this system pretty well!
Now, to create a bang-bang control temperature controller for the actual system...
Figure 3. Bang bang temperature control program.
Figure 4. Graph of a bang bang temperature control. (K/s)
In our graph, we can clearly see the difference between the simulation and actual system. The temperature of the system oscillates, due to when the power is on/off, which is based on just whether the actual temperature of the system is above the desired temperature - 340K.
Now, implementing proportional control...
Figure 5. testthermal_prop.m Proportional Temperature Controller
Figure 6. Graph of Proportional Control (K/s) (Gain =2.7)
Now, for our final program, we implemented integral control.
Figure 7. Integral Control Program
To do this, we simply added another term to be accounted for in the error calculations- the integral error. You can see here that the frequency and the amplitude of the fluctuations in comparison to our proportional control graphs are both reduced- that is, the system gets closer, and stays closer to our target temperature of 340K. After testing out a few gains, we found that a good gain for our system was 0.35, after testing values that ranged from 0.2 to 0.5. We also adjusted our proportional gain to be 2, which slightly less than our "ideal" value of 2.7 in the proportional-control only program, since integral error will be added to and thus help "boost" the error correction.
Figure 8. Integral Control Graph 1. (K/s)
Figure 9. Integral Control Graph 2. Blowing on the system. (K/s)
In this final graph, we blew gently on the system a few times over short intervals; the fluctuations are due to the cooling/heating up of the system. This graph shows that the system adapts pretty well: despite all the fluctations, it stays pretty close to 340K!
No comments:
Post a Comment