Professional Documents
Culture Documents
Fast Fourier Transform Report
Fast Fourier Transform Report
1
1 Introduction and Theory
In this section, we introduce the theory behind Fourier transform, the intuitive meaning behind it and essentially
its useful applications such as the fast Fourier transform in signal processing.
This means we can represent any fluctuating phenomena as a linear combination of sinusoids of different am-
plitude at different fundamental frequencies.
For this fact, the Fourier transform has vast applications in processes dealing with fluctuating phenomena such as
signal processing, astronomy, the heat equation , e.t.c.
2
Where the coefficient functions cn are given by ,
Z T
1 2
cn = f (t)e−inωt dt
T − T2
2π
Where, ω is the angular frequency given by T and T is the period.
The Fast Fourier Transform is an efficient and economic way of computing the Discrete Fourier transform. The
Fast Fourier Transform takes advantage of the fact that the Discrete Fourier Transform is a iterative process.
3 Filters
Filtering can be used to reduce the noise in a specific signal or fluctuating phenomenon by filtering only specific
frequencies.
In general, we have a low-pass filter that filters frequencies below a certain frequency and outputs those frequencies
while ignoring the rest. A high-pass filter on the other hand, filters frequencies above a certain frequency and
outputs those frequencies while it ignores the rest of the frequencies below it. A band-pass filter filters a band of
frequencies within a specific range and outputs those frequencies, ignoring other unwanted frequencies.
Filtering is possible both a software or hardware level and the LRC circuit is an example of filtering at hardware
level.
† Fluctuating Phenomena may imply processes that involve a periodic change of Signals over time or may be Signals.
2
4 Aim
The aim of this experiment is to understand the underlying principle of the Fast Fourier Transform and how filters
work in signal processing.
We will explore filtering at a software level and look at how to decompose signals into their time series at different
fundamental frequencies and amplitudes using the method of the Fast Fourier Transform to convert our ”Frequency”
Domain (A interval of a periodic function that depends on the frequency) into the ”Time” Domain (An interval of
a periodic function that depends on time).
5 Apparatus
For this experiment, we were experimenting on different sources of signals and were trying to compute the Fast
Fourier Transform for the different signals.
In our case, we needed the myDAQ in order to use the software packages ”F T.exe” -which performs a Fast Fourier
Transform on the input signal, and ”Equi.exe” -which analyses signals and can tweak certain properties of the
signal.
We also needed the function generator to experiment with different electric signals -square,triangular,sine.
Lastly, we needed a microphone to analyze input sound signals from a music player or a tuning fork or any object
of interest that may produce a sound. This also required us to have earphones and an audio mp3 device.
We lastly needed the solar panel, a screwdriver and connecting wires for the configuration of each setup.
6 Method
This section outlines the method for our experiment as steps we undertook to execute this experiment.
3
6.2.2 mp3 Audio
For the mp3 audio signal processing part, we connected the audio input slot of the myDAQ to an mp3 audio player
using an aux cable, we then connected the audio output slot of the myDAQ to earphones.
We next opened the ”Equi.exe” program.
We play music and experimented with different tunes by adjusting parameters such as treble, base, volume and
mid-tone.
We observed how adjusting certain parameters with respect to other affect the sound playing.
Lastly, we recorded the measurements.
7 Data
This section includes the data collected from the experiments with no analysis in anyway, we have included the
fundamental frequencies and amplitudes of the Fast Fourier Transform from each measurement below.
4
7.1.3 Square Wave electrical signals
In this section, we recorded the values of the fundamental frequencies and amplitude of the voltage corresponding
to each fundamental for each wave we experimented on.
Table 4: Tuning for data for the frequencies 256.00,384.00 and 426.60 Hz
5
Solar Panel With Partial Shade
Solar Panel With Partial Shade Fundamental FFT Frequency [Hz] Amplitude [V]
Fundamental FFT Frequency [Hz] Amplitude [V] 1.30e-3 10.19
0.00 10.24 1.40e-3 10.18
1.00e-4 10.24 1.50e-3 10.18
2.00e-4 10.24 1.60e-3 10.17
3.00e-4 10.24 1.70e-3 10.17
4.00e-4 10.24 1.80e-3 10.17
5.00e-4 10.24 1.90e-3 10.17
6.00e-4 10.24 2.00e-3 10.17
7.00e-4 10.24 2.10e-3 10.17
8.00e-4 10.23 2.20e-3 10.17
9.00e-4 10.22 2.30e-3 10.17
1.00e-3 10.21 2.40e-3 10.18
1.10e-3 10.21 2.50e-3 10.19
1.20e-3 10.20 2.60e-3 10.19
2.70e-3 10.20
Table 5: Tables for the data containing values for the frequency and voltage of the solar panel with partial shading
covering it.
Table 6: Table for data for the solar panel with no shading covering it.
6
8 Graphs and best-fit line
In this section, I plot graphs for the best-fit line and the raw data.
Figure 1: FFT Data of the Square wave signal with frequency 141.90Hz plot
Figure 2: Plot for the Square FFT transformed data of frequency 141.90Hz
7
8.1.2 Triangular Wave Signal
Figure 3: Triangular Signal produced from FFT values of amplitude and frequency, 100.60Hz
8
8.1.3 Sine Wave Signal
9
8.2 Sound Signals
The followings are plots for the tuning fork data.
Figure 10: Original signal of the FFT Tuning signal with 384.00Hz retrieved from the FFT
10
8.3 Solar Panel Signal
Figure 12: Plot of the non-shaded panel with data retrieved from the FFT
Figure 14: Signal of the partially shaded panel with data retrieved from the FFT of the signal
11
9 Calculations
In this section, I calculate the Fourier Transforms of the signals I have experimented in.
f (t) = 12.09 × 10−4 sin(50.00t) + 2.25 × 10−5 sin(100.00t) + 1.70 × 10−5 sin(260.00t)
f (t) = 10.79 × −4 sin(50.00t) + 2.03 × 10−5 sin(100.00t) + 1.13 × 10−6 sin(200.00t) + 1.40 × 10−7 sin(460.00t)
f (t) = 9.8 × 10−5 sin(50.00t) + 1.87 × 10−5 sin(100.00t) + 69.70 × 10−4 sin(380.00t) + 1.32 × 10−6 sin(770.00t)
f (t) = 8.88 × 10−5 sin(50.00t) + 1.53 × 10−5 sin(100.00t) + 28.29 × 10−4 sin(430.00t)
12
9.3 Solar Panel Signals
In this section, we perform Fourier transforms on signals from the solar panel.
10 Uncertainty Analysis
In this section, I evaluate the uncertain of the values of the power spectrum and frequency stored in the tables and
used in the Fourier series of the signals under investigation. All measurement was digital, meaning it carries equal
probability around the variance of a point, therefore we shall deploy the use of the flat pdf for our purposes. We
will
√ use type A uncertainty analysis. The uncertainty for the flat pdf is given by the width of the pdf a, divided by
3,
a
u= √ (2)
2 3
13
10.1.2 Square Wave Signal
The uncertainty in the measurement of the amplitude of the power spectrum is,
4.845 − 4.835
u4.84 = √ = 2.88 × 10−3
2 3
1.235 − 1.225
u1.23 = √ = 2.88 × 10−3
2 3
1.035 − 1.025
u1.03 = √ = 2.88 × 10−3
2 3
0.625 − 0.615
u0.62 = √ = 2.88 × 10−3
2 3
0.505 − 0.495
u0.50 = √ = 2.88 × 10−3
2 3
0.495 − 0.485
u0.49 = √ = 2.88 × 10−3
2 3
0.305 − 0.295
u0.30 = √ = 2.88 × 10−3
2 3
0.305 − 0.295
u0.30 = √ = 2.88 × 10−3
2 3
0.315 − 0.305
u0.31 = √ = 2.88 × 10−3
2 3
0.185 − 0.175
u0.18 = √ = 2.88 × 10−3
2 3
0.225 − 0.215
u0.25 = √ = 2.88 × 10−3
2 3
0.215 − 0.205
u0.21 = √ = 2.88 × 10−3
2 3
14
And the associated standard uncertainty is given by,
140.005 − 139.995
u140.0 = √ = 2.88 × 10−3
2 3
430.005 − 429.995
u430.00 = √ = 2.88 × 10−3
2 3
710.005 − 709.995
u710.00 = √ = 2.88 × 10−3
2 3
990.005 − 989.995
u990.00 = √ = 2.88 × 10−3
2 3
1280.005 − 1199.995
u1280.00 = √ = 2.88 × 10−3
2 3
1560.005 − 1559.995
u1560.00 = √ = 2.88 × 10−3
2 3
1840.005 − 1839.995
u1840.00 = √ = 2.88 × 10−3
2 3
2130.005 − 2129.995
u2130.00 = √ = 2.88 × 10−3
2 3
2410.005 − 2409.995
u2410.00 = √ = 2.88 × 10−3
2 3
2690.005 − 2689.995
u2690.00 = √ = 2.88 × 10−3
2 3
2980.005 − 2979.995
u2980.00 = √ = 2.88 × 10−3
2 3
3260.005 − 3259.995
u3260.00 = √ = 2.88 × 10−3
2 3
11.1 Tasks
In this section, I answer the questions asked in lab manual.
15
3.24 324
r2 = = = 29.45
0.11 11
3.24
r3 = = 64.80
0.05
3.24
r4 = = 108.00
0.03
Next, we find that the ratio of the triangular signal function,
8 cos(t) cos(3t) cos(5t)
f (t) = + + + . . .
π 12 32 52
16
11.2 Task 2 : Microphone Signals
Filtering filters out certain signals of the wave and the plot below with a low pass filter of 200.00Hz applied illustrates
that, The filter blocked frequencies above 200.0Hz and allowed ones below it.
12 Task 4 : Equalizer
I think th equalizer work by performing a Fast Fourier Transform on the input signal and applies filters to adjust
the treble, base, midtone and volume by modifying wave characteristics such as frequency, wave-length and speed.
13 Conclusions
In this lab report we learnt and experimented with FFT and filters. We found that an FFT decomposes a signal
into its component basis ”sinusoid basis vectors”, and an equalizer modifies these properties to create new musical
beats.
17
References
[1] Bracewell, R.N., 1989. The fourier transform. Scientific American, 260(6), pp.86-95.
[2] Dyke, P., 2014. An introduction to Laplace transforms and Fourier series. Springer Science & Busi-
ness Media.
[3] Cochran, W.T., Cooley, J.W., Favin, D.L., Helms, H.D., Kaenel, R.A., Lang, W.W., Maling, G.C.,
Nelson, D.E., Rader, C.M. and Welch, P.D., 1967. What is the fast Fourier transform?. Proceedings of
the IEEE, 55(10), pp.1664-1674.
18
14 Links to code and data
The link to the code and data are attached in the following links.
Data and Code used for the experiment
19