0% found this document useful (0 votes)
58 views18 pages

5g Architecture Report

Uploaded by

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

5g Architecture Report

Uploaded by

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

Project Based Learning Report

on

Antenna Frequency Design using Keras Framework

Submitted in the partial fulfillment of the requirements


For the Project based learning in 5G Architecture
in
Electronics & Communication Engineering

By

2014111039 Tanmay Dikshit


2014111049 Unnati Gupta
2014111057 Kumar Kartik

Under the guidance of Course In-charge

Prof. S.V. Dhole

Department of Electronics & Communication Engineering

BharatiVidyapeeth
(Deemed to be University)
College of Engineering,
Pune – 4110043

Academic Year: 2023-24

1
Bharati Vidyapeeth
(Deemed to be University)
College of Engineering,
Pune – 411043

DEPARTMENT OF ELECTRONICS &


COMMUNICATION ENGINEERING

CERTIFICATE

Certified that the Project Based Learning report entitled, “Antenna Frequency
Design using Keras Framework” is work done by

2014111039 Tanmay Dikshit


2014111049 Unnati Gupta
2014111057 Kumar Kartik

in partial fulfillment of the requirements for the award of credits for Project Based
Learning (PBL) in 5G Architecture Bachelor of Technology Semester VIII, in
Electronics and Communication Engineering.

Date:

Prof. S.V. Dhole Dr. Arundhati A.Shinde

Course In-charge Professor & Head

2
INDEX

CONTENTS PAGE NO.

Description of the Project 4-9

Solutions Code and Output 10-15

Result and Analysis 16

Conclusion and Course Outcome 16

3
Antenna Frequency Design using Keras Framework

Introduction to MIMO Antenna

MIMO (multiple-input and multiple-output) antennas are a technology that improve


the performance of wireless communication systems.
MIMO uses multiple antennas to handle multiple signal paths simultaneously.
With multiple transmitters and receivers (often referred to as 'elements'), MIMO
enables devices to send and receive data faster than a single antenna can.

Here’s a simple analogy: think of a MIMO antenna as a team of workers.

Instead of having one worker (or antenna element) take on all the tasks (or data
transmission), a MIMO antenna employs multiple workers (elements) to divide and
conquer the tasks. This team approach results in a much more efficient process,
enabling faster data transmission and improved signal quality.

MIMO is a key component of modern wireless technologies such as 4G LTE, 5G NR,


WiFi 5, 6, and 6E.

MIMO vs. Single Antenna: What's the Difference and Which to Choose?

Once you start exploring antenna options, you'll likely come across both MIMO
antennas and single, or SISO (Single Input, Single Output), antennas.

So, what's the difference, and how do you know which one you need? Let's break it
down.

4
The Difference

As we've mentioned earlier, MIMO antennas use multiple elements to send and receive
data at the same time. This capability allows for increased data rates and better signal
quality, especially in environments where there might be interference or weak signal
strength.

On the other hand, a SISO antenna has just one transmitter and one receiver. It can
only send or receive data one at a time, which can limit the speed and reliability of
your wireless connection, especially in situations where there's a lot of data being
transmitted.

How much faster is MIMO than SISO?

The exact number varies depending on the signal but, going from SISO to 2x2 MIMO
adds about a 30% increase in connection speeds. You get a similar bump going from
2x2 to 4x4, so a 4x4 antenna can get you 70% faster data rates than a SISO antenna.

This benefit exists even if the cell tower (or wifi router) is congested. A MIMO
antenna allows more data to be sent over the same spectrum resources.

How should I decide between getting a SISO, 2x2, or 4x4 MIMO antenna?

The choice between SISO, 2x2, and 4x4 MIMO antennas really depends on your
device.

If you have a device that supports 4x4 MIMO, it’s best to use a 4x4 antenna. Same
with 2x2 or SISO.

Why not use a 2x2 antenna with a 4x4 device?

We don’t recommend doing this because when using a 2x2 antenna with a 4x4 device,
you need to decide which two ports to connect to the antenna. And critically: not all
5
ports broadcast all the same frequencies.

For example, even the latest 5G devices will only use 2x1 or 2x2 on low frequency
cellular bands (like 600 MHz n71 or 700 MHz band 12/13). But the same device will
use 4x4 on mid-bands (like 2500 MHz n41 or 3500 MHz n78). So different
frequencies will come on different ports, so if you use a SISO antenna or a 2x2 antenna
with a 4x4 device, some bands may not broadcast at all! You need to match the
antenna to the device you have.

If you've got two antenna ports, then you need something like our 2x2 MIMO Antenna
Kit, while if you're working with four external antenna ports, it's usually best to go
with a 4x4 MIMO Antenna kit.

Introduction to Keras Framework :

Deep learning is one of the major subfield of machine learning framework. Machine learning is the
study of design of algorithms, inspired from the model of human brain. Deep learning is becoming
more popular in data science fields like robotics, artificial intelligence(AI), audio & video recognition
and image recognition. Artificial neural network is the core of deep learning methodologies. Deep
learning is supported by various libraries such as Theano, TensorFlow, Caffe, Mxnet etc., Keras is
one of the most powerful and easy to use python library, which is built on top of popular deep
learning libraries like TensorFlow, Theano, etc., for creating deep learning models.

Overview of Keras
Keras runs on top of open source machine libraries like TensorFlow, Theano or Cognitive Toolkit
(CNTK). Theano is a python library used for fast numerical computation tasks. TensorFlow is the
most famous symbolic math library used for creating neural networks and deep learning models.
TensorFlow is very flexible and the primary benefit is distributed computing. CNTK is deep learning
framework developed by Microsoft. It uses libraries such as Python, C#, C++ or standalone machine
learning toolkits. Theano and TensorFlow are very powerful libraries but difficult to understand for
creating neural networks.

6
Keras is based on minimal structure that provides a clean and easy way to create deep learning
models based on TensorFlow or Theano. Keras is designed to quickly define deep learning models.
Well, Keras is an optimal choice for deep learning applications.

Features
Keras leverages various optimization techniques to make high level neural network API easier and
more performant. It supports the following features −

Consistent, simple and extensible API.

Minimal structure - easy to achieve the result without any frills.

It supports multiple platforms and backends.

It is user friendly framework which runs on both CPU and GPU.

Highly scalability of computation.

Benefits
Keras is highly powerful and dynamic framework and comes up with the following advantages −

Larger community support.

Easy to test.

Keras neural networks are written in Python which makes things simpler.

Keras supports both convolution and recurrent networks.

Deep learning models are discrete components, so that, you can combine into many ways.

Keras backend Configuration :

TensorFlow

TensorFlow is an open source machine learning library used for numerical computational tasks
developed by Google. Keras is a high level API built on top of TensorFlow or Theano. We know
already how to install TensorFlow using pip.

If it is not installed, you can install using the below command −

pip install TensorFlow


7
Once we execute keras, we could see the configuration file is located at your home directory inside
and go to .keras/keras.json.

keras.json
{
"image_data_format": "channels_last",
"epsilon": 1e-07, "floatx": "float32", "backend": "tensorflow"
}

Here,

image_data_format represent the data format.

epsilon represents numeric constant. It is used to avoid DivideByZero error.

floatx represent the default data type float32. You can also change it
to float16 or float64 using set_floatx() method.

image_data_format represent the data format.

Suppose, if the file is not created then move to the location and create using the below steps −

> cd home
> mkdir .keras
> vi keras.json

Remember, you should specify .keras as its folder name and add the above configuration inside
keras.json file. We can perform some pre-defined operations to know backend functions.

Theano
Theano is an open source deep learning library that allows you to evaluate multi-dimensional arrays
effectively. We can easily install using the below command −

pip install theano

By default, keras uses TensorFlow backend. If you want to change backend configuration from
TensorFlow to Theano, just change the backend = theano in keras.json file. It is described below −

keras.json
{
"image_data_format": "channels_last",
"epsilon": 1e-07,
"floatx": "float32",
"backend": "theano"
}

Now save your file, restart your terminal and start keras, your backend will be changed.
8
>>> import keras as k
using theano backend.

Available modules :

Let us first see the list of modules available in the Keras.

Initializers − Provides a list of initializers function. We can learn it in details in Keras layer
chapter. during model creation phase of machine learning.

Regularizers − Provides a list of regularizers function. We can learn it in details in Keras


Layers chapter.

Constraints − Provides a list of constraints function. We can learn it in details in Keras


Layers chapter.

Activations − Provides a list of activator function. We can learn it in details in Keras


Layers chapter.

Losses − Provides a list of loss function. We can learn it in details in Model Training chapter.

Metrics − Provides a list of metrics function. We can learn it in details in Model


Training chapter.

Optimizers − Provides a list of optimizer function. We can learn it in details in Model


Training chapter.

Callback − Provides a list of callback function. We can use it during the training process to
print the intermediate data as well as to stop the training itself (EarlyStopping method) based
on some condition.

Text processing − Provides functions to convert text into NumPy array suitable for machine
learning. We can use it in data preparation phase of machine learning.

Image processing − Provides functions to convert images into NumPy array suitable for
machine learning. We can use it in data preparation phase of machine learning.

Sequence processing − Provides functions to generate time based data from the given input
data. We can use it in data preparation phase of machine learning.

9
SOLUTIONS:

CODE and OUTPUTS:

Antenna Configurations:

# tf.function with jit_compile=True.


# See https://nvlabs.github.io/sionna/api/config.html#sionna.Config.xla_compat
sionna.config.xla_compat=True

class Model(tf.keras.Model):
"""Simulate OFDM MIMO transmissions over a 3GPP 38.901 model.
"""
def __init__(self, scenario, perfect_csi):
super().__init__()
self._scenario = scenario
self._perfect_csi = perfect_csi

# Internally set parameters


self._carrier_frequency = 3.5e9
self._fft_size = 128
self._subcarrier_spacing = 30e3
self._num_ofdm_symbols = 14
self._cyclic_prefix_length = 20
self._pilot_ofdm_symbol_indices = [2, 11]
self._num_bs_ant = 8
self._num_ut = 4
self._num_ut_ant = 1
self._num_bits_per_symbol = 2
self._coderate = 0.5

# Create an RX-TX association matrix


# rx_tx_association[i,j]=1 means that receiver i gets at least one stream
# from transmitter j. Depending on the transmission direction (uplink or downlink),
# the role of UT and BS can change.
bs_ut_association = np.zeros([1, self._num_ut])
bs_ut_association[0, :] = 1
self._rx_tx_association = bs_ut_association
self._num_tx = self._num_ut
self._num_streams_per_tx = self._num_ut_ant

# Setup an OFDM Resource Grid


self._rg = ResourceGrid(num_ofdm_symbols=self._num_ofdm_symbols,
fft_size=self._fft_size,
subcarrier_spacing=self._subcarrier_spacing,
10
num_tx=self._num_tx,
num_streams_per_tx=self._num_streams_per_tx,
cyclic_prefix_length=self._cyclic_prefix_length,
pilot_pattern="kronecker",
pilot_ofdm_symbol_indices=self._pilot_ofdm_symbol_indices)

# Setup StreamManagement
self._sm = StreamManagement(self._rx_tx_association, self._num_streams_per_tx)

# Configure antenna arrays


self._ut_array = AntennaArray(
num_rows=1,
num_cols=1,
polarization="single",
polarization_type="V",
antenna_pattern="omni",
carrier_frequency=self._carrier_frequency)

self._bs_array = AntennaArray(num_rows=1,
num_cols=int(self._num_bs_ant/2),
polarization="dual",
polarization_type="cross",
antenna_pattern="38.901",
carrier_frequency=self._carrier_frequency)

# Configure the channel model


if self._scenario == "umi":
self._channel_model = UMi(carrier_frequency=self._carrier_frequency,
o2i_model="low",
ut_array=self._ut_array,
bs_array=self._bs_array,
direction="uplink",
enable_pathloss=False,
enable_shadow_fading=False)
elif self._scenario == "uma":
self._channel_model = UMa(carrier_frequency=self._carrier_frequency,
o2i_model="low",
ut_array=self._ut_array,
bs_array=self._bs_array,
direction="uplink",
enable_pathloss=False,
enable_shadow_fading=False)
elif self._scenario == "rma":
self._channel_model = RMa(carrier_frequency=self._carrier_frequency,
ut_array=self._ut_array,
bs_array=self._bs_array,
direction="uplink",
enable_pathloss=False,
11
enable_shadow_fading=False)

# Instantiate other building blocks


self._binary_source = BinarySource()
self._qam_source = QAMSource(self._num_bits_per_symbol)

self._n = int(self._rg.num_data_symbols*self._num_bits_per_symbol) # Number of coded bits


self._k = int(self._n*self._coderate) # Number of information bits
self._encoder = LDPC5GEncoder(self._k, self._n)
self._decoder = LDPC5GDecoder(self._encoder)
self._mapper = Mapper("qam", self._num_bits_per_symbol)
self._rg_mapper = ResourceGridMapper(self._rg)

self._ofdm_channel = OFDMChannel(self._channel_model, self._rg, add_awgn=True,


normalize_channel=True, return_channel=True)

self._remove_nulled_subcarriers = RemoveNulledSubcarriers(self._rg)
self._ls_est = LSChannelEstimator(self._rg, interpolation_type="nn")
self._lmmse_equ = LMMSEEqualizer(self._rg, self._sm)
self._demapper = Demapper("app", "qam", self._num_bits_per_symbol)

def new_topology(self, batch_size):


"""Set new topology"""
topology = gen_topology(batch_size,
self._num_ut,
self._scenario,
min_ut_velocity=0.0,
max_ut_velocity=0.0)

self._channel_model.set_topology(*topology)

@tf.function(jit_compile=True)
def call(self, batch_size, ebno_db):
self.new_topology(batch_size)
no = ebnodb2no(ebno_db, self._num_bits_per_symbol, self._coderate, self._rg)
b = self._binary_source([batch_size, self._num_tx, self._num_streams_per_tx, self._k])
c = self._encoder(b)
x = self._mapper(c)
x_rg = self._rg_mapper(x)
y, h = self._ofdm_channel([x_rg, no])
if self._perfect_csi:
h_hat = self._remove_nulled_subcarriers(h)
err_var = 0.0
else:
h_hat, err_var = self._ls_est ([y, no])
x_hat, no_eff = self._lmmse_equ([y, h_hat, err_var, no])
llr = self._demapper([x_hat, no_eff])
b_hat = self._decoder(llr)
12
return b, b_hat

SIMS Append and Training :

SIMS = {
"ebno_db" : list(np.arange(-5, 16, 1.0)),
"scenario" : ["umi", "uma", "rma"],
"perfect_csi" : [True, False],
"ber" : [],
"bler" : [],
"duration" : None
}

start = time.time()

for scenario in SIMS["scenario"]:


for perfect_csi in SIMS["perfect_csi"]:

model = Model(scenario=scenario,
perfect_csi=perfect_csi)

ber, bler = sim_ber(model,


SIMS["ebno_db"],
batch_size=128,
max_mc_iter=1000,
num_target_block_errors=1000)

SIMS["ber"].append(list(ber.numpy()))
SIMS["bler"].append(list(bler.numpy()))

SIMS["duration"] = time.time() - start

Loading Uplink Graphs :

plt.figure()
plt.xlabel(r"$E_b/N_0$ (dB)")
plt.ylabel("BLER")
plt.grid(which="both")

i=0
legend = []
for scenario in SIMS["scenario"]:
13
for perfect_csi in SIMS["perfect_csi"]:
if scenario=="umi":
r = "r"
t = "UMi"
elif scenario=="uma":
r = "b"
t = "UMa"
else:
r = "g"
t = "RMa"
if perfect_csi:
r += "-"
else:
r += "--"

plt.semilogy(SIMS["ebno_db"], SIMS["bler"][i], r);


s = "{} - {} CSI".format(t,"perf." if perfect_csi else "imperf.")

legend.append(s)
i += 1
plt.legend(legend)
plt.ylim([1e-3, 1])
plt.title("Multiuser 4x8 MIMO Uplink over Different 3GPP 38.901 Models");

14
Solutions :

15
16
17
RESULT AND ANALYSIS:

In this project, we have performed simulation of Antenna Frequency Design using


Keras Framework.

We have written the code in Python programming languages and with the help of
various libraries we have also plotted the graphs. We have plotted the Frequency
based training using Keras framework and Uplink/Downlink graphical SIMO using
Matplotlib.

CONCLUSION AND COURSE OUTCOME:

Our simulations as quite accurate and clear. They help determine and plotting
of various important factors related to MIMO Antenna Designing.

Hence, the project was performed successfully based on the CO-4(Implement


the 5G wireless propagation channel models and MIMO).

18

You might also like