Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Contents

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.2 Use of PN sequence in channel estimation


Because the autocorrelation function of the PN sequences can be approximated
as a unit impulse, the power spectral density (PSD), can be considered at
|S(f )|2 = Ps 3 . If , r(t) is the received signal, s(t) be the transmitted signal, and
h(t) the channel impulse response, then r(t) = s(t) ? h(t), where ? denotes the
convolution operator. The channel can be estimated as
ĥ(t) = 1
P s r(t) ? s(−t),
which in frequency domain is given by
1 ∗
Ĥ(f ) = P s R(f )S (f )

This reduces to H(f ).


2 gure adapted from [2]
3 adapted from the explaination in the problem

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.

Figure 2: The setup used for simulation.


We simulated a channel with 3 delay blocks and AWGN (generated using
the Noise source block in GRC). The PN correlator was used at the receiver
side, the output of which is the channel impulse response. So using the above
setup we would expect a Line-Of-Sight path and 3 delayed paths (so 4 peaks)
{The delayed signals can be thought as multipath signals}. This was conrmed
by the result obtained as shown in Figure 3.

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.

3.3 The Actual channel ( lab environment)


We used the setup shown in the Figures 4 and 5 to estimate the channel inside
the laboratory.

4
Figure 4: Transmitter setup.

Figure 5: The receiver 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.

3.3.2 Power Delay Prole


If h(τ ; t) is the time-varying impulse response of the channel, then the autocor-
relation function, Ah (τ ; ∆t) is given as
Ah (τ, ∆t) = E{h∗ (τ1 ; t)h(τ2 ; t + ∆t)}5

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 :

4.1 Channel impulse response


The impulse response of the channel when the receiver was placed at the com-
puter station 2 in the laboratory is shown in gure 6.

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.

4.2 Power delay proles


The power delay proles for the channels corresponding to gures 6, 7a, and 8
has been obtained using the method described in section 3.3.2. Figures 12 − 14
show the power delay proles obtained.

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.

5.2 Calculations for channel 3


The peaks (in gure 13) greater than 0.6 × 104 are considered as multiple paths
( for simpicity ).
τ0 = 0, τ1 = 0.2msec, τ2 = 0.37msec, τ3 = 0.69msec. We get τ = .188m
sec, τ 2 = 0.9404m sec, and στ = 0.2422m sec. The 50% coherenc bandwidth
Bc = 825.763Hz . Usually, the rms delay values are in the order of microseconds
in the outdoor channels and of the order of nanoseconds in the indoor channels8 ,
but the values are not conrming to this. I think this may be because the peaks
seen in the plots are not the actual multipath signals but are due to the noise.
But because they showed such large peak I considered them as multipath signals.
If these are not multipaths and only noise then the Bc = ∞, (since στ = 0) i.e.
the channel is at over the entire bandwidth.

5.3 Calculations for channel 4


The peak threshold is taken as 2 × 104 (gure 14). We get τ = 0.4375m sec,
στ = 0.585m sec, and Bc = 341.88Hz . Again the same case as in sections 5.2.
The values are not matching with what is expected in theory. If these are only
noise components then the Bc = ∞.
7 from [3]
8 From [3]

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

You might also like