Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Discrete Fourier Transform Gui: 1. Introduction & Purpose

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

DISCRETE FOURIER TRANSFORM GUI

1. INTRODUCTION & PURPOSE

This script aims to change a discrete signal input, and more precisely an earthquake
accelerogram, from time domain to frequency domain applying the Discrete Fourier
Transform.

Frequency Domain Representation, F(w), gives amplitude of the real and imaginary parts
of the sinusoid at each frequency. By knowing the solution in the frequency domain, you
can get the solution for any signal in the time domain.

On this basis, the script obtains the signal in the the amplitude related to each frequency
within the considered range of values.

2. INPUT DATA

The input data is the signal we want to study, defined on a discrete set of points (N
sampled values associated with a sampling interval, ∆), which is introduced as an ASCII
file loaded in the GUI.

The sampling interval has a very high significance. For any sampling interval, there is also
a special frequency fc, called the Nyquist Critical Frequency, given by:

The Nyquist Critical Frequency is important for two related, but distinct, reasons. One is
the remarkable fact known as the Sampling Theorem: “If a continuous function h(t),
sampled at an interval ∆, happens to be bandwidth limited to frequencies smaller in
magnitude than fc, | f | ≤ fc ”.

The other is the fact that ‘information content’ of a bandwidth limited function is, in some
sense, infinitely smaller than that of a general continuous function. Therefore, the effect of
sampling a continuous function that is not bandwidth limited to less than the fc is that any
frequency component outside of the frequency range [-fc, fc] is aliased (falsely translated,
also called foldover or biasing) into that range by the very act of discrete sampling.

In order to overcome the problem of aliasing we must sample at a rate sufficiently rapid to
give at least two points of the highest frequency present and we must limit our calculation
to the frequency range [-fc, fc].

The sampling can be improved by doubling the number of signals per second. The script
gives the possibility of doing this by interpolating the values of the signal provided by the
user.

CRISTINA M. VILA (vilamartinezcristina@hotmail.com) 1


On this basis, we generate the Fourier transform at discrete frequencies:

The complex numbers Xk represent the extent and phase of different sinusoidal
components of the input signal xn.

3. OUTPUT DATA (Solution)

The calculation of the Discrete Fourier Transform is performed applying the internal
function fft(signal,N). In order to increase the performance of fft when the length of the
signal is not a power of 2 the script uses the internal functions nextpow2.

The user is given the possibility to either represent the amplitude associated with each
frequency or the real or imaginary terms. The default value for the abscissa will be the
Natural Frequency (Hz), but the script allows the user to change to the period (T=1/f) by
selecting the check box “x-axis, Period”.

Lastly, the script offers the possibility to store the results obtained by clicking ‘Create a file’.
The GUI will request a filename and a directory and automatically create a .dat file which
will contain all the data mentioned above.

4. FILE LIST

- DFT.m
- DFT.fig
- Accelerogram of el Centro earthquake:
- elcentro.dat

CRISTINA M. VILA (vilamartinezcristina@hotmail.com) 2


- Accelerograms of San Fernando earthquake (different components):
- 1971SanFernandoCastaicDOWN.dat
- 1971SanFernandoCastaicN21E.dat
- 1971SanFernandoCastaicN69W.dats
- 1971SanFernandoJPLDOWN.dat
- 1971SanFernandoJPLS08W.dat
- 1971SanFernandoJPLS82E.dat

CRISTINA M. VILA (vilamartinezcristina@hotmail.com) 3

You might also like