Monday, October 27, 2014

Crystal Chamber PID Tuning

Since I'm trying to use a PID controller to keep the chamber temperatures under control I need to tune the PID parameters. And since this is designed to run for hours at a time, and because I'm crap at PID tuning, getting it right it is very tedious. Also presumably I'll need to tune it differently for different chamber loads. A liter of water is going to behave differently from a 50mL of solvent, so I figure I may need to retune it several times for different uses.

So I set it up to dump the parameters so I can visualize the process. Nothing fancy, just CSV out the serial port to a log file, then into Excel so I can see what's going on:


I've run half a dozen trials while I learn how to do PID tuning. That image is from part of the process where I'm looking for a good Kp that doesn't overshoot. After playing with it for a while I decided that I might as well get the rest of the hardware and software done, then play with the fine tuning later.

No comments: