In this paper, we have proposed a novel VLSI-oriented approach to computing the rotation matrix entries from the quaternion coefficients. The advantage of this approach is the complete elimination of multiplications and replacing them by less costly squarings. Our approach uses Logan's identity, which proposes to replace the calculation of the product of two numbers on summing the squares via the Binomial Theorem. Replacing multiplications by squarings implies reducing power consumption as well as decreases hardware circuit complexity.
1
A Hardware-Efficient Approach to Computing the
Rotation Matrix from a Quaternion
Aleksandr Cariow1 and Galina Cariowa2
1 West Pomeranian University of Technology, Żołnierska 52, 71-210 Szczecin Poland
e-mail acariow@wi.zut.edu.pl
2 West Pomeranian University of Technology, Żołnierska 52, 71-210 Szczecin Poland
e-mail gcariowa@wi.zut.edu.pl
Abstract. In this paper, we have proposed a novel VLSI-oriented approach to
computing the rotation matrix entries from the quaternion coefficients. The ad-
vantage of this approach is the complete elimination of multiplications and re-
placing them by less costly squarings. Our approach uses Logan’s identity, which
proposes to replace the calculation of the product of two numbers on summing
the squares via the Binomial Theorem. Replacing multiplications by squarings
implies reducing power consumption as well as decreases hardware circuit com-
plexity.
Keywords: quaternions, Rotation matrix, Logan’s identity for number mul-
tiplication, computational algorithms
1
Introduction
Quaternions and rotation matrices are used especially in navigation, image encoding,
machine vision, computer graphics, animation, and kinematics [1, 2]. Sometimes, in
the above areas there is a need construction of the rotation matrix based on the vector
described by quaternion. It is well known that 3×3 rotation matrix R3 can be expressed
in term of quaternion
as [2]:
2
3
2
2
2
1
2
0
3
2
1
0
2
0
3
1
1
0
3
2
2
3
2
2
2
1
2
0
3
0
2
1
3
1
2
0
3
0
2
1
2
3
2
2
2
1
2
0
3
)
(
2
)
(
2
)
(
2
)
(
2
)
(
2
)
(
2
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
R
(1)
The above matrix is also called the direction cosine matrix. It is easy to see that the
calculation of the elements of the rotation matrix requires 6 conventional multiplica-
tions, 4 operations of squaring, 6 trivial multiplications by 2 (shifts) and 15 additions.
]
,
,
,
[
3
2
1
0
q
q
q
q
q
2
There are a number of publications describing the rationalization of calculation of the
rotation matrix entries [2, 3]. However, the solutions cited in these publications do not
exhaust all possibilities of rationalization of computing. Below we will show how to
get rid of having to perform multiplication operations with the help of replacing one
nontrivial multiplication by one operation of squaring.
2
The approach
For a more compact representation, we introduce the following notation:
2
,2
1,2
0,2
2
,1
1,1
0,1
2
,0
1,0
0,0
3
c
c
c
c
c
c
c
c
c
R
(2)
where
2
3
2
2
2
1
2
0
0,0
q
q
q
q
c
,
)
(
2
3
0
2
1
1,0
q
q
q
q
c
,
)
(
2
3
1
2
0
2
,0
q
q
q
q
c
,
)
(
2
3
0
2
1
0,1
q
q
q
q
c
,
2
3
2
2
2
1
2
0
1,1
q
q
q
q
c
,
)
(
2
1
0
3
2
2
,1
q
q
q
q
c
,
)
(
2
2
0
3
1
0,2
q
q
q
q
c
,
)
(
2
3
2
1
0
1,2
q
q
q
q
c
,
2
3
2
2
2
1
2
0
2
,2
q
q
q
q
c
.
In 1971, Logan noted that the multiplication of two numbers can be performed us-
ing the following expression [4, 5]:
]
)
[(
2
1
2
2
2
b
a
b
a
ab
(3)
Using the Logan’s identity we can write:
)
(
)
(
)
(
)
(
)
(
2
2
3
2
0
2
2
2
1
2
3
0
2
2
1
3
0
2
1
q
q
q
q
q
q
q
q
q
q
q
q
,
)
(
)
(
)
(
)
(
)
(
2
2
3
2
0
2
2
2
1
2
1
0
2
3
2
1
0
3
2
q
q
q
q
q
q
q
q
q
q
q
q
,
)
(
)
(
)
(
)
(
)
(
2
2
3
2
0
2
2
2
1
2
2
1
2
3
0
2
1
3
0
q
q
q
q
q
q
q
q
q
q
q
q
,
)
(
)
(
)
(
)
(
)
(
2
2
3
2
0
2
2
2
0
2
2
0
2
3
0
2
0
3
0
q
q
q
q
q
q
q
q
q
q
q
q
,
)
(
)
(
)
(
)
(
)
(
2
2
3
2
0
2
2
2
1
2
2
0
2
3
1
2
0
3
1
q
q
q
q
q
q
q
q
q
q
q
q
,
)
(
)
(
)
(
)
(
)
(
2
2
3
2
0
2
2
2
1
2
1
0
2
3
2
1
0
3
2
q
q
q
q
q
q
q
q
q
q
q
q
.
Then the all rotation matrix entries, that previously required performing the multiplica-
tions, can be calculated only with the help of squaring operations:
)
(
)
(
)
(
)
(
2
3
2
0
2
2
2
1
2
3
0
2
2
1
1,0
q
q
q
q
q
q
q
q
c
,
)
(
)
(
)
(
)
(
2
3
2
0
2
2
2
1
2
1
0
2
3
2
2,0
q
q
q
q
q
q
q
q
c
,
3
)
(
)
(
)
(
)
(
2
3
2
0
2
2
2
1
2
2
1
2
3
0
0,1
q
q
q
q
q
q
q
q
c
,
)
(
)
(
)
(
)
(
2
3
2
0
2
2
2
0
2
2
0
2
3
0
2
,1
q
q
q
q
q
q
q
q
c
,
)
(
)
(
)
(
)
(
2
3
2
0
2
2
2
1
2
2
0
2
3
1
0,2
q
q
q
q
q
q
q
q
c
,
)
(
)
(
)
(
)
(
2
3
2
0
2
2
2
1
2
1
0
2
3
2
1,2
q
q
q
q
q
q
q
q
c
.
But, by observing that the expressions above contain duplicate sums, one can easily
reduce the total number of additions.
Introduce the following notations:
0
2
2
1
)
(
q
q
,
1
2
3
0
)
(
q
q
,
2
2
3
2
)
(
q
q
,
3
2
1
0
)
(
q
q
,
4
2
3
1
)
(
q
q
,
5
2
2
0
)
(
q
q
,
0
2
2
2
1
q
q
,
1
2
3
2
0
q
q
,
This content is AI-processed based on open access ArXiv data.