Can change LTE EnbDeviceAttribute parameters in the simulation process?

552 views
Skip to first unread message

hongyu deng

unread,
Mar 22, 2016, 8:57:01 AM3/22/16
to ns-3-users
Hi all,
Can i change LTE EnbDeviceAttribute parameters in the simulation process?
I do like this:
static void Dl_UlEarfcnChange(uint8_t dlEarfcn, uint32_t ulEarfcn)
{
  lteHelper->SetEnbDeviceAttribute ("DlEarfcn", UintegerValue (dl));
  lteHelper->SetEnbDeviceAttribute ("UlEarfcn", UintegerValue (ul));
}
Simulator::Schedule (Seconds (3.0), &Dl_UlEarfcnChange,120,18200);

But it does not work,it only Run in the default parameters.
   lteHelper->SetEnbDeviceAttribute ("DlEarfcn", UintegerValue (100));
   lteHelper->SetEnbDeviceAttribute ("UlEarfcn", UintegerValue (18100));
Does anybody know how to change EnbDeviceAttribute through Simulator::Schedule()? or other method.

Any help is appreciated!

BRS,
Hongyu.

Konstantinos

unread,
Mar 22, 2016, 9:34:13 AM3/22/16
to ns-3-users
Hi Hongyu,

Usage of "helper" classes is generally restricted to the setup phase of the simulation. 
If you want to change an attribute during runtime, you need to get smart pointer for the object you want to change and change it.
Particularly in this case, you need to get the reference to the EnbNetDevice object and change the attribute for that particular object.

Regards,
K.

hongyu deng

unread,
Mar 22, 2016, 9:59:25 AM3/22/16
to ns-3-users
Hi Konstantinos,
Thanks for your reply,It's very helpful for me.
I will have a try and show the result.

BRs,
Hongyu.

Marco Miozzo

unread,
Mar 22, 2016, 10:09:16 AM3/22/16
to ns-3-...@googlegroups.com
be careful that EARFCN is a sensitive parameter in LTE, in fact LteEnbDevice is in charge to spread it to the whole LTE radio stack. This implies that by only changing it in the LteEnbNetDevice will no have any effect in the protocol stack (i.e., try to have a look to LteEnbNetDevice::UpdateConfig). Moreover, the protocol stack is not designed for changing the bandwidth at run-time, therefore I would expect that it will not easily work and you will need to update many protocols in the stack.
Why don't use the CA framework and move UEs across the carriers?


best,
marco.



--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

hongyu deng

unread,
Mar 22, 2016, 11:12:04 AM3/22/16
to ns-3-users
Hi Marco,
Thanks for your reply!
be careful that EARFCN is a sensitive parameter in LTE, in fact LteEnbDevice is in charge to spread it to the whole LTE radio stack. This implies that by only changing it in the LteEnbNetDevice will no have any effect in the protocol stack (i.e., try to have a look to LteEnbNetDevice::UpdateConfig). Moreover, the protocol stack is not designed for changing the bandwidth at run-time, therefore I would expect that it will not easily work and you will need to update many protocols in the stack.
As you said,it does not effect the protocol stack,and the parameters will change in ENB but not synchronize with UE.
Even if i change like this,it doesn't work in different frequency.
static void SetDl_UlEarfcn(Ptr< NetDevice > enbLteDevs, uint16_t dlEarfcn, uint16_t ulEarfcn)
{
  Ptr<LteEnbNetDevice> newLteEnbNetDevice = enbLteDevs->GetObject<LteEnbNetDevice> ();
  newLteEnbNetDevice->SetDlEarfcn (dlEarfcn);
  newLteEnbNetDevice->SetUlEarfcn (ulEarfcn);
}
Simulator::Schedule (Seconds (3.0), &SetDl_UlEarfcn, enbLteDevs.Get(0), 120, 18200);

The UE only work in default parameters:
lteHelper->SetEnbDeviceAttribute ("DlEarfcn", UintegerValue (100));
lteHelper->SetEnbDeviceAttribute ("UlEarfcn", UintegerValue (18100));
Why don't use the CA framework and move UEs across the carriers?
 
For your advice,sorry for my limited knowledge,i will appreciate if you could explain CA framework  to me in detail or send me some papers about CA framework and how to  move UEs across the carriers?
Does CA means carrier aggregation?

Havefun,
Hongyu.

hongyu deng

unread,
Mar 23, 2016, 10:00:34 AM3/23/16
to ns-3-users
Hi Marco,
Follow your guidance,i read the LteEnbNetDevice::UpdateConfig() function and change some parameters ,now the ENB can update its own  parameters in simulation process.Such as ulBandwidth,dlBandwidth,ulEarfcn,dlEarfcn.

I use this method as shown before:
static void SetDl_UlEarfcn(Ptr< NetDevice > enbLteDevs, uint16_t dlEarfcn, uint16_t ulEarfcn)
{
  Ptr<LteEnbNetDevice> newLteEnbNetDevice = enbLteDevs->GetObject<LteEnbNetDevice> ();
  newLteEnbNetDevice->SetDlEarfcn (dlEarfcn);
  newLteEnbNetDevice->SetUlEarfcn (ulEarfcn);
}
Simulator::Schedule (Seconds (3.0), &SetDl_UlEarfcn, enbLteDevs.Get(0), 120, 18200);

When the simulation time arrive,the Schedule will do change.But the APP can only TX data,can not RX data from remoteHost.
Before schedule,the data TX and RX normally(see 2.png). But when time to schedule and ENB finish updateConfig, the data lose its way back(see 1.png, 3.png).

It seems the UE need to reconnect to ENB and update to new link.
I read the source code but do not know where to modify to achieve RX.
Could you give me a guidance? Hope my expression is clear.
Any help is appreciate!

Best Regard,

Hongyu.

1.PNG
2.PNG
3.PNG
NetworkTopology.PNG

Marco Miozzo

unread,
Mar 24, 2016, 4:54:53 AM3/24/16
to ns-3-...@googlegroups.com
CA is Carrier Aggregation, you may find more info at the following link:
https://www.nsnam.org/wiki/GSOC2015LTECA

Regarding the UE, as I suggested you, in order to change the frequency, the UE has to be properly informed (if I remember correct this is done through the MIB message in the attachment phase). LENA does not support the frequency changing at run-time. Therefore, I would recommend to use the CA framework.

Best,
marco.


Hongyu.

hongyu deng

unread,
Mar 24, 2016, 7:40:20 AM3/24/16
to ns-3-users
Hi Marco,
Thank you very much for spending time to answer my questions! it's very helpful for me.
The ns-3.25 was released today,Thanks your work.
Does the CA was included in ns-3.25? I found that the LTE module's examples has no change,it same as ns-3.24.1.Has no CA examples.
How do i use CA in ns-3.25? Could you give some guidance?
I will read the website  recommended by you.
Thanks.

Best,
Hongyu.

Marco Miozzo

unread,
Mar 24, 2016, 10:27:25 AM3/24/16
to ns-3-...@googlegroups.com
Hi,

CA has not yet been included in official ns-3 release, we are currently working on it, but it will take time.
You can either try to merge the repository or use directly the repository of CA, since there is no updates on LTE side from last summer.

Best,
marco.


--

hongyu deng

unread,
Mar 24, 2016, 10:43:15 AM3/24/16
to ns-3-users
Hi Marco,
Do you know where is the repository of CA? Is it in the website you have provided?
How to  use directly the repository of CA?Could you give some advice?
Thanks you very much!

Best,
Hongyu.

Marco Miozzo

unread,
Mar 24, 2016, 11:02:47 AM3/24/16
to ns-3-...@googlegroups.com
Hi,

The repository is on the link I provided you, you can use it as a standard ns-3 distribution.

Best,
marco.


--

hongyu deng

unread,
Mar 24, 2016, 11:06:51 AM3/24/16
to ns-3-users
Hi Marco,
Thank you very much.
I will have a try.Encounter problems hope to get your help again.

Best Regards,
Hongyu.

hongyu deng

unread,
Mar 29, 2016, 3:09:22 AM3/29/16
to ns-3-users
Hi Marco,
I disconnect UE from ENB through Simulator::Schedule(),and reconnect it to ENB after 0.1 second. The UE can reconnect to ENB with different RNTI,
but cannot send data to ENB.it can only RX data from ENB.What happen ?
It's there a way that guarantee the UE reconnect to ENB can also RX data ?
Could you give me a guidance that i can disconnect and reconnect UE from ENB in a correct way,to guarantee the data can RX from remoteHost,and TX to it.
Thanks advance!

Best,
Hongyu.

The Disconnect and Reconnect function is in attachment.
Reconnect_Disconnect.cc

TIM

unread,
Oct 23, 2017, 10:55:15 AM10/23/17
to ns-3-users
Hi Hongyu,

I simulate the LAA scenario and need LTE eNodeB to change earfcn. I have some question about this way to change earfcn. 

1. Are you just call LteEnbNetDevice::UpdateConfig()/ after SetDl_UlEarfcn OR you have another your function to UpdateConfig?

2. If you just use LteEnbNetDevice::UpdateConfig(), I use the following code to reset the earfcn. 

  LteEnbNetDevice->SetDl_UlEarfcn();
  LbtUeNetDevice->SetDl_UlEarfcn();
  LteEnbNetDevice->UpdateConfig();
  LbtUeNetDevice->UpdateConfig();
  deAttach(LbtUeNetDevice LteEnbNetDevice);
  reAttach(LbtUeNetDevice);

I call all of these before the simulation::run() because I just make sure it would work. When I check its earfcn of ltephy. The earfcn of ltephy is same as that before these codes. As a result, I will affect other network although the LTE network can work. 

hongyu deng

unread,
Nov 21, 2017, 10:40:43 PM11/21/17
to ns-3-...@googlegroups.com
Hi Tim,

It seems that can change the earfcn in this way , but actually the eNodeB needs to reboot then the new parameters may work.
Sorry i can not clearly explain! it's undergo a long time, I am a little forget!


Have fun,
HongYu.

TIM

unread,
Nov 22, 2017, 1:14:34 AM11/22/17
to ns-3-users

Hi Hongyu,

Thanks your reply.
It still can't work in my test. Sad..
Could you share your code with me?

Best regards,
TIM

hongyu deng

unread,
Nov 27, 2017, 6:30:46 AM11/27/17
to ns-3-...@googlegroups.com
Hi Tim,

You can have a look in the early mail in this thread. As Marco said, this is no a good way to change the EARFCN parameters in run-time.
Actually, it does not work even you change the EARFCN in run-time, same as me.
The code I use is in this mail list, it DOES NOT work.

Best Regards,
Hongyu.


Have fun,
HongYu.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/j91QwRexCag/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages