DSP Lab Fourier Series and Transforms: EXP No:4
DSP Lab Fourier Series and Transforms: EXP No:4
EXP No:4
Contents
1 Objectives 2 Theory 2.1 Fourier Series . . . . . . . . . . . 2.2 Fourier Transform . . . . . . . . . 2.3 Discrete Fourier Series . . . . . . 2.4 Discrete Time Fourier Transform 3 Observation and Analysis 4 Inferences 5 Bibliography 3 4 4 5 6 6 8 18 19
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
Chapter 1 Objectives
1. Determine the spectra of the signals x1 (n) = cos( 2n) and x2 (n) = ) and compare it with Matlab generated spectra. cos( n 3 2. Determine the Fourier transform of u(n). 3. Illustrate convolution theorem. 4. Illustrate the cases of under-sampling, over-sampling, and sampling at Nyquist rate of a periodic signal.
Chapter 2 Theory
2.1 Fourier Series
Fourier series decomposes periodic functions or periodic signals into the sum of a (possibly innite) set of simple oscillating functions, namely sines and cosines. This makes it easy to do analysis in some cases. Fourier series could be applied to a wide array of mathematical and physical problems, and especially those involving linear dierential equations with constant coecients, for which the eigensolutions are sinusoids. A signal is periodic for some positive value T x(t) = x(t + T ) for all t (2.1)
The fundamental period of x(t) is the smallest positive non-zero value that satises the eq.(2.1). Consider the periodic exponential signal x(t) = ej0 t (2.2)
2 . We can with fundamental frequency 0 and fundamental period T = 0 dene a set of harmonically related complex exponentials associated with this signal as 2 k (t) = ejk0 t = ejk T t (2.3)
All these signals have fundamental frequency a multiple of 0 . So all of them are periodic with period T. Thus we can dene a linear combination of these
x(t) =
k=
ak e
jk0 t
=
k=
ak ejk T
(2.4)
The representation of a periodic signal in this form (eq.2.4) is called Fourier series representation. We can nd coecients by using below formula ak (t) = 1 T
T
x(t)ejk0 t dt
(2.5)
The set of coecients are called Fourier series coecients or spectra coecients of x(t).
2.2
Fourier Transform
Fourier series is applied to periodic signals while Fourier transform can be applied to both periodic and non periodic signals.Here,as in Fourier series ,the signals are expressed in terms of complex exponentials of various frequencies,but these frequencies are not discrete.Hence in this case,the signal has a continuous spectrum as opposed to a discrete spectrum. Very commonly it transforms a mathematical function of time, into a new function, sometimes denoted by F, whose argument is frequency with units of cycles/s (hertz) or radians per second. The new function is then known as the Fourier transform or the frequency spectrum of the function. We can extend the concepts of a Fourier Series to an aperiodic signal also. We think of aperiodic signal as the limit of periodic signal as the period becomes arbitrarily large i.e. as T the periodic function becomes aperiodic function for any nite value of t. We can dene Fourier transform as
X (j ) =
t=
x(t)ejt dt
(2.6)
1 x(n) = 2
=
X (j )ejt d
(2.7)
2.3
The fundamental period is the smallest positive integer N for which eq.(2.8) holds and 0 = 2 is the fundamental frequency.The set of all discrete comN plex exponentials that are periodic with period N is given by k [n] = ejk0 n = ejk N n for k = 0, 1, 2, 3....
2
(2.9)
All these signals have fundamental frequencies a multiple of 2 and are harN monically related. We can represent a general discrete periodic signal as the linear combination of the sequences k [n] as in eq.(2.9).
x[n] =
k
ak k [n] =
k
ak ejk0 n =
k
ak ejk N n
(2.10)
Since the sequences k [n] are distinct only over a range of N successive values of k, the summation(eq.2.10) need only include that range. Equation (2.10) is termed as Discrete Time Fourier series. Here,the fundamental frequency is 0 =
2 N
2.4
In mathematics, the discrete-time Fourier transform (DTFT) is one of the specic forms of Fourier analysis. As such, it transforms one function into another, which is called the frequency domain representation, or simply the DTFT, of the original function (which is often a function in the timedomain). The DTFT requires an input function that is discrete. Such inputs are often created by digitally sampling a continuous function, like a persons voice. The DTFT frequency-domain representation is always a periodic function. Since one period of the function contains all of the unique information, it is sometimes convenient to say that the DTFT is a transform to a nite frequency-domain (the length of one period), rather than to the entire real
X (e ) =
n=
x[n]ejn
(2.11)
X (ej )ejn d
(2.12)
Figure 3.1: 8
Figure 3.2:
Figure 3.3:
Figure 3.4:
Figure 3.5:
Figure 3.6:
Figure 3.7:
Figure 3.8:
Figure 3.9:
Figure 3.10:
Chapter 4 Inferences
In Fig(3.1) and Fig(3.2) we can see the spectrum generated by Matlab function and by programs code. Both closely resembles each other. Although shapes matches, the there is a shift in the frequency axis. This is because Matlab uses a better, ecient algorithm. Fourier transform of unit signal is shown in Fig(3.3), this closely matches to theoretical spectrum. Fig.(3.4) shows the time domain representation and Fourier transform of sinc2 (20t) and Fig.(3.5) shows the time domain representation and Fourier transform of sinc(20t). When we take the convolution of two signals in the time domain, they are multiplied in the frequency domain. This is illustrated by those gures. Fourier transform of convolved signal is shown in Fig(3.6) and it is same as Fig.(3.7) that is the product of the Fourier transforms of 2 input signals.When we do convolution in time domain ,we get the common area of the Fig.(3.4) and Fig(3.5) in Fig.(3.6) in frequency domain. Thus convolution theorem is illustrated It is observed that for the undersampled signal,there is an overlap in the frequency spectrum. For the nyquist sampled signal,there is no overlap. For the oversampled signal,there is a signicant gap between the two peaks.
18
Chapter 5 Bibliography
1. John G. Proakis, Digital Signal Processing 2. www.wikipedia.org 3. B. P. Lathi, Modern Digital And Analog Communication
19