1 This package provides general PID_ control software in Python with a
2 Melcor MTCA backend. The idea is that experimentalists interested in
3 temperature controlled experiments or other processes should not need
4 to learn the inner workings of their PID controller before they can
5 perform simple control tasks.
10 This package provides both a high level controller that uses
11 per-device backend drivers. The controller handles auto-tuning the
12 PID feedback parameters and changing system temperatures, while the
13 backends communicate setpoint changes, temperature read requests,
14 etc. to the temperature control device.
19 The only physicsal backend that is supported at the moment is a Melcor
20 Series MTCA Thermoelectric Cooler Controller, which we communicate
21 with via Modbus_ packets over a `serial port`_. That's all I needed
22 for my experiments, but I tried to write a framework that was flexible
23 enough to swap in other backends. By subclassing `Backend` for your
24 particular device, you can take advantage of the high-level
25 `Controller` code that's already written.
30 Companies don't stay in business forever, but lab equipment does ;).
31 Our controller is still going strong since 1999, but Melcor has moved
32 around. According to their `2005 announcement`__ the Laird Group PLC
33 purchased Melcor from Fedders Corporation, and by 2009 (according to
34 the `Internet Archive Wayback Machine`__) they phased out the old
35 website at `melcor.com <http://melcor.com>`_ in favor of `their own
36 thermal site`__, and it looks like there is no longer support for the
37 older MTCA controllers. There seem to be a number of them on eBay_
40 __ `Laird announcement`_
47 To get a feel for driving a PID system, look atcheck out the
48 `TestBackend`, which simulates a standard first-order process with
60 I've packaged `pypid` for Gentoo_. You need layman_ and my `wtk
61 overlay`_. Install with::
63 # emerge -av app-portage/layman
65 # emerge -av dev-python/pypid
70 If you're installing by hand or packaging `pypid` for another
71 distribution, you'll need the following dependencies:
73 ========= ===================== ================ ==========================
74 Package Purpose Debian_ Gentoo_
75 ========= ===================== ================ ==========================
76 aubio_ Pitch detection python-aubio media-libs/aubio
77 nose_ testing python-nose dev-python/nose
78 NumPy_ Controller analysis python-numpy dev-python/numpy
79 pySerial_ serial comminication python-serial dev-python/pyserial
80 pymodbus_ Modbus stack python-modbus dev-python/twisted
81 SciPy_ Controller analysis python-scipy dev-python/scipy
82 ========= ===================== ================ ==========================
84 Actually, `pymodbus` may (depending on your packaging system) depend
85 on `pySerial`_ via Twisted_, so `pymodbus` alone may be enough to get
88 The Debian package for `pymodbus` has not been accepted yet. `Debian
89 bug #578120`__ tracks the progress of the prospective package, but it
90 seems to have stalled out at the moment.
97 Pypid is available as a Git_ repository::
99 $ git clone http://www.physics.drexel.edu/~wking/code/git/pypid.git
101 See the homepage_ for details. To install the checkout, run the
104 $ python setup.py install
109 See the examples in the `examples` directory.
114 Run the test suite with::
116 $ nosetests --with-doctest --doctest-tests pypid
118 Note that you should have your temperature control device connected to
119 your computer before running this command, as backend tests require a
125 This project is distributed under the `GNU General Public License
126 Version 3`_ or greater.
136 .. _PID: http://en.wikipedia.org/wiki/PID_controller
137 .. _Modbus: http://en.wikipedia.org/wiki/Modbus
138 .. _serial port: http://en.wikipedia.org/wiki/Serial_port
139 .. _Matplotlib: http://matplotlib.sourceforge.net/
140 .. _Laird announcement: http://www.lairdtech.com/NewsItem.aspx?id=953
141 .. _wayback: http://web.archive.org/web/20090204201524/http://melcor.com/
142 .. _Laird thermal: http://lairdtech.thomasnet.com/category/thermal-management-solutions/
143 .. _eBay: http://www.ebay.com/
144 .. _layman: http://layman.sourceforge.net/
146 http://www.physics.drexel.edu/~wking/unfolding-disasters/posts/Gentoo_overlay
147 .. _Debian: http://www.debian.org/
148 .. _Gentoo: http://www.gentoo.org/
149 .. _aubio: http://aubio.org/
150 .. _NumPy: http://numpy.scipy.org/
151 .. _pymodbus: http://code.google.com/p/pymodbus/
152 .. _pySerial: http://pyserial.sourceforge.net/
153 .. _Twisted: http://twistedmatrix.com/trac/
154 .. _SciPy: http://www.scipy.org/
155 .. _db578120: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578120
156 .. _nose: http://somethingaboutorange.com/mrl/projects/nose/
157 .. _Git: http://git-scm.com/
159 http://www.physics.drexel.edu/~wking/unfolding-disasters/posts/pypid/
160 .. _GNU General Public License Version 3: http://www.gnu.org/licenses/gpl.txt