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)
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
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: !
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
0| 1|
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
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.
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
3 2 . 2
A A
C B 3 possibilities C
14
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,
15
P( j ) = P( j rt )
t
rt at j
P(0)=1 P(
)=0
if
<0
Where
rt
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) = +
16
And so on. Recursively we can get each probability. In order to normalize (j) =
so that = 1
=
1
17
Chapter 3
Assume is signal to interference-plus-noise ratio of user i at the base statio (BS) =
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
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
At BS the ratio
1 1 1
If
Since
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
. If loading plus
is taken as a log normally distributed random variable. This means that log is Gaussian. Blocking
20
log log 1
log
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=
std(x) ==x
exp (-
) ) dx=
E (Iother) = =
exp (-
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
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) =
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
Note that in (c, j), c can be anything from 0 (no users active) to j (all users active).
23
P (j) = Pj (t) =
For every j:
(c, j) = [(c-rt, j- rt) vt+ (c, j- rt) (1- vt) B (t, j) = c, jt, c
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 ,
1.2 10 ,
For 0.6
24
0.57
5 10 ,
0.67
1.7 10 ,
For 0.2
(t, j)
1 2 2
25
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 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.
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
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,)
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
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??
(1)
(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.
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
32
33
34
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, , , , , , , , , , , , ,
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
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.
, , ,
, , 1 , , , ,
,
, ,
, ,
, , , , 1 , , , ,
, ,
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.
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.
W/Hz
, 0.5
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.
**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.
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
43
44
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].
46
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.
10 log
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
from the cell edge probability () and the standard deviation in the area (), as shown in the equation : LNF = NORMINV(, 0, ) = Q() Where:
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.
49
50
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
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
10
Where,
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:
53
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
56
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.
sin 2 ) cos2
57
Explanation of terms:
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.
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
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]
59
, , 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
At point B:
, , sin , , cos
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
62
is synchronized with , ? What if , A 'one' from , would be multiplied by a 'one' from , . A minus 'one' by a
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).
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,
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
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
,
,
, , , ,
What is fz,(Z,)?
sin
, ,
, ,
Let
, ,
, ,
cos
cos sin
1 2 0
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 ||
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.
66
0 0 0 0 0 0 0 2 0 . 0
needs to be: 0
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?
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.
Vf(Z| Vf(Z|un-sync)
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
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
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.
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
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.
Laplace
we have L i.i.d
73
dZ
Let
=x
!
PF= =(
( )( x ! !
) expxdx x
x expx dx
=(
{ (L)-(L) inc (
expxdx - x expxdx)
, 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=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
Estimate , E
cos(2fct)
F Estimate ,
B
,
sin(2fct)
synchronization circuit.
At point D:
, , , , , , , , 0, , , , , 0, , ,
and 0,
, , ,
Similarly,
, ,
, ,
, ,
78
, , , , , , , , , , ,
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 , (, , + , , ) + , , + , ,
[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 / 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
80
Hence
= =
From page 22
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.
81
one as possible. This can be achieved by increasing pilot energy 0, and number of averaged chips to estimate channel.
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.
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.
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
| |
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
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
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
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.
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
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
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?
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.
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
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
j=2
Received sequence
j=3
Received sequence
j=4
90
Received sequence
j=5
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
~ 10 log 2
2 2
for
2 ~
93
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
This upper bound depends on the desired confidence. Suppose that we want the probability that
/
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,
, ,
. . . . ,
0 1 1
01 1
| | 1
unbiased estimator
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
Version 3
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.
4.2.Code sequence:
First the scrambling code is generated and packed into words,
scrambling_code_generator(Tx->oversampled_scrambling_code);
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
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
/* 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