30-05-2012, 10:04 AM
A Floating-Point to Fixed-Point Conversion Methodology
for Audio Algorithms
A FloatingPoint to FixedPoint Conversion.pdf (Size: 159.6 KB / Downloads: 257)
INTRODUCTION
An audio signal is an electrical (or optical)
representation of the continuous variation in time
of a sound pressure wave traveling through a
medium such as air. In mathematical terms, we
describe an audio signal as a real function of a
single real variable, where the x-axis represents
time, and the y-axis, the signal amplitude, which
can take an arbitrary value at any point in time; in
other words, an audio signal is analog.
NUMBER REPRESENTATIONS
Floating-Point Representation
Representing infinitely many real numbers
into a finite number of bits requires an approximate
representation. Most calculations involving real
numbers produce quantities that cannot be exactly
represented using a finite number of bits.
Therefore, not only the operands, but also the result
of a floating-point calculation must often be
rounded in order to fit into a finite representation.
There are two reasons why a real number is
not exactly representable as a floating-point
number. The decimal number 0.1 illustrates the
most common situation. Although it has a finite
decimal representation, it has an infinite repeating
binary representation: the number 0.1 lies strictly
between two floating-point numbers and is exactly
representable by neither of them. Another, less
common, situation is that the real number is out of
range, i.e., its absolute value is larger than the
maximum, or smaller than the minimum, floatingpoint
value.
FINITE WORD-LENGTH EFFECTS
Finite word-length effects appear when converting
continuous amplitude signals into discrete
amplitude signals. Since the transition from
continuous amplitude to discrete amplitude is in
principle never completely reversible, there is
always a loss of information, however slight. Finite
word-length effects are very complicated to
analyze because they are non-linear,
i.e., xQ + yQ ¹ (x + y)Q.
For example, by using the truncation
characteristic on the fractional value, we can verify
that (3.7)Q + (4.9)Q ¹ (3.7 + 4.9)Q.
FILTER DESIGN ASPECTS
In a practical digital filter, the number of bits
used for representing the coefficients must be as
small as possible, largely for reasons of cost. The
values found must therefore be quantized. But this
alters the characteristics of the filter, i.e., it changes
the locations of the poles and zeros. These changes
can be very substantial. It may happen that, after
quantization, the filter no longer satisfies the
design specifications that were used in calculating
the real-valued coefficients. In extreme cases, a
stable filter may even become unstable. However,
the quantization of filter coefficients introduces no
changes in the linear operation of a circuit, nor
does it cause any effects that depend on the input
signal or that vary with time. It introduces no more
than a once-calculable change in the filter
characteristics.
AUDIO ALGORITHMS TESTING
STRATEGY
In most audio systems, signals are represented
in 16-bits, providing 96dB of dynamic range,
which is deemed to be sufficient for human hearing
characteristics. However, consecutive operations
on the audio signal, especially scaling, may reduce
the dynamic range (1 bit less equals 6dB decrease
in the SNR). Quantization noise and saturation are
to be taken into consideration since the human ear
is susceptible to them. On the other hand, the
human ear is largely insensitive to phase distortion.
CONCLUSION
We have discussed how fixed-point arithmetic
refers to the handling of numbers that are scaled up
by a certain factor to allow space for fractional
parts. Moreover, we have studied fixed-point DSP
characteristics in order to understand the
techniques for implementing a floating-point
algorithm on a fixed-point processor.