use the alpha max plus beta min algorithm. The approximation is expressed as:
For closest approximation, the use
and
giving a maximum error of 3.96%.
To improve accuracy at the expense of a compare operation, if Min ≤ Max/4, we use the coefficients, α = 1 and β = 0;
otherwise, if Min > Max/4, we use α = 7/8 and β = 1/2.
Division by powers of 2 can be easily done in hardware. Error comparisons for various min/max values:
Largest error (%) | Mean error (%) | ||
---|---|---|---|
1/1 | 1/2 | 11.80 | 8.68 |
1/1 | 1/4 | 11.61 | 0.65 |
1/1 | 3/8 | 6.80 | 4.01 |
7/8 | 7/16 | 12.5 | 4.91 |
15/16 | 15/32 | 6.25 | 1.88 |
α0 | β0 | 3.96 | 1.30 |
Sources:
- http://www.dspguru.com/book/export/html/62
- http://en.wikipedia.org/wiki/Alpha_max_plus_beta_min_algorithm
- http://www.eetimes.com/design/embedded/4007218/Digital-Signal-Processing-Tricks--High-speed-vector-magnitude-approximation/
- Mark Allie and Richard Lyons, "A Root of Less Evil," IEEE Signal Processing Magazine, March 2005, pp. 93-96.
No comments:
Post a Comment