Você está na página 1de 12

ELECTRICAL ENGINEERING

M.TECH THESIS STAGE-1


EE5825
Indoor Localization and Basics of GNU Radio

Name: Gautam Kumar


Roll no:EE17MTECH11025
Contents
1 Indoor Localization 2

2 GNU Radio Basics 6

3 Reference 11

1
1 Indoor Localization

i.Introduction
Indoor localization has been in demand as the GPS systems cant be used for finding
the actual distance in indoor environment.In this work we used the existing LTE
signal to find the actual position of the MS. The signal strength between LTE (user
equipment (UE)) and (eNodeB) gets affected by the span of the channel. We use
three passive nodes (PN) for two dimensional (2D) indoor localization. These PNs
determine respective distances of the (UE) by measuring incident signal power at the
PNs with which it communicates with the (eNodeB). After the respective distances
are calculated, we use these distances for trilateration ( by putting the UE at right
angles to reduce the complexity) to determine the co-ordinate of the MS.We have
used the SDR platform to find the transmit and receive the signal.

ii.System Model
We have assumed that the MS we want to locate is receiving signal from 3 base
station here although it can receive in general case from N base stations. Assuming
that we have observed the signal strength from time interval 1,2,..M we get 3*M
power values received by MS. Let di(tj) be the distance between the mobile user
MS and the BSi. The methods that we are now going to describe, estimate those
distances from the power values received. Based on those distances, we can get the
position of the MS by means of trilateration. In order to estimate the position of the
MS only from those values PRi, we need to know in which way those values depend
on the real position of the MS. Regarding a specific BS, BSi, it is clear that the power
Pri(tj ) that is being received with respect to BSi, depends on the distance di(tj)
existing between the MS and the base station BSi, in moment tj. Nevertheless, the
power received in a specific instant and place depends on many factor apart from
the distance di(tj), characteristic of the present propagation environment. That
is, the real dependence between Pri(tj ) and di(tj) is very different depending on
the propagation which is taking place between the MS and the base station BSi.
Obviously, we can not know how is this propagation between the MS and each one
of the BSs like, at each instant but, as we will see, we can determine dynamically
and only from the received power measurements, which are the propagation models
which best describe the real dependence between the received power and the distance
existing for each of the base stations.

2
Figure 1: Figure of Trilateration Algorithm

We calculate the value of alpha and path loss exponent experimentally. For the
calculation of alpha we have used the path loss exponent value 2 which is for the
free space model. Using path loss value, reference signal power received at the
reference distance we found out the scaling factor alpha. Then using the value of
alpha and the log normal shadowing equation,the distance between the MS and the
BS(i) we found out the path loss exponent (by varying it between 2.1 to 6) that was
best fitting the experimental values and the actual distance.
Now the estimated values of alpha and the path loss exponent were used to find and
test the accuracy of our proposed solution. The accuracy for the case was coming
near 10-15 cm.

3
iii.Experimental Procedures and Pseudo Codes
1. Import the libraries for python such as Numpy, Scipy and Math
2. Convert the binary file values to float values
3. Convert the binary file values to float values
4. Calculate the size of the RSSI values and store the actual RSSI values in the
array. Here α,is called the path loss exponent and log-normal shadowing effect
is reflected by ψ,
where ψ ∼ N(0, σ2) follows a Normal distribution with 0 mean and as the
standard deviation.

Equation for Log-normal Shadowing model of Indoor Channel is :


d
P ri (d) = A − 10α[log( )] − ψ (1)
d0
Derivation of UE co-ordinate in 2D :

a2 + d21 − d23 b2 + d21 − d22


(x, y) = ( , ) (2)
2a 2b
The parameter A is related to the antenna gains of the transmitter and receiver
antenna gains,transmission power and power loss at a reference distance d0.

At the reference distance d0, the power loss is determined experimentally. The pa-
rameters evaluated from the practical setup and experiment are as follows.

The path loss exponent is evaluated to be 2.4, attenuation fading is 3.92 dB and at
reference distance d0 = 1 meter, power is −20 dB.

4
Experimental Setup

iV.Results

Figure 2: Result

5
2 GNU Radio Basics

i.Software defined Radio


It turns the radio hardware problems into software problems.In this most of signal
processing is done via software by using Field-Programmable Gate Arrays (FPGA),
General Purpose Processors (GPP), or any other programmable device. The fun-
damental characteristic of SDR is that software defines the transmitted Waveforms,
and demodulates the received Waveforms. However the SDR approach is not feasible
due to following reasons
1. Latency
2. Bus Speed
3. Performance of processing Unit
4. Analog to Digital Converters
The target of this part is to understand the basics of GNU radio and USRP based
implementation of OFDM transmitter and receiver. GNU Radio is an open software
platform for building software defined radio systems. GNU Radio offers various
building blocks for signal processing, as well as a method to manipulate the data
flow between the blocks.

6
ii.GNU Architecture
GNU Radio software architecture includes two components. The first one is the
set of various C++ blocks which implement digital signal processing operations
for example filtering, I/O operations, FFT/IFT, coding/decoding, and modula-
tion/demodulation. The second one is the framework implemented as Python scripts
to control the data flow among blocks. The use of Python scripts allows easy recon-
figuration and manipulation of various functionalities and parameters of the system.
Similar to connecting physical RF building blocks to construct a hardware radio, any
user can build a SDR system by ”wiring” together building blocks. USRP boards
are general purpose RF hardware for GNU Radio architectures. The main task of
USRP boards is performing computationally intensive operations such as filtering,
up-conversion and down-conversion. The USRP is connected to a computer via
a USB 2.0 and/or an Ethernet cable, respectively, and the GNU Radio software
platform provides a robust Application Programming Interface (API) to control the
USRP device.

Generally, GNU Radio blocks operate on continuous data streams. Each block in-
cludes a set of input and/or output ports and it receives data from input port and
produce data for its output port. Special blocks called sources and sinks only input
port or output port. Each block defines the minimum and maximum number of
input and output port the block can have, as well as the data type on the corre-
sponding port.

The data rate on different input stream of a block can be different, but all output
streams must have same data rate. Both input and output streams of a block have
associated buffers. Each input/output data stream has a read/write buffer. The
block read data from the read buffers for signal processing. After processing, the
block write data streams to the appropriate write buffers of its output data streams.
GNU Radio buffers are single writer and multiple reader First In First Out (FIFO)
buffers. It means that one output data stream can connect to one or more input data
stream(s) and one input on receive data from only one output. Blocks in Python
are connected by the virtual connect function which indicates how the output data
stream(s) of a block connect to the input data stream of one or more upstream
blocks.

7
iii.GNU Radio Companion
GNU Radio Companion (GRC) is a graphical interface for GNU Radio user. GNU
Radio Companion is an open source tool based on Python/C++ to build software
radio systems. GRC allows connecting components and generating a signal flow dia-
gram by using a graphical drag-and-drop interface. Component blocks are normally
implemented in C++ and connected using the Python programming language.

iv.USRP and resources used


The Universal Software Radio Peripheral is the most common hardware used with
GNU Radio to build a SDR system. USRP is a family of hardware devices found
by Matt Ettus which facilitate making SDRs. It is composed of two main sub de-
vices, a motherboard and various daughterboards which can convey and/or receive
in different frequency ranges from 0 to 5.9GHz. The daughterboard can easily be
exchanged. This allows USRP to work at various frequencies.

Apart from the digital down-conversion the FPGA does not perform any advanced
digital signal processing, such as modulation, demodulation and coding. The pri-
mary objective of USRP motherboards is to convert analogue IF signals to digital
baseband signals and vice versa (RF-IF conversion is done on the daughterboard.
The bandwidth of the IF signal processed by the motherboard depends on the daugh-
terboard specifications currently (40 MHZ).

The computational resources available in this project include two USRP2 devices,
one Core i7 desktop computer and one Core i5 laptop computer.One pair of the
computers and USRP2 devices is used as a transmitter, while other pair is used as
a receiver.

GNU Radio platform provides a quantity of software modules dedicated to build the
OFDM modulation and demodulation. An OFDM application example has been
offered in the GNU Radio’s example directory which includes the benchmark-tx.py,
benchmark-rx.py and optional benchmark-add-channel.py files.

8
v.Implementation of OFDM Modulator
The transmission flowgraph is shown in Figures below. We convert a stream of digital
data into packets and append ’headers/tags’ to these packets for identification. This
is followed by converting the data into a constellation scheme as shown . Further
processing to convert it into OFDM signal to transmit through the channel is done.
A group of channel-coded bits are gathered together (1 for BPSK, 2 for QPSK, 4
for 16-QAM, etc.) and mapped to corresponding constellation points. At this stage,
the data are represented as complex numbers and they are in serial. Known pilot
symbols mapped with known mapping schemes can be inserted at this moment. A
serial to parallel conversion is then applied and IFFT operation is performed on
the obatined parallel complex data. The output data of this operation are grouped
together again, as per the number of required transmission subcarriers. Cyclic prefix
is inserted in every block of data according to the system specification and the data
are multiplexed in a serial fashion. At this stage, the data are OFDM modulated and
ready to be transmitted. A USRP is used to transform the time-domain digital data,
up-convert it to transmission frequency and to send it across a wireless channel.

Figure 3: Mapping the data in packets for transmission

Figure 4: Implementing OFDM and transmission

9
vi.Implementation of OFDM De-Modulator
After receiving the signal, the receiver USRP down-converts the signal and converts
it to digital domain. While down-converting the received signal, carrier frequency
synchronization is performed. After this conversion, symbol timing synchronization
is achieved. An FFT block is then used to demodulate the OFDM signal. After
that, channel estimation is performed using the demodulated pilots. Using the esti-
mations, the complex data are obtained which are demapped according to the trans-
mission constellation diagram. The demodulator structure includes two main parts.
corresponding to two blocks ofdm-receiver and ofdm-frame-sink which are defined in
the python file ofdm.py. The first block ofdm-receiver performs the synchronization
and equalization of the CRC signal, while the second block ofdm-frame-sink, is a
state machine that demaps the symbols into bits, verifies the validity of the synchro-
nized frames and sends the verified frames to a topmost layer by adding them to
the queue of received data packets. The ofdm-receiver module includes a number of
modules, such as low pass channel filter, time and frequency synchronisation, FFT
and frame acquisition. The first block of the receiver is a simple Fourier filter, which
filters the signal received from the receive antenna. It takes the bandwidth at its
output corresponding to the bandwidth of occupied tones containing actual data.
The number of occupied tones is usually less than the FFT size. In our verification,
40 subcarriers were used to carry the actual data, while the FFT size is 64. Once
the signal has been filtered, it is fed into the synchronization block implemented in
python file. This synchronization block finds the right frequency offset and the start
of the received frames. The frequency offset is fed to the frequency modulator to
generate a signal proportional to the frequency error of the synchronisation block.
The signal from the channel filter block is mixed with the signal coming from the
frequency modulator to rotate the signal from the filter back. The synchronized
signal in the form of vectors of the FFT size is fed to the FFT module that transfers
the received signal into the frequency domain. The output signal includes data sub-
carriers. Each subcarrier contains information in its phase according to the digital
modulation applied to that subcarrier. In our experiments, all data subcarriers are
modulated with either BPSK or QPSK modulation. The last module of the ofdm-
receiver is the frame acquisition module which takes care of finding the beginning
of frames and equalizing each subcarrier.

10
Figure 5: Reception and equalization through frames

Figure 6: Fetching data back after demodulation

3 Reference
1. GNU Radio Manual
2. Dynamic Estimation of Optimum Path Loss Model in a RSS Positioning Sys-
tem
3. Indoor Localization System Using Commensal Radar principle

11

Você também pode gostar