Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

NS-3: LTE Random Access Procedure

No description
by

Saulo da Mata

on 23 February 2016

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of NS-3: LTE Random Access Procedure

NS-3: LTE Random Access Procedure
Saulo da Mata
www.saulodamata.com
Let`s follow a brief description of the Random Access procedure in a LTE network.
Suppose a scenario with one eNB and 10 UEs...
Internet
SGW/PGW
Remote Host
...that are receiving packets from a remote host.
First, UEs receive an IMSI from the network. In NS-3, LteHelper is responsible for this task, when it installs the LTE Devices to the nodes.
Ptr<NetDevice> LteHelper::InstallSingleUeDevice (Ptr<Node> n)
In the code:
0 ms
0 ms / frame 1 / subframe 1
With a IMSI, the UE changes its state...
IDLE_CELL_SELECTION
IDLE_WAIT_SYSTEM_INFO
from
to
16 ms / frame 2 / subframe 6
UE receives the system information, configures the Random Access Channel (RACH) and change its state...
IDLE_WAIT_SYSTEM_INFO
IDLE_CAMPED_NORMALLY
from
to
Afterward, the UE tries to establish a connection and change its state...
IDLE_CAMPED_NORMALLY
IDLE_RANDOM_ACCESS
from
to
void LteUeRrc::SwitchToState (State newState)
In the code:
In the code:
void LteUeRrc::DoRecvSystemInformation (LteRrcSap::SystemInformation msg)
void LteUeRrc::StartConnection ()
In the code:
In the next step, UE starts a Contention Based Random Access Procedure. Each UE selects a Random Preamble and sends it to eNB.
34
37
16
47
9
5
13
34
17
2
void LteUePhy::DoSendRachPreamble (uint32_t raPreambleId, uint32_t raRnti)
In the code:
18 ms / frame 2 / subframe 9
Enb receives the Rach Preambles, put them in crescent order and starts to assign the RNTIs.

Whenever two or more identical preambles are transmitted in same cell at the same TTI, none of these identical preambles will be received by the eNB.
void LteEnbMac::DoSubframeIndication (uint32_t frameNo, uint32_t subframeNo)
In the code:
Preamble Id IMSI RNTI
2 10 1
5 6 2
9 5 3
13 7 4
16 3 5
17 9 6
37 2 7
47 4 8
34 1 collision
34 8 collision
In the next step, we have the Rach Allocation, according to UL resources.
RNTI rbStart rbLen
1 0 6
2 6 6
3 12 6
4 18 6
void PfFfMacScheduler::DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::SchedDlTriggerReqParameters& params)
In the code:
In this simulation we are using an Uplink bandwidth of 25 RBs. As each UE receives 6 RBs, only the 4 first UEs can be allocated. The other 6 UEs will have to start the Random Access procedure again. This is automatic, as soon as the timeout is reached.
When the UE sends the preamble to eNB, it triggers a timeout of 6 ms (default). If it get no answers about the conclusion of the Random Access Procedure in this interval, it starts the procedure again.

This process is repeated until the UE gets connected or reaches the maximum number of preamble transmissions. The default max transmission value is 50. Afterward, the UE stop trying to connect.

The max transmission value can be set on LteEnbMac::GetTypeId() method.
void LteUeMac::SendRaPreamble (bool contention)
In the code:
When timeout is reached, UEs send again a new Preamble Id to eNB, and schedule a new timeout.
22 ms / frame 3 / subframe 2
30
46
48
48
19
9
void LteUePhy::DoSendRachPreamble (uint32_t raPreambleId, uint32_t raRnti)
In the code:
23 ms / frame 3 / subframe 4
Enb receives the Rach Preambles, put them in crescent order and starts to assign the RNTIs, incrementing the last value in RNTI variable.
void LteEnbMac::DoSubframeIndication (uint32_t frameNo, uint32_t subframeNo)
In the code:
Preamble Id IMSI RNTI
9 8 9
14 9 10
19 4 11
30 1 12
46 2 13
48 3 14
23 ms / frame 3 / subframe 4
In the next step, we have the Rach Allocation, according to UL resources.
RNTI rbStart rbLen
9 0 6
10 6 6
11 12 6
12 18 6
void PfFfMacScheduler::DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::SchedDlTriggerReqParameters& params)
In the code:
Only the 4 first UEs could be allocated. The other 2 UEs will have to start the Random Access procedure again. This is automatic, as soon as the timeout is reached.
When timeout is reached, UEs send again a new Preamble Id to eNB, and schedule a new timeout.
28 ms / frame 3 / subframe 8
24
27
void LteUePhy::DoSendRachPreamble (uint32_t raPreambleId, uint32_t raRnti)
In the code:
29 ms / frame 3 / subframe 10
Enb receives the Rach Preambles, put them in crescent order and starts to assign the RNTIs, incrementing the last value in RNTI variable.
void LteEnbMac::DoSubframeIndication (uint32_t frameNo, uint32_t subframeNo)
In the code:
Preamble Id IMSI RNTI
24 2 15
27 3 16
29 ms / frame 3 / subframe 10
In the next step, we have the Rach Allocation, according to UL resources.
RNTI rbStart rbLen
15 0 6
16 6 6
void PfFfMacScheduler::DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::SchedDlTriggerReqParameters& params)
In the code:
Now all the UEs completed the Random Access procedure.
When the eNB assigns a RNTI for a given preamble ID sent by an UE, it triggers a connection timeout of 15 ms (default). If this UE does not pass through the RACH Allocation, at the end of this timeout the RNTI chosen is released for a new UE assignment.
void UeManager::DoInitialize ()
In the code:
33 ms / frame 4 / subframe 3
Connection Timeout. Releasing RNTIs 5, 6, 7 and 8.
void LteEnbRrc::ConnectionTimeout (uint16_t rnti)
In the code:
38 ms / frame 4 / subframe 8
Connection Timeout. Releasing RNTIs 13 and 14.
void LteEnbRrc::ConnectionTimeout (uint16_t rnti)
In the code:
40 ms
frame 1
frame 2
frame 3
frame 4
10 ms
20 ms
30 ms
Location in the code
0 ms / frame 1 / subframe 1
16 ms / frame 2 / subframe 6
16 ms / frame 2 / subframe 6
16 ms / frame 2 / subframe 6
subframe 1
subframe 6
subframe 9
subframe 2
subframe 8
subframe 3
18 ms / frame 2 / subframe 9
18 ms / frame 2 / subframe 9
subframe 4
subframe 10
subframe 8
Let`s follow the timeline to understand how each UE gets its RNTI.
Random Access Procedure concluded!
To download the script used in the simulation: https://goo.gl/7HWenR
Full transcript