Log amplifier: Difference between revisions
Em3rgent0rdr (talk | contribs) →Temperature compensation: the analog devices handbook specifically says "thermistor" here, adding cause is wikilinkable. |
Em3rgent0rdr (talk | contribs) →Multistage log amp architectures: add some more on "true log amp" and split paragraph between basic multistage with summation and other paragraph for cascading soft clipping amps without summation. |
||
Line 17: | Line 17: | ||
Log amplifiers are used in many ways, such as: |
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 computer]]s, audio synthesis methods, and some measurement instruments (i.e. power as multiplication of current and voltage). |
* 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 computer]]s, 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. |
* To calculate the [[decibel]] (dB) value of a given quantity. |
||
* As a [[True RMS converter]]. |
* 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 converter]]s. |
* Extending dynamic range of other circuits, like [[automatic gain control]] of transmit power in [[RF]] circuits, or [[analog-to-digital converter]]s. |
||
Line 43: | Line 43: | ||
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. 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> |
||
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- |
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 dB, but the dynamic range can be increased to over 120 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> |
||
{{-}} |
{{-}} |
||
Line 74: | Line 74: | ||
== Multistage log amp architectures == |
== Multistage log amp architectures == |
||
In addition to the basic diode log amp described earlier, two other log amplifier architectures are the |
In addition to the basic diode log amp described earlier, two other log amplifier architectures are the "true log amp" and the successive detection log amp.<ref name=":1" /> |
||
A basic multistage log amp architecture works by cascading a series of N linear amplifiers, each with gain of A, and then summing the result. For small signals such that the final amplifier doesn't saturate, the total gain will be NA 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 series of straight line approximations to the log function |
A basic multistage log amp architecture works by cascading a series of N linear amplifiers, each with gain of A, and then summing the result. For small signals such that the final amplifier doesn't saturate, the total gain will be NA 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 series of straight line approximations to the log function.<ref name=":4" /> |
||
If each limiting amplifier [[Clipping (signal processing)|clips]] "softly" and are cascaded without summing, the approximation can be within 0.1 dB and is sometimes called a "true log amp". The response is not truly logarithmic, because it is symmetric about zero (while the logarithm function is indeterminate for negative inputs) and is not logarithmic 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" /> |
|||
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> |
|||
== See also == |
== See also == |
Revision as of 16:31, 10 October 2024
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,
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.[1]
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 decibel (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.
Basic op-amp diode circuit
The basic op-amp 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 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
The diode's saturation current 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.[2]
Additionally, the bulk resistivity of silicon in a real diode limits accuracy at high currents due to the addition of a 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 at low currents that varies (between 1 and 4) with current.[3] 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]
Transdiode configuration
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.[5]
With a positive Vin large enough to make Vout 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
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).[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 amplifers by a difference amplifier. The BJTs should be matched and in thermal equilibrium, so that the difference amplifer 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[3]) in the difference amplifier's gain-setting resistors can minimize the remaining dependence.[5] The LOG200 chip released in 2024 integrates a similar architecture with additional support circuitry and achieves 160 dB dynamic range with under 0.2% log conformity error.[6]
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 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.[1]
Multistage log amp architectures
In addition to the basic diode log amp described earlier, two other log amplifier architectures are the "true log amp" and the successive detection log amp.[4]
A basic multistage log amp architecture works by cascading a series of N linear amplifiers, each with gain of A, and then summing the result. For small signals such that the final amplifier doesn't saturate, the total gain will be NA 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 series of straight line approximations to the log function.[7]
If each limiting amplifier clips "softly" and are cascaded without summing, the approximation can be within 0.1 dB and is sometimes called a "true log amp". The response is not truly logarithmic, because it is symmetric about zero (while the logarithm function is indeterminate for negative inputs) and is not logarithmic 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".[3]
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.[7]
See also
References
- ^ 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.}
- ^ RMS-to-DC Conversion Just Got Easy Linear Technology, Design Note 288, 2002
- ^ a b c "Linear Design Seminar (1987) Section 1: Analog Signal Processing: Analog Computation & Signal Processing" (PDF). October 1987. pp. 5–10.
- ^ a b c "MT-077 Tutorial: Log Amp Basics" (PDF). Analog Devices. 2009. Archived (PDF) from the original on 2022-10-29. Retrieved 2023-06-28.
- ^ a b "Integrated DC Logarithmic Amplifiers". Analog Devices. 2005-09-23.
{{cite web}}
: CS1 maint: url-status (link) - ^ "LOG200 datasheet" (PDF). Texas Instruments. August 2023.
{{cite web}}
: CS1 maint: url-status (link) - ^ a b "MT-078 TUTORIAL: High Frequency Log Amps" (PDF). Analog Devices. October 2008.
{{cite web}}
: CS1 maint: url-status (link)
External links
- Integrated DC logarithmic amplifiers from Maxim's AN 36211
- Analog electronics with Op Amps by A. J. Peyton, V. Walsh