Discrete sine transform

From Academic Kids

The discrete sine transform (DST) is a Fourier-related transform similar to the discrete Fourier transform (DFT), but using only real numbers. 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 real and imaginary), 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.

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.

Definition

Formally, the discrete sine transform is a linear, invertible function F : Rn -> Rn (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 x0, ...., xn-1 are transformed into the n real numbers f0, ..., fn-1 according to one of the formulas:

DST-I

<math>f_j = \sum_{k=0}^{n-1} x_k \sin \left[\frac{\pi}{n+1} (j+1) (k+1) \right]<math>

The DST-I matrix is orthogonal (up to a scale factor).

A DST-I of n=3 real numbers abc is exactly equivalent to a DFT of eight real numbers 0abc0(-c)(-b)(-a) (odd symmetry), here divided by two. (In contrast, DST types II-IV involve a half-sample shift in the equivalent DFT.)

Thus, the DST-I corresponds to the boundary conditions: xk is odd around k=-1 and odd around k=n; similarly for fj.

DST-II

<math>f_j =
  \sum_{k=0}^{n-1} x_k \sin \left[\frac{\pi}{n} (j+1) \left(k+\frac{1}{2}\right) \right]<math>

Some authors further multiply the fn-1 term by 1/√2 (see below for the corresponding change in DST-III). This makes the DST-II matrix orthogonal (up to a scale factor), but breaks the direct correspondence with a real-odd DFT of half-shifted input.

The DST-II implies the boundary conditions: xk is odd around k=-1/2 and odd around k=n-1/2; fj is odd around j=-1 and even around j=n-1.

DST-III

<math>f_j = \frac{(-1)^j}{2} x_{n-1} +
  \sum_{k=0}^{n-2} x_k \sin \left[\frac{\pi}{n} \left(j+\frac{1}{2}\right) (k+1) \right]<math>

Some authors further multiply the xn-1 term by √2 (see above for the corresponding change in DST-II). This makes the DST-III matrix orthogonal (up to a scale factor), but breaks the direct correspondence with a real-odd DFT of half-shifted output.

The DST-III implies the boundary conditions: xk is odd around k=-1 and even around k=n-1; fj is odd around j=-1/2 and odd around j=n-1/2.

DST-IV

<math>f_j =
  \sum_{k=0}^{n-1} x_k \sin \left[\frac{\pi}{n} \left(j+\frac{1}{2}\right) \left(k+\frac{1}{2}\right) \right]<math>

The DST-IV matrix is orthogonal (up to a scale factor).

The DST-IV implies the boundary conditions: xk is odd around k=-1/2 and even around k=n-1/2; similarly for fj.

DST V-VIII

DST types I-IV are equivalent to real-odd DFTs of even order. In principle, there are actually four additional types of discrete sine transform (Martucci, 1994), corresponding to real-odd 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 DST-I is DST-I multiplied by 2/(n+1). The inverse of DST-IV is DST-IV multiplied by 2/n. The inverse of DST-II is DST-III 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 <math>\sqrt{2/n}<math> so that the inverse does not require any additional multiplicative factor.

Computation

Although the direct application of these formulas would require O(n2) operations, as in the fast Fourier transform (FFT) it is possible to compute the same thing with only O(n log n) complexity by factorizing the computation. (One can also compute DSTs via FFTs combined with O(n) pre- and post-processing steps.)

References

  • S. A. Martucci, "Symmetric convolution and the discrete sine and cosine transforms," IEEE Trans. Sig. Processing SP-42, 1038-1051 (1994).
  • Matteo Frigo and Steven G. Johnson: FFTW, http://www.fftw.org/. A free (GPL) C library that can compute fast DSTs (types I-IV) in one or more dimensions, of arbitrary size. Also M. Frigo and S. G. Johnson, "The Design and Implementation of FFTW3 (http://fftw.org/fftw-paper-ieee.pdf)," Proceedings of the IEEE 93 (2), 216231 (2005).
Navigation

Academic Kids Menu

  • Art and Cultures
    • Art (http://www.academickids.com/encyclopedia/index.php/Art)
    • Architecture (http://www.academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (http://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (http://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools