Lab Manual Final
Lab Manual Final
ENGINEERING AND
TECHNOLOGY –TIRUTTANI – 631209
Affiliated to Anna University, Chennai, An ISO
9001:2015 certified institution.
INSTITUTE VISION
To be at the forefront of technical education, turning out high quality engineering and technical
manpower to meet global needs, through academic excellence, stimulating a research-oriented
ambience and inspiring teaching
INSTITUTE MISSION
Inculcating a culture of quality in all spheres of teaching and learning
Providing fully equipped state of the art infrastructure and facilities
Creating an academic ambience for students to realize their dreams
Practicing innovative and interactive teaching in theory and practice across curriculum
Implementing placement and training activities for holistic development, from year one
onwards
Generating a future – ready culture, that embraces challenges and acts as a change catalyst
DEPARTMENT VISION
To empower the students in future trends of Electronics and Communication Engineering, satisfying
the societal needs ethically and promoting research activities in latest technologies among the
students to produce a quality engineers and powerful entrepreneurs
DEPARTMENT MISSION
M1.To provide a special learning environment to empower the students to confront the challenges
of the Electronics and Communication Engineering field.
M2. To provide ethical and value based education by promoting activities addressing the societal
needs.
M3.To fulfill the research interests of faculty and students by promoting and sustaining in house
research facilities so as to obtain the reputed publications and patents.
M4.To provide quality education and to impart entrepreneurial and employable skills
SYLLABUS
OBJECTIVES:
LIST OF EXERCISES
1. Modeling of wireless communication systems using Matlab(Two ray channel and Okumura –Hata model)
2. Modeling and simulation of Multipath fading channel
3. Design, analyze and test Wireless standards and evaluate the performance measurements such as BER, PER,
BLER, throughput, capacity, ACLR, EVM for 4G and 5G using Matlab
4. Modulation: Spread Spectrum – DSSS Modulation & Demodulation
5. Wireless Channel equalization: Zero-Forcing Equalizer (ZFE),MMSE Equalizer(MMSEE),Adaptive Equalizer
(ADE),Decision Feedback Equalizer (DFE)
6. Modeling and simulation of TDMA, FDMA and CDMA for wireless communication
COURSE OUTCOMES:
Upon completion of the course, the students will be able to:
COURSE OUTCOMES : Upon successful completion of the course the student will be able to:
CO1:Understand The Concept And Design Of A Cellular System.
CO2:Understand Mobile Radio Propagation And Various Digital Modulation Techniques.
CO3:Understand The Concepts Of Multiple Access Techniques And Wireless Networks
CO4:Characterize a wireless channel and evolve the system design specifications
CO5:Design a cellular system based on resource availability and traffic demands.
Marks Marks
Evaluation Parameters
Allotted Awarded
Aim & Hardware / Software Required: 10
Design & Circuit Diagram / Algorithm & Flowchart: 30
Observation & Calculation / Program: 30
Graph / Output & Result: 20
Viva Voce: 10
Total: 100
Exp. Pg.
INDEX
No. No.
Modeling of wireless communication systems using Matlab(Two ray channel
1 and Okumura –Hata model)
Modeling and simulation of Multipath fading channel
2
Design, analyze and test Wireless standards and evaluate the performance
3 measurements such as BER, PER, BLER, throughput, capacity, ACLR, EVM for
4G and 5G using Matlab
Modulation: Spread Spectrum – DSSS Modulation & Demodulation
4
Wireless Channel equalization: Zero-Forcing Equalizer (ZFE),MMSE
5 Equalizer(MMSEE),Adaptive Equalizer (ADE),Decision Feedback Equalizer
(DFE)
Modeling and simulation of TDMA, FDMA and CDMA for wireless
6 communication
AIM:
To develop a MATLAB code for computation of Pathloss between the transmitter and receiver in
wireless environment.
APPARATUS REQUIRED:
THEORY:
The path loss, which represents signal attenuation as a positive quantity measured in dB, is defined
as the difference between the effective transmitted power and the received power, and may or not include
the antenna gains. The path loss for the free space model when antenna gains are included is given by
PL(dB)=10log(Pt/Pr)=-10log[GtGrλ2/(4п)2d2]
When antenna gains are excluded, the antennas are assumed to have unity gain, and path loss is given by
PL(dB)=10log(Pt/Pr)=-10log[λ2/(4п)2d2]
The Friis free space model is only a valid predictor for P r for values of d which are in the far-field region of
the transmitting antennai.e the region beyond the far field distance df, which is related to the largest linear
dimension(D) of the transmitting antenna aperture and the carrier wavelength.
df=2D2/ λ
Program:
% This program calculate the Free Space Propagation Loss %with assumption of unity antenna gain for
transmit and %receive antenna
clc;
close all;
clear all;
f = input('Enter carrier frequency:');
c = 3*10^8;
%Calculate Wavelength
lamda=c/f;
D=input('Enter the diameter of the Transmitting Antenna in meter:');
%calculate fraunhofer(far-field region) distance
df=2*D^2/lamda;
%Calculate pathloss when distance between the antennas is greater than df
d = 0:1:10000;
if d>=df
Lp =(4*pi*d/lamda).^2;
GRT Institute of Engineering and Technology, 2|Page
Tiruttani
EC3501 W ireless Communication
SysteLaboratory
else
Lp=0;
end
subplot(2,1,1);
plot(d,Lp,'b');
xlabel('x-->d (distance in Km)');
ylabel('y-->Lp (path loss)');
title('Free space model');
grid on;
subplot(2,1,2);
plot(d,10*log(Lp),'r');
xlabel('x-->d (distance in Km)');
ylabel('y-->Lp (Path loss in dB)');
title('Free space model');
grid on;
0.15
0.1
0.05
0
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
x--> D (distance in Km)
Free space model
0
y--> Lp (Path loss in dB)
-50
-100
-150
-200
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
x--> D (distance in Km)
Result:
Thus, the pathloss for the given transmitting antenna diameter and operating wavelength is calculated for
various distance and graphs are plotted for Pathloss vs Distance.
Exp. No. : 02
SIMULATION OF MULTIPATH FADING CHANNEL
Date:
AIM:
To design a Model and simulation of Multipath fading channel
APPARATUS REQUIRED:
THEORY:
In wireless communication, fading is a phenomenon in which the strength and quality of a radio
signal fluctuate over time and distance. Fading is caused by a variety of factors, including multipath
propagation, atmospheric conditions, and the movement of objects in the transmission path. Fading can
have a significant impact on the performance of wireless communication systems, particularly those that
operate in high-frequency bands. Small-scale fading is a common issue in wireless communication. It
happens when a signal is transmitted from a transmitter to a receiver and it experiences multiple signal
paths due to reflection, diffraction, and scattering from objects in the environment. These signal paths can
cause interference and distortion to the signal, resulting in fluctuations of the signal strength at the receiver.
Multipath delay spread is a type of small-scale fading that occurs when a transmitted signal takes
multiple paths to reach the receiver. The different components of the signal can arrive at the receiver at
different times, causing interference and rapid variations in signal amplitude and phase. Multipath delay
spread can cause Inter-Symbol Interference (ISI), where symbols in the transmitted signal overlap and
interfere with each other, leading to errors in the received signal. The root means square (RMS) delay
spread is a measure of the dispersion of the signal and determines the frequency-selective characteristics of
the channel. Doppler spread is a type of small-scale fading that occurs when there is relative motion
between the transmitter and the receiver. The relative motion causes a shift in the frequency of the
transmitted signal, known as the Doppler shift. The Doppler shift causes different frequency components
of the signal to arrive at the receiver with different phases and amplitudes. This results in rapid variations
in signal amplitude and phase, which can cause fading and errors in the received signal.
The Doppler spread is a measure of the rate of change of the Doppler shift and determines the time-
varying characteristics of the channel. Large-scale fading is a phenomenon that occurs in wireless
communication when the signal strength decreases over long distances.Large-scale fading is called “large-
scale” because the variations occur over long distances, typically several kilometers.Unlike small-scale
fading, which affects individual symbols or bits, large-scale fading affects the entire signal.
CODING:
% Simulation parameters
numSamples = 1000; % Number of samples
txSignal=randn(1,numSamples)+1i*randn(1,numSamples);
EC3501 W ireless Communication
%SimulatemultipathfadingchannelrxSig SysteLaboratory
nal=zeros(1,numSamples);forpath=1:nu
mPaths
rxSignal=rxSignal+h(path,:).*txSignal;
end
t=1:numSamples;
figure;
subplot(2,1,1);
plot(t,real(txSignal),'b',t,imag(txSignal),’r’);
title('TransmittedSignal');
legend('In- phase','Quadrature');
xlabel('Time');
ylabel('Amplitude');subplot(2,1,2);
plot(t,real(rxSignal),'b',t,imag(rxSignal), 'r');
title('Received Signal');
legend('In- phase','Quadrature');
xlabel('Time');
ylabel('Amplitude');
OUTPUT:
RESULT:
Thus the designing of a Model and simulation of Multipath fading channel has been achieved.
To Design, analyze and test Wireless standards and evaluate the performance measurements such as
BER, PER, BLER, throughput, capacity, ACLR, EVM for 4G and 5G using Matlab
APPARATUS REQUIRED:
THEORY:
PROCEDURE:
OBSERVATION:
RESULT:
Exp. No. : 4a
SIGNAL SAMPLING AND RECONSTRUCTION
Date:
AIM:
To generate a various types of sampled signal from the input modulating signal with
frequency of 500 Hz and reconstruct the modulating signal.
APPARATUS REQUIRED:
THEORY:
The analog signal can be converted into a discrete time signal by a process called
sampling. The sampling theorem for a band limited signal of a finite energy can be stated as “A
band limited signal of finite energy which has no frequency component higher than W Hz is
completely described by specifying the values of the signal at instants of time separated by
1/2W seconds”. It can be recovered from the knowledge of the samples taken at the rate of 2W
per second.
PROCEDURE:
1. Connect the 250Hz 5V p-p signal generated on board to the analog input,by means of
the patch-cords provided.
2. Observe the output of sampling Amplifier waveform at sample Output.
3. Connect this sampled output to the input of the fourth order low pass filter.
4. Observe the reconstructed signal at the output of the fourth order low pass filter.
5. Observe the output of sample hold amplifier at Sample Hold output.
6. Observe the reconstructed signal at the output of the fourth order low pass filter.
GRT Institute of Engineering and Technology, 8|Page
Tiruttani
EC3501 W ireless Communication
SysteLaboratory
OBSERVATION:
MODEL GRAPH:
CIRCUIT BOARD:
OUTPUT GRAPH:
RESULT:
Thus the various types of sampling and reconstruction was demonstrated for the
sinusoidal signal of frequency 500Hz.
Exp. No. : 4b
TIME DIVISION MULTIPLEXING
Date:
AIM:
To multiplex four channels with a different frequencies and the multiplexed output is
transmitted in single signal and reassemble the single signal into multiple signal based on
timing.
APPARATUS REQUIRED:
1. Time Division Multiplexing Trainer Kit
2. Digital signal oscilloscope (DSO) / Mixed Signal Oscilloscope (MSO)
3. Patch cords
THEORY:
The sampling Theorem provides the basis for transmitting the information contained in
a band limited message signal m (t) as a sequence of samples of m(t) taken uniformly at a rate
that is usually slighter higher than the Nyquist rate. An important feature of the sampling
process is a conservation of time. That is, the transmission the message samples engages the
communication channels for only a fraction of the sampling interval on a periodic basis, and in
this way some of the time interval between adjacent samples is cleared for use by other
independent message sources on a time shared basis. We there by obtain a time division
multiplexing (TDM) system, which enables the joint utilization of a common communication
channel by a plurality of independent message sources without mutual interference among
them.
PROCEDURE:
1. Connect the four channel inputs 250 Hz, 500Hz , 1KHz , 2KHz to the input of
transmitter CH0,CH1,CH2,CH3 respectively.
2. Observe the Time Multiplexed PAM waveforms at the output of the Multiplexer
(TXD).
3. Observe the four different signals placed in their respective time slots.
4. Vary each of the amplitude of the amplitude of each channel and see the effect on
the TDM waveform.
OBSERVATION:
OUTPUT GRAPH:
RESULT:
Thus the frequencies are multiplexed at the transmitter and reassembled at the receiver
on the basis of timing.
Exp. No. : 05
PULSE CODE MODULATION AND DEMODULATION
Date:
AIM:
To convert an analog information into a binary sequence with respect to an input signal
and demodulate the original signal.
APPARATUS REQUIRED:
1. PCM Modulation and demodulation Trainer Kit
2. Digital signal oscilloscope (DSO) / Mixed Signal Oscilloscope (MSO)
3. Patch cords
THEORY:
GENERATION:
In pulse code modulation (PCM) a message signal is represented by a sequence of
coded pulses, which is accomplished by representing the signal in discrete form in both time
and amplitude. The basic operations performed in the transmitter of a PCM system are
sampling, quantizing and encoding. The low pass filter prior to sampling is included to prevent
aliasing of the message signal. The incoming message signal is sampled with a train of narrow
rectangular pulses so as to closely approximate the instantaneous sampling process. To ensure
perfect reconstruction of the message signal at the receiver, the sampling rate must be greater
than twice the highest frequency component W of themessage signal in accordance with the
sampling theorem. The quantizing and encoding operations are usually performed in the same
circuit, which is called an analog-to-digital converter. The same circuit, which is called and
analog-to-digital converter. The sampled version of the message signal is then quantized,
thereby providing a new representation of the signal that is discrete in both time and amplitude.
In combining the process of sampling and quantization, the specification of a continuous
message (baseband) signal becomes limited to a discrete set of values, but not in the form best
suited to transmission. To exploit the advantages of sampling and quantizing for the purpose of
making the transmitted signal more robust to nose, interference and other channel impairments,
we require the use of an encoding process to translate the discrete set of sample values to a
more appropriate form of signal.
REGENERATION:
The most important feature of PCM system lies in the ability to control the
effects of distortion and noise produced by transmitting a PCM signal through a channel. This
capability is accomplished b reconstructing the PCM signal by means of a chain of regenerative
repeaters located at sufficiently closed spacing along the transmission route.. The equalizer
shapes the received pulses so as to pulses, for sampling the equalized pulses at the instants of
time where the signal to noise ratio is maximum. Each sample so extracted is compared to
predetermined threshold in the decision making device. This decoding process involves
generating a pulse, the amplitude of which is the linear sum of all the pulses in the code word.
The final operation in the receiver is to recover the message signal by passing the decoder
output through a low pass reconstruction filter whose cut-off frequency is equal to the message
band width W. Assuming that the transmission path is error free, the recovered signal
includesno noise with the exception of the initial distortion introduced by the quantization
process.
1. Connect the AC Power Mains Code at the rear end of the BCT -10 kit
2. Power ON the BCT- 10 kit.
3. Measure the frequency of TX –Clock.
4. Connect TX-Clock to RX-clock & TX-SYNC to RX-SYNC
5. Connect DC Variable output voltage (+5V to -5V) to the input socket of modulation
block.
6. Vary the DC variable voltage from +5V to -5V and note down the binary word from
LED’s of Modulation Block.
7. To observe the PCM Data,connect the CRO at PCM output socket.
8. Now connect PCM output of Modulation block to RX-Data of Demodulation block.
9. Vary the DC Variable Voltage from +5V to -5V and note down the binary word from
LED’s of Modulation & Demodulation Block.
10. Now you can see the demodulation output will vary between 0 to 10V for -5V to +5V
modulating DC input.
OBSERVATION:
Amplitude Time Period
Signal
(Volt) (ms)
Message s/g 6 8
ON time=1
Clock s/g 4
OFF time=1
PCM o/p 4 -
Demodulated s/g 6 8
MODEL GRAPH:
CIRCUIT BOARD:
RESULT:
Thus the input signal is converted to an binary sequence at transmitter and the actual
signal is recovered at the receiver.
AIM:
To maintain the amplitude and width of pulses are constant while the position of the pulses
varies with the input signal and demodulate the actual signal.
APPARATUS REQUIRED:
1. PAM/PPM/PWM Trainer Kit
2. Digital signal oscilloscope (DSO) / Mixed Signal Oscilloscope (MSO)
3. Patch cords
THEORY:
PAM: Pulse-amplitude modulation (PAM), is a form of signal modulation where the message
information is encoded in the amplitude of a series of signal pulses. It is an analog pulse
modulation scheme in which the amplitudes of a train of carrier pulses are varied according to
the sample value of the message signal.
PROCEDURE:
1. Connect the modulating signal and pulse input to the PAM/PPM/PWM.
2. Observe the output of same.
OBSERVATION:
Amplitude Time Period
Signal
(Volt) (ms)
Input s/g (Modulating signal) 4 8
Pulse s/g 4 2
PAM output 4 Sampled time=0.5
CIRCUIT BOARD:
MODEL GRAPH:
OUTPUT GRAPH
RESULT:
Thus operation of PAM was observed and the output waveforms are verified.
Exp. No. : 07
IMPLEMENTATION AND DEMONSTRATION OF PWM/PPM
Date:
AIM:
To maintain the width of pulses are constant while the position of the pulses varies with the input
signal and demodulate the actual signal.
APPARATUS REQUIRED:
1. PAM/PPM/PWM Trainer Kit
2. Digital signal oscilloscope (DSO) / Mixed Signal Oscilloscope (MSO)
3. Patch cords
THEORY:
PWM: Pulse width modulation (PWM) is a modulation technique that generates variable-
width pulses to represent the amplitude of an analog input signal. The output switching
transistor is on more of the time for a high-amplitude signal and off more of the time for a low-
amplitude signal.
PROCEDURE:
1. Connect the modulating signal and pulse input to the PAM/PPM/PWM.
2. Observe the output of same.
OBSERVATION:
Amplitude Time Period
Signal
(Volt) (ms)
Input s/g (Modulating signal) 4 8
Pulse s/g 4 2
PPM output 2 1
PWM output 2 1
CIRCUIT BOARD:
MODEL GRAPH:
RESULT:
Thus operation of PPM/PWM was observed and the output waveforms are verified.
Exp. No. : 08
DIGITAL MODULATION- ASK,PSK,FSK
Date:
AIM:
To implement a digital modulation technique of Amplitude Shift Keying.
APPARATUS REQUIRED:
Dual traces CRO, ASK kit, FSK Kit, PSK Kit, Connecting leads.
THEORY:
Amplitude shift keying (ASK) is the simplest digital modulation technique. In this
modulation method there is only one carrier which is switched ON/OFF depending upon the
input binary sequence to transmit symbol 0 and 1. The binary ASK system was one of the
earliest form of digital modulation used in wireless telegraphy. In an binary ASK system binary
symbol 1 is represented by transmitting a sinusoidal carrier wave of fixed amplitude Ac and
fixed frequency fc for the bit duration Tb where as binary symbol 0 is represented by switching
of the carrier for Tb seconds. This signal can be generated simply by turning the carrier of a
sinusoidal oscillator ON and OFF for the prescribed periods indicated by the modulating pulse
train. For this reason the scheme is also known as on-off shift testing. The ASK signal can be
generated by applying the incoming binary data and the sinusoidal carrier to the two inputs
of a product modulator. The resulting output is the ASK wave.
PROCEDURE:
1. Make connections as per block diagram.
2. Set the input and carrier signal.
3. Obtain ASK,FSK AND PSK modulated and de-modulated signal on CRO and trace it on trace
paper.
OBSERVATION:
OUTPUT GRAPH:
RESULT:
Thus the output of ASK,FSK and PSK is verified.
Exp. No. : 09
DELTA MODULATION AND DEMODULATION
Date:
AIM:
To consider the sampling rate higher and the step size is small (delta) to modulate the signal at
the transmitter and recover the actual signal at the receiver.
APPARATUS REQUIRED:
1. Delta Modulation and demodulation Trainer Kit
2. Digital signal oscilloscope (DSO) / Mixed Signal Oscilloscope (MSO)
3. Patch cords
THEORY:
DM uses a single bit PCM code to achieve to achieve digital transmission of analog
signal. With conventional PCM each code is the binary representation of both sign and
magnitude of a particular sample. With DM, rather than transmitting a coded representation of
a sample a single bit is transmitted, which indicates whether the sample is smaller or larger
than the previous sample. The algorithm for a delta modulation system is a simple one. If the
current sample is smaller than the previous sample, then logic 0 is transmitted or logic 1 is
transmitted if the current sample is larger than the previous sample. The input analog is
sampled and converted to a PAM signal followed by comparing it with the output of the DAC.
The output of the DAC is equal to the regenerated magnitude of the previous sample which was
stored in the up/down counter as a binary number. The up/down counter is incremented or
decremented whether the previous sample is larger or smaller than the current sample. The
up/down counter is clocked at a rate equal to the sample rate. So, the up/down counter is
updated after each comparison.
PROCEDURE:
GRT Institute of Engineering and Technology, 33 | P a g e
Tiruttani
EC3461 Communication Systems Laboratory
11. Increase the amplitude of 250 Hz sine wave through pot P1 further high and observe
that the integrator output cannot follow the input signal.
12. Connect Delta modulated output to the input of Delta demodulator section.
13. Connect output of Delta demodulator to the input of output buffer section. And give
buffer output to the 2nd order low pass filter or 4th order low pass filter.
14. Then observe various tests points in Delta demodulator section and observe the
reconstructed signal at 2nd or 4th order low pass filter.
15. Repeat the above procedures with different signal sources and select the different
sampling frequency and observe the response of Delta modulator and Demodulator.
CIRCUIT BOARD:
OBSERVATION:
Amplitude Time Period
Signal
(Volt) (ms)
Input s/g 4 4
Modulated s/g 4 1
Demodulated s/g 4 4
MODEL GRAPH:
OUTPUT GRAPH:
RESULT:
Thus the small step size signal (delta) is modulated and the actual signal was
reconstructed using delta demodulator at the receiver.
AIM:
To generate ASK signal for the frequency of 25Hz, FSK signal for the frequency of 10 Hz, and
BPSK signal for the frequency of 10Hz generation detection using MATLAB.
APPARATUS REQUIRED:
PC (Personal Computer) with Matlab software
THEORY:
Generation of ASK
Amplitude shift keying - ASK - is a modulation process, which imparts to a sinusoid
two or more discrete amplitude levels. These are related to the number of levels adopted by the
digital message. For a binary message sequence there are two levels, one of which is typically
zero. The data rate is a sub-multiple of the carrier frequency. Thus the modulated waveform
consists of bursts of a sinusoid. One of the disadvantages of ASK, compared with FSK and
PSK, for example, is that it has not got a constant envelope. This makes its processing (eg,
power amplification) more difficult, since linearity becomes an important factor. However, it
does make for ease of demodulation with an envelope detector.
Demodulation
ASK signal has a well defined envelope. Thus it is amenable to demodulation by an
envelope detector. Some sort of decision-making circuitry is necessary for detecting the
message. The signal is recovered by using a correlator and decision making circuitry is used to
recover the binary sequence.
Generation of PSK signal
PSK is a digital modulation scheme that conveys data by changing, or modulating, the phase of
a reference signal (the carrier wave). PSK uses a finite number of phases, each assigned a
unique pattern of binary digits. Usually, each phase encodes an equal number of bits. Each
pattern of bits forms the symbol that is represented by the particular phase. The demodulator,
which is designed specifically for the symbol-set used by the modulator, determines the phase
of the received signal and maps it back to the symbol it represents, thus recovering the original
data.
Generation of FSK
Frequency-shift keying (FSK) is a frequency modulation scheme in which digital
information is transmitted through discrete frequency changes of a carrier wave. The simplest
FSK is binary FSK (BFSK). BFSK uses a pair of discrete frequencies to transmit binary (0s
and 1s) information. With this scheme, the "1" is called the mark frequency and the "0" is
called the space frequency.
In binary FSK system, symbol 1 & 0 are distinguished from each other by transmitting one of
the two sinusoidal waves that differ in frequency by a fixed amount.
PROCEDURE:
1. Open MATLAB
2. Open a new script file
3. Write the code for ASK, FSK and BPSK.
4. Run the code for execution and obtain the necessary results
PROGRAM:
ASK:
t=0:0.001:0.15;
m=square(2*pi*25*t);
c=sin(2*pi*t*200);
y=(m.*c)+(1*c);
d=square(2*pi*25*t);
subplot(4,1,1);
plot(m);
title('message signal');
xlabel('time-(msec)');
ylabel('amplitude-(volts)');
subplot(4,1,2);
plot(c);
title('carrier signal');
xlabel('time-(msec)');
ylabel('amplitude-(volts)');
subplot(4,1,3);
plot(y);
title('amplitude shift keying');
xlabel('time-(msec)');
ylabel('amplitude(volts)');
subplot(4,1,4);
plot(d);
title('Detection');
xlabel('time-(msec)');
ylabel('amplitude(volts)');
ASK OUTPUT WAVEFORM
FSK:
t=0:0.001:0.30;
x=square(2*pi*10*t);
c1=sin(2*pi*60*t);
c2=sin(2*pi*120*t);
d=square(2*pi*10*t);
for i=1:200
if(mod(i,100))<50
s(i)=c1(i);
else
s(i)=c2(i);
end
end
subplot(5,1,1);
plot(x);
axis([0 250 -1 1]);
title('message signal');
xlabel('time(msec)');
ylabel('amplitude(volts)');
subplot(5,1,2);
plot(c1);
axis([0 250 -1 1]);
title('frequency');
xlabel('time(msec)');
ylabel('amplitude(volts)');
subplot(5,1,3);
plot(c2);
BPSK:
t=0:0.001:0.25;
x=square(2*pi*10*t);
c1=sin(2*pi*60*t);
c2=sin(2*pi*60*t+180);
d=square(2*pi*10*t);
for i=1:250
if(x(i)==1)
s(i)=c1(i);
else
s(i)=c2(i);
end
end
subplot(5,1,1);
plot(x);
axis([0 250 -1 1]);
title('message signal');
xlabel('time(msec)');
ylabel('amplitude(volts)');
subplot(5,1,2);
plot(c1);
axis([0 250 -1 1]);
title('carrier 1');
xlabel('time(msec)');
ylabel('amplitude(volts)');
subplot(5,1,3);
plot(c2);
axis([0 250 -1 1]);
title('carrier 2');
xlabel('time(msec)');
subplot(5,1,4);
plot(s);
axis([0 250 -1 1]);
title('PSK output');
xlabel('time(msec)');
subplot(5,1,5);
plot(d);
axis([0 250 -1 1]);
title('PSK detection output');
xlabel('time(msec)');
RESULT:
Thus the simulation of ASK, FSK and BPSK was generated and obtained the simulation results.
Exp. No. : 11
SIMULATION OF DPSK, QPSK AND QAM GENERATION
Date:
SCHEMES
AIM:
To perform the simulation of DPSK signal for the random message, QPSK signal for the input
frequency of 10Hz generation using MATLAB.
APPARATUS REQUIRED:
PC (Personal Computer) with Matlab software
PROCEDURE:
1. Open MATLAB
2. Open a new script file
3. Write the code for DPSK, QPSK and QAM.
4. Run the code for execution and obtain the necessary results
PROGRAM:
DPSK:
clc;
clear all;
rng default
M = 6; % Alphabet size
dataIn = randi([0 M-1],1011,1); % Random message
txSig = dpskmod(dataIn,M); % Modulate
rxSig = txSig*exp(2i*pi*rand());
dataOut = dpskdemod(rxSig,M);
errs = symerr(dataIn,dataOut)
errs = symerr(dataIn(2:end),dataIn(2:end))
figure
subplot(2,2,1)
plot(dataIn)
title('DATA')
subplot(2,2,2)
plot(txSig)
title('DPSK SIGNAL')
subplot(2,2,3)
plot(rxSig)
title('Received DPSK')
subplot(2,2,4)
plot(dataOut)
title('DATA RECEIVED')
OUTPUT:
QPSK:
clc; clear all;
t=0:0.0001:0.25;
m=square(2*pi*10*t);
c1=sin(2*pi*60*t);
c2=sin(2*pi*60*t+180);
for i=1:2500
if(mod(i,1000))<500
s(i)=c1(i);
else
s(i)=-c2(i);
end
end
subplot(4,1,1);
plot(t,m,'k','linewidth',5);
title('polor representation of message 1 0 1 0 1 0');
xlabel('time'); ylabel('amplitude')
subplot(4,1,2); plot(c1);
title('frequency 1');
xlabel('time'); ylabel('amplitude');
subplot(4,1,3); plot(c2);
title('frequency 2');
xlabel('time'); ylabel('amplitude');
subplot(4,1,4); plot(s);
title('quadrature phase shift keying');
xlabel('time');
ylabel('amplitude');
GRT Institute of Engineering and Technology, 44 | P a g e
Tiruttani
EC8561 Communication Systems Laboratory
OUTPUT:
QAM
OUTPUT
Quadrature
6
Scatter Plot
3 0 8 12
1 1 9 13
-1 2 10 14
-2
-3 3 11 15
-4
RESULT:
Thus the simulation of DPSK signal for the random message, QPSK and QAM signal for the input
frequency of 10Hz was generated using MATLAB and obtained the simulation results
AIM:
To perform the simulation of Linear block code (Error control coding) using MATLAB.
APPARATUS REQUIRED:
PC (Personal Computer) with Matlab software
PROCEDURE:
1. Open MATLAB
2. Open a new script file
3. Write the code for LBC in ECC.
4. Run the code for execution and obtain the necessary results
ALGORITHM:
STEP 1: Give the generator matrix
STEP 2: Find the order of the linear block code for the given generator matrix
STEP 3: Obtain the possible code words
STEP 4: Find the minimum hamming distance
STEP 5: Give the received code word
STEP 6: Calculate the syndrome vector and compare it with
transpose of hamming matrix.
STEP 7: Find the error bit position and display the corrected code word
PROGRAM:
ERROR CONTROL CODING SCHEMES - LINEAR BLOCK CODES
clc;
clear all;
% Input Generator Matrix
g=[1 0 0 0 1 0 1;0 1 0 0 1 1 1;0 0 1 0 1 1 0;0 0 0 1 0 1 1];
% Generator matrix
g;
disp ('The Order of Linear block Code for given Generator Matrix is:')
[n,k] = size(transpose(g))
for i = 1:2^k
for j = k:-1:1
if rem(i-1, 2^(-j+k+1))>=2^(-j+k)
u(i,j)=1;
else
u(i,j)=0;
end
end
end
u;
disp('The Possible Codewords are :')
c = rem(u*g,2)
disp('The Minimum Hamming Distance dmin for given Block Code is= ')
d_min = min(sum((c(2:2^k,:))'))
% Code Word
r = input('Enter the Received Code Word:')
p = [g(:,n-k+2:n)];
h = [transpose(p),eye(n-k)];
disp('Hammimg Code')
ht = transpose(h)
disp('Syndrome of a Given Codeword is :')
s = rem(r*ht,2)
for i = 1:1:size(ht)
if(ht(i,1:3)==s)
r(i) = 1-r(i);
break;
end
end
disp('The Error is in bit:')
i
OUTPUT
g=
1 0 0 0 1 0 1
0 1 0 0 1 1 1
0 0 1 0 1 1 0
0 0 0 1 0 1 1
The Order of Linear block Code for given Generator Matrix is:
n= 7; k= 4
1 1 1
1 1 0
0 1 1
1 0 0
0 1 0
0 0 1
Syndrome of a Given Codeword is :
s= 0 0 0
The Error is in bit:
i= 7
The Corrected Codeword is :
r= 1 0 1 0 0 1 1
CYCLIC CODE:
Generation of parity check matrix and generator matrix for a (7, 4) Hamming code.
[h,g,n,k] = hammgen(3);
Generation of parity check matrix for the generator polynomial g(x) = 1+x+x3.
h1 = hammgen(3,[1011]);
Computation of code vectors for a cyclic code
clc;
close all;
n=7;
k=4;
msg=[1 0 0 1; 1 0 1 0; 1 0 1 1];
code = encode(msg,n,k,'cyclic');
msg
code
Syndrome decoding
clc;
close all;
q=3;
n=2^q-1;
k=n-q;
parmat = hammgen(q); % produce parity-check matrix
trt = syndtable(parmat); % produce decoding table
recd = [1 0 1 1 1 1 0 ] %received vector
syndrome = rem(recd * parmat',2);
syndrome_de = bi2de(syndrome, 'left-msb'); %convert to decimal
disp(['Syndrome = ',num2str(syndrome_de),.....
' (decimal), ',num2str(syndrome),' (binary) ']);
corrvect = trt(1+syndrome_de, :);%correction vector
correctedcode= rem(corrvect+recd,2);
parmat
corrvect
correctedcode
OUTPUT:
COMPUTATION OF CODE VECTORS FOR A CYCLIC CODE
Msg=
1001
1010
1011
Code =
1101001
0111010
0001011
SYNDROME DECODING
Recd=
1011110
Syndrome=7(decimal), 1 1 1(binary)
Parmat=
1001011
0101110
0010111
Corrvect=
0000010
Correctedcode=
1011100
RESULT:
Thus the simulation error control coding was verified and obtained the simulation results and
also manual calculation.
APPARATUS REQUIRED:
1. Line coding and decoding Trainer Kit
2. Digital signal oscilloscope (DSO) / Mixed Signal Oscilloscope (MSO)
3. Patch cords
THEORY:
NON-RETURN TO ZERO signal are the easiest formats that can be generated. These
signals do not return to zero with the clock. The frequency component associated with these
signals are half that of the clock frequency. The following data formats come under this
category. Non-return to zero encoding is commonly used in slow speed communications
interfaces for both synchronous and asynchronous transmission. Using NRZ, logic 1 bit is sent
as a high value and logic 0 bit is sent as a low value.
a) NON-RETURN TO ZERO-LEVEL (NRZ-L)
This is the most extensively used waveform in digital logics. All “ones” are represented by
“high” and all “zeros” by“low”. The data format is directly available at the output of all digital
data generation logics and hence very easy to generate. Here all the transitions take place at the
rising edge of the clock.
b) NON-RETURN TO ZERO-MARK (NRZ-M)
These waveforms are extensively used in tape recording. All „ones‟ are marked by change
inlevels and all “zeros” by no transitions, and the transitions take place at the rising edge of the
clock.
c) UNIPOLAR AND BIPOLAR
Unipolar signals are those signals, which have transition between 0 to +VCC. Bipolar signals
are those signals, which have transition between +VCC to –VCC.
d) NON-RETURN TO ZERO-SPACE (NRZ-S)
This type of waveform is marked by change in levels for „zeros‟ and no transition for “ones”
and the transitions take place at the rising edge of the clock. This format is also used in
magnetic tape recording.
e) BIPHASE – LINE CODING (BIPHASE -L):
With the Biphase – L one is represented by a half bit wide pulse positioned during thefirst half
of the bit interval and a zero is represented by a half bit wide pulse positioned during the
second half of the bit interval.
f) BIPHASE MARK CODING(BIPHASE-M):
With the Biphase-M, a transition occurs at the beginning of every bit interval. A “one”
isrepresented by a second transition, half bit later, whereas a zero has no second transition.
g) BIPHASE SPACE CODING(BIPHASE-S):
With a Biphase-S, a transition occurs at the beginning of every bit interval. A “zero” ismarked
by a second transition, one half bit later; „one‟ has no second transition.
h) RETURN TO ZERO SIGNALS:
These signals are called “Return to Zero signals” since they return to “zero” with theclock. In
this category, only one data format, i.e, the unipolar return to zero (URZ); With the URZ a
“one” is represented by a half bit wide pulse and a “zero” is represented by the absence of
pulse.
i) MULTILEVEL SIGNALS:
Multilevel signals use three or more levels of voltages to represent the binary digits, “one” and
“zero” – instead of normal “highs” and “lows” Return to zero – alternative mark inversion (RZ
- AMI) is the most commonly used multilevel signal. This coding scheme is most often used in
telemetry systems. In this scheme, “one” are represented by equal amplitude ofalternative
pulses, which alternate between a +5 and -5. These alternating pulses return to 0volt, after
every half bit interval. The “Zeros” are marked by absence of pulses.
PROCEDURE:
1. Connect the PRBS, PRBS bar, CLK, CLK bar with the respective line coding scheme as per the
circuit board.
2. Observe the respective line coding waveform in DSO.
3. Plot the line coding schemes as per RZ and NRZ for the different line coding and decoding.
CIRCUIT BOARD:
OBSERVATION:
MODEL GRAPH:
OUTPUT GRAPH:
RESULT:
Thus the various line code for the binary input data are generated ,Compared and
decoded for the binary input data .
Exp. No. : 2
SIMULATION OF OFDM SIGNAL USING MATLAB
Date:
AIM:
To perform the simulation of OFDM using MATLAB.
APPARATUS REQUIRED:
PC (Personal Computer) with Matlab software
PROCEDURE:
Open MATLAB
Open a new script file
Write the code for OFDM
Run the code for execution and obtain the necessary results
THEORY:
Orthogonal Frequency Division Multiplexing (OFDM) is a digital multi-carrier modulation
scheme that extends the concept of single subcarrier modulation by using multiple subcarriers
within the same single channel. Rather than transmit a high-rate stream of data with a single
subcarrier, OFDM makes use of a large number of closely spaced orthogonal subcarriers that are
transmitted in parallel. Each subcarrier is modulated with a conventional digital modulation scheme
(such as QPSK, 16QAM, etc.) at low symbol rate. However, the combination of many subcarriers
enables data rates similar to conventional single-carrier modulation schemes within equivalent
bandwidths.
OFDM is based on the well-known technique of Frequency Division Multiplexing (FDM).
In FDM different streams of information are mapped onto separate parallel frequency channels.
Each FDM channel is separated from the others by a frequency guard band to reduce interference
between adjacent channels.
PROGRAM:
OFDM Transmitter
clc;
clear all;
close all;
%..............................................................
% Initiation
%..............................................................
no_of_data_bits = 64%Number of bits per channel extended to 128
M =4 %Number of subcarrier channel
n=256;%Total number of bits to be transmitted at the transmitter
block_size = 16; %Size of each OFDM block to add cyclic prefix
cp_len = floor(0.1 * block_size); %Length of the cyclic prefix
%............................................................
% Transmitter
%.........................................................
%.........................................................
% Source generation and modulation
%........................................................
% Generate random data source to be transmitted of length 64
data = randsrc(1, no_of_data_bits, 0:M-1);
figure(1),stem(data); grid on; xlabel('Data Points'); ylabel('Amplitude')
title('Original Data ')
len_ofdm_data = rows_Append_prefix*cols_Append_prefix
% OFDM signal to be transmitted
ofdm_signal = reshape(Append_prefix, 1, len_ofdm_data);
figure(7),plot(real(ofdm_signal)); xlabel('Time'); ylabel('Amplitude');
title('OFDM Signal');grid on;
OUTPUT:
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 7
RESULT:
Thus the simulation of OFDM by using MAT Lab is obtained and verified successfully.