 Discrete sine transform

In mathematics, the discrete sine transform (DST) is a Fourierrelated transform similar to the discrete Fourier transform (DFT), but using a purely real matrix. It is equivalent to the imaginary parts of a DFT of roughly twice the length, operating on real data with odd symmetry (since the Fourier transform of a real and odd function is imaginary and odd), where in some variants the input and/or output data are shifted by half a sample.
A related transform is the discrete cosine transform (DCT), which is equivalent to a DFT of real and even functions. See the DCT article for a general discussion of how the boundary conditions relate the various DCT and DST types.
Contents
Applications
DSTs are widely employed in solving partial differential equations by spectral methods, where the different variants of the DST correspond to slightly different odd/even boundary conditions at the two ends of the array.
Informal overview
Like any Fourierrelated transform, discrete sine transforms (DSTs) express a function or a signal in terms of a sum of sinusoids with different frequencies and amplitudes. Like the discrete Fourier transform (DFT), a DST operates on a function at a finite number of discrete data points. The obvious distinction between a DST and a DFT is that the former uses only sine functions, while the latter uses both cosines and sines (in the form of complex exponentials). However, this visible difference is merely a consequence of a deeper distinction: a DST implies different boundary conditions than the DFT or other related transforms.
The Fourierrelated transforms that operate on a function over a finite domain, such as the DFT or DST or a Fourier series, can be thought of as implicitly defining an extension of that function outside the domain. That is, once you write a function f(x) as a sum of sinusoids, you can evaluate that sum at any x, even for x where the original f(x) was not specified. The DFT, like the Fourier series, implies a periodic extension of the original function. A DST, like a sine transform, implies an odd extension of the original function.
However, because DSTs operate on finite, discrete sequences, two issues arise that do not apply for the continuous sine transform. First, one has to specify whether the function is even or odd at both the left and right boundaries of the domain (i.e. the minn and maxn boundaries in the definitions below, respectively). Second, one has to specify around what point the function is even or odd. In particular, consider a sequence (a,b,c) of three equally spaced data points, and say that we specify an odd left boundary. There are two sensible possibilities: either the data is odd about the point prior to a, in which case the odd extension is (−c,−b,−a,0,a,b,c), or the data is odd about the point halfway between a and the previous point, in which case the odd extension is (−c,−b,−a,a,b,c)
These choices lead to all the standard variations of DSTs and also discrete cosine transforms (DCTs). Each boundary can be either even or odd (2 choices per boundary) and can be symmetric about a data point or the point halfway between two data points (2 choices per boundary), for a total of possibilities. Half of these possibilities, those where the left boundary is odd, correspond to the 8 types of DST; the other half are the 8 types of DCT.
These different boundary conditions strongly affect the applications of the transform, and lead to uniquely useful properties for the various DCT types. Most directly, when using Fourierrelated transforms to solve partial differential equations by spectral methods, the boundary conditions are directly specified as a part of the problem being solved.
Definition
Formally, the discrete sine transform is a linear, invertible function F : R^{N} > R^{N} (where R denotes the set of real numbers), or equivalently an N × N square matrix. There are several variants of the DST with slightly modified definitions. The N real numbers x_{0}, ...., x_{N1} are transformed into the N real numbers X_{0}, ..., X_{N1} according to one of the formulas:
DSTI
The DSTI matrix is orthogonal (up to a scale factor).
A DSTI is exactly equivalent to a DFT of a real sequence that is odd around the zeroth and middle points, scaled by 1/2. For example, a DSTI of N=3 real numbers (a,b,c) is exactly equivalent to a DFT of eight real numbers (0,a,b,c,0,−c,−b,−a) (odd symmetry), scaled by 1/2. (In contrast, DST types IIIV involve a halfsample shift in the equivalent DFT.) This is the reason for the N+1 in the denominator of the sine function: the equivalent DFT has 2(N+1) points and has 2π/2(N+1) in its sinusoid frequency, so the DSTI has π/(N+1) in its frequency.
Thus, the DSTI corresponds to the boundary conditions: x_{n} is odd around n=1 and odd around n=N; similarly for X_{k}.
DSTII
Some authors further multiply the X_{N1} term by 1/√2 (see below for the corresponding change in DSTIII). This makes the DSTII matrix orthogonal (up to a scale factor), but breaks the direct correspondence with a realodd DFT of halfshifted input.
The DSTII implies the boundary conditions: x_{n} is odd around n=1/2 and odd around n=N1/2; X_{k} is odd around k=1 and even around k=N1.
DSTIII
Some authors further multiply the x_{N1} term by √2 (see above for the corresponding change in DSTII). This makes the DSTIII matrix orthogonal (up to a scale factor), but breaks the direct correspondence with a realodd DFT of halfshifted output.
The DSTIII implies the boundary conditions: x_{n} is odd around n=1 and even around n=N1; X_{k} is odd around k=1/2 and odd around k=N1/2.
DSTIV
The DSTIV matrix is orthogonal (up to a scale factor).
The DSTIV implies the boundary conditions: x_{n} is odd around n=1/2 and even around n=N1/2; similarly for X_{k}.
DST VVIII
DST types IIV are equivalent to realodd DFTs of even order. In principle, there are actually four additional types of discrete sine transform (Martucci, 1994), corresponding to realodd DFTs of logically odd order, which have factors of N+1/2 in the denominators of the sine arguments. However, these variants seem to be rarely used in practice.
Inverse transforms
The inverse of DSTI is DSTI multiplied by 2/(N+1). The inverse of DSTIV is DSTIV multiplied by 2/N. The inverse of DSTII is DSTIII multiplied by 2/N (and vice versa).
Like for the DFT, the normalization factor in front of these transform definitions is merely a convention and differs between treatments. For example, some authors multiply the transforms by so that the inverse does not require any additional multiplicative factor.
Computation
Although the direct application of these formulas would require O(N^{2}) operations, it is possible to compute the same thing with only O(N log N) complexity by factorizing the computation similar to the fast Fourier transform (FFT). (One can also compute DSTs via FFTs combined with O(N) pre and postprocessing steps.)
A DSTII or DSTIV can be computed from a DCTII or DCTIV (see discrete cosine transform), respectively, by reversing the order of the inputs and flipping the sign of every other output, and vice versa for DSTIII from DCTIII. In this way it follows that types II–IV of the DST require exactly the same number of arithmetic operations (additions and multiplications) as the corresponding DCT types.
References
 S. A. Martucci, "Symmetric convolution and the discrete sine and cosine transforms," IEEE Trans. Sig. Processing SP42, 10381051 (1994).
 Matteo Frigo and Steven G. Johnson: FFTW, http://www.fftw.org/. A free (GPL) C library that can compute fast DSTs (types IIV) in one or more dimensions, of arbitrary size. Also M. Frigo and S. G. Johnson, "The Design and Implementation of FFTW3," Proceedings of the IEEE 93 (2), 216–231 (2005).
 Press, WH; Teukolsky, SA; Vetterling, WT; Flannery, BP (2007), "Section 12.4.1. Sine Transform", Numerical Recipes: The Art of Scientific Computing (3rd ed.), New York: Cambridge University Press, ISBN 9780521880688, http://apps.nrbook.com/empanel/index.html#pg=621
Categories: Discrete transforms
 Fourier analysis
Wikimedia Foundation. 2010.
Look at other dictionaries:
Discrete cosine transform — A discrete cosine transform (DCT) expresses a sequence of finitely many data points in terms of a sum of cosine functions oscillating at different frequencies. DCTs are important to numerous applications in science and engineering, from lossy… … Wikipedia
Discrete Fourier transform — Fourier transforms Continuous Fourier transform Fourier series Discrete Fourier transform Discrete time Fourier transform Related transforms In mathematics, the discrete Fourier transform (DFT) is a specific kind of discrete transform, used in… … Wikipedia
Discrete Hartley transform — A discrete Hartley transform (DHT) is a Fourier related transform of discrete, periodic data similar to the discrete Fourier transform (DFT), with analogous applications in signal processing and related fields. Its main distinction from the DFT… … Wikipedia
Discrete wavelet transform — An example of the 2D discrete wavelet transform that is used in JPEG2000. The original image is high pass filtered, yielding the three large images, each describing local changes in brightness (details) in the original image. It is then low pass… … Wikipedia
Discrete cosine transform — Transformée en cosinus discrète La transformée en cosinus discrète ou TCD (de l anglais : DCT ou Discrete Cosine Transform) est une transformation proche de la transformée de Fourier discrète (DFT). Le noyau de projection est un cosinus et… … Wikipédia en Français
Modified discrete cosine transform — The modified discrete cosine transform (MDCT) is a Fourier related transform based on the type IV discrete cosine transform (DCT IV), with the additional property of being lapped: it is designed to be performed on consecutive blocks of a larger… … Wikipedia
Sine and cosine transforms — In mathematics, the Fourier sine and cosine transforms are special cases of the continuous Fourier transform, arising naturally when attempting to transform odd and even functions, respectively. The general Fourier transform is defined as:… … Wikipedia
Sine — For other uses, see Sine (disambiguation). Sine Basic features Parity odd Domain ( ∞,∞) Codomain [ 1,1] P … Wikipedia
Discrete Fourier series — A Fourier series is a representation of a function in terms of a summation of an infinite number of harmonically related sinusoids with different amplitudes and phases. The amplitude and phase of a sinusoid can be combined into a single complex… … Wikipedia
Fourier transform — Fourier transforms Continuous Fourier transform Fourier series Discrete Fourier transform Discrete time Fourier transform Related transforms The Fourier transform is a mathematical operation that decomposes a function into its constituent… … Wikipedia