Fourier Analysis - Experiment #10 - Classical Physics Lab | PHYS 401, Lab Reports of Physics

Material Type: Lab; Class: Classical Physics Lab; Subject: Physics; University: University of Illinois - Urbana-Champaign; Term: Fall 2003;

Typology: Lab Reports

Pre 2010

Uploaded on 03/16/2009

koofers-user-3bp
koofers-user-3bp 🇺🇸

5

(1)

9 documents

1 / 22

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
University of Illinois at Urbana-Champaign Department of Physics
Physics 301 Classical Physics Laboratory
Experiment 10
Fourier Analysis
Table of Contents
Subject Page
I. Aim-------------------------------------------------------------------------------------- 2
II. Introduction---------------------------------------------------------------------------- 2
III. Theory – Fourier series--------------------------------------------------------------- 2
IV. Theory – discrete Fourier transform------------------------------------------------ 4
V. The Oscilloscope's FFT analyzer---------------------------------------------------- 6
VI. Procedures------------------------------------------------------------------------------ 8
VII. Report----------------------------------------------------------------------------------- 17
References--------------------------------------------------------------------------------------- 18
Appendix I - Fourier integral----------------------------------------------------------------- 19
Appendix II - LabWindows/CVI simulation program------------------------------------- 20
Appendix III – Transferring data from the oscilloscope---------------------------------- 21
This version of the laboratory hand-out is new for Fall, 2003. Please look for errors and possible
improvements.
Revised 9/2003.
Copyright 1999 The Board of Trustees of the University of Illinois. All rights reserved.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16

Partial preview of the text

Download Fourier Analysis - Experiment #10 - Classical Physics Lab | PHYS 401 and more Lab Reports Physics in PDF only on Docsity!

University of Illinois at Urbana-Champaign Department of Physics

Physics 301 Classical Physics Laboratory

Experiment 10

Fourier Analysis

Table of Contents

Subject Page

I. Aim-------------------------------------------------------------------------------------- 2 II. Introduction---------------------------------------------------------------------------- 2 III. Theory – Fourier series--------------------------------------------------------------- 2 IV. Theory – discrete Fourier transform------------------------------------------------ 4 V. The Oscilloscope's FFT analyzer---------------------------------------------------- 6 VI. Procedures------------------------------------------------------------------------------ 8 VII. Report----------------------------------------------------------------------------------- 17

References--------------------------------------------------------------------------------------- 18

Appendix I - Fourier integral----------------------------------------------------------------- 19

Appendix II - LabWindows/CVI simulation program------------------------------------- 20

Appendix III – Transferring data from the oscilloscope---------------------------------- 21

This version of the laboratory hand-out is new for Fall, 2003. Please look for errors and possible

improvements.

Revised 9/2003.

I. Aim:

  1. To carry out Fourier Analysis, using the FFT of the HP oscilloscope of various common waveforms and pulses.
  2. To gain an understanding of the discrete Fourier transform as an extension to Fourier series.
  3. To understand the effects of both linear and non-linear operations on Fourier components.

II. Introduction:

A periodic waveform can be expressed as a sum of sines and cosines whose frequencies are harmonics of the fundamental frequency. Fourier analysis is an invaluable tool in experimental as well as theoretical work.

III. Theory – the Fourier series

In our application of the Fourier series we consider a function of time which has the property F t ( ) = F t ( + T ), i.e. it is a periodic function of time with period T. Recall that the frequency f = 1 T and the angular frequency ω = 2 π f. A periodic function can be expressed as the sum of sines and cosines whose frequencies are integer multiples of the fundamental frequency, f (^) o ,

or more conveniently the angular frequency, ω o. (Note To = 1 fo ) The expansion is

( (^) o ) ( 1 1

F(t) cos sin

o n n n n

a a n t b n

ω ωo t )

∞ ∞ = =

= + (^) ∑ +∑ (1)

where: / 2

/ 2

2^ o F(t) cos ( )

o o

T n T

a

T

ω

= (^) ∫ n (^) ot dt (2)

and / 2

/ 2

2^ o F(t) sin ( )

o o

T n T

b n t d

T

ω

= (^) ∫ o t. (3)

The integrals can be done over any interval of length T , e.g. [ may also be used. Evaluating equation (2) for n , we see that is twice the average of the function.

o 0,^ To ] = 0 ao F t ( )

Revised 9/2003.

/ 2

/ 2

1^ o F(t) o

o

in t o

T n T

e d

T

− ω

c = ∫ t (5)

Again this integral can be done over any convenient domain of one period.

III. Theory – the discrete Fourier transform

The waveforms discussed above extend over all time. We make measurements over finite time intervals. The Fourier components are infinite in number. No measurement is possible for an infinite number of components. The Fourier transform is strictly applicable to continuous functions only. The discrete Fourier transform may be applied to finite, digitally sampled waveform.

The fundamental basis of the discrete Fourier transform is a mathematical theorem known as the sampling theorem. At the most elementary level the sampling theorem states that if a periodic waveform has no Fourier components beyond a frequency fc (this frequency is called the folding frequency, the critical frequency, or the Nyquist frequency), then the waveform can be completely constructed from a finite number of its samples.

Consider a waveform h(t) that is sampled at time interval ∆ t as shown in the figure below.

h k

× ×^ ×

× ×

t

× ×

× ×

× ×

××

The waveform h(t) is determined at N times

hk = h k ( ∆ t ) k = 0, 1, 2, ..., N − 1

With these N measurements we determine the coefficients of N complex amplitudes, Hn.

Revised 9/2003.

1 0

1^ N exp( 2 / )

hk Nn H n π ikn

= ∑ − N

The expression above is a discrete version of Eq. 4b. For a strictly periodic waveform with no frequency above the folding frequency, fc = 1 2 Nt , the magnitude of these amplitudes are the

Fourier coefficients.

|H n|

2

c 2 f N

×^ ×^ ×

× ×

f

××^ ×× ××^ ××

The original waveform can be completely constructed from the coefficients with the inverse relation

1 0

exp(2 / )

N

H n k hk π ikn

= ∑ N

The relevant parameters of the discrete Fourier transform are

  1. N : total number of discrete samples.
  2. t : the time interval between samples.
  3. N ∆ = t T maxthe total sampling time. Note∆ t = T max N
  4. 1 ∆ = t fs : the sampling frequency. Note fs = 1 ∆ t.
  5. f (^) c = 1 2 Nt : the folding frequency.
  6. f : the frequency increment of the transform. Note ∆ f = 1 T max.

Revised 9/2003.

Fig. 1

Revised 9/2003.

VI. Procedures

In this laboratory exercise you will study the properties of the discrete Fourier transform. The Wavetek Function Generator is the source of the waveforms for most of the laboratory exercises. Connect the output of the Wavetek to the channel 1 input of the HP oscilloscope with a BNC cable.

We will use the sine wave, the bipolar square wave, the bipolar triangle wave, and the unipolar square wave with variable duty factor as our signals. The coefficients of the Fourier series for these waveforms have simple closed form analytic expressions that are given above. Excel files which show Fourier series for the square wave and triangle wave are in the 301 Common folder of the Physics 301 server, phyaplu. These files are from the Physics of Music course, Physics199POM, offered by Professor Errede. See, http://wug.physics.uiuc.edu/courses/phys199pom/. These files can serve as a template for further investigation. (The files in the 301 Common folder are read only. There are elements in files that are not relevant to this laboratory exercise.)

There is also a program written in LabWindows/CVI on the PCs in the Physics 301 laboratory. See Appendix II for a discussion of this program. Note that this program calculates and displays the and coefficients of the Fourier series. The FFT of the HP oscilloscope displays

amplitude in dBV, i.e. it ignores the relative proportion of sine and cosine at a given frequency.

a n bn

Exercise 1. Sine wave with period commensurate with sampling time In the first exercise you will use the HP oscilloscope to obtain the discrete Fourier transform of a sine wave under conditions that minimize the problem of leakage.

Set up the Wavetek to generate a 1.000 V and 1.000 kHz sine wave. (Wave form #0 in Fig 1 is a sine wave.) Observe the signal in the time domain, and then, using the FFT function, in the frequency domain. Choose an appropriate sweep rate, e.g. 2 ms/div. This sweep rate corresponds to 50 kSa/s, which is appropriate for this signal. The FFT function requires some setup. Follow the instructions below.

FFT operation:

  1. Press ‘±’ grey key.
  2. Toggle the ‘Function 2’ to ‘On’.

Revised 9/2003.

the window filter is discussed in the HP application note #243, Fundamentals of Signal Analysis, and in many texts. ‘Rectangular’ : The rectangular window is actually no window. The time record is not modified. The rectangular window is useful for periodic signals whose period is commensurate with the measurement time. It is also used for transient signals. ‘Flattop’ : This window provides the most accurate amplitude measurement. Thus it is used when analysis of the amplitudes of various features in a FFT spectrum is required. ‘Hanning’ : This window provides the most accurate frequency measurement. Thus it is used when analysis of the frequencies of various features in a FFT spectrum is required. It would be used, for example, to resolve two frequencies that are close together. It is the general purpose window. ‘Exponential’ : This window is used for transient signals.

You will briefly investigate the properties of the windowing functions in the exercises below.

  1. Measurement of the amplitude and frequency of features in the FFT spectrum is done with the cursors. Press ‘Cursor’ key and select the source ‘F2’. For the sine wave there is only one peak. Note how the FFT spectrum changes with each window. The FFT record as frequency, amplitude pairs can also be written to a file in an Excel readable format, CSV for comma separated values, with the BenchLink program.

  2. Choose the rectangular window for the FFT, and save the display as a TIF file with the BenchLink program. (See the appendix for a discussion of the BenchLink program.) The FFT yields a single well-defined peak with the rectangular window in this case because the period of the waveform (1 ms) is an integral multiple of the sampling period (20 ms). The rectangular window is not useful for most waveforms.

  3. Choose the flattop window for the FFT, and save the display as a TIF file. Measure and record the amplitude of the peak in dBV. Note the vertical resolution of the cursor, i.e. the change in the reading with a change in the position of the cursor by one position. This change is approximately the accuracy of the measurement.

The vertical scale is logarithmic, displayed in dBV (decibels relative to 1 Volt RMS). The measured amplitude is then

Revised 9/2003.

RMS RMS

20 log 1 V

V

where the numerator is the RMS value of the signal. Recall that a 2.82 V peak-to-peak sine wave is 1.00 V RMS, and thus will read 0.0 dBV on the FFT display. Verify that the measured amplitude agrees with the above formula.

The noise level is at approximately –40 dBV. The FFT spectrum at this level is erratic. Press the ‘stop’ key to freeze the display. With the cursor measure the frequency of the peak. Note that peak is broad. The breadth is due to the limited frequency resolution of the FFT. Unfortunately, the details are not the available HP documentation. Examine the FFT spectrum for the presence of harmonic distortion in the Wavetek signal, i. e. evidence of a signal at higher harmonics of the fundamental. The specified harmonic distortion in the Wavetek manual (<1% from 10.00mHz to 100.0kHz) is at the limit of the sensitivity of the HP oscilloscope. Is there evidence for harmonic distortion?

An high quality (and complicated) spectrum analyzer is available in the laboratory for your instructor to demonstrate the harmonic distortion of the Wavetek. The display screen is similar to the HP oscilloscope. Observe the amplitudes of the harmonics of a 1.000 kHz, 1.000 V sine wave. They are very small but measurable with a good quality spectrum analyzer.

Exercise 2. Sine wave whose period is incommensurate with sampling time and the effect of the windowing function. In the second exercise you will obtain observe the effect of the windowing function on the FFT of a sine wave.

Set up the Wavetek to generate a 1.000 V and 1.263 kHz sine wave. Observe the signal in the time domain. Use 5ms/div for the sweep. Note that the display does not show an integral number of cycles. Using the FFT function, observe the signal in the frequency domain. Note that the sampling rate is 20 kSa/s. First choose the rectangular window for the FFT, and save the display as a TIF file. The FFT shows strength over a range of frequencies even though the input is a pure sine wave. Find the frequency of the peak in the FFT, and the frequencies at which the FFT has been reduced by 20 dBV from the peak. Use this frequency difference to characterize the width of the FFT.

Revised 9/2003.

Exercise 4 Square Wave

(Caution: The square wave has significant high frequency Fourier components. Thus the conditions of the sampling theorem, namely, that the waveform have no Fourier strength beyond the folding frequency, are not satisfied. The amplitudes of the lower frequency components are still reliably shown. The baseline of the FFT is erratic due to the fold over from the high frequency components.)

Set the Wavetek to a bipolar square wave at 1.000 kHz and amplitude 1.000 V. Leakage is artificially minimized with this choice of frequency. (Wave form #1 in the Fig. 1 is a square wave.) Use the time domain to verify that you have the correct waveform. The FFT spectrum should show many peaks. For a complicated waveform the FFT displays

2 2

RMS

20 log 2 1 V

a n + bn

where the and b are the coefficients of the discrete Fourier transform. Measure the

amplitudes of the harmonics up to n = 11. Recall that the coefficients of the Fourier series are

a n (^) n

4 n π for odd and zero for even n. (See the Fourier simulation program or the Excel file.)

For your lab report answer the questions below.

n

(a) Do the frequency components in the oscilloscope FFT agree with the harmonics in the computer simulation? (b) Which harmonics are zero? What property of the waveform makes these harmonics zero? (The answer is not obvious.) (c) Use the expression above to calculate the amplitude of each peak in the FFT (non-zero harmonics) in volts from the measured amplitude in dBV. It is convenient to do the calculation and graphs in Excel. (d) Plot the amplitude of the non-zero harmonics versus harmonic number, n, on with linear axes and with log-log axes. On the same graph also plot the amplitude of the harmonics versus harmonic number of the Fourier series. Is there agreement between the measured FFT and the Fourier series? (e) What is the slope of your log-log plot? (f) Justify the value of the slope using the closed form solution for the Fourier coefficients.

Revised 9/2003.

Exercise 5 Triangle Wave Set the Wavetek to a triangle wave at the same frequency (1.000 kHz) and amplitude (1.000 V). (Waveform #2 in Fig. 1 is a triangle wave.) Use the time domain to verify that you have the correct waveform. Carry out the same procedures on the triangle wave as for the square wave above.

Exercise 6 Square Wave with Varying Duty Factor In this exercise we will Fourier analyze unipolar square waves. In particular we will study the effect of the duty factor (i.e. the fraction of the time period for which the output is high) on the Fourier spectrum. Waveforms #3, #4, and #5 above have 50%, 25% and 12.5% duty factor. The Wavetek can vary the duty factor of the unipolar square waveform 1% to 80%.

Let T be the period of the rectangular wave, and let τ = T m be the fraction of the time for

which the output is high. If m , the time for which the signal is high is equal to the time for which the signal is low. The signal is said to have a duty factor of 50%. (In our experiment we adjust the duty factor to make is an integer as suggested by the notation. With this choice the coefficients of the Fourier series have a simple form.) A simple exercise in Fourier analysis gives us an expression for the n Fourier component

m

th

/ 2 / 2

(^2) cos( 2 ) 2 1 (^) sin 2 1sin n a V nt^ dt V n^ V n T T n T n

τ τ (^) m

= = ^ ^ = 

∫ ^ ^ 

In this expression is the harmonic number, and V is the amplitude of the unipolar square wave. The duty factor is 100% × 1 / m. Our objective is to change the fraction of the time for which the output is high. We achieve this objective by an indirect method. We change the frequency of the signal (and hence the period of the signal), keeping the high output time fixed at 500 μs. Because the period of the signal changes, but its high output time is constant, we effectively change the duty factor. This indirect method is easy to implement with the ‘Pulse” mode of the Wavetek.

n

  1. Set the Wavetek on the ‘Pulse’ unipolar square wave with period of 1.000 ms (frequency of 1.000 kHz), a width of 500 μs and amplitude 1.000 V. Use a sampling rate of 20 kSa/s (5 ms/div) for the oscilloscope. The resolution of the FFT at this sampling rate is appropriate for the all frequencies in this exercise. It is convenient not to have to change the sampling rate in this exercise. Only change the period of the Wavetek in the remainder of this exercise. This waveform corresponds to waveform #3 in Fig. 1. The duty factor is 50%, and m = 2. The 1st, 3rd, 5th, 7th^ and 9th^ are displayed in the FFT at

Revised 9/2003.

magnitude of the amplitude, the amplitude is complex, versus frequency. The result will resemble the FFT of the low duty factor waveform.)

Exercise 7 Response of Linear Network When a periodic waveform is modified by linear elements (e.g. resistors, capacitors and inductors) the phase (i.e. relative magnitudes of the and ) and the amplitude of the Fourier

components are changed. However,

a n bn no new frequencies are generated. To illustrate this principle, use the circuit shown in Fig. 2.

Set the Wavetek for a 1.000 kHz bipolar square wave, and R to 1 kilohm. First set C = 0 μ F

and measure the harmonics in the signal up to n = 7. Next, leaving R unchanged, set

C = 0.1 μ F. Note the change in the waveform and the FFT. Again measure the amplitudes of

the harmonics in the signal up to n = 7.

11.11 K max

C = 0.1 μF

R Wavetek output

Oscillocope input

Fig. 2

The circuit is a voltage divider for which the ratio of the complex impedances

1 1 (^1 )

i C R i^ RC i C

This ratio can be written in polar form

1 2

(^1) tan ( ) 1 ( )

r R RC

C

Revised 9/2003.

Our FFT measures only amplitudes not phases so we can ignore the phase. The signal then at

each angular frequency ω = n ω o is attenuated by the factor

2

1 ( (^) o )

r

n ω RC

Let Vn ( C = 0.1 μ F ) and Vn ( C = 0 μ F )

n^ (^ 0.

be the measured amplitudes with and without the

capacitor. Then the ratio of V C = μ F ) to Vn ( C = 0 μ F ) for each harmonic is equal to the

attenuation factor.

For your lab report calculate the amplitudes of the components in volts from the measurements in dBV. Calculate the attenuation of each component. Compare the calculated attenuation to the

measured attenuation, i.e. the ratio of the amplitudes measured with C = 0.1 μ F to C = 0 μ F.

Exercise 8 Response of Non-Linear Network Set the Wavetek to a 1.000 kHz, 1.000 V sine wave. Replace the capacitor with a diode, and leave R = 1 kilohm. Observe the signal across the diode in the time domain. The input signal has only one frequency. The diode is a non-linear element and it introduces new frequencies. Measure the amplitudes of the harmonics up to n = 7. Give an explanation for the origin of the signal at the new frequencies.

Exercise 9 Unknown Signal A signal is distributed to each bench. The black terminal is ground and the red terminal is the signal. Connect the terminals to the oscilloscope with appropriate leads. Observe the signal in the time domain and in the frequency domain. Measure the amplitudes and frequencies of all components above the noise level in the FFT spectrum. Calculate the amplitude of the components in volts from the measurements in dBV.

VII. Report

Your Lab report must also include the answers to questions asked in Part VII. Each graph should have a title, labeled axes with appropriate units.

Revised 9/2003.

Appendix I Fourier Integral

Recall the expression for the Fourier series using complex exponential from above.

F(t) n in^^ o t

n

c e^ ω

∞ = −∞

= (^) ∑

0

/ 2

/ 2

1 T F(t) in t

n T

c e d

T

− ω t

= (^) ∫

In exercise 5 we let the period T get larger and larger. Equivalently, the fundamental frequency,

ω o , becomes smaller and smaller. In the limit T → ∞ the Fourier coefficients cn → c ( ω), i.e.

they become a continuum. The Fourier series becomes a Fourier integral.

F(t) c ( ω ) ei^^ ω td ω

+∞ −∞

= (^) ∫

( ) 1 F(t)

c ω e i^^ ω t d

π

− t

+∞

−∞

= (^) ∫

Revised 9/2003.

Appendix II LabWindows/CVI Fourier Simulation Program

There is a LabWindows/CVI program that calculates the coefficients of the Fourier series on the Physics 301 PCs. The program is foursim2 and can be run from a shortcut on the desktop. If there is no desktop link, simply search for the program.

Alternatively, click on the Shortcut to CVI or Start -> Program -> LabWindows_CVI -> LabWindows_CVI to launch the CVI software. At the menu panel, click on _File -> Open -> Project[.prj]_* to load the foursim2.prj program. [ Or, it may have already been loaded if you see its name in the project window. ] Press Shift-F5 or click at the menu panel Run -> Run Project to run the program.

Explore the front panel of the program. There are a variety different waveforms with several different amplitudes available to analyze. The fundamental frequency is set to 1 Hz. The program computes 25 Fourier coefficients and displays them on the screen. It can also display the harmonics and coefficients in graphical plots. The regeneration of the original wave from the harmonics is another feature of this program. Watch how the wave is regenerated by adding harmonics. You are encouraged to run the program for all waveforms, as time allows. Each waveform takes a minute or less to run. The program also lets you print the results in paper format so that you could analyze them for your report.

A word of caution in the interpretation of the results is in order. Following equations (2) and (3) above, the program does a numerical integration to obtain the coefficients of the Fourier series. The coefficients are displayed in scientific notation. Due to accuracy of the integration technique coefficients which should be identically zero are not zero. In almost all cases it is easy to see from the large negative exponent that the coefficients is actually zero.

Revised 9/2003.