Next Article in Journal
Correction: Youn et al. Research on Cyber ISR Visualization Method Based on BGP Archive Data through Hacking Case Analysis of North Korean Cyber-Attack Groups. Electronics 2022, 11, 4142
Next Article in Special Issue
Robust State Estimation Using the Maximum Correntropy Cubature Kalman Filter with Adaptive Cauchy-Kernel Size
Previous Article in Journal
Privacy-First Paradigm for Dynamic Consent Management Systems: Empowering Data Subjects through Decentralized Data Controllers and Privacy-Preserving Techniques
Previous Article in Special Issue
Relative Jitter Measurement Methodology and Comparison of Clocking Resources Jitter in Artix 7 FPGA
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

One-Dimensional Quaternion Discrete Fourier Transform and an Approach to Its Fast Computation

by
Dorota Majorkowska-Mech
*,† and
Aleksandr Cariow
Faculty of Computer Science and Information Technology, West Pomeranian University of Technology in Szczecin, Zolnierska 49, 71-210 Szczecin, Poland
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Electronics 2023, 12(24), 4974; https://doi.org/10.3390/electronics12244974
Submission received: 5 November 2023 / Revised: 8 December 2023 / Accepted: 10 December 2023 / Published: 12 December 2023

Abstract

:
This paper proposes a new method for calculating the quaternion discrete Fourier transform for one-dimensional data. Although the computational complexity of the proposed method still belongs to the O ( N log 2 N ) class, it allows us to reduce the total number of arithmetic operations required to perform it compared to other known methods for computing this transform. Moreover, compared to the method using symplectic decomposition, the presented method does not require changing the basis in the subspace of pure quaternions and, consequently, calculating the new basis vectors and change-of-basis matrix.

1. Introduction

The discrete Fourier transform (DFT) is a fundamental tool for data processing and analysis in many fields of science and technology [1]. The DFT is especially used in digital signal and image processing. If a one-dimensional discrete Fourier transform is used in the processing and analysis of one-dimensional signals, such as speech and other audio signals [2,3], then in the case of image processing and recognition, we are dealing with a two-dimensional DFT [4,5,6,7,8,9].
The rapid development of signal and image processing technologies has led to advanced data processing techniques using data representation and processing in the hypercomplex domain. This led to the proposal to represent each pixel of a color image as a quaternion [10,11,12,13,14].
The old approach to using color channels to process color images was to use separate channels for the primary colors red, green, and blue. This approach divided the color image into three separate channels. In fact, three 2D matrices were formed, as a result of the presence of three channels for color images, and the computations with each matrix were carried out independently in grayscale. With this approach, due to channel separation, the cross-correlation between channels was lost at the start of the process because the color image was not considered as a whole [14,15].
In the quaternion-based method, a color image was considered as one matrix consisting of pure quaternion numbers. Such a matrix is processed as a whole. In order to convert an RGB image into a quaternion matrix, the RGB channels were simply inserted into the vector part of the quaternion matrix. In addition, such a representation of the pixel matrix made it possible to significantly reduce the computational complexity of color image processing methods compared to three-channel processing.
A natural development of research within the framework of the quaternion-valued representation of pixels in color images was the definition of a two-dimensional quaternion discrete Fourier transform (2-D QDFT) and the development of fast algorithms for 2-D QDFT implementation [12,16,17,18,19].
As for the one-dimensional QDFT, this issue has not been studied in detail, since many computer scientists simply did not see the use of such a transform. That is why there are relatively few research studies on this topic [16,19,20,21,22,23,24]. In this article, we would like to fill this gap and give a detailed definition of 1-D QDFT, as well as propose a fast method for its implementation.

2. Quaternions

Quaternions were introduced by Hamilton in 1843 [25]. They fulfill the usual rules of algebra, but their multiplication is not commutative. Quaternions have four components, one real and three imaginary. In usual notation, which comes from complex numbers, the quaternion q is written in the form
q = a + b i + c j + d k
where a, b, c, and d are real numbers, and i, j, k are imaginary units that obey the following rules of multiplication:
i 2 = j 2 = k 2 = 1
i j = k , j i = k , j k = i , k j = i , k i = j , i k = j
Quaternions are also called hypercomplex numbers (together with coquaternions, biquaternions, tessarines, octonions, sedenions, etc.). A quaternion has a real part—a in (1)—and an imaginary part, which has three components and is usually denoted by V ( q ) = b i + c j + d k . The imaginary part V ( q ) of a quaternion may be associated with a 3-space vector [ b , c , d ] T , and it is often called the vector part of the quaternion. For this reason, the real part is often called the scalar part of the quaternion q, and denoted by S ( q ) . The whole quaternion may be represented as q = S ( q ) + V ( q ) , i.e., the sum of its scalar and vector parts. A quaternion in which the real (or scalar) part is equal to zero is called a pure quaternion.
The conjugate of a quaternion q is designed by q ¯ and obtained, as in complex numbers, by negating the imaginary part, so
q ¯ = a b i c j d k
The modulus of a quaternion q follows the definition for complex numbers, so
| q | = q q ¯ = a 2 + b 2 + c 2 + d 2
A quaternion with a unit modulus is called a unit quaternion. The inverse of a quaternion q, denoted by q 1 , such that q q 1 = q 1 q = 1 is given by
q 1 = q ¯ | q | 2
Euler’s formula for the complex exponential is also true for quaternions, so
e μ ϕ = cos ϕ + μ sin ϕ
where μ is a unit pure quaternion and ϕ is a real number–angle. Any quaternion q may be represented in the polar form as
q = | q | e μ ϕ
where μ is called the eigenaxis, and ϕ is called the eigenangle of the quaternion q.
A quaternion q may be also represented as a generalized complex number [26]
q = w + r j
where its real and imaginary parts are ordinary complex numbers
w = a + b i r = c + d i
The imaginary units i and j should be different and orthogonal (where the orthogonality of pure quaternions is understood as for vectors in R 3 vector space). Definition (9) of a quaternion is known as the Cayley–Dickson form. Using this form, the quaternion q may be written as
q = ( a + b i ) + ( c + d i ) j
where it can be seen by multiplying out, using the rules (3), that the result is the same as in the definition (1). The two parts w = a + b i and r = c + d j are called the simplex and perplex parts of the quaternion q, respectively, and the decomposition of the quaternion into these parts is known as symplectic decomposition [26]. Such a decomposition of a quaternion can be used to calculate the QDFT, as will be shown in Section 4.
The product of two quaternions q = a + b i + c j + d k = S ( q ) + V ( q ) and q ^ = a ^ + b ^ i + c ^ j + d ^ k = S ( q ^ ) + V ( q ^ ) can be represented by the products of their scalar and vector parts
q q ^ = a a ^ ( b b ^ + c c ^ + d d ^ ) + a ( b ^ i + c ^ j + d ^ k ) +
a ^ ( b i + c j + d k ) + ( c d ^ d c ^ ) i + ( d b ^ b d ^ ) j + ( b c ^ c b ^ ) k =
S ( q ) S ( q ^ ) V ( q ) · V ( q ^ ) + S ( q ) V ( q ^ ) + S ( q ^ ) V ( q ) + V ( q ) × V ( q ^ )
where “·” denotes the scalar product and “×” denotes the cross product of vectors. Generally, quaternion multiplication is neither commutative nor anti-commutative because the dot product is commutative and the cross product is anti-commutative. When q and q ^ are pure quaternions, then S ( q ) = S ( q ^ ) = 0 , so q q ^ = V ( q ) · V ( q ^ ) + V ( q ) × V ( q ^ ) . If, moreover, V ( q ) · V ( q ^ ) = 0 , we say that pure quaternions q and q ^ are perpendicular ( q q ^ ). Then q q ^ = V ( q ) × V ( q ^ ) and q q ^ = q ^ q . In general, two quaternions whose vector parts are parallel, in the usual vector sense, are called parallel quaternions. Likewise, if their vector parts are perpendicular, they are called perpendicular quaternions [11].

3. Two Types of Quaternion Discrete Fourier Transform

Although the quaternion Fourier transform is mainly used for two-dimensional data, i.e., images, it has been specified for one-dimensional data as well [19,21]. We will only deal with the discrete version of the one-dimensional quaternion Fourier transform.
Let x ( r ) ( n ) , x ( i ) ( n ) , x ( j ) ( n ) , and x ( k ) ( n ) be the components of a discrete quaternion signal x ( n ) with the number of samples N. Then
x ( n ) = x ( r ) ( n ) + x ( i ) ( n ) i + x ( j ) ( n ) j + x ( k ) ( n ) k
for n = 0 , , N 1 , where x ( r ) ( n ) , x ( i ) ( n ) , x ( j ) ( n ) , and x ( k ) ( n ) are real numbers.
Let μ be a unit pure quaternion and μ i , μ j , μ k be its coefficients associated with the imaginary units i, j, k, respectively:
μ = μ i i + μ j j + μ k k
where
| μ | 2 = μ μ ¯ = ( μ i ) 2 + ( μ j ) 2 + ( μ k ) 2 = 1
The choice of μ is arbitrary, but it matters. In applications, the case μ i = μ j = μ k is often used; thus, taking into account (15), we obtain μ = ( i + j + k ) / 3 .
Since quaternion multiplication is not commutative, two different 1-D quaternion discrete Fourier transforms were defined, which are referred to as right-side and left-side QDFTs.
The right-side 1-D quaternion discrete Fourier transform is defined as follows:
y ( m ) = n = 0 N 1 x ( n ) e μ 2 π m n N
for m = 0 , , N 1 , where the quaternion exponents are to the right of x ( n ) , and μ is any unit pure quaternion.
It should be noted that for any choice of μ , μ 2 = 1 , so this transform can be regarded as a generalization of the standard complex discrete Fourier transform in which the imaginary unit i has been generalized to a vector imaginary unit μ . This means that if μ = i and the input signal is complex-valued, that is all samples have values ( x ( r ) ( n ) + x ( i ) i ) , then this transform is reduced to the usual complex-valued discrete Fourier transform.
According to (7), the quaternion exponent can be written in the form
e μ 2 π m n N = cos 2 π m n N μ sin 2 π m n N
or, if we introduce the denotations
a m , n = cos 2 π m n N , b m , n = sin 2 π m n N
and take into account (14), the quaternion exponent can by written as
e μ 2 π m n N = a m , n ( μ i i + μ j j + μ k k ) b m , n
Putting expressions (13) and (19) into (16), the right-side quaternion discrete Fourier transform can be written in the form
y ( m ) = n = 0 N 1 [ x ( r ) ( n ) + x ( i ) ( n ) i + x ( j ) ( n ) j + x ( k ) ( n ) ] [ a m , n ( μ i i + μ j j + μ k k ) b m , n ]
After multiplying the expressions in square brackets, according to the rules (2) and (3) of multiplication of imaginary units, we can write the result as
y ( m ) = y ( r ) ( m ) + y ( i ) ( m ) i + y ( j ) ( m ) j + y ( k ) ( m ) k
where y ( r ) ( m ) , y ( i ) ( m ) , y ( j ) ( m ) , and y ( k ) ( m ) are real numbers. It is easy to check that they take the following forms:
y ( r ) ( m ) = n = 0 N 1 x ( r ) ( n ) a m , n + μ i x ( i ) ( n ) b m , n + μ j x ( j ) ( n ) b m , n + μ k x ( k ) ( n ) b m , n
y ( i ) ( m ) = n = 0 N 1 x ( i ) ( n ) a m , n μ i x ( r ) ( n ) b m , n + μ j x ( k ) ( n ) b m , n μ k x ( j ) ( n ) b m , n
y ( j ) ( m ) = n = 0 N 1 x ( j ) ( n ) a m , n μ i x ( k ) ( n ) b m , n μ j x ( r ) ( n ) b m , n + μ k x ( i ) ( n ) b m , n
y ( k ) ( m ) = n = 0 N 1 x ( k ) ( n ) a m , n + μ i x ( j ) ( n ) b m , n μ j x ( i ) ( n ) b m , n μ k x ( r ) ( n ) b m , n
The left-side 1-D quaternion discrete Fourier transform is defined as
z ( m ) = n = 0 N 1 e μ 2 π m n N x ( n )
for m = 0 , , N 1 , where the quaternion exponents are on the left side in multiplications. Taking into account (13) and (19), the right-side quaternion discrete Fourier transform (26) can be written in the form
z ( m ) = n = 0 N 1 [ a m , n ( μ i i + μ j j + μ k k ) b m , n ] [ x ( r ) ( n ) + x ( i ) ( n ) i + x ( j ) ( n ) j + x ( k ) ( n ) ]
After multiplying the expressions in square brackets, according to the rules (2) and (3) of multiplication of imaginary units, we can write the result as
z ( m ) = z ( r ) ( m ) + z ( i ) ( m ) i + z ( j ) ( m ) j + z ( k ) ( m ) k
where z ( r ) ( m ) , z ( i ) ( m ) , z ( j ) ( m ) , and z ( k ) ( m ) are real numbers. It is easy to check that they take the following forms:
z ( r ) ( m ) = n = 0 N 1 x ( r ) ( n ) a m , n + μ i x ( i ) ( n ) b m , n + μ j x ( j ) ( n ) b m , n + μ k x ( k ) ( n ) b m , n
z ( i ) ( m ) = n = 0 N 1 x ( i ) ( n ) a m , n μ i x ( r ) ( n ) b m , n μ j x ( k ) ( n ) b m , n + μ k x ( j ) ( n ) b m , n
z ( j ) ( m ) = n = 0 N 1 x ( j ) ( n ) a m , n + μ i x ( k ) ( n ) b m , n μ j x ( r ) ( n ) b m , n μ k x ( i ) ( n ) b m , n
z ( k ) ( m ) = n = 0 N 1 x ( k ) ( n ) a m , n μ i x ( j ) ( n ) b m , n + μ j x ( i ) ( n ) b m , n μ k x ( r ) ( n ) b m , n
Unlike the complex-valued DFT, the left-side and right-side QDFTs are slightly different transforms. From (22) and (29), we can see that the real parts of both transforms are the same but the imaginary parts differ from each other in the signs of some components of the sums (compare (23) with (30), (24) with (31), and (25) with (32)). Obviously, this follows from the non-commutative nature of quaternions multiplication. However, if we choose μ = i (i.e., μ i = 1 and μ j = μ k = 0 ) and the complex-valued input signal x ( n ) (i.e., x ( j ) ( n ) = x ( k ) ( n ) = 0 ), then both of these transforms will be reduced to the usual complex-valued DFT.
Moreover, by analyzing (22)–(25) and (29)–(32), it is easy to see that all components of both QDFTs are linear combinations of the real and imaginary parts of four ordinary Fourier transforms for the real signals x ( r ) ( n ) , x ( i ) ( n ) , x ( j ) ( n ) , and x ( k ) ( n ) —components of the quaternion signal x ( n ) . This will be further explained in Section 5. Therefore, for determining the right-side or left-side QDFT, the calculation of four discrete Fourier transforms for the four real-valued components of the quaternion signal is needed.
Figure 1 shows graphical representations of four components of the right-side and the left-side QDFTs for the quaternion signal x ( n ) = x ( r ) ( n ) + x ( i ) ( n ) i + x ( j ) ( n ) j + x ( k ) ( n ) k with N = 16 samples, where
x ( r ) ( n ) = sin n π N n
x ( i ) ( n ) = 4 + n
x ( j ) ( n ) = 10 + sin 2 n π N
x ( k ) ( n ) = 5 + 2 cos n π N

4. Calculation of QDFTs by Symplectic Decomposition

The use of the symplectic decomposition method allows both QDFTs to be computed by performing only two complex-valued discrete Fourier transforms instead of four. This approach was used in [26] to calculate the two-dimensional left-side QDFT. In this work, we will show how to also use the symplectic decomposition method to reduce the computational complexity of calculating one-dimensional right-side and left-side QDFTs.
If we take arbitrary two unit pure quaternions μ 1 and μ 2 , such that μ 1 μ 2 (pure quaternions are perpendicular when their dot product is equal to zero), and the third unit pure quaternion μ 3 = μ 1 μ 2 , we can represent the quaternion signal
x ( n ) = x ( r ) ( n ) + x ( i ) ( n ) i + x ( j ) ( n ) j + x ( k ) ( n ) k
as
x ( n ) = x ( r ) ( n ) + x ( μ 1 ) ( n ) μ 1 + x ( μ 2 ) ( n ) μ 2 + x ( μ 3 ) ( n ) μ 3
The change of the imaginary units from i, j, k to μ 1 , μ 2 , μ 3 corresponds to the change of the basis in R 3 vector space from [ 1 , 0 , 0 ] T , [ 0 , 1 , 0 ] T , [ 0 , 0 , 1 ] T to another basis of three mutually orthogonal unit vectors; so for each sample, we obtain the new coordinates by multiplying the matrix inverse to the change-of-basis matrix by the old coordinates vector
x ( μ 1 ) ( n ) x ( μ 2 ) ( n ) x ( μ 3 ) ( n ) = S 3 1 x ( i ) ( n ) x ( j ) ( n ) x ( k ) ( n )
The change-of-basis matrix S 3 depends on the choice of new imaginary units. For example, if we take the imaginary units μ 1 , μ 2 , μ 3 , as in [26]
μ 1 = 1 3 i + 1 3 j + 1 3 k
μ 2 = 1 2 j 1 2 k
μ 3 = 2 6 i + 1 6 j + 1 6 k
then the change-of-basis matrix has the form
S 3 = 1 3 0 2 6 1 3 1 2 1 6 1 3 1 2 2 6
In Cayley–Dickson form (38) has the form
x ( n ) = [ x ( r ) ( n ) + x ( μ 1 ) ( n ) μ 1 ] + [ x ( μ 2 ) ( n ) + x ( μ 3 ) ( n ) μ 1 ] μ 2
This is a symplectic decomposition of each sample x ( n ) into a simplex part
x ( s ) ( n ) = x ( r ) ( n ) + x ( μ 1 ) ( n ) μ 1
and a perplex part
x ( p ) ( n ) = x ( μ 2 ) ( n ) + x ( μ 3 ) ( n ) μ 1
both isomorphic to the standard complex number. The result is a pair of complex signals. They may be stored using the same space as the quaternion signal x ( n ) . The symplectic decomposition splits a quaternion into two perpendicular planes. These planes intersect only at the origin (in 4-space). Each of these planes may be regarded as an Argand plane. The first is the Argand plane of the simplex part; its real axis is identical to the scalar axis of quaternion space and its imaginary axis is μ 1 . The second is the Argand plane of the perplex part; this plane is perpendicular to both axes of the Argand plane of the simplex part. The real axis of this plane is identical to μ 2 and its imaginary axis is μ 3 .
Let the axis of transform kernel of the right-side QDFT in (16) be chosen as μ 1 , i.e., μ = μ 1 . Then (16), can be rewritten as
y ( m ) = n = 0 N 1 [ x ( s ) ( n ) + x ( p ) ( n ) μ 2 ] e μ 1 2 π m n N
The sum in (47) can be written as the sum of two terms. The first term, which is the simplex part of y ( m ) , has the form
y ( s ) ( m ) = n = 0 N 1 x ( s ) ( n ) e μ 1 2 π m n N = n = 0 N 1 [ x ( r ) ( n ) + x ( μ 1 ) ( n ) μ 1 ] e μ 1 2 π m n N
This is isomorphic to the discrete Fourier transform for a complex input. The only difference is that the imaginary unit is called μ 1 instead of i. Hence, calculation of y ( s ) ( m ) = y ( r ) ( n ) + y ( μ 1 ) ( n ) μ 1 comes down to the computation of a complex DFT for the simplex part x ( s ) ( n ) of x ( n ) . This can be performed using the FFT algorithm. The second term
y ( p ) ( m ) μ 2 = n = 0 N 1 x ( p ) ( n ) μ 2 e μ 1 2 π m n N = n = 0 N 1 x ( p ) ( n ) μ 2 cos 2 π m n N μ 1 sin 2 π m n N =
n = 0 N 1 x ( p ) ( n ) cos 2 π m n N + μ 1 sin 2 π m n N μ 2 = n = 0 N 1 [ x ( μ 2 ) ( n ) + x ( μ 3 ) ( n ) μ 1 ] e μ 1 2 π m n N μ 2
where, during the transformation, we used the equality μ 2 μ 1 = μ 1 μ 2 , which is true for pure, perpendicular quaternions. It is easy to see that y ( p ) ( n ) = y ( μ 2 ) ( n ) + y ( μ 3 ) ( n ) μ 1 is the perplex part of y ( n ) . So, the calculation of y ( p ) ( m ) comes down to the computation of a complex inverse discrete Fourier transform (IDFT) for the perplex part x ( p ) ( n ) of x ( n ) , but without multiplying the result by 1 / N . This can be performed using the IFFT algorithm.
After calculating the simplex and perplex parts of the output signal y ( m ) = y ( r ) ( n ) + y ( μ 1 ) ( n ) μ 1 + y ( μ 2 ) ( n ) μ 3 + y ( μ 3 ) ( n ) μ 3 , we want to write y ( m ) using the imaginary units i, j, and k instead of μ 1 , μ 2 , and μ 3 , i.e.,
y ( m ) = y ( r ) ( m ) + y ( i ) ( m ) i + y ( j ) ( m ) j + y ( k ) ( m ) k
In the associated R 3 vector space, this corresponds to returning to the old base [ 1 , 0 , 0 ] T , [ 0 , 1 , 0 ] T , [ 0 , 0 , 1 ] T , so it can be done by the operation inverse to (39), i.e.,
y ( i ) ( m ) y ( j ) ( m ) y ( k ) ( m ) = S 3 y ( μ 1 ) ( m ) y ( μ 2 ) ( m ) y ( μ 3 ) ( m )
Summarizing the above considerations, in order to calculate the right-side QDFT using symplectic decomposition, the input signal should be represented by new imaginary units such that the first becomes the axis of the transform kernel. This corresponds to a change of the basis in the associated R 3 vector space (for each sample of the quaternion-valued input signal). Then, a single complex DFT and a single complex IDFT should be calculated for the simplex and perplex parts of the quaternion-valued input signal, respectively. Finally, we have to return to the standard imaginary units i, j, and k, which corresponds to a return to the old basis in the associated R 3 vector space.
A similar, and even simpler, consideration may be given to the left-side QDFT. Assuming that the axis of the transform kernel of the left-side QDFT in (26) is chosen as μ 1 , and using the symplectic decomposition of the quaternion input signal x ( n ) , (26), can be rewritten as
z ( m ) = n = 0 N 1 e μ 1 2 π m n N [ x ( s ) ( n ) + x ( p ) ( n ) μ 2 ]
The sum in (52) can be written as the sum of two terms. The first term, which is the simplex part of z ( m ) has the form
z ( s ) ( m ) = n = 0 N 1 e μ 1 2 π m n N x ( s ) ( n ) = n = 0 N 1 e μ 1 2 π m n N [ x ( r ) ( n ) + x ( μ 1 ) ( n ) μ 1 ] =
n = 0 N 1 [ x ( r ) ( n ) + x ( μ 1 ) ( n ) μ 1 ] e μ 1 2 π m n N
Calculation of z ( s ) ( m ) comes down to the computation of complex-valued DFTs for the simplex part x ( s ) ( n ) of x ( n ) . This can be performed using the FFT algorithm. In addition, z ( s ) ( n ) = y ( s ) ( n ) .
The second term has the form
z ( p ) ( m ) μ 2 = n = 0 N 1 e μ 1 2 π m n N x ( p ) ( n ) μ 2 = n = 0 N 1 [ x ( μ 2 ) ( n ) + x ( μ 3 ) ( n ) μ 1 ] e μ 1 2 π m n N μ 2
It is easy to see that z ( p ) ( n ) is the perplex part of z ( n ) . Calculation of z ( p ) ( m ) also comes down to the computation of complex-valued DFTs for the perplex part x ( p ) ( n ) of x ( n ) . This can be performed using the FFT algorithm. Summarizing the above considerations, it can be argued that in order to calculate the left-side QDFT using a symplectic decomposition, the input signal should be represented by new imaginary units, the first of which will be equal to the axis of the transform kernel. This step is the same as in calculating the right-side QDFT. Then two complex DFTs should be calculated—for the simplex and perplex parts of the quaternion-valued input signal. In the end, as with the right-side QDFT calculation, the return to the standard imaginary units i, j, and k is needed.

5. The Simplest Method of QDFT Calculation

We will use the matrix notation to describe the QDFTs. Let x N = [ x 0 , x 1 , , x N 1 ] T be a vector of samples of the quaternion input signal, where x n = x ( n ) for n = 0 , 1 , , N 1 , so it can be written in the form
x N = x 0 ( r ) x 1 ( r ) x N 1 ( r ) + x 0 ( i ) x 1 ( i ) x N 1 ( i ) i + x 0 ( j ) x 1 ( j ) x N 1 ( j ) j + x 0 ( k ) x 1 ( k ) x N 1 ( k ) k
Similarly y N = [ y 0 , y 1 , , y N 1 ] T and z N = [ z 0 , z 1 , , z N 1 ] T are the quaternion output vectors of the right-side and left-side QDFTs, respectively, where y n = y ( n ) and z n = z ( n ) , so they can be written as
y N = y 0 ( r ) y 1 ( r ) y N 1 ( r ) + y 0 ( i ) y 1 ( i ) y N 1 ( i ) i + y 0 ( j ) y 1 ( j ) y N 1 ( j ) j + y 0 ( k ) y 1 ( k ) y N 1 ( k ) k
z N = z 0 ( r ) z 1 ( r ) z N 1 ( r ) + z 0 ( i ) z 1 ( i ) z N 1 ( i ) i + z 0 ( j ) z 1 ( j ) z N 1 ( j ) j + z 0 ( k ) z 1 ( k ) z N 1 ( k ) k
Let square matrices of cosine and sine coefficients be denoted by A N and B N , respectively, so
A N = a 0 , 0 a 0 , 1 a 0 , N 1 a 1 , 0 a 1 , 1 a 1 , N 1 a N 1 , 0 a N 1 , 1 a N 1 , N 1
B N = b 0 , 0 b 0 , 1 b 0 , N 1 b 1 , 0 a 1 , 1 b 1 , N 1 b N 1 , 0 b N 1 , 1 b N 1 , N 1
where the entries a m , n and b m , n of the matrices A N and B N , respectively, are defined in (18). Note that the matrix ( A N B N i ) = F N , where F N is the DFT matrix.
In matrix notation, we can write (22)–(25), which describe the right-side QDFT, in the forms
y N ( r ) = A N x N ( r ) + μ i B N x N ( i ) + μ j B N x N ( j ) + μ k B N x N ( k )
y N ( i ) = A N x N ( i ) μ i B N x N ( r ) + μ j B N x N ( k ) μ k B N x N ( j )
y N ( j ) = A N x N ( j ) μ i B N x N ( k ) μ j B N x N ( r ) + μ k B N x N ( i )
y N ( k ) = A N x N ( k ) + μ i B N x N ( j ) μ j B N x N ( i ) μ k B N x N ( r )
Figure 2 shows a data flow diagram for calculating the right-side QDFT. The straight lines in the figures indicate the data transmission buses, so that each bus simultaneously transmits all elements of a real-valued vector. By default, we assume that data flows from left to right. Therefore, we do not use arrows, so as not to clutter up the drawings. The points at which the lines converge denote the element-wise summation of the input vectors. The rectangles show the operation of multiplying a vector by a matrix, the designation of which is inscribed inside the rectangle, and the circles show the operation of multiplying all elements of the input vector by a constant inscribed in the circle.
Now, we will develop a similar algorithm for the left-side QDFT. In matrix notation, the equivalents of (29)–(32), which describe the left-side QDFT, are as follows:
z N ( r ) = A N x N ( r ) + μ i B N x N ( i ) + μ j B N x N ( j ) + μ k B N x N ( k )
z N ( i ) = A N x N ( i ) μ i B N x N ( r ) μ j B N x N ( k ) + μ k B N x N ( j )
z N ( j ) = A N x N ( j ) + μ i B N x N ( k ) μ j B N x N ( r ) μ k B N x N ( i )
z N ( k ) = A N x N ( k ) μ i B N x N ( j ) + μ j B N x N ( i ) μ k B N x N ( r )
Figure 3 shows the data flow diagram for calculation of the left-side QDFT.
To calculate both QDFTs—the right-side and the left-side—you need to multiply the matrices A N and B N by each of the four components of the quaternion-valued input vector x N . Since the components of the input vectors are real values, these operations can be performed by computing the DFT for each component of the input vector and dividing the real and imaginary parts of the result, i.e.,
A N x N ( r ) = R e ( F N x N ( r ) ) , B N x N ( r ) = I m ( F N x N ( r ) )
A N x N ( i ) = R e ( F N x N ( i ) ) , B N x N ( i ) = I m ( F N x N ( i ) )
A N x N ( j ) = R e ( F N x N ( j ) ) , B N x N ( j ) = I m ( F N x N ( j ) )
A N x N ( k ) = R e ( F N x N ( k ) ) , B N x N ( k ) = I m ( F N x N ( k ) )

6. 1-D QDFT Proposal

By computing both QDFTs, the main computational cost is related to multiplying the four components of the quaternion-valued input vector by the matrices A N and B N . This is equivalent to calculating the DFTs for each of the four components and separating the real and imaginary parts, as was described in Section 5. It seems that in order to calculate any QDFT, it is necessary to compute four DFTs. However, it is known that the same operation can be done by performing only two Fourier transforms for two complex-valued input vectors, since each of the two DFTs for real-valued input vectors can be computed with one DFT for the complex-valued input vector. To explain this, let us introduce two real-valued vectors x N ( 1 ) and x N ( 2 ) formed from the complex-valued vector x N = x N ( 1 ) + i x N ( 2 ) . Let c N ( 1 ) be the DFT output for input x N ( 1 ) , c N ( 2 ) —the DFT output for input x N ( 2 ) , and c N —the DFT output for complex-valued input x N . Although the DFTs outputs for the real-valued inputs are complex-valued, their real and imaginary parts have special symmetries, namely
R e ( c n ( 1 ) ) = R e ( c N n ( 1 ) ) , I m ( c n ( 1 ) ) = I m ( c N n ( 1 ) )
R e ( c n ( 2 ) ) = R e ( c N n ( 2 ) ) , I m ( c n ( 2 ) ) = I m ( c N n ( 2 ) )
for n = 0 , 1 , , N 1 . It is said that for a real-valued input signal, the real part of its DFT is symmetric and the imaginary part is antisymmetric.
For each coefficient c n of DFT output for complex-valued signal x N = x N ( 1 ) + i x N ( 2 ) , we can write
c n = R e ( c n ) + I m ( c n ) i
However, the DFT is a linear transform, so it can be also written as
c n = c n ( 1 ) + i c n ( 2 ) = R e ( c n ( 1 ) ) + i I m ( c n ( 1 ) ) + i [ R e ( c n ( 2 ) ) + i I m ( c n ( 2 ) ) ]
Thus,
R e ( c n ) = R e ( c n ( 1 ) ) I m ( c n ( 2 ) )
and
I m ( c n ) = I m ( c n ( 1 ) ) + R e ( c n ( 2 ) )
Analogously,
R e ( c N n ) = R e ( c N n ( 1 ) ) I m ( c N n ( 2 ) )
and
I m ( c N n ) = I m ( c N n ( 1 ) ) + R e ( c N n ( 2 ) )
Taking into account properties (72) and (73), (78) can be written in the form
R e ( c N n ) = R e ( c n ( 1 ) ) + I m ( c n ( 2 ) )
and (79) as
I m ( c N n ) = I m ( c n ( 1 ) ) + R e ( c n ( 2 ) )
By adding and subtracting the sides of (80) and (76), we obtain, respectively
R e ( c n ( 1 ) ) = R e ( c n ) + R e ( c N n ) 2
and
I m ( c n ( 2 ) ) = R e ( c N n ) R e ( c n ) 2
Similarly, by adding and subtracting the sides of (77) and (81) we obtain, respectively
R e ( c n ( 2 ) ) = I m ( c n ) + I m ( c N n ) 2
and
I m ( c n ( 1 ) ) = I m ( c n ) I m ( c N n ) 2
We introduce the denotation , which means the signal reversed in time. So, for c N = [ c 0 , c 1 , , c N 1 ] T , we have
c N = c 0 c N 1 c 1 = P N c N
where the matrix P N , which is responsible for reversing signal in time, has the form
P N = 1 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0
Then, (82) written in vector notation has the form
R e ( c N ( 1 ) ) = 1 2 [ R e ( c N ) + R e ( c N ) ]
Analogously, (85) written in vector notation has the form
I m ( c N ( 1 ) ) = 1 2 [ I m ( c N ) I m ( c N ) ]
Similarly, (84) written in vector notation has the form
R e ( c N ( 2 ) ) = 1 2 [ I m ( c N ) + I m ( c N ) ]
In the end, (83) written in vector notation has the form
I m ( c N ( 2 ) ) = 1 2 [ R e ( c N ) R e ( c N ) ]
Going back to QDFT transforms, the quaternion-valud input vector x N has four real-valued component x N ( r ) , x N ( i ) , x N ( j ) , x N ( k ) . Let us denote their complex Fourier transforms by c N ( r ) , c N ( i ) , c N ( j ) , c N ( k ) . They are all complex-valued, and
A N x N ( r ) = R e ( c N ( r ) ) , B N x N ( r ) = I m ( c N ( r ) )
A N x N ( i ) = R e ( c N ( i ) ) , B N x N ( i ) = I m ( c N ( i ) )
A N x N ( j ) = R e ( c N ( j ) ) , B N x N ( j ) = I m ( c N ( j ) )
A N x N ( k ) = R e ( c N ( k ) ) , B N x N ( k ) = I m ( c N ( k ) )
From the components of the quaternion input vector x N , we can create two complex inputs vectors x ˜ N = x N ( r ) + x N ( i ) i and x ^ N = x N ( j ) + x N ( k ) i . Then, we calculate the complex discrete Fourier transforms for these, i.e., c ˜ N and c ^ N , using the fast algorithm, and separate their real and imaginary parts. Then, according to (88)–(91), for the first complex vector x ˜ N , we obtain
R e ( c N ( r ) ) = 1 2 [ R e ( c ˜ N ) + R e ( c ˜ N ) ]
I m ( c N ( r ) ) = 1 2 [ I m ( c ˜ N ) I m ( c ˜ N ) ]
R e ( c N ( i ) ) = 1 2 [ I m ( c ˜ N ) + I m ( c ˜ N ) ]
I m ( c N ( i ) ) = 1 2 [ R e ( c ˜ N ) R e ( c ˜ N ) ]
and, similarly, for the second complex-valued vector x ^ N , we obtain
R e ( c N ( j ) ) = 1 2 [ R e ( c ^ N ) + R e ( c ^ N ) ]
I m ( c N ( j ) ) = 1 2 [ I m ( c ^ N ) I m ( c ^ N ) ]
R e ( c N ( k ) ) = 1 2 [ I m ( c ^ N ) + I m ( c ^ N ) ]
I m ( c N ( k ) ) = 1 2 [ R e ( c ^ N ) R e ( c ^ N ) ]
The data flow diagrams for our method of QDFT calculation are shown in Figure 4 for the right-side QDFT and in Figure 5 for the left-side QDFT.
It should be noted that the proposed method, unlike the method using symplectic decomposition, does not require changing the basis in the pure quaternions subspace and, consequently, calculating the new basis vectors and change-of-basis matrix.

7. Computational Complexity Discussion

We will now compare the computational complexity of the different ways to calculate a QDFT, taking into account the number of multiplications and additions of real numbers needed to compute this transform (these numbers are the same for the right-side and left-side transforms). Since, in each case, the ordinary FFT algorithm is used, we denote by m F F T ( N ) the number of real multiplications necessary to compute the DFT for a complex/real signal with N samples. Similarly, let a F F T ( N ) denote the number of additions of real numbers needed to determine the FFT of such a signal. In this comparison, we will omit the method of calculating QDFTs resulting directly from the definitions (16) or (26) because its computational complexity is much higher.
Let us start with the most basic calculation method resulting from (60)–(63) or (64)–(67), respectively. Since, according to (68), calculating the products of A N x N ( r ) and B N x N ( r ) is equivalent to finding the FFT for the x N ( r ) part of the quaternion vector x N , and similarly, for the other x N ( i ) , x N ( j ) , x N ( k ) parts of the quaternion input vector, we need to calculate four FFTs, which requires 4 m F F T ( N ) multiplications and 4 a F F T ( N ) additions of real numbers. Then, each of the products B N x N ( r ) , B N x N ( i ) , B N x N ( j ) , B N x N ( k ) has to be multiplied by three real coefficients μ i , μ j , and μ k , which gives 3 · 4 · N = 12 N multiplications of real numbers. The last step is to add the four components of the sum. Since each sum consists of four vectors, it takes 3 · N additions to calculate the sum. There are four such sums, so we have 4 · 3 · N = 12 N additions of real numbers. Summarizing the above considerations, in order to calculate the DQFT according to this method, m 1 ( N ) multiplications and a 1 ( N ) additions of real numbers should be performed, where
m 1 ( N ) = 4 m F F T ( N ) + 12 N
and
a 1 ( N ) = 4 a F F T ( N ) + 12 N
The next method in the comparison is the method based on symplectic decomposition. First, all samples of the quaternion signal should be expressed using the new imaginary units μ 1 , μ 2 , μ 3 , which corresponds to the multiplication of the matrix inverse to the change-of-basis matrix by the vector containing the imaginary components of the sample according to (39). Such an operation for one sample requires nine multiplications and six additions of real numbers. For N samples of the quaternion signal, we get 9 N multiplications and 6 N additions of real numbers. Then, a single ordinary complex FFT and a single IFFT (without dividing the result by N), or two complex FFTs, should be calculated, according to (48), (49) or (53), (54), which require 2 m F F T ( N ) multiplications and 2 a F F T ( N ) additions of real numbers. The resulting quaternion output signal is expressed using the new imaginary units μ 1 , μ 2 , μ 3 , and we want it to be represented by standard imaginary units i, j, k. This corresponds to the multiplication of the change-of-basis matrix by the vector containing the imaginary components of the resulting vector according to (51). To do this for N samples of the quaternion output signal, 9 N multiplications and 6 N additions of real numbers is needed. To recap the method based on symplectic decomposition, calculating the QDFT according to this method requires m 2 ( N ) multiplications and a 2 ( N ) additions of real numbers, where
m 2 ( N ) = 2 m F F T ( N ) + 18 N
and
a 2 ( N ) = 2 a F F T ( N ) + 12 N
Finally, we evaluate the numbers of arithmetic operations needed for our method of QDFT calculation. Our method is also based on (60)–(63) for the right-side QDFT or (64)–(67) for the left-side QDFT, but taking into account relations (92)–(95), the products A N x N ( r ) , B N x N ( r ) , A N x N ( i ) , B N x N ( i ) , A N x N ( j ) , B N x N ( j ) and A N x N ( k ) , B N x N ( k ) are calculated from (96)–(103). This method requires the calculation of two FFTs, hence 2 m F F T ( N ) multiplications and 2 a F F T ( N ) additions of real numbers is needed. Then, the real/imaginary parts of the FFT results are added/subtracted (some after reordering their elements, which corresponds to multiplying the matrix P N by these elements, as was shown in Figure 3 and Figure 4—this does not require any arithmetic operations) and divided by 2. This may seem to require 8 N additions and 8 N multiplications of real numbers. In fact, c N ( r ) , c N ( i ) , c N ( j ) , c N ( k ) are Fourier transforms of real-valued vectors, so they have symmetry, as in (72)–(73), and only half of their entries have to be calculated. Thus, the number of real additions reduces to 4 N . Multiplying by the factor 1 / 2 in (96)–(103) does not require any multiplication operation. It is just a simple bit shift to the right. Then, as in the first method, each of the products B N x N ( r ) , B N x N ( i ) , B N x N ( j ) , B N x N ( k ) has to be multiplied by three real coefficients μ i , μ j , and μ k , which gives 12 N multiplications of real numbers. The last step is to add the four components of each sum in (60)–(63) for the right-side QDFT or (64)–(67) for the left-side QDFT, as in the first method. This requires 12 N additions of real numbers. Summarizing the above considerations, in order to calculate any of the QDFT according to our method m 3 ( N ) multiplications and a 3 ( N ) additions of real numbers have to be performed, where
m 3 ( N ) = 2 m F F T ( N ) + 12 N
and
a 3 ( N ) = 2 a F F T ( N ) + 16 N
Table 1 presents estimates for the numbers of multiplications and additions of real numbers necessary to determine any of the QDFTs in the three presented methods of QDFT calculation. It is easy to see that although our method has more additions than method 2, it requires fewer multiplications. Furthermore, the total number of arithmetic operations in our method is the smallest among the three compared methods for calculating the QDFT.
In terms of the number of arithmetic operations, our method is very similar to the symplectic decomposition method. To compare the 1-D QDFT computation times of these two methods, we implemented them in Matlab R2022b on a computer with an Intel(R) Core(TM) i5-7400 CPU and 8 GB RAM. For quaternion signals of different lengths N, which are powers of 2, and 100,000 repetitions of transform calculation, we obtained the times, in seconds, presented in Table 2.
The dependencies in Table 2 are not an exact reflection of the dependencies in Table 1, because the calculation time also includes the time needed to transfer data from and to memory, which Table 1 does not take into account. Despite this, it can be observed from Table 2 that the times needed to calculate the 1-D QDFT with the proposed method are shorter than for the method using symplectic decomposition. However, it should be remembered that the time of computation depends very much on the way the code was written and on the implementation platform.

8. Conclusions

The article presents a new method of 1-D QDFT calculation. The proposed method allows a reduction in the number of multiplications in the calculation of the QDFT. Reducing the number of multipliers is especially important when designing dedicated on-board VLSI processors, since minimizing the number of multipliers required also reduces power dissipation and lowers the cost of implementing the entire system.
Furthermore, although the number of additions of real numbers in our method increases, the total number of arithmetic operations is still lower than in other ways of calculating this transform. This leads to a reduction in computational costs, which makes the proposed solution also preferable for its implementation on a general-purpose computer.
It should be added that the newly proposed method can be used to compute both the left-side and right-side QDFTs.

Author Contributions

Conceptualization, A.C. and D.M.-M.; methodology, A.C. and D.M.-M.; validation, D.M.-M.; formal analysis, D.M.-M.; investigation, D.M.-M.; writing—original draft preparation, D.M.-M.; writing—review and editing, A.C. and D.M.-M.; supervision, A.C. and D.M.-M. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
DFTDiscrete Fourier transform
IDFTInverse discrete Fourier Transform
FFTFast Fourier transform
IFFTInverse fast Fourier Transform
QDFTQuaternion Fourier Transform
1-D QDFTOne-dimensional quaternion discrete Fourier transform
2-D QDFTTwo-dimensional quaternion discrete Fourier transform
VLSIVery Large-Scale Integration

References

  1. Briggs, W.L.; Henson, V.E. The DFT: An Owners’ Manual for the Discrete Fourier Transform; Society for Industrial and Applied Mathematics: Philadelphia, PA, USA, 1987. [Google Scholar]
  2. Rabiner, L.R.; Schafer, R.W. Digital Processing of Speech Signals; Prentice Hall: Englewood Cliffs, NJ, USA, 1978. [Google Scholar]
  3. Zolzer, U.; Holters, M.; Great, E.; Nowak, P.; Bhattacharya, P.; Koper, L.; Ahlers, D. Digital Audio Signal Processing; John Wiley & Sons: Hoboken, NJ, USA, 2022. [Google Scholar]
  4. Pratt, W.K. Digital Image Processing; John Wiley & Sons: Hoboken, NJ, USA, 2007. [Google Scholar]
  5. Huang, T.S. (Ed.) Two-Dimensional Digital Signal Processing II: Transform and Median Filters; Springer: Berlin/Heidelberg, Germany, 1981. [Google Scholar]
  6. Li, L.; Bai, R.; Lu, J.; Zhang, S.; Chang, C.-C. A Watermarking Scheme for Color Image Using Quaternion Discrete Fourier Transform and Tensor Decomposition. Appl. Sci. 2021, 11, 5006. [Google Scholar] [CrossRef]
  7. Chen, B.; Coatrieux, G.; Chen, G.; Sun, X.; Coatrieux, J.L.; Shu, H. Full 4-D quaternion discrete Fourier transform based watermarking for color images. Digit. Signal Process. 2014, 28, 106–119. [Google Scholar] [CrossRef]
  8. Li, M.; Yuan, X.; Chen, H.; Li, J. Quaternion Discrete Fourier Transform-Based Color Image Watermarking Method Using Qurternion QR Decomposition. IEEE Access 2020, 8, 72308–72315. [Google Scholar] [CrossRef]
  9. Bahri, M.; Azis, M.I.; Firman; Lande, C. Discrete Double-Sided Quaternionic Fourier Transform and Application. J. Phys. Conf. Ser. 2019, 1341, 06200. [Google Scholar] [CrossRef]
  10. Schütte, H.D.; Wenzel, J. Hypercomplex numbers in digital signal processing. In Proceedings of the ISCAS ’90, New Orleans, LA, USA, 1–3 May 1990; pp. 1557–1560. [Google Scholar]
  11. Ell, T.A. Hypercomplex Spectral Transformation. Ph.D. Thesis, University of Minnesota, Minneapolis, MN, USA, 1992. [Google Scholar]
  12. Sangwine, S.J. Fourier transforms of colour images using quaternion or hypercomplex numbers. Electron. Lett. 1996, 32, 1979–1980. [Google Scholar] [CrossRef]
  13. Witten, B.; Shragge, J. Quaternion-based Signal Processing. In Proceedings of the New Orleans 2006 SEG Annual Meeting, New Orleans, LA, USA, 1 October 2006; pp. 2862–2865. [Google Scholar]
  14. Ell, T.A.; Sangwine, S.J. Hypercomplex Fourier transforms of color images. IEEE Trans. Image Process. 2007, 16, 22–35. [Google Scholar] [CrossRef] [PubMed]
  15. Parchami, A.; Mahdavi, M. Full Quaternion Representation of Color images: A Case Study on QSVD-based Color Image Compression. arXiv 2007, arXiv:2007.09758. [Google Scholar]
  16. Ell, T.A.; Bihan, N.L.; Sangwine, S.J. Quaternion Fourier Transforms for Signal and Image Processing; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 2014. [Google Scholar]
  17. Pei, S.C.; Ding, J.J.; Chang, J.H. Efficient implementation of quaternion Fourier transform, convolution, and correlation by 2-D complex FFT. IEEE Trans. Signal Process. 2001, 49, 2783–2797. [Google Scholar]
  18. Bahri, M. Discrete Quaternion Fourier Transform and Properties. Int. J. Math. Anal. 2013, 7, 1207–1215. [Google Scholar] [CrossRef]
  19. Grigoryan, A.M.; Agaian, S.S. Tensor transform-based quaternion Fourier transform algorithm. Inf. Sci. 2015, 320, 62–74. [Google Scholar] [CrossRef]
  20. Grigoryan, A.M.; Agaian, S.S. 2-D Left-Side Quaternion Discrete Fourier Transform: Fast Algorithm. In Proceedings of the IS&T Int’l. Symp. on Electronic Imaging: Image Processing: Algorithms and Systems XIV, San Francisco, CA, USA, 14 February 2016; 2016; pp. 192.1–192.8. [Google Scholar]
  21. Bahri, M.; Toaha, S.; Rahim, A.; Azis, M.I. On one-dimensional quaternion Fourier transform. J. Phys. Conf. Ser. 2019, 1341, 062004. [Google Scholar] [CrossRef]
  22. Ouyang, J.; Coatrieux, G.; Shua, H. Robust hashing for image authentication using quaternion discrete Fourier transform and log-polar transform. Digit. Signal Process. 2015, 41, 98–109. [Google Scholar] [CrossRef]
  23. Ribeiro, G.B.; Lima, J.B. Eigenstructure and fractionalization of the quaternion discrete Fourier transform. Opt. Int. J. Light Electron Opt. 2020, 208, 163957. [Google Scholar] [CrossRef]
  24. Ekasasmita, W.; Bahri, M.; Bachtiar, N.; Rahim, A.; Nur, M. One-Dimensional Quaternion Fourier Transform with Application to Probability Theory. Symmetry 2023, 15, 815. [Google Scholar] [CrossRef]
  25. Hamilton, W.R. Elements of Quaternions; Longmans, Green and Co.: London, UK, 1866. [Google Scholar]
  26. Ell, T.A.; Sangwine, S.J. Decomposition of 2D hypercomplex Fourier transforms into pairs of complex Fourier transforms. In Proceedings of the 2000 10th European Signal Processing Conference, Tampere, Finland, 1 September 2000; pp. 1–4. [Google Scholar]
Figure 1. Four components of the quaternion input signal x ( n ) (the left column), their right−side QDFT y ( n ) (the middle column), and left−side QDFT z ( n ) (the right column).
Figure 1. Four components of the quaternion input signal x ( n ) (the left column), their right−side QDFT y ( n ) (the middle column), and left−side QDFT z ( n ) (the right column).
Electronics 12 04974 g001
Figure 2. Data flow diagrams for calculation of the right-side QDFT.
Figure 2. Data flow diagrams for calculation of the right-side QDFT.
Electronics 12 04974 g002
Figure 3. Data flow diagrams for calculation of the left-side QDFT.
Figure 3. Data flow diagrams for calculation of the left-side QDFT.
Electronics 12 04974 g003
Figure 4. Data flow diagram for our method of calculation of the right-side QDFT.
Figure 4. Data flow diagram for our method of calculation of the right-side QDFT.
Electronics 12 04974 g004
Figure 5. Data flow diagram for our method of calculation of the left-side QDFT.
Figure 5. Data flow diagram for our method of calculation of the left-side QDFT.
Electronics 12 04974 g005
Table 1. Number of multiplications and additions of real numbers needed to calculate any 1-D QDFT for a quaternion signal of N samples.
Table 1. Number of multiplications and additions of real numbers needed to calculate any 1-D QDFT for a quaternion signal of N samples.
Type of OperationSimplest MethodSymplectic MethodProposed Method
× 4 m F F T ( N ) + 12 N 2 m F F T ( N ) + 18 N 2 m F F T ( N ) + 12 N
+ 4 a F F T ( N ) + 12 N 2 a F F T ( N ) + 12 N 2 a F F T ( N ) + 16 N
Table 2. Calculation times of 1-D QDFTs for signals of length N for the method using symplectic decomposition and the proposed method, for 100,000 repetitions.
Table 2. Calculation times of 1-D QDFTs for signals of length N for the method using symplectic decomposition and the proposed method, for 100,000 repetitions.
NTime for Simplectic Method [s]Time for Proposed Method [s]
1281.431.19
2562.321.87
5123.332.60
10245.404.49
20489.147.64
409619.3614.90
819235.6328.38
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Majorkowska-Mech, D.; Cariow, A. One-Dimensional Quaternion Discrete Fourier Transform and an Approach to Its Fast Computation. Electronics 2023, 12, 4974. https://doi.org/10.3390/electronics12244974

AMA Style

Majorkowska-Mech D, Cariow A. One-Dimensional Quaternion Discrete Fourier Transform and an Approach to Its Fast Computation. Electronics. 2023; 12(24):4974. https://doi.org/10.3390/electronics12244974

Chicago/Turabian Style

Majorkowska-Mech, Dorota, and Aleksandr Cariow. 2023. "One-Dimensional Quaternion Discrete Fourier Transform and an Approach to Its Fast Computation" Electronics 12, no. 24: 4974. https://doi.org/10.3390/electronics12244974

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop