4G 5G Lab Manual
4G 5G Lab Manual
BONAFIDE CERTIFICAT
BONAFIDE CERTIFICATE
UNIVERSITY REGISTER NUMBER:
Mr./Ms………………………….……..……………………………of …………………………………………....
PSO1. Analyze and design the analog and digital circuits or systems for a given specification and
function.
PSO2. Implement functional blocks of hardware-software co-designs for signal processing and
communication applications.
PSO3. Design, develop and test electronic and embedded systems for applications with real time
constraint and to develop managerial skills with ethical behavior to work in a sustainable environment.
INSTRUCTIONS TO STUDENTS FOR WRITING THE RECORD
In the record, the index page should be filled properly by writing the corresponding experiment
number, experiment name, date on which it was done and the page number.
1. Title: The title of the experiment should be written in the page in capital letters. In the left top margin,
experiment number and date should be written.
2. Aim: The purpose of the experiment should be written clearly.
3. Apparatus/Tools/Equipment’s/Components used: A list of the Apparatus/Tools/ Equipment’s/
Components used for doing the experiment should be entered.
4. Theory: Simple working of the circuit/experimental set up/algorithm should be written.
5. Procedure: Steps for doing the experiment and recording the readings should be briefly described (flow
chart/ Circuit Diagrams / programs in the case of computer/processor related experiments)
6. Results: The results of the experiment must be summarized in writing and should be fulfilling the aim.
a) Circuit/Program: Neatly drawn circuit diagrams for the experimental set up.
b) Design: The design of the circuit components for the experimental set up
for selecting the components should be clearly shown if necessary.
OBSERVATIONS:
COURSE OBJECTIVES
LIST OF EXPERIMENTS:
COURSE OUTCOMES:
Students will be able to:
Course
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
Outcome
CO1 3 3 2 3 2 - - - - - - -
CO2 3 3 3 2 2 - - - - - - -
CO3 3 3 2 2 2 - - - - - - -
CO4 3 3 3 3 2 - - - - - - -
CO5 3 2 3 3 2 - - -- - - - -
AVG. 3 2.8 2.6 2.6 2 - - - - - - -
Note: Enter correlation levels 1, 2 or 3 as defined below:
1: Slight (Low) 2: Moderate (Medium) 3: Substantial (High)
CO-PSO matrices:
Course
PSO1 PSO2 PSO3
Outcome
CO1 1 1 3
CO2 1 1 2
CO3 3 2 2
CO4 3 2 2
CO5 3 2 2
AVG. 2.2 1.6 2.2
INDEX
AIM:
Develop a MATLAB program to model 5G Synchronization Signal Blocks (SSBs) and Bursts.
APPARATUS REQUIRED:
Hardware: Personal computer
Software : MATLAB , 5G Toolbox, knowledge of 5G NR standard.
PROCEDURE:
1. Start the MATLAB 2023a
2. Open M file
3. Type the program
4. Save in the current Directory
5. Compile and Run the Program
6. If any error occurs in the program correct and run it again
7. For the output see current window/ Figure window
8. Stop the Program.
THEORY:
1. Waveform Design: The first step in the generation of a 5G compliant waveform is to design the
waveform. This involves selecting the modulation type, the number of subcarriers, the number of
symbols, and the symbol rate.
2. Channel Estimation: The next step is to estimate the channel characteristics. This is done by
measuring the signal strength and the noise level at the receiver.
3. Equalization: Once the channel characteristics are known, the signal can be equalized to reduce the
effects of noise and interference. This is done by applying a filter to the signal.
4. Modulation: The signal is then modulated using the chosen modulation type. This involves mapping
the data onto the signal in a way that is compatible with the 5G standard.
4. Waveform Generation: Finally, the waveform is generated by combining the modulated signal with
the equalized signal.
CODING: %GENERATION OF 5G COMPLIANT SIGNAL
scs = 1000000;
M = 4; % Modulation order
% input bit source:
in = randi([0 1], 10600, 1);
% Generation
waveform = ofdmMod(dataInput);
OUTPUT:
QAM WAVEFORM:
%% Visualize
% Time Scope
timeScope = timescope('SampleRate', Fs, ...
'TimeSpanOverrunAction', 'scroll', ...
'TimeSpanSource', 'property', ...
'TimeSpan', 0.03);
timeScope(waveform);
release(timeScope);
% Spectrum Analyzer
spectrum = spectrumAnalyzer('SampleRate', Fs);
spectrum(waveform);
release(spectrum);
% Constellation Diagram
constel = comm.ConstellationDiagram('ColorFading', true, ...
'ShowTrajectory', 0, ...
'ShowReferenceConstellation', false);
constel(waveform);
release(constel);
OUTPUT:
PSK WAVEFORM:
RESULT:
Thus the Constellation diagram, Time scope and Frequency plots were generated and
the 5G Complaint waveform for OFDM,QAM and PSK were tested successfully.
EXP:2 MODELING 5G SYNCHRONIZATION SIGNAL BLOCKS (SSBS) AND BURSTS
AIM:
Develop a MATLAB program to model 5G Synchronization Signal Blocks (SSBs) and Bursts.
APPARATUSREQUIRED:
Hardware: Personal computer
Software :MATLAB , 5GToolbox,knowledge of 5G NR standard.
PROCEDURE:
1. Start the MATLAB 2023a
2. Open M file
3. Type the program
4. Save in the current Directory
5. Compile and Run the Program
6. If any error occurs in the program correct and run it again
7. For the output see current window/ Figure window
8. Stop the Program.
THEORY:
In the 5G NR downlink frame, SS blocks are transmitted towards UEs at regular
intervals based on periodicity set (i.e. 5/10/20/40/80/160 ms). Multiple SS blocks
are carried in a SS burst. A single SS block spans 4 OFDM symbols on time axis
and 240 subcarriers on frequency axis. SS block carry PSS (Primary
Synchronization Signal), SSS (Secondary Synchronization Signal) and PBCH
with DMRS. The SS blocks are grouped into first 5 ms of the SS burst. The
maximum number (L) of SS blocks in single burst is frequency dependant. There
can be about 64 blocks per burst at frequencies above 6 GHz (i.e.mmwave
frequencies). Following are the possible candidate SSB locations (L) within SS
Burst set.
• L =4 for Up to 3 GHz
• L = 8 from 3 GHz to 6 GHz
The program will display generated SSB bursts, received SSB bursts (possibly with
AIM:
Develop a MATLAB program for channel modeling in 5G Networks.
APPARATUSREQUIRED:
Hardware: Personal computer
Software : MATLAB, 5GToolbox, knowledge of 5G NR standard.
PROCEDURE:
1. Start the MATLAB 2023a
2. Open M file
3. Type the program
4. Save in the current Directory
5. Compile and Run the Program
6. If any error occurs in the program correct and run it again
7. For the output see current window/ Figure window
8. Stop the Program.
THEORY:
In 5G Networks, channel modeling involves simulating wireless communication
channel between a transmitter and receiver. This simulation accounts for various factors such
as path loss, fading, delay spread, and channel characteristics at different frequency bands
and scenarios(e.g.,urban,rural,indoor).
% 5G Channel Modeling
% Set simulation parameters
numSamples = 1000; % Number of samples
numTxAnts = 2; % Number of transmit antennas
numRxAnts = 2; % Number of receive antennas
carrierFreq = 3.5e9; % Carrier frequency in Hz (3.5 GHz)
sampRate = 15.36e6; % Sampling rate in Hz (15.36 MHz)
% Create a 5G NR channel configuration
channel = nrTDLChannel;
channel.NumTransmitAntennas = numTxAnts;
channel.NumReceiveAntennas = numRxAnts;
channel.DelayProfile = 'CDL-D';
channel.DelaySpread = 30e-9;
channel.CarrierFrequency = carrierFreq;
channel.SampleRate = sampRate;
channel.NormalizePathGains = true;
% Generate random QPSK symbols
data = randi([0, 3], numSamples, numTxAnts);
% Modulate the symbols using QPSK modulation
modulatedData = qammod(data, 4, 'UnitAveragePower', true);
% Pass the modulated signal through the channel
channelOutput = channel(modulatedData);
% Calculate the received signal power per receive antenna
rxPowerPerAntenna = sum(abs(channelOutput).^2) / numSamples;
% Display received power for each antenna
disp('Received Power per Antenna:');
disp(rxPowerPerAntenna);
% Plot the channel impulse response for the first receive antenna figure;
plot(0:numSamples-1, abs(channelOutput(:, 1)));
title('Channel Impulse Response (First Receive Antenna)');
xlabel('Sample Index');
ylabel('Magnitude');
% Plot the frequency response for the first receive antenna figure;
freqz(channelOutput(:, 1));
title('Channel Frequency Response (First Receive Antenna)');
OUTPUT:
channelmodelling
Received Power per Antenna:
1.3151 1.1736
RESULT:
The program will display channel characteristics, including delay spread, Doppler spread,
and SNR, forthe selected 5G channel model andscenario.
EXP 4 : MULTIBAND OFDM DEMODULATION
AIM:
Develop a MATLAB program for Multiband OFDM (MB-OFDM) demodulation.
APPARATUSREQUIRED:
Hardware: Personal computer
Software : MATLAB, 5GToolbox, knowledge of 5G NRstandard.
PROCEDURE:
1. Start the MATLAB 2023a
2. Open M file
3. Type the program
4. Save in the current Directory
5. Compile and Run the Program
6. If any error occurs in the program correct and run it again
7. For the output see current window/ Figure window
8. Stop the Program.
THEORY:
Single-band radio that occupies the whole allocated spectrum in favor of Multi-
band design approach Multi-banding consists in dividing the available spectrum
into several sub-bands. By interleaving symbols across different sub-bands, UWB
system can still maintain the same transmit power as if it was using the entire
bandwidth.
The main difference between the multi-band OFDM system and other narrowband
OFDM systems is the way that different sub-bands are used in the system. The
transmission is not done continually on all sub-bands. Rather, it is time
multiplexed between different bands in order to use a single hardware for
communications over different sub-bands.
OFDM system except that the carrier frequency changes from symbol to symbol
according to a sub-band hopping scheme. The convolutional code with interleaving
is used to combat multipath fading. The main idea of the MB-OFDM is that the
high rate serial data stream is converted into the N parallel low rate data stream in
order to combat the frequency selective fading prevent inter-carrier-interference
(ICI) while avoiding adopting the complex MIMO-EQ at the receiver.
MB-OFDMdemodulationinvolvesseveralkeysteps,includingsynchronization,symbol
extraction, and decoding. In this example, we will focus on the basicstepsinvolvedin
demodulatingMB-OFDMsignals.
In this code:
1. We generate random QPSK symbols for each subband and add AWGN to simulate
noisy transmission.
3. The demodulated bits are stored in the rx_bits cell array, where each element
corresponds to a subband.
4. You can further process and combine the demodulated bits from different subbands
based on your system requirements
CODING:
ofdmdemodulation
Bit Error Rate (BER): 0.50156
Number of Errors: 321
RESULT:
The program will display the demodulated and decoded data and provide
AIM:
To develop a MATLAB program for perfect channel estimation in an OFDM system
using BPSK modulation.
APPARATUSREQUIRED:
Hardware: Personal computer
software :MATLAB , 5GToolbox, knowledge of 5G NR standard.
PROCEDURE:
1. Start the MATLAB 2023a
2. Open M file
3. Type the program
4. Save in the current Directory
5. Compile and Run the Program
6. If any error occurs in the program correct and run it again
7. For the output see current window/ Figure window
8. Stop the Program.
THEORY:
Channel estimation is an important technique especially in mobile wireless
network systems where the wireless channel changes over time, usually caused by
transmitter and/or receiver being in motion at vehicular speed.
Mobile wirelesscommunication is adversely affected by the multipath interference
resulting fromreflections from surroundings, such as hills, buildings and other obstacles.
In orderto provide reliability and high data rates at the receiver, the system needs an
accurate estimate of the time-varying channel.
Furthermore, mobile wirelesssystems are one of the main technologies which used to
provide services such asdata communication, voice, and video with quality of service
(QoS) for bothmobile users and nomadic.
The knowledge of the impulse response of mobile
wireless propagation channels in the estimator is an aid in acquiring important
information for testing, designing or planning wireless communication systems.
Channel estimation is based on the training sequence of bits and which is unique
for a certain transmitter and which is repeated in every transmitted burst .The
channel estimator gives the knowledge on the channel impulse response (CIR) to
the detector and it estimates separately the CIR for each burst by exploiting
transmitted bits and corresponding received bits. Signal detectors must have
knowledge concerning the channel impulse response (CIR) of the radio link with
known transmitted sequences, which can be done by a separate channel estimator.
The modulated corrupted signal from the channel has to be undergoing the channel
estimation using LMS, MLSE, MMSE, RMS etc before the demodulation takes
place at the receiver side.
InanOFDMsystem,perfectchannelestimationinvolvesaccuratelyestimatingthefrequency
response of the channel at each subcarrier. This estimation is essential for equalization
anddemodulationatthereceiver.Typically,pilotsymbolsareinsertedintothetransmittedsignal,
andtheseknownsymbolsare used forchannel estimation.
1. Parameters like the SNR (Signal-to-Noise Ratio), number of symbols, symbol rate,
modulation order, and Eb/No (Energy per bit to Noise power spectral density ratio) are
defined.
5. Complex Gaussian noise is added to the received signal to simulate the effect of noise.
7. The bit error rate (BER) is calculated by comparing the transmitted and received data
bits.
CODING:
OUTPUT:
channelestimation
Bit Error Rate (BER): 0.48594
Number of Errors: 311
RESULT:
The program will display two plots showing the estimated channel's magnitude and
phase responses. These plots provide in sights in to the frequency-selective fading
characteristics of the channel.
EXP 6: DEVELOPMENT OF 5G NEW RADIO POLAR CODING &
DECODING
Software: MATLAB software, 5GTool box, knowledge of polar codes and the 5G NR
standard.
PROCEDURE:
1. Start the MATLAB 2023a
2. Open M file
3. Type the program
4. Save in the current Directory
5. Compile and Run the Program
6. If any error occurs in the program correct and run it again
7. For the output see current window/ Figure window
Stop the Program
THEORY:
Polar codes are error-correcting codes used in the control channels of the 5G NR standard.
Polar coding involves two main processes: encoding and decoding.
Define your Polar codes: Define the length of your codeword, code rate, and the
construction type for Polar codes. In 5G NR, various code lengths and rates are used for
different control and data channels. You can use the MATLAB Communications System
Toolbox for encoding and decoding Polar codes.
encode your message: Generate your message bits and encode them using the Polar
encoder you created.
Polar Decoder: Create a Polar decoder to decode the received bits. You can use the
comm.PolarDecoder object in MATLAB:
Simulate the Channel: Simulate the transmission through a binary symmetric channel
(BSC) or any other channel model you prefer. The channel introduces errors into the
received bits.
Decode the received bits: Decode the received bits using the Polar decoder:
Evaluate the Performance: Calculate the bit error rate (BER) or any other performance
metrics to assess the effectiveness of your Polar coding implementation.
The selection of polar codes as the channel coding technique for control channels
turbo codes, it supersedes the tail-biting convolutional codes used in LTE systems
for control channels. It is applied for downlink and uplink control information
(DCI/UCI) for the enhanced mobile broadband (eMBB) use case, as well as the
broadcast channel (BCH). Alternatively, the channel coding scheme for data
channels for eMBBis specified to be flexible LDPC for all block sizes.
3GPP has selected polar codes as the error correcting code on the 5G NR
control channels. Polar codes are unique in the way they split the channel
Consider a polar code where K information bits are being sent in a block
of N bits. Polar code encoding will polarize the channel into reliable and
reliable K bit-channels. The remaining N-K channels are unreliable are usually
POLARCODEENCODING:
% Channel
chan = comm.AWGNChannel('NoiseMethod','Variance','Variance',noiseVar);
%polor decoding
% Error meter
ber = comm.ErrorRate;
numferr = 0;
for i = 1:numFrames
% Attach CRC
msgcrc = nrCRCEncode(msg,poly);
% Polar encode
encOut = nrPolarEncode(msgcrc,E,nMax,iIL);
N = length(encOut);
% Rate match
modIn = nrRateMatchPolar(encOut,K,E,iBIL);
% Modulate
modOut = nrSymbolModulate(modIn,'QPSK');
% Rate recover
decIn = nrRateRecoverPolar(rxLLR,K,N,iBIL);
% Polar decode
decBits = nrPolarDecode(decIn,K,E,L,nMax,iIL,crcLen);
end
disp(['Block Error Rate: ' num2str(numferr/numFrames) ...
', Bit Error Rate: ' num2str(errStats(1)) ...
', at SNR = ' num2str(snrdB) ' dB'])
RESULT:
The program will display the encoded bits, received bits (with noise), decoded