In this experiment you work with the Fourier series representation of periodic continuous-time signals and learn about Gibbs phenomenon.

The Fourier series representation of a periodic signal, with period
*T=1/fo*, is defined by

where the complex Fourier series coefficients, also expressed in polar
form,

are computed via the integral formula

where *T * is the fundamental period of the signal. The DC
component of the signal is equal to the first Fourier series coefficient
and is simply the average value of the signal over one period.

The sinusoidal components of the signal that occur at multiples of the
fundamental frequency are called harmonics.

In general, for well-behaved (continuous) periodic signals, a sufficiently
large number of harmonics can be used to approximate the signal reasonably
well. For periodic signals with discontinuities, however, such as a periodic
square wave, even a large number of harmonics will not be sufficient to
reproduce the square wave exactly. This effect is known as Gibbs phenomenon
and it manifests itself in the form of ripples of increasing frequency
and closer to the transitions of the square signal.

An illustration of Gibbs phenomenon is shown in the figure below. The figure shows the result of adding one, three, five, seven, and nine harmonics. In all cases, and regardless of the number of harmonics, it is observed that the overshoot of the ripples has a constant magnitude (around 18%).

In this experiment we study the Fourier series representation of two periodic signals, a triangular waveform and a square waveform. Both have periods equal to 2 seconds. It will be seen that Gibbs' effect is significanly more pronounced in the square wave case.