# Connexions

You are here: Home » Content » Fourier Series: Square-wave

### Recently Viewed

This feature requires Javascript to be enabled.

# Fourier Series: Square-wave

Module by: B Kanmani. E-mail the author

Summary: The Fourier Series representation of continuous time periodic square wave signal, along with an interpretation of the Fourier series coefficients is presented in this module. This module is meant to bridge the gap between the student and the prescribed text book. Hence material found is most text books is not included here.

Fourier Series: Square-wave

The Fourier Series representation of continuous time periodic square wave signal, along with an interpretation of the Fourier series coefficients is presented in this module. This module is meant to bridge the gap between the student and the prescribed text book. Hence material found is most text books is not included here.

• The Fourier Series representation

The Fourier Series representation of continuous time periodic signals consists of representing the periodic signal as a weighted sum of cosine signals (consider the trigonometric serried or the cosine Fourier series).

Some of the features of this representation are:

1. i) It is a time-domain representation.
2. ii) It gives an exact representation of the signal using a single equation.
3. iii) It represents the signal as a weighted sum of sinusoidal signals
4. iv) Using Euler’s identity, the above trigonometric Fourier Series can be converted to the exponential Fourier Series. However it is not discussed here as the exponential series contains complex terms, which is of no physical significance.
5. v) The advantage of this time domain representation is that it gives the frequency components present in the signal
6. vi) From the Fourier series coefficients, it is possible to obtain the spectrum of the signal (using figure1).

1. i) The frequency knowledge helps in computing the output of filters
2. ii) The Parseval’s relation gives the power contained in various frequency components of the signal.
3. iii) The error in truncating the Fourier Series to include only N terms can be obtained as the ratio of signal power to the power contained in the truncated Fourier series.

2.0 An example:

Let us obtain the Fourier representation of the continuous time periodic square wave given in figure 2. From the above discussion we know that the Fourier series gives the time domain representation of the signal. Before obtaining the Fourier coefficients, let us see if representation without Fourier series is possible.

Figure 1: The continuous time periodic signal

2.1 Representation without Fourier Series:

Consider the continuous time periodic signal of figure 2. It is possible to represent the periodic signal of figure 2, using a set of two equations: (i) the representation in one period, and (ii) the complete signal as a infinite sum of time shifted signals as shown below:

Some observations

1. i) The representation without Fourier series, is an exact representation of the continuous time periodic signal.
2. ii) The above method can be used for representing any continuous time periodic signal.
3. iii) The representation without Fourier Series, uses a set of two equations, and this set is not compatible for processing with other signals; like multiplication, addition, subtraction, etc
4. iv) This representation without Fourier Series, is not suitable for transformations such as: differentiation, integration etc
5. v) From this representation, no knowledge of its frequency components is possible
6. vi) Since frequency information is not available, its output to filters cannot be predicted

Due to the above drawbacks, the Fourier series representation of continuous time periodic signals is preferred.

1. 1.0 Fourier Series of square-wave

The Fourier series representation of the periodic signal of figure 2 is given by:

We shall now see the effect of truncating the above infinite series summation.

• One term representation

The one term representation of the periodic signal of figure 2 is given below in figure 3. It can be seen that this is a very poor representation of the original signal.

It can be seen that the power of the signal is 1W, and power contained in the first harmonic if 0.81W, and hence the error in one term approximation is as high as 18.90%

Figure 3: Single term representation of the periodic square wave

• Two term representation

The first and the second term in the Fourier series representation of the periodic square-wave is given in figure 4. The sum of these two components results in the two term representation of the periodic square-wave, and is given in figure 5. In this case, the power contained in the first two terms is 0.9W, and hence the error in two term approximation is 10 %.

Figure 4: The first and the second term of the Fourier series of the periodic square wave

Figure 5: The two term representation of the Fourier series of the periodic square wave

• Three term representation

The first three terms in the Fourier series representation of the periodic square-wave is given in figure 6. The sum of these three components results in the three term representation of the periodic square-wave, and is given in figure 7. In this case, the power contained in the first three terms is 0.93W, and hence the error in three term approximation is 7 %.

Figure 6: The first three terms of the Fourier series of the periodic square wave

Figure 7: The three term representation of the Fourier series of the periodic square wave

• Eleventh harmonic representation

The representation to include upto the eleventh harmonic is given in figure 8. In this case, the power contained in the eleven terms is 0.966W, and hence the error in this case is reduced to 3.4 %.

Figure 8: Fourier representation to contain upto the eleventh harmonic

• The frequency information

Since the continuous time periodic signal is the weighted sum of sinusoidal signals, we can obtain the frequency spectrum of the periodic square-wave as shown below in figure 9.

Figure 9: The time-domain and frequency domain representation of the periodic square-wave

• Observations
1. i) From sections 3.1 through 3.4, it can be seen that the error in representation decreases with increase in number of terms, and the error tends to zero with infinite terms being included. However, for practical implementation, most periodic signals contain about 98% of signal power upto the 11th harmonic, and hence in cases where periodic signals need to be transmitted, the bandwidth may be taken as about ten times the fundamental frequency.
2. ii) Another significant observation is that the spectral amplitude decreases with increasing frequency. This observation is valid in general for all periodic signals except the periodic impulse train
3. iii) In this specific example considered, we find that the square wave can be realized as the weighted sum of odd harmonics of sinusoidal signals.
4. iv) In this specific example of the periodic square wave, although percentage error decreases with increasing terms in the Fourier series representation, the percentage over-shoot does not decrease with increasing terms, and this phenomenon is known as ‘Gibbs phenomenon’.

• Filter output

Consider the case of the filter input being the square wave and the filter cut-off is such that only the first harmonic gets through, then, the output of the filter will be a sine wave, as shown in figure 10. Suppose we desire the output of the filter to be a fair resemblance of the input periodic signal, then, the filter cut-off needs to be about ten times the fundamental, and in this case the error will be less than 3%. For reduced error, the cut-off could be about 20 times the fundamental frequency.

Figure 10: The output of the low pass filter when cut-off is such that it passes only the first harmonic

• Effect of time-period

We now consider the case of a square wave with period 1 second. The signal and its spectrum is sketched in figure 11(a). In figure 11(b) we have the same signal with period reduced to 0.5 second. From its spectrum it can be seen that the effect of compression in time domain, results in expansion in frequency domain. The converse is true, i.e., expansion in time domain results in compression in frequency domain.

Figure 11: (a) The periodic square wave with period of 1sec, and its corresponding spectrum, (b) The square wave with period reduced to 0.5 second and its corresponding spectrum.

## Content actions

PDF | EPUB (?)

### What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks