Electronics/Analog multipliers

From Wikibooks, open books for an open world
< Electronics
Jump to: navigation, search

Analog multipliers[edit]

An analog multiplier is a circuit with an output that is proportional to the product of two inputs:

v_{out} = K v_1 \cdot v_2

where K is a constant value whose dimension is the inverse of a voltage. In general we might expect that the two inputs can be both positive or negative, and so can be the output. Anyway, most of the implementations work only if both inputs are strictly positive: this is not such a limit because we can shift the input and the output in order to have a core working only with positive signals but external interfaces working with any polarity (within certain limits according to the particular configuration).

Two possible implementations will be shown. Both will be using operational amplifiers, but the first one will use diodes to get the needed relationships, the second one MOSFET transistors.

Diode Implementations[edit]

As known, using operational amplifiers and diodes it's quite easy to obtain the logarithm and the exponential of a certain input. Remembering the property of logarithms:

\log (a \cdot b) = \log a + \log b

we can multiply two signals first calculating their logarithm, then summing them and finally calculating the exponential of such a sum. From the point of view of mathematics, such an approach works as long as the two inputs are positive, because the logarithm of a negative number does not exist (in the real domain). We'll see that this limit is valid for the actual circuit as well, even if the reason will be more "physical". The block diagram of this implementation is the following:

Analog multiplier diagram.svg

If we simply append the circuits for logarithm, sum and exponential we get the following configuration:

Analog multiplier incomplete.svg

for a quick overview on the behavior of the circuit, we'll assume that all the resistors R have the same value. It is obviously possible to use different values to get different results, but we will not consider it here. Let us use the following notation for the relationship between current and voltage on a diode:

i = I_s \left( e^{\frac{v}{V_T}} - 1 \right)

where V_T \simeq 0.6 V is the threshold voltage and Is is the current flowing through the diode if it's inverse-polarized. If we analyze the circuit without introducing any approximation we get:

v_a = - \left[ - V_T \ln \left( \frac{v_1}{R I_s} + 1 \right) - V_T \ln \left( \frac{v_2}{R I_s} + 1 \right) \right] =
V_T \ln \left[ \left( \frac{v_1}{R I_s} + 1 \right) \left( \frac{v_2}{R I_s} + 1 \right) \right]

so the final output is:

v_b = - R I_s  \left( e^{\frac{v_a}{V_T}} - 1 \right) = - \frac{v_1 \cdot v_2}{R I_s} - (v_1 + v_2)

as it is clear, in the output there is the multiplication we were looking for, but there is another term we don't want. It can't be simply considered an error because it might be as great as the multiplication element, so it has to be removed. Anyway this is an easy task, since it is necessary only to add another stage to sum exactly v_1 + v_2, so we will have no error. The complete multiplier circuit is the following:

Analog multiplier full.svg

where the output voltage is given by:

v_{out} = - \left( - \frac{v_1 \cdot v_2}{R I_s} - (v_1 + v_2) + (v_1 + v_2) \right) = \frac{v_1 \cdot v_2}{R I_s}

that's exactly what we wanted. The circuit works as long as the following relationship is verified:

v_1 , v_2 > - R I_s

so the inputs can be zero or sightly negative but, since  R I_s will be a small voltage, we are allowed to rewrite the relation simply as v_1 , v_2 \geq 0. From the mathematical point of view this is due to the fact that we can't calculate the logarithm of a negative number, from a physical point of view the limit is due to the fact that we can obtain only very small currents (almost zero) inverse-polarizing the diodes.

In practical applications, the diodes are replaced with BJTs connected so to work like a diode.

MOS implementation[edit]

Analog multiplier mos basic.svg

Since it is possible to use a MOSFET transistor as a voltage controlled resistor, we can use this feature to create an analog multiplier. Let us refer to picture on the right. With the letter we indicate the different pins: Drain, Source and Gate. MOS are symmetrical devices, so we could replace the drain with the source without affecting the behavior of the device. Anyway we'll call source the lowest voltage pin and drain the point with the highest voltage. When the voltage between gate and source is less than the voltage between drain and source, i.e. V_{GS} < V_{DS}, the relationship between current and voltage is the following:

I_{DS} = K [2 (V_{GS} - V_T) V_{DS} - V_{DS}^2] \simeq 2 K (V_{GS} - V_T) V_{DS}; \qquad V_{GS} < V_{DS}

assuming we can always use this relationship, the analog multiplier configuration is the following:

Analog multiplier mos.svg

where source and drain of both devices are pointed out. If v_2 and V_{ref} are positive, then the sources will remain there because that points are virtually connected to ground by the operational amplifiers. The current flowing through R_1 is defined: one side of the resistor has the voltage v_1, the other one is grounded. That same current will flow through the MOS M_1, thus defining the voltage V_G. The current is given by:

\frac{v_1}{R_1} = - I_{DS1} = - 2 K (V_{GS1} - V_{T1}) V_{DS1}

but V_{GS1} = V_G and V_{DS1} = V_{ref}. replacing and calculating we get:

V_G = V_{T1} - \frac{v_1}{2 K R_1 V_{ref}}

considering the other MOS M_2 we have:

\; I_{DS2} = 2 K (V_{GS2} - V_{T2}) V_{DS2}

where V_{GS2} = V_G and V_{DS2} = v_2. Replacing we get:

I_{DS2} = - \frac{v_1 v_2}{R_1 V_{ref}}

from which we finally get the output voltage:

v_{out} = \frac{R_2}{R_1} \frac{v_1 v_2}{V_{ref}}; \qquad V_{ref}, v_1, v_2 > 0

and this is what we wanted. The difference between the previous configurations are:

  • the MOS implementation is simpler and requires fewer devices
  • in the calculations for the diode configuration we did not introduce any approximation, while the MOS configuration we did.

In other words, the diode implementation is more complicated but it works fine for a wider range on inputs.