EDN logo


Design Ideas: March 3, 1994

Single stage gives logarithmic gain steps

Allen Windhorn,
Reliance Electric, North Mankato, MN


By placing a variable component in the positive feedback loop of an op amp, you can vary the gain of the stage logarithmically with respect to a linear resistance or conductance. Such a stage could prove useful, for example, in an audio circuit where you need a linear "dB" response.

To understand how linear components can yield a logarithmic response, begin with the following ratio of two linear terms. The ratio gives a good approximation of an exponential function. For instance, for a gain-control term, x, varying from 1 to 15, the function

y=(21.95+3.1693x)/(21.95-x)

is within 5% of y=e0.1535x over a range for y of 1 to 10. The ratio from discrete step to discrete step is even more accurate, exhibiting a variation of less than 0.2% from step to step. Designing an op-amp circuit that calculates this ratio is not difficult.

The values for these linear and exponential functions were not plucked out of the air. For starters, the formula for the exponential constant is ln(10)/15=0.1535.

You can derive values for ranges that suit your application by multiplying through the denominator term and solving for the coefficients at three convenient values for x. (Using an equiripple fitting procedure instead of the following crude 3-point fit would yield a more accurate result.)

To continue the example,

e0.1535x=(a+bx)/(c-x).

To find a, b, and c, first set x to the most convenient value, x=0. Then e0=1=(a+0)/(c+0) simply yields a=c.

Next, letting x=7.5 for a midrange approximation point sets up e0.1535(7.5)=(a+7.5x)/(a-7.5), which reduces to 3.1621(a-7.5)=(a+7.5b). Multiplying and combining terms gives 2.1621a-7.5b=23.716. Similarly for x=15, 9a-15b=150. Solving these two equations for a and b, yields a=21.94 and b=3.164.


The circuits in Fig 1 and Fig 2 have transfer functions that correspond to the linear ratio. For example, the gain of Fig 1's circuit is

A=-(R2R4+R2R3)/(R1R4-R2R3),

or

AB=-(BR4-BR3)/(BR4-R3),

Table 1—Resistor
values
R1100k
R231.6k
R35.76k
R440.2k
R520.0k
R610.0k
R74.99k
R85.0k
R92.32k
where B=R1/R2.

This last equation has the same form as the linear ratio. By matching coefficients, you can derive values for the circuits' resistors listed in Table 1. You can scale your values by any convenient factor. The equation for the gain in Fig 2's circuit is similar to that of Fig 1's but uses conductance instead of resistance in the positive-feedback network.

If you do not use the extra resistors R3B and R8B, the minimum gain value is fixed for a particular gain range. But by adding one of these extra resistors, you may set the minimum gain to any value. EDN BBS /DI_SIG #1375







| EDN Access | feedback | subscribe to EDN! |
| design features | design ideas |


Copyright © 1995 EDN Magazine. EDN is a registered trademark of Reed Properties Inc, used under license.