You are on page 1of 102

To our parents, professors and all Who care about us

Acknowledgment
First of all we thank ALLAH for teaching us to love each other and to co-operate in the development of the project. We wish to express our deep gratitude to Dr. Ahmed sultan (Our supervisor) for his great support and for teaching us to be self motivated. As always, the completion of a project would not be possible without the support of many people. We would like to thank Walid Abd El-kader, Asser Osama and Moustafa Shama from Computer Science Department who helped us with C Coding. Also, we would like to thank Texas Instruments for their technical and financial support.

Team Members

Ahmed Hosny El-Samadony samadony86@yahoo.com 010-2772643 Bassem Salah Mohammed bassem_salah80@yahoo.co 011-4583927 Mohammed Amir Mohammed amirmesr@gmail.com 010-7189710 Mohammed Mokhtar Gaber m_mokhtar1986@yahoo.com 012-4259823 Mostafa Anwar Sef eldien moustafa.anwar@yahoo.com 010-1254453 Mostafa El-Sayed El-Ashry ashry_eng@yahoo.com 010-7715294 Ramy Elarabi Mohamed r.elarabi@yahoo.com 018-3276205 Sherif Samir Hassan sherif_s.hassan@yahoo.com 012-7120033

Contents Dimensioning:
Chapter 1: Blocking in multiservice systems(7)

Chapter 2: Kaufman-Roberts Technique...(13)

Chapter3: Uplink capacity calculation(18) 3.1. UMTS uplink...(25) 3.2. The problem with Iother.................................................................(26) 3.3. Uplink calculations flowcharts(32) 3.3.1. Beta generation(32) 3.3.2. Kaufman-Roberts(33) 3.3.3. Iother cdf estimator.(34)

Chapter 4: Capacity Calculation for the Downlink..(35) 4.1. Calculation of beta Matrix...(38) 4.2. The aftermath of beta calculation(40) 4.3. Downlink flowcharts...(43) 4.3.1. Beta generation(43) 4.3.2. Ptot,y cdf estimator(44)

Chapter 5: Uplink Coverage(45) 5.1. Detailed explanation of link budget terms..(46) 5.1.1. Maximum Path loss.(46) 5.1.2. Power of User Equipment...(46) 5.1.3. RBS Sensitivity...(47) 5.1.4. Interference Margin (Rise over Thermal)(48) 5.1.5. Log-normal Fading..(48) 5.1.6. Handover Gain.(49) 5.1.7. Body Loss(50) 5.1.8. Building Penetration Losses(50)
4

5.1.9. Car Penetration Losses(50) 5.1.10. Transmit Antenna Gain.(51) 5.1.11. Cable and Connector Loss.(51) 5.2. Propagation Model...(51) 5.2.1 Okumura-Hata Model(51) 5.3. Uplink Balancing(54)

Physical Layer:
Chapter 1: WCDMA Physical layer implementation..(57) 1.1. Introduction ...(57) 1.2. Downlink Transmitter....(57) 1.3. Downlink Receiver.(60) 1.3.1. Received Signal...(60) 1.3.2. Demodulation......(60) 1.3.3. Path Searcher...(61) 1.3.3.1. Multipath..(61) 1.3.3.2. Path Searcher Construction and Analysis.(63) 1.3.3.3. path searching algorithm......(69) 1.3.3.4. False Alarm and Detection Probabilities..(70) 1.3.3.5. Averaging.(73) 1.3.4. Rake Receiver.(77) 1.3.4.1. Channel Estimator(77) 1.3.4.2. Summing over N chips.(79) 1.3.4.3. Decision Level & Probability of Error.(80) 1.3.4.4. Maximal Ratio Combining (MRC)..(83) Chapter 2: Forward Error Correction (FEC)(83) 2.1. Introduction .. (83) 2.2. Convolutional codes . (86) 2.3. Viterbi Algorithm for detection (90) 2.4. Coding gain .. (91) Chapter 3: Estimation BER via Simulation.(94)

Chapter4:DSP(97) 4.1. Processor Supported .. (97) 4.1.2. Operating Systems Supported ........ (97) 4.1.3. Code generator...... (97) 4. 1.4. Files.... (97) 4.2. Code sequence....(99) 4.3. System components....(99) 4.3.2. Walsh........(99) 4.3.3. Deinterleaver.....(99) 4.3.4. BranchMetrics.(100) 4.3.5. VCP....(101) References..(102)

UMTS Dimensioning

Chapter 1 Blocking in multiservice systems


Assume a communication system with a total bandwidth of 10MHz.There are two offered services; one which needs 2MHz, and another with 4MHz requirement. Now we will construct a state diagram for this multiservice system. Each state is characterized by a pair of numbers. The first number gives the number users in the system utilizing the 2MHz-band width service, where as the second gives the number of users in the system using the 4MHz-band width service. For instance, state (2, 1) means two 2MHZ-service users and one 4MHz-service user. Lets start the system in state (0, 0), i.e., no users. Assume that the average rate of arrival of users demanding the first 2MHz service , (customers/second). Parameter is the average number of users serviced in unit time. The reciprocal of 1, i.e.

(second /customers), is the mean


service time for first service (the 2MHz service). Define

Since we are in the state (0, 0), the probability of going to state (1, 0)is proportional to , where as the probability of a transition to (0, 1) is proportional to .

(in erlangs) as associated with first service. For the second 4MHz service, we have , , and a2 defined in a similar way.

as the traffic

On other hand, the probability of returning to (0, 0) from (1, 0) is proportional to , and from (0,1) is proportional to .

Lets investigate this in more detail. A typical assumption in queuing system (any system where customers or service requesters arrive into a queued demanding a certain service.) is that the arrival follows Poisson distribution. Thus, the probability of k users arriving into a queue, with a mean rate of, in a period of time of length t is: !

For an infinitesimal period t

1 1 !

2 .

The probability, therefore, is proportional to. Moreover, it is assumed that only one user arrive at any instant of time. Note that the inter-arrival time probability density function, if the arrival is Poisson, is exponential. Why? If f(t) is the inter-arrival pdf, then gives the probability of one user arriving after timet from the last arrival. That is, we have zero arrival for timet and then one arrival at following period t
9

1 is negligible compared to 1, as , , , are very small compared to .

0| 1|

Where 1, then: And


is the mean time between arrivals.

Similar argument can be made regarding service times, etc. Back to our queue: The system moves to state (2, 0) from (1, 0) with a probability proportional to . To come back to (1, 0), we have two possibilities; either the 1st user would finish or the second. This mean that the probability of coming back is proportional to 2 . All this is applicate to transitions between (0, 2) and (0, 1).

10

Now, note that we cant go to a state (0, 3). The second service demands 4MHz. Two already-existing users consume 8MHz. The total band width is 10MHz. Therefore, there is no (0, 3) state. Using this idea, we can now complete the state diagram

Note that in states (1, 2),(3, 1),and(5, 0) all the resources (i.e., the full 10MHz) are consumed. The blocking probability of 1stservice is: P(5,0)+P(3,1)+P(1,2) ,where P(i,j) is the probability of being in state (i,j). Why? Because if: The system is in any of these states, and the first 2MHz service is demanded, it will not be granted. On the other hand, the blocking probability of 2nd service is P(0,2)+ P(1,2)+ P(2,1)+ P(3,1)+ P(4,0)+ P(5,0)

11

Because if The system is in any of these states, and the second 4-MHz service is requested, the demand will be blocked. The blocking probability is, thus, service specific. The challenge now to calculate blocking probabilities is to compute state probabilities. Though this may be feasible here, if we increase the number of services, we would get a highly sophisticated state diagram. (If a service takes one dimension in this diagram, n services take n dimension.) Fortunately there is a method to collapse the whole state into a simple one dimension diagram.

12

Chapter 2 Kaufman-Roberts Technique


Kaufman and Roberts solved the problem of calculating state probabilities by assuming a basic service unit, r. (In the example above, r would be in units of bandwidth.) Assume that all the services require resources that are integer multiples of r. So service t demands rt r resources, where rt is an integer .In our example , r can be taken 2MHz .As are result, demands 2MHz and and

r1 =1 and r2 =2, because first service

4 MHz = 1 , whereas the second service demands 4MHz r

2 MHz 4 = = 2 .The states of the system are numbered according to r 2

how many basic units are being utilized in each state. The final state is the total resource divided by basic unit .so in our example, we have states 0, 1, 2, 3, 4 and 5.

How can we construct the reduced state diagram?

State l now means one basic unit of resources is being utilized. This is 2MHz. The only way that we can get there from state 0 is to have a customer demanding 1st 2MHz service arrives into the system. Note that the states now are characterized by single numbers. What about state 2? State 2 means two basic resources are being used .This could be two 2MHz a service customer or one 4MHz service customer. Here is the state diagram.

13

2 3 2

Similarly, State 3 may mean 3 2MHz service customer, or one 2 MHz customer and one 4MHz customer. If one 4MHz-service user leaves the system, two out of the three utilized basic service units are set free. For two basic units to be released simultaneously, the probability is proportional to

2
2

We have three possibilities so total probability is proportional to

3 2 . 2

A A

C B 3 possibilities C

14

Full state diagram

3 3 2

4 2

5 5 2

Blocking probability of service 1 is p(5),Whereas blocking probability is P(4)+P(5) for 2nd 4MHz bandwidth service, because in both states 4 and 5 no 4Mhz service can be admitted due to non-availability of required resources. Now how can we calculate state probability? We will initially compute unnormalized probabilities with P(0) set to 1. We assume steady state operation where the probability of getting into a state equals that of exiting the state. For example,

1 P(0) + 2 P(0) = 1 P(1) + 2 P(2)


Probability of exiting state 0 Probability of entering state 0

15

Interestingly, the equations can be written as

P( j ) = P( j rt )
t

rt at j

P(0)=1 P(

)=0

if

<0

Where

at is the traffic of servicet

rt

is the number of basic service units for servicet

For instance, and since

r1 = 1 , r2 = 2
r1a1 ra + P(1 2) 2 2 1 1

P(1) = P(1 1)

= P(0)

r1a1 ra + P(1) 2 2 1 1

= P(0)r1a1
= =

r1 a1

a1

P(2) = P(1)r1a1 + P(0)r2 a2

P(2) = +

16

And so on. Recursively we can get each probability. In order to normalize (j) =

(j) is the normalized probability of state j Where

so that = 1

If maximum state is N, the blocking probability of service t is:

Utilization, u is the average number of basic units utilized


U = =

=
1

Where is the blocking probability for servicet.

17

Chapter 3
Assume is signal to interference-plus-noise ratio of user i at the base statio (BS) =

Uplink capacity calculation

Where: : Energy per bit : Interference plus noise spectral density : Received power of user i

: Total power at receiver of BS = N + Iown + Iother is the sum of powers of noise (N), users controlled by BS (Iown), and users controlled by other BSs (Iother). : Band width = chip rate = 3.84 * 106 Hz

: Rate of user i (bits per second)

Note that for calculation Pi is subtracted from Itot as a user does not interfere with her or himself. =

In the above formula we assume that user i is fully active. If the user is active for only a fraction vi of the time =

= Itot Pi

18

Let

This is the loading by user


At BS the ratio

1 1 1

If

is called rise over thermal

, i.e., interference from other cells is some factor of

Since

Where : the total loading

19

The uplink is interference- limited. In actual systems is kept below, say 0.8. In general, should be less than

1 But

1 1 1

1 blocking is

Now an additional user x would increase by

exceed , the request is blocked. Then condition of 1

. If loading plus

is taken as a log normally distributed random variable. This means that log is Gaussian. Blocking

20

log log 1

log

Blocking probability, given a current load i for a demanded x, equals to Q[


|
|

], where S is the standard deviation of log (Iother).

Before proceeding, & because it is sometimes needed, lets find statistics of log (Iother) in terms of those of Iother. (Log=loge) Let x= log (Iother)

Iother=

x= (log (Iother)) = Var(x) = S2 f(x) =



std(x) ==x

exp (-

) ) dx=

E (Iother) = =

exp (-

exp

=exp ( E (Iother) =exp (

exp (

) dx

) dx

E (I2other) =exp (2 2 )

| E (Iother) |2=exp ( 2 )

21

= log(1+ |

= = log [E(Iother)] -

)= |

log(1+|

) |

In order to calculate service blocking probability, we consider loading i as a resource. We quantize i using, for example, the loading of the least demanding service .If the least demanding services index is 1, then

For other services, we use approximation t rt=round( )=round(


The system states are

What is the probability of the Q function defined above?? It is the probability of blocking if servicet is requested while the system is in state (j) & all the users are active.

22

(The definition of i sets activity factor v to one). We will call this probability (t, j). The difference between (t, j) & B(t, j) is that in the former all the users are assumed active & this the true loading which is felt by BS is j .

In the latter, the loading is j but true loading is less because some users are inactive. How can we get B (t, j) from (t, j)?? P (j) =

(1-B (t, j-rt))

If Pj (t*) is the probability of arriving at state j by requesting servicet* Pj (t )=


*
,

Define occupancy (c, j) as the probability of having loading j , while the true loading due to active users is c. (c, j) = [(c-rt, j- rt) vt+ (c, j- rt) (1- vt)] where: t is the sum over services. The first term is due to a service requestor who intends to be active. This requestor would increase both loading & actual loading by rt. The second term is due to a service requestor who intends to be inactive. This requestor would increase loading by rt, but the actual loading would remain at c due to users inactivity. Note that (0, 0) =1 as no loading means no active loading. Now we can relate B (t, j) & (t, j) B (t, j) = c, jt, c

Also (t, 0) = B (t, 0)

Note that in (c, j), c can be anything from 0 (no users active) to j (all users active).

So here is how the iterations would work to get state probabilities

23

- B (t, j) & (c, j) are initialized. B (t, 0) = (t, 0) (0, 0) =1

- (t, j) are calculated.

P (j) = Pj (t) =

For every j:

p (0) =1, p (x0) =0


(1-B (t, j-rt))

(c, j) = [(c-rt, j- rt) vt+ (c, j- rt) (1- vt) B (t, j) = c, jt, c

After getting the state probabilities, we normalize

Blocking for service t is: ,

This calculation depends on statistics of .This would be a tricky part. For the time being we can use:
Called coefficient of variation

3 10 ,

0.57 For 0.8

1.2 10 ,

For 0.6
24

0.57

5 10 ,

For 0.4 0.88

0.67

1.7 10 ,

For 0.2

3.1. UMTS uplink:


(t, j) is the probability of blocking if the system is in state j in which all the users are active, and the service requestor demands service t. Condition for blocking: 1
current load Load due to requested service


(t, j)

probability that Iother exceeds

, where w=3.84*106 (Bandwidth) 1.38 10 300 4.14 10 174

If Iother follows the lognormal distribution:


1 2 2

25

If we are given and coefficient of variation of

We will assume Bs receiver noise figure=5 dB. Thus, receiver noise density=169 dBm/Hz=1.26*10-20 w/Hz. (w in units is watts.)

log log log1


log log1 .
(from page 4 uplink capacity calculation)

Note that in the equation for (t, j), Iother and N are in power units. It is correct to use power density units for both. The value of provided in page 7 in uplink capacity notes are in watts/Hz. After (t, j) is calculated, the blocking probability of each service can be obtained by following the procedure in pages 6 and 7 in uplink capacity notes.

3.2. The problem with Iother:


Iother is the interference from users not controlled by the Bs under study. Users controlled by certain Bs generate Iown in the Bs receiver. They also produce Iother in receivers of the neighboring BSs. The distribution and statistics of Iother are, therefore, a function of the admission control algorithm and its parameters such as service load and max. One way to solve this problem is to start with a guess for probability distribution of Iother. This pdf determines the probability that Iother exceeds some value, and, hence, is employed in the computation of (t, j).

Given (t, j), the Kaufman-Roberts is used to get state probabilities, , is which are the probabilities of having a certain load in system. Once we get state probabilities, we can simulate the system to estimate Iother and its pdf. That is for each loading value, we do a number of simulations proportional to its probability. For each loading value, and for each simulation run, we generate a vector of services with the following two properties:
26

1. The sum of loads is equal to the loading value being examined. 2. The services are distributed according to their probability. Since some users may be inactive, we use the activity factors to restrict our calculation of users powers to those users who are active. Assume, for example, that the service vector corresponding to a certain load has L entries representing L users with L services. Each entry is an integer that ranges from one to the number of services. The probability of an entry being equal to t can be taken as the ratio of the traffic of servicest divided by the total traffic of all services. For three services with 1

0.6, 2 0.3, 3 0.1,

We may use the following code, given p=[0.6 0.3 0.1] Service_vector=zeros(1,300); For g=1:300 u=rand; if u<=p(1) service_vector(g)=1; elseif u<=sum(p(1:2)) service_vector(g)=2; Else service_vector(g)=3; end end To implement more efficiently, we can do the following: service_vector=ones(1,300); mask=rand(1,300); for t=2:num_of_services indices1=find(mask<sum(p(1:t))); indices2=find(mask<sum(p(1:t-1))); indices=setdiff(indices1<indices2); service_vector(indices)=t; end We then take from service_vector the 1st L entries such that the sum of their loads is equal to the load value under investigation. cumulative_sum=cumsum(load_vector); index=max(find(cumulative_sum<load_examined); service_vector=service_vector(1:index); To get the actual loading, we make use of activity factors. For each entry in the service or load vectors, we generate a uniform random variable from 0 to 1. If this variable exceeds the activity factor of the respective service, the

27

user is considered inactive. The sum of the loads of the active users gives the actual loading on the receiver of the BS under investigation. We can keep an activity vector of zeros and ones to keep track of which users are active. Afterwards, we can generate geographical locations for the users. We need to specify a probability density function for users distribution in a cell. For example, if the probability is uniform over the area.

a a

P(r,)

The probability of being in a ring of radius r and thickness dr = f(r) dr =


Using matlabs rand generates a uniformly distributed random variable from zero to one, x To transform f(r) d r = f(x) dx to f(r)
2

That is, to generate the locations of L users, we can use: __ 1, ;

Remember that this presumes a uniform distribution of users over area. Parameter a can be taken larger than the radius of the cell. We are interested in users controlled by a certain BS. For a mobile unit to be controlled by a BS, the total attenuation,, between it and the BS (including shadowing and path loss) should be less than that between it and neighboring BSs. can be estimated by ray-tracing techniques, which take
28

into account the particular structure of cells, or is represented by several theoretical and empirical models. We can initially use
10. 10

Where the exponent m of propagation loss is typically taken from 3 to 5, is the distance to BS in meters, and and are two zero-mean normally distributed random variables, representing shadowing, with a standard deviation typically in the range of 6 to 10 dB.
10. 10

Note that must be less than for the mobile unit to be controlled by the BS under investigation. This can be done as follows

is the same as the previous formula. is a new random variable that takes into account the differences in the pathes connecting the mobile unit to the various BSs. , and are i.i.d.

radius

toto = L; Loss_to_own_over _Loss_to_other=[]; While toto>0 other BS Shadowing1=shadowing_std*randn; Shadowing2=shadowing_std*randn; Apply Cosine rule Shadowing3=shadowing_std*randn; Loss_to_own=10^1.4*(distance_to_BS.^m)*10^((shadowing1+ shadowing2) /10/sqrt(2)); %angle of user within cell phi_user=2*pi*rand; distance_to_other=sqrt(distance_to_BS.^2+4*radius^2-4*radius* distance_to_BS*cos(phi_user)); Loss_to_other=10^1.4*distance_to_other.^m*10^ ((shadowing1+shadowing3)/10/sqrt(2)); Loss_to_own_over_Loss_to_other_X=Loss_to_own/Loss_to_other; If Loss_to_own_over_loss_to_other_X < 1 Loss_to_own_over_loss_to_other(L-toto+1)= Loss_to_own_over_loss_to_other_X ; toto=toto 1 ; end end

29

Then??

We want to calculate for a particular simulation run. Remember that


,

If we write this equation in terms of the transmitted powers


,

(1)

The power received at another BS is ,


,

Sum over users


, ,

(2)

Loss_to_own_over_loss_to_other

Lets expand equations 1 & 2 from the previous page Iown= (Iown+Iother+N)i
= (Iown+Iother+N) i ,
,

is the interference caused by the users controlled by the BS under investigation on a neighboring BS.

Iother is the total interference from users not controlled by the BS under investigation.

What is the difference between Iother & ?

To get an equation for Iother , we will assume that


= other 6 I

That is, we assume

30

*reciprocity* that on average the interference caused by users controlled by BS1 on neighboring BS2 is the same as the interference caused by users controlled by BS2 on BS1. 1 1 1

, 6 , 6 , , 1 , , 1 6 , , 1 1 6

6 , , , 1 6 ,

Dont forget to weight summations by activity factor (with ones corresponding to active users, and zero to inactive). After running the simulations over the possible loadings, we get a vector of Iother that can be used to estimate its pdf, mean, and variance in a way that is consistent with admission control algorithm and that is derived from it, rather than being specified independently.

31

3.3. Uplink calculations lations flowcharts: flowcharts 3.3.1. Beta generation:

32

3.3.2. Kaufman-Roberts: Roberts:

33

3.3.3. Iother cdf estimator:

34

Chapter 4 Capacity Calculation for the Downlink


Let Pit,x be the power transmitted by BSx to the mobile unit of user i, which is power-controlled by X.

The signal to interference-plus-noise ratio (SINR) at the receiver,, , is given by: , Where: Ri,x is the data rate of the service utilized by user i, W is the ship rate (3.84e6 Hz), , is the total path loss between the BS and the mobile unit, , , , , , , , , , , , ,

N is the thermal noise power,

Psch,x is the synchronization channel(SCH) power , SCH is a downlink signal used for cell search, Ptot,x is the total power radiated by BSX, , is the total path loss between the BSY and the mobile unit of user i, and Ptot,y is the total power radiated by neighboring BSY,

, is the orthogonality factor which describes the fraction of power which is seen as interference by the receiver .

The Bs can arrange users signals so that they are perfectly aligned. Since each users data are multiplied by a code orthogonal to the codes assigned to the other users, the interference from other users should be suppresses. However, due to the multipath effect, each mobile unit receives replicas of the transmitted signal. These replicas are delayed versions of one another. The Walsh code , when shifted, are no longer orthogonal. Hence, there will remain residual interference despite the use of orthogonal codes. The factor , characterizes the interference. A value of zero indicates
35

perfect orthogonality, whereas a value of one means complete loss of orthogonality.

The SCH has a term as its own in the formulas for , because it is not coded, i.e. not orthogonal to users data. Now lets use the formula for , to get another for , : , , , , 1 , , , , , , , , ,

In practice , takes the intermediate values. Note its dependence on i. The reason behind this is that the orthogonality between different users is degraded by multipath propagation, which in turn, varies according to the location of the receiver within the cell relative to the Bs.

Define loading factor ,

, , ,

, , 1 , , , ,
,
, ,

, ,

, , , , 1 , , , ,

, ,

If we sum over users, , , , ,

Where , is the power of the common channels emitted by BSx. these include, for example, the common pilot channel (CPICH), which is an unmodulated code channel scrambled by the primary scrambling code of the BS. It is used for code synchronization and channel estimation.

36

We thus have,

, , ,

, , , , 1 , , , , , ,

, ,

, , , 1 , 1 , , , , , , 1 , ,

A simple admission control algorithm can be to accept a call if , remains less than a specified value Pmax .

The local blocking probability would then be the probability that Ptot,x, including the required power for the requested service, exceeds Pmax : Probability (Ptot,x P
max)

The computation of this probability generates the beta matrix (t,j). Sorrowfully, the calculation is not as easy in for the uplink. The problem is that the loading factors i,x are mixed with , , , and , . One way

Hence, a summation like , , , for example, would become <, > i,x , and we get the total loading separated. We would use a more rigorous approach based on ..(Monte Carlo) simulations. These would resemble a lot the simulations we do to get the statistics of in the uplink.

around this problem is to replace , , , and , by their average values.

Actually, we would have to do two simulations. Why? Because Ptot,x depends on Ptot,y and Ptot,y cant considered independent of Ptot,x (this is exactly the same as the dependence between and in the uplink). Then the beta matrix would be fed to the Kaufman-Roberts recursion to get the blocking probabilities and the state probabilities. The latter can then be
37

So, in the calculation of the beta matrix, we would assume statistics for , .

used in Monte Carlo simulations to find the distribution and statistics of , . These can be used to repeat the whole process until the statistics we start with get close enough to the statistics we estimate after computing the state and blocking probabilities.

4.1. Calculation of beta Matrix:


Parameters: Noise Power density=1.26*10 3 services Rates: 12.2, 64, 144 kbps : 5, 4, 3 dB Radius: 1 Km Traffic: 30, 5.57, 1.2 mE/per user : 8 W : 1% , : 24% Path exponent = 3.8 Standard deviation of shadowing=8dB , : Gaussian
20

W/Hz

, : uniformly distributed over [0.4, 0.6]

, 0.5

Standard deviation of , 0.05

beta=zeros(num_of_services, max_load); max _

For iter=1:500 (or any large number) Generate a long service vector taking into account the different service probabilities. Assume length is G. You may set G to max_load.
38

Generate the corresponding loading vector: For index=1:G For requested_service=1:num_of_services ** Append loading to the requested service to the first index elements of the loading vector. That is, Loading_vector_partial=[loading_vector(1:index) loading_requested] ** Generate a distribution of index+1 users around BSX ** Caculate the distance to the 6 neighboring cells.

Assume distance between X and


x

its neighbors is double the radius.


60 60 60

Assume also uniform 60 degrees.

**Make sure the total path loss between X and mobile units is less than between Y and the mobile units. **Do not utilize activity factors because the computation of the beta matrix assumes total activity. **Calculate the metric Metric= , , , 1 , 1 , , , , **Calculate the column of matrix to be updated after this simulation run **if(column num_of_columns_in_beta)
39

1 , ,

, ,

Column=round(sum(loading_vector(1:index))/basic_service_unit)

visited(requested_service,column+1)= visited(requested_service,column+1)+1;

visited is a matrix , which , like beta, is initialized by zeros. The visited matrix keeps track of how many times each pair of (requested_service,loading) has been visited. **If (metric>0)&&(columnnum_of_columns_in_beta) beta(requested_service,column+1)=

beta(requested_service,column+1)+1; end end end beta=beta./visited; beta(:,1)=[0;0;0]; beta(find(isnan(beta)==1))=1; save .. the three loops

Note that the entries in beta would be noisy because they are produced via Monte Carlo Simulations. Each row of beta must be non-decreasing. We can have oscillations, however, in our beta matrix. These can be reduced by increasing the number of simulation runs.

4.2. The aftermath of beta calculation:


After beta is estimated, the Kaufman-Roberts recursion is evoked to estimate the state probabilities and the blocking probabilities of the different services. Then we need to check the validity of our guesses for the average value and the standard deviation of total power transmitted. We do this via Monte Carlo simulation.

40

We simulate the loading states whose probabilities exceed some threshold, say 1%. For each state we do a number of simulations proportional to the state probability. For instance, num_of_simulations = round(10000*state_prob) ; indices_of_loads_to_be_examined = find(state_prob > 0.01) ; For index = 1:length(indices_of_loads_to_be_examined) examined_load =basic_service_unit* (indices_of_loads_to_be_examined(index)-1) ; num_of_simulations = round(1000*state_prob (indices_of_loads_to_be_examined(index))) ; For simulation_index = 1:num_of_simulations *Generate a service vector with respective service arrival probabilities. *Generate the corresponding loading vector. *Take from loading vector the first entries whose sum is equal to examined_load. *Generate activity vector. *Generate users (locations, total attenuation between them & SX &neighboring BSs). Make sure the total path loss between X & mobile units are less than that between the units & neighboring BSs. *Use assumed statistics of Ptot,y to compute:
, , , , , , , , ,

Ptot,x=

, ,

(Incorporate activity)

41

If Ptot,x Pmax, add Ptot,x to a vector that keeps its values, & which is later used to get the pdf & other statistics. We assume a statistical similarity between Ptot,x & Ptot,y .

42

4.3. Downlink flowcharts: 4.3.1. Beta generation:

43

4.3.2. Ptot,y cdf estimator:

44

Chapter 5 Uplink Coverage


The coverage calculations based on allowing some losses along the path between the MU & BS on one condition that the received signal must be at certain level. The output power of the MU is around [21 dBm] where the BS output power is around [13 dBm]; according to that Uplink coverage calculations are the limiting factor for coverage. But what will be shown in next sections that the Downlink coverage is taken into account but not separated from the capacity as the BS output power is divided on all MUs. The main idea in this step is to get the maximum allowable path loss along the path between the mobile unit and the base station at certain loading value. Then using a suitable propagation model and the maximum path loss, we get the maximum radius of the cell. After getting the cell area we divide the total area to be covered by the cell area then we get the total number of sites in that area. For multi services we get the maximum path loss for each service separately then we use the minimum value of alpha to get number of sites (cell range(R) = 10^alpha). Thus minimum value of alpha represents a minimum radius which leads to maximum number of sites which insures total coverage for all services. On the uplink, perfect power control can be assumed. This means that all users receive the same power and create the same amount of interference for other users even if the channel conditions are different for each path. On the downlink each user is in different RF conditions, in terms of channel conditions, interference, and handover conditions.
Link Budget:

Using the link budget we can get the path loss between the transmitter and the receiver. For the uplink, the transmitter is the MU and the receiver is the BS. The next figure shows the path between Tx and Rx.

45

SSRBS = Lpath +Gant Lf+j SSdesign Where the design criterion, SSdesign, is equal to the sensitivity of the radio base station, RBSsens, plus a number of margins as SSdesign = RBSsens + BL + CPL + BPL + PCmarg + -Int + LNFmarg Where: Lpath is the path loss (on the uplink) [dB]. is the maximum user equipment output power (= 21 or 24) [dBm]. RBSsens is the RBS sensitivity. It depends on the RAB [dBm]. LNFmarg is the log-normal fading margin (this margin depends on the environment and the desired degree of coverage) [dB]. is the noise rise [dB]. Int is the Interference margin [dB]. PCmarg is the power control margin, dependent on channel model [dB]. BL is the body loss (= 0 or 3) [dB]. CPL is the car penetration loss (= 6) [dB]. BPL is the building penetration loss [dB].

5.1. Detailed explanation of link budget terms:


The maximum path loss allowed, is obtained when SSRBS = SSdesign So solving for we obtain: +Gant Lf+j -RBSsens -BL -CPL -BPL -PCmarg - +Int LNFmarg

5.1.1. Maximum Path loss:

5.1.2. Power of User Equipment:


Maximum transmit power is dictated by the UE class. Next Table shows the maximum transmit power for each UE class and the associated tolerances. A voice-centric (i.e., handheld) UE is usually class 3 or 4. If the network can mix UE classes, the Link Budget should be drafted for the highest class.

46

5.1.3. RBS Sensitivity:

is the user bit rate (information bits per second, excluding retransmission) We can also get the values from tables using the bit rate and channel model.

is the thermal noise power density= -174 is the noise figure.

10 log

Thermal Noise Floor:


The thermal noise floor in this Link Budget is calculated using bit rate, not chip rate, to ensure consistency with the sensitivity calculation. Thermal noise floor affects the sensitivity.

Receiver Noise Figure:


The Node B noise figure should be consistent with the site configuration. A value of 4 to 5 would assume that no TMAs are used.

Information Full Rate:


Information Full Rate is the bearer data rate. On the Uplink, the main data rates are 12.2 kbps for speech, and 64 kbps for PS or Circuit Switched (CS) data services. Release 99 of the standard supports higher data rates of up to 384 kbps for PS (limited to 64 kbps for CS), but these rates are not commonly implemented.

Required Eb/Nt:
The required Eb/Nt, energy per bit-over-total interference (Nt) ratio is influenced by four factors: the coding of the bearer, channel conditions, the target BLER, and the quality of the receiver.
47

5.1.4. Interference Margin (Rise over Thermal):


RoT is also known as Interference Margin or Load Margin. The RoT is estimated from the loading value by means of this equation: RoT = 10 log10(1/(1 load)) The result of this equation will be negative to reflect a loss in the Link Budget.

5.1.5. Log-normal Fading:


Considering that the received signal at a given location can be represented by a Gaussian distribution, the LNF can be estimated as a complementary cumulative probability distribution function. For easy implementation in a spreadsheet, this can be determined

from the cell edge probability () and the standard deviation in the area (), as shown in the equation : LNF = NORMINV(, 0, ) = Q() Where:

Cell Edge Confidence:


The cell edge confidence, with a standard deviation, is used to calculate the LNF margin. The cell edge confidence represents the probability that coverage will be available at the periphery of the cell, on the basis of a statistical distribution of the path loss. Instead of the cell edge confidence, the cell area probability can be used to estimate the network coverage QoS. The cell area and cell edge can be linked.

48

Standard Deviation:
Standard deviation represents the dispersion of the path loss or received power measured over the coverage area. The morphology of the area manmade structures and natural obstacles disperses the signal propagation by altering the line of sight and causing diffraction, refraction, and reflection. The standard deviation shows limited correlation with frequency, but this can vary greatly with morphology. In cities, the standard deviation can be estimated as 4 to 12 dB. Table 2.5 shows standard deviations by land use density.

5.1.6. Handover Gain:


On the Uplink, the handover gain can be seen as a reduction in the LNF. This assumption is valid if we consider that the paths to the different cells serving a call are independent, or have a limited correlation. Path independence for cells from different sites is obvious, because the geographical locations of the receiver lead to independent path obstructions. For cells of the same site, as in the softer handover case, paths could have greater correlation, resulting in a reduced statistical handover gain. The Link Budget does not take this into account, because it is partly compensated for by possible soft combining. Assuming that both paths are equal, the combining gain would be 3 dB for both directions.

49

5.1.7. Body Loss:


Body loss is affected by the evolution of handsets and how people use them. With hands free kits, the UE can be located anywhere on the user, not necessarily close to the head. This could cause large variations in body losses, but no definitive characterization has been done. For video-telephony applications, body loss can be ignored or reduced as compared to voice applications, because users will be holding the UEs at arms length away from their bodies. For PS data usage, the body loss depends on both the UE and the application. For mini-browser applications, the UE is held in the hand so the user can navigate the built-in browser. Body loss is assumed to be similar to that in video-telephony applications. In contrast, for mobile office applications on a UE with a Personal Computer (PC)-card, equipment loss is a greater factor than body loss. The loss created by this equipment depends on the type of antenna (fixed integrated, swivel integrated, or external) and the computer to which the card is connected. The 3 dB value in the Link Budget can be considered conservative. Measurements can reveal attenuation from 2 to 5 dB for a UE held at headlevel, depending on the UE antenna design and its direction relative to the main server.

5.1.8. Building Penetration Losses:


Building Penetration Loss (BPL) is discussed in Chapter 8. In our sample Link Budget, BPL is a single number, although in reality the value depends on the area of expected coverage. Values below 20 dB are usually sufficient to cover the ground floor area immediately Inside the outermost walls of the building. Values up to 45 dB would be required to cover 95% of the ground floor space. This amount of coverage may require other deployment. Scenarios, such as microcells or an indoor solution, to overcome the interference created by the external building walls.

5.1.9. Car Penetration Losses:


Car penetration losses depend on car type and construction, as well as local regulations. Historically, for network design, car penetration losses were set between 3 dB and 6 dB. For newer car materials, such as heat-efficient glass, this value can be increased up to 10 dB.

50

5.1.10. Transmit Antenna Gain:


Because a handheld UE typically does not use an external antenna, the gain is set to null (0 dBi).

5.1.11. Cable and Connector Loss:


Because a handheld UE typically does not use an external antenna, this item is null. For data cards, external antennas are commonly available. If this option is widely used in the network, the loss associated with the cable should be counted. In addition, the Link Budget also must account for the antenna gain (typically 3 to 6 dBi). After these calculations we get the path loss then using the propagation model we get the radius of the cell.

5.2. Propagation Model: 5.2.1 Okumura-Hata Model:


Most popular model Based on measurements made in and around Tokyo in 1968 between 150 MHz and 1500 MHz Predictions from series of graphs approximate in a set of formulae (Hata) Output parameter : mean path loss (median path loss) LdB Validity range of the model : Frequency f between 150 MHz and 1500 Mhz TX height hb between 30 and 200 m RX height hm between 1 and 10 m TX - RX distance r between 1 and 10 km

3 types of prediction area :


Open area : open space, no tall trees or building in path Suburban area : Village Highway scattered with trees and house Some obstacles near the mobile but not very congested Urban area : Built up city or large town with large building and houses Village with close houses and tall.

Definition of parameters :
hm mobile station antenna height above local terrain height [m] dm distance between the mobile and the building h0 typically height of a building above local terrain height [m] hb base station antenna height above local terrain height [m] r great circle distance between base station and mobile [m] R=r x 10-3 great circle distance between base station and mobile [km] f carrier frequency [Hz]
51

fc=f x 10-6 carrier frequency [MHz]


free space wavelength [m]

Okumura takes urban areas as a reference and applies correction factors Urban areas : LdB = A + B log10 R E Suburban areas : LdB = A + B log10 R C Open areas : LdB = A + B log10 R D A = 69.55 + 26.16 log10 fc 13.82 log10 hb B = 44.9 6.55 log10 hb C = 2 ( log10 ( fc / 28 ))2 + 5.4 D = 4.78 ( log10 fc )2 + 18.33 log10 fc + 40.94 E = 3.2 ( log10 ( 11.7554 hm ))2 4.97 for large cities, fc 300MHz E = 8.29 ( log10 ( 1.54 hm ))2 1.1 for large cities, fc < 300MHz E = ( 1.1 log10 fc 0.7 ) hm ( 1.56 log10 fc 0.8 ) for medium to small cities Okumura-Hata model for medium to small cities has been extended to cover 1500 MHz to 2000 MHz (1999):

LdB = F + B log10 R E + G F = 46.3 + 33.9 log10 fc 13.82 log10 hb E designed for medium to small cities G =
0 dB medium sized cities and suburban areas 3 dB metropolitan areas

a( )=3.2(log(11.75 ))2-4.97 a(1.5)=0 The cell range is given by:

10

Where,

13.82 log 44.9 6.55 log


52

Number of sites:
The next step is to get the cell area from the cell radius and the area is different according to cell type, the following figures show the cell types and the corresponding cell area:

Then the number of sites

53

5.3. Uplink Balancing:


In cases where a definite loading has not been given in uplink or downlink it is possible to minimize the number of sites such that coverage and capacity is in balance. There are numerous ways to perform this balancing. One method to balance the coverage and capacity is described in Figure 2. A detailed example using this flow chart:

54

The given input data consists of an unloaded path loss and an average user profile. First an uplink loading is assumed. This is a first guess and based on this the coverage and capacity sites are calculated. Unless the system is in balance these will differ. A low loading will for example give few sites required for coverage but many sites for capacity. The uplink load is varied until balance is achieved. Once balance in the downlink is achieved a check is made to see that the downlink capacity/coverage is sufficient. The number of sites is given from the uplink balancing and it is therefore possible to calculate the load per cell. This load figure can be used together with the simulated downlink curves to check that the downlink range is sufficient to cover the required area. If not the number of sites is increased until enough coverage is achieved. In our program (see attached cd in balancing.m), we used the bisection method to obtain the previous algorithm. While the difference between the number of base stations of the uplink capacity and uplink coverage is greater than zero we increase the maximum loading with some step, and if it goes below zero we decrease the maximum loading by the same step, then we divide the step by two and then we reuse the new maximum loading to obtain the new difference between the number of base stations.

55

UMTS Physical Layer Implementation

56

Chapter 1 WCDMA Physical layer implementation 1.1. Introduction:


Specifically, we want to implement the base band section in the mobile unit, which decodes the frames sent by the base band station (BS). The UMTS frame is 10 ms long and has 38400 chips. The chip rate is, thus, 3.84 ( mega chip per second), and the chip duration Tc0.26s.
.

The number of chips per bit, N, varies according to the service provided; . The ratio between the bit duration to the chip duration (N) is also called spreading factor.

1.2. Downlink Transmitter:

The signal transmitted by the BS can be written as:

sin 2 ) cos2

57

Explanation of terms:

K: Is an index running over the users controlled by BS. Ko is the


number of the users. The K=0 term is the pilot signal sent by the BS to help the mobile units to: 1. Synchronize the received signal. 2. Estimate the channel characteristic.

d(K): are data of user K. d(0) is always one.dI(K) and dq(k) are
the data sequences multiplied by cos(2fct) and sin(2fct) respectively. This means that we have quadrature phase shift key (QPSK) modulation. In this scheme, every two bits are taken together with one multiplied by cos and other by sin. I stands for inphase and q for quadrature (The names given to the two carrier components).

Ec(K): Is the chip energy of the user K. c(0) is the pilots energy.
Note the dependence of c on K. The BS amplifies the signal of its users by different factors to take into account their different situations inside the cell. For instance, users near cell border need higher transmitted energy to compensate for significant path or propagation loss than those close to BS.

W (K): is the Walsh code or sequence assigned to user K. W(0)


(The pilot Walsh code ) is always one. The different Walsh sequences are orthogonal when aligned. The two-chip long Walsh codes are : 1 1 1 1

Correlation of W1=(1)(1)+(1)(1)=2 Correlation of W2=(1)(1)+(-1)(-1)=2 Cross correlation of W1 and W2=(1)(1)+(1)(-1)=0 They are orthogonal when aligned.
Tc 1

1 -1 58

Walsh codes of length N can be generated recursively from length-2 Walsh sequence. If we want the codes of length 4,
Same as 2*2 Same as 2*2

1 1 1 1

For length-8 Walsh sequence:


Same as 4*4

1 1 1 1 1 1 1 1 1 1 1 1

1 1 1 1

Same as 2*2

Negative of 2*2

Same as 4*4

Note that:

1 1 1 1

1 1 1 1

1 1 1 1 1 1 1 1

1 1 1 1

1 1 1 1

1 1 1 1

1 1 1 1

1 1

1 1 1 1 1 1

1 1

1 1

1 1 1 1 1 1 1 1

1 1 1 1

1 1 1 1

Same as 4*4

Negative of 4*4

1. All the codes are orthogonal on each other. 2. With the exception of the all-ones code, the number of ones in each code is equal to the number of minus ones. This means that summing the chips of each code gives zero. SI and Sq: Are two BS specific sequences called Scrambling codes [1]. Each BS has its own scrambling codes ,i.e., scrambling codes differentiate between BSs (Whereas the users controlled by a BS are discriminated by their assigned Walsh sequences). The scrambling codes belong to the pseudo-random noise family of codes. These are produced by certain shift registers with feedback.

And have the following two important characteristics: 1. The cross correlation between different codes is very low. 2. The correlation between a code and a shifted version of itself is very low. The scrambling code
[2]

is at the chip rate.

59

1.3. Downlink Receiver: 1.3.1. Received Signal:


After propagation through the channel, the mobile unit receives (see transmitted signal) , , cos2

, , sin2

Index 'l' runs over the paths by which the signal is received at the mobile unit. 'L' is the number of paths.

' ' is the gain of path ' ' and ' ' is the phase.The phase difference between paths results from path length difference and Doppler shift which is a function of the angle between received path and direction of motion of the mobile unit . 'dI,l', 'Wl(k)', 'SI,l', 'Sq,l' are the shifted versions of transmitted 'dI', 'W(k)', 'SI', 'Sq'.

1.3.2. Demodulation:
The first order of business at the receiver is to multiply by locally generated carriers cos 2 and sin 2 and then low pass filter (or more accurately match filter).

Received Signal

2 cos 2 cos2 cos4 cos cos after LPF 2 cos 2 sin2 sin4 sin sin after LPF 2 sin 2 after LPF cos2 sin4 sin sin 2 sin 2 sin2 cos4 cos cos after LPF

60

Therefore at point A (figure page 3), we have:


, , cos , , sin

At point B:

, , sin , , cos

1.3.3. Path Searcher:


In order to retrieve the in-phase data sequence dI(k), we multiply the signals at A and B by an SI sequence synchronized with one of the paths. How can this synchronization be achieved? Let's digress to investigate this issue thoroughly.
Samples of the received frame

time

1.3.3.1. Multipath:
Each sample carries users' data, noise, and interference from the different paths through which the transmitted signal has reached the receiver.

61

The BS sends: 0 1 2

101 102

313 314

38399

What is received is: Noise +

+ First significant path

+ Second signification path

+ Third significant path

We get the sum


>38400 samples

62

1.3.3.2. Path Searcher Construction and Analysis:


At what sample does the first significant path starts? the second? the third ? How can we construct a path searcher?

is synchronized with , ? What if , A 'one' from , would be multiplied by a 'one' from , . A minus 'one' by a

would have an approximatly equal mixture of ones and minus ones.

minus 'one'. The result would be always one. On the other hand, , ,

If we now sum over the chips within one bit duration, i.e., sum over N consecutive chips, , , would result in a near zero value (as the number of ones number of minus ones). Not only that, summation over N chips, and in case we are synchronized, would zero all users' Walsh sequences (see #2, page 2).

ones and zeroes.

Not only that, , , would also have an approximately equal number of

Note that we are here talking about two different paths and v (see #2, page 3). Taking all this into account, what we get after the summation is: At 'D' N 0 sin + noise + interference At 'C' N 0 cos + noise + interference

Note the role of pilot The other terms are not eliminated completely

63

thus,

VI , Vq are Gaussian (VI) = (Vq) = 0


( ) = ( ) =

At 'D' = N 0 sin + Vq

At 'C' = N 0 cos + VI

(VI Vq) = 0

is the total (interference plus noise) power spectral density. The power (variance) of interference plus noise is assumed to be equal on average over the inphase and quadrature branches. The interference plus noise power per chip in each branch is We get

where V = N I0

because we have summed over N chips over which interference

plus noise are assumed to be uncorrlated from chip to chip. What is the probability density function of signal 'Z' at point E Z = +

, ,

Why? Any two jointly Gaussian random Variables have the joint distribution:

0 0

Where: 1 is the mean of y1 y 2 is the mean of y2 y 1 is the standard deviation of y1 2 is the standard deviation of y2 is the correlation coefficient between y1 and y2

64

In our case: 0 cos 0 cos (Note that , l are treated till now as constants)

0 sin 0 sin

0 cos 0 sin 0 Now we will do a transformation of variables: cos sin


,
,

, , , ,

What is fz,(Z,)?

sin

, ,

, ,
Let

, ,

, ,

cos

cos sin

1 2 0

Modified Bessel function of order zero


To be accurate, this is the pdf of Z conditioned on considered to be a constant. / as we

From experiments, has been known to follow a number of distributions depending on the mobile environment.
65

If there is no line of sight (LOS) between BS and mobile unit, is mostly Rayleigh. Consequently, is exponentially distributed.

2 ||

That is, 2 is both the mean and the standard deviation of .

Standard deviation of 2 ,

Our Strategy to solve this integral is to cast it as a pdf function with as a variable. We can then benefit from the fact of pdfs integrating to one.

We need here to have: 0 This guy should be equal to

66

0 0 0 0 0 0 0 2 0 . 0

needs to be: 0

Take out the terms that are not a function of .

exp

This integrates to one. Compare with the enclosed formula in page 8 to ascertain that this is a pdf proper.
1 0

This derivation is predicated on the assumption that locally generated scrambling code is synchronized with one of the received paths. If this is not the case something expected when we are still searching for paths within samples of the received frame, Remember that since is not synchronized with any path, the summation over chips (which with multiplication is basically a correlation process) would only produce a noise-like signal. It can be easily shown that in this case:

67

So what we have now are the pdfs of Z in the two cases of synchronization and lack of alignment:
1 0 1 |

Recall in your mind the meaning of a pdf before looking at the figure below. gives the probability of variable Z lying within the interval [

.
. | 0

. |

z/v

68

In what region is it more likely that there is no synchronization? In what region is it more likely that the locally generated scrambling code is aligned with one of the received paths?

1.3.3.3. path searching algorithm:


We can now devise the following path searching algorithm received samples

sequence of ones and minus ones of the locally generated scrambling code Align scrambling code starting here Multiply and add over N consecutive chips (in both the in-phase and quadrature branches). You then get YI & YQ. Compute Z=YI2+YQ2. Compare Z with a threshold Z* . If Z>Z*, decide that a path has been found. If Z<Z*, shift the scrambling code by one sample and repeat. From figure in page 11, Z* can be chosen as 2V (V is estimated by the receiver), because below 2V, f(Z|un-sync)>f(z|sync) and above 2V, f(Z|sync)>f(Z|un-sync) (choosing the point of intersection is only the only option. Please see below). Can things go wrong? OF COURSE. We are dealing with random variables here. Z can be greater than Z*, not because we have alignment, but because we have had some excessive noise. Z can be less than Z* while synchronization has been achieved, again because of the noise. The first case
69

is called false alarm because we decided that there is alignment but we are just being fooled oled by noise. The second case is called miss.

1.3.3.4. False Alarm and Detection Probabilities:


What is the false alarm probability? Well, it is the probability that: 1. We do not have synchronization, and 2. Variable Z exceeds Z* because of noise.

Vf(Z| Vf(Z|un-sync)

False alarm probability is this area

Z/V

Note that: here re we deliberately have not chosen the point of intersection * (Z /V) as threshold.

What is the detection probability? Detection is when there is alignment and we decide that there is alignment. So, detection probability PD is the probability that: 1. We have synchronization, and 2. Variable Z exceeds Z*.

70

And so we decide in favor of alignment.

Vf(Z|sync)

Z/V Detection probability is this area Note that PF and PD are linked together

ln

corresponding to z*=0

corresponding to z*=
71

Bad news! In a perfect world, we want PD =1 and PF =0. In reality,

If PD =1, PF =1 (because if you set the threshold to zero and perpetually say sync. achieved then in all cases of lack of synchronization, you would decide that there is alignment ). If PF =0 , PD is also zero ( because you cannot just protect your back by never saying sync. achieved; you would never detect ).

Sometimes, is determined by specifying some tolerable PF ( = - V ln PF ). This is similar to CFAR (constant false alarm radar). What is a good operating point for best PD and PF? Assume PD PF relation as follows

Using Z* corresponding to this point would be great as PD is close to one , and PF is close to zero.

Increasing

We need to increase 0 and the total power transmitted by BS is limited to a maximum value. Also, increasing 0 would increase V for other BSs. We have so far ignored the other cells. They are alive and kicking, however. When they increase their power, they harm the performance at their neighbors. So what is a feasible solution? AVERAGING.

How can we make PD PF relation look like that ?


would do the trick. But note that there is a hefty price.

72

1.3.3.5. Averaging:

Rather than taking Z at point (figure in page 6), we would average over L bit durations to get Z
F

Z is now here

Lets call variable here Z

What are the new pdfs of Z in both cases of synchronization and lack of synchronization? When there is no alignment,

This means that the pdf of Z is the convolution of pdfs of , , . We can, thus, use Laplace transform to facilitate computation.

we will take , , as i.i.d independent and identically distributed.

Laplace

Similarly, | Similarly , f(Z|sync) =


we have L i.i.d

So in case we sum over L bit durations, and then divide by L f f


(Z|sync)= ! (Z|un-sync)= !

73

PF= fZ| un sync dZ


=

dZ

Let

=x
!

PF= =(

( )( x ! !

) expxdx x

x expx dx

=(

{ (L)-(L) inc (

expxdx - x expxdx)

, L)}

where: is gamma function

Where incomplete gamma function is defined as inc(x, L) = (

) , L) , L)

(L) = (L-1)!

PF= 1- inc(
Similarly ,

PD= 1- inc(

74

1! f(Z|un-sync)

0 4

L=5

f(Z|sync)

Z/V

L=10 (very close to what we want) PD

L=5

L=1

PF

75

In practice, we may oversample the received signal in order to achieve finer alignment resolution. Normalized output of correlator, each tested shift is one fourth of a chip.

76

1.3.4. Rake Receiver: Back to the detection circuit


A
,

Estimate , E

cos(2fct)

F Estimate ,

B
,

sin(2fct)

synchronization circuit.

* is aligned with path L as a result of the work of path searcher and ,

.) (To get dq sequence, we multiply by ,

1.3.4.1. Channel Estimator:


The channel estimator [2] is for the estimation of and . it uses averaging to get the estimates. Why we do channel estimation is explained in page 25. Channel estimator: Np is an integer multiple of N Let:
, ,

averaging for Np chips,

At the point C we have:

At point D:

, , , , , , , , 0, , , , , 0, , ,

(signals at A and B are given in page 4)


77

When we sum over Np chips:

when are eliminated. Terms with , ,

and 0,

0, We are left with: Dividing by 0 , we get:

Terms with , and 0 are eliminated.

Terms with , , are eliminated.

(elimination is not perfect)

for inphase and quadrature branches respectively.

, , ,
Similarly,

and are zero-mean Gaussian random variables

, ,

This is similar to and (page 6), but with N replaced by Np.

, ,

, ,

Now at point E we have:


, , , , , , , , , , ,

78

, , , , , , , , , , ,

1.3.4.2. Summing over N chips:


when we sum over N chips:
Terms with , , are eliminated.

Terms with , , when are eliminated.

There for at point 'G' we get :

Terms with , and are eliminated.

We then add the output from all significant paths. This receiver is called Rack receiver [3] and each path processor is a finger. Below is a 3-finger rack. Note that the difference between , , , , , and , , is a mere time shift.

N , (, , + , , ) + , , + , ,

User K* 3-finger Rake


79

[1]

Let X be the aligned sum of all path processors: , , , , , , , , (additive white Gaussian noise) (Dont forget that dq is obtained by repeating the above but through multiplication by , )

1.3.4.3. Decision Level & Probability of Error:


Decision Level: If X>0 then dI=1 If X<0 then dI=-1 But there is a probability of error, Pe. Pe is the probability that 'minus one' was sent, but we decide 'one' because X>0, and that 'one' is sent, but we decide 'minus one' because X<0, If the probability of the transmitter sending 'one' is equal to the probability of sending 'minus one'.

/ 1 / 1

The two terms are equal in our case. Thus, / 1


We would calculate an insightful approximation for using chernoff bound. If the objective is to calculate , we can write it as
1 Unit Step Function = 0

But for any 0

80

Hence

= =

In our case, 0. We will choose

This is an upper bound for the integral

for a Gaussian variable = Where is the variance and m is the mean.


From page 22

given that -1 was transmitted


m , , , ,

,

2, 2, 2, 2, , 2, , 2, , ,

2, , , , , ,

But , , , ,

, , , , , ,
, , , , , ,

, , , ,

(page 20)

2 , , , , , , (page 19)

Are we done? Not yet because , , are random variables. We need to average over their distributions.

But , cos , sin

81

To put in Gaussian pdf format:


Noting has the same distribution as

Term for imperfect channel estimation How can we reduce Pe?


one as possible. This can be achieved by increasing pilot energy 0, and number of averaged chips to estimate channel.

To reduce , we want this term to be as close to

Of course, there are limits. The total power emitted by the BS constrained. Also, the channel varies with time and, hence, must be restricted to the chips transmitted to almost the same channel.

To reduce , we want this term to be as small as


possible. Increasing the users energy is an option, but it is limited by 1 BSs total power, and 2 the approach one. the ratio required for the second term to

82

Note that: the contribution of Rake receiver evident in this formula. If what is inside the brackets is less than one, raising it to L would reduce it significantly.

1.3.4.4. Maximal Ratio Combining (MRC):


Why do we estimate the channel in the 1st place? Assume the output of a branch of a rake finger=Xk+nk .We want to combine the outputs in a way that maximizes signal to interference plus noise ratio (SINR).

Noise power at the output | | For white noise, . Hence, the noise power . Assume that we have quantity , is real 0 2 0 If we choose as
| |

We want to find wk that maximizes SINR.

SINR

| |

| |

SINR

| |

, we get

The maximum SINR is attained when wk=kXk, where k is a factor that is constant. What this means is that the maximum SINR is achieved by multiplying Xk by (a scaled version) of itself. Since the branches have either cos or sin , we need to estimate these quantities & multiply the estimates by the coming stream. This method of combination is called MRC (Maximal Ratio Combining).
83

Schwarz Inequality

Chapter 2 Forward Error Correction (FEC) 2.1. Introduction:


Forward Error Correction is the addition of redundant bits to sent data in order to allow the receiver to detect and correct (up to a limit) errors that have occurred. An example that illustrates this concept is to send each data bit thrice and use Voting at the receiver. So rather than sending 0, we send 000. 1 is sent as 111. At the receiver we decide whether each bit is 0 or 1, and then apply the rule 000 001 010 011 100 101 110 111 0 0 0 1 0 1 1 1

Assume that the probability of error is .

That is, the probability of sending 1 and deciding 0 at the receiver because of noise and interference is . And the probability of sending 0 and deciding 1 is also . What is the probability of error in the 3bits-per-bit system?

Assume that 000 was sent. If two or three bits are decoded as 1 in the receiver, we would say that 1 was transmitted, while it was zero. Therefore
Probability of error in coded system
1

2 out of 3 bits 2 errors 84

3 bits in error

One correct

This is a significant reduction in . The price, of course, is reduced rate as we send each bit thrice. A way of looking at coding is Hamming distance. When we send ones and zeroes, the hamming distance = 1. If we send three ones (for a one) and three zeroes (for a zero), the hamming distance between two codewords is three. The hamming distance is the number of differences between two codewords. Codewords are sequences sent by the transmitter. In our example, Single errors are corrected. If we send 000, and decide 010 at the receiver, we would say that 0 has been transmitted. Therefore, the single error has been corrected. Similarly, if we send 111, and decide 011 at the receiver, we would say that 1 has been sent. Again the error can be corrected. If we decide 010, however, we would say that 0 has been transmitted. This is an erroneous decision. Lets look at the hamming distance as if it is a true distance
Hamming distance

0.01 , 0.000298

3 1

000 1st codeword

111 2nd codeword

Points at a distance of one form 000.They are 001, 010, 100. If we decide them in the receiver, we would say 0 has been sent, which is a correct decision. How many bits we can correct? We can correct up to floor ( Why do we say ? because in actual cases we use more than two codewords. The minimum hamming distance, , is the minimum among pairs of codewords. The error correcting capacity is a function of .
85

bits.

, can be written as a function The probability of error of a coded system, of .

When do we commit errors?

Where n is the length of a codeword in bits. This sum is often dominated by the 1st term.

In our previous toy example n=3 , dmin=3 , 1+ floor( P 0.0003 , which is very close to actual = 0.000298

) = 1+1 = 2

2.2. Convolutional Codes: [1]


Redundancy is added via a shift register

86

For each input bit , two outputs are produced. The output does not only depend on the current bit , but also the two previous bits. The constraint length of a covolutional code is the number of message bits influencing the output. We denote the constraint length as k. k=3 in our toy example. The is often initialized by (k-1) zeroes. Also a (k-1) zeroes are added to the bit sequence to be decoded to return the register to the all-zero condition after the data frame is finished. The input data sequence is thus of length (L+k-1) where L is the actual data length. If number of outputs per bit is n (n=2 is our example), the output number of bits = n(L+k-1). The code rate is length of output. Typically Lk, and r therefore

. It is the ratio of number of actual data bits to the


The number of states of shift register = 2 4 if k=3. We have either 00,01,10 or 11 . What happens if the register is in state 00 , and the input is 0?

The two outputs are zero

After shifting , the state would remain 00 .If the input data is one

The two outputs are one. The next state will be 01.

87

a solid arrow means that input is zero, while a dashed arrow denotes one. The two bits over an arrow are the outputs.

We can also draw the following state diagram

means that to move out of 00 the input is one, and two ones result as an output. In general, the exponent of is the number of input ones, where as the exponent of is the number of output ones.

88

The above diagram gives all the possible ways of starting at 00 and coming back to it. Using Masons sum rule of flow graphs, the transfer function from

What is the meaning of this? A one at the input produces a sequence of 5 ones at the output. That is one codeword that differs from the all-zero output by 5 bits. If two ones are fed to the register, two codewords are produced with 6 ones before emerging back with the all-zero output sequence. And so forth. For this convolutional code, dmin consequently, is equal to 5. Generally dmin can be estimated by inputting one following by zeroes to the all-zero initial state. What is dmin for the following convolutional encoder?

2 4

1 1 2 4 8 1 2

input to output is

89

2.3. Viterbi Algorithm For Detection : [1]


Received sequence

j=1

Suppose that the covolutional encoder of page 28 generates an all-zero sequnce. The received sequence is 0100010000 Calculate Hamming distances between output of state transitions and the received sequence.

Received sequence

State 00 State 10 State 01 State 11

j=2

Received sequence

State 00 State 10 State 01 State 11

j=3

Received sequence

State 00 State 10 State 01 State 11

j=4

90

Received sequence

State 00 State 10 State 01 State 11

j=5

Matlab Convolutional encoding and Viterbi decoding:


Study the instructions poly2trellis, convenc, vitdec, quantiz Implement WCDMA channel coding procedure using both hard and soft decoding. What is explained above is hard decoding. Soft decoding means retaining the received input by quantizing it to more than one bit. For example, assume that the input is normalized to a value between 0 and one. Due to noise, the input to the receiver can be something like 0.34, 0.719, etc. A hard decoder would transform any value 0.5 to one, and any value < 0.5 to zero. Afterwards, Hamming distances are used. A soft decoder would quantize using, say, 3 bits. The eight possible values would then be compared with output of state transitions on the basis of Euclidean distances. Using Coding, is reduced (see hard decoding case). The most straightforward way of reducing is to increase signal-to-noise ratio. So if we get a probability for a coded system, we ask ourselves about the SNR needed to achieve this without coding. Using coding allows us to operate at a lower SNR while achieving the same error rate. The ratio of SNR without coding to SNR with coding for the same probability of error is the coding gain. The coding gain (dB) can be approximated as 10 log decoding case and 10 log for soft decoding. The superiority of soft decoding case stems from the exploitation of more information from received data.

2.4. Coding gain:

for hard

91

To see the difference between soft and hard decoding, assume a BPSK system where the code words are a sequence of ones and minus ones. In the receiver, we correlate received sequence with all the code words forming correlation metrics.

noise.

Where is the bit of the codeword, and is the received bit plus

transmitted, is the bit energy, here multiplied by code rate to take into account the effect of adding redundancy, and is the noise added to the transmitted bit.

Where is the bit of the codeword, the codeword that has been

If k=i

If ik

Where: n is the length of codeword, d is the Hamming distance between codewords i and k. Lets confine ourselves to codeword I with the minimum distance to codeword k, 2

92

An error takes place if

If the noise is Gaussian, , and 0

For hard decoding case,

~ 10 log 2

2 2

for

2 ~

Note: the added r is to take into account the addition of redundancy.

93

Chapter 3 Estimation BER via Simulation


If a frame of data bits has m bits, and if the simulated receiver produces v bits in error, then represents an estimate of BER. For N simulation runs, the

estimate of BER is equal to run.

where Vk is the number of errors in the kth

The most important question now is how much confidence we have in the estimated BER in relation to its (unknown) true value. be the estimated value, and S be the Let be the true value of BER, standard deviation

A known result from probability theory is that, for large N, the quantity follows Students T distribution With N-1 degrees of freedom

-x

Lets say that we are interested in an upper bound for .

This upper bound depends on the desired confidence. Suppose that we want the probability that
/

be something like 5% or 1%.

goes below be less than , where is chosen to

Since we specify the probability, and since we know the distribution, we can find the value of .Note that , and thus .
94

The Matlab instruction tinv gives the inverse of students T comulative distribution function. It needs two arguments: and the degrees of freedom of the T distribution. X = - tinv (,N-1) We have (1- ) confidence that

In other words, we have (1- ) confidence that true BER is less than

Guessing N:
Assume the sequence 0 , 1 1,

, ,

. . . . ,

, of i.i.d random variables y,

0 1 1

01 1

We have N observations of y and we want to estimate p. The typical estimator is

| | 1

unbiased estimator

By the central limit theorem, can be approximated as Gaussian.

95

The probability that exceeds three times the standard deviation is 0.00135 (=Q(3)) That is, we have 99.865% confidence that 3 , where

This is equivalent to a 99.865% confidence that 3. Assuming that we want the upper bound to be 0.1 , = 0.1p 30 1

N=

Note that if p=10, we need about 900000 ys ys if we insist on the specifications above. In our case, p is the BER to be estimated. The simulation run examines the transmission and reception of 150 bits, i.e., m=150. For the specifications fications above, the required number of runs =

N=

We need about 60000 runs if BER is expected to be of the order of magnitude of 10-4.

96

Chapter 4 DSP
4.1.Processor Supported:
TMS320C6416 on TMS320C6416 DSK

4.1.2.Operating Systems Supported:


Windows 2000 with service pack 2 Windows XP

Version 3

1000 MHz DSP, 125 MHz EMIF

Board 5, CPLD 4

4.1.3.Code generator
Code Composer Studio & c code is used

4.1.4.Files Main.c
Contains data multiplication by Walsh, Scrambling and branch metrics calculation.

Scrambling_code_generator.c Walsh.c deinterleaver_final 8-6.c Main.h Vcp_parameters.h


Contains different configurations of VCP parameters

4.2.Code sequence:
First the scrambling code is generated and packed into words,
scrambling_code_generator(Tx->oversampled_scrambling_code);

Then Walsh code is generated,


walsh_code_generator(Tx->walsh,4);

And the data is obtained using a probe point and multiplied by the scrambling and the walsh codes,to get the interleaved data (Tx->interleaved_input).
for (bit_index=0;bit_index<150;bit_index++) 97

{ data*/

Tx->Interleaved_input[bit_index]=0; for(i=0;i<1024;i++) { j=(i>>5)+(bit_index*32); k=i%32; scrambling= (Tx->oversampled_scrambling_code[j]>>k)&0x00000001; if (scrambling==0) { scrambling=-1; } chips[i]=scrambling*chips[i]; if((i+1)%4==0 & i!=0) { summm=(chips[i]+chips[i-1]+chips[i-2]+chips[i-3]); downsampled[i/4]=(summm/4)*(Tx->walsh[i/4]); Tx->Interleaved_input[bit_index]= (Tx>Interleaved_input[bit_index])+(downsampled[i/4]); } } /*probe point to acquire

} for(i=0;i<150;i++) { Tx->Interleaved_input[i]=Tx->Interleaved_input[i]/256; }

Afterwards the the Tx-> interleaved_input is passed to the deinterleaver to get the encoded data with errors (Tx->Deinterleaved).
deinterleaver(Tx->Interleaved_input,Tx->Deinterleaved);

And the the Tx->Deinterleaved to the BranchMetricsCalculator and the result is Tx->BM_buffer.
BranchMetricsCalculator(Tx->Deinterleaved,Tx->BM_buffer,2);

The BranchMetrics and the VCP parameters are given to the Vcp therough the Edma *userData[0] is BM address, *vcpParameters [i] is VCP parameters address while (i) is used to choose the desired configuration from (vcp_parameters.h), and decisions is the output data.
98

submitEdma(&userData[0], &vcpParameters[i], &decisions, &outParms, &numDec);).

4.3.system components 4.3.1.Scrambling:


Generated according to the standard.

38400 bit oversampled at rate of 4 packed in 4800 word.

4.3.2.Walsh:
Walsh of length 256 is used but generating 256*256 matrix will bust the memory, so we resorted to generating only one row at a time. Algorithm: Knowing the row no. in the 256 matrix inform us about the place of that row within the matrix, in the upper or lower half. If it was in upper half so the right half of the row is the same as the left, if in the lower half ,the right half will the complement of the left one. And the left half of the row is just the whole row of the smaller submatrix!!!!. That row can be generated by the same operation and same for matrix ,128,642 submatrices Take the 3rd row of a 4*4 walsh matrix. 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

3rd row is in the lower half so right half -1 -1 is the complement of 1 1 which is 1 1 the upper half of the smaller matrix , and can be obtained by repeating the 1 1 left half of the row that is 1.

4.3.3.Deinterleaver :
Deinterleaving is performed using block interleaving, with 10*15 matrix. Interleaver: Theory: Used in conjunction with repetition or coding. Interleaving is a form of time diversity that is employed to disperse bursts of errors in time. A sequence of symbols is permuted or interleaved before transmission over a bursty channel. If a burst of errors occurs during transmission, restoring the original sequence to its original ordering has the effect of spreading the errors over time. If the interleaver is designed well, then

99

the errors have a more random pattern that can more easily be corrected by coding techniques. - Block interleaving is known for its ease of implementation, so we used it in our system. Operation: An (I, J) block interleaver can be viewed as an array of storage locations which contains I columns and J rows. The data are written into the array by columns and read out by rows, as demonstrated in Figure the first symbol written into the array is written into the top left corner, but the first symbol read out is from the bottom left corner.

Figure: Reading and writing from and (I, J) block interleaver 4.3.4.BranchMetrics: The branch metrics (BM) are calculated by the DSP and stored in the DSP memory subsystem as 7-bit signed values. Per symbol interval T, for a rate R = k/n and a constraint length K, there are a total of 2K1+k branches in the trellis. For rate 1/n codes, only 2n1 branch metrics need to be computed per symbol period and passed to the VCP. Moreover, n symbols are required to calculate 1 branch metric. Assuming BSPK modulated bits (0 1, 1 1), the branch metrics are calculated as follows: _ BM0(t) = (t)+ (t) _ BM1(t) = (t)- (t) _ Rate 1/2: there are 2 branch metrics per symbol period

where (t) is the received codeword at time t (2 symbols, (t) is the symbol corresponding to the encoder upper branch. The branch metrics can be saved in the DSP memory subsystem in either their native format or packed in words (user implementation). When working in big-endian mode, the VCP endian mode register (VCPEND) has to be programmed accordingly.
100

output[i]= tempr[4*i]+ (tempr[4*i+1]<<8 )+ (tempr[4*i+2]<<16)+ (tempr[4*i+3]<<24);

4.3.5.VCP: Output Data:


The decisions buffer start address must be double-word aligned and the buffer size must contain an even number of 32-bit words. Used VCP parameters:
VCPParameters[2] = { { VCP_RATE_1_2, 9, 113, 235, 0, 0, 0, 150, 100, 24, 250, 0, 0, 16, 16, 3, 1, 0, 0, 0 }

/* rate /* constLen /* poly0 /* poly1 /* poly2 /* poly3 /* yamTh /* frameLen /* relLen /* convDist /* maxSm /* minSm /* stateNum /* bmBuffLen /* decBuffLen /* traceBack /* readFlag /* decision /*numBranchMetrics /* numDecisions

*/ */ * */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */

101

References
[1] M.R.KARIM, MOHSEN SARRAF W-CDMA and cdma2000 for 3G Mobile Networks McGraw Hill Telecom [2] Harri Holma & Antti Toskala .WCDMA for UMTS Radio Access for third generation mobile communications, John Wiley and Sons (Third Edition). [3] Ahsan Aziz, Kim-Chyan Gan, and Imran Ahmed WCDMA_RAKE_Receiver_DSP D&R Industry Articles. [4] WCDMA Radio Network Design, ERICSSON. [5] WCDMA Deployment Handbook Planning and Optimization Aspects, John Wiley and Sons. [6] Code Composer, User manuals, Spru533, TMS320C6000 DSP Viterbi-Decoder Coprocessor (VCP) Reference Guide [7] Code Composer, User manuals, Spra750d, TMS320C6000 DSP Viterbi-Decoder Coprocessor (VCP) Reference Guide.

102

You might also like