Maker Pro
Maker Pro

Instantaneous (analogue) compression of speech signals

R

Rick

John Woodgate said:
I read in sci.electronics.design that Rick <[email protected]>

I wouldn't call that a true log amp. How is it done?

It's done by cascading a series of identical stages - each of which is
two long-tailed pairs with common load resistors and common inputs;
one LTP has a small tail current and is undegenerated (hence high
gain but limits quickly), the other is degenerated to unity gain and
doesn't run out of steam. The composite result of each LTP-pair is a
high gain up to a certain input voltage, and unity gain thereafter.
 
J

John Woodgate

I read in sci.electronics.design that Rick <[email protected]>
wrote (in said:
It's done by cascading a series of identical stages - each of which is
two long-tailed pairs with common load resistors and common inputs;
one LTP has a small tail current and is undegenerated (hence high
gain but limits quickly), the other is degenerated to unity gain and
doesn't run out of steam. The composite result of each LTP-pair is a
high gain up to a certain input voltage, and unity gain thereafter.
I think this is called a 'progressive overload' log-amp and gives a
piece-wise linear approximation to a log response. My HP audio wave
analyser has one. It requires numerous stages to get a reasonably
accurate log response.
 
R

Rick

John Woodgate said:
I read in sci.electronics.design that Rick <[email protected]>
I think this is called a 'progressive overload' log-amp

Never heard it called that before. It's been called "True" since at
least 1980, when Plessey published their circuit in IEEE JSSC (Vol SC-15,
No.3), "A True Logarithmic Amplifier for Radar IF Applications.". Other
manufacturers such as Philips and Analog Devices also refer to this
circuit topology as "true log".
and gives a
piece-wise linear approximation to a log response. My HP audio wave
analyser has one. It requires numerous stages to get a reasonably
accurate log response.

Yes.
 
J

Jim Thompson

I read in sci.electronics.design that Jim Thompson
4ax.com>) about 'Instantaneous (analogue) compression of speech
signals', on Wed, 5 Jan 2005:
See...

Newsgroups: alt.binaries.schematics.electronic
Subject: Audio Clipping Question, ala S.E.D (Woodgate) -
TanhClipper.pdf
Message-ID: <[email protected]>

It hasn't come through. Could you please email to me at JMW[at]JMWA[dot]
demon.co.uk?

Will do.

...Jim Thompson
 
B

Ben Bradley

I read in sci.electronics.design that Jim Thompson
4ax.com>) about 'Instantaneous (analogue) compression of speech
signals', on Tue, 4 Jan 2005:


This is helpful for theory but the devices are not now available, I
think.

I'll come back to the file at this link...
Not instantaneous; these use a rectifier and thus involve at least one
time-constant.

Any VCA-based (or "opto" [LED/Light Bulb and light-dependent
resistor] or vacuum-tube based "Vari-MU") compressor or limiter will
"involve at least one time constant" but the definition of a "limiter"
is (in addition to a near-infinite compression ratio) that the attack
time is short enough to be negligible and no peak will come through.

You didn't object to the circuitry in the first link (AN176.pdf)
not being instantaneous, and for the circuits described, it's clearly
not. Quoting from page 10-6:

"CRECT acts as the rectifier’s filter cap and directly affects the
response time of the circuit. There is a trade-off, though, between
fast attack and decay times and distortion."

It doesn't take too much circuitry to make the attack and decay
times independent (little more than an op-amp as voltage follower) and
have the attack time arbitrarily short, though of course a fast attack
will always distort the first wave at the onset of a louder signal, as
the gain is reduced as the instantaneous input signal goes above the
threshold. This might make a 'click' as the first quarter-cycle or so
is flattened, but I don't think it should be too audible or
objectionable.*

You might ask this on rec.audio.pro where they use this sort of
stuff every day.

* Unless you also set the release time to be very short. Go to
http://www.fmraudio.com/ , click on FAQ, and see the discussion for
the fourth question, "Why does the RNC distort my bass guitar?"
 
G

gwhite

John said:
I read in sci.electronics.design that Jim Thompson
4ax.com>) about 'Instantaneous (analogue) compression of speech
signals', on Wed, 5 Jan 2005:
See...

Newsgroups: alt.binaries.schematics.electronic
Subject: Audio Clipping Question, ala S.E.D (Woodgate) -
TanhClipper.pdf
Message-ID: <[email protected]>

It hasn't come through. Could you please email to me at JMW[at]JMWA[dot]
demon.co.uk?


I don't know what Jim is providing. But perhaps for "soft instantaneous
clipping" you could simply do a piecewise softening with diodes in whatever
manner you wish. The u-Law compressors for telco often use that technique. You
can structure the onset of piece-wise clipping (really gain reduction) however
you want.
 
J

John Woodgate

I read in sci.electronics.design that Ben Bradley <ben_nospam_bradley@mi
ndspring.com> wrote (in <[email protected]>)
about 'Instantaneous (analogue) compression of speech signals', on Thu,
6 Jan 2005:
You didn't object to the circuitry in the first link (AN176.pdf) not
being instantaneous, and for the circuits described, it's clearly not.

I'm not interested in an argument. I may not have commented on that
point, but it's an overall requirement, as shown by the word
'instantaneous' in the Subject line.
 
J

John Woodgate

(in <[email protected]>) about 'Instantaneous (analogue)
compression of speech signals', on Thu, 6 Jan 2005:

I don't know what Jim is providing.

'Tanh' is an unmistakable sign of 'long-tailed pair'.
But perhaps for "soft instantaneous
clipping" you could simply do a piecewise softening with diodes in
whatever manner you wish. The u-Law compressors for telco often use
that technique. You can structure the onset of piece-wise clipping
(really gain reduction) however you want.

I'm using diodes at present. My search is for something that is
theoretically and practically 'better' than diodes, in the sense of more
compression range for less subjectively-assessed non-linearity
distortion (i.e. mostly low-order is preferable to a flat harmonic
spectrum or, even worse, more high-order).
 
R

Rolavine

Subject: Re: Instantaneous (analogue) compression of speech signals
From: John Woodgate

I read in sci.electronics.design that John Larkin <[email protected]>

True, this technique is well-known, but it's costly. I'm looking for an
ingenious low-cost solution.
National Semiconductor has a good audio agc circuit for their dual
transconductance amp (LM13700). How cheap is cheap for you? The next cheapest
thing I could think of would be to use a jfet as a voltage controlled resistor,
however for that to work without an amplifier you would need a fairly large
amplitude audio signal to begin with as the peaks would determine the amount of
resistance in the jfet.
 
J

Jim Thompson

I read in sci.electronics.design that Ben Bradley <ben_nospam_bradley@mi
ndspring.com> wrote (in <[email protected]>)
about 'Instantaneous (analogue) compression of speech signals', on Thu,
6 Jan 2005:

I'm not interested in an argument. I may not have commented on that
point, but it's an overall requirement, as shown by the word
'instantaneous' in the Subject line.

Come on now John, are you saying you know what you want more than we
do ?:)

...Jim Thompson
 
J

John Woodgate

I read in sci.electronics.design that Jim Thompson
4ax.com>) about 'Instantaneous (analogue) compression of speech
signals', on Thu, 6 Jan 2005:
Come on now John, are you saying you know what you want more than we do
?:)

How could I possibly be so presumptuous?
 
K

Ken Smith

I read in sci.electronics.design that Ben Bradley <ben_nospam_bradley@mi
ndspring.com> wrote (in <[email protected]>)
about 'Instantaneous (analogue) compression of speech signals', on Thu,
6 Jan 2005:

I'm not interested in an argument. I may not have commented on that
point, but it's an overall requirement, as shown by the word
'instantaneous' in the Subject line.

Can you stand a little delay in the output signal? I'm thinking in terms
of a mS or so. Earlier, I suggested something like a slew rate limit to
supress the high frequency components of the result. I have a 1/2 formed
idea that may do a bit better based on using a couple of "all pass
filters".

I'm at work waiting for a sim. to finish so thinking it through will have
to wait for tonight.
 
J

John Woodgate

I read in sci.electronics.design that Ken Smith
about 'Instantaneous (analogue) compression of speech signals', on Thu,
6 Jan 2005:
Can you stand a little delay in the output signal?
Yes. In fact, if you could make two channels, one having 10 ms more
delay than the other, I could use that for another useful purpose.
 
K

Ken Smith

If you take a sine wave and run it through a circuit that does:


Y = X ^(17/19)

the sine wave's RMS amplitude will be compressed towards about 0.98V RMS
and there will be some distortion. The 3rd harmonic will be about 2.7%.

Assume that the sine wave we start with is 300Hz.

A phase shifter (all pass filter) can be made with a Q such that the
900Hz, 3rd harmonic is shifted by 180 degree relative to the 300Hz
sinewave.

If we take this shifted signal and do another X^(17/19) operation on it,
the 3rd harmonic will only be about 0.2%

You don't need the phase shift to be exactly 180 degrees. Any non-zero
phase shift and two steps of (17/19) soft clipping will result in less
harmonic content than one step of (17/19)^2 clipping would produce.

If more distortion can be lived with, a lower power such as (11/13) could
be used.

Since the band of interest is 300Hz to 3KHz, we don't have to worry about
the harmonics of the frequencies above 1KHz. Those can be removed with a
simple low pass filter. I haven't verified it yet but it seems to me that
3 stages of phase shifter and 4 clippers should be able to make a
significant compression of amplitude but make less that 5% distortion on a
sine wave.

The intermodulation distortion will not be made zero by this method. If
the input has more than one frequency component, the distortion will be
much higher.
 
G

gwhite

John said:
'Tanh' is an unmistakable sign of 'long-tailed pair'.


I'm using diodes at present. My search is for something that is
theoretically and practically 'better' than diodes, in the sense of more
compression range for less subjectively-assessed non-linearity
distortion (i.e. mostly low-order is preferable to a flat harmonic
spectrum or, even worse, more high-order).


You have stated that it is perhaps desirable to limit the distortion term(s) in
the instantaneous compressor (limiter) to only third order with the precept that
distortion will at the least be less objectionable. This is possible to a
point. The polynomial concept recalls the commonplace linear radio PA
terminology of "strong non-linearity" and "weak non-linearity. When a "linear"
device is driven into saturation or cutoff, then it is said to be exhibiting
strong non-linearity. Since no device is perfectly linear, the *approach* to
the hard on-off state is referred to the weak non-linearity region.

For the weak region of non-linearity, the standard polynomial model is used.
Because the question in this case invloves only speech frequencies, we can
comfortably ignore memory effects and avoid the nasty Volterra analysis and
kernal generation that would otherwise be needed. More commonly, the problem is
backwards from the present: we would be hoping to generate a memoryless
polynomial model of the imperfect amplifier and inverse it for the purpose of
predistortion cancellation of the non-linear terms in the polynomial model.
Here we hope to *generate* a third order polynomial distortion into the
amplifier.

The following example polynomial expresses the idea:

y = 3*x - x^3, |x| < 1

The gain of the example circuit is three for small signals (coefficient of the
linear term: the whole idea can be scaled, but is normalized here). The domain
limits of +/-1 are where the slope of the transfer function us zero. In
practice this is precisely the boundary where a practical circuit transitions
from weak non-linearity to strong-nonlinearity. IOW, it is hard clipping where
|x| > 1. This is what was meant in a previous comment about polynomial
representation as "possible up to a point." So the actual transfer function
shall more completely be as follows:

{3*x - x^3, |x| < 1
y = { 1 , x > 1
{-1 , x < -1

The practical limit of clamping can ultimately not be avoided (nor would we want
to avoid it given the x^3 term), it can only be traded off regarding the various
specification constraints. To the extent the circiut has fidelity to the
polynomial model, then for all input levels between -1 and +1, *only* third
order distortion product will be present. Thus the clipping is "soft" till it
*smoothly* (no undefined first derivatives) moves into the hard clipping region.

Since the basic normalized model is known, the next question is simple and
inexpensive implementation. Multipliers can be configured to provide the cubic
function explicitly. However, with there is no obvious intuition regarding the
*necessary* smooth transition from cubic polynomial to hard limiting. Moreover,
it is questionable how "simple" the idea of using multipliers is anyway. A
simplistic implementation that comes to mind is to attempt a basic piecewise
circuit of diodes. The "last" diodes to turn on would clamp to the the
normalized +/-1 values. Piecewise diode compression is common, likely because
it is straightforward and "always works."

The y = K*tanh(x) idea has also been proposed. The series expansion is:

tanh(x) = x - x^3/3 + 2*x^5/15 - 17*x^7/315 + ..., -pi/2<x<pi/2

Obviously distortion terms of higher order than three exist. This may or may
not be a problem when practical considerations are made. I wonder if a
combination of tanh and cleverly placed/biased diodes might offer the most
elegant solution that has high compliance to third order only performance.

It is interesting to note that the first two terms of my third order equation
and the tanh equation are identical (just multiply my equation by 1/3). This
was not intentional -- I only noticed afterwards. In that sense, the tanh is a
pretty good approximation right out of the gate.

The MATLAB plot is interesting:
Just start to bend tanh curve with diodes as it approachs the +/-1 saturation
points and you got it (since the two curves lay right on top of each other
otherwise). I also wonder if the natural saturation of the tanh could be
coordinated to do it *without* the diodes. Maybe...

~~~~~~~~~~~~~~~~~~~
With regard to the other question of *increasing* articulation index from
straight linear performance given a system that is otherwise non-peak power
limited, I think this is quite dubious. Two-way radios that use the clipping
don't do it because it makes it better at the "exciter." They do it because of
peak transmitter power limitations and noise at the receiver.
 
R

Rich Grise

probably - what's a roob? Is that a reclusive noob?

It's a misspelling of "rube":

rube
n : not very intelligent or interested in culture [syn: yokel,
hick, yahoo, hayseed, bumpkin, chawbacon]

Thanks!
Rich
 
R

Rich Grise

I read in sci.electronics.design that Jim Thompson
4ax.com>) about 'Instantaneous (analogue) compression of speech
signals', on Thu, 6 Jan 2005:


How could I possibly be so presumptuous?

Oh, not to worry! It's easy! ;-)

So far, I've gleaned that you don't want to use just plain ol' diodes, or
a log amp; I'm out of suggestions, but the thread is still a good read. :)

Good Luck!
Rich
 
R

Rich Grise

I read in sci.electronics.design that John Larkin <[email protected]>
wrote (in <[email protected]>) about
'Instantaneous (analogue) compression of speech signals', on Wed, 5 Jan
2005:

True, this technique is well-known, but it's costly. I'm looking for an
ingenious low-cost solution.

I can do that with a -2 ohm resistor, which has a conductance of -half a
mho.

I guess they haven't been able to get those thiotimoline capacitors off
the production line yet ...

;-)
Rich
 
B

Ban

Ken said:
If you take a sine wave and run it through a circuit that does:


Y = X ^(17/19)

the sine wave's RMS amplitude will be compressed towards about 0.98V
RMS and there will be some distortion. The 3rd harmonic will be
about 2.7%.

Absurd, I think you should look how a sine wave changes its values, it gets
zero, then negative, try it then. How do you want to compress, analog or
digital? and how do you want to get the envelop signal. Which time
constants?

Assume that the sine wave we start with is 300Hz.

A phase shifter (all pass filter) can be made with a Q such that the
900Hz, 3rd harmonic is shifted by 180 degree relative to the 300Hz
sinewave.

If we take this shifted signal and do another X^(17/19) operation on
it, the 3rd harmonic will only be about 0.2%

You don't need the phase shift to be exactly 180 degrees. Any
non-zero phase shift and two steps of (17/19) soft clipping will
result in less harmonic content than one step of (17/19)^2 clipping
would produce.

If more distortion can be lived with, a lower power such as (11/13)
could be used.

Since the band of interest is 300Hz to 3KHz, we don't have to worry
about the harmonics of the frequencies above 1KHz. Those can be
removed with a simple low pass filter. I haven't verified it yet but
it seems to me that 3 stages of phase shifter and 4 clippers should
be able to make a significant compression of amplitude but make less
that 5% distortion on a sine wave.

The intermodulation distortion will not be made zero by this method.
If the input has more than one frequency component, the distortion
will be much higher.

Tell me which drugs are you using? Better use a u-law A/D or something
analog like THAT4301(better than 0.1%).
 
Top