than applying the signal to a capacitor.
Figure 10 shows a typical integrator.
The switch (which can certainly be
electronic — like an FET) removes the
charge on the capacitor before the
integration function starts. Resistor R3
limits the current through the switch
during capacitor discharge and is
especially necessary for electronic
switches. As shown, the output of the
circuit will be the sum of the voltage
applied to the input times the length
of time applied, times 1/R1C. (R1 is
the resistor value in ohms and C is the
capacitor value in farads.) Use a
quality capacitor with low leakage
and low dielectric absorption. It is also important to keep
R1 and R2 the same so that the bias currents are the same.
Otherwise, the output can drift considerably, especially over
temperature. The circuit works best with high input resistance
op-amps (> teraohm). This circuit can also be characterized
as a low pass filter with a corner frequency of 0 Hz.
There are a couple of points to ponder. If the input
signal is removed or set to zero, the output voltage
remains unchanged. This makes sense when you stop to
think about it. Adding a lot of zeros to a sum doesn’t
change the sum. In order to reduce the output, a negative
voltage must be applied (and a negative power supply
should be used for the op-amp, as well).
A reverse or inverted integrator can be created by
applying the signal to the inverting input of the op-amp. In
this way, a positive input signal will decrease the output.
Note that the capacitor must be charged up for this to
work, so the switch has to be changed (or better, a signal
applied to the non-inverting input to charge the capacitor).
A differentiator is also fairly easy to implement in theory,
as shown in Figure 11A. However, there are problems.
This circuit can be characterized as a high pass filter with
the corner frequency at 0 Hz and a positive slope of 6 dB
per octave. As such, noise can be a significant problem
leading to instability (oscillation) and degraded performance.
For that reason, an added RC network (R3, C2) is used to
reduce the gain at high frequencies (see Figure 11B). The
output of the circuit is the input times R1C1 times d/dt.
An inverted function can be obtained by applying the
■ FIGURE 10. An integrator is easy to
implement. The switch is necessary
to remove the charge on the capacitor
(the resistor limits the discharge
current). An electronic switch such
as an FET can also be used.
signal to the inverting input resistor
and grounding the non-inverting
input (as with the integrator above).
Now that you know how to
sum, multiply, integrate, and
differentiate, you can combine
them into a PID (Proportional
Integral Derivative) controller. As you can see, it only takes a
few parts to create a very sophisticated analog calculator.
Analog PIDs can be very fast — as fast as the op-amps and
settling times of the capacitors. Often, this is much faster
than the µCs. Obviously, the big drawback with the
analog system is that it can’t be changed easily. Plus,
there is always the concern about component value drift,
especially over temperature. Nevertheless, analog PIDs
have been around for decades and can be very effective.
Previously, we examined multiplication of a value by a
constant but suppose you want to multiply two different
values together. This is very different. We’ll look at a
simple method that is easy to implement. There are
more precise and complex circuits that can be built with
op-amps, but it makes little sense to do so when you
can buy a chip that does it all very cheaply. Analog
multipliers/dividers are available for a few dollars. (For
example, Analog Devices AD633 costs $7.75 at Jameco.
Note that most commercial analog “multipliers” allow you
to square and take the square root of a value, too.)
There are three things to mention. The first is about
proper sign management. There are four possible
combinations of signs (or quadrants) when combining
two numbers: +X +Y, +X -Y, -X +Y, and -X -Y. The output
should provide the proper sign. Not all circuits perform
full “four quadrant” calculations. Often, this is not a circuit
necessity. Most often — but not
always — the magnitude of the
result is correct. The second issue
is that the terms multiplication
and division often seem to be
interchanged. This is because the
division by a number greater than
one can be represented by the
multiplication of a number less than
■ FIGURE 11A. A theoretical
differentiator uses only a resistor
and capacitor. A more practical
version (FIGURE 11B) uses an extra
resistor and capacitor for stability.