Real Time Systems Design And Analysis

Chapter 7.5.4 - Look-Up Tables

7.5.4   Look-Up Tables

Another variation of the scaled-number concept uses a stored table of function
values at fixed intervals. Such a table, called a look-up table, allows for the
computation of continuous functions using mostly fixed-point arithmetic.

Let f (x) be a continuous real function and let Δx be the interval size. Suppose
it is desired to store n values of f over the range [x0, x0 + (n − 1)Δx] in an array
of scaled integers. Values for the derivative, f' may also be stored in the table.
The choice of Δx represents a trade-off between the size of the table and the
desired resolution of the function. A generic look-up table is given in Table 7.2.

It is well known that the table can be used for the interpolation of x < <
x + Δx by the formula:

 

This calculation is done using integer instructions except for the final multiplication
by the factor (− x)/Δx and conversion to floating point. As a bonus,
the look-up table has faster execution time if happens to be one of the table
values. If f'(x) is also stored in the table, then the look-up formula becomes:

 

This improves the execution time of the interpolation somewhat.

The main advantage in using look-up tables, of course, is speed. If a table value
is found and no interpolation is needed, then the algorithm is much faster than the
corresponding series expansion. In addition, even if interpolation is necessary,

 Table 7.2 A generic function look-up table


Table 7.3 Look-up table for trigonometric functions

the algorithm is interruptible, and hence helps improve performance as compared
to a series expansion.

Look-up tables are widely used in the implementation of continuous functions
such as the exponential sine, cosine, and tangent functions and their inverses.
For example, consider the combined look-up table for sine and cosine using
radian measure shown in Table 7.3. Because these trigonometric functions and
exponentials are used frequently in conjunction with the discrete Fourier transform
(DFT) and discrete cosine transform (DCT), look-up tables can provide
considerable savings in real-time signal processing applications.

 

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: PCMCIA Memory Cards
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.