inet-framework / simulte

SimuLTE - LTE System Level Simulation Model and Simulator for INET & OMNeT++ - deprecated, use Simu5G instead
https://simulte.omnetpp.org
Other
137 stars 110 forks source link

Superpositioning mobility not working correctly in simulte #59

Open Vaishnavteju opened 3 years ago

Vaishnavteju commented 3 years ago

Hello everyone,

I am working on OMNET++ 5.6.2, INET 4.2.2 and simulte-1.2.0. In INET with the help of superpositioning and attached mobility, one user(StandardHost module) can orbit around another user (StandardHost module) in circular motion. But when I try to use the same mobilities in the latest version of simulte, I am not able to see the user orbiting around another in circular motion. Here both the user 0 and user 1 are pointed to Ue module. Can anyone please help me out with this problem. Are there any specific parameters which should be included to make this mobility work?

wischhof commented 3 years ago

The Ue node of simulte currently does not evaluate the new .type parameter for the mobility module (as the StandardHost does) but still uses a parameter named "mobilityType". Until this is updated, you need to set the mobilityType parameter.

For example, to change the SingleCell-DL scenario so that is has ue[0] traveling a hexagon shape and ue[1] orbit around ue[0] you can use the following as wirhin section "superpositioning test" in the following omnetpp.ini:

[General]
image-path=../../images
#record-eventlog = true
output-scalar-file-append = false
print-undisposed = true
**.vector-recording = false
**.routingRecorder.enabled = false

#============= Simulation parameters ================
sim-time-limit=50s
warmup-period=2s
repeat = 1

#============= Mobility parameters ================
**.mobility.constraintAreaMinZ = 0m
**.mobility.constraintAreaMaxZ = 0m

#============= AMC module parameters ================
**.rbAllocationType = "localized"
**.cellInfo.numRbDl = 6
**.cellInfo.numRbUl = 6
**.numBands = 6

#============= Statistics ================
output-scalar-file = ${resultdir}/${configname}/${repetition}.sca
output-vector-file = ${resultdir}/${configname}/${repetition}.vec
seed-set = ${repetition}

##################################################
# SingleCell Configuration                       #
# - Add DL traffic to the parent configuration   #         
##################################################
[Config SingleCell-DL]
extends=_SingleCell
description =

*.ue[*].app[0].typename = "VoIPReceiver"
*.server.app[*].destAddress = "ue["+string(ancestorIndex(0))+"]" # obtain the address of the client by reading its index in the array of udpApps
*.server.app[*].localPort = 3088+ancestorIndex(0) 
*.server.app[*].typename = "VoIPSender"
*.server.app[*].startTime = uniform(0s,0.02s)
#------------------------------------#

##################################################
####     superposition test      #####
##################################################
*.ue[0].mobilityType = "TurtleMobility"                # can be removed as soon as Ue supports .typename
*.ue[0].mobility.typename = "TurtleMobility"           
*.ue[0].mobility.turtleScript = xmldoc("config.xml")

*.ue[1].mobilityType = "SuperpositioningMobility"      # can be removed as soon as Ue supports .typename
*.ue[1].mobility.typename = "SuperpositioningMobility"
*.ue[1].mobility.numElements = 2
*.ue[1].mobility.element[0].typename = "AttachedMobility"
*.ue[1].mobility.element[0].mobilityModule = "^.^.^.ue[0].mobility"
*.ue[1].mobility.element[1].typename = "CircleMobility"
*.ue[1].mobility.element[1].cx = 0m
*.ue[1].mobility.element[1].cy = 0m
*.ue[1].mobility.element[1].r = 50m
*.ue[1].mobility.element[1].constraintAreaMinX = -50m
*.ue[1].mobility.element[1].constraintAreaMaxX = 50m
*.ue[1].mobility.element[1].constraintAreaMinY = -50m
*.ue[1].mobility.element[1].constraintAreaMaxY = 50m
*.ue[1].mobility.element[1].speed = -50mps

*.ue[1].mobility.element[1].faceForward = true
*.ue[1].mobility.element[0].faceForward = false

**.faceForward = true

*.ue[1].mobility.faceForward = true

*.*.mobility.displayStringTextFormat = "p: %p\nv: %v\nP: %P"

##################################################
# SingleCell Configuration                       #
# - Add UL traffic to the parent configuration   #         
##################################################
[Config SingleCell-UL]
extends=_SingleCell
description =

*.server.app[*].typename = "VoIPReceiver"
*.server.app[*].localPort = 3000+ancestorIndex(0)
*.ue[*].app[*].destAddress = "server" 
*.ue[*].app[*].destPort = 3000+ancestorIndex(1)
*.ue[*].app[*].localPort = 3088 
*.ue[*].app[*].typename = "VoIPSender"
*.ue[*].app[*].startTime = uniform(0s,0.02s)
#------------------------------------#

##################################################
# MultiCell Configuration                        #
# - Add DL traffic to the parent configuration   #         
##################################################
[Config MultiCell-DL]
extends=_MultiCell
description =

#============= Application Setup =============
*.ue*.app[*].typename = "VoIPReceiver"
*.server.app[*].typename = "VoIPSender"
*.server.app[0].destAddress = "ue11" 
*.server.app[1].destAddress = "ue12"
*.server.app[2].destAddress = "ue21"
*.server.app[3].destAddress = "ue22"
*.server.app[*].localPort = 3088+ancestorIndex(0) 
*.server.app[*].startTime = uniform(0s,0.02s)
#------------------------------------#

######################################################
# MultiCell Configuration                            #
# - Add External Cells to the parent configuration   #         
######################################################
[Config MultiCell-DL-ExtCells]
extends=MultiCell-DL
description =

*.numExtCells = 2

#============= Configuration ============
*.extCell[*].txPower = 20
*.extCell[*].txDirection = "ANISOTROPIC"
*.extCell[*].bandAllocationType = "RANDOM_ALLOC"
*.extCell[*].bandUtilization = 0.5

#============= Positioning ============
*.extCell[0].position_x = 100m
*.extCell[0].position_y = 600m 
*.extCell[0].txAngle = 315
*.extCell[1].position_x = 600m
*.extCell[1].position_y = 600m
*.extCell[1].txAngle = 225

#####################################
# SingleCell Base Configuration     #
#####################################
[Config _SingleCell]
network = lte.simulations.networks.SingleCell
description = Abstract configuration. Do NOT run!
*.configurator.config = xmldoc("demo.xml")

*.numUe = ${numUEs=2}

#============= Amount of applications ================
*.ue[*].numApps = 1
*.server.numApps = ${numUEs} # applications on server should be equal to (numUEs)*(ue[*].numUdpApps) 

# connect each UE to the eNB
**.ue[*].macCellId = 1
**.ue[*].masterId = 1

#============= Positioning and mobility ============
*.eNB.mobility.initFromDisplayString = false
*.eNB.mobility.initialX = 300m
*.eNB.mobility.initialY = 300m
**.constraintAreaMinX = 0m
**.constraintAreaMaxX = 400m
**.constraintAreaMinY = 0m
**.constraintAreaMaxY = 400m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxZ = 0m
*.ue[*].mobility.initFromDisplayString = false
*.ue[*].mobility.initialX = uniform(0m,600m)
*.ue[*].mobility.initialY = uniform(0m,600m)
*.ue[*].mobility.speed = 10mps
*.ue[*].mobilityType = "LinearMobility"
#------------------------------------#

#####################################
# MultiCell Base Configuration      #
#####################################
[Config _MultiCell]
network = lte.simulations.networks.MultiCell
description = Abstract configuration. Do NOT run!
*.configurator.config = xmldoc("demo.xml")

#============= Amount of applications ================
*.ue*.numApps = 1
*.server.numApps = 4

# connect each UE to its serving eNB
**.ue1*.macCellId = 1
**.ue1*.masterId = 1
**.ue2*.macCellId = 2
**.ue2*.masterId = 2

#============= Positioning and mobility ============
*.eNodeB*.mobility.initFromDisplayString = false
*.eNodeB1.mobility.initialX = 100m
*.eNodeB1.mobility.initialY = 100m
*.eNodeB2.mobility.initialX = 600m
*.eNodeB2.mobility.initialY = 100m
*.eNodeB*.lteNic.phy.txDirection = "ANISOTROPIC"
*.eNodeB1.lteNic.phy.txAngle = 45
*.eNodeB2.lteNic.phy.txAngle = 135
*.ue*.mobility.constraintAreaMaxX = 1000m
*.ue*.mobility.constraintAreaMaxY = 1000m
*.ue*.mobility.constraintAreaMinX = 0m
*.ue*.mobility.constraintAreaMinY = 0m
*.ue*.mobility.initFromDisplayString = false
*.ue1*.mobility.initialX = uniform(100m,250m)
*.ue1*.mobility.initialY = uniform(100m,250m)
*.ue2*.mobility.initialX = uniform(350m,600m)
*.ue2*.mobility.initialY = uniform(100m,250m)
#------------------------------------#
Vaishnavteju commented 3 years ago

Hi,

I have included all the parameters you have mentioned for the superpositioning test but yet the user[1] is not orbiting around user[0] in circular motion.

wischhof commented 3 years ago

Could you post your omnetpp.ini ? For me, the omnetpp.ini from above shows the expected behavior (ue[1] orbiting around ue[0])

Vaishnavteju commented 3 years ago

.constraintAreaMinX = 0m .constraintAreaMinY = 0m .constraintAreaMinZ = 0m .constraintAreaMaxX = 2000m .constraintAreaMaxY = 2000m .constraintAreaMaxZ = 0m

**.mobility.initFromDisplayString = false

.User[0].mobilityType = "RandomWaypointMobility" .User[0].mobility.typename = "RandomWaypointMobility" *.User[0].mobility.speed = 20mps

.OrbitingUser[0].mobilityType = "SuperpositioningMobility" .OrbitingUser[0].mobility.typename = "SuperpositioningMobility" .OrbitingUser[0].mobility.numElements = 2 .OrbitingUser[0].mobility.element[0].typename = "AttachedMobility" .OrbitingUser[0].mobility.element[0].mobilityModule = "^.^.^.User[0].mobility" .OrbitingUser[0].mobility.element[1].typename = "CircleMobility" .OrbitingUser[0].mobility.element[1].cx = 0m .OrbitingUser[0].mobility.element[1].cy = 0m .OrbitingUser[0].mobility.element[1].r = 150m .OrbitingUser[0].mobility.element[1].constraintAreaMinX = -150m .OrbitingUser[0].mobility.element[1].constraintAreaMaxX = 150m .OrbitingUser[0].mobility.element[1].constraintAreaMinY = -150m .OrbitingUser[0].mobility.element[1].constraintAreaMaxY = 150m .OrbitingUser[0].mobility.element[1].speed = -50mps

.OrbitingUser[0].mobility.element[1].faceForward = true .OrbitingUser[0].mobility.element[0].faceForward = false

*.faceForward = true .OrbitingUser[0].mobility.faceForward = true ..mobility.displayStringTextFormat = "p: %p\nv: %v\nP: %P"

Here, User and OrbitingUser are of type Ue.

Vaishnavteju commented 3 years ago

Also, when I try to run the exact example that you have provided it throws this error image

Vaishnavteju commented 3 years ago

@wischhof can you please help me out with this problem.

wischhof commented 3 years ago

Unfortunately, I was completely under water last week... sorry for the delay.

The error message indicates that the z-coordinate was not properly initialized. Check that you use correct init and constraint area values, e.g. "**.constraintAreaMinZ = 0m" etc.

Furthermore, I tried to reproduce the problem using the parts of omnetpp.ini that you provided. I replaced "User[0]" with "ue[0]" and "OrbitingUser[0]" with ue[1] so I can use the standard scenario. However, I do not get any error and everything seems to work as expected (simulte 1.2.0 with inet 4.2.2.) ... Here is the full config, if you want to give it a try:

[General]
image-path=../../images
output-scalar-file-append = false
sim-time-limit=30s

############### Statistics ##################
output-scalar-file = ${resultdir}/${configname}/${repetition}.sca
output-vector-file = ${resultdir}/${configname}/${repetition}.vec
seed-set = ${repetition}
**.vector-recording = false

[Config Stationary]
network = lte.simulations.networks.SingleCell
**.numUe = 2

*.configurator.config = xmldoc("demo.xml")

################ Standard mobility parameters #####################
**.constraintAreaMinZ = 0m
**.constraintAreaMaxZ = 0m
**.constraintAreaMaxX = 1000m
**.constraintAreaMinX = 0m
**.constraintAreaMaxY = 1000m
**.constraintAreaMinY = 0m

# one application for each user
*.ue[*].numApps = 1

# the base scenario has only one TCP connection from ue[0] to ue[1] (no app on server)
# *.server.numApps = 0

# connect each UE to the eNB
**.ue[*].macCellId = 1
**.ue[*].masterId = 1

# positioning and mobility
#*.ue[*].mobility.initialMovementHeading = uniform(0deg, 360deg)
*.ue[*].mobility.initFromDisplayString = false
*.ue[*].mobility.initialX = uniform(0m,300m)
*.ue[*].mobility.initialY = uniform(0m,300m)
*.ue[*].mobility.initialZ = 0m
*.ue[*].mobilityType = "StationaryMobility"   # will be removed as soon as Ue node uses typename

#============= Application Setup =============
# Traffic between UEs (ue[0] --> ue[1])
# Transmitter
*.ue[0].app[*].typename = "TcpSessionApp"
*.ue[0].app[*].localPort = 1000
*.ue[0].app[*].sendBytes = 1GiB
*.ue[0].app[0].tOpen = uniform(0.010s,0.1s) 
*.ue[0].app[0].tSend = uniform(0.15s,0.5s) 
*.ue[0].app[0].connectAddress = "ue[1]" 
*.ue[0].app[0].localAddress = "ue[0]" 

# Receiver
*.ue[1].app[*].typename = "TcpSinkApp"
*.ue[1].app[*].localPort = 1000

**.app[*].tClose = -1s

[Config Orbit]
extends = Stationary

# randomly moving user:
*.ue[0].mobilityType = "RandomWaypointMobility"         # will be removed as soon as Ue node uses typename
*.ue[0].mobility.typename = "RandomWaypointMobility"
*.ue[0].mobility.speed = 20mps

# the orbiting user:
*.ue[1].mobilityType = "SuperpositioningMobility"      # will be removed as soon as Ue node uses typename
*.ue[1].mobility.typename = "SuperpositioningMobility"
*.ue[1].mobility.numElements = 2
*.ue[1].mobility.element[0].typename = "AttachedMobility"
*.ue[1].mobility.element[0].mobilityModule = "^.^.^.ue[0].mobility"
*.ue[1].mobility.element[1].typename = "CircleMobility"
*.ue[1].mobility.element[1].cx = 0m
*.ue[1].mobility.element[1].cy = 0m
*.ue[1].mobility.element[1].r = 150m
*.ue[1].mobility.element[1].constraintAreaMinX = -150m
*.ue[1].mobility.element[1].constraintAreaMaxX = 150m
*.ue[1].mobility.element[1].constraintAreaMinY = -150m
*.ue[1].mobility.element[1].constraintAreaMaxY = 150m
*.ue[1].mobility.element[1].speed = -50mps

*.ue[1].mobility.element[1].faceForward = true
*.ue[1].mobility.element[0].faceForward = false

**.mobility.displayStringTextFormat = "p: %p\nv: %v\nP: %P"
wischhof commented 3 years ago

I have also included a simulation for testing the superpositioning within the CI: You can simply clone

https://github.com/roVer-HM/simulte

The simulation for testing mobility is within the new folder simulations/advmobility

(requires INET 4.3.0 and Omnetpp 6.0pre10)