Hi Donovan: I Recall your previous posting. Sorry you had to pass, but glad you now have more time for next year. > My question: how do I tune a PID algorithm? There were some positive > response to this question last time I asked and some people that were > willing to help me learn the 'art' of PID algorithms. Difinitely involves some 'feel' if not artistic nature. > I have been reading about PID in depth from textbooks and on the web, > but am starting to feel more and more like tuning it is an > art and not a > science. In addition, there is some fundamental questions I > have that I > can not find answers for. > > Right now I am trying to tune a PID algorithm to allow our AUV to dive > and keep a constant operating depth. My first problem is > that I want to > have an operating depth of X meters and I know my current depth. To > move the AUV I have to set the voltage of the vertical > thruster. How do > I relate the input to the plant (the desired depth) to the > output of the > plant (the motor voltage)? Since, as I recall, your vehicle is neutrally buoyant and will be used in a fairly narrow range of depth, you will have to decide how complex of a control system you want to implement. On the simple side, you could simply decide how long to turn the thruster on in the down direction in order to descend a desired amount. Conventional control techniques call for you to design for a 50% output in order to maintain the set point. Obviously this won't work for you. Also In this situation, since you do not have an unequal force opposing the direction of travel once motion stops, you will not have to manage true hysteresis (as long as neutral buoyancy is maintained.) This would suggest a simple proportional controller. PID is excellent for controlling a process with hysteresis and disturbances. Since for all practical purposes you will only be dealing with changes and disturbances, you could likely use such a simpler method. Remember that you will always have SOME process oscillation. You will need to determine how much depth oscillation is acceptable in order to design this control system. Since your depth command is in effect a setpoint, an integrator, or integral function will help you get there faster, since it will integrate the new deviation error into the equation. Hence, the greater the deviation, the greater the output. A derivative function can also eliminate some of the lag time in response. I don't know if I would use PID in this instance. You could do something with depth sensing (standard pressure sensors will measure to within a few cm) then implement a process that checks current depth, compares it to the set point depth, and based on the difference starts and increases the thruster output in proportion. I would think that you simply drive the thruster motor according to a voltage speed curve and assume it will output correctly. In your simple algorithm, slow or stop the thruster based on the measured rate of ascent or descent. Since you can actually stop this on a dime by reversing the thruster, it can self correct. Sonce it will always be used in a like environment with like conditions and available power, there may be no reason to work out a full PID solution. Think about off-the-shelf process controllers that use PID. They have to work in myriads of application types in order to sell. Hence, adjustable PID is a must. Your application has some rather fixed parameters, so why bother. In the time you could spend figuring out one performance curve, you could be finished. Next, tell me that PID is a project REQUIREMENT, and I will shut up... Gotta go for now - If you include a derivative function All examples I have found assume > there is a > magical sensor that changes the output of the plant to the > same units as > the input. -- 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