Communication System Lab 5
Communication System Lab 5
Communication System Lab 5
Demonstration
Academic Individual &Team Subject
of Program and Lab Report
Honesty Work Knowledge/Viva
Results
Maximum Marks 6 2 2 7 3
Marks Obtained
GENERAL GUIDELINES
1. Students are required to submit the Lab Manual before the next lab. Late submission of Lab
Manuals will NOT be entertained.
2.
The marks in the Lab Performance will be counted as ZERO if the student is absent in the Lab.
3.
The instructors reserve the right to NOT allow late comers to attend the Lab.
4.
Turn off your MOBILE PHONES in the Lab, and keep them in the bag/pocket.
5.
Eating or drinking is STRICTLY prohibited in the Lab.
6. Leave your work station clean and in good order before leaving the Lab. ALWAYS turn off your
computers and/or machines before leaving.
7.
RETURN all the component to the Lab Attendant before leaving the Lab.
Gift University Gujranwala Electrical Engineering
EXPERIMENT NO. 5
Objectives:
To generate noisy signal and perform filtering using MATLAB
Description:
In electronics, noise is a random fluctuation in an electrical signal, a characteristic of all
electronic circuit. Noise generated by electronic devices varies greatly, as it can be produced by
several different effects. Thermal noise is unavoidable at non-zero temperature, while other types
depend mostly on device type (such as shot noise, which needs steep potential barrier) or
manufacturing quality and semiconductor defects, such as conductance fluctuations, including1/f
noise.
Noise is also typically distinguished from distortion, which is an unwanted systematic alteration
of the signal waveform by the communication equipment, for example in the signal-to noise and
distortion ratio (SINAD). In a carrier-modulated passband analog communication system, a
certain carrier-to-noise ratio (CNR) at the radio receiver input would result in a certain signal-to-
noise ratio in the detected message signal.
Communication Systems
Gift University Gujranwala Electrical Engineering
Gaussian noise:
Gaussian noise is statistical noise that has its probability density function equal to that of the
normal distribution, which is also known as the Gaussian distribution. In other words, the values
that the noise can take on are Gaussian-distributed. A special case is white Gaussian noise, in
which the values at any pairs of times are statistically independent (and uncorrelated). In
applications, Gaussian noise is most commonly used as additive white noise to yield additive
white Gaussian noise.
Noise Types:
1.1) Thermal noise 1.2) Shot noise 1.3) Flicker noise 1.4) Burst noise 1.5) Transit-time noise
White noise:
White noise is a random signal (or process) with a flat power spectral density. In other words, the
signal contains equal power within a fixed bandwidth at any center frequency. White noise draws
its name from white light in which the power spectral density of the light is distributed over the
visible band in such a way that the eye's three-color receptors (cones) are approximately equally
stimulated.
Additive white Gaussian noise (AWGN) is a channel model in which the only impairment to
communication is a linear addition of wideband or white noise with a constant spectral density
(expressed as watts per hertz of bandwidth) and a Gaussian distribution of amplitude.
Wideband Gaussian noise comes from many natural sources, such as the thermal vibrations of
atoms in conductors (referred to as thermal noise or Johnson-Nyquist noise), shot noise, black
body radiation from the earth and other warm objects, and from celestial sources such as the Sun.
The AWGN channel is a good model for many satellite and deep space communication links.
In this lab you have to generate white Gaussian noise in Matlab. By simply using build in
command ‘awgn’ or ‘randn’ command.
Algorithm:
Step 1: To generate sine waveform.
Output Results:
0 0
-5 -5
0 0.02 0.04 0.06 0.08 0.1 0 0.02 0.04 0.06 0.08 0.1
amplitude
0.4
0.2
0 0
-0.2
-5
0 0.02 0.04 0.06 0.08 0.1 0 0.02 0.04 0.06 0.08 0.1
time time
randm + sine awgn + sine
5 10
amplitude
amplitude
0 0
-5 -10
0 0.02 0.04 0.06 0.08 0.1 0 0.02 0.04 0.06 0.08 0.1
time time
fft of randm fft of awgn
40 100
20 50
0 0
0 0.02 0.04 0.06 0.08 0.1 0 0.02 0.04 0.06 0.08 0.1
Figure 5.1
We will call the noisy signal x(n). You are to design a low-pass filter to filter out the noise. You
will try different low-pass filters until you find one that works well.
If your computer supports sound, you can listen to the noisy signal x(n) with the command ‘
soundsc(x)’.Use the fft command as shown to plot the magnitude of the spectrum of the original
signal
====================================================================
LAB TASK
====================================================================
Lab Task 1
By using algorithm steps generate white Gaussian noisy signal reproduce a code in
MATLAB.
z1=abs(fft(x,1024));
z2=abs(fft(y,1024));
f2=0:fs/1023:fs;
(03 mark)
MATLAB code:
MATLAB results:
Lab Task 2
Construct an appropriate elliptical low-pass filter with the butter command. Use the filter
command to filter the noisy signal x(n) with the lowpass filter you construct.
Try different cut-of frequencies and different values for the stop-band ripple and the pass
band ripple. Can you remove most of the noise from the noisy signal?
wc=2*pi*f/fs;
[m,n]=butter(k,wc);
p=filter(m,n,y);
(03 mark)
MATLAB code:
MATLAB results:
This lab explained me about the creation and removal of noise in signals. I started with
generating the original signal, and then I built a white Gaussian noise. I then included the
Communication Systems
original signal as Page
well as the noise signal. and 6
examined both the filter- and non-filter-filled
output graphs.
Gift University Gujranwala Electrical Engineering
Review Questions
1. Explain how a low-pass filter can remove the high frequency noise?
(01 Mark)
A low-pass filter reduces high-frequency noise by allowing low-frequency signals to flow
through while attenuating or blocking high-frequency ones.
2. What frequencies are predominant in the speech signal. Can you identify which part of
the spectrum corresponds to the noise and which part corresponds to the speech signal
by using the soundsc command? (02 Mark)
Generally our Speech Sinal Travel bet 300 to 3400 Hz Frequency the Function soundsc
gives us the Spectrum of Speech Signal Travelling