Cool Engineering

Info on some cool engineering projects

Friday, February 16, 2007

Hysteresis

Hysteresis is a term used to describe (in electronic control systems at least) the control descison being dependent on past history, accounting for a reaction time to changes induced by the controlled equipment. An example in point is a temperature controller I'm currently planning out. It is to be to ensure electronic equipment is kept reasonably cool - using a fan driven by a microprocessor which uses a small IC temperature sensor to determine when the fan needs to be run and when it can be turned off.

A simple way to do this would be as follows (shown in pseudo code):


if (temp > 40) then
   fan = ON;
else
   fan = OFF;
end if;

Though this would work and is very simple it had a rather undesirable affect. That being that the temperature will tend to oscillated around the 40 mark with the fan continually being turned on and off. The alternative accounting for hysteresis would look something like this:

fan = OFF;

while(1){
   if (temp > 40) then
      fan = ON;
   else
      if (temp < 35) then
         fan = OFF;
      end if;
   end if;
}

In this example the fan won't turn on until the temperature reaches 40, but won't turn back off again until it drops below 35. This dampens oscillations and recognises the non-instantaneous nature of the temperature with reference to changes in airflow.

It should be noted that this is a very simple control algorithm, but should provide reasonable operation. More sophisticated algorithms such as the PID's used in my UAV project allow much better control allowing varying rates of change (rather than simply off and on).

Part of the reason this project has come about is that our DVD player recently overheated, causing several electrolytic capacitors to explode. The area where the new DVD will be is still fairly hot, particularly during Australian summers (which often get up to 40degress C). Hopefully soon I'll have some schematics up - the target device at this stage will be a PIC 16F88 (the one with the inbuilt ADC).


0 Comments:

Post a Comment

<< Home