Unipisa / Simu5G

Simu5G - 5G NR and LTE/LTE-A user-plane simulation model for OMNeT++ & INET
https://simu5g.org
Other
142 stars 81 forks source link

Horizontal Handover Decision #147

Closed ChristophPargfrieder closed 1 year ago

ChristophPargfrieder commented 1 year ago

Hey,

I am quite new to OMNET++ and Simu5G and I want to implement my own algorithms for horizontal handovers. I have set up a scenario using SUMO and several gNBs (inspired by the cars and standalone_multicell example). Now, I want to implement my handover strategies, but I am quite lost where to start.

Where in the code exactly does the handover decision happen? I think this would be then an interesting starting point.

Best Regards, Christoph

giovanninardini commented 1 year ago

Hello,

please take a look at the LtePhyUe::handoverHandler() function (here). That is the function that, for each gNB, computes the strength of the received power at the UE and selects the gNB with the higher value.

Best regards. Giovanni

ChristophPargfrieder commented 1 year ago

Hello,

please take a look at the LtePhyUe::handoverHandler() function (here). That is the function that, for each gNB, computes the strength of the received power at the UE and selects the gNB with the higher value.

Best regards. Giovanni

Thank you very much for the reply!

I am just looking into the code and try to understand how this works. The handoverHandler() is called in handleAirFrame() when the frametype of the incoming message is HANDOVERPKT. What component sends this message to the UE? And what event triggers that component to send this message? Are these broadcast messages sent periodically from each gNBs?

giovanninardini commented 1 year ago

Exactly, every gNB sends an airframe with type HANDOVERPKT periodically to all UEs. The default period is 1 second, but it can be changed via the parameter broadcastMessageInterval of the CellInfo submodule of the gNB.