---
title: "Output of temperature-compensated log circuit"
subject: "Advanced Electronics"
chapter: 5
key: "semester_4/advanced_electronics:temperature-compensated-log-circuit"
source: https://www.bctengineer.com/q/semester_4/advanced_electronics/temperature-compensated-log-circuit
site: BCT Engineering
---

# Output of temperature-compensated log circuit

Advanced Electronics · Chapter 5: Op-Amp Bipolar Transistor Logarithmic Amplifier

- Asked in: 2069 Chaitra, 4 marks
- Video: [Expression of temperature compensated log amplifier using transistor by GENIUS ENGINEERING](https://www.youtube.com/watch?v=fM50gTfA974) — ONLY ECE CLASSES
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/advanced_electronics/temperature-compensated-log-circuit
- Whole chapter: https://www.bctengineer.com/md/semester_4/advanced_electronics/chapter-5

## Question

For the circuit shown in figure below, find the expression for the output voltage (V0). [Figure: Op-amp A1: vi through R1 to its inverting input (non-inverting input grounded); transistor Q1 (base grounded) is its feedback element, collector at the inverting input and emitter to node VA. Op-amp A2: VRef through R2 to its inverting input; transistor Q2 has its collector at the A2 inverting input and its emitter at node VA; the A2 output is connected to node VA. The A1 output is V0. A divider of R2 (from V0) and RTC (to ground) forms node VB, which drives the base of Q2 and the non-inverting input of A2.]

## Short answer

Vo = -(1+R2/RTC)·VT·ln( vi·R2'/(R1·VRef) ). Matched transistors Q1 and Q2 cancel Is, and the PTC resistor RTC compensates VT so the scale factor stays nearly constant with temperature.

## Answer

This is the temperature-compensated log amplifier. Q1 carries the signal current, while Q2 with A2 carries a fixed reference current. The divider R2–RTC sets the scale and cancels the effect of VT.

#### Assumptions
Q1 and Q2 are matched (same Is). The op-amps are ideal. The reference resistor (marked R2 at A2's input) is called R2' here to keep it separate from the divider R2. VB is small compared with VRef.

#### Currents
**Q1:** its collector is at A1's virtual ground (0 V), its base is grounded and its emitter is at VA.

```text
IC1 = vi / R1
VBE1 = 0 − VA   →   VA = −VT ln( vi / (R1·Is) )
```

**Q2:** A2's inverting input is held at VB (virtual short with its + input). Q2's base is also at VB, and its emitter is at VA (driven by A2's output).

```text
Iref = IC2 = (VRef − VB)/R2' ≈ VRef/R2'
VBE2 = VB − VA = VT ln( Iref / Is )
```

#### Solving for VB
```text
VB = VA + VT ln(Iref/Is)
   = −VT ln( vi/(R1·Is) ) + VT ln( Iref/Is )
   = −VT ln( vi / (R1·Iref) )
```

Is has cancelled.

#### Output voltage
A1's output V0 feeds the divider, so VB = V0·RTC/(R2 + RTC). Therefore:

```text
V0 = (1 + R2/RTC) · VB

V0 = −(1 + R2/RTC) · VT · ln( vi / (R1·Iref) )
   = −(1 + R2/RTC) · VT · ln( vi·R2' / (R1·VRef) )
```

In log10 form:

```text
V0 = −2.303 (1 + R2/RTC) VT · log10( vi·R2' / (R1·VRef) )
```

#### Why it is temperature compensated
- **Is cancels** because Q1 and Q2 are matched.
- **VT = kT/q** rises with temperature (+0.33 %/°C). RTC has a positive temperature coefficient, so as T rises RTC rises and (1 + R2/RTC) falls. With R2 ≫ RTC the factor is about R2/RTC, so the product (R2/RTC)·VT stays nearly constant.

For example, with (1 + R2/RTC)·2.303VT = 1 V, the output falls by 1 V per decade of vi.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What current flows in Q1 and what is VA?
   A. IC1 = vi/R1 and VA = -VT ln(vi/(R1 Is))
   B. IC1 = VRef/R2' and VA = 0
   C. IC1 = 0 and VA = VB
   D. IC1 = vi R1 and VA = VT ln vi
   Answer: A. Q1's collector is at virtual ground, so IC1 = vi/R1, and VA = -VBE1. (Key point: Q1 current)

2. What does the Q2-A2 branch provide?
   A. The signal current
   B. The output buffer
   C. A negative supply
   D. A fixed reference current Iref = VRef/R2' that sets VBE2 = VT ln(Iref/Is)
   Answer: D. Q2 carries a constant current, so its VBE depends only on Is and VT. (Key point: Role of Q2 and A2)

3. What is VB after Is cancels?
   A. VB = -Is ln(vi)
   B. VB = vi R1/Iref
   C. VB = -VT ln(vi/(R1 Iref))
   D. VB = VT ln(vi Iref)
   Answer: C. VB = VA + VT ln(Iref/Is), and the Is cancels. (Key point: Expression for VB)

4. Which is the final output V0?
   A. V0 = -VT ln(vi/(R1 Is))
   B. V0 = (R2/RTC) exp(vi)
   C. V0 = -(1 + R2/RTC) VT ln(vi R2'/(R1 VRef))
   D. V0 = (1 + RTC/R2) VT ln(vi)
   Answer: C. VB = V0 RTC/(R2+RTC), so V0 = (1 + R2/RTC) VB. (Key point: Final output)

## Related in Advanced Electronics

- [Log-antilog circuit: Vo in terms of Vi and VR](https://www.bctengineer.com/question.md?key=semester_4%2Fadvanced_electronics%3Alog-antilog-circuit-vo-vi) — Advanced Electronics, chapter 5, asked 3×
- [Output voltage of two op-amp IA](https://www.bctengineer.com/question.md?key=semester_4%2Fadvanced_electronics%3Atwo-opamp-ia-output) — Advanced Electronics, chapter 4
- [Output of log-ratio amplifier with RT compensation](https://www.bctengineer.com/question.md?key=semester_4%2Fadvanced_electronics%3Alog-ratio-temperature-compensated) — Advanced Electronics, chapter 5
- [Output offset voltage of 741 inverting amplifier](https://www.bctengineer.com/question.md?key=semester_4%2Fadvanced_electronics%3Aoutput-offset-741-inverting) — Advanced Electronics, chapter 2
- [Find coefficients of op-amp summing circuit](https://www.bctengineer.com/question.md?key=semester_4%2Fadvanced_electronics%3Asumming-amplifier-coefficients) — Advanced Electronics, chapter 1
- [Input impedance of inverting op-amp](https://www.bctengineer.com/question.md?key=semester_4%2Fadvanced_electronics%3Ainverting-input-impedance) — Advanced Electronics, chapter 2

## Related in other subjects

- [Voltage gain of non-inverting op-amp](https://www.bctengineer.com/question.md?key=semester_2%2Fbasic_electronics_engineering%3Aopamp-noninverting-gain) — Basic Electronics Engineering, chapter 4, asked 2×
- [Non-inverting op-amp voltage gain](https://www.bctengineer.com/question.md?key=semester_1%2Ffundamental_of_electrical_and_electronics_engineering%3Anon-inverting-amplifier-gain) — Fundamental of Electrical and Electronics Engineering, chapter 6
- [Transfer function of op-amp with Rs ∥ C feedback](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Atf-opamp-rs-c-r1-r2) — Control Systems, chapter 2
- [Ideal op-amp properties; non-inverting gain](https://www.bctengineer.com/question.md?key=semester_2%2Fbasic_electronics_engineering%3Aopamp-props-noninverting-gain) — Basic Electronics Engineering, chapter 4, asked 3×
