I am looking to implement a true ln(x) function in an op amp circuit, operating at audio frequencies.
The goal is to feed a signal x into a quadratic equation (positive values only), and spit out a value y using analog computing techniques. I am currently ignoring temperature stability for simplicity.
To perform the exponentiation, I planned on converting the instantaneous signal x with a logarithm ln(x). Once I have ln(x), it is possible to square and do x**4 using multiplication (prior to the antilog). A summing stage at the end will add/subtract the terms involved.
For example:
y = a * x**4 - b * x**2
should be easily done, if I can get a proper ln(x) and it's antilog.
The following page under the heading "Logarithmic output" shows a typical circuit:
+------|>|---+ | D1 | | |\ | | | \ | Vin ----R----+--| -\ | | >-----+------ Vout +--| +/ | | / | |/ | ----- --- -The wiki sez:
Vout = -VT * ln ( Vin / ( Is * R ) )
where:
VT ~= 25 mV at room temp. Is = saturation current for the diode D1
The problem that I have is that I want to eliminate the denominator underneath Vin. Ideally, I want to get:
Vout = ln ( Vin ).
VT is simple enough to work around with a compensating gain stage.
For the pesky Is * R denominator, I can make R large, perhaps 1M. At some point though, if R is too large, noise becomes a factor.
For Is, I can use a larger diode, such as a
1N4004 rectifier diode, with larger Is value (presumably somewhere in the 1E-09 range).But even with large R and a larger Is, I still have a denominator that is < 1, leading to a larger x in ln(x).
I would like to get x = Vin.
Is there an alternate circuit design that can achieve this? Or are there ready-made chips that would do this more easily? I'll obviously need the antilog of the same.
Warren