A modular PID control library.
This package provides general PID control software in Python with a Melcor MTCA backend. The idea is that experimentalists interested in temperature controlled experiments or other processes should not need to learn the inner workings of their PID controller before they can perform simple control tasks.
This package provides both a high level controller that uses per-device backend drivers. The controller handles auto-tuning the PID feedback parameters and changing system temperatures, while the backends communicate setpoint changes, temperature read requests, etc. to the temperature control device.
The only physicsal backend that is supported at the moment is a Melcor Series MTCA Thermoelectric Cooler Controller, which we communicate with via Modbus packets over a serial port. That’s all I needed for my experiments, but I tried to write a framework that was flexible enough to swap in other backends. By subclassing Backend for your particular device, you can take advantage of the high-level Controller code that’s already written.
Companies don’t stay in business forever, but lab equipment does ;). Our controller is still going strong since 1999, but Melcor has moved around. According to their 2005 announcement the Laird Group PLC purchased Melcor from Fedders Corporation, and by 2009 (according to the Internet Archive Wayback Machine) they phased out the old website at melcor.com in favor of their own thermal site, and it looks like there is no longer support for the older MTCA controllers. There seem to be a number of them on eBay though ;).
To get a feel for driving a PID system, look atcheck out the TestBackend, which simulates a standard first-order process with dead time (FOPDT).
# emerge -av app-portage/layman # layman --add wtk # emerge -av dev-python/pypid
If you’re installing by hand or packaging pypid for another distribution, you’ll need the following dependencies:
The Debian package for pymodbus has not been accepted yet. Debian bug #578120 tracks the progress of the prospective package, but it seems to have stalled out at the moment.
See the examples in the examples directory.
Run the test suite with:
$ nosetests --with-doctest --doctest-tests pypid
Note that you should have your temperature control device connected to your computer before running this command, as backend tests require a connected backend.
This project is distributed under the GNU General Public License Version 3 or greater.