A Fast Recursive STFT Algorithm Sago Tomaiii': a n d Simon Znidar Faculty of electrical engineering University of LjubIjani Triadsa 25, 61000 Ljubljana, Slovcnija e-mail:
[email protected] tel: +386 61 17 68 432 fax: $386 61 12 64 630
ABSTRACT -- This paper presents an efficient recursive nlgoi-ithm to compute multiplepole window short-time faurier transform (STFT) of a discrete-time sequence. It IS shown t h a t multiple-pole windows offer good time- frequency resolution and t h a t the resulting STFT does not ] ~ c ) s s e sany s side lobes. The algorithm of multiple-pole STFT is then dcrived. It updates STFT only at each N-th point and enables use of i h e FFT algorithm for efficient computing. N urnerical examples are prcsented. I
dow discrete STF'I' in the event that the reduadancy is not necdcd. In this approach, instead of performing the recinsion at each time point, the reciirsioii is performed only every N-points n-hile sl ill avoiding the boundary effect associated with time-limited windows.
11 TIME-FREQUENCY RESOLUTION
Multiple-pole winldow and corresponding timcwindow are defined as
INTRODUCTION
The short-time fourier transform (STFT) of a signal maps a one-diniensional signal z(t,), into a two-dimensional signal X ( t , w ) in the timefrequency plane [l]. The combination of timedomain and frequency-domain analysis yields a more revealing picture of the signal, showing which spectral components are presented in the signal at a given time. In the time domain the STFT is defined as
where y ( t ) is a t i x e window. The main issues concerning STFT a1.e computational efficiency and time-frequency resolution. Recursive structures have been developed for efficient computing of S T F T [a], mainly for time-limited windows such as rectangular, €Tanning and Hamming. The common characteristic of the above algorithms is that when the moiiing-window moves forward onc. step, a new sample is included while excluding the oldest sample. The main drawback of time-limited window:; :IS that the corresponding analysis filters possess sidelobes. Chen [2], developed a recursive .+orithIn for multiple-pole frequency-domain mwing-windows which have time-unlimited inipu:se response. The result is a spectrum updated i r i each time point, which
yields heavily redundaiit STFT. This paper present:; a n efficient approach to thc recursive computation of the niiiltiple-pole win0-7803-31-09-5/96/$5.00
FOR
MUJJL'IPLE-POLE WINDOW
F(w) =
1 (1 j x w p
+
Time-frequency resolution is inversely proportional to the uncertainty DtD,, where Dt and .D, are the durations of y(t) and bandwidth of r ( w ) respectively, defined in such a way that they refled a concentration of the window about a suitably chosen point, e.g., its centre of gravity or the position of the maximum. Although the tjmefrequency resolution depends on this definition it is, due to the uncertainty principle [5])always upper bounded. A reasonable dcfiiiition for D, seeins to be the duration of a rcctarigular window with height equal to and energy equal to the energy of [31 [41
w)
and equivalently for Dt W d t
(4)
Substituting of ('2) into ( 3 ) and (4) respectively yields D t a / ( p >=
1996 lEEE
I025
DUX DtA-l 3.142 0.5 2 1.571 1.847 3 1.178 2.559 4 0.982 3.113 5 0.859 3.858
p Z
DtDL 1.571
2.902 3.105 3.056 3.077
Table 1: Time-Frequency uncertainty
.(. D,D, for dif€erent, valim of p arc li
+
N
- nl)p-l,-~(n+nr--71‘)
e -7n,’Rk ’
(7)
+
Expanding the term (AT (n r 2 ) ) p - l iising a Binoinial €orni, intcrdiarigirig the order of suniniation aiid rearranging the tcrnis in (7) yields:
1 Koi e i,liat w1ic:ii p incrc inii1~i~jIe-po1e ~viiidowincreases (( 5) for p = 1 a i d p := 5 yiclcls 1.571 and 3.077rcspectiyly) and approaclics 7i which is equal to the time-frcqucncy anccrtaint,y obtained if the same measure of duration is applied on t h e Gaussian window. ~
~
n
The family of‘ frequency windows for different values of 11 with equal tirne-resolution are plotted in Eigilre 1
.(n+ N
-
n,/)p-l
C
--L(n,+N--n’) -3n/n2,, A
(8) Thc expression under the second sum in the first term of (8)is x:;, i.e. a multiple-pole window STFT of the window order i at t i m e point n. If we substitute m N for 71., axid rearrange the second term we can express (8)as
p=1 p=2
p=3
p=4 p=5
-8
-6
-4 -2
0
2
4
6
@)
-X(m+L)N,k =
8 WDt
Figuie 1: Family of frequency windows with the same timc resolution.
n+N
A-p ,(7L+ N - ni)P-le-+-n’)
e -j?L’nJi
(9)
The secxmd sum in (9) is in fact, the DFT of thc winclowed sequence x ( 7 1 L + 1 ) ~T+ATJ -L~~? , ~To . calculate multiple-pole windonrs STFT of the order p at the time n + N , TVC have to c:alc:ulatc al.1 of the iowcr orders S T F T ~ lvl1cre i = 1 ~ ~ .
T h e discretc version of (l)is obtained by sampling the ~vindon.(2). For the order I, it yields:
AT!;^.
(6) To dcrive thc recursive algorithni n-e first subst,it-iitc ? ! ~ N+for n i n ( 6 ) arid tlieii split {lie result, iiito two parts:
1026
subsequence of { z n ) with t,he vector x, == [%zN+l: . . . :x m N + A r ] We further define A. as p x p real constant and lower-triangular matrix with the elements:
r e d multiple-add operations per time frame where Chen's algorithm ( [ 2 ] )needs p N 2 opera,lions per frame (as example 1088 vs. 32768 operations at p=2 and N=64 frequency points).
1v and window s e q w r r e F(') as the N x N diag. onal matrix with elerncnts, where i = l...p:
Forming the matrix of size p x N
the multiple-pole window STFT can be e): pressed in the following form:
Xmfl
=I
4Xm -I-
NUMERICAL EXAMPLE
As an example we have calculated the STFT of the slowly varying sinusoidal signal z(tj -sin($(t)) with instant frequency $ ( t ) == 0.2 -+ 0 8x(l - t/6400 - 1)2)using the proposed algo) bcen sampled at the zitliin The signal ~ ( thas rate J s = 1/T = 1 and 6400 samples lxtve been coilsidered. Thc riuinher of fIequciicy points has bem chosen to be N = 128. I?iy,iires 2 and 3 shows the comparision bctwcm the imrlliple-polc window STFT powcr spectiirlri cdculatcd with tlic proposed algorithm and the rcctangiilar window STFTs Note t h a t there arc no sidelobes In the multiple-polc window STFI' spectrum. The contour levels on both plots are 10 Dh apart. 120
Fm+1
(13;
Qk
1010
52& 20 80
100
E?3
w
b
60
%
80
5
40
*
$' 60 20
40 0
20
0
20
10
dime
30
40
50 11
Figure 3 : Rectangular Window STFT of the same signal.
0
Figure 2: Multiplc-Pole Window STFT of slowly mry-irig sinusoidal signal (71 = :i X = 5 ) .
If N is chosen to k e a power of two, the DFYs in inaixix F can be calculatcd efficiently using t h c FFT a.lgorit,hm.
V
CONCLUSION
An eficieiit algorithm for computation of thr: discrete-time multiple-pole window STFT was presented, which greatly reduces the required nurnbcr of numerical operations. This algorithni is suitable for applications where the STFT val.ues are not required at all time points. We have also shown that t,he all-pole windows, which are the base of the presented algorithni, offer good tiinc-frequency resolutioii and do not postjess any sidclobes.
1027
REFERENCES
[4]
predstavitev signalov s pozabljajoeim transformorn, Proc. of the Third Electrical and Computer Science Conference E R K '93,vol. A, PortoroB, Slovenia, pp 99-102, Sept. 1993.
[l] F. Hlawatsch, G. F. Boudreaux-Bartels, Lin-
ear and Quadratic Time-Frequency Signal Representations, IEEE SP Magazine, pp.2167, April 1992.
[a] W.
Chen, N. Kehtarnavaz and T. W. Spencer, "An Efficient Recursive Algorithm for Timc-Varying Fourier Transform", IEEE Trail. on Signal Processing, vol. 41, No. 7, pp2488-2490, July 1993
[3]
S.TornaEiC, On Short Time Fourier Transform wit,li Sing1i:-Sided Exponential Window, submited to Signal Processing, ELSE-
VIER.
1028
S. Znidar, S. TomaiZiC, Casovno-frekvenCna
[5] A.Papoulis, The Fourier Integral and its Applications, McGraw Hill, 1962. [6]
S.Znidar, IIR Perfect Reconstriiction Filter Bank With Good Time-Frequency Resolution, Proc. of the ICSPAT 1995, vol. 1, pp. 566-570, Boston, USA,Octolxr 1995.
[7] A. V. Oppenheirn, R. W. Schafer, DiscreteTime Signal Processing, Prentice-Hall Tnt., 1989.