Download Companding in Fixed Point DSPs

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Battle of the Beams wikipedia , lookup

Oscilloscope types wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Telecommunication wikipedia , lookup

Signal Corps (United States Army) wikipedia , lookup

Oscilloscope wikipedia , lookup

Amplifier wikipedia , lookup

Integrating ADC wikipedia , lookup

Schmitt trigger wikipedia , lookup

Cellular repeater wikipedia , lookup

HD-MAC wikipedia , lookup

Phase-locked loop wikipedia , lookup

Operational amplifier wikipedia , lookup

Radio transmitter design wikipedia , lookup

Analog television wikipedia , lookup

Valve audio amplifier technical specification wikipedia , lookup

Flip-flop (electronics) wikipedia , lookup

Quantization (signal processing) wikipedia , lookup

Transistor–transistor logic wikipedia , lookup

Dynamic range compression wikipedia , lookup

Oscilloscope history wikipedia , lookup

Valve RF amplifier wikipedia , lookup

Rectiverter wikipedia , lookup

High-frequency direction finding wikipedia , lookup

Opto-isolator wikipedia , lookup

Analog-to-digital converter wikipedia , lookup

Transcript
Companding in Fixed Point DSPs
A scheme to reduce the quantization
(roundoff) errors in Fixed Point DSPs
ADVANTAGE OF LARGE
SIGNALS
• When the signals in the DSP are large, they
take full advantage of the available bits.
• When the signals in the DSP are small, only
a few of the available bits are used.
• The roundoff error is essentially
independent of the signal level, so the
distortion due to roundoff is much worse for
small signals
To reduce roundoff error, I
would like to keep all digital
signals as large as possible at all
times.
Since the system has a set
overflow tolerance, I would
like all digital signals to have a
roughly constant envelope,
where the constant is slightly
lower than the system
overflow tolerance
Suppose I have analog input, u(t), and analog
output, y(t), so I need an ADC and a DAC:
u(t)
ADC
DAC
y(t)
Consider multiplying the analog input by a time
varying signal, g(n), which is LARGE when the
input signal is SMALL, and SMALL when the
input signal is LARGE, so that I get a roughly
constant envelope signal
For example, if env(n) is the (sampled) envelope
of the input, g(n) could be k/env(n) where k is
some constant slightly lower than the system
overflow tolerance level.
If g(n) is LARGE when u(nT) is SMALL, and SMALL
when u(nT) is LARGE, then g(n)*u(nT) stays at a
roughly constant signal level, and can be set large always.
I would therefore like to multiply my input by g(n)
BEFORE it gets to the ADC, so that the ADC ALWAYS
sees a large signal.
To preserve the input/output behavior (but with less
quantization noise), I would like to multiply the output signal
by 1/g(n).
The multiplication by 1/g(n) should come AFTER the DAC so
that THE SIGNAL STAYS LARGE WHENEVER IT IS
DIGITAL.
So I would get:
u(nT)
X
ADC
g(n)
X
DAC
y(nT)
1/g(n)
This is “classical” companding.
The input signal level can vary wildly, but the digital system
sees a signal level that is essentially constant.
This can therefore allow a digital system to cover a large
dynamic range with only a few bits.
But note that there is NO DSP here between the ADC and DAC
I would like to try this with a DSP in between the ADC and DAC.
Would the scheme below work?
u(nT)
g(n)
X
ADC
DSP
DAC
1/g(n)
X
y(nT)
NO! Using classical companding
on a DSP will horribly distort the
input/output behavior
Taking a DSP, multiplying its input by
a time-varying signal g(n), and then
multiplying the output by 1/g(n) will,
in general, CHANGE the input/output
behavior of the DSP (dramatically)
For example, let y(n)=u(n-k)
So the DSP is a k-sample delay.
If I do:
u(nT)
g(n)
X
ADC
Z-k
DAC
X
y(nT)
1/g(n)
•The output is now g(n-k)*u(n-k)/g(n)
•This is NOT equal to u(n-k).
•It is DISTORTED by the factor g(n-k)/g(n).
•This is a time-varying distortion.
•More complicated systems will have more complicated distortions
All is not lost: I can preserve
input/output behavior by making
internal corrections in the DSP
Consider a system given
by:
x(n+1)=A*x(n)+B*u(n)
y(n)=C*x(n)+D*u(n)
I want the internal states to be large for all n,
so I will do a change of basis in the state space:
w(n)=G(n)*x(n)
w(n)=G(n)*x(n) so x(n)=G-1(n)*w(n)
w(n+1)=G(n+1)*x(n+1)=
G(n+1)*A*x(n)+G(n+1)*B*u(n)=
[G(n+1)*A* G-1(n)]*w(n)+[G(n+1)*B]*u(n)
y(n)=[C*G-1(n)]*w(n)+D*u(n)
This is a new internally time-varying system,
whose states are always large, but whose
input/output behavior is identical to the original
system’s!
In block form:
u(nT)
gu(n)
X
ADC
DSP
DAC
G(n)
X
gy(n)
Taken together, the multiplications at the input and
output, along with the internal corrections in the
DSP, ensure two things:
•All digital signals are always large
•The input/output behavior (not including
quantization error) is the same as in the original
(non-companding) DSP
y(nT)
Companding for DSPs
•Multiplies the input by a signal (based on the G(n) matrix), which
ensures that the signal at the ADC is always large.
•Makes internal corrections to the states of the DSP to ensure that the
states are always large.
•Multiplies the output of the DAC by another signal (based on G(n)).
This is necessary, since companding ensures that the output of the DAC
is always large, while the actual output will not always be large.
•These modifications do NOT change the input/output behavior (they
only lower the quantization error).
Project Proposal
•Implement companding on an actual
DSP – a simple digital reverberator
Project Proposal (cont’d)
• For a given output “quality” how many bits
are needed in the original, non-companding
DSP versus in the companding DSP?
• For a given number of bits, how does the
output “quality” compare between the
original, non-companding DSP versus the
companding DSP?
Project Proposal (cont’d)
• Can I quantify the improvements?
For example:
•Mean square error of output
•SNR (as a function of signal level)
•Harmonic distortion in spectrum
I would like to find all these for both the companding and the
non-companding systems as a function of the number of bits
used in the system.