# Waveform Analysis

The following article was done by Shak Unvalla who is a Waterloo University Graduate. He is currently working as a tutor in Mississauga, **tutor in Oakville**, tutor in Brampton with high school students. He has helped many troubled high school students get better grades by tutoring in Mississauga. If you are a high school student and need tutoring in Mississauga click on **Tutor Mississauga** to read more about Shak Unvalla’s services

Abstract

A Fourier series describes functions that are not continuous everywhere and/or differentiable. In general, a Fourier series is used to represent how a system responds to a periodic input; this representation of the response depends on the frequency of the input. Periodic functions can be analyzed by a Fourier series or their Fourier components.

Introduction

The main purpose of this experiment is to analyze periodic functions into their Fourier components and compare them to theoretical values. A periodic function is a function that has a set of repeated values in regular periods. The periodic functions being analyzed are generated waveforms. There are different waveforms which are comprised of straight-line segments such as square waves, triangular waves, sawtooth waves and rectangular waves also half-wave and full-wave rectified sine waveforms. These waves are either odd or even. Based on weather the functions being analyzed are odd or even the Fourier series that can be described by them will change accordingly.

Theory

Fourier series is used to represent functions for which a Taylor series expansion is not possible. There are some conditions that need to be fulfilled in order for a function to be represented as a Fourier series. These conditions are known as Dirichlet conditions and are as follows:

The function in question has to be periodic

The function must be single-valued and continuous (except at a finite number of finite discontinuities)

The function must have a finite number of maxima and minima within a period

The integral over one period of |f(x)| must converge.

All functions can be written as a sum of an odd and an even component. Therefore, any function can be written as a sum of sine and cosine series. The Basic Fourier Series takes the trigonometric form:

1/(2 ) a_o+ ?_(n=1)^???(a_n ? cos??nx+b_n sin??nx)? ? (1)

where the coefficients are given by:

a_n= 1/? ?_(-?)^???f(x) cos??nx dx (n=0,1,2,…)? ? (2)

b_n= 1/? ?_(-?)^???f(x) sin??nx dx (n=1,2,…)? ? (3)

where f(x) is some function that is defined on the interval of (-?,?). The determination of the numerical values of the coefficients is a key factor in writing a function as a Fourier series. Moreover, the constant term in the basic series expression is the mean value of f(x) over the same interval. When the series converges to the function on the interval of (-?,?), it converges to a periodic function of 2?. This generally means that the series is a representation of the ‘periodic extension’ of f(x) for all x. Therefore, it is obvious to conclude that if the function is defined for all x as a periodic function of 2? then the series would represent the function everywhere when the representation is valid on the interval(-?,?).

Procedure

The procedure for this experiment can be found in the Physics 360B lab handout, titled “Analysis of Waves”.

Results / Discussion

Square-Wave

The first waveform being analyzed is the square wave. This waveform is ideally comprised of straight line segments. The Fourier series of a square wave is given by:

2A/? ?_(n=1)^??1/n sin?(n?t) (n=odd)

where, 1/n is the Fourier coefficient, A is the amplitude and ? is the angular frequency given by ?=2?/T . Hence, the theoretical Fourier coefficient for the first few terms of the series can be directly calculated for odd n.

n Theoretical Fourier Coefficient

(n_T)

1 1.000

3 0.3333

5 0.2000

7 0.1429

9 0.1111

11 0.0909

13 0.0769

Moreover, the experimental values for the coefficient were also calculated. The peak data provided the value for the Fourier coefficient. The amplitude of these coefficients is normalized in the following table:

n Peak corresponding to Experimental Coefficient Normalized Experimental Coefficient

(n_E)

1 1.923 1

3 0.6370 0.3313

5 0.3750 0.1950

7 0.2430 0.1264

9 0.1810 0.0941

11 0.1600 0.0832

13 0.1440 0.0749

It can be seen that the experimental value is relatively close to the theoretical value for most of the chosen n values. The percent difference between the theoretical and experimental value is given by:

% Difference= ((?|n?_T- n_E |))/n_T x 100

Therefore, the calculated values for the percent difference are given in the following table:

n_T n_E Percent Difference (%)

1.000 1.000 0

0.3333 0.3313 0.6000

0.2000 0.1950 2.500

0.1429 0.1264 11.55

0.1111 0.0941 15.30

0.0909 0.0832 8.471

0.0769 0.0749 2.601

For n values of 3, 5 and 13 the percentage difference between the experimental and theoretical values is relatively small implying that the theory agrees with experiment. The other values seem to be a bit higher and that could be due to the fact of background noise interfering with the equipment and hence affecting the data. Further, the graph that was used to determine the peak values is shown below in Figure 1:

Figure 1: Amplitude vs. Frequency graph of a generated Square – Wave function.

Moreover, the periodicity in the frequency becomes apparent in the peak data. The frequencies at which the function showed its peaks occurred at the odd harmonic frequency, i.e., the frequency corresponded to the n values. For example, for n=1 the frequency at which the peak occurred was approximately 100.0 Hz (103.0 Hz is the original value from the peak data) and the n=5 case corresponded to an approximate frequency of 500.0 Hz (515.0 Hz is the original value from the peak data). Therefore, the periodicity of the harmonics is prevalent in the gathered data.

Sawtooth Wave

The Fourier series for a sawtooth wave is given by:

A/? ?_(n=1)^???- (-1)^n/n? sin?(n?t) (n= 1,2,3,..)

In this case the Fourier coefficient is given by the term,-(-1)^n/n. The theoretical coefficients and experimental coefficients are summarized in the table below:

n Magnitude of Theoretical Fourier Coefficient

(n_T) Peak corresponding to Experimental Coefficient Normalized Experimental Coefficient

(n_E)

1 1.000 0.7780 1.000

2 0.5000 0.4130 0.5308

3 0.3333 0.2240 0.2879

4 0.2500 0.2040 0.2622

5 0.2000 0.1620 0.2082

6 0.1667 0.1140 0.1465

7 0.1429 0.1140 0.1465

8 0.1250 0.1000 0.1285

9 0.1111 0.0740 0.0951

10 0.1000 0.0780 0.1003

11 0.0909 0.0640 0.0823

12 0.0833 0.0550 0.0707

13 0.0769 0.0580 0.0746

The percent difference between the theoretical and experimental values of the coefficients for the sawtooth wave is indicted in the table below:

n_T n_E Percent Difference (%)

1.000 1.000 0

0.5000 0.5308 6.160

0.3333 0.2879 13.60

0.2500 0.2622 4.880

0.2000 0.2082 4.100

0.1667 0.1465 12.12

0.1429 0.1465 2.519

0.1250 0.1285 2.800

0.1111 0.0951 14.40

0.1000 0.1003 0.3000

0.0909 0.0823 9.461

0.0833 0.0707 15.13

0.0769 0.0746 2.991

It can be seen that the percent difference between the two values are relatively low with the exception of the value that are greater than 10%. The periodicity in the frequency is further verified because the peaks in the in peak data occur at regular intervals.

Triangular Wave

The Fourier series for a triangular wave is given by:

2A/? ?_(n=1)^??1/n^2 cos?(n?t) (n=1,3,5,…)

where 1/n^2 is the Fourier coefficient. From this the theoretical coefficient can be calculated. Further, from the peak data the experimental data can also be calculated and is summarized in the table below.

n Magnitude of Theoretical Fourier Coefficient

(n_T) Peak corresponding to Experimental Coefficient Normalized Experimental Coefficient

(n_E)

1 1.000 0.0490 1.000

3 0.1111 0.5600 11.43

5 0.0400 0.0480 0.9796

7 0.0204 0.0540 1.102

The experimental coefficient does not quite agree with the theoretical coefficient. This could be that the function generator did not produce a periodic wave. However, the percent difference between these values is shown below:

n_T n_E Percent Difference (%)

1.000 1.000 0

0.1111 11.43 10188

0.0400 0.9796 2349

0.0204 1.102 5301

The data for the triangular wave is obviously not reliable. The huge percent difference values indicate that the data collected for this function is insufficient to draw a conclusion as to weather the periodicity can be verified.

Rectangular wave (narrowed to a pulse like limit)

The derivative of the sawtooth Fourier series will yield the Fourier series of the rectangular wave which has infinitely high peaks. Hence the Fourier series is:

A/??t ?_(n=1)^????(-1)?^n ? cos??(n?t)? (n=0,1,2,…)

where ?(-1)?^n is the Fourier coefficient. The calculated values for the theoretical and experimental values of the Fourier coefficient are shown below:

n Magnitude of Theoretical Fourier Coefficient

(n_T) Peak corresponding to Experimental Coefficient Normalized Experimental Coefficient

(n_E)

1 1.000 0.1990 1.000

2 1.000 0.1860 0.9347

3 1.000 0.1790 0.8995

4 1.000 0.1930 0.9698

5 1.000 0.1910 0.9598

6 1.000 0.1870 0.9397

7 1.000 0.1810 0.9095

8 1.000 0.1920 0.9648

9 1.000 0.1900 0.9548

10 1.000 0.1640 0.8241

11 1.000 0.1880 0.9447

12 1.000 0.1860 0.9347

13 1.000 0.1590 0.7989

As expected the amplitude of the coefficients in the experimental column are relatively consistent. Theory predicts that the rectangular wave narrowed to a pulse like limit has all harmonics which correspond to equal amplitude. The percentage difference between these values is shown below:

n_T n_E Percent Difference (%)

1.000 1.000 0

1.000 0.9347 6.530

1.000 0.8995 10.05

1.000 0.9698 3.020

1.000 0.9598 4.020

1.000 0.9397 6.030

1.000 0.9095 9.050

1.000 0.9648 3.520

1.000 0.9548 4.520

1.000 0.8241 17.59

1.000 0.9447 5.530

1.000 0.9347 6.530

1.000 0.7989 20.11

The relative differences between the theoretical and experimental values are not that large with the exception of the n=10 and n=13 case.

Rectangular wave (sine wave)

The Fourier series is found by differentiating the Fourier series for the square wave function. Hence the Fourier series is given by:

2A/? ?_(n=1)^???-cos??(n?t)? ? (for all n)

It can be seen that the magnitude of the Fourier coefficient in this case is the order of unity. A summary of the theoretical and experimental values of the Fourier coefficient is shown below:

n Magnitude of Theoretical Fourier Coefficient

(n_T) Peak corresponding to Experimental Coefficient Normalized Experimental Coefficient

(n_E)

1 1.000 0.0240 1.000

2 1.000 0.0230 0.9583

3 1.000 0.0200 0.8333

4 1.000 0.0220 0.9167

5 1.000 0.0210 0.8750

6 1.000 0.0230 0.9583

7 1.000 0.0210 0.8750

The percentage differences between the theoretical and experimental values are calculated in the table below:

n_T n_E Percent Difference (%)

1.000 1.000 0

1.000 0.9583 4.170

1.000 0.8333 16.67

1.000 0.9167 8.330

1.000 0.8750 12.50

1.000 0.9583 4.170

1.000 0.8750 12.50

Even though there is an obvious difference between the two values it can be noted that the experimental value for the coefficient occurred at regular intervals and is self consistent within its self. Hence the periodicity of the function is verified.

Half-Wave Rectified Sine Wave

The Fourier series for the half-wave rectified sine waveform is given by:

C- ?_(n=2,4,6…)^??1/(n^2- 1) cos??(n?t)?

where C is a constant and the Fourier coefficient is given by 1/(n^2- 1). The experimental and theoretical values for the coefficients are shown below:

n Magnitude of Theoretical Fourier Coefficient

(n_T) Peak corresponding to Experimental Coefficient Normalized Experimental Coefficient

(n_E)

2 0.3333 0.4400 1.000

4 0.06667 0.1650 0.3750

6 0.02857 0.0380 0.08636

The percentage difference between the two values is shown below:

n_T n_E Percent Difference (%)

0.3333 1.000 200.2

0.06667 0.3750 462.1

0.02857 0.08636 202.2

The values are not reliable in this case either. The peak data did occur at regular intervals. The theoretical and experimental values are not in agreement which suggests that the data accumulated is not sufficient enough to make a conclusion are the periodicity of the function.

Triangular/Sawtooth Waveform

The peak data for the rectified sawtooth is summarized below:

n Peak corresponding to Experimental Coefficient Normalized Experimental Coefficient

(n_E)

1 0.5380 1.000

2 0.2250 0.4182

3 0.1340 0.2491

4 0.1110 0.2063

5 0.0860 0.1599

6 0.0660 0.1227

7 0.0650 0.1208

8 0.0520 0.09670

9 0.0460 0.08550

10 0.0430 0.07993

11 0.0400 0.07435

12 0.0340 0.06319

13 0.0330 0.06134

Full-Wave Rectified Sine Wave

The Fourier series for the full-wave rectified sine wave is given by:

4A/? ?_(n=2,4,6…)^???(-?(-1)?^n)/(n^2- 1) ? cos??(n?t)?

where the Fourier coefficient is given by, (-?(-1)?^n)/(n^2- 1) . The magnitude of the theoretical and experimental coefficients is calculated and summarized below:

n Magnitude of Theoretical Fourier Coefficient

(n_T) Peak corresponding to Experimental Coefficient Normalized Experimental Coefficient

(n_E)

2 0.3333 0.3420 1.000

4 0.06667 0.0760 0.2222

The percentage difference between the theoretical and experimental Fourier coefficients is shown in the table below:

n_T n_E Percent Difference (%)

0.3333 1.000 200.2

0.06667 0.2222 233.3

The percentage difference between the values is relatively high. There are not enough data points to verify the periodicity of the function.

Conclusion

The Fourier components of the various waveforms were calculated and compared to the theoretical values. In most cases, the theory was consistent with experiment but for some of the cases the data used to determine if the theory was consistent was not valid. Further, for the cases where the data was valid the periodicity of the function was also verified. In conclusion, the theory was consistent with experiment.

References

1) “Experiment #16 Analysis of Waves”, University of Waterloo, Physics 360B, 2009