Fast Jacket-Haar Transform with Any Size

Jacket-Haar transformhas been recently generalized fromHaar transformand Jacket transform, but, unfortunately, it is not available in a casewhere the lengthN is not a power of 2. In this paper, we have proposed an arbitrary-length Jacket-Haar transformwhich can be conveniently constructed from the 2-point generalized Haar transforms with the fast algorithm, and thus it can be constructed with any sizes. Moreover, it can be further extended with elegant structures, which result in the fast algorithms for decomposing. We show that this approach can be practically applied for the electrocardiogram (ECG) signal processing. Simulation results show that it is more efficient than the conventional fast Fourier transform (FFT) in signal processing.


Introduction
Hadamard transform, Haar transform, discrete Fourier transform, and their derivatives are discrete orthogonal transforms with extensive applications in signal and image processing [1][2][3][4].Jacket transform, motivated by the center weighted Hadamard transform [5], is a special transform with its inverse transform matrix being determined by the element or block-wise inverse of an original matrix [6].Jacket transform has been extensively applied in many fields, such as signal and data processing [1], digital wireless communications [7], cryptography [8], and encoding designs [9].Meanwhile, several interesting matrices, such as Hadamard matrices and DFT matrices, belong to the Jacket transform matrix family.Besides all, lots of widely used matrices, such as unitary matrices and Hermitian matrices, have tightly relations with Jacket matrices.
Recently, literatures relevant to discrete orthogonal matrices and their transforms mainly have involved explorations of other categories of orthogonal transform matrices and exploitations of their applications.In the later aspect, block Jacket transforms have been tentatively applied to quantum signal processing [10], Big-Data processing [11], emerging new-generation mobile communication, and so on.In addition, new orthogonal transforms, such as complex Hadamard transform [12][13][14], fractional Hadamard or Jacket transforms [15], parametric transforms [16][17][18], hybrid transforms [7], and the generalized orthogonal transforms [14], have been gradually proposed while enriching the orthogonal transform family.Particularly, with advancement of digital systems and widespread availability in the recent few decades, there exist some urgent demands for seeking a scheme to achieve compromise between the generalization efficiencies of Hadamard or Haar transforms and their the extended transforms to adaptively meet the practical implementation requirements.Subsequent research can be seen as an attempt.
Haar matrix, which is useful for localized signal analysis [19], edge detection [20], OFDM, and filter design and electrocardiogram (ECG) analysis, has been generalized for Jacket-Haar matrix [21], whose entries are 0 and ±2  compared with entries of the original Haar matrix being 1, −1, and 0. Although the 2  -point Jacket-Haar matrices are successfully proposed in [21], there is still a problem on how to construct the arbitrary-length Jacket-Haar transform as the arbitrary-length Walsh-Jacket transform has already done with high efficiency [22].Unfortunately, until this paper, the method to solve this problem is preliminary and not comprehensive except that some original results are shown [23].Consequently, in this paper, we focus on the systematic 2 Mathematical Problems in Engineering construction of the generalized Jacket-Haar transforms of any lengths.Compared to the existing literatures, the contributions are listed as follows.Firstly, the multilevel structure of the arbitrary-length Jacket-Haar transform matrix can be derived with the recursive algorithm.Secondly, a novel approach for designing the fast generation of the Jacket-Haar transform matrices of the arbitrary length is derived in a successive fashion.Finally, the arbitrary length Jacket-Haar transforms can be generated and decomposed for extensions with the fast algorithms with several specified applications.
The remaining of this paper is organized as follows.In Section 2, the elegant structure of Jacket-Haar transform is investigated, followed by the generalized form of Jacket-Haar transform of size 2. In Section 3, the (2 + 1)-point Jacket-Haar transform is extensively derived from the ( + 1)-point Jacket-Haar transform.Together with the proposed algorithm for generating the (2)-point Jacket-Haar transform, an arbitrary Jacket-Haar transform can be derived in a similar fashion.After that, the fast algorithm and its applications in signal processing will be shown in Section 4. In Section 5, the fast Jacket-Haar transforms are designed on the basis of the Kronecker product of the traditional Jacket and Jacket-Haar transforms.Finally, conclusion is drawn in Section 6.

Jacket-Haar Transform
Walsh transform can be extended for the arbitrary-point Walsh-Jacket transform of an arbitrary length [22].Similarly, it is theoretically feasible to extend the Haar transform for the design of the Haar transform of any size.In order to verify the correctness of this judgement, we show an elegant structure of the Jacket-Haar transform.Definition 1. Jacket-Haar transform is a discrete transform and it must satisfy three constraints as follows.
(1) If Ψ  and Γ  denote the forward and inverse -point Jacket-Haar transform matrices, respectively, then all entries of both matrices are equal to 0 or ±2  , where  is an arbitrary integer.
(2) The number of zero crossing point of any row of Ψ  is the same as the conventional Haar matrix.Namely, zero crossing point number of any row of Ψ  is one except the first row, where zero crossing point does not exist.(3) Fast algorithm of the conventional Haar transform is preserved.
According to the definition of Jacket-Haar transform, all the conventional Haar transform matrices can be seen as a special case of Jacket-Haar transform matrices since the above three constraints are all satisfied.Elements of the Haar transform matrices can only be chosen from 1, −1, or 0, and order of any Haar matrix must be a power of 2. However, Jacket-Haar transform relaxes these limits with elements equal to 0 or ±2  .For this reason, Jacket-Haar transform can still be efficiently implemented by bit-shifting without multiplication just like the conventional Haar transform.In addition, the Jacket-Haar transform is an extension of the Jacket transform since the constraint that Γ  (, ) = Ψ  (, )/ where  is a constant is not required any longer.
Before generating a Jacket-Haar transform of any size, the Jacket-Haar matrices of size 2 are extensively derived, based on which the Jacket-Haar matrix of any size can be efficiently achieved.
Theorem 2. Any 2-point Jacket-Haar transform matrices should conform to the following forms: where , , , and  are equal to 0 or a power of 2 with  = .
Proof.It is straightforward that the third constraint is always satisfied for the 2-point Jacket-Haar transform.Besides, the 2-point Jacket-Haar matrix Ψ 2 can be generally denoted as follows: and its inverse is According to the first constraint, there exists Meanwhile owing to the second constraint, we can obtain So there exist three cases as follows.Firstly, if  1 = 0, then it is easy to get that  1 > 0 holds.So the 2-point Jacket-Haar matrix possesses the form of (1).Secondly, if  1 = 0, then similar to case 1, the 2-point Jacket-Haar matrix has the form of (2).Thirdly, if  1  1 > 0, according to (6), we can obtain holds,  must be equal to 1. Namely,  1  1 =  1  1 .In the second case, we can get the same result.So, the 2-point Jacket-Haar transform conforms to (3).This completes the proof of this theorem.

Universal Jacket-Haar Transform Matrices
General forms of the 2-point Jacket-Haar transform matrices have been derived in the previous section.In this section, two algorithms are proposed to construct Jacket-Haar transform matrices of any large sizes.
According to Theorem 3, the (2 + 1)-point Jacket-Haar transform matrix with matrix size being a power function of 2 or not can be conveniently generated.
Based on the above-mentioned construction, any odd integer order Jacket-Haar transform matrix can be elegantly derived, while at the same time, another construction method will be similarly proposed to construct Jacket-Haar transform matrix with the size being even numbers.Theorem 4. If the size of the matrix  = 2 is even, then one can use the generating algorithm presented below to derive the -point Jacket-Haar transform matrix from both the point Jacket-Haar matrix and the -point identity matrix.The (2)-point Jacket-Haar matrix can be calculated as and its inverse can be computed as where where k 1, u 1, = k 2, u 2, = 1 and k 1, u 2, = k 2, u 1, = 0,  ∈ {1, 2, . . ., }.Moreover, the notation e  denotes the ℎ column of the -point identity matrix with the following constraints: where ,  ∈ {1, 2, . . ., }.
Proof.Since the proof is similar to that of Theorem 3, it is omitted here.
For the further illustration and clarity, we give an example in what follows.Suppose that a 5-point Jacket-Haar matrix is Meanwhile, let , respectively.Then, we obtain a 10-point Jacket-Haar matrix with the inverse matrix given by  In a word, based on Theorems 3 and 4, we can derive the Jacket-Haar transform matrix of any sizes in the recursive and alternate way.When  = 2 + 1 is odd, we can choose Theorem 3 to derive the -point Jacket-Haar transform matrix from the ( + 1)-point Jacket-Haar transform.While  = 2 is even, we can choose Theorem 4 to get the -point Jacket-Haar transform matrix from the -point Jacket-Haar transform.For example, when  = 9, the value of  is 4 and then Theorem 3 is chosen.It means the 9-point Jacket-Haar matrix can be derived from the 5-point Jacket-Haar matrix.Next, the 5-point Jacket-Haar matrix can be gotten from the 3-point Jacket-Haar matrix with Theorem 3. In the end, the 3-point Jacket-Haar matrix can be constructed from the 2point Jacket-Haar matrix by using Theorem 3. Therefore, the 9-point Jacket-Haar matrix can be ultimately obtained from the 2-point Jacket-Haar matrices.In Table 1 we generate the -point Jacket-Haar matrices with size  ∈ {3, 4, . . ., 20}.In fact, Jacket-Haar transform matrix of any sizes ultimately originates from the 2-point Jacket-Haar transform matrices.
Based on the 2-point Jacket-Haar transform matrices, the Jacket-Haar transform matrices of any sizes can be conveniently and elegantly constructed alternately and recursively by applying Theorems 3 and 4. Consequently, certain available sparse Jacket-Haar transform matrices can be theoretically derived.

Corollary 5.
There exists an arbitrary-length sparse Jacket-Haar transform matrix with a maximum of two nonzero elements in each of the rows.In addition, there exists an arbitrarylength Jacket-Haar transform matrix, and the transpose of its inverse matrix is also a Jacket-Haar transform matrix with the following constraints: Proof.The inductive method will be used for proving this corollary.At first, it is obvious that all the 2-point Jacket-Haar transform matrices meet the prescribed request.At the next step, there exist two cases based on which theorem has adopted generating a relatively higher order adjacent Jacket-Haar transform matrix.For the first case, suppose that Ψ +1 is a sparse ( + 1)-point Jacket-Haar transform matrix.For the two-point Jacket-Haar transform matrices Ψ 2,1 , Ψ 2,2 , . . ., Ψ 2, in the form described in (1) or (2), the (2 + 1)-point Jacket-Haar transform matrix derived from ( 11) is a sparse matrix since each of the rows possesses a maximum of two nonzero elements.For the other case, if there exists a sparse -point Jacket-Haar transform matrix Ψ  with the given matrices Ψ 2,1 , Ψ 2,2 , . . ., Ψ 2, , the 2point Jacket-Haar transform matrix from ( 18) is also a sparse matrix.This completes the proof of one part of corollary.This kind of sparse Jacket-Haar transform matrices is interesting and available in practical applications that are provided with the priority of acceptable performances promised.For another part of the proof of this corollary, the inductive method will be similarly used.At the first step, it is easy to check that the transpose of two-point inverse matrix in the form of ( 5) is also a Jacket-Haar transform matrix, and that (25) is satisfied.At the next step, based on the selected theorems for the construction of a relatively adjacent Jacket-Haar matrix, there exist two cases.For the first case with an (+1)point Jacket-Haar transform matrix Ψ +1 , the transpose of whose inverse matrix is also a Jacket-Haar transform matrix that satisfies the constraint in (25).For the 2-point Jacket-Haar transform matrices Ψ 2,1 , Ψ 2,2 , . . ., Ψ 2, , it is obvious that Ψ 2+1 derived from ( 12) is a (2 + 1)-point Jacket-Haar transform matrix and the transpose of whose inverse matrix is also a Jacket-Haar transform matrix.Similarly, if Ψ  is an -point Jacket-Haar transform matrix, the transpose of whose inverse matrix is also a Jacket-Haar transform matrix.For the 2-point Jacket-Haar transforms Ψ 2,1 , Ψ 2,2 , . . ., Ψ 2, in the form described in (3), it is straightforward that Ψ 2 derived from ( 18) is a 2-point Jacket-Haar transform matrix and the transpose of whose inverse matrix is also a Jacket-Haar transform matrix.Therefore, the whole corollary holds and the proof is complete.
It is interesting to note the Jacket-Haar transform referred to in the afore-derived corollary is similar to that of the Jacket transform.As we all know, if J  is an -point Jacket transform matrix, then J −1  is also an -point Jacket transform matrix with the following constraints: (26)

Fast Jacket-Haar Transform
4.1.Fast Implementation Algorithms.Just like the conventional Haar transform, the Jacket-Haar transform of large sizes can be performed with fast algorithms.In order to give a more clear demonstration with simple comparison, fast algorithms of both conventional Haar transform and Jacket-Haar transform are presented simultaneously.
In Figure 1, we show the implementation structures of the conventional Haar transforms with sizes 2, 4, and 2  , respectively.In Figure 2, the implementation structures of the 2-point, the 3-point and the 4-point Jacket-Haar transform are presented, from which the 3-point and the 4-point Jacket-Haar transforms can be decomposed into 2 and 3 butterflies, respectively.For  > 4, we can decompose the point Jacket-Haar transform into combination of the 2-point Jacket-Haar transforms by using the methods described as in Figure 3. From Figures 1 to 3, it is obvious that the structures of the fast algorithms of the original Haar transform and the proposed Jacket-Haar transform are similar.For example, the whole implementation structure of a 9-point Jacket-Haar transform matrix shown as has been illustrated in Figure 4.It is shown that there exist 4 layers, with 4, 2, 1, and 1 butterflies being included in the adjacent layers from the left to the right.It needs 16 arithmetic addition operations without any multiplication.
Compared to the conventional Haar transform, if both categories transform matrices possess the same matrix size which is a power of 2, they have the same implementation layers, numbers of butterflies, and arithmetic addition operations without any multiplication operations needed, but with different numbers of bit-shift operations.When the matrix size does not equal a power of 2, there do not exist the corresponding Haar transform matrices.For the proposed Jacket-Haar transform matrices, there are ⌊log  2 ⌋ + 1 implementation layers and 2( − 1) arithmetic addition Mathematical Problems in Engineering Haar transform x [2] x [3] x operations with ( − 1) butterflies included, but without any multiplication operations.The details are shown in Table 2.

Generalized Jacket-Haar Transform
Definition 6.For a given square matrix J  = [  ]  , if its inverse matrix can be simply obtained from its element-wise inverse, that is, where  is a nonzero constant, one calls matrix J  a Jacket matrix; that is, and its inverse matrix is where  denotes the operation of matrix transpose.
Definition 7. Suppose J  is a Jacket matrix of order  and Ψ  is a Jacket-Haar matrix of order .
a generalized Jacket-Haar matrix.According to the above-mentioned definition, it is obvious that both Jacket matrix and Jacket-Haar matrix belong to generalized Jacket-Haar matrix family.Theorem 8. Since both Jacket transform and Jacket-Haar transform can be designed with the fast algorithms, the generalized Jacket-Haar transform which is the Kronecker product of Jacket transform and Jacket-Haar transform can be composed or decomposed with the fast algorithms.x [2] x [3] x [1] 3-point x [2] x [3] x

X[1] x[1]
x [2] x [3] x [4] x [2] x [3] x [4] x[2M − 1] x Proof.Suppose J  can be decomposed until J  and J  ; then where I  is the × identity matrix.The detailed procedure can be seen in [6].Then, by using the property of Kronecker product, [JH]  can be decomposed as (32) Due to the fact that Ψ  can be decomposed into 2-point Jacket-Haar transforms, [JH]  can be decomposed or constructed with the fast algorithms.This completes the proof of this theorem.
For example, if , we can construct the 3-point Jacket-Haar transform and 4-point Jacket transform as follows: Then we can construct a 12-point generalized Jacket-Haar transform The fast algorithm is shown in Figure 5.

Applications in Signal Processing
The proposed arbitrary-point Jacket-Haar transform can also be theoretically applied in areas where the conventional Haar transforms have been gained, such as signal analysis, image processing, OFDM, and filter design.In this section, two representative Jacket-Haar transforms are applied to electrocardiogram (ECG) analysis compared to the discrete Fourier transform (DFT).
x [6] x [5] x [4] x [3] x [2] x There are approaches for comprehensive analysis with even and odd point transforms, respectively.The length of the ECG signal in Figure 6 is 202, which is even and not a power of 2. It is not convenient to analyze this case by directly using the original Haar transform, but it can be efficiently analyzed by the proposed arbitrary-point Jacket-Haar transform.In Figure 7, we show the normalized mean square error (NMSE) of the reconstructed signal when using part of the coefficients of the 202-point generalized Haar transform where x is the original signal; W  and U  are the forward and inverse Jacket-Haar transform matrices.The vector y  preserves  coefficients of y and others are set to zero.In Figure 7, we also show the NMSE of the reconstructed signal when using the 202-point fast Fourier transform (FFT).The results in Figure 7 show that, with the Jacket-Haar transform, we can achieve less approximation error when using only  terms ( < 202) to expand the ECG signal.
As shown in Figures 8 and 9, another simulation experiment is arranged.The length of the ECG in Figure 8 is 321, which is odd and not a power of 2. We show the NMSE of the reconstructed signal in Figure 9 when using part of the coefficients of the 321-point Jacket-Haar transform compared with the 321-point FFT.It is obvious that the Jacket-Haar transform is more efficient for analyzing the ECG signal than that of FFT.In the future, the proposed Jacket-Haar transform will be applied to the more practical applications with the extensive comparisons.

Conclusion
We have investigated the fast construction of the Jacket-Haar transform of the arbitrary length, which overcomes of x [6] x [7] x [8] x [9] x [10] x [11] x [12] x [1] x [5] x [2] x [4] x  problem of the traditional constraint that the number of the points is the power of 2. With the proposed fast generation algorithms, the arbitrary length Jacket-Haar transform can be derived in a successive fashion.Moreover, we show the possible implementations of the fast algorithms and  applications in signal processing.On the basis of the structures of the traditional Jacket transform and the Jacket-Haar transform with any size, the fast algorithms of Jacket-Haar transform are derived for the arbitrary length.Compared to the traditional FFT and its extensions, the proposed Jacket-Haar transform is more efficient in signal reconstruction.However, more properties of the Jacket-Haar transform and

Table 1 :
The -point Jacket-Haar transform matrices based on the -point Jacket-Haar transform matrices listed in the first column and the -point Jacket-Haar transform matrices in the second column using the methods in the third column.

Figure 4 :
Figure 4: The fast algorithm of the 9-point Jacket-Haar transform.

1 Figure 5 :
Figure 5: The fast algorithm of the 12-point generalized Jacket-Haar transform.

Figure 7 :
Figure 7: The normalized mean square error (NMSE) when using part of the coefficients to reconstruct the ECG signal in the figure.Red line: using the 202-point Jacket-Haar transform; green line: using the FFT.