A fast algorithm for coordinate rotation without using transcendental functions Jorge Resa 1 , Domingo Cortes 1 , and David Navarro 1 1 Instituto Politecnico Nacional Superior School of Electrical and Mechanical Engineering Av. Santa Ana No. 1000 Mexico City, Mexico. Email: jorgeresa@yahoo.com, domingo.cortes@gmail.com, david.navarro.d@gmail.com AbstractCoordinates rotation is widely used in science and engineering. It has applications on astronomy, im- age processing, robotics, power electronics, etc. This pa- per presents an efficient algorithm to calculate a rotation transform using digital devices. The method is based on the rational trigonometry. Unlike conventional trigonometry which is based on the concepts of angle and distance, the rational trigonometry is based on the concepts of spread and quadrature. In is also presented an analysis of the number of operation that can be saved using a standard math library in a typical situation. Keywords: Coordinate transformation, Rotation matrix, Spread, Rational trigonometry 1. Introduction Coordinate transform is a key concept in mathematics and a very useful tool in engineering. Particularly, coordinate rotation transform is widely employed in image processing, robotics and power electronics among others industrial and scientific applications [1], [2]. Typical application in these areas could require hundreds of rotation transforms per second. The most standard method to carry out a rotation transform is to multiply the original coordinates times a special matrix called rotation matrix. The elements of such matrix are trigonometric functions of the rotation angle. Numerical methods are necessary to calculate trigonomet- ric functions using digital devices. In general, first power terms of the power series is employed. For example to calculate sin(α) the first five terms of its Taylor series can be used if α [-π,π]. However, if the angle is not in this interval the error increase rapidly. Hence it is necessary to preprocess the angle before using the Taylor series. Furthermore, calculation of the five terms of Taylor series, depending on the variable type (float, frac, etc.), requires additional calculations to obtain the coefficients for each term. The fact that evaluation of several trigonometric functions is necessary to calculate a single rotation matrix together with the high number of rotation transforms per second that are necessary to perform in a typical application make the use of high power computing devices mandatory for such applications. In power electronics for example, the need of many rotation transform per second prevent the use of low cost microcontrollers for common industrial applications like inverters, active filters and motor drives. This circumstance could be changed with a more efficient methods to perform a rotation transform. The search for efficient methods to perform coordinates rotation has a long history [3] and still continues. The cordic method for example has attracted many effort in the past decades [3], [4], [5], [6]. Recently, some mathematicians have questioned the need of real numbers in math [7], [8]. They say that all math ideas could be expressed with rationals and some irrational numbers. Seeking to solve trigonometrical problems without using real numbers the concept of spread has been intro- duced [7], [8]. Spread substitutes the angle notion and hence eliminates the necessity of using transcendental functions as sin and cos. These ideas has risen a debate about whether the real numbers are necessary or not. No matter how this debate ends, in this paper it is shown that the spread concept has practical implications. The spread concept is extended to perform rotation transforms more efficiently than the standard method. As a consequence, the time for these transformations are significantly reduced. Moreover, the proposed method is easier to program and requires less memory. The paper is organized as follows. In Section 2 the standard method to perform a rotation transform is revisited. To keep the figures simple the two dimensional case is used. Nevertheless the tree dimensional case is very similar. In Section 3 the spread concept is explained. In this Section is also shown how the spread concept allow to solve trigono- metric problems without transcendental functions and why it is necessary to extend the concept to make it useful for coordinates rotation. In Section 4 the spread concept is ex- tended to allow rotation transforms. In Section 5 an analysis is carried out to precise the performance improvement that could be expected with the proposed method in comparison with the standard method. Finally some conclusions are 42 Int'l Conf. Scientific Computing | CSC'15 |