What does hysteresis mean and how does it apply to computer science or programming?

I was looking at some code and saw an out of context comment about 'hysteresis.' I think I have figured out what the code does so my question doesn't involve anything specific. I simply do not understand what the term means or how it is applicable in programming. I looked around and saw some mathmatic definitions but would like some more information. From what I can tell Hysteresis has something to do with predicting or assuming a given state for X based on what has happened to X in the past?


Hysteresis characterizes a system whose behavior (output) does not only depend on its input at time t, but also on its past behavior, on the path it has followed.

A well-known device that exhibits hysteresis is a thermostat. Imagine a thermostat that would switch on and off heating at 70°F. When temperature is around 70°F, while fluctuating a bit, the thermostat would continually switch heating on and off. Generally, a thermostat is built with hysteresis: it will switch on heating at (say) 69°F, but switch off heating at 71°F. This avoids the continual switches.

EDIT: have a look at Wikipedia's article.


Thermostat example:

heatPointLow = 8°C
heatPointHeight = 10°C
heater = off

while(true){
    if(temperature < heatPointLow)
        heater = on
    if(temperature > heatPointHeight)   
        heater = off
}

If there where just one point the system coul'd oscillate around that single point. Between the points height and low it depends on the last value of the heater if it is on or off.


Google was my friend:

The principle in general refers to the behavior of any system's change, based on previous states. Thus you can model hysteresis with a state machine diagram or a graph.

In user interface design it refers to the practice of making a user interface lag behind user input events or other events. Clicking a button might not immediately display a details window; instead an animation is started which gradually changes the user interface.

I think of those "Device Driver Configured" bubbles in Windows 7's task bar as exhibiting hysteresis: the bubble appears in response to a completion event from the OS, and begins to fade away. A mouse-over event from the user will reset that timer, giving the user time to click on the bubble for details about the event; it delays the fading animation even if the mouse events are thereafter outside the region of the bubble.

链接地址: http://www.djcxy.com/p/22898.html

上一篇: 什么是“表达问题”?

下一篇: 滞后是什么意思,它是如何应用于计算机科学或编程?