You are on page 1of 3

h

 ps i
Xsk1 2 Xsk  xkN1 1s1 xkN2 sin
2N
ps
 Xsk1 xkN1 1 1s1 xkN2 1
 cos
N
 
 ps 
3ps
xkN1 1s1 xkN2 sin
 sin
2N
2N

Fast recursive algorithm for sliding discrete


sine transform
V. Kober
A fast algorithm for computing the sliding discrete sine transform
(DST) is proposed. The algorithm is based on a recursive relationship
between three subsequent local DST spectra. The computational
complexity of the algorithm is compared with that of fast DST
algorithms.

Introduction: In local adaptive signal processing such as signal


filtering, feature extraction and data compression, the discrete sine
transform (DST) has been widely used. This is because the DST
performs close to the optimum Karhunen-Loeve transform (KLT) for
the first-order Markov stationary data, when the correlation coefficient
lies in the interval (0.5, 0.5) [1]. In numerous applications, signals
such as speech and data communication have inherently infinite
length. Moreover, since the signal properties (amplitudes, frequencies
and phases) usually change with time, a single orthogonal transform is
not sufficient to describe the entire signal. As a result, the concept of
short-time signal processing with filtering in the domain of an
orthogonal transform can be used [2]. The short-time transform of a
signal xk is defined as
Xsk

1
P
n1

xkn wn cn; s

where wn is a window sequence, c(n, s) represents the basis functions


of an orthogonal transform. Equation (1) can be interpreted as the
orthogonal transform of xkn as viewed through the window wn. Xks
displays the orthogonal transform characteristics of the signal around
time k.
We assume that the window has finite length around n 0, and it is
unity for all n 2 [N1, N2]. This leads to signal processing in a sliding
window, i.e. local filters in the domain of an orthogonal transform at
each position of a moving window modify the orthogonal transform
coefficients of a signal to obtain only an estimate of the pixel xk of the
window. The discrete cosine transform is one of the best orthogonal
transforms for the sliding processing of signals possessing high
correlation coefficients [3]. The DST may also serve as an appropriate
orthogonal transform for the sliding processing of signals with
low correlation coefficients. In this Letter, a fast recursive algorithm
for computing the sliding DST with less computation than that of
known fast DST algorithms [47] is proposed. Four types of discrete
sine transforms were classified [8]. The DST discussed in this Letter is
refers to the second type (II).

Recursive algorithms for computing sliding DST: The sliding DST


can be defined as


N2
P
n N1 1=2s
2
xkn sin p
Xsk
N
nN1
where {xk; k . . . , N1, N1 1, . . . , 0, 1, . . . , N2, N2 1. . . } is an
infinite-length sequence, {Xks ; s 1, 2, . . . , N} are the transform
coefficients around time k, N N1 N2 1 is the length of the DST.
Here N is an arbitrary integer value. For clarity, the normalisation factor
and specific scaling of XkN component are neglected until the end.
The local DST spectra at the window positions k  1 and k 1 are,
respectively, given by

Finally, from (2) and (5) the recursive relation is written as


ps
Xsk1 2Xsk cos
 Xsk1 xkN1 1 xkN1
N
 ps 
1s1 xkN2 1 xkN2 sin
2N

We see that the computation of the DST at window position k 1


involves values of the input sequence xk as well as the DST coefficients
computed in two previous positions of the moving window.
Next, it is useful to consider the discrete sine and cosine functions
defined as
 ps 
SNs sin
2N
7
ps
CSs cos
N
The values of the function {CSs; s 1, 2, . . . , N} can be determined
from the values of {SNs; s 1, 2, . . . , N} in the following way:
8
;
1  s < N =2
SN
>
>
< N 2s
0;
s N =2
CSs
8
SN2sN ; N =2 < s < N
>
>
:
1;
sN
where N can be either even or odd.
Taking into account (6) and (8), the number of arithmetic operations
required to compute the sliding DST at a given window position is
evaluated as follows: if N is odd, the complexity is 2(N  1) multiplication operations and 3N 4 addition operations; if N is even, the
complexity is 2N  3 multiplication operations and 3N 2 addition
operations. Table 1 provides a comparison in terms of the computational complexity of the proposed algorithm with known fast DST II
algorithms [47]. We see that the proposed algorithm yields essentially
better results when the length of the window increases. Moreover, the
length of a moving window for the proposed algorithm may be an
arbitrary integer value determined by the characteristics of the signal to
be processed. Conversely, fast DST II algorithms require the length to
be of a power of 2. Finally, we note that additional computational
expenses are required to compute two initial DSTs. The inverse transform for signal processing in a running window is performed for
computing only the pixel xk of the window as


N
1P
N 1=2s
9
xk
as Xsk sin p 1
N s1
N
where {as 2; s 1, . . . , N  1}, aN 1. If xk is the central pixel of the
window; i.e. N1 N2 and N 2N1 1, then the inverse transform is
simplified to
xk

N1
1P
a
X k 1t
N t0 2t1 2t1

10

Therefore, in the computation only the spectral coefficients with odd


indices are involved.

Table 1: Number of multiplications and additions for computing


sliding DST
N

Fast DSTs [47]

Proposed algorithm

Multiplications Additions Multiplications Additions



n N1 1=2s ps

xkn sin p
N
N
nN1 1


NP
2 1
n N1 1=2s ps


xkn sin p
N
N
nN1 1

Xsk1
Xsk1

NP
2 1

3
4

k
k1
We now derive a recursive relationship between Xk1
s , Xs , and Xs .
Using properties of the sine function and (3) and (4), we can obtain

16

32

81

29

32

80

209

61

50
98

64

192

513

125

198

128

448

1217

253

386

256

1024

2817

510

770

Conclusion: A fast recursive algorithm for computing the sliding


DST is proposed. The algorithm is based on a recursive relationship

ELECTRONICS LETTERS 5th December 2002 Vol. 38 No. 25

between three subsequent local DST spectra. The algorithms require


essentially less operations of multiplication and addition compared
with known fast DST algorithms. The inverse transform for signal
processing in a running window is also presented.

References
1
2
3

Acknowledgment: V. Kober acknowledges grant 36077-A from


CONACYT.
# IEE 2002
Electronics Letters Online No: 20021098
DOI: 10.1049/el:20021098

1 October 2002

5
6

V. Kober (Departamento de Ciencias de la Computacio n, Divisio n de


Fsica Aplicada, CICESE, Km 107 Carretera Tijuana-Ensenada,
Ensenada 22860, B.C., Me xico)
E-mail: vkober@cicese.mx

7
8

JAIN, A.K.:

A sinusoidal family of unitary transforms, IEEE Trans.


Pattern Anal. Mach. Intell., 1987, 1, (4), pp. 356365
OPPENHEIM, A.V., and SHAFER, R.W.: Discrete-time signal processing
(Prentice Hall, Englewood Cliffs, NJ, 1989)
KOBER, V., and CRISTOBAL, G.: Fast recursive algorithms for short-time
discrete cosine transform, Electron. Lett., 1999, 35, (15), pp. 12361238
GUPTA, A., and RAO, K.R.: A fast recursive algorithm for the discrete sine
transform, IEEE Trans. Acoust. Speech Signal Process., 1990, 38, (3),
pp. 553557
CVETCOVI, Z., and POPOVI, M.V.: New fast algorithms for the
computation of discrete cosine and sine transforms, IEEE Trans.
Signal Process., 1992, 40, (8), pp. 20832086
LEE, P., and HUANG, F.-Y.: Reconstructed recursive DCT and DST
algorithms, IEEE Trans. Signal Process., 1994, 42, (7), pp. 16001609
BRITANAK, V.: A unified discrete cosine and sine transform computation,
Signal Process., 1995, 43, (23), pp. 333339
WANG, Z.: Fast algorithms for the discrete W transform and for the
discrete fourier transform, IEEE Trans. Acoust. Speech Signal Process.,
1984, 32, (4), pp. 803816

ELECTRONICS LETTERS 5th December 2002 Vol. 38 No. 25

Reproduced with permission of the copyright owner. Further reproduction prohibited without
permission.

You might also like