Re: How do you keep track of what all the numbers mean?
- From: "Wilson" <pleasegoup@xxxxxxxxx>
- Date: 30 Jun 2006 20:45:04 -0700
Rune Allnor wrote:
Wilson wrote:
I am looking for suggestions on tricks people use to keep track of what
all the fixed-point data values mean in their system. By this, I mean
that if you develop a floating point representation of a system, how do
you line up the signals and other values when you go to a fixed point
(i.e. hardware) representation of the model?
I haven't done any fixed-point programming myself, but the impression
I get from people who do, is that the main issue is to avoid overflow
and underflow. I can only guess as to how they achieve this,
but I would suspect that scaling constants is a main part of it.
For example, if I have a floating point simulation of a FIR filter,
when I implement this in hardware, it is done with integer data paths
and integer coefficients. The integer data will have a certain number
of data bits, and the coefficients may have different numbers of data
bits. There will be an assumed scaling between the floating point
representation and the fixed point representation. Are there a
procedures that you would suggest for how to keep track of these two
realms so that a meaningful relationship is maintained?
As another example, at the input of an ADC, you may have an arrangement
where the peak input of the ADC in 1 Volt. Does it make sense to
somehow keep track of this voltage scaling as you go through your
digital signal processing (in fixed point) so that you can line-up
different representations of the system in a meaningful way?
It depends on the application. There key term is "calibrated systems".
A "calibrated" system is one where you are supposed to measure
a physical quantity. A good example is the sound dB meter, where
absolute physical sound pressure is the key output. In this application
you need to keep track of all conversion constants, scalings etc.
In practice, the instrument must be calibrated every now and then.
A CD player, on the other hand, only needs to replicate the waveform
of the sound that was once recorded. Absolute sound pressure is
of less concern; the user adjusts the reproduced sound intensity
with the Volume knob anyway.
This is important because when you implement the system in hardware,
you want to make sure that the filter cutoff, loop bandwidths, etc. are
maintained amongst the theoretical / floating-point / hardware models.
All these factors are independent of scale, provided you stay inside
the dynamic range of the fixed point system.
I have tried to do things like this in the past, by keeping track of
the resolution of an LSB (as a voltage) but never been completely happy
with the usefulness of the effort.
In general, I'd say that there *are* applications where calibration is
needed. However, they are relatively rare so by and large, the
generalist DSP practisioner does not need to consider calibration
issues.
Rune
Rune,
Thanks for your comments. The issues I have stuggled with in the
past are in systems which have a feedback loops (e.g. LMS equalizers,
PLLs, etc.) In an LMS equalizer, for example, the convergence speed
will depend upon the input signal power. So the stepsize of the LMS
algorithm that you arrive at in the floating point simulation will have
to somehow be related to the corresponding value in the fixed point
model. It's a little bit tricky to work through the different data and
coefficient scaling to ensure that the hardware stepsize matches the
floating point stepsize.
I know there are different ways to interpret the data values (e.g.
fractional format vs. integer format). What I am looking for is some
way to represent the fixed point numbers in a way that makes it easy to
account for these different scaling values.
It has always seemed to me that the numbers we used in DSP are, in some
applications, less meaningful without the associated units that go with
them.
So, in my LMS equalizer example, if my floating point equalizer input
has units of 'Volt' , but my fixed point equalizer input LSB
represents 1/1024 'Volt' then I know a data scaling relationship
between these two systems.
I am wondering if anyone has some suggestions for how to keep track of
the different data scales in systems like these.
Wilson
.
- Follow-Ups:
- Re: How do you keep track of what all the numbers mean?
- From: Rune Allnor
- Re: How do you keep track of what all the numbers mean?
- References:
- Re: How do you keep track of what all the numbers mean?
- From: Rune Allnor
- Re: How do you keep track of what all the numbers mean?
- Prev by Date: Re: How do you keep track of what all the numbers mean?
- Next by Date: Re: How do you keep track of what all the numbers mean?
- Previous by thread: Re: How do you keep track of what all the numbers mean?
- Next by thread: Re: How do you keep track of what all the numbers mean?
- Index(es):
Relevant Pages
|