
Keywords: log amps, logarithmic amplifiers, DC log amp, log amplifiers, logarithmic amps
Related Parts


Integrated DC Logarithmic Amplifiers

Abstract: Among the classes of logarithmic amplifiers, the DC log amp continues to be a very powerful, costeffective solution for compressing widedynamicrange sensor signals. This article derives the overall DC log amp transfer function from the V_{BE}toIC transfer characteristic of bipolar transistors. It discusses the circuit blocks encountered in a modernday integrated DC log amp, the various errors affecting log amp performance, and a design example featuring the MAX4206. Finally, suggestions for optimizing log amp performance through calibration and design pointers are detailed.
This article was also featured in
Maxim's Engineering Journal, vol. 56 (PDF, 324kB).
For over half a century, engineers have used log amps for compressing signals and for computation. Although digital ICs have mostly replaced the log amp in applications that require computing, engineers continue to use log amps to compress signals. Therefore, the log amp remains a key component in many video, fiber, medical, test and measurement, and wireless systems.
As implied by the name, a logarithmic amplifier expresses an output that is related to its input by the mathematical log function (the logarithmic base is not important, as the different logbased functions are related by constants). By utilizing the log function, you can compress the dynamic range of signals encountered by a system. Compressing widedynamicrange signals has several important benefits. The combination of a log amp and a lowbitcount ADC can often save board space and system cost, whereas a highbitcount ADC might otherwise be required. Furthermore, lowbitcount ADCs are often already present in a given system or on a resident microcontroller. The conversion to a logarithmic parameter is also useful in many applications where measured quantities are evaluated in decibels, or where sensors exhibit exponential or nearexponential transfer characteristics.
During the 1990s, the fiber communications industry began using logamp circuits to measure optical intensity in certain optical applications. Before that time, precision logamp ICs were both costly and bulky; such expense was warranted in only a handful of electronic systems. The only alternative to these IC solutions were log amps constructed from discrete components. In addition to consuming even more board area, discretecomponent log amps were frequently prone to temperature changes and required careful design and board layout. Highly matched components were also necessary to guarantee adequate performance over a wide range of input signals. Semiconductor manufacturers have since developed smaller and less costly integrated logamp products with reduced temperature sensitivity and added functionality.
Classes of Logarithmic Amplifiers
There are three major classes of logarithmic amplifiers. The first class, the DC log amp, traditionally operates on slowly changing DC signals with bandwidths extending to about 1MHz. Without question, the most popular implementations use the logarithmic ItoV transfer characteristic inherent in pn junctions. These DC log amps operate on unipolar inputs (current or voltage), and are frequently referred to as diode, transdiode, translinear, and transimpedance log amps. Due to their current inputs, DC log amps are commonly used to monitor widedynamicrange, unipolar photodiode currents—either absolute or ratiometric. Photodiode current monitoring is not only a common requirement in fiber communications equipment, but is also found in a wide range of chemical and biological sampleprocessing instrumentation. Other DCbased log amps exist, such as those based on the logarithmic timevoltage relationship of RC circuits. However, these circuits are typically prone to complications such as widely varying, signaldependent resolution and conversion times, as well as hightemperature sensitivities.
The second class of log amp is known as the baseband log amp. This circuit class operates on rapidly changing baseband signals in applications where the compression of AC signals is required (common in certain audio and video circuits). The amplifier provides an output proportional to the logarithm of the instantaneous input signal. A special version of the baseband log amp is the "true log amp," which accepts bipolar inputs and provides a compressed output voltage that preserves the polarity of the input. True log amps are sometimes used in radio IF stages and medical ultrasound receiver circuits for dynamic range compression.
Finally, the third class of log amp is the demodulating log amp, or successive detection log amp. This class of log amp both compresses and demodulates RF signals, yielding the logarithm of the rectified signal's envelope. Demodulating log amps are prevalent in RF transceiver applications, where received RF signal strength is measured to control transmitter output power.
The Classic DC Logarithmic Amplifier
In the classic pnjunctionbased implementation of the DC log amp, a bipolar transistor is used to generate the logarithmic ItoV relationship. As shown in
Figure 1, bipolar junction transistors (BJTs) are placed in the feedback path of an operational amplifier. Depending on the type of transistor chosen, npn or pnp, the log amp is either a currentsinking or currentsourcing circuit, respectively (Figures 1a and 1b). Through negative feedback, the op amp places enough output voltage on the baseemitter junction of the BJT to ensure that all available input current is drawn through the collector of the device. Note that a floatingdiode implementation causes the opamp output voltage to include inputreferred offset; the groundedbase implementation does not possess this problem.
Figure 1a. The basic BJT implementation of a DC log amp has currentsinking inputs that generate negative output voltages.
Figure 1b. By changing the BJT from npn to pnp, the log amp becomes a currentsourcing circuit and the output is positive.
With the addition of an input series resistor, the DC log amp can also function as a voltageinput device. Input voltages are converted to a proportional current though the resistor, using the op amp's virtual ground as the reference. Clearly, opamp inputreferred offset must be minimized so that accurate voltagetocurrent conversion can be achieved. The bipolartransistor approach is prone to temperature variations but, as will be discussed, this sensitivity is drastically reduced by using a reference current and onchip temperature compensation.
Further Details
The circuit of
Figure 2 shows a BJT log amp with two inputs, I
_{IN} and I
_{REF}. As described in the previous section, current presented to I
_{IN} causes op amp A
_{1} to develop a corresponding output voltage:
where:
k = 1.381 x 10
^{23} J/°K
T = absolute temperature (°K)
q = 1.602 x 10
^{19}°C
I_{C} = collector current (mA or same units as I
_{IN} and I
_{S})
I_{IN} = logamp input current (mA or same units as I
_{C} and I
_{S})
I_{S} = reverse saturation current (mA or same units as I
_{IN} and I
_{C})
(In Equation 1, "ln" is used to represent the natural logarithm function. "Log
_{10}" is used to express the base10 logarithm function in subsequent equations).
Figure 2. When two of the basic BJTbased input structures are used, subtracting V_{OUT2} from V_{OUT1} removes I_{S} temperature dependence from the output. The remaining "PTAT" dependence can be minimized by using a suitably selected RTD (resistive temperature detector) with the gainsetting resistors of the difference amplifier.
Although this expression clearly shows the logarithmic dependence of V
_{OUT1} on I
_{IN}, the terms I
_{S} and
kT/q depend on temperature and will introduce a highdegree of variation in the V
_{BE} voltage. To remove the temperature dependence caused by I
_{S}, a second junction voltage is subtracted from V
_{OUT1} through the differencing circuit, composed of A
_{3} and its surrounding resistors. The second junction voltage is created in the same way as V
_{OUT1}, except that I
_{REF} serves as the input current. The transistors used to create both junctions must possess nearly identical properties and be in close thermal contact for proper cancellation.
The presence of I
_{REF} has two benefits. First, it sets the desired xaxis "logintercept" current—the current that makes the logamp output current theoretically equal to zero. Second, it allows the users to take ratiometric measurements, in addition to absolute measurements. Ratiometric measurements are frequently used in optical sensors and systems, where an attenuated light source must be compared to a reference light source.
The expression of Equation 5 is still subject to temperature effects, as V
_{DIFF} is proportional to absolute temperature (PTAT). By adding subsequent temperaturecompensation circuitry (normally, an additional opamp amplifier stage with a resistive temperature detector [RTD], or similar device, incorporated as part of the gain), the remaining PTAT error can be virtually eliminated, yielding the ideal logamp relationship:
where K is the new scaling constant, also known as logamp gain, given in V/decade. Because applying log10 to the ratio I
_{LOG}/I
_{REF} determines the number of decades I
_{LOG} is above or below I
_{REF}, multiplication by K yields the desired units of volts.
Integrated designs are well suited for DC log amps, because key temperaturedependent components can be colocated on the physical circuit, yielding excellent temperature tracking of those components. Furthermore, trimming of various remaining errors is also possible during production. Any remaining errors are generally well documented in the log amp's data sheet.
ModernDay DC Logarithmic Amplifiers
The functional block diagram of
Figure 3 illustrates a typical contemporary DC log amp, the MAX4206. Like previous generations, today's DC log amp possesses opamp input structures, BJT feedback, a differencing amplifier, and temperature compensation. To eliminate negative driving voltages at its emitter, the BJT transistor's circuit connections have been rearranged to facilitate singlesupply operation. An uncommitted op amp is still commonly used for subsequent gain, offset adjustment, or even PID control.
Figure 3. A typical DC log amp, like the MAX4206, integrates components such as trimmer pots and output amplifiers. Therefore, it requires few additional components for operation.
Unlike its ancestors, the contemporary log amp incorporates all its electronics within a small package (the MAX4206 is available in a 4mm x 4mm, 16pin TQFN package). Prior to 2001, DC log amps were only commercially available in much larger DIP packages with pin counts ranging from 14 to 24. These older components carried a substantial price tag of $20 to $100; today's replacements are readily available in the $5 to $15 range.
Singlesupply operation is a new improvement appearing in some modernday DC log amps, making them desirable for use with singlesupply ADCs/systems. The MAX4206 can operate from either a single +2.7V to +11V supply or a dual ±2.7 to ±5.5V supply. A consequence of singlesupply operation is that these log amps generally hold a typical 0.5V commonmode voltage at their input terminals in order to maintain proper biasing on the logging BJTs. Because these log amps are currentinput devices, this internally generated commonmode voltage is generally not a problem in most currentmeasurement applications.
The presence of an onchip current reference has become quite popular in most contemporary DC log amps. This reference can be connected to the reference input of the log amp, thereby permitting an absolute, rather than ratiometric, measurement of the current presented to the log amp's main current input. In the case of the MAX4206, a reference current is obtained by means of a 0.5VDC voltage source, a voltagetocurrent converter, and a 10:1 current mirror. An external resistor is required to program the desired reference current.
Also new to DC log amps, an onchip voltage reference is sometimes provided to assist in adjusting amplifier offset at the uncommitted op amp. This reference can also be used for general purposes.
Application Examples
Without question, the most common applications of the DC logarithmic amplifier are those involving the measurement of light. Two implementations are generally used. In the first, a single photodiode is connected to the logging input, while a reference current is connected to the reference input. The second implementation uses two photodiodes, one connected to the logging input and the other to the reference input. The former implementation is used when absolution measurements of light intensity are desired, the latter for logarithmicratiometric ("logratio") lightintensity measurements.
Generalized circuits for both implementations are shown in shown in
Figure 4. In Figure 4(a), a single photodiode measures the light from a fiber optic channel by viewing the light emanating from a fiber optic tap (1% transmission). A PIN photodiode is depicted in the diagram, although an avalanche photodiode could have been used for greater sensitivity (proper powersupply precautions should be taken if high voltages are used to bias the photodiode). Because photodiodes' output current is generally linear with incident optical power (0.1A/mW is a typical photodiode sensitivity) and the MAX4206 operates over five decades of dynamic range, a circuit like this can reliably measure the fiber's optical intensities from 10µW to 1W. Note that, although the MAX4206 is guaranteed to operate over a 40°C to +85°C temperature range, the effects of changing operating temperature and optical frequency can drastically affect the performance of the photodiode.
Figure 4a. Logging applications that measure optical intensity are easily created by placing a photodiode at the input of the log amp.
For cases where the photodiode's anode is reserved for other circuitry, such as the highspeed transimpedance amplifier (TIA) found in many fiber optic modules, a precision current mirror/monitor may be used at the photodiode's cathode. The MAX4007 series of products are wellsuited for this application. Refer to the
MAX4206 and
MAX4007 data sheets for further details.
When two photodiodes are used in a logging application, the intent is to compare a reference light source against an attenuated light source that is derived from the reference. In this way, the attenuation caused by a given medium can be measured independent of light source intensity (or at least small changes in the intensity). This type of application is commonly found in many optically based gassensor applications. In Figure 4(b), a light source's output is split equally into two paths. The first is incident upon the reference PIN photodiode, whose anode feeds the MAX4206's REFIIN input. The other path reflects 90° off a mirror, though the sample, and onto the other PIN photodiode (connected to the LOGIIN input). When calibrated so that the current from the reference photodiode measures 1mA, the current from the other photodiode will measure 1mA or less, depending on the attenuation encountered by the light. By anchoring input currents to 1mA or less, the MAX4206's wide fivedecade dynamic range is fully utilized.
Figure 4b. Logratio applications use two photodiodes and generally measure optical attenuation.
It should also be mentioned that, although the MAX4206 is not guaranteed to operate beyond in the 10nA to 1mA input current range, it is often possible to operate the device beyond this range while still maintaining monotonicity between inputs and output.
Sources of Error in DC Log Amps
Today's DC logarithmic amplifiers are still subject to the same limitations seen in previous generations of products. Equation 6 is an ideal approximation of the DC log amp. To obtain the most accurate expression possible, terms resulting from errors in gain, bias currents, offset, and linearity must be considered as well. This is especially important when such inaccuracies are worsened by temperature and timedependent drift.
A more comprehensive expression representing the BJTbased DC log amp is given by:
where
ΔK is the gain variation;
I_{BIAS1} and
I_{BIAS2} are the bias currents associated with the LOGIIN and REFIIN inputs, respectively.
V_{CONF} is the log conformity error and
V_{OSOUT} is the outputreferred offset.
K,
I_{LOG},
I_{REF}, and
V_{OUT} are defined previously. In many applications, errors associated with bias currents are quite small relative to the input and reference currents, and thus are usually omitted from the error expression. Logconformity error is defined as the maximum deviation from the ideal log relationship of Equation 6 (assuming all other error sources have been nulled). This error is frequently presented in a difference format, so that the small deviations from the ideal plot line can be easily inspected (
Figure 5a).
Figure 5a. A typical logconformity error plot is commonly shown as a function of input current(s) and operating temperature.
Though not immediately obvious, the reference current,
I_{REF}, is potentially a large source of error, composed of initial inaccuracy, temperature drift, and agerelated drift. Such errors should be included when assessing the overall error budget of the log amp's operation.
The effects of these nonideal variations are shown in the transfer curves of
Figure 5b (these effects have been exaggerated for demonstration purposes). The ideal/desired expression is represented by the black line, shown with a log intercept of 100nA and a gain of 1V/decade. Output offset error shifts the black line up or down, as indicated by the green line. Gain error rotates the offsetshifted transfer characteristic, and is represented by the blue line. The red line shows the effects of incorporating of nonlinearity and outputmargin errors.
Figure 5b. The effect of the different errors, presented in Equation 7, on the log transfer function is shown. Errors have been exaggerated for clarity.
In practice, the logamp manufacturers minimize many of the errors presented in this section. With additional calibration and temperature monitoring, designers can reduce the effects of these errors further. The designers usually use calibration tables to perform these corrections after the logamp output has been digitized.
DC LogAmp Implementation
The performance of a DC log amp is only as good as the circuit within which it resides. Good design and layout techniques minimize input leakage currents and crosscomponent temperature variations. However, good design and layout are rarely sufficient to ensure the performance required by most logamp applications, especially when operated over a range of input currents and temperatures. Depending upon an application's requirements and operating conditions, a suitable calibration procedure should be implemented to minimize cumulative errors.
Here are some tips to consider when implementing a DC log amp.
OnePoint Calibration
This is a "bareminimum" technique that effectively shifts the raw performance line (red line) of Figure 5b vertically, such that it intersects the idealperformance line (black line) at a single point. At the typical operating temperature, nominal input and reference currents are applied to the respective logamp inputs. The resulting deviation from the desired result is subtracted from the actual logamp output during normal operation.
Advantages: Calibration is quick, can be performed during final product testing, and does not require much computation. Calibration can also be performed in the analog domain with a single trimming resistor.
Disadvantages: Gain and offset errors are combined into a single, overgeneralized correction. Correction value loses validity as inputs and temperatures are moved from the calibration conditions.
TwoPoint Calibration
Slightly more complex than the previous technique, this technique yields much better results. It effectively rotates and vertically shifts the "red" line in Figure 5b to approximate the desired "black" line. Again, a typical operating temperature should be selected. Input currents should span the desired operating range. The process is greatly simplified if only one reference current is used in both calibration and operation.
Advantages: Calibration is fairly quick and greatly reduces gain and offset errors. Calibration can be performed in the digital domain by applying gain and offset computations, or in the analog domain with gain and offset trimming resistors.
Disadvantages: Correction values lose validity as inputs and temperatures are changed.
Multipoint Calibration
This technique creates a table of calibration data from key sample points. Samples are taken at a single operating temperature. Corrections are performed by interpolating between sampled points.
Advantages: With a sufficient number and strategic selection of input conditions, gain, offset, and nonlinearity errors can be greatly minimized.
Disadvantages: Some form of interpolation is required, which increases the amount of computation involved. Calibration loses validity as inputs and temperatures are changed.
Calibration with Temperature Adjustment
Similar to multipoint calibration, this technique also considers test temperature, creating an extra degree of freedom.
Advantages: This technique greatly reduces gain, offset, nonlinearity, and temperatureimposed variations affecting the total error. Good option for highperformance, lowvolume products.
Disadvantages: Calibration times during final product testing are much longer due to spanning of temperatures. Multidimensional interpolation of sampled data significantly increases the required computational resources. An additional temperature monitoring circuit is also required.
Maintaining Proper Input Margin
Logamp outputs should not operate near the power supply rails, as logamp outputs have limited sourcing and sinking abilities near these rails. This suggestion is easily overlooked when trying to measure currents near or below the reference current, or near the maximum input current. Choose a reference current that is lower than the lowest expected input current. Gain should be set so that the maximum logamp output voltage is not attained when the maximum input current is applied. A dualsupply log amp can also help, as identical input and reference currents put the output at midscale in most designs.
Advantages: Accuracy and response time increase under extreme input conditions.
Disadvantages: Usable output range decreases slightly.
Component Selection
Use external resistors that are the same type and possess lowtemperature coefficients. This is especially important for resistors whose absolute value influences performance (e.g., a reference current generator circuit). Parameters affected by resistance ratios, like gain and offset, are generally less affected by temperature changes. The temperature stability of compensation components is generally not critical. To avoid leakage issues when measuring small currents, lowleakage PC material should also be considered.
Advantages: Minimizes additional performance degradation created by external components.
Disadvantages: Lowtemperaturecoefficient components are generally slightly more expensive but are well worth the cost, given the increased performance they can provide.
Uniform Temperature Exposure
No part of the logamp circuit should be exposed to a temperature that is significantly different from any other part of the circuit. This precaution ensures that all circuit changes caused by temperature will track each other more closely.
Advantages: Further degrees of freedom are eliminated in the calibration process.
Disadvantages: This may cause inconvenience in layout routing or overall circuit size.
Conclusion
In summary, DC log amp ICs have evolved into small, easytouse, costeffective circuits nicely suited for certain analog designs. The logarithmic function conveniently compresses wide dynamic range signals and linearizes sensors with (semi)exponential transfer functions. The compression created by the log function reduces the ADC bit count that would be required to digitize a widedynamicrange signal. Circuit implementations of DC log amp ICs are straightforward, and can be optimized with minimal effort. Calibration procedures can enhance logamp performance, but are not necessary in all applications.
© Sep 23, 2005, Maxim Integrated Products, Inc.

The content on this webpage is protected by copyright laws of the United States and of foreign countries. For requests to copy this content, contact us.
APP 3611: Sep 23, 2005
APPLICATION NOTE 3611,
AN3611,
AN 3611,
APP3611,
Appnote3611,
Appnote 3611
