0% found this document useful (0 votes)
62 views88 pages

Adv Comm-22-08-24

Uploaded by

Adinarayana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views88 pages

Adv Comm-22-08-24

Uploaded by

Adinarayana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 88

LABORATORY MANUALOF

ADVANCED COMMUNICATIONS LAB


(B.Tech., VI Semester, ECE)

Department of Electronics and Communication Engineering


MAHATMA GANDHI INSTITUTE OF
TECHNOLOGY
(Autonomous)
Chaitanya Bharathi P.O., Gandipet, Hyderabad-500 075.
1

Index Page

S.No Name of the Signature Remarks


Experiment of the
Faculty
B.Tech. in Electronics and Communication Engineering
V Semester Syllabus
EC553PC: Advanced Communication Laboratory

Note: Minimum Eight experiments should be conducted.


Course Outcomes: Upon completing this course the students will be able to:
Simulate and analyze Digital signals.
Simulate and analyze the M-ary modulation techniques.
Simulate and study radiation pattern of different antennas.
Analyze the multiple access techniques.
Analyze the wireless standards for cellular networks like 3G (CDMA), 4G (OFDM)

Course Articulation Matrix


COs PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2
CO1 3 2 3 2 2 1 - 1 - 2 - 1 2 2
CO2 3 3 3 3 2 1 - 1 - 2 - 1 2 2
CO3 3 2 3 1 2 1 - 1 2 2 - 1 2 2
CO4 2 3 3 2 2 1 - 1 2 2 - 1 2 2
CO5 2 3 3 2 2 1 - 1 2 2 - 1 2 2

List of experiments:
1. Study the features of spectrum analyzer
2. Obtain the Radiation pattern for different antennas using Antenna advanced Trainer kit.
i. Dipole Antenna
ii. Yagi Uda Antenna
iii.Horn Antenna, etc.
3. Time division multiplexing and de-multiplexing.
4. Plotting eye diagram for baseband signal using MATLAB and verify using hardware.
5. Plotting Constellation Diagram of QAM using MATLAB and verify using hardware.
6. Generation of different types of signals using MATLAB.
7. Modulation analysis on digital modulated single carrier signals using MATLAB.
8. Simulation of CDMA system using MATLAB and verify using hardware.
9. DQPSK Modulation and demodulation technique
10. OFDM generation and detection.
MAHATMA GANDHI INSTITUTE OF TECHNOLOGY

Department of Electronics and Communication Engineering

PROGRAM OUTCOMES (POs):

1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering fundamentals,


and an engineering specialization to the solution of complex engineering problems.
2. Problem analysis: Identify, formulate, review research literature, and analyze complex engineering
problems reaching substantiated conclusions using first principles of mathematics, natural sciences,
and engineering sciences.
3. Design/development of solutions: Design solutions for complex engineering problems and
design system components or processes that meet the specified needs with appropriate
consideration for the public health and safety, and the cultural, societal, and environmental
considerations.
4. Conduct investigations of complex problems: Use research-based knowledge and research
methods including design of experiments, analysis and interpretation of data, and synthesis of
the information to provide valid conclusions.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modeling to complex engineering activities with
an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess societal,
health, safety, legal and cultural issues and the consequent responsibilities relevant to the professional
engineering practice.
7. Environment and sustainability: Understand the impact of the professional engineering solutions in
societal and environmental contexts, and demonstrate the knowledge of, andneed for sustainable
development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norms of
the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or leader in
diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with theengineering
community and with society at large, such as, being able to comprehend andwrite effective reports
and design documentation, make effective presentations, andgive and receive clear instructions.
11. Project management and finance: Demonstrate knowledge and understanding of theengineering and
management principles and apply these to own work, as a member and leader in a team,
to manage projects and in multidisciplinary environments.
12. Life-long learning: Recognize the need for, and have the preparation and ability to engage in
independent and life-long learning in the broadest context of technological change.

PROGRAM SPECIFIC OUTCOMES (PSOs):


PSO1: Able to work in multidisciplinary project areas.
PSO2: Able to design and carry out the experimental work and assimilate knowledge in field of
Electronics and Communication Engineering to meet the future industrial challenges.

3
Course Outcomes: Upon completing this course the students will be able to:
1. Simulate and analyze Digital signals.
2. Simulate and analyze the M-ary modulation techniques.
3. Simulate and study radiation pattern of different antennas.
4. Analyze the multiple access techniques.
5. Analyze the wireless standards for cellular networks like 3G (CDMA), 4G (OFDM)

Course Articulation Matrix


COs PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2
CO1 3 2 3 2 2 1 - 1 - 2 - 1 2 2
CO2 3 3 3 3 2 1 - 1 - 2 - 1 2 2
CO3 3 2 3 1 2 1 - 1 2 2 - 1 2 2
CO4 2 3 3 2 2 1 - 1 2 2 - 1 2 2
CO5 2 3 3 2 2 1 - 1 2 2 - 1 2 2

4
1

2 Esc Esc Esc

4 FREQUENCY Channel SPAN X Scale AMPLITUDE Y Scale

5
5 CONTROL

6 MEASURE
Meas Setup
Meas Control Restart

7 SYSTEM

System
Preset
File

Save Save
Now File
Print Setup Print

8 MARKER

Marker Noise Band Power


9

10

6
GHz MHz kHz Hz
+dBm dBm mV V A

NOTE

11 VOLUME VOLUME
Speaker On Off Det/Demod
12 EXT KEYBOARD. EXT KEYBOARD

NOTE

13 PROBE POWER

14 LO OUTPUT

15 IF INPUT
16 Return Return
Return

17 AMPTD REF OUT


Agilent ESA models E4402B, E4403B, E4404B, E4405B, E4407B, and E4408B
only.
18 Tab Keys

19 INPUT 50 INPUT 75

7
CAUTION

20 Next Window

Zoom

21 Help Help

22 RF OUT 50 RF OUT 75

CAUTION

23
Auto Align

NOTE

8
Detector

Ref Level

Change Title

Time/Date On Off

Attenuation Auto Man

Marker

Marker Count On Off

Marker

9
Sweep (Single) View/Trace

Span Stop Freq

Sweep Time Auto Man Sweep Points

Video BW Auto Man

Freq Offset

Esc

Resolution BW Auto Man

Center Freq Start Freq

Frequency Signal Track

Amplitude Int Preamp

Auto Align

Correction On Off

Trig Sweep

10
Trace

Average On Off

Display Line On Off

Ref Lvl Offst

Scale Type Log Lin

11
Factory Preset
User Preset
Mode Preset

Preset Type Factory Preset


Preset Type User Preset Factory Preset User Preset
Mode Preset Preset Type Mode
Preset

System Power On/Preset Save User Preset

Preset User

Disabling User Preset

Catalog
Factory Mode
System Power On/Preset Preset Type

Y Axis Units
dBm

CF Step
13.2550000 GHz

12
Preset Factory Preset User Preset Factory Preset

Setting Reference Level and Center Frequency

NOTE

AMPLITUDE 10, dBm


FREQUENCY Center Freq 30 MHz

NOTE

10 MHz

13
Setting Frequency Span
SPAN 5 0 MHz

10 MHz

Reading Frequency & Amplitude

Peak Search

Esc

Changing Reference Level


AMPLITUDE
Marker Mkr Ref Lvl

14
Active function Marker

15
Making a Basic Measurement
Viewing a Signal

Improving Frequency Accuracy

are

Freq Count
Marker Count On Off Off

NOTE

Marker Mkr CF to move the 10 MHz peak to the center of the display

Valid Marker Count Range

NOTE

BW/Avg Res BW

Marker Off

NOTE
System Power On/Preset Save User Preset

16
Frequency Count
increases accuracy

17
2. MEASUREMENT OF RADIATION PATTERN FOR
DIPOLE, YAGI UDA AND HORN ANTENNA
OBJECTIVE :-
To measure the radiation pattern of given microwave antenna
EQUIPMENT REQUIRED:-
Gunn oscillator with Power supply ,Pin modulator, Isolator, Frequency Meter, Variable
Attenuator, Slotted Section, Tunable Probe VSWR Meter, Wave guide Stand, Horn
antenna, Parabolic antenna, Movable Short/Matched Termination. and BNC cables etc.

BLOCK DIAGRAM:

PROCEDURE:
1. Connect the blocks as shown above.
2. Fire the Gunn diode and turn it for maximum output.
3. Measure length and breadth of horn antenna.
4. Set the transmitting and receiving horn antenna separated by a distance R=2D 2 0 .
Where D is the maximum dimension of horn antenna.
5. Adjust the height and azimuth of the receiving antenna for the maximum output. Set
the pointer to zero degree.
6. Note the transmitted and received powers.
7. Move the receiving antenna orientation in steps of 10 degrees in one plane and note the
corresponding power readings from VSWR meter or RF Power meter. Tabulate the
readings
8. Move the receiving antenna orientation in steps of 10 degrees in the other plane and
note the corresponding power readings from VSWR meter or RF Power meter. Tabulate
the readings
9. Plot the radiation pattern in both the planes.

18
Operating Conditions:

1) Gunn Supply voltage =


2) Gunn Diode Current=
3) Operating frequency =
4) Transmitted power, Pt =
5) Received power, Pr =

Observations:

Part A) To find gain of antenna

Half power beam width =

Gain (G) =

19
Result:

Part B) Radiation pattern:

(a) Radiation pattern of horn antenna (H - Plane)

Angle (degrees) Received power (dB)

(b) Radiation pattern of horn antenna (E - Plane)


Angle Received
(Degrees) Power(dB)

20
Dipole Antenna:
Objective: Plotting the Polar graph/ radiation pattern of an Antenna manually
Connection diagram:

Set up Arrangements of Antenna Trainer

Initial setup:
Main unit:
Place the main unit on the table and connect power cord.
RF Generator: Adjust Level Potentiometer to Maximum position.
Modulation Generator: Select switch to and adjust Level
Potentiometer to maximum position.
Directional Coupler: Select the switch to position and adjust FS
ADJ Potentiometer to middle position.
1. Install Transmitting mast, place it beside the main unit and connect it to the

2. Install Receiving mast and keep it at some distance (around 1 meter) from the
Transmitter mast.
3. Place RF detector Unit beside the Receiving mast and connect it to the

4. Connect an Adapter +9V to the RF Detector unit, Switch it on and keep the
Level knob at middle position.

21
5.
Goniometer should be directed towards the RF Detector and also align the marker
degree position.
6. Install Detector Antenna on the Receiving mast. Keep its direction towards the
Transmitting mast by rotating it in counter clockwise direction.
7.
towards the Receiving mast by rotating it in counter clockwise direction.
8. Switch on the main unit and check the display in DPM of Directional Coupler. It
will show some reading according to its level knob at starting.
9. RF detector will also show some reading according to its level knob at starting.
(In case of over loading, reduce it by level Potentiometer of RF detector)
10. Now vary the FS Adjust Potentiometer of Directional Coupler to make the display
reading 100 micro Amp and then adjust the Level of RF detector to show the ¾

Important Adjustments:
Adjustment for
Sometimes adjustment for antenna match is required to tune the antenna for
maximum forward power to transmit and receive optimum/ maximum radiations
for different Antennas. This is done by tuning the trimmer with the help of aligner.
The trimmer is given on the top surface of the main unit.
Adjustment of distance:
For low gain antennas, the distance between Transmitting mast and Receiving
mast may be decreased to get the sufficient signal level/readings at RF Detector.
FS adjustment of Directional coupler reading:
In case of low reading (for Low gain antennas), set the reading of DPM of
Directional Coupler to 50 Micro Amp for these antennas and then adjust the Level
of RF detector to show the ¾
11. Rotate the transmitting Antenna between 0-360 degrees and observe the display
at RF Detector. The variation in reading indicates that the transmitter and receiver
are working and radiation pattern is formed.
12. Observe the demodulated signal at the output socket of RF detector on
oscilloscope. Vary the level of Modulation generator at transmitting unit and
observe the variations in the demodulate signal. If requires, reduce the power
using RF Level potentiometer to improve the shape of demodulated sine wave.
13. Now the setup is ready for further experiments.

22
Procedure:
1. Get the setup ready.
2. Ensure the following settings;
Transmitting mast marker is degree position.
Both, transmitting and receiving antennas are facing each other in
horizontal plane.
Transmitter is tuned for maximum forward power to transmit and receive
optimum/ maximum radiations for the antenna under test,
DPM for FS adjust at transmitting unit is set for 100uA reading and DPM
at RF detector unit is set for 70uA.
3. Now to plot the Polar Graph/Radiation pattern of the transmitting antenna under
test, start taking the readings at the interval 10 degrees and tabulate the degree v/s
uA readings of RF detector unit display.
4. Convert the noted micro Amp readings into dBuA with the help of the conversion
chart given below. Following formula is used to convert the uA reading in to dB;

dBuA = 20 log (uA reading)

Degree µA dBµA Degree µA


0 70 37 190 .
10 . 200 .
. . . .
. . . .
180 . 360 .

5. Now plot the polar graph on the supplied polar graph paper as per the converted
dBuA readings against degrees of rotation as shown in next figure. A typical polar
graph for Folded

Note: A ready reference table for µA to dBµA conversion is given at page of


this manual

23
Polar Graph/ Radiation pattern
6. Calculate Beam width, Front / Back ratio, Directive gain of antenna. To
calculate the above from the graph, please refer next figure and proceed as
follows.

24
Beam width:
Look for main lobe. Draw bore sight maxima line AA' Mark -3 dB from maximum on
the bore sight line point B. Draw an arc of radius AB This arc will intersect main lobe
at C & D. Measure angle CAD This angle is - 3 dB beam width. Similarly calculate
-10 dB beam width.
Front to back ratio:
Look for the main lobe. Draw bore sight maxima line AA' Look for back lobe if any
(At 180 ) If no back lobe, then,
AA'
Front to back ratio = dB
1
If back lobe is present then, measure AE, where E is the maximum of back lobe.
AA'
Front to back ratio = dB
AE
Gain of antenna:

Maximum radiation intensity


G=
Maximum radiation intensity from a ref antenna (isotropic antenna) with same power input

Since, we cannot have an ideal isotropic antenna we presume here that its maximum
radiation intensity is 1dB and is 100% efficient. Under this assumption Gain of antenna
(or Directional Gain of antenna) is
AA' dB
G=
1

A Typical radiation pattern

25
Plotting the Polar Graph for Normalized reading:
7. One can also plot the polar graph against normalized readings of RF Detector.
The procedure to convert the Micro Amp in to normalize reading is given as
follows:
Consider the maximum reading say N (When the RF Detector receives maximum
radiations) as 0 dB.
Let say it is N=50 Micro Amp,
Convert next reading taken at the interval (10 degrees) say N1 by the following
formula:

ln N1 / N = reading in dB
Let take N1=40 Micro Amp,
ln (40/50) = -0.22 dB
Follow the same procedure for the further readings thus the generalized formula
will be:

ln Nx / N = readings in dB

Plot the radiation pattern of antenna with the new dB readings as usual.
8. Now plot the polar graph on the supplied polar graph paper for normalized
readings as per the converted dBuA readings against degrees of rotation.

A Typical polar graph paper for normalized values

26
3. Time Division Multiplexing & Demultiplexing

AIM:
To study the time division multiplexing and Demultiplexing

EQUIPMENT REQUIRED:
1. TDM Multiplexer trainer
2. TDM De-Multiplexer trainer
3. Storage Oscilloscope
(Note: Storage oscilloscope is desired for satisfactory observation of TDM wave forms)
4. Digital Multimeter.
5. -axial cables (standard accessories with trainer)
EXPERIMENTAL PROCEDURE:
MULTIPLEXER:
1. Observe the AF generator -1 output and note down the amplitude and frequency,
2. Observe the AF generator-2 output and note down the amplitude and frequency
3. Connect the AF generator -1 and -2 outputs to CH1 and CH2 OF TDM multiplexer.
4. Observe and connect the clock generator output to the control input to the TDM multiplexer (it acts
like selection line for MUX)
5. Observer the TDM output in storage oscilloscope.
DE-MULTIPLEXER:
6. Using coaxial cable, connect the TDM de-multiplexer.
7. Connect the clock generator output in de-multiplexer trainer to the control input of the TDM de-
multiplexer.
8. Observe the de-multiplexed signals at CH1 and CH2.
9. Connect the CH1 and CH2 outputs to low pass filter and amplifier and note down the outputs.
CIRCUIT DIAGRAM:
MULTIPLEXER:

27
Waveforms:

28
Demultiplexed Outputs:

RESULT: Output of Multiplexed and demultiplexed waveforms are observed.

VIVA QUESTIONS:

1. Define Time Division Multiplexing?


2. Mention the difference between TDM and FDM?
3. Define Synchronization?
4. Mention the advantages of TDM?
5. Mention the disadvantages of TDM?
6. Mention the applications of TDM?
7. What is the role of commentator in TDM?
8. What is the IC used as Multiplexer in TDM?
9. Comparer synchronous TDM and Asynchronous TDM?
10. What is the function of IC 7490 in TDM?

29
4. Generation of different types of signals
using MATLAB

a. Generation of basic signals


1. Unit Impulse Signal
t = -2:1:2;
y = [zeros(1,2), ones(1,1), zeros(1,2)];
stem(t, y);
title('Unit Impulse Signal');
xlabel('Time');
ylabel('Amplitude');

2. Unit Step Signal


n = 10; % Length of the signal
t = 0:n-1;
y = ones(1, n);
stem(t, y);
title('Unit Step Signal');
xlabel('Time');
ylabel('Amplitude');

3. Unit Ramp Signal


n = 10; % Length of the signal
t = 0:n-1;
y = t;
stem(t, y);
title('Unit Ramp Signal');
xlabel('Time');
ylabel('Amplitude');

4. Exponential Signal
n = 10; % Length of the signal
a = 0.5; % Exponential rate
t = 0:n-1;
y = exp(a * t);
stem(t, y);
title('Exponential Signal');
xlabel('Time');
ylabel('Amplitude');

5. Sine Wave
fs = 1000; % Sampling frequency
t = 0:1/fs:1; % Time vector
f = 5; % Frequency of the sine wave
y = sin(2 * pi * f * t);
plot(t, y);
title('Sine Wave');
30
xlabel('Time');
ylabel('Amplitude');

b) Code for Time Division Multiplexing


% % % % % Code for Time Division Multiplexing% % % % % % % % % % % % % %
clc;
close all;
clear all;
% Signal generation
x=0:.5:4*pi; % siganal taken upto 4pi
sig1=8*sin(x); % generate 1st sinusoidal signal
l=length(sig1);
sig2=8*triang(l); % Generate 2nd traingular Sigal
% Display of Both Signal
subplot(2,2,1);
plot(sig1);
title('Sinusoidal Signal');
ylabel('Amplitude--->');
31
xlabel('Time--->');
subplot(2,2,2);
plot(sig2);
title('Triangular Signal');
ylabel('Amplitude--->');
xlabel('Time--->');
% Display of Both Sampled Signal
subplot(2,2,3);
stem(sig1);
title('Sampled Sinusoidal Signal');
ylabel('Amplitude--->');
xlabel('Time--->');
subplot(2,2,4);
stem(sig2);
title('Sampled Triangular Signal');
ylabel('Amplitude--->');
xlabel('Time--->');
l1=length(sig1);
l2=length(sig2);
for i=1:l1
sig(1,i)=sig1(i); % Making Both row vector to a matrix
sig(2,i)=sig2(i);
end
% TDM of both quantize signal
tdmsig=reshape(sig,1,2*l1);
% Display of TDM Signal
figure
stem(tdmsig);
title('TDM Signal');
ylabel('Amplitude--->');
xlabel('Time--->');
% Demultiplexing of TDM Signal
demux=reshape(tdmsig,2,l1);
for i=1:l1
sig3(i)=demux(1,i); % Converting The matrix into row vectors
sig4(i)=demux(2,i);
end

% display of demultiplexed signal


figure
subplot(2,1,1)
plot(sig3);
title('Recovered Sinusoidal Signal');
ylabel('Amplitude--->');
xlabel('Time--->');
subplot(2,1,2)
plot(sig4);
title('Recovered Triangular Signal');
ylabel('Amplitude--->');
xlabel('Time--->');

32
Input signal:

33
De-multiplexed Signal:

C) Generation of ASK signal


Fs = 1000; % Sampling frequency

fc = 10; % Carrier frequency

Tb = 1; % Bit duration

num_bits = 10; % Number of bits

% Generate random bits

bits = randi([0, 1], 1, num_bits);

% ASK modulation

t = 0:1/Fs:Tb-1/Fs;

ask_signal = [];

for bit = bits

if bit == 1

ask_signal = [ask_signal sin(2*pi*fc*t)];

else
34
ask_signal = [ask_signal zeros(size(t))];

end

end

% Plot ASK signal

figure;

plot(ask_signal);

title('ASK Modulated Signal');

xlabel('Time');

ylabel('Amplitude');

D) Generation of FSK signal


% Parameters

Fs = 1000; % Sampling frequency

fc1 = 5; % Carrier frequency for bit 0

fc2 = 15; % Carrier frequency for bit 1

Tb = 1; % Bit duration

num_bits = 10; % Number of bits

35
% Generate random bits

bits = randi([0, 1], 1, num_bits);

% FSK modulation

t = 0:1/Fs:Tb-1/Fs;

fsk_signal = [];

for bit = bits

if bit == 0

fsk_signal = [fsk_signal sin(2*pi*fc1*t)];

else

fsk_signal = [fsk_signal sin(2*pi*fc2*t)];

end

end

% Plot FSK signal

figure;

plot(fsk_signal);

title('FSK Modulated Signal');

xlabel('Time');

ylabel('Amplitude');

36
37
5. Plotting Eye Diagram for Baseband Signal
using MATLAB and verify using Hardware.

% MATLAB program to plot an eye diagram in communications

% Parameters
bitRate = 1e6; % Bit rate in bits per second
symbolRate = 1e6; % Symbol rate in symbols per second
numBits = 1000; % Number of bits in the signal
rolloff = 0.5; % Rolloff factor for the raised cosine filter
snr = 20; % Signal-to-noise ratio in dB

% Generate random bits


data = randi([0, 1], 1, numBits);

% Create a raised cosine filter


txFilter = rcosdesign(rolloff, 6, symbolRate/bitRate);

% Upsample the data and filter with the raised cosine filter
txSignal = upfirdn(data, txFilter, symbolRate/bitRate);

% Add noise to the signal


rxSignal = awgn(txSignal, snr, 'measured');

% Create an eye diagram


eyediagram(rxSignal, 2 * symbolRate/bitRate);

% Set plot title and labels


title('Eye Diagram');
xlabel('Time (s)');
ylabel('Amplitude');

% Display grid
grid on;

38
39
6. Plotting Constellation Diagram of QAM using
MATLAB and verify using Hardware.

Aim
To generate a bit error rate versus Eb/No curve for a link that uses 8-QAM modulation and
demodulation in AWGN.

Algorithm Steps
i. Generate binary data and convert to 64-ary symbols.

ii. QAM-modulate the data symbols.

iii. Pass the modulated signal through an AWGN channel.

iv. Demodulate the received signal.

v. Convert the demodulated symbols into binary data.

vi. Calculate the number of bit errors.

Program
clear all; clc; close all;

% Set the simulation parameters.

M = 8; % Modulation order

k = log2(M); % Bits per symbol

% Eb/No values (dB)

numSymPerFrame = 100; % Number of QAM symbols per frame

data = randi([0 1],1000*k,1);

rxSig = awgn(txSig,25);

scatterplot(rxSig);

% Initialize the results vector.

berEst = zeros(size(EbNoVec));

for n = 1:length(EbNoVec)

% Convert Eb/No to SNR

snrdB = EbNoVec(n) + 10*log10(k);

% Reset the error and bit counters

numErrs = 0; 38
numBits = 0;

while numErrs < 200 && numBits < 1e6

% Generate binary data and convert to symbols

dataIn = randi([0 1],numSymPerFrame,k);

dataSym = bi2de(dataIn);

txSig = qammod(dataSym,M);

% Pass through AWGN channel

% Demodulate the noisy signal rxSym = qamdemod(rxSig,M);

% Convert received symbols to bits dataOut = de2bi(rxSym,k);

% Calculate the number of bit errors nErrors = biterr(dataIn,dataOut);

% Increment the error and bit counters numErrs = numErrs + nErrors;

numBits = numBits + numSymPerFrame*k;

end

% Estimate the BER

berEst(n) = numErrs/numBits;

end

39
% Determine the theoretical BER curve by using the berawgn function.

%Plot the estimated and theoretical BER data.

%The estimated BER data points are well aligned with the theoretical curve. figure;

semilogy(EbN

hold on

semilogy(EbNoVec,berTheory)

grid

legend(

Expected Output Constellation Diagram

Scatter plot 10 0

10 -2

0.5

0 10 -4

-0.5
10 -6

-1

10 -8
-1 -0.5 0 0.5 1
5 10 15
In-Phase Eb/No (dB)

Observation Table

Result
The above MATLAB code is executed and the constellation diagram generated by the QAM
system isanalyzed.

40
5. QAM Modulation and Demodulation Techniques
AIM:-
To plot the wave form for 8 quadrature amplitude modulated signal (QAM) using MATLAB for a
stream of bits.

THEORY:-
Quadrature amplitude modulation (QAM) is both an analog and a digital modulation scheme. It
conveys two analog message signals, or two digital bit streams, by changing (modulating) the
amplitudes of two carrier waves, using the amplitude-shift keying (ASK) digital modulation scheme
or amplitude modulation (AM) analog modulation scheme. The two carrier waves, usually
sinusoids, are out of phase with each other by 90° and are thus called quadrature carriersor
quadrature components hence the name of the scheme. The modulated waves are summed,and
the resulting waveform is a combination of both phase-shift keying (PSK) and amplitude-shift keying
(ASK), or (in the analog case) of phase modulation (PM) and amplitude modulation. In the digital
QAM case, a finite number of at least two phases and at least two amplitudes are used.PSK
modulators are often designed using the QAM principle, but are not considered as QAMsince
the amplitude of the modulated carrier signal is constant. QAM is used extensively as a modulation
scheme for digital telecommunication systems. Spectral efficiencies of 6 bits/s/Hz can be achieved
with QAM.
The 4-QAM and 8-QAM constellations

41
42
Time domain for an 8-QAM signal

RESULT: Hence the output is verified for 8-QAMmodulation and demodulation techniques.

43
6. Generation of different types of signals using MATLAB.

QPSK Modulation and Demodulation

AIM: To Check the waveforms of Binary Phase Shift Keying Modulation using MATLAB
Software.

EQUIPMENTS:
PC with MATLAB software

PROGRAM:

clc;
clear all;
close all;
data=[0 1 0 1 1 1 0 0 1 1]; % information

%Number_of_bit=1024;
%data=randint(Number_of_bit,1);

figure(1)
stem(data, 'linewidth',3), grid on;
title(' Information before Transmiting ');
axis([ 0 11 0 1.5]);

data_NZR=2*data-1; % Data Represented at NZR form for QPSK modulation


s_p_data=reshape(data_NZR,2,length(data)/2); % S/P convertion of data

br=10.^6; %Let us transmission bit rate 1000000


f=br; % minimum carrier frequency
T=1/br; % bit duration
t=T/99:T/99:T; % Time vector for one bit information

% QPSK modulation
y=[];
y_in=[];
y_qd=[];
for(i=1:length(data)/2)
y1=s_p_data(1,i)*cos(2*pi*f*t); % inphase component
y2=s_p_data(2,i)*sin(2*pi*f*t) ;% Quadrature component
y_in=[y_in y1]; % inphase signal vector
y_qd=[y_qd y2]; %quadrature signal vector
y=[y y1+y2]; % modulated signal vector
end
Tx_sig=y; % transmitting signal after modulation
tt=T/99:T/99:(T*length(data))/2;

figure(2)

subplot(3,1,1);
plot(tt,y_in,'linewidth',3), grid on;
title(' wave form for inphase component in QPSK modulation ');
xlabel('time(sec)');
ylabel(' amplitude(volt0');

subplot(3,1,2);
plot(tt,y_qd,'linewidth',3), grid on;
title(' wave form for Quadrature component in QPSK modulation ');
xlabel('time(sec)');
ylabel(' amplitude(volt0');

subplot(3,1,3);
plot(tt,Tx_sig,'r','linewidth',3), grid on;
title('QPSK modulated signal (sum of inphase and Quadrature phase signal)');
xlabel('time(sec)');
ylabel(' amplitude(volt0');

% QPSK demodulation
Rx_data=[];
Rx_sig=Tx_sig; % Received signal
for(i=1:1:length(data)/2)

%%XXXXXX inphase coherent dector XXXXXXX


Z_in=Rx_sig((i-1)*length(t)+1:i*length(t)).*cos(2*pi*f*t);
% above line indicat multiplication of received & inphase carred signal

Z_in_intg=(trapz(t,Z_in))*(2/T);% integration using trapizodial rull


if(Z_in_intg>0) % Decession Maker
Rx_in_data=1;
else
Rx_in_data=0;
end

%%XXXXXX Quadrature coherent dector XXXXXX


Z_qd=Rx_sig((i-1)*length(t)+1:i*length(t)).*sin(2*pi*f*t);
%above line indicat multiplication ofreceived & Quadphase carred signal

Z_qd_intg=(trapz(t,Z_qd))*(2/T);%integration using trapizodial rull


if (Z_qd_intg>0)% Decession Maker
Rx_qd_data=1;
else
Rx_qd_data=0;
end
Rx_data=[Rx_data Rx_in_data Rx_qd_data]; % Received Data vector
end

figure(3)
stem(Rx_data,'linewidth',3)
title('Information after Receiveing ');
axis([ 0 11 0 1.5]), grid on

OUTPUT WAVEFORMS:
7. Modulation analysis on digital modulated single carrier signals using MATLAB.
FSK Modulation and Demodulation technique
Aim
To generate and pass a FSK signal through an AWGN channel and estimate the resulting
bit errorrate (BER).

Algorithm Steps
i. Generate binary data.

ii. FSK-modulate the data bits.

iii. Pass the modulated signal through an AWGN channel.

iv. Demodulate the received signal.

v. Calculate the number of bit errors.

Program

clear all; close all;

% Pass an FSK signal through an AWGN channel and estimate the resulting bit error rate
(BER).
% Compare the estimated BER to the theoretical value.

%Set the simulation parameters.


M = 2; % Modulation
orderk = log2(M); % Bits
per symbol
EbNoVec = % Eb/No values
(dB)Fs = 16; % Sample rate (Hz)
nsamp = 8; % Number of samples per symbol
freqsep = 10; % Frequency separation (Hz)
numBitsPerFrame = 5000; % Number of bits per
frame

% Initialize the results vector.


berEst =
zeros(size(EbNoVec));

for n = 1:length(EbNoVec)
% Convert Eb/No to SNR
snrdB = EbNoVec(n) + 10*log10(k) -10*log10(nsamp);

% Reset the error and bit


countersnumErrs = 0;
numBits = 0;

while numErrs < 200 && numBits < 1e6


% Generate random data symbols.
data = randi([0 M-1],numBitsPerFrame,1);
47
% Apply FSK modulation.
txsig = fskmod(data,M,freqsep,nsamp,Fs);

% Pass the signal through an AWGN channel


rxSig = awgn(txsig,

% Demodulate the received signal.


dataOut = fskdemod(rxSig,M,freqsep,nsamp,Fs);

% Calculate the number of bit errors


nErrors = biterr(data,dataOut);

% Increment the error and bit counters


numErrs = numErrs + nErrors;
numBits = numBits + numBitsPerFrame;
en
d

% Estimate the BER


berEst(n) = numErrs/numBits;
en
d

% Determine the theoretical BER curve by using the berawgn


function.berTheory =

% Plot the estimated and theoretical BER data.


% The estimated BER data points are well aligned with the theoretical curve.

hold on
semilogy(EbNoVec,berTheor
y) grid

Error

Expected Output BER curves

10 -1

10 -2

10 -3

10 -4
5 6 7 8 9 10 11 12
Eb/No (dB)

48
Observation Table
SNR in BER(simulated)
dB
5

12

Result
The above matlab code is executed and the estimated BER is compared with the theoretical value.

49
8.Simulation of RAKE Receiver for CDMA
communication using MATLAB software

Aim
To implement the transmission of packets using 16QAM and pseudo-random sequences over
Rayleighchannel and a rake receiver to de-spread the signal.

Algorithm Steps
i. QAM-modulate the data symbols.
ii. Spread the modulated symbols using spreading sequence
iii. Pass the modulated signal through an AWGN channel.
iv. Despread the received symbols using spreading sequence
v. Demodulate the received signal.
vi. Convert the demodulated symbols into binary data.
vii. Calculate the number of bit errors.

Program
clear all; clc; close all;

% Set the simulation parameters.


M = 16; % Modulation order
k = log2(M); % Bits per symbol
EbNoVec = (0:10)’; % Eb/No values
(dB)
numSymPerFrame = 100; % Number of QAM symbols per frame

data = randi([0 1],1000*k,1);


txSig =
qammod(data,M,’InputType’,’bit’,’UnitAveragePower’,true);rxSig
= awgn(txSig,25);
scatterplot(rxSig);

% For spreading
sequence=[1 1 1 1 1 -1 -1 1 1 -1 1 -1 1]’;
seqLen=length(sequence);

% Initialize the results vector.


berEst = zeros(size(EbNoVec));

for n = 1:length(EbNoVec)
% Convert Eb/No to SNR
snrdB = EbNoVec(n);
% Reset the error and bit
countersnumErrs = 0;
numBits = 0;

while numErrs < 200 && numBits < 1e6


% Generate binary data and convert to
symbolsdataIn = randi([0
1],numSymPerFrame,k); dataSym =
bi2de(dataIn);

% QAM modulate using ’Gray’ symbol


mappingtxSig = qammod(dataSym,M);

% Spreading
txSigSS_aux = sequence*txSig’;
txSigSS=reshape(txSigSS_aux,1,seqLen*numSymPerFrame);

% Pass through AWGN channel


rxSigSS_aux = awgn(txSigSS,snrdB,’measured’);

% Despreading
rxSigSS=reshape(rxSigSS_aux,seqLen,numSymPerFrame);
rxSig=(rxSigSS’ * sequence)/seqLen;

% Demodulate the noisy


signalrxSym =
qamdemod(rxSig,M);

% Convert received symbols to


bitsdataOut = de2bi(rxSym,k);

% Calculate the number of bit errors


nErrors = biterr(dataIn,dataOut);

% Increment the error and bit counters


numErrs = numErrs + nErrors;
numBits = numBits + numSymPerFrame*k;
en
d

% Estimate the BER


berEst(n) = numErrs/numBits;
en
d

% Plot the estimated and theoretical BER data.


% The estimated BER data points are well aligned with the theoretical
curve.figure;
semilogy(EbNoVec,berEst,’-
*’) grid
legend(’Estimated BER’)
xlabel(’Eb/No (dB)’)
ylabel(’Bit Error Rate’)
Expected Output

Scatter plot

0.8 10 -1
E timated BER
0.6
0.4
10 -2

0.2
Quadrature

0 10 -3

Bit Error Rate


-0.2

-0.4
10 -4
-0.6
-0.8
10 -5
-1

-1 -0.5 0 0.5 1 10 -6
In-Phase 0 1 2 3 4 5 6 7 8 9
Eb/No (dB)

Observation Table
SNR in dB BER(simulated) BER(Theoretical)
5
.
15

Result
The transmitter and receiver of packets using 16QAM and pseudo-random sequences over an
AWGNchannel is simulated and tested.
9. DQPSK MODULATION AND DEMODULATION TECHNIQUE
AIM: To analyze bit pattern generation of DQPSK and observe the QPSK waveform at different
at different data rates 2KHZ, 4KHZ, 8KHZ, and 16KHZ

EQUIPMENTS:
1 Power Supply

2. 20MHz Dual Trace Oscilloscope

3. Test probe

PROCEDURE:
1. Connect and switch on the Power Supply.

2. Select Differential Quadrature Phase Shift Keying Modulator using push button and
LEDs of corresponding technique will glow.
3. Select bit pattern using push button i.e. 8 bit, 16 bit, 32 bit and 64 bit and respective LED
will glow. Observe the bit pattern on test point (TP2).
4. Select data rate using push button i.e. 2 KHz, 4 KHz, 8 KHz and 16 KHz. Observe the
change in frequency on test point (TP1).

5. Observe the 2-bit encoding i.e., I-Channel (TP38) and Q-Channel (TP39).
6. Observe Carrier Signal i.e., Sine (TP43) and Cosine (TP42), Frequency of Carrier
signal will change wrt data rate

DQPSK MODULATION EXPERIMENT:

OBSERVATION:

1. Observe the input bit pattern at TP2 by varying bit pattern using respective push
button.
2. Observe the data rate at TP1 by varying data rate using push button
3. Observe the I-Channel (TP38) and Q-Channel (TP39).
4. Observe the Differential encoded output of I-Channel at TP40 and Q-Channel TP41.
5. Observe Carrier Signal i.e., Sine (TP43) and Cosine (TP42).
6. Observe I-Channel (TP44) and Q-Channel (TP45) Modulated Signal.
7. Observe DQPSK Modulated Signal at TP46.

54
EXPECTED WAVEFORMS:

8.

DQPSK DEMODULATION EXPERIMENT:

OBSERVATION:

1. Observe the input bit pattern at TP2 by varying bit pattern using respective push
button.
2. Observe the data rate at TP1 by varying data rate using push button
3. Observe the I-Channel (TP38) and Q-Channel (TP39).
4. Observe the Differential encoded output of I-Channel at TP40 and Q-Channel TP41.
5. Observe Carrier Signal i.e., Sine (TP43) and Cosine (TP42).
6. Observe I-Channel (TP44) and Q-Channel (TP45) Modulated Signal.

55
7. Observe DQPSK Modulated Signal at TP46.
8. Observe the multiplied Signal of DQPSK modulated signal and carrier signal Cosine at
49 & DQPSK modulated signal and carrier signal Sine at TP50.
9. Observe the integrated output of I-Channel TP51 and Q-Channel TP52
10. Observe the comparator output of I-Channel at TP53 and Q-Channel TP54 that is
same as at input with delay.

EXPECTED WAVEFORMS:

56
CONCLUSION: Hence the DQPSK modulation demodulation waveforms are analyzed
andobserved

57












You might also like