Log amplifier

A log amplifier, also known as logarithmic amplifier or logarithm amplifier or log amp, is an amplifier for which the output voltage Vout is K times the natural log of the input voltage Vin. This can be expressed as,


 * $$V_\text{out} = K \ln\left(\frac{V_\text{in}}{V_\text{ref}}\right)$$

where Vref is the normalization constant in volts and K is the scale factor.

The log amplifier gives an output voltage which is proportional to the logarithm of the applied input voltage. To design a log amplifier circuit, high performance op-amps like LM1458, LM771, LM714 are commonly used and a compensated log amplifier may include more than one. In some situations, especially in RF domain, monolithic log amplifiers are also used to reduce number of components and space used, as well improve bandwidth and noise performance.

The log amplifier's operation can be inverted by an exponentiator, such as an op-amp configured for exponential output.

Log amplifier applications
Log amplifiers are used in many ways, such as:
 * To perform mathematical operations like multiplication, division and exponentiation. Multiplication is also sometimes called mixing. This is similar to operation of a slide rule, and is used in analog computers, audio synthesis methods, and some measurement instruments (i.e. power as multiplication of current and voltage).
 * To calculate the dB value of a given quantity.
 * As a True RMS converter.
 * Extending dynamic range of other circuits, like automatic gain control of transmit power in RF circuits, or analog-to-digital converters.

Drawbacks of basic log amplifier configuration
The reverse saturation current for the diode doubles for every ten degree Celsius rise in temperature. Similarly the emitter saturation current varies significantly from one transistor to another and also with temperature. Hence, it is very difficult to set the reference voltage for the circuit.

Basic op-amp diode circuit


The relationship between the input voltage $$V_\text{in}$$ and the output voltage $$V_\text{out}$$ is given by:


 * $$V_{\text{out}} = -V_\text{T} \ln \left(\frac{V_\text{in}}{I_\text{S} \, R} \right)$$

where $$I_\text{S}$$ and $$V_\text{T}$$ are the saturation current and the thermal voltage of the diode respectively.

The dynamic range of this basic op-amp diode circuit is limited to 40-60 dB because of non-ideal diode characteristics, but the dynamic range can be increased to over 120 dB by replacing the diode with a transistor in a "transdiode" configuration.

Transdiode configuration
A necessary condition for successful operation of a log amplifier is that the input voltage, Vin, is always positive. This may be ensured by using a rectifier and filter to condition the input signal before applying it to the log amplifier's input. As Vin is positive, Vout is obliged to be negative (since the op amp is in the inverting configuration) and is large enough to forward bias the emitter-base junction of the BJT keeping it in the active mode of operation. Now,


 * $$\begin{align}

V_\text{BE} &= -V_\text{out} \\ I_\text{C} &= I_\text{S}\left(e^\frac{V_\text{BE}}{V_\text{T}} - 1\right) \approx I_\text{S} e^\frac{V_\text{BE}}{V_\text{T}} \\ \Rightarrow V_\text{BE} &= V_\text{T} \ln\left(\frac{I_\text{C}}{I_\text{S}}\right) \end{align}$$

where $$I_\text{S}\,$$ is the saturation current of the emitter-base diode and $$V_\text{T}\,$$ is the thermal voltage. Due to the virtual ground at the op amp differential input,
 * $$I_\text{C} = \frac{V_\text{in}}{R}$$, and
 * $$V_\text{out} = -V_\text{T} \ln \left(\frac{V_\text{in}}{I_\text{S} R}\right)$$

The output voltage is expressed as the natural log of the input voltage. Both the saturation current $$I_\text{S}\,$$ and the thermal voltage $$V_\text{T}\,$$ are temperature dependent, hence, temperature compensating circuits may be required.