# Dirac comb

In mathematics, a Dirac comb (also known as an impulse train and sampling function in electrical engineering) is a periodic tempered distribution constructed from Dirac delta functions

$\operatorname {\text{Ш}} _{T}(t)\ \triangleq \ \sum _{k=-\infty }^{\infty }\delta (t-kT)={\frac {1}{T}}\operatorname {\text{Ш}} \left({\frac {t}{T}}\right)$ for some given period T. The symbol $\operatorname {\text{Ш}} (t)$ , where the period is omitted, represents a Dirac comb of unit period. Some authors, notably Bracewell, as well as some textbook authors in electrical engineering and circuit theory, refer to it as the Shah function (possibly because its graph resembles the shape of the Cyrillic letter sha Ш). Because the Dirac comb function is periodic, it can be represented as a Fourier series:

$\operatorname {\text{Ш}} _{T}(t)={\frac {1}{T}}\sum _{n=-\infty }^{\infty }e^{i2\pi n{\frac {t}{T}}}.$ The Dirac comb function allows one to represent both continuous and discrete phenomena, such as sampling and aliasing, in a single framework of continuous Fourier analysis on Schwartz distributions, without any reference to Fourier series. Owing to the Poisson summation formula, in signal processing, the Dirac comb allows modelling sampling by multiplication with it, but it also allows modelling periodization by convolution with it.

## Dirac-comb identity

The Dirac comb can be constructed in two ways, either by using the comb operator (performing sampling) applied to the function that is constantly $1$ , or, alternatively, by using the rep operator (performing periodization) applied to the Dirac delta $\delta$ . Formally, this yields (Woodward 1953; Brandwood 2003)

$\operatorname {comb} _{T}\{1\}=\operatorname {\text{Ш}} _{T}=\operatorname {rep} _{T}\{\delta \},$

where

$\operatorname {comb} _{T}\{f(t)\}\triangleq \sum _{k=-\infty }^{\infty }\,f(kT)\,\delta (t-kT)$    and   $\operatorname {rep} _{T}\{g(t)\}\triangleq \sum _{k=-\infty }^{\infty }\,g(t-kT).$

In signal processing, this property on one hand allows sampling a function $f(t)$  by multiplication with $\operatorname {\text{Ш}} _{T}$ , and on the other hand it also allows the periodization of $f(t)$  by convolution with $\operatorname {\text{Ш}} _{T}$  (Bracewell 1986). The Dirac comb identity is a particular case of the Convolution Theorem for tempered distributions.

## Scaling

The scaling property of the Dirac comb follows from the properties of the Dirac delta function. Since $\delta (t)={\frac {1}{a}}\delta \left({\frac {t}{a}}\right)$  for positive real numbers $a$ , it follows that:

$\operatorname {\text{Ш}} _{T}\left(t\right)={\frac {1}{T}}\operatorname {\text{Ш}} \left({\frac {t}{T}}\right),$
$\operatorname {\text{Ш}} _{aT}\left(t\right)={\frac {1}{aT}}\operatorname {\text{Ш}} \left({\frac {t}{aT}}\right)={\frac {1}{a}}\operatorname {\text{Ш}} _{T}\left({\frac {t}{a}}\right).$

Note that requiring positive scaling numbers $a$  instead of negative ones is not a restriction because the negative sign would only reverse the order of the summation within $\operatorname {\text{Ш}} _{T}$ , which does not affect the result.

## Fourier series

It is clear that $\ \operatorname {\text{Ш}} _{T}(t)$  is periodic with period $T$ . That is,

$\operatorname {\text{Ш}} _{T}(t+T)=\operatorname {\text{Ш}} _{T}(t)$

for all t. The complex Fourier series for such a periodic function is

$\operatorname {\text{Ш}} _{T}(t)=\sum _{n=-\infty }^{+\infty }c_{n}e^{i2\pi n{\frac {t}{T}}},$

where the Fourier coefficients are (symbolically)

{\begin{aligned}c_{n}&={\frac {1}{T}}\int _{t_{0}}^{t_{0}+T}\operatorname {\text{Ш}} _{T}(t)e^{-i2\pi n{\frac {t}{T}}}\,dt\quad (-\infty

All Fourier coefficients are 1/T resulting in

$\operatorname {\text{Ш}} _{T}(t)={\frac {1}{T}}\sum _{n=-\infty }^{\infty }e^{i2\pi n{\frac {t}{T}}}.$

When the period is one unit, this simplifies to

$\operatorname {\text{Ш}} (x)=\sum _{n=-\infty }^{\infty }e^{i2\pi nx}.$

Remark: Most rigorously, Riemann or Lebesgue integration over any products including a Dirac delta function yields zero. For this reason, the integration above (Fourier series coefficients determination) must be understood "in the generalized functions sense". It means that, instead of using the characteristic function of an interval applied to the Dirac comb, one uses a so-called Lighthill unitary function as cutout function, see Lighthill 1958, p.62, Theorem 22 for details.

## Fourier transform

The Fourier transform of a Dirac comb is also a Dirac comb. This is evident when one considers that all the Fourier components add constructively whenever $f$  is an integer multiple of ${\frac {1}{T}}$ .

Unitary transform to ordinary frequency domain (Hz):

$\operatorname {\text{Ш}} _{T}(t){\stackrel {\mathcal {F}}{\longleftrightarrow }}{\frac {1}{T}}\operatorname {\text{Ш}} _{\frac {1}{T}}(f)=\sum _{n=-\infty }^{\infty }e^{-i2\pi fnT}.$

Notably, the unit period Dirac comb transforms to itself:

$\operatorname {\text{Ш}} (t){\stackrel {\mathcal {F}}{\longleftrightarrow }}\operatorname {\text{Ш}} (f).$

The specific rule depends on the form of the Fourier transform used. When using a unitary transform of angular frequency (radian/s), the rule is

$\operatorname {\text{Ш}} _{T}(t){\stackrel {\mathcal {F}}{\longleftrightarrow }}{\frac {\sqrt {2\pi }}{T}}\operatorname {\text{Ш}} _{\frac {2\pi }{T}}(\omega )={\frac {1}{\sqrt {2\pi }}}\sum _{n=-\infty }^{\infty }e^{-i\omega nT}.$

## Sampling and aliasing

Multiplying any function by a Dirac comb transforms it into a train of impulses with integrals equal to the value of the function at the nodes of the comb. This operation is frequently used to represent sampling.

$(\operatorname {\text{Ш}} _{T}x)(t)=\sum _{k=-\infty }^{\infty }x(t)\delta (t-kT)=\sum _{k=-\infty }^{\infty }x(kT)\delta (t-kT).$

Due to the self-transforming property of the Dirac comb and the convolution theorem, this corresponds to convolution with the Dirac comb in the frequency domain.

$\operatorname {\text{Ш}} _{T}x\quad {\stackrel {\mathcal {F}}{\longleftrightarrow }}\quad {\frac {1}{T}}\operatorname {\text{Ш}} _{\frac {1}{T}}*X$

Since convolution with a delta function $\delta (t-kT)$  is equivalent to shifting the function by $kT$ , convolution with the Dirac comb corresponds to replication or periodic summation:

$(\operatorname {\text{Ш}} _{\frac {1}{T}}*X)(f)=\sum _{k=-\infty }^{\infty }X\left(f-{\frac {k}{T}}\right)$

This leads to a natural formulation of the Nyquist–Shannon sampling theorem. If the spectrum of the function $x$  contains no frequencies higher than B (i.e., its spectrum is nonzero only in the interval $(-B,B)$ ) then samples of the original function at intervals $1/2B$  are sufficient to reconstruct the original signal. It suffices to multiply the spectrum of the sampled function by a suitable rectangle function, which is equivalent to applying a brick-wall lowpass filter.

$\operatorname {\text{Ш}} _{\frac {1}{2B}}x\quad {\stackrel {\mathcal {F}}{\longleftrightarrow }}\quad 2B\,\operatorname {\text{Ш}} _{2B}*X$
${\frac {1}{2B}}\Pi \left({\frac {t}{2B}}\right)(2B\,\operatorname {\text{Ш}} _{2B}*X)=X$

In time domain, this "multiplication with the rect function" is equivalent to "convolution with the sinc function" (Woodward 1953, p.33-34). Hence, it restores the original function from its samples. This is known as the Whittaker–Shannon interpolation formula.

Remark: Most rigorously, multiplication of the rect function with a generalized function, such as the Dirac comb, fails. This is due to undetermined outcomes of the multiplication product at the interval boundaries. As a workaround, one uses a Lighthill unitary function instead of the rect function. It is smooth at the interval boundaries, hence it yields determined multiplication products everywhere, see Lighthill 1958, p.62, Theorem 22 for details.

## Use in directional statistics

In directional statistics, the Dirac comb of period 2π is equivalent to a wrapped Dirac delta function and is the analog of the Dirac delta function in linear statistics.

In linear statistics, the random variable (x) is usually distributed over the real-number line, or some subset thereof, and the probability density of x is a function whose domain is the set of real numbers, and whose integral from $-\infty$  to $+\infty$  is unity. In directional statistics, the random variable (θ) is distributed over the unit circle, and the probability density of θ is a function whose domain is some interval of the real numbers of length 2π and whose integral over that interval is unity. Just as the integral of the product of a Dirac delta function with an arbitrary function over the real-number line yields the value of that function at zero, so the integral of the product of a Dirac comb of period 2π with an arbitrary function of period 2π over the unit circle yields the value of that function at zero.