Skip to content

k-zhai/CPSVariableFidelity

Repository files navigation

Multi-Fidelity Network Simulation

From VUSE website:

Cyber-Physical systems are engineering systems where the functionality emerges from networked interactions among the physical and computational components. Thus for simulation based evaluation of CPS, communication network simulation is a central piece that must almost always be integrated with rest of the heterogeneous simulations. In such large-scale CPS simulation based studies, the actual mechanism by which certain network effects such as cyber-attacks, or packet delays and drops, becomes less important as compared to the overall impact of such effects. For that to be simulated along with large CPS simulations, it becomes highly expensive to simulate communication networks at packet levels through all the OSI layers. At the same time, for certain effects to be simulated that is exactly is necessary. In order to balance the increased efficiency of higher-level network simulation with high-fidelity of packet-level simulation, we propose to create an architecture that allows the simulators to dynamically vary the fidelity level of the network simulation during run-time. The key research challenges that we want to address in this project are: (1) to develop, using an open-source simulation tool, a network simulation architecture that enables varying the network model's fidelity levels during run-time, (2) to maintain consistency of network data during such transitions, and (3) generate use-cases to demonstrate both the feasibility and applicability of this approach.

Both TCP and UDP routing are simulated by utilizing the INET open-source framework and the OMNeT++ Discrete Event Simulator. In the network, the SensorNode module acts as a client, the DFNode module is both a client and server, and the MasterNode module acts as a server. In the TCP network, the SensorNode and MasterNode modules are based on the TCPBasicClientApp and TCPGenericServerApp applications respectively, both provided by INET. The DFNode module implements methods from both the SensorNode and MasterNode modules. The simulation is controlled via a singleton ExperimentControl module. This module schedules two self-messages upon initialization:

1. at the start time when the route is changed from going through all OSI layers to only a specified few
2. at the end time when the route is changed back to simulating all layers

At these times, the ExperimentControl node sends a direct message to all other nodes. Upon receiving the "start" message, these nodes destroy the socket. For the duration of the switch, data passes among the nodes via direct messages with some estimated propagation delay implemented using self-messages. This propagation delay is estimated based on previous runs and propagation delays along the original routes. Upon receiving the "end" message, nodes recreate the sockets and reestablish connections, after which the data is transmitted normally.

The data indicates that processing messages is faster with direct messages, as was predicted. With TCP connections, the average round-trip time (RTT) is 0.0492, whereas it is 0.02s with direct messages. Similarly, the average RTT with UDP connections is 0.03656s, whereas it is 0.02s with direct messages. We note that switching the route decreases the total wall-clock time of the simulation in both TCP and UDP networks. As indicated in the graphs below, the wall time elapsed during direct messaging is significantly less than when simulating all OSI layers.

Upon simulating both networks with a packet error rate (PER) of 0.001, observation indicates that retransmission rates and and total packets loss do not increase while sending messages directly from the application layer. This may be useful for simulations in which such packet losses and retransmissions should be ignored to visualize certain effects on the network.

Currently, the route can be switched to go through only the application layer. Future goals include extending this capability to more layers, e.g. simulating layers 1-3 of the OSI model.

Releases

No releases published

Packages

No packages published