# SPACNet: A Simulation Platform of an Acoustic Cognitive Network
###### Abstract
To better implement a UAN simulation, secondary development versions based on NS2 and NS3, such as Aqua-Sim for NS2 [18], Aqua-Sim for NS3 [19], DESERT [22; 23], and SUNSET [24], have added specialized modules for the characteristics of UANs, especially in underwater acoustic environments. However, the cognitive process of nodes in an external environment cannot be well simulated, and using it for cognitive network protocol simulations cannot support research on different hardwares [31; 32]. In addition, the configuration process of network simulation is cumbersome and inflexible. For example, the conversion of the DESERT header fields and the size assigned to each field are hard-coded and cannot be changed quickly by users. Any changes require recompiling the implemented code and updating the library. Compared to the DESERT, the SUNSET has a higher scheduling accuracy and more flexible packet conversion, but its architecture is more complex. The SUNSET requires each node to run one NS2 instance, which will add a significant amount of overhead to resource-limited embedded systems [33]. All of the above simulation platforms lack support for UACNs in terms of a UWA channel sensing capability and the corresponding network optimization strategies; thus, it is impossible or difficult for the conventional simulation platforms to carry out the simulation of a UACNs in an adverse underwater environment. In addition, external environmental information and node internal information cannot be provided to support UACNs. Hence, a simulation platform of an acoustic cognitive network (SPACNet) is proposed and its design presented in this article. The entire process of simulating a UACNs in SPACNet is the same as the actual physical-world process, including the physics layer, MAC layer, and network layer. The structure of SPACNet is introduced in detail, which uses a three-layer model to model the network and provides a state machine-based protocol programming framework that can support the implementation of different state transition types related to cognitive network protocols. The SPACNet supports cross-layer protocol simulation, and can conveniently implement various UAN protocols. A simulation mechanism for signal transmission has been constructed to support the cognitive requirements of UANs, including signal transmission, information, and link layers. In addition, the SPACNet can be incorporated with actual nodes to form a semiphysical simulation system for a UACNs. The contributions of this study are summarized as follows:  
* SPACNet was designed and investigated to support the simulations of UACNs in this study, which can promote the future development of UACNs in real-world applications;
* The design of SPACNet is introduced in detail, including the structure and function, a discrete-event management module, an integrated environment-driven UWA channel model, a peer-to-peer (P2P) node model, a state machine-based process model, and a multinode underwater acoustic communication (UAC) model;
* To improve the efficiency of the network simulation, a simplified collision model was established, and a method to reduce invalid calculations was adopted;
* The effectiveness of the cognitive assessment of the simulation platform was demonstrated by both a simulation experiment and a field test, and the results show that the behavior of protocols can be quantitatively evaluated in SPACNet. The remainder of this article is organized as follows. In Section 1, the design of SPACNet is introduced in detail. In Section 2, the multinode UAC model of SPACNet is introduced in detail. The simulation experiment was conducted, and the results are analyzed and discussed in Section 3. In Section 4, the results of a small-scale field test are presented for validating the proposed SPACNet from the viewpoint of a practical trial. The conclusion of the paper is presented in Section 5. Lastly, future work prospects are presented in Section 6. _Notation_: Notation upper case **X** denotes a matrix and lower case **x** denotes a vector.