Hyperbolic tangent transfer function

Okay, please forget I mentioned toob sound. Thank you.

Does anybody have any suggestions for me on the best way to build a precise, stable, symmetrical hyperbolic tangent transfer function generator?

I have built (but not yet quantified the errors on) a circuit based on the LM13700 dual transconductance amplifier. How can I do it better?

Reply to
John Popelish
Loading thread data ...

For what range of inputs and what precision?

tanh(x)=x is pretty good for (within a few %) for x1. For that matter, tanh(x) = 1 is good to a percent for x>3 :-).

In between it's a matter of blending :-).

I think there's a section in the MIT Radiation Lab Volume 19 book "Waveforms", that talks specifically about tanh and generically about synthesizing nonlinear functions out of real-world compoents. I'll see if I can dig it up. (Are these scanned and on the web anywhere?)

Tim.

Reply to
Tim Shoppa

Yes.

AD->uP->programing->DAC

Yeh....long live analogue...

Kevin Aylward snipped-for-privacy@anasoft.co.uk

formatting link
SuperSpice, a very affordable Mixed-Mode Windows Simulator with Schematic Capture, Waveform Display, FFT's and Filter Design.

Reply to
Kevin Aylward

Without checking my math, I do believe that an ordinary bipolar differential pair has TANH for a transfer function.

Pretty small range, but can be built out. Look into some of Barrie Gilbert's paper's.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

On Mon, 09 May 2005 23:08:49 -0400, John Popelish wroth:

If I wanted to synthesize an arbitrary monotonic function, I'd start with a string of diodes and resistors. PWL. Not piece-wise linear, but piece-wise logarithmic.

Jim

Reply to
James Meyer

Okay, so the entire purpose of this tanh exercise is to do signal companding, right? Any particular purpose for prefering tanh(x) over the usual log(x) way of doing it? Also, what are your bandwidth and cost requirements? One or the other must be pretty severe if just going to a 16 bit ADC isn't a far easier option.

Reply to
Rob Gaddi

I am passing the signal through this transfer function to prepare it for an A/D converter. Using a 10 bit A/D this will give me something between 12 and 16 bit resolution for the central 10% of the span, and something like 6 bit resolution at the peaks. Creating the transfer function with a 16 bit A/D DAC combination kind of defeats the purpose.

Reply to
John Popelish

Then I have to control temperature of those diodes or correct the result for temperature variations. At least the PWL version can e pretty stable. But either of these is more complicated than the transconductance amplifier, I think. My difficulty is quantifying the precision of the transconductance amplifier. If I had a temperature controllable differential pair, I could use opamps to form the rest of the circuit, and eliminate most of the tolerances.

Reply to
John Popelish

Thank you. I would like to see that.

It is my understanding that an ordinary differential amplifier made with two junction transistors produce a tanh transfer function as the difference of their collector currents, based simply on the physics of their operation. See bottom of page 8:

formatting link

The simplest way to extract this transfer function seems to be an integrated transconductance amplifier, like the LM13700 (or CA3080), but all those current mirrors add rather unspecified errors to the front end transfer function.

Reply to
John Popelish

This is what I am counting upon.

There is a temperature term in there to be dealt with. My original post called "Toob Sound?" described how I use the two spare darlington transistors in the LM13700 chip and the voltage drop across the gain control current mirror to devise a chip temperature control loop. That seems to work pretty well. But all the current mirrors between the differential pair and the current output are not very well characterized, so I am worried about the final accuracy.

I could surround a differential pair with a few opamps and subtract the two collector currents with that and eliminate the current mirror errors, but I still need to control the temperature of the differential pair. Perhaps I can get a dual pair and use one as a heater to control the temperature of the other. I hate to have to build an oven around the device.

Reply to
John Popelish

I would like very much to read Gilbert's papers, but I keep running into IEEE requests for my membership number (which I don't have).

Reply to
John Popelish

It seems many posting here don't seem to be aware that the basic diff pair is a tanh() function.

Iout = Ie.tanh(Vin/2Vt)

This will be quite accurate over many decades. So, why do anything at all? Its all done!

Kevin Aylward snipped-for-privacy@anasoft.co.uk

formatting link
SuperSpice, a very affordable Mixed-Mode Windows Simulator with Schematic Capture, Waveform Display, FFT's and Filter Design.

Reply to
Kevin Aylward

Right.

The signal swings both ways from zero.

Right now, cost is not a factor, because I am exploring alternatives. The bandwidth is less than 100 Hz. The signal spends 99+% of the time within a few percent of zero. I am working on a means to connect a seismometer to a PC, and one way involves using the very inexpensive and available 10 bit converter sold by DataQ:

formatting link

Right now, it is more of an educational exercise than a product.

Reply to
John Popelish

It will be quite an effort to get a stable output voltage, since the differential amplifier transfer function has the factor (Vin/2Vt) in it, Vt being the temperature voltage around 25.5mV at room temp.. Transistors need to be matched, I recommend LM198 there can be an offset pot. With 0.1mA the input impedance is 80k. You can use a PTC with +3300ppm to compensate for the Ut temperature dependency. The circuit is also useful to convert a triangle wave to a sin. the best conversion is with +/- 2.8Ut=72mV. then the distortion is minimal 1.3%, but can be lowered with an additional diode pair to 0.4%. I paste you again my proposition here:

+15V o | _V_ .---|___|---. | 1k | .-. .-. | | | | R2_ | |R1 | |R1 +-|___|-GND +/-10V '-'150k '-'150k |100k o | | | |\\ | | +-------+---|+\\ .-. | | | >-+--o Uout | | +-----------)-------+---|-/ | +/-10V | |19k | | | |/ | '-' | | | __100k| | |/ \\| +-|___|--+ +----| LM198 |-+ R2 | |>
Reply to
Ban

Should be LM194 or 394

--
ciao Ban
Bordighera, Italy
Reply to
Ban

Check page 4:

formatting link

--
Regards,
  Bob Monsen
Reply to
Bob Monsen

Thanks for an interesting possibility that still allows the use of this data logger.

Reply to
John Popelish

Hi,

For that bandwidth, it would be better to use an ADC with 16 or 18 bits.

If you really want to use the (I agree, very cheap) datalogger you mentioned, here's an idea: You could feed your signal to CH1, and also a 10x version of it to CH2, using a simple amplifier. Depending on the input circuitry, you might need protection zeners (two in anti-series, from line to the 0 V node, at each channel input that would otherwise be "overloaded"). You would then have two waveforms to look at: one 1x and one 10x. During the time intervals where the 10x saturates, you would look at the 1x. You could work out some signal processing (at the PC) to (more or less) seamlessly convey them into one displayed signal. You could use the time when none of the channel saturates to "cross-calibrate" the dependencies (you would be calibrating your analog amp).

Since the datalogger has four channels, you could extend the idea to have {1x, 5x, 10x and 50x} simultaneous resolutions, for instance.

Best, Mochuelo.

Reply to
Mochuelo

Well, if the output saturation voltage of your amp is lower than the max input voltage of the channel input, of course you don't need anything.

Reply to
Mochuelo

On Tue, 10 May 2005 12:49:34 -0400, John Popelish wroth:

If size isn't a big concern, a small circuit board (or stack of two boards) with the diode/resistor string and a resistive heater and a thermistor placed in a styrofoam container could do the job. You'd then have access to all the internal circuitry to tweak to your heart's content. A cube 2 inches on a side would probably be big enough. OCXO's are about the same size.

Jim

Reply to
James Meyer

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.