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?)
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.
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.
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.
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.
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.
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.
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.
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.
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:
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.
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.
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.