Maker Pro
Maker Pro

The continuing saga of the hyperbolic tangent

J

John Popelish

Jan 1, 1970
0
Rodger Rosenbaum has been feeding me papers by Barrie Gilbert about
using differential pairs to produce various and wondrous nonlinear
transfer functions. Based on this inspiration, I have decided to try
to fit a sum of my two temperature controlled tanh functions contained
in one LM13700 and a linear gain to generate an arbitrary transfer
function that serves my purposes.

My aim is to have a high gain for signals near zero volts but roll the
gain off as the signal amplitude rises so that my 10 bit +-10 volt A/D
converter has a fixed relative resolution over the widest possible
range.

I have chosen the peak gain to be 8 (to increase the effective
resolution to 13 bits for signals between +-.1 volts and roll the
incremental gain off so that above the lowest possible voltage (about
+-.3 volts) each 1% increase in amplitude moves the output 1 A/D count
up to the full signal range of +-10 volts. And I want a 10 volt input
to produce a 10 volt output. I put all these requirements into a
Mathcad worksheet and produced the following function:

a*tanh(b*input)+c*tanh(d*input)+f*input
with a=3.582, b=1.80, c=3.943, d=0.331, f=.248

I will post graphs of the results under this title on A.B.S.E.
 
T

Tony Williams

Jan 1, 1970
0
Rodger Rosenbaum has been feeding me papers by Barrie Gilbert
about using differential pairs to produce various and wondrous
nonlinear transfer functions. Based on this inspiration, I have
decided to try to fit a sum of my two temperature controlled
tanh functions contained in one LM13700 and a linear gain to
generate an arbitrary transfer function that serves my purposes.

Don't know if is useful but you can use one
side of a dual OTA to temperature-compensate
the other side.
C
+-----||-----+<--V1
| _ |
+----|- \ |
| |Op >---+---[R4]----->Iabc2
| 0v-|+_/ |
| [R3]
| | Iout1 = Iref
+-----------------<----+
| | |
| __ \|/Iabc1 |
'0v'--> +------|+ \ | |
[R2] |OTA1>OO--------+
Vref--> +------|-__/
|
[R1] Iabc1 = 2kT/q(Iref/Vref).
|
\|/Iref Iabc2 = Iabc1(R3/R4).
|
--+-- -Vcc Vref = 25mV or so.

Choose Iref and Vref, which gets R1+R2, then calc
R3+R4 on the assumption that V1= 0v at T= (273+25)K.
 
W

Winfield Hill

Jan 1, 1970
0
Tony Williams wrote...
Rodger Rosenbaum has been feeding me papers by Barrie Gilbert
about using differential pairs to produce various and wondrous
nonlinear transfer functions. Based on this inspiration, I have
decided to try to fit a sum of my two temperature controlled
tanh functions contained in one LM13700 and a linear gain to
generate an arbitrary transfer function that serves my purposes.

Don't know if is useful but you can use one
side of a dual OTA to temperature-compensate
the other side.
C
+-----||-----+<--V1
| _ |
+----|- \ |
| |Op >---+---[R4]----->Iabc2
| 0v-|+_/ |
| [R3]
| | Iout1 = Iref
+-----------------<----+
| | |
| __ \|/Iabc1 |
'0v'--> +------|+ \ | |
[R2] |OTA1>OO--------+
Vref--> +------|-__/
|
[R1] Iabc1 = 2kT/q(Iref/Vref).
|
\|/Iref Iabc2 = Iabc1(R3/R4).
|
--+-- -Vcc Vref = 25mV or so.

Choose Iref and Vref, which gets R1+R2, then calc
R3+R4 on the assumption that V1= 0v at T= (273+25)K.

The LM13700's unused "buffer output" transistors could be used
for heating in a chip-temperature-control scheme.
 
T

The Phantom

Jan 1, 1970
0
The LM13700's unused "buffer output" transistors could be used
for heating in a chip-temperature-control scheme.

Have a look at John's schematic posted 5/13.
 
J

John Popelish

Jan 1, 1970
0
Tony said:
Don't know if is useful but you can use one
side of a dual OTA to temperature-compensate
the other side.
C
+-----||-----+<--V1
| _ |
+----|- \ |
| |Op >---+---[R4]----->Iabc2
| 0v-|+_/ |
| [R3]
| | Iout1 = Iref
+-----------------<----+
| | |
| __ \|/Iabc1 |
'0v'--> +------|+ \ | |
[R2] |OTA1>OO--------+
Vref--> +------|-__/
|
[R1] Iabc1 = 2kT/q(Iref/Vref).
|
\|/Iref Iabc2 = Iabc1(R3/R4).
|
--+-- -Vcc Vref = 25mV or so.

Choose Iref and Vref, which gets R1+R2, then calc
R3+R4 on the assumption that V1= 0v at T= (273+25)K.

I am controlling the actual temperature of my OTA chip, but I want to
make sure I understand your concept.

I assume that Vref is created by Iref passing through R2 (not sure why
R1 is needed unless Iref is just the current through R1 because it is
connected to a large voltage). Then th integrator adjusts the current
to both OTAs to whatever holds the current out of OTA1 equal to Iref.

This would force a fixed transconductance at the given Vref, but I
don't see how it forces a temperature compensated tanh function. The
function is essentially A*tanh(B*Vin) Temperature changes primarily
alter B but you are correcting at a single input voltage by changing A.

Or have I got it all wrong?
 
F

Fred Bloggs

Jan 1, 1970
0
John said:
Tony said:
Don't know if is useful but you can use one
side of a dual OTA to temperature-compensate
the other side.
C
+-----||-----+<--V1
| _ |
+----|- \ |
| |Op >---+---[R4]----->Iabc2
| 0v-|+_/ |
| [R3]
| | Iout1 = Iref
+-----------------<----+
| | |
| __ \|/Iabc1 |
'0v'--> +------|+ \ | |
[R2] |OTA1>OO--------+
Vref--> +------|-__/ |
[R1] Iabc1 = 2kT/q(Iref/Vref).
|
\|/Iref Iabc2 = Iabc1(R3/R4).
|
--+-- -Vcc Vref = 25mV or so.

Choose Iref and Vref, which gets R1+R2, then calc R3+R4 on the
assumption that V1= 0v at T= (273+25)K.


I am controlling the actual temperature of my OTA chip, but I want to
make sure I understand your concept.

I assume that Vref is created by Iref passing through R2 (not sure why
R1 is needed unless Iref is just the current through R1 because it is
connected to a large voltage). Then th integrator adjusts the current
to both OTAs to whatever holds the current out of OTA1 equal to Iref.

This would force a fixed transconductance at the given Vref, but I don't
see how it forces a temperature compensated tanh function. The function
is essentially A*tanh(B*Vin) Temperature changes primarily alter B but
you are correcting at a single input voltage by changing A.

Or have I got it all wrong?

All of the analog crap runs out of steam at 6-bits- you should forget
the idea and look for something else.
 
J

Jim Thompson

Jan 1, 1970
0
Tony said:
Don't know if is useful but you can use one
side of a dual OTA to temperature-compensate
the other side.
C
+-----||-----+<--V1
| _ |
+----|- \ |
| |Op >---+---[R4]----->Iabc2
| 0v-|+_/ |
| [R3]
| | Iout1 = Iref
+-----------------<----+
| | |
| __ \|/Iabc1 |
'0v'--> +------|+ \ | |
[R2] |OTA1>OO--------+
Vref--> +------|-__/
|
[R1] Iabc1 = 2kT/q(Iref/Vref).
|
\|/Iref Iabc2 = Iabc1(R3/R4).
|
--+-- -Vcc Vref = 25mV or so.

Choose Iref and Vref, which gets R1+R2, then calc
R3+R4 on the assumption that V1= 0v at T= (273+25)K.

I am controlling the actual temperature of my OTA chip, but I want to
make sure I understand your concept.

I assume that Vref is created by Iref passing through R2 (not sure why
R1 is needed unless Iref is just the current through R1 because it is
connected to a large voltage). Then th integrator adjusts the current
to both OTAs to whatever holds the current out of OTA1 equal to Iref.

This would force a fixed transconductance at the given Vref, but I
don't see how it forces a temperature compensated tanh function. The
function is essentially A*tanh(B*Vin) Temperature changes primarily
alter B but you are correcting at a single input voltage by changing A.

Or have I got it all wrong?

Simple temperature compensation (with a PTAT) ONLY forces the same
slope (at zero) over temperature. The full-scale varies. The full
TANH compensation CAN be done on-chip, but it's a bitch to do with
off-the-shelf components.

Temperature control is probably the simplest solution, although I can
envision a possibility using thermistors.

I've just been commissioned to do a log IF (at 600MHz)... maybe that
task will provide the impetus to develop some methodology to flatten
the FS portion.

...Jim Thompson
 
J

John Popelish

Jan 1, 1970
0
Jim said:
Simple temperature compensation (with a PTAT) ONLY forces the same
slope (at zero) over temperature. The full-scale varies. The full
TANH compensation CAN be done on-chip, but it's a bitch to do with
off-the-shelf components.

Temperature control is probably the simplest solution, although I can
envision a possibility using thermistors.

I've just been commissioned to do a log IF (at 600MHz)... maybe that
task will provide the impetus to develop some methodology to flatten
the FS portion.

I will be watching if you come up with anything to share.
 
T

Tony Williams

Jan 1, 1970
0
John Popelish said:
Or have I got it all wrong?

Apologies. I have an erratic download/reader atm,
so don't see the whole of threads. In this case
I saw the reference to LM13700, (without really
understanding what had gone on before), and jumped
in with both feet.
 
M

Mike Monett

Jan 1, 1970
0
John Popelish wrote:

[...]
My aim is to have a high gain for signals near zero volts but roll the
gain off as the signal amplitude rises so that my 10 bit +-10 volt A/D
converter has a fixed relative resolution over the widest possible
range.

I have chosen the peak gain to be 8 (to increase the effective
resolution to 13 bits for signals between +-.1 volts and roll the
incremental gain off so that above the lowest possible voltage (about
+-.3 volts) each 1% increase in amplitude moves the output 1 A/D count
up to the full signal range of +-10 volts. And I want a 10 volt input
to produce a 10 volt output. I put all these requirements into a
Mathcad worksheet and produced the following function:

a*tanh(b*input)+c*tanh(d*input)+f*input
with a=3.582, b=1.80, c=3.943, d=0.331, f=.248

I will post graphs of the results under this title on A.B.S.E.

John, I looked at those graphs, and have a question. Suppose you have a
small amplitude signal riding on a larger amplitude one. If you reduce
the gain at high amplitude, won't you lose the small signal? And once the
output of the circuit is digitized, is there is any way to get the small
signal back again?

I saw your argument that the least significant bits in an a/d are not
useful at high signal amplitudes. But aren't these the bits that allow
you to capture a small amplitude signal in the presence of a much larger
one?

Mike Monett
 
J

John Popelish

Jan 1, 1970
0
Mike said:
John Popelish wrote:

[...]

My aim is to have a high gain for signals near zero volts but roll the
gain off as the signal amplitude rises so that my 10 bit +-10 volt A/D
converter has a fixed relative resolution over the widest possible
range.

I have chosen the peak gain to be 8 (to increase the effective
resolution to 13 bits for signals between +-.1 volts and roll the
incremental gain off so that above the lowest possible voltage (about
+-.3 volts) each 1% increase in amplitude moves the output 1 A/D count
up to the full signal range of +-10 volts. And I want a 10 volt input
to produce a 10 volt output. I put all these requirements into a
Mathcad worksheet and produced the following function:

a*tanh(b*input)+c*tanh(d*input)+f*input
with a=3.582, b=1.80, c=3.943, d=0.331, f=.248

I will post graphs of the results under this title on A.B.S.E.


John, I looked at those graphs, and have a question. Suppose you have a
small amplitude signal riding on a larger amplitude one. If you reduce
the gain at high amplitude, won't you lose the small signal? And once the
output of the circuit is digitized, is there is any way to get the small
signal back again?
No.

I saw your argument that the least significant bits in an a/d are not
useful at high signal amplitudes. But aren't these the bits that allow
you to capture a small amplitude signal in the presence of a much larger
one?

Yes they are. But I am looking for the arrival of one event at a time
(earthquakes), especially the arrival of the P and S wave signatures.
The actual quality of the event is not so important as just
identifying its arrival time. Two overlapping earthquakes will be a
pig's breakfast (as far as my ability to interpret the recording),
anyway. Retaining 1% relative resolution for the stronger signals is
plenty, because there are other part of the seismometer that are no
more accurate or linear than that. Most A/D systems use 16 bit
converters, but only use all that resolution for the stuff within 1%
of span near (middle) zero.

This lossy compression is somewhat analogous to how the nonlinear ear
response causes a louder sound to mask the presence of somewhat softer
sounds, but in a frequency dependent way. This masking effect is what
makes one of the compression levels in MPEG level 3 possible. It
calculates what soft spectral components of the sound are inaudible at
the moment because of ear masking, and simply discards those soft
sounds, since you can't hear them at that moment, anyway. This also
saves a lot of bits.
 
M

Mike Monett

Jan 1, 1970
0
John said:
Mike Monett wrote:
[...]
I saw your argument that the least significant bits in an a/d are not
useful at high signal amplitudes. But aren't these the bits that allow
you to capture a small amplitude signal in the presence of a much larger
one?

Yes they are. But I am looking for the arrival of one event at a time
(earthquakes), especially the arrival of the P and S wave signatures.

Monitoring atomic explosions in Korea, by chance?
The actual quality of the event is not so important as just
identifying its arrival time. Two overlapping earthquakes will be a
pig's breakfast (as far as my ability to interpret the recording),
anyway. Retaining 1% relative resolution for the stronger signals is
plenty, because there are other part of the seismometer that are no
more accurate or linear than that. Most A/D systems use 16 bit
converters, but only use all that resolution for the stuff within 1%
of span near (middle) zero.
This lossy compression is somewhat analogous to how the nonlinear ear
response causes a louder sound to mask the presence of somewhat softer
sounds, but in a frequency dependent way. This masking effect is what
makes one of the compression levels in MPEG level 3 possible. It
calculates what soft spectral components of the sound are inaudible at
the moment because of ear masking, and simply discards those soft
sounds, since you can't hear them at that moment, anyway. This also
saves a lot of bits.

That's lossy compression, similar to jpeg. It is fine for photos and sound,
but it can create artifacts on some types of data. For example, using jpg
for engineering graphs where gif, tif and png are better suited.

All the commercial seismometers seem to be 18 or 24 bits. Storage is cheap
- why worry about saving bits? Why not use 16?

Mike Monett
 
J

John Popelish

Jan 1, 1970
0
Mike said:
Monitoring atomic explosions in Korea, by chance?

No. Just garden variety seismic events.
That's lossy compression, similar to jpeg. It is fine for photos and sound,
but it can create artifacts on some types of data. For example, using jpg
for engineering graphs where gif, tif and png are better suited.

All the commercial seismometers seem to be 18 or 24 bits. Storage is cheap
- why worry about saving bits? Why not use 16?

For now, the seismometer application is an excuse for me to explore
the world of nonlinear transfer functions and their uses. I have
built a seismometer mechanism, and am in the process of building the
amplifier and filter electronics. I happen to already have a 10 bit
A/D serial interface for a PC.

http://www.dataq.com/products/startkit/di194rs.htm

So I am trying to come up with a way to make best use of a limited
resolution converter, as a learning experience. I may well throw the
whole thing over after a bit of play and use a 16 bit converter.
 
W

Winfield Hill

Jan 1, 1970
0
John Popelish wrote...
So I am trying to come up with a way to make best use of a limited
resolution converter, as a learning experience. I may well throw
the whole thing over after a bit of play and use a 16 bit converter.

With 24-bit converters becoming commonplace, and selling for under
$10 to the big boys, why fool around with 16 bits, let alone 10?
 
J

John Popelish

Jan 1, 1970
0
Winfield said:
John Popelish wrote...



With 24-bit converters becoming commonplace, and selling for under
$10 to the big boys, why fool around with 16 bits, let alone 10?

To see what it can accomplish. The lessons apply to any digital
resolution.
 
M

Mike Monett

Jan 1, 1970
0
John Popelish wrote:

[...]
For now, the seismometer application is an excuse for me to explore
the world of nonlinear transfer functions and their uses. I have
built a seismometer mechanism, and am in the process of building the
amplifier and filter electronics. I happen to already have a 10 bit
A/D serial interface for a PC.

http://www.dataq.com/products/startkit/di194rs.htm

So I am trying to come up with a way to make best use of a limited
resolution converter, as a learning experience. I may well throw the
whole thing over after a bit of play and use a 16 bit converter.

LOL! I really have to admire your persistence. After going to the trouble
of winding 4 miles of 44 gauge for the coils, I'd be inclined start with
the best a/d I could get:)

Anyway, thanks for the replies. I enjoyed exploring the topic, and found
quite a few references in google. One looks really interesting - a "$2
Diamagnetic Suspension Seismometer", by James Spottiswoode. He shows the
tilt caused by cars entering and leaving a garage, and the effect of wind
noise:

http://www.jsasoc.com/diamagnetic_suspension_seismomet.htm

It seems like it would be simple to automatically adjust the zero by
adding some tilt. But his drum plots seem to be quite stable, so maybe
it's not needed.

Mike Monett
 
M

Mike Monett

Jan 1, 1970
0
Winfield said:
John Popelish wrote...

With 24-bit converters becoming commonplace, and selling for under
$10 to the big boys, why fool around with 16 bits, let alone 10?

The AD7791 claims 22 effective bits for $3.83/1k, with a very simple
serial interface. They allow two free samples:

http://www.analog.com/en/prod/0,2877,AD7791,00.html

The TI ADS1271 is $5.90/1k, offers high sample rate, three operating
modes, and a serial interface that can be daisy-chained. Also free
samples:

http://focus.ti.com/docs/prod/folders/print/ads1271.html

Mike Monett
 
K

Ken Smith

Jan 1, 1970
0
John Popelish said:
For now, the seismometer application is an excuse for me to explore
the world of nonlinear transfer functions and their uses. I have
built a seismometer mechanism, and am in the process of building the
amplifier and filter electronics. I happen to already have a 10 bit
A/D serial interface for a PC.

The earth seriously rolls off any frequencies above 1KHz. If you apply a
high frequency boost to the analog signal before the digitizer and a low
pass in software land, you can easily end up with more bits in the result
than the bits in the converter.

It gives you a dithering effect for free.
 
J

John Popelish

Jan 1, 1970
0
Mike said:
LOL! I really have to admire your persistence. After going to the trouble
of winding 4 miles of 44 gauge for the coils, I'd be inclined start with
the best a/d I could get:)

Anyway, thanks for the replies. I enjoyed exploring the topic, and found
quite a few references in google. One looks really interesting - a "$2
Diamagnetic Suspension Seismometer", by James Spottiswoode. He shows the
tilt caused by cars entering and leaving a garage, and the effect of wind
noise:

http://www.jsasoc.com/diamagnetic_suspension_seismomet.htm

It seems like it would be simple to automatically adjust the zero by
adding some tilt. But his drum plots seem to be quite stable, so maybe
it's not needed.

Thanks for this link. I am also interested in making a differential
photo diode tilt meter using cheap and simple parts (compared to 4
miles of wire and 50$ worth of neodymium iron magnets in a $100 pole
structure.
 
J

John Popelish

Jan 1, 1970
0
Top