From c73937467e5162d114ea7a5c467a4968c3ade7a6 Mon Sep 17 00:00:00 2001 From: Francis Russell Date: Fri, 30 Nov 2012 22:22:50 +0000 Subject: [PATCH] Add notes on properties of discrete Fourier transforms. --- docs/fft.txt | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 docs/fft.txt diff --git a/docs/fft.txt b/docs/fft.txt new file mode 100644 index 0000000..f922e01 --- /dev/null +++ b/docs/fft.txt @@ -0,0 +1,53 @@ +FFTs and their properties +------------------------- + +- Some definitions: + + cos(x) = 0.5 * (e^{ix} + e^{-ix}) + + sin(x) = 0.5 * i(e^{-ix} - e^{ix}) + + i*cos(x) = 0.5 * i(e^{ix} + e^{-ix}) + + i*sin(x) = 0.5 * (e^{ix} - e^{-ix}) + + Note that division by i is equivalent to multiplication by -i. + +- Amplitudes of sinusoidal components (ignoring scaling factors) where + f_p and f_n represent the positive and negative frequency components + respectively: + + cos(x) -> real(f_p) + real(f_n) + sin(x) -> imag(f_n) - imag(f_p) + i*cos(x) -> imag(f_p) + imag(f_n) + i*sin(x) -> real(f_p) - real(f_n) + +- For real input data, the first coefficient (constant) will always be + real. + +- Upsampling and downsampling may require multiplication by a scaling + factor to retain the same amplitude. + +For even numbers of points: + +- For real input data, the highest frequency coefficient will be real + since only cos can be represented. + +- Example coefficient layout for real data (6 samples): +[c0, c1, c2, c3, c2, c1] + +- When upsampling, the central coefficient (Nyquist) becomes two + coefficients, each half the value of the original. + +- When downsampling to even, we can choose to average the positive and + negative frequency coefficients together to form the new Nyquist + coefficient. This discards the sin components and preserves the cos + components of both the real and imaginary signals. + +For odd numbers of points: + +- For real input data, the highest frequency component will be complex + valued. + +- Example coefficient layout for real data (5 samples): +[c0, c1, c2, c2, c1] -- 2.47.3