Monday, April 8, 2013

Heating and Cooling a Resistor: Part 2

On Friday we continued our exploration of the resistor heating.

Deliverable 4: Proportional Control

Simulated proportional control
Proportional control

Proportional gain = 15, simulation in red, actual results in blue


  • If the gain is too low, the temperature will never reach the target because there will be a point where the power given to the resistor (error*gain) is equal to the amount of power being lost through cooling, causing the temperature, and the power level, to become constant, but the system will not reach the target. 
  • If the gain is high, the temperature of the resistor can overshoot the target and oscillate until it stabilizes. 
  • The ideal gain seems to be between 5 and 15 W/K, since the final temperature can get up to 304.8 without overshooting and oscillating first. 

Deliverable 5: Proportional and Integral Control


Simulated PI Control
PI Control with plot of desired (not actual) power
Simulated (pink) and actual (red) use of  proportional gain of 5 and integral gain of 1
After writing our script for PI control, we had a long process of optimizing the gain. At first, we set the proportional gain to 5 and the integral gain to 1. We attributed the dip in the graph to a gust of wind or similar. We then tried doubling the proportional gain to 10.
Simulated (pink) and actual (red) use of  proportional gain of 10 and integral gain of 1
Strangely, the system took much longer to heat up, even though the gain was larger. We added power to the graph to see if we could see what the problem was. At first, we were graphing the percent power output, by setting values over 100 to equal 100 and those under 0 to equal 0. However, we just got a straight line at 100. At first, we thought it was an error in the way we were graphing, but we soon realized that the batteries might be failing, causing the resistor to heat so slowly that the integral gain was huge and the power was always over 100. To fix this, we changed our target temperature from 305 to the more attainable 280, and made our integral gain 100 times smaller.

Power (black), temperature (red) and target temperature (blue) for proportional gain 10 and integral gain .01
The peaks in the above graph are from blowing on the resistor. We decided our proportional gain was too big, since the power, even when we were not blowing on the resistor, was jumping up and down from 0 to 100 because the gain was too large to stabilize the power at a constant level that would maintain the target temperature. We then reduced the proportional gain to 5.

Power (black), temperature (red) and target temperature (blue) for proportional gain 5 and integral gain .01
Reducing the proportional gain allowed the resistor to stay at a more constant setting when it was not being blown on. However, the response was still pretty slow, as can be seen in the middle peak of the above graph. We decided that our batteries were simply not strong enough to have a quick response at T=280, since setting the power to 100 still produced a slow response. Therefore, we reduced the target again, to 260.
Power (black), temperature (red) and target temperature (blue) for proportional gain 5 and integral gain .01, target 260
When the target was set to an attainable temperature, we got good results even in fairly strong "wind." The desired power did not have to go above 200 because the system could respond more quickly to changes.





No comments:

Post a Comment