From 6a6442915a94757319e8cd9276f1b5c5acce1e06 Mon Sep 17 00:00:00 2001 From: Erik Strand <erik.strand@cba.mit.edu> Date: Mon, 25 Feb 2019 13:07:08 -0500 Subject: [PATCH] Add notes on transforming Gaussians --- _notes/fourier_transform.md | 54 ++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/_notes/fourier_transform.md b/_notes/fourier_transform.md index 693676e..b6ac0dd 100644 --- a/_notes/fourier_transform.md +++ b/_notes/fourier_transform.md @@ -8,15 +8,12 @@ notes are based on my prior knowledge and some helpful websites: - [Properties of Fourier Transform](http://fourier.eng.hmc.edu/e101/lectures/handout3/node2.html) - [symmetry.pdf](https://www.cs.unm.edu/~williams/cs530/symmetry.pdf) - -## Properties of the Fourier Transform - Note: I'm sloppy with the proofs here since all physical functions will have the nice properties that make the relevant operations valid, but I don't always call of these properties out when they are used. -### Basics +## Basics For a function $$f : \mathbb{R} \rightarrow \mathbb{C}$$, I use the definitions @@ -55,7 +52,7 @@ $$ $$ -### Fourier Flips +## Fourier Flips The Fourier transform has a number of interesting properties related to the flip operator $$(\mathcal{R} f)(x) = f(-x)$$. By definition @@ -105,7 +102,7 @@ f(x) $$ -### Conjugate Symmetries +## Conjugate Symmetries Recall that the [conjugate](https://en.wikipedia.org/wiki/Complex_conjugate) of a complex number $$a + b i$$ is defined as $$\overline{a + bi} = a - bi$$. Conjugation distributes over addition and @@ -143,7 +140,7 @@ a horizontal arrow by taking the inverse Fourier transform), and vertical arrows conjugates. -### Even More Odd +## Even More Odd Recall that a function $$f$$ is even if $$f(-x) = f(x)$$, and odd if $$f(-x) = -f(x)$$. Note that a function is real if and only if it's equal to its own complex conjugate, and a function is purely @@ -176,3 +173,46 @@ In particular, since conjugation doesn't change magnitude, the magnitude of the function is an even function. Because of this it's common to see the negative frequencies ignored when we're dealing with a real function and only care about the magnitude of the transform (like for spectral power analysis). + + +## Transforms of Gaussians + +A Fourier Transform that comes up frequently is that of a Gaussian. It can be calculated by +completing a square. + +$$ +\begin{align*} +\mathcal{F}(N(0, \sigma^2))(f) +&= \frac{1}{\sqrt{2 \pi \sigma^2}} \int_{-\infty}^\infty e^{\frac{-x^2}{2 \sigma^2}} + e^{- 2 \pi i f x} \mathrm{d} x \\ +&= \frac{1}{\sqrt{2 \pi \sigma^2}} \int_{-\infty}^\infty e^{-\frac{1}{2 \sigma^2} + \left( x^2 + 4 \pi i \sigma^2 f x \right)} \mathrm{d} x \\ +&= \frac{1}{\sqrt{2 \pi \sigma^2}} \int_{-\infty}^\infty e^{-\frac{1}{2 \sigma^2} + \left( x + 2 \pi i \sigma^2 f \right)^2 + \frac{(2 \pi i \sigma^2 f)^2}{2 \sigma^2}} + \mathrm{d} x \\ +&= e^{-2 \pi^2 f^2 \sigma^2} \frac{1}{\sqrt{2 \pi \sigma^2}} \int_{-\infty}^\infty + e^{-\frac{\left( x + 2 \pi i \sigma^2 f \right)^2}{2 \sigma^2}} \mathrm{d} x \\ +&= e^{-2 \pi^2 f^2 \sigma^2} \\ +&= e^{-\frac{(2 \pi f)^2}{2 / \sigma^2}} +\end{align*} +$$ + +This is an unnormalized Gaussian with variance $$1/\sigma^2$$. Note that the exponent wants to be +expressed in radians instead of cycles, so $$f$$ is scaled by $$2 \pi$$. + +This function integrates to $$(2 \pi \sigma^2)^{-1/2}$$. One might have hoped it would be +normalized. One reason this could not be true is Plancherel's Theorem. The "power" of a normalized +Gaussian is + +$$ +\begin{align*} +\int_{-\infty}^\infty \left( \frac{1}{\sqrt{2 \pi \sigma^2}} e^{\frac{-x^2}{2 \sigma^2}} \right)^2 +\mathrm{d} x +&= \frac{1}{2 \pi \sigma^2} \int_{-\infty}^\infty e^{\frac{-x^2}{\sigma^2}} \mathrm{d} x \\ +&= \frac{1}{2 \pi \sigma} \int_{-\infty}^\infty e^{-x^2} \mathrm{d} x \\ +&= \frac{1}{2 \sqrt{\pi} \sigma} +\end{align*} +$$ + +This depends on the variance, which is inverted by the Fourier Transform. So since the power is +invariant, the normalization cannot in general be conserved. -- GitLab