Wednesday, May 8, 2013

Matlab 4, Thermal Systems 2 cont


4: Proportional Control
You should turn in your results, the main one being the graphical comparison of the simulation and experiment. Be sure to label your axis, provide units, and annotate your figures. Provide a short description of each figure so we what the data are. You should also include the MATLAB scripts that you used to create these figures, identifying the values of the heat capacity and thermal resistance that you deduced. Also make sure to answer the bulleted questions above.

Continuing from Wednesday, we implemented proportional control. Proportional control- as we learned in pico blocks- is much better at hitting a target value without over shooting. 
We added the following equations:
error = 340 - readtemp(s)

setpower (s, (K_p*error))

We then tested different values of gain

K_p = .5
T(200) = 325 - did not reach target temp. The gain is so small that it does not allow for the power value to be large enough to reach 340K. Also since K_p is so low it has a harder time overcoming the ambient temperature. If we had the program run longer, it would have reached the temperature



K_p= 5
T(200) = 338  - very close, it looks like it may have hit 340 and was cooling at this point. The temperature rose steadily and then the held the coffee around 340 pretty well.

K_p= 12
T(200) = 342 - here the gain starts to get too high. The temperature over-shot 340 (T(45) = 343) and then cooled back down but was not able to closely hold 340K since it was over correcting with the large gain

K_p=20
T(200)= 339.21 - this only .8 away from our target. It initially overshot [T(35)=344] before settling around 340. With the larger gain we can get much closer to our target but the large gain wouldn't allow it to settle as soon. 





Our perfect gain is somewhere between 5 and 12- we found that it was 8.



5. PI Control system using proportional and integral control


K_p= 8
K_i=2
T(200)=341.1

K_i=5
T(200)=340.48

K_i=10
T(200)=340.4


 With integral control implemented into our system, we are able to get to much closer to 340K. 

Next we blew on the plate and graphed power vs time in red. Since power is a percent, the red dots never go above 100. 

K_p=8
K_i=10
There is a slight dip in temp when we blow.


K_p=8
K_i=10
Here the dips are more visible. The power graph is curved showing that more power is being put in the system the lower the temperature gets. When the temperature is 340K or higher, power = 0.

K_p=4
K_i=5
Here we blew on it for a longer time so the power hits max. 



K_p=2
K_i=2


K_p=2
K_i=2



No comments:

Post a Comment