ELE 374
Formal Report
F our i er A nalys nalysii s
And Synt ynth h esi s of Wave f or ms
By Name: Ahmed Ali Riaz EECS Username: Username: ec09364 Student No: 090433441
L earni ar ni ng obje obj ectives ctives
This experiment will on completion, help the student to understand: (a) The physical meaning of signal spectrum (b) That each different waveform has a different spectrum (or spectral density) (c) That certain standard results exist for standard waveforms (d) The effects of spectrum limitation on the transmission of signals
Abstract This experiment explores Fourier analysis. Fourier series is used to convert a time-domain signal to frequency domain. Fourier series decomposes any periodic function or periodic signal into the sum of a set of simple oscillating oscillating functions, namely sines and cosines. This experiment experiment is concerned with the analysis of a signal and the exploration of the properties of the signal. In this experiment, we are going to study the basic waveforms such as sinusoidal, square, saw tooth and triangular waves. We We will use Fourier series to observe and study the effects of limiting the bandwidth of real signal, the amount of bandwidth needed to support a binary representation of an analogue signal, quantisation of analogue signals and unusual signals. A special java based application will be used to perform the experiment.
Introduction Fourier series were introduced by Joseph Fourier for the purpose purpose of solving the heat equation in a metal plate. The Fourier series has many applications in electrical engineering, vibration analysis, acoustics, optics, signal processing, image processing, quantum mechanics, and econometrics etc This experiment focuses on the analysis and synthesis of signals and Fourier Transform. A synthesized signal will be generated which will be an approximation of the input signal. The synthesized signal will look more and more like the input signal as the number of terms will increase. Using Fourier series a real signal in time domain domain will be characterised in in frequency domain which will be observed by the frequency domain graph. This experiment will also demonstrate the effect of varying the number nu mber of terms, Quantizing, Phase Shifting and Clipping the wave.
L earni ar ni ng obje obj ectives ctives
This experiment will on completion, help the student to understand: (a) The physical meaning of signal spectrum (b) That each different waveform has a different spectrum (or spectral density) (c) That certain standard results exist for standard waveforms (d) The effects of spectrum limitation on the transmission of signals
Abstract This experiment explores Fourier analysis. Fourier series is used to convert a time-domain signal to frequency domain. Fourier series decomposes any periodic function or periodic signal into the sum of a set of simple oscillating oscillating functions, namely sines and cosines. This experiment experiment is concerned with the analysis of a signal and the exploration of the properties of the signal. In this experiment, we are going to study the basic waveforms such as sinusoidal, square, saw tooth and triangular waves. We We will use Fourier series to observe and study the effects of limiting the bandwidth of real signal, the amount of bandwidth needed to support a binary representation of an analogue signal, quantisation of analogue signals and unusual signals. A special java based application will be used to perform the experiment.
Introduction Fourier series were introduced by Joseph Fourier for the purpose purpose of solving the heat equation in a metal plate. The Fourier series has many applications in electrical engineering, vibration analysis, acoustics, optics, signal processing, image processing, quantum mechanics, and econometrics etc This experiment focuses on the analysis and synthesis of signals and Fourier Transform. A synthesized signal will be generated which will be an approximation of the input signal. The synthesized signal will look more and more like the input signal as the number of terms will increase. Using Fourier series a real signal in time domain domain will be characterised in in frequency domain which will be observed by the frequency domain graph. This experiment will also demonstrate the effect of varying the number nu mber of terms, Quantizing, Phase Shifting and Clipping the wave.
Backgroun d Theory Theory A signal can be regarded as the variation of of any measurable quantity that conveys information concerning the behaviour of a related system . A system is a means of processing a signal. Signals come in many shapes and forms and can be classified as; Analogue/ Continuous Time Signals and Digital/ Discrete Time Signals. An alogue or Conti nu ous Tim e Si gnal
A continuous time signal can be represented mathematically mathematically as a function function of a continuous time variable. It is defined at all a ll time (t).
Di gital or Di screte crete Ti me Si gnal A discrete time signal is defined only at particular set of instants of time. time.
A discrete time signal is often derived from a continuous time signal by sampling it at uniform rate.
Ti me Domain It is a term used to describe the analysis of a physical quantity when the magnitude of a signal is compared with respect to time
F r equency Domai n
It is a term used to describe the analysis of a signal with respect to frequency.
In Fourier series, the frequency domain can be graphically represented by two different components: (i) Sine Component: The component of the signal in which there is no phase shift observed or phase shift is equal to zero degrees as shown in the figure below in red colour. In Fourier series, sine components are represented by „b n‟. (ii) Cosine Component: The component of the signal in which there is an observed phase shift of 90 degrees as illustrated by the blue colour wave. In Fourier series, cosine components are represented by „an‟ .
Certain properties such as rectification, quantization, phase-shifting and clipping are tested on the signal and output is observed. The testing will be carried on analogue signals such Square wave, Saw tooth wave and triangular wave.
Quantization
It is a process of approximating the continuous range of values by a finite set of discrete values. In this process, a PAM (pulse amplitude modulated) or a sampled signal gets converted to a digital signal by comparing it with steps. The step size depends on the amplitude of the sampled signal.
Clipping
The processes by which a particular part of the signal can be limited once it‟s exceed its threshold value. In this experiment, it will increase the amplitude but, it will clip the signal if goes out of range. When a clip function is applied to a sine wave, jagged edges will be observed as shown in the figure below
Rectification
It is a process by which an AC (alternating current) signal can be converter to its equivalent pulsating DC (direct current) form. With the application of rectification in this experiment, only the positive component of the signal can be observed. The negative component of the signal will get waived off. Types of Si gnal s
Periodic Signals Signals which repeat itself after a particular period are termed as periodic signals. Square wave, sine wave and triangular waves are examples of periodic signals. If the original real periodic signal in the time domain, x(t), is defined by: x(t) = x(t + n.T) Where, T is the fundamental period of x(t) and „n‟ is any integer. Aperiodic Signals Signals which do not have any relation with respect to time are termed as aperiodic signals. Random Signals Signals that cannot be characterized by a limited number of precise measures and does not have continuous relation with time or frequency. Noise is an example of a random signal.
ODD AND EVEN FU NCTI ONS:
Odd Function If x(t)= -x(-t) the signal is odd, eg a Sine wave. Even Function If x(t)= x(-t) the signal is even, eg a cosine wave. Note: ODD* ODD = EVEN EVEN * EVEN = EVEN EVEN * ODD = ODD ODD * EVEN = ODD ORHTHOGONALITY
When the product of two signals integrates or averages to zero over a specified time interval, the signal can be defined as orthogonal over the particular interval.
Discrete signals If the two signals averages to zero over the period T, then those two signals are orthogonal in that interval(T). Continuous signals If the product of two signals integrates to zero over the period T, then those two signals are ORTHOGONAL in that interval (T). Time Domain Representation Output signal to the input signal is represented as a function of time is called Time Domain Representation. F OURIE R SERI ES
Fourier series can be defined as sum of the sine and cosine components present in a signal. It is method of expressing a function of a signal in terms of the sum of its projections (amplitude and frequencies) onto a set of basic functions. Fourier series help us move from digital to analogue. Any periodic signal x (t), which has time period of T can be represented by the approximate sum of sine and cosine components.
Description of the Experiment
Type in the following URL: „ http://www.falstad.com/fourier/ ‟. An external JAVA applet window will be opened. Figure
The figure shows the Applet used for this experiment. It represents signals in time domain and frequency domain. In the Applet, the real signal being observed and analysed is represented as a white line. The menu on the right hand side allows you to choose which signal type you want to look at in detail. The r ed li ne represents the synthesised signal, i.e. the signal which results when you have only a limited number of spectra of the original signal available to combine them into the resulting, desired signal (e.g. a received signal at the system‟s receiver, or a signal at a system‟s output). The number of line spectra is set by the “slider bar” labelled NUMBER OF TERMS at the bottom right of the menu. The command buttons on the right represent the types of waves. The user can select any one of them by simply clicking on them. Below the command buttons
are two sliders which represent number of terms and Playing frequency. They can be set according to requirement by simply moving them right or left.
A) To use F our ier Anal ysis to obser ve the ef fect of l imiti ng th e bandwidth of a real signal . Select the square wave option. 1. Move the slider to the far left hand side. 2. The red line becomes flat 3. Note a single white dot under the cosines represented by a0. Magnitude is displayed when the cursor is placed on the dot.
Reason As the number of terms becomes “0” the curve becomes a straight line. nd Fourier series a0 + ∑an cos(nwt) + ∑bn sin(nwt). Since n=0 therefore 2 rd and the 3 component of the series would be zero, the only component remaining is a0 which is component of cosine and thus the only a white dot is visible under cosines. 4. Slowly increase the number of terms by moving the slider to the right. Note that the value remains 0 for dots under Cosines whereas it is maximum for sines at n=1 and “0” at even no. of terms i.e n=0,2,4... As the generalised formula for sine components b n states that bn=0 for even values of “n” and bn=4V/nπ for odd values of n.
5. The first five values are observed under and later confirmed by calculation.
Terms(n)
Sine Value(b n)
Cosine Value(a n)
1
1.27324
0
2
0
0
3
0.4244
0
4
0
0
5
0.25463
0
Calculations
– a0 = 1/T = 1/T – a0 = 1/T
= 1/T (0) a0 = 0
For n=1
N=1
For n=2
For n=3 b3 = 0.424 For n=4 b4 =0
For n=5
7)Implications The synthesized signal tries to take the approximate shape of the original signal depending on the no of terms. As we increase the number of terms, the synthesized signal looks more and more like the original signal. At maximum value of n in the applet i.e n=159, the synthesized signal looks exacltly like the original signal. N=159
Part ii) Repeat the above experiment with rectified square wave option. Click the clear button on the right Select the square wave option and Rectify
Term(n) 1 2 3 4 5
Sine(bn) 0.636618 0 0.212206 0 0.127323
Cosine(an) 0 0 0 0 0
For n=1
For n=5
Part iii) Press Clear button Square Wave and move the no of terms slider to the halfway. Then press phase shift button from the right hand menu ten times but slowly and notice after each click the change in original signal.
Explanation By pressing the phase shift button the original wave gets shifted 18˚. Therefore by pressing the phase shift button ten times the original wave gets shifted 180˚. When we apply 180˚ phase shift to sine wave it becomes inverted e.g sin90=1 & sin270= -1. The magnitude of the wave remains unchanged, only the polarity changes. At each click value of both sine and cosine components change
i.
Par t 4 ( Saw tooth wave form f or F our ier A nal ysis) Click the clear button and then the saw tooth option from the right side menu. 1. Reduce the no. of terms to minimum possible by moving the slider to the far left. 2. The red line(Synthesized wave) becomes flat because the n=0.
Note only 1 white dot is visible under cosines in frequency domain plot. Explanation When n=0, only ao component of the fourier series exist while a n and bn become zero. ao is the component of cosine therefore there is a white dot under cosines. 3. By placing the cursor on the sine and cosine components displays their magnitudes. 4. Note that as we increase the number of terms and new components appear, the sine ones have non-zero values and the cosine ones have zero values, similar to the case with square wave. This is because sine waves square waves; triangular and sawtooth waves all represent AC signals and obey Fourier series likewise. Keep on increasing the no. of terms until the synthesized signal looks approxiamately like the original signal. As we increase the terms the synthesized signal looks more and more like the original signal.
At n=35 the synthesized signal looks approxiamtely like the original signal and the frequency of the highest frequency terms is 7725Hz. The least bandwidth required here is 7940 Hz to transmit the signal, which is the same as square wave at 35 terms.
At n=60 the synthesized signal looks approximately like the original signal and at n=159 it looks exactly like the original signal.
5. Move the number of terms slider to half way and then press phase shift button 10 times slowly and note on each click the change in original signal.
Explanation 6. When the phase shift is clicked 10 times the sine component of the wave inverts. The original wave gets phase shifted at each click without any change in magnitude. 7. Move the slider so far to the left that only the 1st harmonic appears. The synthesized wave takes the shape of the sine wave. Now again press phase shift 10 times and note that the wave gets phase shifted and sine component inverted.
Part B ) Use of F our ier Ser ies to decide on Bandwidth needed to binar y representati on of an alogue signal .
1. Click the Clear button and then the SAW TOOTH Option; this would create a Saw tooth wave. Keep on increasing the no. of terms until the synthesized signal looks approximately the same as original signal. Here, the value of number of terms (n) is considered to be 60.
2. Click the quantize button from the right side menu and observe the change to the sawtooth signal. Upon pressing the quantise button the wave acquires a staircase like shape.
: Observation 3. When the quantize button is pressed for the first time, the sawtooth waveform gets transformed to a staircase waveform of step size 17 as shown in fig (a). When the quantize button is pressed for the second time, the staircase waveform of size 17 gets converted to size 9 as shown in fig (b). When the quantize button is pressed the third time, the waveform gets transformed into a bigger staircase waveform of step size 5 as shown in fig (c). 4) Fs >= 2fmax Given: f= 1Hz The minimum sampling frequency required is 2 Hz. Click on the CLEAR option and select COSINE. Move the no. terms slider unless the synthesized signal looks like the original signal. Press the quantise button 3 times. The cosine wave changes to a step like shape waveform.
Sampling frequency fs>=2fmax If f=1 Hz, then fs=2Hz.
6. Click the Clear button and then the Sawtooth again. Increase the number of terms until the synthesized signal looks approximately like the original signal. Again synthesize the waveform 3 times Now we have quantised sawtooth waveform, with 5 quantisation levels and 5 samples per period. For 5 levels, 3 bits per sample is required. = M M = Quantisation Level. N = No. of bits =5 n = log5 n= log5/log2 n=2.32 rounding off to n=3
7) Assume your coding scheme uses 1‟s and 0‟s with equal probability (this may not be the case in real systems), and assume the sawtooth has a fundamental
frequency of f=1Hz. What bit rate B do you need to transmit the bit stream representing the coded quantised sawtooth? k=3 bits F=1 Hz fs>=2f fs = 2 Hz B = fs*k B=2*3=6 bits/s 8) A fundamental frequency is required and to get that a square wave is needed. Square wave because of its infinite precision can be used as ideal wave. 9) Considering fs to be the minimum sampling frequency, fq=fs/2 = 0.5 H z. 11) Press the clear button. Select sawtooth wave. Press quantize button twice. It is observed that there are nine quantization levels instead of 5. 12) Design a digital communications system which transmits this quantized sawtooth as a stream of bits. There are 9 levels, so how many bits k will you need per sample? A: Consider k to be the number of binary bits to be transmitted, L as the quantization level. Given: L = 9 =9 n = log9/log4 Since the value of k is in decimals, round it off to next digit) n=4 To transmit a sawtooth wave with 9 quantization levels 4 bits will be required.
It is observed that with the increase in quantization level, the bit rate required to transmit the signal increase which in turn increases the cost
Part C) Un known Signals
Click the CLEAR option in the menu, and then the TRIANGLE option. 1. Increase the number of terms until you have a very good representation of the original signal. At n=60 synthesized wave looks like the original wave.
2. Now press the CLIP button 15 times slowly and observe the change in original signal and its spectra.
Note that the edge of the waves starts getting jagged when the CLIP button is pressed. The amplitude of the waveform increases while the frequency remains constant. 3. Now reduce the number of terms to n= 12 so that a handful of harmonics are left.
Original Signal
Synthesized Signal at hand full of harmonics
With fewer spectra‟s , the number of harmonic components reduces. The harmonics components are not sufficient to represent the original white signal as shown in the above fig.
Discussion and Conclusion
After doing this experiment, I completely understand the importance and proper application of Fourier series. Fourier series helps us understand better the behaviour of different types of signals. By increasing the number of terms a synthesized signal can be made to look exactly like the original signal. With variations in time domain we also experience variations in frequency domain. With the help of Fourier series we can improve the quality of signals. The sawtooth signal has similarities to square wave as both represent A.C voltages. Phase shift of 180˚ C to these waves causes the sine components to