pypid.backend: Fix 'abmient' -> 'ambient' typo in get_ambient_pv docstring
[pypid.git] / README
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.
6
7 Module structure
8 ================
9
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.
15
16 Backends
17 --------
18
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.
26
27 Melcor
28 ~~~~~~
29
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`_ in favor of `their own thermal site`__, and
36 it looks like there is no longer support for the older MTCA
37 controllers.  There seem to be a number of them on eBay_ though ;).
38
39 __ `Laird announcement`_
40 __ wayback_
41 __ `Laird thermal`_
42
43 TestBackend
44 ~~~~~~~~~~~
45
46 To get a feel for driving a PID system, look atcheck out the
47 `TestBackend`, which simulates a standard first-order process with
48 dead time (FOPDT).
49
50 Installation
51 ============
52
53 Packages
54 --------
55
56 Gentoo
57 ~~~~~~
58
59 I've packaged `pypid` for Gentoo_.  You need layman_ and my `wtk
60 overlay`_.  Install with::
61
62     # emerge -av app-portage/layman
63     # layman --add wtk
64     # emerge -av dev-python/pypid
65
66 Dependencies
67 ------------
68
69 If you're installing by hand or packaging `pypid` for another
70 distribution, you'll need the following dependencies:
71
72 =========  =====================  ================  ==========================
73 Package    Purpose                Debian_           Gentoo_
74 =========  =====================  ================  ==========================
75 aubio_     Pitch detection        python-aubio      media-libs/aubio
76 nose_      testing                python-nose       dev-python/nose
77 NumPy_     Controller analysis    python-numpy      dev-python/numpy
78 pySerial_  serial comminication   python-serial     dev-python/pyserial
79 pymodbus_  Modbus stack           python-modbus     dev-python/twisted
80 SciPy_     Controller analysis    python-scipy      dev-python/scipy
81 =========  =====================  ================  ==========================
82
83 Actually, `pymodbus` may (depending on your packaging system) depend
84 on `pySerial`_ via Twisted_, so `pymodbus` alone may be enough to get
85 you going.
86
87 The Debian package for `pymodbus` has not been accepted yet.  `Debian
88 bug #578120`__ tracks the progress of the prospective package, but it
89 seems to have stalled out at the moment.
90
91 __ db578120_
92
93 Installing by hand
94 ------------------
95
96 Pypid is available as a Git_ repository::
97
98     $ git clone git://tremily.us/pypid.git
99
100 See the homepage_ for details.  To install the checkout, run the
101 standard::
102
103     $ python setup.py install
104
105 Usage
106 =====
107
108 See the examples in the `examples` directory.
109
110 Testing
111 =======
112
113 Run the test suite with::
114
115     $ nosetests --with-doctest --doctest-tests pypid
116
117 Note that you should have your temperature control device connected to
118 your computer before running this command, as backend tests require a
119 connected backend.
120
121 Licence
122 =======
123
124 This project is distributed under the `GNU General Public License
125 Version 3`_ or greater.
126
127 Author
128 ======
129
130 W. Trevor King
131 wking@tremily.us
132 Copyright 2008-2012
133
134
135 .. _PID: http://en.wikipedia.org/wiki/PID_controller
136 .. _Modbus: http://en.wikipedia.org/wiki/Modbus
137 .. _serial port: http://en.wikipedia.org/wiki/Serial_port
138 .. _Laird announcement: http://www.lairdtech.com/NewsItem.aspx?id=953
139 .. _wayback: http://web.archive.org/web/20090204201524/http://melcor.com/
140 .. _melcor.com: http://melcor.com
141 .. _Laird thermal: http://lairdtech.thomasnet.com/category/thermal-management-solutions/
142 .. _eBay: http://www.ebay.com/
143 .. _layman: http://layman.sourceforge.net/
144 .. _wtk overlay: http://blog.tremily.us/posts/Gentoo_overlay/
145 .. _Debian: http://www.debian.org/
146 .. _Gentoo: http://www.gentoo.org/
147 .. _aubio: http://aubio.org/
148 .. _NumPy: http://numpy.scipy.org/
149 .. _pymodbus: http://code.google.com/p/pymodbus/
150 .. _pySerial: http://pyserial.sourceforge.net/
151 .. _Twisted: http://twistedmatrix.com/trac/
152 .. _SciPy: http://www.scipy.org/
153 .. _db578120: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578120
154 .. _nose: http://somethingaboutorange.com/mrl/projects/nose/
155 .. _Git: http://git-scm.com/
156 .. _homepage: http://blog.tremily.us/posts/pypid/
157 .. _GNU General Public License Version 3: http://www.gnu.org/licenses/gpl.txt