Questions about the multi-protocol SCADA ns-3 simulation result data

59 views
Skip to first unread message

Thái Ngô

unread,
May 3, 2026, 7:49:50 AMMay 3
to ns-3-users
Hi there, I'm trying to do this topic "Optimization of SCADA Data Flow in Multi-Protocol Networks using Machine Learning Algorithms" for the thesis.

My goal is to develop a multi-protocol SCADA network simulation model on ns-3, then apply Decision Tree & Random Forest to classify data traffic. I tried to implement a SCADA network with multiple protocol (including Modbus, DNP3, OPC-UA, IEC 104 and MQTT). And I made a plan to visualize it for a 3-phase period: normal, high-load, and emergency. The visualization worked fine, but after watching the .csv output file, the packet-loss during every phase always remains as 0, which is weird and unrealistic.

Also, I really wanted to know if the output was realistic enough to help me accomplish my initial goal. Has there anyone in this group done the same topic as me? If yes, then please discuss with me for references. Or please suggest me what to do to make the data more realistic, since I've been struggled for 2 weeks.

I'll include the ns-3 code .cc and the data file .csv in this message for clarity.
features.csv
scada (1).cc

Tommaso Pecorella

unread,
May 4, 2026, 4:57:05 PMMay 4
to ns-3-users
The problem is the definition of "realistic enough".

The protocols you mentioned are Application-level protocols, and you are modeling them as "plain" TCP connections with an average bitrate. This might be ok-ish for a simple simulation, but you're missing all the protocol details, so it's hard to say if the simplification is too much or not.
As an example MQTT is indeed using TCP, but it's a Pub/Sub protocol, and modeling it as a "plain" TCP connection omits all the ACKs, periodic messages, unsolicited messages between the broker and the Subscribers, and so on.
Is this a critical point? Depends on the level of fidelity you need.

About the lack of packet drops, all your connections are P2P.
If the datarate of the sources do not exceed the link capacity you'll never see any packet drop.
I didn't check the numbers, but it's simple enough to do the math.

It would have been different with wireless links, because packets could be dropped by channel errors, but on P2P or CSMA links the only drops are due to:
- Error models on the links (you didn't add any), or
- Link capacity exceeded (and finite buffers on the NetDevices).
but to see the link capacity exceeded drops you'd need (probably) bursty traffic (not very SCADA-ish tho).

Suggestion: before tweaking your simulation I'd work a bit on the system model, and the definition of what you're trying to optimize.

Thái Ngô

unread,
May 5, 2026, 5:21:39 AMMay 5
to ns-3-users
Dear Professor,

I would like to thank you for pointing out my limitations. I was not expecting to receive such valued responses.

I am an amateur, and from my research, there are not much contents about modeling these protocols on ns-3, so I am stuck on implementing them the right way. It is indeed a critical point for my thesis since it affects the final .csv results. Do you mind elaborating more on other protocols (Modbus, DNP3, OPC-UA and IEC 104)? I know it is too much to ask for, but are there any code samples for me to learn from?

I was trying to build a 3-layer SCADA network system and use its data flows during the process to optimize the classification and routing of its packets (by Decision Tree/ Random Forest); and then compare the latency, throughput, and performance between each ML-enhanced system.

The network topology is as followed:
- Core Layer (Master Terminal Unit): a central node acting as the Master Station, responsible for collecting telemetry data from the entire system and issuing control commands to field devices.
- Distribution Layer (Gateway): 3 gateway nodes responsible for data forwarding and network segmentation. Each gateway manages a distinct subsystem: Power, Production and Sensor subsystem.
- Access Layer (RTU/IED/PLC/Sensor): representing field devices; each node runs a specific SCADA protocol and transmits data to the Master via the corresponding gateway.

It would be nice if we can discuss this topic more. May I text you through LinkedIn?

Have a great day. I look forward to your responses.

Best regards,
Reply all
Reply to author
Forward
0 new messages