Network simulation tool based on multi-process concurrent Wi-SUN protocol
By designing a multi-process concurrent Wi-SUN protocol network simulation tool, we solve the problem that existing technology cannot provide a complete protocol stack and RPL routing protocol support for the Wi-SUN protocol, and achieve efficient simulation and topology of the Wi-SUN network. Simulation supports the self-organizing network behavior of more than 500 nodes, improving the success rate of network deployment and the efficiency of protocol development.
Patent Information
- Application Number
- CN202410876772.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-10-01
AI Technical Summary
Existing simulation software cannot provide complete protocol stack support for the Wi-SUN protocol, and does not support the RPL routing protocol and dynamic network deployment, and cannot effectively simulate the performance and topology of the Wi-SUN network.
A Wi-SUN protocol network simulation tool based on multi-process concurrency is designed, including node module, wireless channel transmission module and data interaction server. It adopts a distributed event-driven structure, supports RPL protocol and dynamic network deployment, and simulates channels through Competition and transmission processes provide a more realistic network simulation environment.
It achieves complete simulation of the Wi-SUN protocol, supports ad hoc network behavior and wireless Mesh network simulation of more than 500 nodes, provides more complete network topology display and link analysis functions, and improves the success rate of network deployment and protocol development. efficiency.
Smart Images

Figure CN118740652A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of network simulation, and in particular relates to a Wi-SUN protocol network simulation tool based on multi-process concurrency. Background Art
[0002] In April 2012, the IEEE 802 Standards Committee officially passed and announced the IEEE 802.15.4e-2012 standard. The proposed channel hopping technology allows time slots to be reused in the channel space, which can effectively reduce the probability of channel competition between nodes. In the research on the IEEE 802.15.4e multi-channel frequency hopping communication mechanism, the Wireless Smart Utility Network (Wi-SUN) came into being. Among them, the Wi-SUN FAN (Fielded Area Network) protocol is mainly used in smart city construction such as water power, electricity meters, and street lights. It is the fastest-growing and most widely used IoT communication protocol in overseas markets in recent years. Wi-SUN achieves a higher transmission rate and a network topology with a wider coverage area through the integration of Mesh networking and active frequency hopping technology. With the widespread application and large-scale deployment of the Wi-SUN protocol, higher requirements are put forward for the further formulation and development of protocol standardization.
[0003] Efficient simulation tools can provide an environment for algorithm verification during the protocol development process, test the performance of the network under extreme conditions, reduce vulnerabilities caused by insufficient consideration in the early stage of development, and improve the success rate of network deployment in the field environment. Compared with more mature communication protocols such as LoRa and Zigbee, most wireless network simulation tools have been developed relatively well, but tools that can provide simulation technology support for the Wi-SUN protocol are relatively scarce. The commonly used general network simulation tool NS-3 integrates a variety of communication protocols and is suitable for a variety of network scenarios such as wireless networks and local area networks. The LR-WPAN module provided in the NS-3 model library supports the Wi-SUN protocol, but its IEEE 802.15.4 protocol only supports the 2006 version, which is quite different from the IEEE 802.15.4-2015 version used in the Wi-SUN protocol. At the same time, NS-3 does not support the RPL routing protocol and can only use fixed routing networking. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a Wi-SUN protocol network simulation tool based on multi-process concurrency in view of the above-mentioned shortcomings, so as to solve the problem that the existing simulation software cannot provide a complete protocol stack.
[0005] According to a first aspect of the present invention, there is provided a Wi-SUN protocol network simulation tool based on multi-process concurrency, comprising: a node module, a wireless channel transmission module, a data interaction server, and an external application module.
[0006] The node module is used to simulate node devices and can realize data sending and receiving. It is built according to the standard protocol stack and is divided into application layer, network layer, data link layer and physical layer. It adopts a distributed event-driven structure to process node events and communication events.
[0007] Optionally, the node module types mainly include border routing nodes, full-function nodes, and function-restricted nodes.
[0008] The wireless channel transmission module is used to simulate the attenuation and noise interference in the wireless signal transmission process, making the transmission process closer to the real environment. According to the node's location information, transmission power, channel frequency band, and data frame length, the channel attenuation caused by the transmission process, such as the signal-to-noise ratio and the peak value of the received signal, is calculated and fed back to the node module at the receiving end.
[0009] The data interaction server is used to simulate the radio frequency data sending and receiving behavior of nodes in the network; it communicates with each node through TCP via UNIX local sockets and monitors the nodes in real time; it creates a wireless channel list to simulate wireless channels and records channel competition.
[0010] The external application module is used to provide auxiliary functions for the network simulation process, including network analysis tools, network testing tools, and graphical interface.
[0011] Optionally, the network analysis tool in the external application module, the node module writes the received data frame content into a .pacp file, and the real-time network data content can be analyzed using the Wireshark tool.
[0012] Optionally, the network test tool in the external application module is connected to the data interaction server through a UNIX domain socket, and a test command is input using a command line, which is sent to each node in the network to execute a test function.
[0013] Optionally, the graphical interface in the external application module obtains the routing information of the network through the Dbus protocol, draws a network topology diagram, and presents the dynamic networking process.
[0014] According to a second aspect of the present invention, a method for simulating concurrent behavior of a node device is provided, which mainly simulates a node using a CCA idle channel detection mechanism to judge the current state of a channel before communication, and simulates a competition process between nodes in a large-scale network, including:
[0015] S1: The node module sends a simulation frame, which is received by the data interaction server through UNIX domain socket communication;
[0016] S2: The data interaction server parses the simulation frame to obtain the channel number selected for this communication, the device number of the receiving end, the device number of the sending end, the location information, and the data frame length;
[0017] S3: According to the channel number obtained by the analysis, try to obtain the signal amount of the corresponding channel. If the acquisition is successful, record the sending device number and return the lower energy value information to the node module. If the acquisition fails, return the higher energy value;
[0018] S4: The node module at the sending end sends a data frame after obtaining an energy value lower than the CCA energy threshold, first uses the sleep function to simulate the transmission delay, and then sends the data frame to the server;
[0019] S5: The server will read according to the data frame length, and write the data frame to the corresponding node module at the receiving end according to the receiving end device number. After successful writing, the semaphore of the channel will be released.
[0020] Furthermore, the semaphore in step S3 is a binary semaphore, indicating that the channel is in two states: idle or busy. That is, only one node is allowed to send data on a certain channel within a period of time.
[0021] Furthermore, the energy value described in step S3 is used to simulate the CCA idle channel detection process. If the received energy value is higher than the CCA energy threshold, it is known that the current channel is busy, and the CSMA / CA backoff mechanism should be adopted to perform channel detection again after a period of time; if the received energy value is lower than the CCA energy threshold, it is known that the current channel is idle and data frames can continue to be sent.
[0022] Compared with the prior art, the present invention has the following characteristics and beneficial effects:
[0023] 1) The node module networking process and frame format proposed in the present invention comply with the Wi-SUN standard protocol, are closer to the network behavior of the actual node device, and solve the problem that the existing simulation software cannot provide a complete protocol stack.
[0024] 2) The node module proposed in the present invention supports wireless ad hoc networks and uses the RPL protocol. Nodes can autonomously select parent nodes based on link information and support dynamic deployment of nodes. New nodes can dynamically join or exit the network.
[0025] 3) The Wi-SUN protocol network simulation platform proposed in the present invention adopts a modular design, which is convenient for individual debugging and modification; at the same time, it provides an interface to support the use of third-party software, providing further technical support for the network simulation process.
[0026] 4) The method for simulating concurrent behaviors of node devices proposed in the present invention can simulate the wireless communication process of network nodes and the channel competition phenomenon during the wireless channel transmission process, thereby improving the simulation process of the wireless Mesh network.
[0027] 5) The present invention realizes a hierarchical network structure and an efficient concurrent program architecture, develops a wireless ad hoc network simulation tool that supports ad hoc network behavior with a network scale of no less than 500 nodes, wireless link analysis, network topology display and other functions, and provides support for theoretical research on Wi-SUN networks. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a system block diagram of a Wi-SUN protocol network simulation tool based on multi-process concurrency of the present invention;
[0029] Figure 2 It is a schematic diagram of the simulation frame structure proposed in the present invention;
[0030] Figure 3 The present invention is a flowchart of a method for simulating concurrent behavior of node devices. DETAILED DESCRIPTION
[0031] The present invention will be further described below in conjunction with the accompanying drawings.
[0032] According to a first aspect of the present invention, a Wi-SUN protocol network simulation tool based on multi-process concurrency is provided. Figure 1 As shown, including:
[0033] The node module is used to simulate the node device and can realize the sending and receiving of data. It is built according to the standard protocol stack and is divided into the application layer, network layer, data link layer and physical layer. It adopts a distributed event-driven structure to handle node events and communication events. The node module types mainly include border routing nodes, full-function nodes, and function-restricted nodes. Among them, the border routing node is a gateway router with routing function, which assigns IP addresses to nodes that select the PAN network. The full-function node can act as a coordinator in the network, participate in the routing forwarding of the PAN network, and can play the role of a parent node and a child node. Function-restricted nodes need to perform low-power sleep behavior and do not participate in routing forwarding in the PAN network. Therefore, they are located at the end of the routing and provide the lowest communication function.
[0034] The wireless channel transmission module is used to simulate the signal attenuation and environmental noise interference of wireless signals in the natural environment, making the transmission process closer to the real environment. According to the obtained node location information, transmission power, channel frequency band and other parameters, the channel attenuation caused by the transmission process, such as signal-to-noise ratio, received signal peak, etc., is calculated and fed back to the receiving end.
[0035] The data interaction server is used to simulate the data interaction process between nodes; it communicates with each node through TCP via UNIX local socket; it creates a wireless channel list to simulate the communication process between nodes in the channel and realizes the sending and receiving of data frames.
[0036] The external application module is used to provide auxiliary functions for the network simulation process, including network analysis tools, network testing tools, and graphical interfaces. The node module writes the received data frame content into the .pacp file, and the Wireshark network analysis tool can be used to analyze the real-time network data content. The network testing tool connects to the data interaction server through the UNIX domain socket, inputs the test command through the command line, and sends it to each node in the network to execute the test function. The graphical interface obtains the routing information of the network through the Dbus protocol, draws the network topology diagram, and presents the dynamic networking process.
[0037] based on Figure 1 The system architecture shown in the figure, the present invention proposes a simulation frame structure for carrying wireless channel parameters and node information in the network simulation process, such as Figure 2 As shown, including:
[0038] flag: simulated frame flag, used by the data server to determine the type of received frame.
[0039] data length: data frame length.
[0040] channel: The channel number selected for this communication.
[0041] position: The position coordinates (x, y, z) of the node module at the transmitting end, which is used to calculate the signal attenuation during the wireless transmission process.
[0042] rx_num: The device number of the node module at the receiving end, which is used by the data interaction server to accurately write the data frame content. It can realize unicast communication and broadcast communication: if the receiving end device number is 0, the data frame needs to be sent to all nodes in the network; if the receiving end device number is not 0, the data frame is written to the corresponding node.
[0043] tx_num: The device number of the node module at the sending end, which is used by the data interaction server to accurately find the communication channel when receiving the data frame.
[0044] According to another aspect of the present invention, a method for simulating concurrent behaviors of node devices is provided, such as Figure 3 As shown, the following steps are included:
[0045] S1: The node module sends a simulation frame, which is received by the data interaction server through UNIX domain socket communication;
[0046] S2: The data interaction server parses the simulation frame to obtain parameters such as the channel number selected for this communication, the device number of the receiving end, and the location information;
[0047] S3: According to the channel number obtained by the analysis, try to obtain the signal amount of the corresponding channel. If the acquisition is successful, record the sending device number and return the lower energy value information to the node module. If the acquisition fails, return the higher energy value;
[0048] S3.1: The node module at the transmitting end receives an energy value lower than the CCA energy threshold, and learns that the current channel is idle, and communication can be carried out, and continues to send data frames.
[0049] S3.2: The node module at the transmitting end receives an energy value higher than the CCA energy threshold and learns that the current channel is busy. It should adopt the CSMA / CA backoff mechanism and perform channel detection again after a period of time.
[0050] S4: The node module at the sending end calls the sleep function to simulate the transmission delay, and then sends the data frame to the data interaction server;
[0051] S5: The server will read the data frame according to the length, and write the data frame to the corresponding node module at the receiving end using unicast or broadcast according to the receiving device number. After successful writing, the semaphore of the channel will be released.
[0052] Those skilled in the art will appreciate that the above are merely preferred examples of the invention and are not intended to limit the invention. Various modifications and improvements may be made to the invention without departing from the scope of the basic content of the invention and should not be excluded from the scope of protection of the invention.
Claims
1. A Wi-SUN protocol network simulation tool based on multi-process concurrency, including: Node module, wireless channel transmission module, data interaction server and external application module; The node module is used to simulate node devices and can realize data sending and receiving. It is built according to the standard protocol stack and is divided into application layer, network layer, data link layer and physical layer. It adopts a distributed event-driven structure to process node events and communication events. Wireless channel transmission module, used to simulate the attenuation and noise interference in the wireless signal transmission process, making the transmission process closer to the real environment; The channel attenuation caused by the transmission process is calculated based on the node's location information, transmission power, channel frequency band, and data frame length, and fed back to the node module at the receiving end; Data interaction server, used to simulate the RF data sending and receiving behavior of nodes in the network; TCP communication is carried out with each node through UNIX local socket, and the nodes are monitored in real time; a wireless channel list is created to simulate the wireless channel and record the channel competition situation. The external application module is used to provide auxiliary functions for the network simulation process, including network analysis tools, network testing tools, and graphical interface.
2. According to claim 1, a Wi-SUN protocol network simulation tool based on multi-process concurrency is characterized in that: The node module types include border routing nodes, full-function nodes, and function-limited nodes; The border routing node is a gateway router with routing function, which allocates IP addresses to nodes that select the PAN network; The full-function node acts as a coordinator in the network, participates in the routing and forwarding of the PAN network, and can play the role of a parent node and a child node; Functionally limited nodes need to perform low-power sleep behavior, do not participate in routing forwarding in the PAN network, are located at the very end of the route, and provide minimum communication functions.
3. According to claim 1, a Wi-SUN protocol network simulation tool based on multi-process concurrency is characterized in that: The network analysis tool in the external application module, the node module writes the received data frame content into the .pacp file, and the Wireshark tool can be used to analyze the real-time network data content; The network test tool in the external application module is connected to the data interaction server through a UNIX domain socket, and a test command is input using a command line, and is sent to each node in the network to execute a test function; The graphical interface in the external application module obtains the routing information of the network through the Dbus protocol, draws the network topology diagram, and presents the dynamic networking process.
4. A method for simulating concurrent node behavior based on a multi-process concurrent Wi-SUN protocol network simulation tool according to any one of claims 1 to 4, wherein the simulated node uses a CCA idle channel detection mechanism to judge the current state of the channel before communication, and simulates the competition process between nodes in a large-scale network, characterized in that: The steps include: S1: The node module sends a simulation frame, which is received by the data interaction server through UNIX domain socket communication; S2: The data interaction server parses the simulation frame to obtain the channel number selected for this communication, the device number of the receiving end, the device number of the sending end, the location information, and the data frame length; S3: According to the channel number obtained by the analysis, try to obtain the signal volume of the corresponding channel. If the acquisition is successful, record the sending device number and return the energy value lower than the CCA energy threshold to the node module. If the acquisition fails, return the energy value higher than the CCA energy threshold; S4: After the node module at the sending end obtains an energy value lower than the CCA energy threshold, it continues to send data frames, first uses the sleep function to simulate the transmission delay, and then sends the data frame to the data interaction server; S5: The data interaction server will read according to the data frame length, and write the data frame to the corresponding node module at the receiving end according to the receiving end device number. After successful writing, the semaphore of the channel will be released.
5. A method for simulating concurrent behaviors of node devices according to claim 4, characterized in that: The semaphore in step S3 is a binary semaphore, indicating that the channel is either idle or busy, that is, only one node is allowed to send data on a channel within a set period of time.
6. A method for simulating concurrent behaviors of node devices according to claim 4, characterized in that: The energy value in step S3 is used to simulate the CCA idle channel detection process. If the received energy value is higher than the CCA energy threshold, the CSMA / CA backoff mechanism is adopted and the channel detection is performed again after a set period of time; if the received energy value is lower than the CCA energy threshold, data frames can continue to be sent.
