The Embedded Developers Blog

Trig the Easy Way

Mon, 09/26/2005 - 20:00
Digital Signal Processing

One of the real weaknesses of some embedded processors is handling of floating-point calculations. This is particularly problematic in any application that requires trigonometric calculations, which can bog down embedded CPUs like XScale and PowerPC significantly. One choice has been to move to CPUs like Intel’s x86, which include much better floating-point support, but perhaps there is another way to go. A recent article in EE Times described a mathematical approach to trigonometric calculations that avoids many of the trig functions themselves.

Notice that the need for non-integer calculations is not completely removed. The calculations described use ratios of whole numbers which still require fractional calculations. The win is that these ratios should be much more amenable to fixed-point arithmetic rather than full floating point. This could significantly improve the throughput on a number of applications that calculate phase angles, potentially even allowing these calculations to be implemented in hardware rather than software.

These are the kinds of advances that can make significant differences to many embedded systems, even though they are often largely ignored by desktop programmers. I look forward to learning more about it.

Larry Mittag