0% found this document useful (0 votes)
20 views50 pages

CS Lab MAnual - 10 April

The laboratory manual for the VI Semester B.Tech. in Electronics and Communication Engineering at Manipal Institute of Technology outlines experiments using MATLAB, USRP/LabView, and HFSS. It includes detailed procedures for analyzing free space path loss, BER performance of M-ary PSK and QAM systems under different channel conditions, and simulations for practical understanding. The manual also provides MATLAB code and theoretical background for each experiment, along with exercise problems for further practice.

Uploaded by

Dheeraj
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)
20 views50 pages

CS Lab MAnual - 10 April

The laboratory manual for the VI Semester B.Tech. in Electronics and Communication Engineering at Manipal Institute of Technology outlines experiments using MATLAB, USRP/LabView, and HFSS. It includes detailed procedures for analyzing free space path loss, BER performance of M-ary PSK and QAM systems under different channel conditions, and simulations for practical understanding. The manual also provides MATLAB code and theoretical background for each experiment, along with exercise problems for further practice.

Uploaded by

Dheeraj
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/ 50

VI Semester B.Tech.

(ECE)

ECE_3262 COMMUNICATION SYSTEM


LABORATORY

Laboratory Manual

DEPARTMENT OF ELECTRONICS AND


COMMUNICATION ENGINEERING
MANIPAL INSTITUTE OF TECHNOLOGY
BENGALURU, KARNATAKA, INDIA
January 2024
Course Coverage:

Set/ Title
Expt.
No.
I: Experiments Using MATLAB
Preliminaries: Introduction of MATLAB Tool
1.a Free space signal Propagation model and calculation of free space path loss
1.b BER performance of M-ary PSK system
1.c BER performance of QAM system
II: Experiments Using USRP/ LabView
Preliminaries: Introduction of USRP and Labview
2.a Detection of the device and simulation of the transmitter system
2.b Simulation of the receiver system
2.c Simulation of Analog Modulation System
2.d Simulation of Digital Modulation System
III: Experiments Using HFSS
Preliminaries: Introduction of HFSS software
3.a To design a microstrip antenna and study the different antenna parameters
3.b To optimise the antenna using parametric optimization techniques.
EXPERIMENT 1.a: FREESPACE PROPAGATION – PATH LOSS
MODEL

Aim: To determine the free space path loss (FSPL) and the received power using the MATLAB
program.

Theory: The free space propagation model is used to predict the received signal when the
transmitter and receiver have a clear, unobstructed line-of-sight path between them. In the
large-scale radio wave propagation model, the free space model predicts that the received
power decays as a function of the T-R separation distance raised to some power. The
mathematical expression for the received power for free space propagation environment is
given as:
t t Gr 
2
PG
Pr (d ) = (1)
( 4 )
2
d 2L
Free space path loss (FSPL) is the loss in signal strength that occurs when an electromagnetic
wave travels over a line of sight path in free space. In these circumstances, there are no
obstacles that might cause the signal to be reflected refracted, or that might cause additional
attenuation. To understand FSPL, it is possible to imagine a signal spreading out from a
transmitter. It will move away from the source spreading out in the form of a sphere. As it does
so, the surface area of the sphere increases as this will follow the law of the conservation of
energy, as the surface area of the sphere increases, the intensity of the signal must decrease. As
a result of this, it is found that the signal decreases in a way that is inversely proportional to
the square of the distance from the source of the radio signal.
The mathematical expression for the FSPL is given as:

 ( 4 ) d 2
2
P
FSPL =  t = (2)
 Pr  2

Where we consider unity gain antennas and no loss in the system hardware for the simplicity
of evaluation. We find that not only is the path loss proportional to the square of the distance
between the transmitter and receiver, but the signal level is also proportional to the square of
the frequency in use.

FSPL = (4πd/ λ)2 = (4πdf/ c)2

FSPL is the Free space path loss


d is the distance of the receiver from the transmitter (meters)
λ is the signal wavelength (meters)
f is the signal frequency (Hertz)
c is the speed of light in a vacuum (meters per second)
The free space path loss formula applies to situations where the electromagnetic wave is
available in the far-field situations (not hold for near-field situations).
Decibel equivalence of FSPL equation
Most RF comparisons and measurements are performed in decibels as it is an easy and
consistent method to compare the signal levels present at various points. FSPL can be
expressed in terms of decibels as:
FSPL (dB) = 20 log10 (d) + 20 log10 (f) + 32.45
Where d is the distance of the receiver from the transmitter (km), and f is the signal frequency
(MHz).

The effect of antenna gain on path loss equation


The equation above does not include any component for antenna gains. It is assumed that the
antenna gain is unity for both the transmitter. In reality, though, all antennas will have a certain
amount of gain and this will affect the overall effect. Any antenna gain will reduce the "loss"
when compared to a unity gain system. The figures for antenna gain are relative to an isotropic
source, i.e. an antenna that radiates equally in all directions.
FSPL (dB) = 20 log10 (d) + 20 log10 (f) + 32.45- Gtx - Grx
Where Gtx is the gain of the transmitter antenna relative to an isotropic source (dBi). Grx is
the gain of the receiver antenna relative to an isotropic source (dBi). The FSPL equation is an
essential tool that is required when making calculations for radio and wireless systems for
applications such as wireless survey tools, etc. By using the FSPL equation, it is possible to
determine the signal strengths that may be expected in many scenarios. While the FSPL
formula is not fully applicable where there are other interactions, e.g. reflection, refraction, etc
as are present in most real-life applications, the equation can nevertheless be used to indicate
what may be expected. It is fully applicable to satellite systems where the paths conform closely
to the free space scenarios.

Power Received:
[Pr] = [Pt] + [Gt] + [Gr] – [FSPL]
Pr – Received power.
Pt – Transmitted power
Gt – Gain of the transmitting antenna
Gr – Gain of the receiving antenna

Program:

clc;
close all;
clear all;

f=input('Enter the frequency in MHz: ');

%calculating wavelength
L=300/f;

%displaying wavelength
disp('Thus the wavelength is: ');
L

d=input('Enter the distance in km: ');


Gt=input('Enter the transmitting antenna gain in db: ');
Gr=input('Enter the receiving antenna gain in db: ');

%calculating path loss


ls=32.45+20*log10(d)+20*log10(f);

%calculating received power in db


Wr=Wt+Gt+Gr-ls;

%calculating received power in watts


wr=10^(Wr/10);
%displaying received power in watts
disp(sprintf('%s %d %s','the received power is:',wr,'watts'))

Simulation Parameters:
Transmit power 50W; Carrier frequency 900MHz; Transmit and receiver antenna gain 1.64W;
Distance between transmitter and receiver 100m.
Result:
The program for power received by an antenna and path loss in Free space propagation was
simulated successfully.
EXERCISE PROBLEM
To write a Matlab program to calculate the link budget for satellite communication.

Consider input power =50W. The transmitting and receiving antenna gain as 1.64 W. The
distance between transmitter and receiver as 0.1 km and frequency as 900MHz. Hence
calculate the free space loss (FSL). Further considering the Receiver Feeder loss (RFL),
Atmospheric Absorption (AA), and Antenna Misalignment loss (AML) as 0.1 dB and
Polarization loss (PL) as 0.2 dB calculate the link budget (i.e., received power and the related
losses)

Received power (dBm) = Transmitted power (dBm) + gains (dB) - Losses (dB)
Losses = FSL + AML + RFL + PL + AA

Selected References:

[1] Wireless Communications Principles and Practice by T S. Rappaport, Second edition.


EXPERIMENT 1.b: BER performance of M-ary PSK system

Aim: To analyze the BER performance of the M-ary PSK system under AWGN & Rayleigh
fading channels

Simulator: MATLAB

Schematic diagram:

Binary M-ary PSK x y


AWGN M-ary PSK Binary
Source Modulator Channel De-Modulator Sink

Noise
Source

Fig-1: Wireline Communication System Model

Binary M-ary PSK x y


Rayleigh Matched M-ary PSK
Source Modulator Fading Binary
Filter De-Modulator
Channel Sink
Receiver
(h)

Noise
Source

Fig-2: Wireless Communication System Model

Theory:
1. Wireline Communication Channel Model:
This channel model is also called Additive White Gaussian Noise (AWGN) channel
Modelbecause we assume Noise is White and follows Gaussian Probability Density
Function. Mathematically we can write as
y=x+n

Where, x = Input vector to the channel


n = Additive White gaussian Noise Vector
y = Output vector received from the channel
The Theoretical BER for this Channel Model with BPSK/QPSK Modulation is given
as

BER = Q ( )
SNR = 0.5erfc ( SNR )
where, SNR = Signal to Noise Ratio
Q = Complementary Cumulative Distribution Function
erfc = Complementary error Function.
For M-ary PSK the theoretical BER is given as

1    
BER = erfc ( nSNR ) sin   
n   M 

Where, n = No. of Bits; M = No. of Symbols

2. Rayleigh Fading Communication Channel Model:


The signal fading occurs when the signal propagates through a channel which has large
numberof scatters such as trees, vehicles, buildings etc., Because of scattering at the
receiver we have multiple copies (Multi path components) of transmitted signal
interfering either constructively or destructively which give rise to fading. The
Amplitude of this multi path channel follows RayleighProbability Density Function,
hence the name Rayleigh Fading channel. Mathematically we can write as
y = hx + n

Where, x = Input vector to the channel


n = Additive White gaussian Noise vector
h = Fading channel coefficient vector
y = Output vector received from the channel

The Theoretical BER for this Channel Model with BPSK Modulation is given as

1
 SNR  
BER = 1 − 
2
 2 + SNR 

where, SNR = Signal to Noise Ratio.


ECxxx – Communication Systems Lab Manual, VI Semester B.Tech.(ECE), January 2024

MATLAB Code:

% BER performance of AWGN and Rayleigh Fading System's for M-ary


PSK Modulation

%% Initialization

close all;
clear all;
clc;

rng('shuffle');

% # Symbols in a block of serial data


blockLength = 100;
% # Iterations to get smooth BER curve
numBlocks = 10000;
BER = zeros(size(SNRdB));

%Initializationof BER
BER_fad = zeros(size(SNRdB));
SNR = zeros(size(SNRdB));

% # Bits Per Symbol (n = 1 For BPSK, n = 2 For QPSK)

for n = 1:2

M = 2^n; % M-ary PSK

%% Transmission, Fading, White Gaussian Noise addition, Reception


& Decoding

for L = 1: numBlocks

% Generate serial randomintegers between 0 & M-1 of size 1 X


blockLength
bits = randi([0, M-1], [blockLength,1]);

% NoiseGeneration os size blockLength X 1(#bits = #Noise samples)


ChNoise = (randn(blockLength,1) + 1j*randn(blockLength,1));

% Since we have to compute BER for differentSNR's


for k = 1: length(SNRdB)

9
ECxxx – Communication Systems Lab Manual, VI Semester B.Tech.(ECE), January 2024
% Absolute SNR computed from SNRdB
SNR(k) = 10^(SNRdB(k)/10);

% Transmitted Bits(Symbols)
Txbits = sqrt(SNR(k))*pskmod(bits,M);

% Received Bits(Symbols)from AWGN Channel


Rxbits = Txbits + ChNoise;

% Received Bits(Symbols)from RayleighFading Channel


Rxbits_fad = h*Txbits + ChNoise;

% Bits Processed usingmatched filter receiver for Rayleigh Fading


Channel
Bitsprocessed_MF_fad = conj(h)*Rxbits_fad;

% Bits decoded for AWGN Channel


DecodedBits = pskdemod(Rxbits, M);

% Bits decoded forRayleigh Fading Channel


DecodedBits_fad = pskdemod(Bitsprocessed_MF_fad,M);

% Net BER for alliterations(1:NumBlocks)


BER(k) = BER(k) + symerr(DecodedBits,bits);

% Net BER forall iterations(1:NumBlocks)


BER_fad(k) = BER_fad(k) + symerr(DecodedBits_fad,bits);
End
End

%%%%% Simulated (Practical) BER Calculations & Plots %%%%%%%%%%%%%

% Avg BER = Total # Bits received inerror / total # Bits transmit


i.e.(=blockLength*iter)
BER = BER/(blockLength*numBlocks);
BER_fad = BER_fad/(blockLength*numBlocks);
semilogy(SNRdB,BER,'linewidth',2.0);
hold on;
semilogy(SNRdB,BER_fad,'linewidth',2.0); % Gives Simulated BER
hold on;
end

%%%%%%%% Theoretical BER Calculations & Plots %%%%%%%%%%%%%%%%%

% Theoretical BER for AWGN Channel


BER_Theoretical = qfunc(sqrt(SNR));

% Gives Theoretical BER


semilogy(SNRdB,BER_Theoretical,'bo','linewidth',2.0);
hold on;

10
ECxxx – Communication Systems Lab Manual, VI Semester B.Tech.(ECE), January 2024
% Theoretical BER forRayleigh Fading Channel
BER_Theoretical_fad = 0.5*(1-sqrt(SNR./(2+SNR)));

% Gives Theoretical BER


semilogy(SNRdB,BER_Theoretical_fad,'ro','linewidth',2.0);
hold on;
axis tight;
grid on;
legend('simulated @ BPSK(AWGN)','simulated @
BPSK(FADING)','simulated @QPSK(AWGN)','simulated @
QPSK(FADING)','Theoretical @ BPSK(AWGN)','Theoretical @
BPSK(FADING)');
xlabel('SNR(dB)');
ylabel('BER');
title('BER vs SNR(dB)');

Procedure:
1. Type the MATLAB code in editor window.
2. Run the code and get the BER curves.
3. Calculate the BER for Various Modulation orders at a given SNR and tabulate the
results.
4. Compare theoretical and Simulated BER Curves for BPSK Modulation scheme.

Results:

11
ECxxx – Communication Systems Lab Manual, VI Semester B.Tech.(ECE), January 2024

Calculation and Analysis:

Modulation
S. SNR BER AWGN BER AWGN BER Fading BER Fading
Type
no (Theoretical) (Simulated)
(In dB) (Theoretical) (Simulated)
1 9 BPSK
2 9 QPSK
3 10 BPSK
4 10 QPSK
5 12 BPSK
6 12 QPSK

EXERCISE PROBLEM
Perform the above experiment to calculate the BER parameter for the 16-Ary PSK modulation
scheme.

Selected References:
1. NPTEL online course on Advanced 3G & 4G Wireless Communications by Prof.
Aditya K.Jagannatham (IIT Kanpur, EEE Dept.)
2. Aditya K. Jagannatham - Principles of Modern Wireless Communications Systems-
MC GRAWHILL INDIA (2015)
3. Wireless Communications Principles and practice by T S. Rappaport, Second edition

12
EXPERIMENT 1.c: BER performance of M-ary QAM system
Aim: To analyze the BER performance of the M-ary QAM system under AWGN &
Rayleigh fadingchannels.

Simulator: MATLAB

Schematic diagram:

Binary M-ary x y
AWGN M-ary QAM Binary
Source QAM Channel De-Modulator Sink
Modulator

Noise
Source

Fig-1: Wireline Communication System Model

Binary M-ary x y
Rayleigh Matched M-ary QAM
Source QAM Fading Binary
Filter De-Modulator
Modulator Channel Sink
Receiver
(h)

Noise
Source

Fig-2: Wireless Communication System Model

Theory:
1. Wireline Communication Channel Model:
This channel model is also called the Additive White Gaussian Noise (AWGN)
channel Modelbecause we assume Noise is White and follows Gaussian Probability
Density Function. Mathematically we can write as
y=x+n
Where, x = Input vector to the channel
n = Additive White gaussian Noise Vector
y = Output vector received from the channel

13
The Theoretical BER for this Channel Model with BQAM/4-QAM Modulation is Given
as

BER = Q ( )
SNR = 0.5erfc ( SNR )
where, SNR = Signal to Noise Ratio

Q = Complementary Cumulative Distribution Function.

erfc = Complementary error Function.


For M-ary QAM the theoretical BER is given as

2 1   3n 
BER = 1 −  erfc  SNR 
n M   2n( M − 1) 

Where, n = No. of Bits; M = No. of Symbols

2. Rayleigh Fading Communication Channel Model:


The signal fading occurs when the signal propagates through a channel which has large
numberof scatters such as trees, vehicles, buildings etc., Because of scattering at the
receiver we have multiple copies (Multi path components) of transmitted signal
interfering either constructively or destructively which give rise to fading. The
Amplitude of this multi path channel follows RayleighProbability Density Function.
Hence the name Rayleigh Fading channel.
Mathematically we can write as

y = hx + n

Where, x = Input vector to the channel


n = Additive White gaussian Noise vector
h = Fading channel coefficient vector
y = Output vector received from the channel
The Theoretical BER for this Channel Model with BQAM Modulation is given as

1
 SNR  
BER = 1 − 
2
 2 + SNR 

where, SNR = Signal to Noise Ratio.

14
MATLAB Code:
% BER performance of AWGN and Rayleigh Fading System's
For M-ary QAMModulation

%% Initialization

close all;
clear all;
clc;
rng('shuffle');
blockLength = 100; % # Symbols in a block of serial data
numBlocks = 10000; % # Iterations to get smooth BER curve
SNRdB = [1:0.5:12];
BER = zeros(size(SNRdB));
BER_fad = zeros(size(SNRdB)); %Initialization of BER
SNR = zeros(size(SNRdB));

for n = 1:2 % # Bits Per Symbol (n = 1 For B-QAM, n = 2

For 4-QAM)M = 2^n; % M-ary QAM

%% Transmission, Fading, White Gaussian Noise addition,


Reception &Decoding

for L = 1:numBlocks

bits = randi([0,M-1],[blockLength,1]); % Generate serial random


integers between 0 & M-1 of size 1 X blockLength

ChNoise = (randn(blockLength,1) + 1j*randn(blockLength,1)); %


NoiseGeneration os size blockLength X 1(#bits = #Noise samples)

for k = 1:length(SNRdB) % Since we have to compute BER for


differentSNR's

SNR(k) = 10^(SNRdB(k)/10); % Absolute SNR computed from SNRdB


Txbits = sqrt(SNR(k))*qammod(bits,M); % Transmitted Bits(
Symbols )
Rxbits = Txbits + ChNoise; % Received Bits(Symbols)from AWGN
Channel Rxbits_fad = h*Txbits + ChNoise; % Received
Bits(Symbols)from RayleighFading Channel
Bitsprocessed_MF_fad = conj(h)*Rxbits_fad; % Bits Processed
usingmatched filter receiver for Rayleigh Fading Channel
DecodedBits = qamdemod(Rxbits,M); % Bits decoded for AWGN
Channel
DecodedBits_fad = qamdemod(Bitsprocessed_MF_fad,M); % Bits
decoded forRayleigh Fading Channel
BER(k) = BER(k) + symerr(DecodedBits,bits); % Net
BER for alliterations(1:NumBlocks)
end
end

15
%% Simulated (Practical) BER Calculations & Plots

BER = BER/(blockLength*numBlocks);% Avg BER = Total # Bits


received inerror / total # Bits transmitted
i.e.(=blockLength*iter)
BER_fad = BER_fad/(blockLength*numBlocks);
semilogy(SNRdB,BER,'linewidth',2.0);
hold on;
semilogy(SNRdB,BER_fad,'linewidth',2.0); % Gives
Simulated BERhold on;

end

%% Theoretical BER Calculations & Plots

BER_Theoretical = qfunc(sqrt(SNR)); % Theoretical BER for


AWGN Channel
semilogy(SNRdB,BER_Theoretical,'bo','linewidth',2.0); %
Gives Theoretical BER
hold on;
BER_Theoretical_fad = 0.5*(1-sqrt(SNR./(2+SNR))); %
Theoretical BER ForRayleigh Fading Channel
semilogy(SNRdB,BER_Theoretical_fad,'ro','linewidth',2.0); %
Gives Theoretical BER
hold on;
axis tight;
grid on;
legend('simulated @ B-QAM(AWGN)','simulated @ B-
QAM(FADING)','simulated@ 4-QAM(AWGN)','simulated @ 4-
QAM(FADING)','Theoretical @ B- QAM(AWGN)','Theoretical @ B-
QAM(FADING)');
xlabel('SNR(dB)');
ylabel('BER');
title('BER vs SNR(dB) for M-ary QAM');

Procedure:
1. Type the MATLAB code in editor window.
2. Run the code and get the BER curves.
3. Calculate the BER for Various Modulation orders at a given SNR and tabulate
the results.
4. Compare theoretical and Simulated BER Curves for BPSK Modulation scheme.

16
Results:

Calculation and Analysis:

S. SNR Modulation BER AWGN BER AWGN BER Fading BER Fading
no
(In dB) Type (Theoretical) (Simulated) (Theoretical) (Simulated)
1 9 BQAM
2 9 4-QAM
3 10 BQAM
4 10 4-QAM
5 12 BQAM
6 12 4-QAM

EXERCISE PROBLEM
Demonstrate the OFDM modulation process using MATLAB

Selected References:
1. NPTEL online course on Advanced 3G & 4G Wireless Communications by Prof. Aditya
K.Jagannatham (IIT Kanpur, EEE Dept.)
2. Aditya K. Jagannatham - Principles of Modern Wireless Communications Systems-MC
GRAWHILL INDIA (2015)
3. Wireless Communications Principles and practice by T S. Rappaport, Second edition.

17
EXPERIMENT 2.a: Building a Transmitter System using the USRP
Module

Aim: To design a NI USRP (National Instruments Universal Software Radio Peripheral)


transmitter system.

Theory: LabVIEW is a graphical programming language developed by National Instruments.


The basic building block of LabVIEW is the virtual instrument (VI). Conceptually, a VI is
analogous to a procedure or function in conventional programming languages. Each VI consists
of a block diagram and a front panel. The block diagram describes the functionality of the VI,
while the front panel is a top-level interface to the VI. The construct of the VI provides two
important virtues of LabVIEW: code reuse and modularity. The graphical nature of LabVIEW
provides another virtue: it allows developers to easily visualize the flow of data in their design
termed Graphical System Design. LabVIEW provides a simple interface for configuring and
operating various external I/O, including the NI RF hardware used in the lab. LabVIEW is used
to simulate these systems, and USRP is used to implement these systems in hardware. NI-
USRP Toolkit provides LabVIEW support for USRP devices. The basic guidelines for
designing the transmitter unit are to follow a series of steps given in the subsequent section.

Procedure: The first task in this lab is to build a basic transmitter block. The block diagram
should resemble Figure 1, and the front panel should resemble Figure 2. It has 4 session steps
namely Open, Configure, write, and Close Session.

Use the following procedure to begin using the NI USRP to generate a signal:
1. Select Start  Programs National Instruments LabVIEW 2010 LabVIEW to launch
LabVIEW. The LabVIEW dialog appears.
2. Click File  New VI or Go to Create New Project  Blank VI and click OK to create a
blank VI.
3. Display the block diagram by clicking it or selecting Window Show Block Diagram.

4. Open Session: Navigate to the NI USRP VIs on the Functions or right-click on the window
and go to Instrument I/O  Instrument Drivers  NI-USRP  TX palette  NI-
USRP Open Tx Session, then place it over Block Diagram.
5. Navigate to the placed Tx unit icon and type (Ctrl+H).
6. Hover the cursor over the device name terminal on the niUSRP Open TX Session VI and
right-click. Select Create Control to create a front panel field
⇒ where you specify the NI USRP
device name.
7. Establish the desired wiring connections.

8. Configure Session: Navigate to the NI USRP VIs on the Functions or right-click on the
window and go to Instrument I/O  Instrument Drivers  NI-USRP  TX 
niUSRP ConfigureSignal palette, then place it over Block Diagram.

18
9. Hover the cursor over the niUSRP Configure terminal and right-click. Select Create Control
to create a front panel field where you specify the NI USRP
⇒ IQ rate, Carrier frequency, gain,
and active antenna. Hover the mouse tool over the IQ rate, carrier frequency, and gain
terminals of the niUSRP Configure Signal VI.
10.Establish the desired wiring connections.
11.Hover the cursor over the SineWaveform terminals and right-click over amplitude terminal.

Select Create Control and give a value to it say 0.5. Similarly, hover the cursor over the
Sinewave form terminals and right-click over frequency terminal. Select Create Control to
create a front panel field where you specify the frequency. Hover the cursor over phase
terminal  create constant. For the sampling info terminal  Right Click Create Control.
12. Right Click BD window and go to Waveform icon  Get Waveform Components then
place on the window. Pull Down to include more parameters.
13. Right Click BD window: Select Waveform icon  Build waveform  Select attributes.
14. Right Click BD window: Select Numeric  Complex  Re/Im to Complex.
15. Go to Front Panel Window: Graph  Waveform Graph  Place.
16. Go to BD Window  Waveform  Analog Waveform  Measurement  FFT
Power Spectrum and PSD.
17.Establish the desired wiring connections.

18.Close Session: Navigate to the NI USRP VIs on the Functions or right click on the window
and go to Instrument I/O  Instrument Drivers  NI-USRP  niUSRP Close
Session then place it over Block Diagram.
19. Build a While Loop and STOP button by completing the following steps: Right Click 
Structure Pallete  While Loop  Select the component range  Right Click Red
Button  Create Control. Enclose the niUSRP Write TX Data (Poly) in the While Loop.

Figure 1: Block Diagram of Basic


Transmitter Signal Generation

20.Got to Front Panel  Windows  Put System Specifications as follows:

19
Figure 2: Front panel of Basic Transmitter
Signal Generation

Result and Analysis:

Figure 3: Generation of transmitted signal

Exercise: Generate a continuous sinusoidal, triangular wave at different frequencies as 20KHz,


30KHz, and 50KHz.

Reference:
[1] National Instruments, "What is I/Q Data?," 12 9 2018. [Online]. Available:
http://www.ni.com/tutorial/4805/en/https://literature.cdn.keysight.com/litweb/pdf/5965-
7160E.pdf. [Accessed 25 3 2019].
[2] Labview and Multisim, " Transmit and Received Signal Using USRP (NI USRP Tx & Rx),"
25 1 2022. [Online]. Available: https://www.youtube.com/watch?v=pvYUe8SXy3E&t=11s.

20
EXPERIMENT 2b: Building a Receiver System

Aim: To design a NI USRP (National Instruments Universal Software Radio Peripheral)


receiver system using LabView.
Theory: To create a NI USRP receiver system using LabVIEW, we need to follow a series of
steps. This involves setting up the hardware, configuring LabVIEW, and implementing the
receiver functionality. The receiver functionality includes:
Creating a VI for the Receiver: Place the blocks for signal acquisition and processing in the VI.
Configuring USRP Parameters: Use LabVIEW blocks to configure USRP parameters such as
center frequency, sample rate, and gain.
Acquire and Process Signals: LabVIEW blocks are used to acquire signals from the USRP
device and then Implement signal processing algorithms as needed for your application.
Display Results: Use LabVIEW controls and indicators to display received signals, spectrum,
or any relevant information.
To execute its receiver module operation it follows 6 session steps namely Open, Configure,
Start, Fetch/Read (Loop), Stop, and Close Session.

Procedure: Use the following procedure to begin using the NI USRP to generate a signal:
1. Select Start  Programs National Instruments LabVIEW 2010 LabVIEW to launch
LabVIEW. The LabVIEW dialog appears.
2. Click File  New VI or Go to Create New Project  Blank VI and click OK to create a
blank VI.
3. Display the block diagram by clicking it or selecting Window Show Block Diagram.

4. Open Session: Navigate to the NI USRP VIs on the Functions or right-click on the window
then go to Instrument I/O  Instrument Drivers  NI-USRP  RX palette  NI-
USRP Open RX Session. Then place it over the Block Diagram.
5. Navigate to the placed RX unit icon and type (Ctrl+H).
6. Hover the cursor over the device name terminal on the niUSRP Open RX Session VI and
right-click. Select Create Control to create a front panel⇒
field where you specify the NI USRP
device name.
7. Establish the desired wiring connections.

8. Configure Session: Navigate to the NI USRP VIs on the Functions or right-click on the
window and go to Instrument I/O  Instrument Drivers  NI-USRP  RX palette 
niUSRP Configure Signal palette then place it over Block Diagram.
9. Hover the cursor over the niUSRP Configure terminal and right-click. Select Create Control
⇒ IQ rate, Carrier frequency, gain,
to create a front panel field where you specify the NI USRP
and active antenna. Hover the mouse tool over the IQ rate, carrier frequency, and gain
terminals of the niUSRP Configure Signal VI.
10.Establish the desired wiring connections.
11. Initiate Session: Navigate to the NI USRP VIs on the Functions or right-click on the window
and go to Instrument I/O  Instrument Drivers  NI-USRP  RX palette  niUSRP

21
Initiate palette then place it over Block Diagram.
12. Establish the desired wiring connections.
13.Hover the cursor over Fetch Block, then create Control for no. of samples.
14.Change the type from CDB cluster to CDB WDT by selecting dropdown  Single Channel
 Complex double waveform datatype (CDB WDT).
15.Establish the desired wiring connections.

16.Go to Front Panel Window  Input the parameters set


⇒at transmitter and receiver and run
TX1 and RX2.
17.Right Click BD window: Array  Build Array (Pull Down).
18.Go to Front Panel Window then go to Graph  Waveform Graph  Place.
19.Establish the desired wiring connections.
20.Abort: Navigate to the NI USRP VIs on the Functions or right click on the window and go
to Instrument I/O  Instrument Drivers  NI-USRP  niUSRP Abort Session then
place it over Block
21. Establish the desired wiring connections.

Figure 1: Block Diagram of Basic Transmitter Signal Generation.

22.Close Session: Navigate to the NI USRP VIs on the Functions or right click on the window
and go to Instrument I/O  Instrument Drivers  NI-USRP  niUSRP Close Session
then place it over Block Diagram.

23. Build a While Loop and STOP button by completing the following steps: Right Click 
Structure Pallete  While Loop  Select the component range  Right Click Red
Button  Create Control. Enclose the niUSRP Fetch RX Data (Poly) VI in the While
Loop.

22
24.Got to Front Panel: Windows  Front Panel  Put System Specifications as follows:

Figure 2: Front panel of Basic Transmitter Signal Generation.

Result and Analysis:

Figure 3: Frequency domain and Time domain representation of


received signal

Exercise: Validate the reception of a sinusoidal signal with frequencies as 20KHz, 30KHz, and
50KHz.

Reference:
[1] National Instruments, "What is I/Q Data?," 12 9 2018. [Online]. Available:
http://www.ni.com/tutorial/4805/en/https://literature.cdn.keysight.com/litweb/pdf/5965-
7160E.pdf. [Accessed 25 3 2019].
[2] Labview and Multisim, " Transmit and Received Signal Using USRP (NI USRP Tx & Rx),"
25 1 2022. [Online]. Available: https://www.youtube.com/watch?v=pvYUe8SXy3E&t=11s.

23
EXPERIMENT 2c: Building an Analog Modulation and Demodulation
System

Aim: To design an amplitude modulator and demodulator system and analyse the modulated
signal, PSD, and the recovered message signal.

Theory: In electronics and telecommunications, modulation is the process of varying one or


more properties of a periodic waveform, called the carrier signal, with a modulating signal
that typically contains information to be transmitted. In telecommunications, modulation is
the process of conveying a message signal, like an Analog audio signal, inside another signal
that can be physically transmitted. Modulation of a sine waveform transforms a baseband
message signal into a passband signal. The aim of Analog modulation is to transfer an Analog
baseband (or lowpass) signal, for example an audio signal or TV signal, over an Analog
bandpass channel at a different frequency, for example over a limited radio frequency band or
a cable TV network channel. In amplitude modulation (AM), the amplitude of the transmitted
signal varies linearly with the modulating digital signal, 𝑚(𝑡). In this experiment, the AM
technique is considered.

Procedure: Use the following procedure to demonstrate modulation and demodulation


process using NI USRP module:
1. Select Start  Programs National Instruments LabVIEW 2010 LabVIEW to launch
LabVIEW. The LabVIEW dialog appears.
2. Click File  New VI or Go to Create New Project  Blank VI and click OK to create a
blank VI.
3. Display the block diagram by clicking it or selecting Window Show Block Diagram.

4. Navigate to the NI USRP VIs on the Functions or right-click on the window and go to
Signal Processing  Waveform Generation  Sine Waveform then place it over Block
Diagram.
5. Hover the cursor over the niUSRP Sinewaveform terminal and right-click. Select Create
⇒ the NI USRP frequency and
Control to create a front panel field where you specify
sampling info terminals of the niUSRP Configure Signal VI.
6. Establish the desired wiring connections.
7. Go to Front Panel and select Graph  Waveform graph.
8. Go to BD by navigating to the NI USRP VIs on the Function tab or directly from the
window tab, then go to RF Communications  Modulation  Analog 
Modulation  MT Modulate AM palette then place it over Block Diagram.
9. Hover the cursor over the MT modulate terminals and right-click to Create Control for
⇒ or Critical Modulation) and
Modulation Index (Over modulation, under modulation
Suppress Carrier.
10. Go to Front Panel Window: Graph  Waveform Graph then place it on the block
diagram.

24
11. Go to BD then select RF Communications  Modulation  Analog  Modulation
 Upconvert palette then place it over Block Diagram.

12. Establish the desired wiring connections.


13. Build a While Loop and STOP button by completing the following steps: Right Click
 Structure Pallete  While Loop  Select the component range  Right Click
Red Button  Create Control.
14. To add delay: Right Click  Timing Pallete  Wait  Select the component range
 Create Constant and give any delay value.

Figure 1: Block Diagram of Basic Transmitter Signal Generation VI.

15. Got to the Front Panel and put System Specifications as follows:

25
Figure 2: Front panel of Basic Transmitter Signal Generation VI.

Result and Analysis:

Figure 3: Representation of modulated signal and demodulated baseband signal

26
Exercise: Design a FM transmitter system using USRP with the same simulation parameters
taken for the above experiment.

Reference:
[1] National Instruments, "Analog and Digital Modulation," National Instruments, 19 3 2019.
[Online]. Available: http://www.ni.com/en-us/innovations/white-papers/06/analog-anddigital-
modulation.html. [Accessed 25 3 2019].
[2] B. P. Lathi and Z. Ding, Modern Digital and Analog Communication Systems 4th Ed., New
York City, New York: Oxford University Press, 2009

EXPERIMENT 2d: Building a Digital Modulation System

Aim: To design a digital modulator system using a phase shift keying (PSK) modulator and
analyze the modulated signal.

Theory: 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.

Procedure: To build a digital modulation system use the following procedure to demonstrate
the digital modulation and demodulation process using NI USRP module:
1. Select Start  Programs National Instruments LabVIEW 2010 LabVIEW to launch
LabVIEW. The LabVIEW dialog appears.
2. Click File  New VI or Go to Create New Project  Blank VI and click OK to create a
blank VI.
3. Display the block diagram by clicking it or selecting Window Show Block Diagram.

4. Go to Front Panel  Graph  Waveform graph.


5. Go to BD then Navigate to the NI USRP VIs on the Functions or select from the window
tab the palette for RF Communications  Modulation  Digital  MT Generate Bits
(poly).vi then place it over Block Diagram.
6. Hover the cursor over the MT Generate Bits (poly) icon, and right-click over the Total bits

27
terminal to Create Control.
7. Navigate to the NI USRP VIs on the Functions or right click on the window then go to RF
Communications  Modulation  Digital  Modulation  MT Modulate PSK
then place it over Block Diagram.
8. Establish the desired wiring connections.
9. Hover the cursor over the MT Modulate PSK.vi icon, and right-click over the Symbol Rate
terminal to Create Control.
10. Navigate to the NI USRP VIs on the Functions or right-click on the window  RF
Communications  Modulation  Digital  Utilities  MT Generate System
Parameters then place it over Block Diagram. Select the modulation type as M-PSK from
the drop-down.
11. Hover the cursor over the MT Generate System Parameters.vi icon, and right-click over
the PSK type (Differential PSK, Offset PSK, BPSK, QPSK), Samples per symbol (16), M-
PSK (4), and Differential PSK terminal to Create Control.
12. Establish the desired wiring connections.
13. Hover the cursor over the MT Upconvert Baseband (Real).vi icon, and establish the
desired wiring connections.

Figure 1: Block diagram of PSK modulation system

14. To add Loop: Navigate to the NI USRP VIs on the Functions or right click on the window
 Structures  For Loop  Select Section of the given Block Diagram. Then create
the constant.

28
Result and Analysis:

Figure 2: Output Analysis of the PSK modulated signal

EXERCISE
Design a DPSK transmitter system using USRP with the same simulation parameters taken for
the above experiment.

Reference:
[1] Keysight Technologies, "Digital Modulation in Communication Systems - An
Introduction," [Online]. Available: https://literature.cdn.keysight.com/litweb/pdf/5965-
7160E.pdf. [Accessed 25 3 2019].
[2] National Instruments, "Analog and Digital Modulation," National Instruments, 19 3 2019.
[Online]. Available: http://www.ni.com/en-us/innovations/white-papers/06/analog-anddigital-
modulation.html. [Accessed 25 3 2019].

29
EXPERIMENT – 3 (a,b)

AIM:
1. To become familiar with the microstrip antenna.
2. To design a microstrip patch antenna and study the different antenna parameters.
OBJECTIVES:
A. To design a microstrip antenna and study the different antenna parameters.
B. To optimise the antenna using parametric optimization techniques.

SOFTWARE USED: ANSYS HFSS Software

THEORY:
1. Familiarization with the microstrip antenna:
Microstrip antennas are low profile, comfortable to planar and non-planar surfaces and mechanically
robust when mounted on rigid surface. It is also known as “patch antenna”, “internal antenna” or
“printed antenna”, which is a narrowband wide beam antenna. Mostly used at microwave frequencies.
Fig.1 shows a few possible geometries of single radiating patch antenna. The patch is usually fed along
the centreline to symmetry and thus minimizes the excitation of undesirable modes. It is preferred in
aircraft, spacecraft, satellite and missile applications, where size, weight, cost, ease of installation and
aerodynamic profile are constraints and low profile antennas may be required.

30
square circular triangular pentagon

square ring circular ring quad arrow square

plaque cross arc L-shape

Fig. 1 Geometry of single radiating patch antenna


Substrates:
There are a number of substrates that can be used for the design of microstrip antennas whose dielectric
constants are usually in the range of 2.2 ≤ r ≤ 12. Thick substrates are desirable with lower dielectric
constants because they provide better efficiency, larger bandwidth, and loosely bound fields for
radiation into space, but at the expense of large element size. Similarly, thin substrates with higher
dielectric constants are desirable for microwave circuitry because they require tightly bound fields to
minimise undesired radiation and coupling and lead to smaller element sizes. However, their greater
losses make them less efficient and have relatively more minor bandwidths. Fig. 2 shows a few
examples of substrates with their specification, which are used for selecting particular substrates by
the antenna designers.

2. Design of a microstrip patch antenna and study the different antenna parameters

31
The rectangular patch is by far the most widely used configuration. It is very easy to analyse using
the transmission line and cavity models.

The diagram of a primary half-wave patch antenna is shown in Figure 2. It consists of a large patch
of metal into which energy is coupled from a microstrip feed. The physical patch dimensions are
width W and length L. It is fed by a microstrip feed line with width, which is usually chosen so
that the characteristic impedance of the feed line is 50 ohms. Like any other device, an antenna
has an input impedance. If the feed line shown in the diagram were connected directly to the edge
of the antenna, the input impedance at that point would be in the hundreds of ohms, which would
be a poor match to the 50-ohm line being connected there. A simple quarter-wave transformer
matches the input line (which is 50 ohms) to the high impedance of the patch. Such a transformer
is visible on the microstrip patch board.

A single-feed patch antenna like the one shown in Figure 4 resonates at a frequency determined
by the length of the antenna L, which is approximately half a wavelength (taking into effect
wavelength shortening by the substrate). The radiated polarization is parallel to the patch's edges
in the resonant direction. Because the patch is backed by a ground plane, we expect most of the
radiation to be on the patch side of the substrate and very little radiation behind the ground plane.

(a) Top view (b)


Side view

Fig. 2: Top view and side view of conventional microstrip patch antenna

DESIGN PROCEDURE:
Based on the simplified formulation, a design procedure is outlined which leads to practical designs of
rectangular microstrip antennas. The procedure assumes that the specified information includes the
dielectric constant of the substrate ( ), the resonant frequency ), and the height of the substrate
(′ℎ′). The procedure is as follows:

32
The smaller the dielectric constant of the substrate, the larger the fringing. Thus, the length of the
microstrip patch is smaller. In contrast, the larger the dielectric constant, the more tightly the field is
held within the substrate. Thus, the fringing is smaller, and the length is longer and closer to half
wavelength in the dielectric. After calculating the length and width of the patch, the design and
simulation of a rectangular microstrip patch antenna in the ANSYS HFSS software should be done to
study the antenna parameters.

HFSS DESIGN STEPS AND OBSERVATIONS:


This example has been shown for rectangular patch antenna resonating at 2.4 GHz on an FR-4 epoxy
substrate of dielectric constant 4.4 and thickness 1.6 mm.

STEP1: Create a substrate by selecting a Box from upper palate of 60x60x1.6 mm3,
substrate is FR4 epoxy.

33
STEP 2: Create a ground by selecting a Box from upper palate of 60x60x0.035 mm3 ,
material is copper.

STEP-3: For modelling of patch ,create a box by selecting a Box from upper palate of
29x38x0.035 mm3 , material is copper.

34
STEP-4: For Inset_cut, Create a box by selecting a Box from upper palate of 9.5x5x0.035
mm3 of copper material.

STEP-5: At last, Subtract Inset_cut box from Patch by selecting both the box.

35
STEP-6: For giving feed to patch we have to create a feedline by selecting a Box of
30x3x0.035 mm3 at the feed point, of copper material. And unite it with the existing patch.

36
STEP-7: For assigning the radiation boundary. Change the drawing plane to XY, Create a
Radiation box by selecting a box of 80x80x50 mm3 , and assign boundary radiation.

STEP-8: For assigning Excitation. Change the drawing plane to YZ. A rectangular
sheet has been created at the feed end, and assign the lumped excitation properly.

37
STEP-9: Complete the solution setup by assigning solution setup and solution frequency
as 2.4 GHz.

STEP-10: Add frequency sweep.

38
STEP-11: Validate the structure and analyse all. For results, go to results section and
choose rectangular plot .

RESULTS & DISCUSSION:


❑ S- Parameter:

39
STEP-12: Validate the structure and analyse all. For VSWR result, go to result section
and choose rectangular plot.

❑ VSWR- Parameter:

40
❑ 2D- Radiation Pattern:
STEP-13_1: Define the infinite sphere. Assign proper trace. From the results section
in the create farfield report. Rectangular plot

STEP-13_2: Change in Families

41
STEP-14: 3D- Polar plot setting. From the results section in the create far field
report. 3D polar plot.

42
STEP-15_1: Gain plot setting. Assign in Trace. From the results section in the
create farfield report. Rectangular plot

43
STEP-15_2: Assign in Families

❑ Gain Plot & Reflection coefficient

44
STEP-16_1: Assign in Traces. From the results section in the create farfield report.
Rectangular plot.

Step-16_2: Assign in Families.

45
PRECAUTIONS:
1. Save the HFSS file before designing the antenna.
2. Define infinite sphere and simulate again for far-field results.
3. Choose the radiation box at least a quarter wavelength from each side of the antenna
geometry.

DESIGN TASKS:
1. Microstrip patch antenna design at 400 MHz with 20% IBW.
2. Microstrip patch antenna design at 900 MHz with 20% IBW.
3. Microstrip patch antenna design at 1800 MHz with 20% IBW.
4. Microstrip patch antenna design at 3 GHz with 20% IBW.

46
EXPERIMENT – 2

AIM:
1. To be familiar with RF Signal Source and RF Power Meter.
2. To be familiar with the Antenna Turn Table.
Objectives:
1. To verify the E-plane plot of the Dipole Microstrip Antenna.
2. To verify the E-plane plot of the Rectangular Microstrip Antenna.
Instruments required:
1. RF Signal Source
2. RF Power Meter
3. Antenna Turn Table
4. Tripod Stand for transmitting and Receiving Antenna
5. RF Cables
6. Power Chord for Signal source and RF Power Meter
7. Test Antennas
Antenna Turn Table
Manual Operation
Users can operate the Antenna Turn Table in Manual operation, with no need to
connect any Computer. They take readings manually, and then they can plot the polar graph
also manually. When manually operating the system, they can select the angle resolution with
9° (40 Readings) and 18° (20 Readings) and time interval from 1 second to 99 seconds; the
user can program this with a keypad provided in the front panel.
Automatic Operation
Users can operate the antenna turn table automatically by interfacing the computer with
the antenna turn table, and they get the polar plot on a computer screen. Also, they can save the
polar graph and readings for Angle vs Power. Angle resolution with 1.8° and 200 readings in
360°
System Interfacing
The antenna turn table can be interfaced with the Computer on the Serial port, and all
operations can be conducted through the computer. Polar graphs and data are saved on your
system memory (Hard disk).
Specifications
Operating Frequency of Antennas: 10MHz to 8GHz

Step size : 1.8°, 9°, 18°


Time interval : 1 sec to 99 sec
Minimum Power level : -40dB (100nW)
Maximum Power level : +20dB (100mW)

47
Procedures:

1. Set up the system as shown in above figure for a receiving power measurement (Pr), red line in
the diagram indicates the RF SMA (male) to SMA (male) cable connections.
2. Keeping the tuning voltage at minimum in the front panel of the VCO and switch on the VCO.
3. Select the Modulation Square wave by changing the toggle switch position in front panel. When
the power meter is used select the CW mode.
4. Adjust the minimum distance between the transmitting and receiving antennas using the formula
S ≥ 2d2/λ where d is the broader dimension of the antenna.

Sample Calculation for Dipole antenna 𝑐


𝜆=
2𝑑 2
𝑓
𝑆≥
𝜆 3 × 1010
2 𝜆=
2 × (4.6𝑐𝑚) 2.5 × 109
𝑆≥
12𝑐𝑚 λ = 12cm
S ≥ 3.52 cm (the minimum distance between Tx-
Rx)

5. Vary the tuning voltage and check the output for different VCO frequencies. The frequency at
which the output becomes maximum is the resonance frequency of the antenna.
6. Note down the frequency (RF) by reading the Display on front panel of VCO as an Operating
frequency of RF signal.
7. Keeping both the antennas in line of sight and note down the Received power in VSWR meter
directly in dBm (Pr-Receiving Power)
8. Now without disturbing the RF level and RF Frequency change the Setup as shown in the Fig-
2 and use the same detector which is used in the measurement of Received power.

48
SMA – SMA (F) Connector

Fig-2 Transmitting power measurement set-up diagram


9. After the completion of the setup note down the Transmitting power in VSWR meter directly
in dBm (Pt-Transmitting power).
10. After note down the Pr-Receiving Power, Pt-Transmitting power, f-operating Frequency, S-
distance between Transmitting and receiving antenna.

Operation Procedure (Interface):

1. Connect the system as shown in the block diagram.


2. Connect the Tx and Rx antennas.
3. Connect the serial port cable.
4. Switch on Microwave signal source, antenna turn table and Computer.
5. Set the resonating frequency of your antenna in line of sight.
6. Click on Antenna Radiation Pattern plotter software.
7. Go to option and select memory location to Save Graph and data.
8. Select the COM Port.
9. Press the Start button.
10. Display shows the Angle and Power readings.

49
Result & Discussion:
1. Rectangular Patch Microstrip Antenna Radiation Pattern in E plane

2. Dipole Microstrip Antenna Radiation Pattern in E plane and H Plane

50

You might also like