I help to build hydroelectric plant control systems for one of my customers and we use PID controllers to control the gates that let the water into the generators (which controls the power output of the generator). Tuning these controllers is always a pain in the neck, and unfortunately any given tuning applies to a relatively narrow band of opeation. Temperature changes, load level, wear and aging and, I swear, the phase of the moon, affect the unit's response dramatically. We've thought about trying to build an adaptive controller of some sort. This controller would analyze the response of the unit to the control signals we send it, and then adjust the algorithm to result in smoother control (ie: quick response without overshoot). One possibility would be to dynamically create a function of all the appropriate variables (temperature, load, phase of moon, etc.) to modify the PID loops constants. This function would be refined over time (days, months, years). Alternately, and the technique that I feel has the best chance of working, we can simply watch the unit over a midrange timer interval (perhaps an hour or so), and adjust the algorithm based on 'recent' behavior. One additional issue with these controllers is that 'overcontrol' is a very bad thing because you cause the mechanics of the gates to wear quickly. Its not like we're just changing a PWM input into a motor. The controller actually generates pulses that operate hydraulic valves that move a huge cylinder that slews the gates around. Does anybody have any good references/sources for such an adaptive system? Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics