Jump to content

Log amplifier: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
IC log amps are just better in general, no need to mention RF here...spell out RF later in application bullet.
Citation bot (talk | contribs)
Altered pages. Removed parameters. Formatted dashes. | Use this bot. Report bugs. | #UCB_CommandLine
 
(23 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Short description|Electrical circuit}}
{{Short description|Electrical circuit}}
A '''log amplifier''', also known as '''logarithmic amplifier''' or '''logarithm amplifier''' or '''log amp''', is an [[amplifier]] whose output [[voltage]] <math>V_\text{out}</math> is [[approximately]] proportional to the [[logarithm]] of the applied input voltage <math>V_\text{in}</math>:
A '''log amplifier''', which may spell ''log'' as ''logarithmic'' or ''logarithm'' and which may abbreviate ''amplifier'' as ''amp'' or be termed as a ''converter'', is an electronic [[amplifier]] that for some range of input voltage <math>V_\text{in}</math> has an output [[voltage]] <math>V_\text{out}</math> [[approximately]] proportional to the [[logarithm]] of the input:


:<math>V_\text{out} \approx K \cdot \ln \left(\frac{V_\text{in}}{V_\text{ref}}\right) \, ,</math>
:<math>V_\text{out} \approx K \cdot \ln \left(\frac{V_\text{in}}{V_\text{ref}}\right) \, ,</math>


where <math>V_\text{ref}</math> is a [[normalization constant]] in [[Volt|volts]], ''<math>K</math>'' is a scale factor, and ''<math>\ln</math>'' is the [[natural logarithm]].
where <math>V_\text{ref}</math> is a [[normalization constant]] in [[Volt|volts]], ''<math>K</math>'' is a scale factor, and ''<math>\ln</math>'' is the [[natural logarithm]]. Some log amps may mirror negative input with positive input (even though the mathematical log function is only defined for positive numbers), and some may use [[electric current]] as input instead of voltage.


Log amplifier circuits designed with [[operational amplifiers]] (opamps) use the [[Exponential function|exponential]] [[current–voltage relationship]] of a [[p–n junction]] (either from a [[diode]] or [[bipolar junction transistor]]) as [[Negative-feedback amplifier|negative feedback]] to compute the logarithm. [[Multistage amplifier|Multistage]] log amplifiers instead cascade multiple simple amplifiers to approximate the logarithm's curve. [[Temperature]]-compensated log amplifiers may include more than one opamp and use closely-matched circuit elements to cancel out temperature dependencies. [[Integrated circuit]] (IC) log amplifiers have better [[Bandwidth (signal processing)|bandwidth]] and [[Noise (electronics)|noise]] performance and require fewer [[Electronic component|components]] and [[printed circuit board]] area than circuits built from discrete components.
Log amplifier circuits designed with [[operational amplifiers]] (opamps) use the [[Exponential function|exponential]] [[current–voltage relationship]] of a [[p–n junction]] (either from a [[diode]] or [[bipolar junction transistor]]) as [[Negative-feedback amplifier|negative feedback]] to compute the logarithm. [[Multistage amplifier|Multistage]] log amplifiers instead cascade multiple simple amplifiers to approximate the logarithm's curve. [[Temperature]]-compensated log amplifiers may include more than one opamp and use closely-matched circuit elements to cancel out temperature dependencies. [[Integrated circuit]] (IC) log amplifiers have better [[Bandwidth (signal processing)|bandwidth]] and [[Noise (electronics)|noise]] performance and require fewer [[Electronic component|components]] and [[printed circuit board]] area than circuits built from discrete components.
Line 12: Line 12:
** [[Analog computer]]s
** [[Analog computer]]s
** Audio [[Synthesizer|synthesis]]
** Audio [[Synthesizer|synthesis]]
** Measurement instruments (e.g. [[Electric power|power]] as multiplication of [[Electric current|current]] and voltage)
** [[Measurement instruments]] (e.g. [[Electric power|power]] = current × voltage)
* [[Decibel]] (dB) calculation
* [[Decibel]] (dB) calculation
* [[True RMS converter|True RMS conversion]]
* [[True RMS converter|True RMS conversion]]
* Extending the [[dynamic range]] of other circuits for:
* Extending the [[dynamic range]] of other circuits, used for:
** [[Automatic gain control]] of transmit power in [[radio frequency]] circuits
** [[Automatic gain control]] of transmit power in [[radio frequency]] circuits
** Scaling a large dynamic range [[sensor]] (e.g. from a [[photodiode]]<ref>{{Cite web |date=2007 |title=LOG114 (datasheet): Single-Supply, High-Speed, Precision LOGARITHMIC AMPLIFIER |url=https://www.ti.com/lit/ds/symlink/log114.pdf |website=[[Texas Instruments]]}}</ref>) into a linear voltage scale for an [[analog-to-digital converter]] with limited resolution<ref name=":3" />
** Scaling a large dynamic range [[sensor]] (e.g. from a [[photodiode]]<ref>{{Cite web |date=2007 |title=LOG114 (datasheet): Single-Supply, High-Speed, Precision LOGARITHMIC AMPLIFIER |url=https://www.ti.com/lit/ds/symlink/log114.pdf |website=[[Texas Instruments]]}}</ref>) into a linear voltage scale for an [[analog-to-digital converter]] with limited resolution<ref name=":3" />


The log amplifier's operation can be inverted by an ''exponentiator'', such as an [[Operational amplifier applications#Exponential output|opamp configured for exponential output]].<ref name=":0">{{Cite web |date=2013 |title=AN-311 Theory and Applications of Logarithmic Amplifiers |url=https://www.ti.com/lit/an/snoa575b/snoa575b.pdf |url-status=live |archive-url=https://web.archive.org/web/20240619045645/https://www.ti.com/lit/an/snoa575b/snoa575b.pdf |archive-date=2024-06-19 |access-date=2024-07-30 |website=[[Texas Instruments]]}}}</ref> An exponentiator may be needed at the end of a series of analog computation stages done in a logarithmic scale in order to return the voltage scale back to a linear output scale. Additionally, signals that are first [[Companding|companded]] by a logarithmic amplifier may eventually need to be expanded out by an exponentiator to restore to their original scale.
A log amplifier's elements can be [[Operational amplifier applications#Exponential output|rearranged to produce exponential output]], the logarithm's [[inverse function]]. Such an amplifier may be called an ''exponentiator'', an ''antilogarithm amplifier'', or abbreviated like ''antilog amp''.<ref name=":0">{{Cite web |date=2013 |title=AN-311 Theory and Applications of Logarithmic Amplifiers |url=https://www.ti.com/lit/an/snoa575b/snoa575b.pdf |url-status=live |archive-url=https://web.archive.org/web/20240619045645/https://www.ti.com/lit/an/snoa575b/snoa575b.pdf |archive-date=2024-06-19 |access-date=2024-07-30 |website=[[Texas Instruments]]}}}</ref> An exponentiator may be needed at the end of a series of analog computation stages done in a logarithmic scale in order to return the voltage scale back to a linear output scale. Additionally, signals that were [[Companding|companded]] by a log amplifier may later be expanded by an exponentiator to return to their original scale.


== Basic opamp diode circuit ==
== Basic opamp diode circuit ==


[[Image:Op-Amp Logarithmic Amplifier.svg|thumb|300px|Basic opamp diode log converter]]
[[Image:Op-Amp Logarithmic Amplifier.svg|thumb|300px|Basic opamp diode log amplifier]]


The basic opamp diode log converter shown in the diagram utilizes the diode's exponential current-voltage relationship for the opamp's negative feedback path, with the diode's anode [[Virtual ground|virtually grounded]] and its cathode connected to the opamp's output <math>V_\text{out}</math>, used as the circuit output. The [[Shockley diode equation]] gives the [[current–voltage relationship]] for the ideal semiconductor [[diode]] in the diagram to be:
The basic opamp diode log amplifier shown in the diagram utilizes the diode's exponential current-voltage relationship for the opamp's negative feedback path, with the diode's anode [[Virtual ground|virtually grounded]] and its cathode connected to the opamp's output <math>V_\text{out}</math>, used as the circuit output. The [[Shockley diode equation]] gives the [[current–voltage relationship]] for the ideal semiconductor [[diode]] in the diagram to be:


: <math>I_\text{D} = I_\text{S} \left(e^{\frac{-V_\text{out}}{V_\text{T}}} - 1\right),</math>
: <math>I_\text{D} = I_\text{S} \left(e^{\frac{-V_\text{out}}{V_\text{T}}} - 1\right),</math>
Line 41: Line 41:


=== Drawbacks ===
=== Drawbacks ===
[[File:Ltspice-simulate-logamp-with-1N4148-diode-with-temperature.png|thumb|Log amp simulated with 1kΩ resistor and 1N4148 diode at 25°C (blue) and 50°C (purple). The difference (red) varies around 50mV.]]
The diode's saturation current <math>I_\text{S}</math> doubles for every ten [[kelvin]] 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.<ref>[https://www.analog.com/media/en/reference-design-documentation/design-notes/dn288f.pdf RMS-to-DC Conversion Just Got Easy] Linear Technology, Design Note 288, 2002</ref>
The diode's saturation current <math>I_\text{S}</math> doubles for every ten [[kelvin]] rise in temperature and varies significantly due to [[Process variation (semiconductor)|process variation]]. And because thermal voltage <math display="inline"> V_\text{T}{=}\tfrac{kT}{q}</math>, the output voltage is also proportional to its kelvin temperature. Hence, it is very difficult to set the reference voltage for the circuit.


Additionally, the bulk resistivity <math>R_{\text{B}}</math> of silicon in a real diode limits accuracy at high currents due to the addition of a <math>I_{\text{D}} \cdot R_{\text{B}}</math> term to the diode's voltage. Additionally, diffusion currents in surface inversion layers and generation-recombination effects in space-charge regions cause a scale factor <math>m</math> at low currents that varies (between 1 and 4) with current.<ref name=":3">{{Cite web |date=October 1987 |title=Linear Design Seminar (1987) Section 1: Analog Signal Processing: Analog Computation & Signal Processing |url=https://www.analog.com/media/en/training-seminars/design-handbooks/Linear-Design-Seminar-1987/Section5.pdf |pages=5-10}}</ref> With inputs near 0 volts, log amps have a linear <math>V_\text{in}</math> to <math>V_\text{out}</math> law. But this non-logarithmic behavior itself is often lost in this device noise, which limits the dynamic range to 40-60&nbsp;dB, but the dynamic range can be increased to over 120&nbsp;dB by replacing the diode with a transistor in a "transdiode" configuration.<ref name=":1">{{Cite web |date=2009 |title=MT-077 Tutorial: Log Amp Basics |url=https://www.analog.com/media/en/training-seminars/tutorials/MT-077.pdf |url-status=live |archive-url=https://web.archive.org/web/20221029071227/https://www.analog.com/media/en/training-seminars/tutorials/MT-077.pdf |archive-date=2022-10-29 |access-date=2023-06-28 |website=[[Analog Devices]]}}</ref>
Additionally, the bulk resistance <math>R_{\text{B}}</math> of a real diode limits accuracy at high currents due to an added <math>I_{\text{D}} R_{\text{B}}</math> voltage term. And, diffusion currents in surface inversion layers and generation-recombination effects in space-charge regions cause a scale factor <math>m</math> at low currents that varies (between 1 and 4) with current.<ref name=":3">{{Cite web |date=October 1987 |title=Linear Design Seminar (1987) Section 1: Analog Signal Processing: Analog Computation & Signal Processing |url=https://www.analog.com/media/en/training-seminars/design-handbooks/Linear-Design-Seminar-1987/Section5.pdf |pages=5–10}}</ref> With inputs near 0 volts, log amps have a linear <math>V_\text{in}</math> to <math>V_\text{out}</math> law. But this non-logarithmic behavior itself is often lost in this device noise, which limits the dynamic range to 40-60&nbsp;dB, but the dynamic range can be increased to over 120&nbsp;dB by replacing the diode with a transistor in a "transdiode" configuration.<ref name=":1">{{Cite web |date=2009 |title=MT-077 Tutorial: Log Amp Basics |url=https://www.analog.com/media/en/training-seminars/tutorials/MT-077.pdf |url-status=live |archive-url=https://web.archive.org/web/20221029071227/https://www.analog.com/media/en/training-seminars/tutorials/MT-077.pdf |archive-date=2022-10-29 |access-date=2023-06-28 |website=[[Analog Devices]]}}</ref>

To address inaccuracies for small inputs the size of <math>V_\text{T}</math> or smaller and the question of how to handle negative inputs, one solution uses a symmetric function such as the [[inverse hyperbolic sine]], whose graph approximates <math>\ln(2x)</math> for large positive and negative <math>\ln(\text{-}2x)</math> for large negative inputs, but which linearly goes through 0 for small inputs. This function may be implemented with a combination of N and P diodes (sold many years ago in a temperature compensated module) to make what is called a "true log" amp or "baseband log" amp (which may instead use a multistage amplifier architecture, as described in {{Slink|2=True log amp|nopage=y}}).<ref>{{Cite web |last=Nash |first=Eamon |date=March 1999 |title=Ask The Applications Engineer—28: Logarithmic Amplifiers Explained |url=https://www.analog.com/media/en/analog-dialogue/volume-33/number-1/articles/logarithmic-amplifiers-explained.pdf |archive-url= |website=[[Analog Dialogue]]}}</ref>


{{-}}
{{-}}
Line 50: Line 53:


[[Image:Logamp.svg|thumb|300px|A transdiode configuration with a [[bipolar junction transistor|BJT]] connected in the [[negative feedback]] loop.]]
[[Image:Logamp.svg|thumb|300px|A transdiode configuration with a [[bipolar junction transistor|BJT]] connected in the [[negative feedback]] loop.]]
While the floating diode in the earlier basic opamp implementation causes the output voltage to depend on the opamp's input offset current, the grounded-base or "transdiode" configuration shown in the diagram does not possess this problem. Negative feedback causes the opamp to output enough voltage on the base-emitter junction of the [[bipolar junction transistor]] (BJT) to ensure that all available input current is drawn through the collector of the BJT, so the output voltage is then referenced relative to the true ground of the transistor's base rather than the virtual ground. While the circuit in the diagram uses an npn transistor and produces a negative <math>V_\text{out}</math> and sinks input current, a pnp will instead result in positive <math>V_\text{out}</math> and a current-sourcing input.<ref name=":2">{{Cite web |date=2005-09-23 |title=Integrated DC Logarithmic Amplifiers |url=https://www.analog.com/en/resources/technical-articles/integrated-dc-logarithmic-amplifiers.html |url-status=live |website=[[Analog Devices]]}}</ref>
While the floating diode in the earlier basic opamp implementation causes the output voltage to depend on the opamp's input offset current, the grounded-base or "transdiode" configuration shown in the diagram does not possess this problem. Negative feedback causes the opamp to output enough voltage on the base-emitter junction of the [[bipolar junction transistor]] (BJT) to ensure that all available input current is drawn through the collector of the BJT, so the output voltage is then referenced relative to the true ground of the transistor's base rather than the virtual ground. While the circuit in the diagram uses an npn transistor and produces a negative <math>V_\text{out}</math> and sinks input current, a pnp will instead result in positive <math>V_\text{out}</math> and a current-sourcing input.<ref name=":2">{{Cite web |date=2005-09-23 |title=Integrated DC Logarithmic Amplifiers |url=https://www.analog.com/en/resources/technical-articles/integrated-dc-logarithmic-amplifiers.html |website=[[Analog Devices]]}}</ref>


With a positive <math>V_\text{in}</math> large enough to make <math>V_\text{out}</math> negative enough to [[forward bias]] the emitter-base junction of the BJT (to keep it in the active mode of operation), then:
With a positive <math>V_\text{in}</math> large enough to make <math>V_\text{out}</math> negative enough to [[forward bias]] the emitter-base junction of the BJT (to keep it in the active mode of operation), then:
Line 67: Line 70:


=== Temperature compensation ===
=== Temperature compensation ===
Because temperature compensation is generally needed, it is often built into log amplifier ICs. Alternatively, for analog computers that follow log operations by an antilog, then temperature variation in the log operation is unimportant, since it will be compensated by a similar variation in the antilog circuit in [[thermal equilibrium]] (e.g. on the same chip).<ref name=":1" />
Because temperature compensation is generally needed, it is often built into log amplifier ICs. Some analog computation chips that follow log operations by an antilog may conveniently compensate the log circuit's temperature variation by a similar variation in the antilog circuit.<ref name=":1" />


One method to remove <math>I_\text{S}\,</math>temperature dependence is to copy the basic uncompensated BJT-based log amplifier, but use a constant [[current source]] instead of [[resistor]] <math>R</math> for this copy, and then follow both log amplifiers by a difference amplifier. The BJTs should be matched and in thermal equilibrium, so that the difference amplifier subtracts the second BJT's junction voltage to cancel out <math>I_\text{S}\,</math>in the difference amplifier's output. The constant current source can also be used to set the desired x-axis intercept and allows users to make ''ratiometric measurements'' that are relative to a desired reference. Using a resistive temperature detector (e.g. a [[thermistor]]<ref name=":3" />) in the difference amplifier's gain-setting resistors can minimize the remaining <math>V_\text{T}\,</math>dependence.<ref name=":2" /> This architecture can be very accurate; for instance, the LOG200 chip released in 2024 achieves 160&nbsp;dB dynamic range with under 0.2% log conformity error.<ref>{{Cite web |date=August 2023 |title=LOG200 datasheet |url=https://www.ti.com/lit/ds/symlink/log200.pdf |url-status=live |website=[[Texas Instruments]]}}</ref>
One method to remove <math>I_\text{S}\,</math>temperature dependence is to copy the basic uncompensated BJT-based log amplifier, but use a constant [[current source]] instead of [[resistor]] <math>R</math> for this copy, and then follow both log amplifiers by a difference amplifier. The BJTs should be matched and in [[thermal equilibrium]], so that the difference amplifier subtracts the second BJT's junction voltage to cancel out <math>I_\text{S}\,</math>in the difference amplifier's output. The constant current source can also be used to set the desired x-axis intercept and allows users to make ''ratiometric measurements'' that are relative to a desired reference. Using a resistive temperature detector (e.g. a [[thermistor]]<ref name=":3" />) in the difference amplifier's gain-setting resistors can minimize the remaining <math>V_\text{T}\,</math>dependence.<ref name=":2" /> Such architectures can be very accurate; for instance, the LOG200 chip released in 2024 achieves 160&nbsp;dB dynamic range with under 0.2% log conformity error.<ref>{{Cite web |date=August 2023 |title=LOG200 datasheet |url=https://www.ti.com/lit/ds/symlink/log200.pdf |website=[[Texas Instruments]]}}</ref>


[[Texas Instruments]] application note AN-311 describes another temperature-compensated circuit which only uses two opamps instead of three. It also uses a matched BJT configured with the second opamp to compensate for the first BJT's <math>V_\text{BE}</math> temperature dependence by cancelling <math>I_\text{S}</math> out from <math>\Delta V_\text{BE}</math>, the difference between the first BJT's <math>V_\text{BE}</math> minus the second BJT's <math>V_\text{BE}</math>. The second BJT's collector is fed a constant current from a temperature-compensated [[Zener diode]] voltage reference and its emitter is tied to the emitter of the first BJT, which also connects through a resistor the output of the second opamp. The second BJT's <math>V_\text{BE}</math> is fixed by its constant collector current. The second BJT's base voltage relative to ground is <math>\Delta V_\text{BE}</math>, so it will lack any <math>I_\text{S}</math> component. This <math>\Delta V_\text{BE}</math> is outputted through the midpoint of a temperature-compensated voltage divider (where one resistor has a much higher temperature coefficient) to counteract <math>V_\text{T}</math>'s temperature dependence. This circuit can also be inverted to form an exponentiator.<ref name=":0" />
[[Texas Instruments]] application note AN-311 describes another temperature-compensated circuit which only uses two opamps instead of three and maintains 1% log conformity. It also uses a matched BJT configured with the second opamp to compensate for the first BJT's <math>V_\text{BE}</math> temperature dependence by cancelling <math>I_\text{S}</math> out from <math>\Delta V_\text{BE}</math>, the difference between the first BJT's <math>V_\text{BE}</math> minus the second BJT's <math>V_\text{BE}</math>. The second BJT's collector is fed a constant current from a temperature-compensated [[Zener diode]] voltage reference and its emitter is tied to the emitter of the first BJT, which also connects through a resistor the output of the second opamp. The second BJT's <math>V_\text{BE}</math> is fixed by its constant collector current. The second BJT's base voltage relative to ground is <math>\Delta V_\text{BE}</math>, so it will lack any <math>I_\text{S}</math> component. This <math>\Delta V_\text{BE}</math> is outputted through the midpoint of a temperature-compensated voltage divider (where one resistor has a much higher temperature coefficient) to counteract <math>V_\text{T}</math>'s temperature dependence. This circuit can also be inverted to form an exponentiator.<ref name=":0" />

=== Drawbacks ===
BJT log converters still may have poor temperature rejection and poor log conformance over wide current variations. And because the [[Bandwidth (signal processing)|bandwidth]] of a BJT depends on current, the bandwidth of log-antilog converters varies with signal amplitude and drops to near zero as the signal amplitude drops. Log converters have been claimed to be inferior to using modern high-resolution [[delta-sigma modulation]] analog-to-digital converters and performing calculations digitally.<ref>[https://www.analog.com/media/en/reference-design-documentation/design-notes/dn288f.pdf RMS-to-DC Conversion Just Got Easy] Linear Technology, Design Note 288, 2002</ref>


== Multistage log amp architectures ==
== Multistage log amp architectures ==
Line 80: Line 86:


=== True log amp ===
=== True log amp ===
If each limiting amplifier [[Clipping (signal processing)|clips]] "softly" and are cascaded without summing, the approximation can be within 0.1&nbsp;dB and is sometimes called a "true log amp". The response of both this true log amp and the basic multistage log amp are not truly logarithmic, because they are symmetric about zero (while the mathematical logarithm function is indeterminate for negative inputs) and are linear for small inputs. But, such a symmetrical transfer function is fine for [[Capacitive coupling|capacitively coupled]] [[Alternating current|AC]] inputs, such as from [[radar]] receivers. The term "logarithmic converter" may better describe such functionality than "logarithmic amplifier".<ref name=":3" />
If limiting amplifiers that [[Clipping (signal processing)|clip]] "softly" are cascaded without summing, the approximation (which can be within 0.1&nbsp;dB) is sometimes called a "true log amp". The response of both this true log amp and the basic multistage log amp are not truly logarithmic, because they are symmetric about zero (while the mathematical logarithm function is indeterminate for negative inputs) and are linear for small inputs. But, such a symmetrical transfer function is fine for [[Capacitive coupling|capacitively coupled]] [[Alternating current|AC]] inputs, such as from [[radar]] receivers. The term "logarithmic converter" may better describe such functionality than "logarithmic amplifier".<ref name=":3" />


=== Successive detection log amp ===
=== Successive detection log amp ===
The successive detection log amp architecture is a variant of this which uses full or half wave detectors from the output of each amplifier stage, all connected to the log amplifier's output node.<ref name=":4">{{Cite web |date=October 2008 |title=MT-078 TUTORIAL: High Frequency Log Amps |url=https://www.analog.com/media/en/training-seminars/tutorials/MT-078.pdf |url-status=live |website=[[Analog Devices]]}}</ref>
The successive detection log amp architecture is a variant of this which uses full or half wave detectors from the output of each amplifier stage, all connected to the log amplifier's output node.<ref name=":4">{{Cite web |date=October 2008 |title=MT-078 TUTORIAL: High Frequency Log Amps |url=https://www.analog.com/media/en/training-seminars/tutorials/MT-078.pdf |website=[[Analog Devices]]}}</ref>


== See also ==
== See also ==

Latest revision as of 21:06, 5 November 2024

A log amplifier, which may spell log as logarithmic or logarithm and which may abbreviate amplifier as amp or be termed as a converter, is an electronic amplifier that for some range of input voltage has an output voltage approximately proportional to the logarithm of the input:

where is a normalization constant in volts, is a scale factor, and is the natural logarithm. Some log amps may mirror negative input with positive input (even though the mathematical log function is only defined for positive numbers), and some may use electric current as input instead of voltage.

Log amplifier circuits designed with operational amplifiers (opamps) use the exponential current–voltage relationship of a p–n junction (either from a diode or bipolar junction transistor) as negative feedback to compute the logarithm. Multistage log amplifiers instead cascade multiple simple amplifiers to approximate the logarithm's curve. Temperature-compensated log amplifiers may include more than one opamp and use closely-matched circuit elements to cancel out temperature dependencies. Integrated circuit (IC) log amplifiers have better bandwidth and noise performance and require fewer components and printed circuit board area than circuits built from discrete components.

Log amplifier applications include:

A log amplifier's elements can be rearranged to produce exponential output, the logarithm's inverse function. Such an amplifier may be called an exponentiator, an antilogarithm amplifier, or abbreviated like antilog amp.[3] An exponentiator may be needed at the end of a series of analog computation stages done in a logarithmic scale in order to return the voltage scale back to a linear output scale. Additionally, signals that were companded by a log amplifier may later be expanded by an exponentiator to return to their original scale.

Basic opamp diode circuit

[edit]
Basic opamp diode log amplifier

The basic opamp diode log amplifier shown in the diagram utilizes the diode's exponential current-voltage relationship for the opamp's negative feedback path, with the diode's anode virtually grounded and its cathode connected to the opamp's output , used as the circuit output. The Shockley diode equation gives the current–voltage relationship for the ideal semiconductor diode in the diagram to be:

where flows from the diode's anode to its cathode, is the diode's reverse saturation current and is the thermal voltage (approximately 26 mV at room temperature). When the diode's current is approximately proportional to an exponential function:

Rearranging this equation gives the output voltage to be approximately:

An input voltage can easily be scaled and converted into the diode's current using Ohm's law by sending the input voltage through a resistance to the virtual ground, so the output voltage will be approximately:

A necessary condition for successful operation of this log amplifier is that 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. will then be negative (since the op amp is in the inverting configuration) and is negative enough to forward bias the diode.

Drawbacks

[edit]
Log amp simulated with 1kΩ resistor and 1N4148 diode at 25°C (blue) and 50°C (purple). The difference (red) varies around 50mV.

The diode's saturation current doubles for every ten kelvin rise in temperature and varies significantly due to process variation. And because thermal voltage , the output voltage is also proportional to its kelvin temperature. Hence, it is very difficult to set the reference voltage for the circuit.

Additionally, the bulk resistance of a real diode limits accuracy at high currents due to an added voltage term. And, diffusion currents in surface inversion layers and generation-recombination effects in space-charge regions cause a scale factor at low currents that varies (between 1 and 4) with current.[1] With inputs near 0 volts, log amps have a linear to law. But this non-logarithmic behavior itself is often lost in this device noise, which limits the dynamic range to 40-60 dB, but the dynamic range can be increased to over 120 dB by replacing the diode with a transistor in a "transdiode" configuration.[4]

To address inaccuracies for small inputs the size of or smaller and the question of how to handle negative inputs, one solution uses a symmetric function such as the inverse hyperbolic sine, whose graph approximates for large positive and negative for large negative inputs, but which linearly goes through 0 for small inputs. This function may be implemented with a combination of N and P diodes (sold many years ago in a temperature compensated module) to make what is called a "true log" amp or "baseband log" amp (which may instead use a multistage amplifier architecture, as described in § True log amp).[5]

Transdiode configuration

[edit]
A transdiode configuration with a BJT connected in the negative feedback loop.

While the floating diode in the earlier basic opamp implementation causes the output voltage to depend on the opamp's input offset current, the grounded-base or "transdiode" configuration shown in the diagram does not possess this problem. Negative feedback causes the opamp to output enough voltage on the base-emitter junction of the bipolar junction transistor (BJT) to ensure that all available input current is drawn through the collector of the BJT, so the output voltage is then referenced relative to the true ground of the transistor's base rather than the virtual ground. While the circuit in the diagram uses an npn transistor and produces a negative and sinks input current, a pnp will instead result in positive and a current-sourcing input.[6]

With a positive large enough to make negative enough to forward bias the emitter-base junction of the BJT (to keep it in the active mode of operation), then:

where is the saturation current of the emitter-base diode and is the thermal voltage. Due to the virtual ground at the opamp's inverting input,

, and

The output voltage is expressed as the natural log of the input voltage. Both the saturation current and the thermal voltage are temperature dependent, hence, temperature compensation may be required.

Temperature compensation

[edit]

Because temperature compensation is generally needed, it is often built into log amplifier ICs. Some analog computation chips that follow log operations by an antilog may conveniently compensate the log circuit's temperature variation by a similar variation in the antilog circuit.[4]

One method to remove temperature dependence is to copy the basic uncompensated BJT-based log amplifier, but use a constant current source instead of resistor for this copy, and then follow both log amplifiers by a difference amplifier. The BJTs should be matched and in thermal equilibrium, so that the difference amplifier subtracts the second BJT's junction voltage to cancel out in the difference amplifier's output. The constant current source can also be used to set the desired x-axis intercept and allows users to make ratiometric measurements that are relative to a desired reference. Using a resistive temperature detector (e.g. a thermistor[1]) in the difference amplifier's gain-setting resistors can minimize the remaining dependence.[6] Such architectures can be very accurate; for instance, the LOG200 chip released in 2024 achieves 160 dB dynamic range with under 0.2% log conformity error.[7]

Texas Instruments application note AN-311 describes another temperature-compensated circuit which only uses two opamps instead of three and maintains 1% log conformity. It also uses a matched BJT configured with the second opamp to compensate for the first BJT's temperature dependence by cancelling out from , the difference between the first BJT's minus the second BJT's . The second BJT's collector is fed a constant current from a temperature-compensated Zener diode voltage reference and its emitter is tied to the emitter of the first BJT, which also connects through a resistor the output of the second opamp. The second BJT's is fixed by its constant collector current. The second BJT's base voltage relative to ground is , so it will lack any component. This is outputted through the midpoint of a temperature-compensated voltage divider (where one resistor has a much higher temperature coefficient) to counteract 's temperature dependence. This circuit can also be inverted to form an exponentiator.[3]

Drawbacks

[edit]

BJT log converters still may have poor temperature rejection and poor log conformance over wide current variations. And because the bandwidth of a BJT depends on current, the bandwidth of log-antilog converters varies with signal amplitude and drops to near zero as the signal amplitude drops. Log converters have been claimed to be inferior to using modern high-resolution delta-sigma modulation analog-to-digital converters and performing calculations digitally.[8]

Multistage log amp architectures

[edit]

While the previous circuits utilized the p–n junction's exponential current–voltage relationship for computing the log function, the following approaches instead approximate the log function by cascading multiple simpler amplifiers.

Basic multistage log amp

[edit]

A basic multistage log amp works by cascading a series of N linear amplifiers, each with gain of A dB, and then summing the result. For small signals such that the final amplifier doesn't saturate, the total gain will be N·A dB. However, as the input signal level increases, the final amplifier will limit and thus make a fixed contribution to the sum, so that the gain will drop to (N-1)·A dB. As the signal increases, the second to last amplifier will limit, and so on, until the first limits. The resulting curve is a piecewise linear function approximation of the log function.[9]

True log amp

[edit]

If limiting amplifiers that clip "softly" are cascaded without summing, the approximation (which can be within 0.1 dB) is sometimes called a "true log amp". The response of both this true log amp and the basic multistage log amp are not truly logarithmic, because they are symmetric about zero (while the mathematical logarithm function is indeterminate for negative inputs) and are linear for small inputs. But, such a symmetrical transfer function is fine for capacitively coupled AC inputs, such as from radar receivers. The term "logarithmic converter" may better describe such functionality than "logarithmic amplifier".[1]

Successive detection log amp

[edit]

The successive detection log amp architecture is a variant of this which uses full or half wave detectors from the output of each amplifier stage, all connected to the log amplifier's output node.[9]

See also

[edit]

References

[edit]
  1. ^ a b c d e "Linear Design Seminar (1987) Section 1: Analog Signal Processing: Analog Computation & Signal Processing" (PDF). October 1987. pp. 5–10.
  2. ^ "LOG114 (datasheet): Single-Supply, High-Speed, Precision LOGARITHMIC AMPLIFIER" (PDF). Texas Instruments. 2007.
  3. ^ a b "AN-311 Theory and Applications of Logarithmic Amplifiers" (PDF). Texas Instruments. 2013. Archived (PDF) from the original on 2024-06-19. Retrieved 2024-07-30.}
  4. ^ a b "MT-077 Tutorial: Log Amp Basics" (PDF). Analog Devices. 2009. Archived (PDF) from the original on 2022-10-29. Retrieved 2023-06-28.
  5. ^ Nash, Eamon (March 1999). "Ask The Applications Engineer—28: Logarithmic Amplifiers Explained" (PDF). Analog Dialogue.
  6. ^ a b "Integrated DC Logarithmic Amplifiers". Analog Devices. 2005-09-23.
  7. ^ "LOG200 datasheet" (PDF). Texas Instruments. August 2023.
  8. ^ RMS-to-DC Conversion Just Got Easy Linear Technology, Design Note 288, 2002
  9. ^ a b "MT-078 TUTORIAL: High Frequency Log Amps" (PDF). Analog Devices. October 2008.
[edit]