Professional Documents
Culture Documents
Frequency Domain Processing
Frequency Domain Processing
JOHN EDWARDS, BEng. (Hons), CEng., MIEE, MIEEE Email : jedwards@numerix-dsp.com) Director, Numerix Ltd, 7 Dauphine Close, Coalville, Leics, LE67 4QQ, UK.
Abstract Over 80% of all DSP applications require some form of frequency domain processing and there are many techniques for performing this kind of operation. This two part workshop will serve as an introduction to frequency domain signal processing. In this first session in a two session series, we will cover the theory behind Fourier Transforms and frequency domain processing, while the second half will look at specific frequency domain techniques from an application perspective and show how frequency domain techniques can often provide information that is difficult or sometimes impossible to realise in the time domain. Topics to be discussed in this session include: continuous and discrete Fourier transforms and FFTs; How the FFT works; The complex exponential; Windowing equations and effects. 1. Introduction All signals have a frequency domain representation and in 1822, Baron Jean Baptiste Fourier detailed the theory that any real world waveform can be generated by the addition of sinusoidal waves. This was arguably developed first by Gauss in 1805. The following diagram shows an example of this process :
=+
Signals can be transformed between the time and the frequency domain through various transforms. The signals can be processed within these domains and each process in one domain has a corollary in the other, as shown :
Time Domain Input x(t) Laplace Input X(s) Impulse Response H(s) Output Y(s) = H(s) X(s) Impulse Response h(t) Output y(t)=h(t)*x(t)
Frequency (Fourier) Input X(j) Impulse Response H(j) Output Y(j) = H(j) X(j)
The most important process translation between the time and frequency domain is that convolution in the time domain is the equivalent to multiplication in the frequency domain and V.V. Within the real, continuous time world, systems are defined in the s-domain. In the digital world, these systems are translated to the s-domain, as shown in the following diagrams :
s-Domain j fs/2
z-Domain
f0 fs
Thus the j axis of the s plane maps to a circle of unit radius in the z plane. As increases from - through 0 to + the unit circle is retraced every 2c. In the continuous time domain, e-sT is a unit delay, This is represented by z-1 in the discrete time domain, where z = e sT An arbitrary delay : (t-nT) is represented by : e-nTs and z-n i.e. : The Laplace transform is equivalent to the Fourier Transform for s = j. The Laplace transform is given in the following equation :
L(t ) = x(t) e
-
-st
dt
X ( z ) = x ( n) z + x ( n) z
n n=- n=0
This is referred to as the two sided z-transform however, for most applications it can be simplified by assuming that at time t=0 then the output is at 0. Any real world signal or function has a related z-transform however there are many important ztransforms that are worth remembering. Some of them are listed here, with t = nts written as n.
Theorem Linearity Shifting Multiplication by an exponential Multiplication by time Convolution Initial value Final value f(n) Ax(n)+By(n) x(n+n0) a x(n) nx(n) x(n)*y(n)
n
lim[X(z)(1-z )]
z
-1
{x (t )} = x (t ) e
-
- j t
dt
The FT is equivalent to the LT for x(t) = 0 for t < 0 and if x(t) converges at t = . As an example of how we might use the different domains, let us consider the following signal and its representation.
Time Domain
Z-Domain
fs/2 t0
Frequency Domain
f0 fs
f0
fs/2
fs
3fs/2
Time Domain
Z-Domain
fs/2 t0
Frequency Domain
f0 fs
f0
fs/2
fs
3fs/2
If we now filter the signal with the filter defined in the z-domain, we see the following results : The poles represent gain and the zeros attenuation. The effects of applying the filter to the signal are frequency dependent and so we see that the filter has a low-pass effect and the signal is smoothed. This operation of the system on the signal is performed by either convolution in the time domain or multiplication in the frequency domain.
2. Representing Signals
Signals can be represented in many different ways. From Fouriers theory, we know that we can represent any real world signal by the combination of two or more sinusoids. Therefore, we need to be able to understand how sinusoids work, in order that we can understand how the complex signals operate.
In the complex domain, we can think of a fundamental signal as a rotating phasor. A phasor is a rotating vector in the complex plane with magnitude A and rotational speed radians per second
Imaginary b a Real A
( = 2f).
At time t :
x(t)=a+jb
Where :
A=
b
-1
= t =
In polar format :
tan
j t
b a
X( t ) = Ae
= A (cos( t ) + j sin( t ))
A complex exponential can be represented as :
If the complex exponential function is defined as :
e
Then :
j t
= A (cos( t ) + j sin( t ))
j t - j t
e cos( t ) =
+e 2
e -e sin( t ) =
2j
j t
- j t
A cosinusoid can be represented by a conjugate pair of phasors with a purely real result, similarly a sinusoid is represented by a conjugate pair of phasors with a purely imaginary result, as shown :
Phasors rotate in two directions and have the following characteristics. Positively rotating phasors rotate anti-clockwise and represent positive frequencies, whilst negatively rotating phasors rotate clockwise and represent negative frequencies. Referring to the Fourier transform, this just splits the signals up into the fundamental phasors, or complex exponential components. Signals can be processed or systems analysed in both the time and frequency domains, the following table shows the various theorems and how they relate to each other.
Theorem Dependence Linearity Time Shifting Frequency Shifting Convolution Even Real x(t) Odd Real x(t) x(t) x(t), y(t) Ax(t)+By(t) x(t-t0) e
-j t0
X( )
x(t)
So far, we have primarily considered the continuous domains but for DSP we need to consider the discrete equivalents. The discrete Fourier transform (DFT) is given in the following equation and it shows that for every frequency, the Fourier Transform X(k) determines the contribution of a complex sinusoid of that frequency in the composition of the signal x(n).
N 1 n=0 2 nk N
X (k ) =
x (n) e
for 0 k N 1
The corollary of the Fourier transform is the inverse Fourier transform, as follows :
x ( n) =
2 nk 1 N-1 j X ( k ) e N for 0 k N 1 N k =0 When using the FT, it is important to be aware of several issues, including :
Increased frequency domain resolution == reduced time domain resolution and v.v.
Continuity
Time domain continuity == frequency domain discontinuity and v.v. E.G. A continuous time domain sinusoid is a frequency domain impulse
There are many ways to approach an understanding of the FFT however there are some heuristic approached that explain the operation and can be used to extend the techniques. The Fourier transform can be considered to be a bank of band-pass filters that takes in a signal and the magnitude of the output of each filter is proportional to the total input energy into that filter. Each of these filters is convolving the input with a set of filter coefficients that are sinusoidal in nature, with the frequency of oscillation equal to the centre frequency of the filter. When performing the convolution over all the banks, many of the multiplications of data and coefficient values are repeated and therefore redundant. Computation saving can be made by implementing a single Fourier transform as 2 half sized Fourier transforms (i.e. Two N/2 point DFTs are faster than one N point DFT). Extrapolating this to its limit, a 2 point DFT is often the optimum process and larger FT operations can be constructed from this small building block. This leads to the fact that FFT lengths are usually powers of 2. This is a generalisation and there maybe architectural reasons why other lengths are preferential and it is not unknown to mix the sizes of the blocks termed mixed radix transforms. For the purposes of this paper we will only discuss radix-2 transforms. When looking at the computational loading of FTs and FFTs, the former requires order N2 operations and the latter order N/2 log2N operations. So how do we combine the small FT building blocks into a complete Fourier transform ? The process starts by sub-dividing (decimating) the complete operations and this can be performed at either the time or frequency end of the operation. Taking an 8 point FT, the decimation in frequency operation is as follows :
Stage 1
Stage 2
0 WN
Stage 3
WN WN
0 WN 0
X(0) X(4)
WN WN 2 WN WN
3 1
WN
0 WN
WN
0 WN
X(3) X(7)
The WN values are the coefficients of the FFT and are often referred to as twiddle factors. The twiddle factors are essentially the complex exponential values, according to the following equations.
WN = e j 2 / N
where
nk X ( k ) = x ( n) W N n =0
N 1