IEICE TRANS. FUNDAMENTALS, VOL.E89–A, NO.10 OCTOBER 2006
2914
LETTER
Recursive Computation of Trispectrum Khalid Mahmood AAMIR†a) , Student Member, Mohammad Ali MAUD†† , and Asim LOAN†† , Nonmembers
SUMMARY If the signal is not Gaussian, then the power spectral density (PSD) approach is insufficient to analyze signals and we resort to estimate the higher order spectra of the signal. However, estimation of the higher order spectra is even more time consuming, for example, the complexity of trispectrum is O(N 4 ). This problem becomes even more serious when short time Fourier transform (STFT) is computed - computation of the trispectrum is required after every shift of the window. In this paper, a method to recursively compute trispectrum has been presented and it is shown that the computational complexity, for a window size of N, is reduced to be O(N 3 ) and is the same as the space complexity. key words: power spectral density (PSD), periodogram, bispectrum, trispectrum, sliding DFT
1.
Introduction
For time-varying signals, the simple power spectral density (PSD) approach is insufficient. The solution to such problems is the Short Time Fourier transform (STFT). STFT evaluates the way frequency contents as they change with time. The frequency analysis is carried out after each movement of the window [4], [5]. To compute STFT efficiently, a recursive sliding DFT algorithm has been presented in [3]. With this method, the computational complexity, for calculating DFT of each window, is O(N). In [8] and [9], the recursive sliding window DFT algorithm [3] has been used for recursively computing the PSD from the autocorrelation functions. The complexity of the algorithm was O(N). Higher order spectra are estimated because often we have to extract information like deviations from Gaussianity and presence of phase relations [2]. Higher order spectra are useful for: (a) additive colored Gaussian noise suppression, (b) identification of non-minimum phase systems, (c) information about deviation from Gaussianity and (d) characterization of nonlinear properties in the signals. However, higher order spectra are even more computationally expensive. Cumulants are the nonlinear functions of moments. The complexity of the recursive form of bispectrum has been reported as O(N 2 ) in [9]. This paper presents the recursive form of trispectrum and the complexity was found to be reduced from O(N 4 ) to O(N 3 )
A brief review of the recursive sliding DFT, recursive forms of the PSD and bispectrum are presented in Sect. 2. The recursive form of trispectrum has been derived in Sect. 3. A discussion on the complexity follows in Sect. 4. In this paper, the following notations have been adopted: x[n] represents a sequence, xn represents the nth instance of the sequence x[n]. DFT(2) and DFT(3) stand for 2-D and 3-D DFTs. Small letters are used to represent time domain signals whereas capital letters denote their frequency domain counterparts. k(n) x represents the nth cumurepresents its Fourier transform. An aslant of x[n] and C (n) x sumption of zero mean real signals is adopted for the whole work. 2.
Review of the Sliding DFT, Recursive PSD and Recursive Bispectrum
Consider a time series signal, x[n] = {x0 , x1 , x2 , ..., xK−1 }
(1)
for 0 n < K. Define a window, y1 [n], of length N, where N < K, within the original time series x[n] such that: y1 [n] = {x0 , x1 , x2 , ..., xN−1 }
(2)
Also define another window, y2 [n], as: y2 [n] = {x1 , x2 , x3 , ..., xN }
(3)
In the standard STFT algorithm, DFT Y1 [k] for k = 0, 1, 2, ...N − 1, is computed for the first window y1 [n] and then the window is moved ahead by one sample. The new window is y2 [n] and the corresponding DFT is Y2 [k]. This process continues until all samples of the time series are exhausted. A recursive sliding window DFT for efficiently computing the STFT has been derived by Jacobsen and Layons [3]. The computational complexity is of this algorithms is O(N) for a window of size N. It is given by: 2π
Manuscript received December 12, 2005. Manuscript revised May 12, 2006. Final manuscript received June 23, 2006. † The author is a graduate student at Lahore University of Management Science, DHA, Lahore-54792, Pakistan. †† The authors are with the University of Management and Technology (UMT), Lahore, Pakistan. a) E-mail:
[email protected] DOI: 10.1093/ietfec/e89–a.10.2914
Y2 [k] = e j N k (Y1 [k] + xN − x0 )
(4)
for 0 k < N − 1. Define s xx [m] as the autocorrelation function of y1 [n] (Eq. (2)) and r xx [m] as the autocorrelation function of y2 [n] (Eq. (3)). Define S xx [k] and R xx [k] as the DFTs of the corresponding autocorrelation functions. The relationship for the recursive form of the PSD is [8], [9]: R xx (k) = S xx (k)−y1 (0)Y1 [k]+y2 (N −1)e j N k [Y2∗ [k]] (5)
c 2006 The Institute of Electronics, Information and Communication Engineers Copyright
2π
LETTER
2915
2π DFT(3) ky(4)2 (l1 , l2 , l3 ) = DFT(3) [ky(4)1 (l1 , l2 , l3 )] − x0 Y1 (k1 )Y1 (k2 )Y1 (k3 ) + y2 (N − 1)e j N (k1 +k2 +k3 ) Y2∗ [k1 ]Y2∗ [k2 ]Y2∗ [k3 ] 2π 2π − DFT[ky(2)1 (l1 )] − x0 Y1 (k1 ) + y2 (N − 1)e j N k1 Y2∗ [k1 ] · DFT[ky(2)1 (l3 − l2 )] − Y1 (k2 )Y1 (k3 ) + e j N (k2 +k3 ) Y2∗ [k2 ]Y2∗ [k3 ] 2π 2π − DFT[ky(2)1 (l2 )] − x0 Y1 (k2 ) + y2 (N − 1)e j N k2 Y2∗ [k2 ] · DFT[ky(2)1 (l3 − l1 )] − Y1 (k1 )Y1 (k3 ) + e j N (k1 +k3 ) Y2∗ [k1 ]Y2∗ [k3 ] 2π 2π − DFT[ky(2)1 (l3 )] − x0 Y1 (k3 ) + y2 (N − 1)e j N k3 Y2∗ [k3 ] · DFT[ky(2)1 (l2 − l1 )] − Y1 (k1 )Y1 (k2 ) + e j N (k1 +k2 ) Y2∗ [k1 ]Y2∗ [k2 ] Cy(4) (k1 , k2 , k3 ) = Cy(4) (k1 , k2 , k3 ) − x0 Y1 (k1 )Y1 (k2 )Y1 (k3 ) + y2 (N − 1)e j N (k1 +k2 +k3 ) Y2∗ [k1 ]Y2∗ [k2 ]Y2∗ [k3 ] 2 1 2π j 2π N k1 Y ∗ [k ] · C (2) (k − k ) − Y (k )Y (k ) + e j N (k2 +k3 ) Y ∗ [k ]Y ∗ [k ] − Cy(2) (k ) − x Y (k ) + y (N − 1)e 1 0 1 1 2 1 3 2 1 2 1 3 2 3 y 2 2 2 1 1 2π j 2π N k2 Y ∗ [k ] · C (2) (k − k ) − Y (k )Y (k ) + e j N (k1 +k3 ) Y ∗ [k ]Y ∗ [k ] − Cy(2) (k ) − x Y (k ) + y (N − 1)e 2 0 1 2 2 3 1 1 1 1 3 y1 2 2 2 1 2 3 1 2π 2π − Cy(2) (k3 ) − x0 Y1 (k3 ) + y2 (N − 1)e j N k3 Y2∗ [k3 ] · Cy(2) (k2 − k1 ) − Y1 (k1 )Y1 (k2 ) + e j N (k1 +k2 ) Y2∗ [k1 ]Y2∗ [k2 ] 1 1 2π
DFT(3) ky(4) (l1 , l2 , l3 ) = DFT(3) E y(n)y(n + l1 )y(n + l2 )y(n + l3 ) −DFT ky(2) (l1 ) DFT(2) ky(2) (l3 − l2 ) −DFT ky(2) (l2 ) DFT(2) ky(2) (l3 − l1 ) −DFT ky(2) (l3 ) DFT(2) ky(2) (l2 − l1 )
The recursive form bispectrum is [9]: R(k1 , k2 ) = S (k1 , k2 ) − y1 (0)Y1 (k1 )Y1 (k2 ) + y2 (N − 1)e j N (k1 +k2 ) Y2∗ [k1 ]Y2∗ [k2 ] 2π
3.
(6)
Recursive Computation of Trispectrum
In the following, we exploit the symmetry property of the trispectrum [1], [6], [7] and therefore, it is sufficient to estimate the spectrum only in the upper left half plane. For the following results, zero mean assumption has been considered. If the signal is not zero mean, we will subtract the mean of the signal from itself. Fourth order cumulant, for a zero mean signal, is defined as: ky(4) (l1 , l2 , l3 ) = E y(n)y(n + l1 )y(n + l2 )y(n + l3 ) ky(2) (l1 )ky(2) (l3 − l2 ) − ky(2) (l2 )ky(2) (l3 − l1 ) −ky(2) (l3 )ky(2) (l2 − l1 )
(7)
for 0 l1 , l2 , l3 < N. Define s(l1 , l2 , l3 ) as a 4th order moment of y1 [n] and r(l1 , l2 , l3 ) as a 4th order moment of y2 [n]. Define S [k1 , k2 , k3 ] and R[k1 , k2 , k3 ] as the corresponding DFT’s of the moment where 0 k1 , k2 , k3 < N. Define: s(l1 , l2 , l3 ) =
N−1
y1 (n)y1 (n + l1 )y1 (n + l2 )y1 (n + l3 )
n=0
and r(l1 , l2 , l3 ) =
N−1
y2 (n)y2 (n + l1 )y2 (n + l2 )y2 (n + l3 )
n=0
(10)
(9)
Substituting Eqs. (5) and (8) in Eq. (9), leads to Eq. (10) (a simple derivation is shown on the top of this page). 4.
Discussions
Different methods have been proposed for higher order spectrum estimation namely direct and indirect methods [2]. These methods are computationally very expensive and approximate. If the PSD and the DFTs, at some time instant, of the previous window are available then the computational complexity reduces from O(N 4 ) to O(N 3 ) as evidenced by Eq. (10). The space complexity is also the same. Indirect method has disjoint windows whereas in the recursive trispectrum method, described in this paper, the window slides by one sample ahead each time. However, if the indirect method is applied to the sliding window, the computational complexity is O(M 5 ) where N = nM and n > 1 is any integer. n is not a large number because higher the value of n is, lesser will be the spectral resolution. In this recursive trispectrum method, computational complexity is O(N 3 ) as stated above. Another advantage of this recursive trispectrum technique over the indirect and direct methods is that both indirect and direct methods give estimates with lower spectral resolution as compared to trispectum.
Let S and R be the respective DFT’s. The recursive relationship between S and R (derived in Appendix-A) is:
Acknowledgements
R[k1 , k2 , k3 ] = S [k1 , k2 , k3 ] − y1 (0)Y1 [k1 ]Y1 [k2 ]Y1 [k3 ]
This research was fully funded by the Higher Education Commission (HEC), Islamabad, Pakistan and Lahore University of Management Sciences (LUMS), Lahore, Pakistan. This support is gratefully acknowledged.
+y2 (N − 1)e
j 2π N (k1 +k2 +k3 )
Y2∗ [k1 ]Y2∗ [k2 ]Y2∗ [k3 ]
Taking DFT(3) on both the sides of Eq. (7) for y2 [n]:
(8)
IEICE TRANS. FUNDAMENTALS, VOL.E89–A, NO.10 OCTOBER 2006
2916
r(l1 , l2 , l3 ) = s(l1 , l2 , l3 ) − y1 (0)y1 (l1 )y1 (l2 )y1 (l3 ) +xN y2 (N − 1 + l1 )y2 (N − 1 + l2 )y2 (N − 1 + l3 )
References [1] C.L. Nikias and A. Petropulu, Higher-Order Spectra Analysis: A Nonlinear Signal Processing Framework, Prentice-Hall, Englewood Cliffs, NJ, 1993. [2] C.L. Nikias and J.M. Mendel, “Signal processing with higher-order spectra,” IEEE Signal Process. Mag., vol.10, no.3, pp.10–37, July 1993. [3] E. Jacobsen and R. Lyons, “The sliding DFT,” IEEE Signal Process. Mag., vol.20, no.2, pp.74–80, March 2003. [4] H.V. Sorensen and C.S. Burrus, “Efficient computation of short time fast Fourier transform,” Proc. ICASSP’88, pp.1894–1897, April 1988. [5] J.C. Goswami and A.K. Chan, Fundamentals of Wavelets: Theory, Algorithms and Applications, John Wiley and Sons, New York, 1999. [6] J.M. Mendel, “Tutorial on higher-order statistics (spectra) in signal processing and system theory: Theoretical results and some applications,” Proc. IEEE, vol.79, pp.278–305, 1991. [7] V. Chandran and S. Elgar, “A general procedure for the derivation of principal domains of higher order spectra,” IEEE Trans. Signal Process., vol.42, no.1, pp.229–33, Jan. 1994. [8] K.M. Aamir and M.A. Maud, “Recursive Wiener-Khintchine theorem,” Proc. International Conference on Signal Processing, pp.92–94, 2004. [9] K.M. Aamir, M.A. Maud, A. Zaman, and A. Loan, “Recursive computation of Wiener-Khintchine theorem and bispectrum,” IEICE Trans. Fundamentals, vol.E89-A, no.1, pp.321–323, Jan. 2006.
Taking DFT(3) on both the sides, R(k1 , k2 , k3 ) = S (k1 , k2 , k3 ) N−1 N−1 2π 2π −y1 (0) y1 (l1 )e− j N l1 k1 y1 (l2 )e− j N l2 k2 l1 =0
×
N−1
l2 =0
y1 (l3 )e− j N l3 k3 2π
l3 =0
+xN
N−1
y2 (N − 1 + l1 )e− j N l1 k1 2π
l1 =0
×
N−1
y2 (N − 1 + l2 )e− j N l2 k2 2π
l2 =0
×
N−1
y2 (N − 1 + l3 )e− j N l3 k3 2π
l3 =0
R(k1 , k2 , k3 ) = S (k1 , k2 , k3 ) − y1 (0)Y1 (k1 )Y1 (k2 )Y1 (k3 ) +y2 (N − 1)DFT[y2 (N − 1 + l1 )] ×DFT[y2 (N − 1 + l2 )]DFT[y2 (N − 1 + l3 )] DFT[y2 (N − 1 + l1 )] = e j N k1 Y2∗ [k1 ] 2π
Appendix A
DFT[y2 (N − 1 + l2 )] = e j N k2 Y2∗ [k2 ] 2π
The 4th order moment is defined as
See Appendix B. Equation will become,
ky(4) (l1 , l2 ) = E[y(n)y(n + l1 )y(n + l2 )]y(n + l3 )] for 0 l1 , l2 , l3 < N − 1. Define s[l1 , l2 , l3 ] as a moment of y1 [n] and r[l1 , l2 , l3 ] as a moment of y2 [n]. Define S [k1 , k2 , k3 ] and R[k1 , k2 , k3 ] as the corresponding DFTs. Due to symmetry we take 0 k1 , k2 , k3 < N − 1. s(l1 , l2 , l3 ) =
N−1
s(l1 , l2 , l3 ) − y1 (0)y1 (l1 )y1 (l2 )y1 (l3 ) N−1 y1 (n)y1 (n + l1 )y1 (n + l2 )y1 (n + l3 ) =
(A· 1)
y[N + m − 1]e− j N mk 2π
N−1
y[n]e− j N (N−n−1)k
N−1
y2 (n)y2 (n + l1 )y2 (n + l2 )y2 (n + l3 )
= e− j N (N−1)k
y2 (n)y2 (n + l1 )y2 (n + l2 )y2 (n + l3 )
⎡N−1 ⎤∗ ⎢⎢⎢ ⎥⎥⎥ 2π j 2π k ∗ − j nk ⎢ = e N ⎢⎢⎣ y [n]e N ⎥⎥⎥⎦
+y2 (N − 1)y2 (N − 1 + l1 )y2 (N − 1 + l2 ) ×y2 (N − 1 + l3 )
2π
n=0 2π
2π
y[n]e j N nk
n=0
n=0
n=0
But y2 (N − 1) = xN .
N−1
Let m = N − n − 1 DFT[y[N + m − 1]] =
n=0 N−2
Appendix B
m=0
Let the window slide,
r(l1 , l2 , l3 ) =
2π
DFT[y[N + m − 1]] =
n=1
r(l1 , l2 , l3 ) =
+y2 (N − 1)e j N (k1 +k2 +k3 ) Y2∗ [k1 ]Y2∗ [k2 ]Y2∗ [k3 ] (A· 3)
y1 (n)y1 (n + l1 )y1 (n + l2 )y1 (n + l3 )
n=0
N−1
R(k1 , k2 , k3 ) = S (k1 , k2 , k3 ) − y1 (0)Y1 (k1 )Y1 (k2 )Y1 (k3 )
For real signals y∗ [n] = y[n], so (A· 2)
DFT[y[N + m − 1]] = e j N k [DFT[y[N + m − 1]]]∗ 2π
= e j N k Y ∗ [k] 2π
(A· 4)