Professional Documents
Culture Documents
2.1 PN Sequences: This Part Is Adapted From
2.1 PN Sequences: This Part Is Adapted From
1 Aim 1
2 Introduction 1
2.1 PN sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2.2 Use of PN sequence in channel estimation . . . . . . . . . . . . . 2
3 Approach to the problem 3
3.1 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.2 Specications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.3 The Actual channel ( lab environment) . . . . . . . . . . . . . . . 4
3.3.1 Measurements . . . . . . . . . . . . . . . . . . . . . . . . 5
3.3.2 Power Delay Prole . . . . . . . . . . . . . . . . . . . . . 6
4 Plots 7
4.1 Channel impulse response . . . . . . . . . . . . . . . . . . . . . . 7
4.2 Power delay proles . . . . . . . . . . . . . . . . . . . . . . . . . 13
5 Calculations 16
5.1 Denitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.2 Calculations for channel 3 . . . . . . . . . . . . . . . . . . . . . . 17
5.3 Calculations for channel 4 . . . . . . . . . . . . . . . . . . . . . . 17
6 Matlab Code 18
7 Acknowledgements 18
1 Aim
The aim of this project is to obtain as estimate of the channel using PN se-
quences.
2 Introduction
2.1 PN sequences
The most widely known binary PN sequences are the maximum-length-shift-
register sequences1 . It has a length of n = 2m − 1bits and is generated by using
m-stage shift register with linear feedback as shown in the gure 1.
1 This part is adapted from [1]
1
Figure 1 : n-stage shift register with feedback2
The chip period ,TC , is the duration of the code bits, usually referred to
as chips. The reciprocal, T1c , is the chip rate. The m-sequences have roughly
same number of ones and zeros, 2m−1 and 2m−1 − 1 respectively. The sequence
repeats every nTc seconds. The important property of the PN sequences that
makes them useful is the autocorrelation function. Ideally the autocorrelation
function should be R(0) = n and R(j) = 0 for 1 ≤ j ≤ n − 1. This is true for a
large n. But this is approximated by:
(
n+1
1− nTc |τ | ≤ Tc
R(τ ) =
− n1 o.w
We can clearly see that for large n this approaches the ideal case.
2
3 Approach to the problem
To estimate the channel, we used gnu-radio-companion (GRC) and USRP. We
generated the PN sequences using the GLFSRC block in GRC.
3.1 Simulation
As a rst step to understand the whole process we simulated the whole process
of channel estimation in GRC using the setup shown in Figure 2.
3
Figure 3. Impule response of the simulated channel.
3.2 Specications
The following specications were used in the project:
Block Specications
GLFSRC Degree=6 Mask=0 Seed=1
USRP Sink Interpolation = 400 Frequency =900M Hz Gain = 20dB
USRP Source Decimation = 200 Frequency = 900M Hz 4
PN Correlator Degree =6 Mask = 0 Seed = 1
Sampling Frequency 32000Hz
The degree of the PN sequence used is 6, so the number of bits is 26 −1 = 63. The
duration of one period of the sequence is ≈2m sec. Therefore nTc = 2 × 10−3 ,
Tc = 31.7µ sec. We tried to increase the degree of the PN sequence to 10 but
the plots using scope sink was showing nothing. This may be because the data
to be processed was too high and grc was hanged. We used 7 as the degree
as well but there was no noticeable change in the channel impulse response.
So we continued with degree 6 for the entire project, because the data is less
and can be easily handled. Because the PN sequece is being generated using
the libraries (software), the variable seed is used to initialize the pseudorandom
number generator.
4
Figure 4: Transmitter setup.
3.3.1 Measurements
The mesurements were taken by
• keeping the receiver at dierent stations in the laboratory.
5
• trying to block the LOS path with a metal.
• trying to move the receiver ( to observe the eect of Doppler shift ) .
• changing the frequency of the USRP source at the receiver to 896M Hz
(there is no synchronization between the transmitter and receiver carriers).
• using the synchronized boards.
The receiver were was placed at dierent locations in the laboratory (at dierent
computer stations), and tried to nd dierences in the channel change with
respect to the distance. However because the distance was not considerably
dierent there was not much dierence in the channel measured.
We then blocked the LOS path between the transmitter and the receiver
with a metal. When this was done the amplitude of the peaks fell, as expected.
There was no LOS peak in the output.
Then we moved the receiver to observe the doppler eect. But there was
no change in the channel response. This may be due to the fact that the speed
with which the receiver was moved was very slow to notice the doppler eect.
Then we changed the frequency at the receiver. The carrier at the USRP
source in the reeiver was changed to 896M Hz . It was observed that the signal
obtained and viewed in scope sink was completely distorted. This shows the
need for synchronization.
We then used the synchronized boards and observed the eect. This time
the channel response was dominated completely by LOS. This is because the
receiver and transmitter are so close ( because of hardwired synchronization )
that the other components are barely visible.
This is the average output power of the channel in the duration ∆t with
τ = τ1 = τ2 .
The autocorrelation function with 4t = 0 is power delay prole Ah (τ ; 0).
As can be seen, this gives us the power associated with the multipaths. In our
project, because we have already collected the data, we took the average of the
squares of the magnitude of the channel response, i.e.,
|h(τ )|2
,
P
P (τ ) = N
where P (τ ), is the power delay prole, h(τ ) is the channel response in each
period, and N is the number of periods.
5 Adapted from [2], this is true for WSS channels with uncorrelated scattering.
6
4 Plots
The following are the plots obtained :
Figure 6: The impuse response of channel when the receiver is placed at the
computer station 2.
Figure 7a shows the impulse response of the channel when the receiver is
placed at the computer station 3.
7
Figure 7a: The impuse response of the channel when the receiver is placed at
the computer station 3.
Here we can observe some multipaths.
We then blocked the LOS path using a metal object. The following plot
shows the corresponding plot at station 3. As expected the peak which was due
to the LOS dies down.
8
Figure 7b: The channel response with LOS blocked.
Figure 8: shows the channel impuse response when the receiver is placed at
the station 4.
9
Figure 8
We also connected coax-cable and collected the data. The following plot
shows the data when a coax-cable was used.
10
Figure 9: Transmitter and receiver were connected using a coax-cable.
We changed the frequency of the USRP source to 896M Hz . The following
gure shows the eect of no synchronization. We can clearly see the eect of
frequency mismatch. The impulse response is not same as any of the other plots.
Hence the need for carrier synchronization.
11
Figure 10: No synchronozation between transmitter and receiver.
We used the synchronized boards. The following is the impuse response
obtained using the synchronized boards.
12
Figure 11: impulse response obtained using the synchronized boards.
13
Figure 12: The power delay prole of channel 2 (in gure 6)
As can be seen there are no multipaths which is expected because the trans-
mitter and receiver were placed almost next to each other. So the LOS peak is
so large that the power in the multipaths becomes relative very small. There
can also be another reason. The USRP boards transmit using very low power.
Therefore there is a possiblity that the multipaths get attenuated.
14
Figure 13: The power delay prole of the channel 3 ( corresponding to gure
7a )
There are multipaths seen here. Using this plot the mean excess delay, τ
and R.M.S delay spread, στ have been calculated in the next section.
15
Figure 14: The power delay prole of channel 4 ( corresponding to the channel
in gure 8 )
On comparision of gures 13&14, we can see that the delay has increased in
gure 14. This can be due to the distance increased. But I'm not sure if such a
small change in the distance will have so much eect in moving the rst delayed
peak from 0.2m sec to 0.7m sec.
5 Calculations
5.1 Denitions6
The mean excess delay (τ ): This is the rst moment of the power delay prole
(PDF) , given by
P
τ= PP (τk )τk
P (τk )
6 From [3]
16
The R.M.S delay spread (στ ) is dened as
p
στ = τ2 − τ2
2
where τ 2 = .
P
PP (τk )τk
P (τk )
Coherence bandwidth (Bc ) : The range of frequencies over which the channel
can be considered at. Here we consider the 50% coherence bandwidth which
is given by 7
Bc = 1
5στ .
Using the power delay proles obtained ( gures 12-14 ), and assuming that
the large peaks other than the LOS were due to multipath and not due to noise
the following calculations were made. If we look at the gure 8 we notice three
peaks of almost same height. One peak corresponds to LOS. The other 2 are
almost the same height as the LOS peak. So I could not tell by looking at the
plots if large peaks other than LOS were multiple paths or only noise.
If the channel has no multipaths then the power delay prole has only one
peak corresponding to LOS. The channel in gure 6, has a delay prole shown
in gure 12 has almost no peaks other than the LOS. Therefore τ ≈ 0.
17
6 Matlab Code
close all;
clear all;
clc
data_length=200;
d=fopen('Trial3ab.dat');
data=fread(d,data_length,'oat32');
gure(1)
w=0:31.7*10^(-6):data_length*31.7*10^(-6)-31.7*10^(-6);
plot(w,data)
a=62; % collect the rst peak LOS s=zeros(63,1);
for i=1:100
x = data(a :(a+62));
s(1:63)=s(1:63) + x.*x; x=0;
end
q=0:3.17*10^(-5):(2*10^(-3)-3.17*10^(-5));
s=s/100;
gure(2)
plot(q,s)
7 Acknowledgements
I express my sincere gratitude to Professor Birsen Sirkeci for guiding us through
out the semester. I thank all my friends for helping me during the course of the
project. I thank my lab and project partner, Rishi, for helping me in the labs
and in the project.
References
[1] John G. Proakis, Digital communications 5th edition, McGrah-Hill publica-
tions.
[2] Andrea Goldsmith, Wireless Communication, Cambridge university press.
[3] Theodore S. Rappaport, Wireless Communications Principles and Practice
2nd edition, Prentice-Hall India.
18