(derivative). In general, these K constants
and PID output can range widely for a
variety of applications.

Ideal PID temperature control assumes
both a heating and cooling source (with the
same linear thermal forcing gain). This can
be difficult to achieve in practice due to
different heat/cool technologies. There are
many ways to go wrong. Even when
operating correctly, wild oscillations in
temperature are possible. However, with
careful attention, PID control can be
adapted to many applications.

Many commercial PID controllers claim
to autotune the Kp, Ki, Kd coefficients to
achieve optimal performance. I suspect
these methods are often empirical and apply only to a
narrow set of conditions. PID mathematics is very
complicated. Fortunately, there are practical manual
methods and online simulations to aid in setting these
important PID parameters.

For this controller, the PID proportional output uses
PWM on two digital output pins. PWM is easily enabled
in the Arduino environment and provides accurate eight-bit modulation. Often, PWM is used to create a (
time-averaged) variable DC voltage, but here the digital signal