Last week we worked on several MATLAB simulations of a thermistor heating curve, and also wrote programs to control and measure the heating of a real-life thermistor. After a fair amount of annoyance at MATLAB's technical difficulties, we worked through the exercises:
Deliverable 1: A blog post (or section of a post) containing a MATLAB figure such as the one below, showing your experimentally measured heating curve along with a derivation of the thermal parameters that you have deduced from the figure. You should also document your time constant, and how the expected time for the system to respond, based on that time constant, matches the actual time.
The experimentally-measured heating curve:

We knew P = 6.5 W, and the initial slope of the graph was about 30, so Rth=23. tau = the time it took to reach 63% of maximum value; looking from the graph, this seemed to be about 107 s. Since tau = Rth*C, and Rth=23, C = 4.64.
Our time constant was approximately 107 s. The expected time for the system to respond was about 200 s based on tau=107 s, which was pretty close to the actual value.
Deliverable 2: A modified heatsim.m program, which generates a simulated heating curve. Comment on the ways in which the results of the simulation agree and/or disagree with the experimentally measured results.
In general, the heatsim program was very similar to the experimentally-measured heating curve; however, the experimental heating curve displayed random minor fluctuations which were absent from the heatsim program, and soon after reaching its maximum value the experimental heating curve decreased. We suspect that this last difference was the result of the batteries reaching their maximum output and the total power supplied by the batteries subsequently decreasing as they were used up. Random fluctuations were probably the result of irregular air currents in the room.
Deliverable 3: Implement a bang-bang controller in MATLAB with a target temperature of 340 K. How does the behavior of bang-bang control in actual thermal system compare to the simulation you did last time? (You’ll need to insert the correct values of the thermal parameters into your simulation.) Include the answer to this last question as a comment at the beginning of the MATLAB script you submit.
The bang-bang controller:
Since our initial temperature was apparently 330 Kelvin (we had a strange temperature scale which we decided to call "Kelvin" in quotes, since it was logically impossible for the resistor to be that hot when it was cool to the touch), we modified the final temperature to be 380 "Kelvin".
Deliverable 4: You should turn in your results, the main one being the graphical comparison of the simulation and experiment. Be sure to label your axes, provide units, and annotate your figures. Provide a short description of each figure so we know 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.
• Can you explain why the system does not reach the control set point when the proportional gain is small?
If the gain is small, when the error becomes tiny the power becomes infinitesimal, so the power does not turn on in areas of small error (i.e., when temperature is within 3 degrees of the target).
If the gain is small, when the error becomes tiny the power becomes infinitesimal, so the power does not turn on in areas of small error (i.e., when temperature is within 3 degrees of the target).
• How does the system behave when the proportional gain is high?
When proportional gain is high, the system quickly heats up, but then fluctuates more about the final value, which is slightly closer but still less than the target.
When proportional gain is high, the system quickly heats up, but then fluctuates more about the final value, which is slightly closer but still less than the target.
• What seems to be the “optimal” gain setting for your system?
A gain of 3.67 works well to heat quickly and minimize oscillations at the end, although its final value is still less than the target.
Heat capacity = 4.64, thermal resistivity = 23 for all figures.
The simulation:

A gain of 3.67 works well to heat quickly and minimize oscillations at the end, although its final value is still less than the target.
Heat capacity = 4.64, thermal resistivity = 23 for all figures.
The simulation:

The proportional control experimental data with optimized gain:

Experimental data, gain = 0.5:

Experimental data, gain = 0.25:

Experimental data, gain = 1:
Deliverable 5:
• Your final MATLAB script that controls the temperature of the system. Make sure to add lots of comments explaining what your program is doing.
• Relevant experimental data, in the form of well-labeled graphs, from your constant temperature hot-wire anemometer experiments. Your graphs should make a compelling case for how well (or perhaps not well) your hot-wire anemometer is working.
• Your simulation of a PI controller and a comparison to the experimental data.

Power supplied by the thermistor, experimental data:
PI Experimental Data:
PI program:

Power supplied by the thermistor, experimental data:
PI Experimental Data (blowing on the resistor):
Hooray, the program responds quickly to a decrease in temperature!
PI simulation:
As was previously the case, the simulation did not display random fluctuations in temperature as the real data did, because the simulation occurs in an ideal world with no varying air currents. Also, by eliminating the delay between the computer and thermistor-controlling chip, the simulation had a smoother graph than the real data.





No comments:
Post a Comment