1. Introduction
Due to the complexity of the logistics involved in sensor nodes, routing for data transmission and networking amongst sensor technologies is a challenging endeavor. Because of this, there are frequent gaps in communication brought on by the movement of oceanic currents; as a result, nodes are unable to share data with other nodes. Because acoustic communication in the open air has a communication lag of about five orders with a smaller magnitude than terrestrial communication in the open air, this results in a narrower bandwidth, an increase in energy consumption, and a delay in the propagation process. Because of this, routing is complex, and unlike terrestrial communication systems, batteries cannot be replenished [1].
Path loss in an environment is mostly determined by geometrical spreading (K) and attenuation rather than other factors [2]. There is no relationship between frequency and geometrical propagation [3]. The extension of the wavefronts causes a phenomenon known as geometrical spreading (often abbreviated as K), which is the spread of sound energy. The value is determined by looking at the difference between a spherical distribution (K=2) in deep water and a cylindrical distribution (K=1) in shallow water. In everyday life, the standardized value of K = 1.5 is the one that is used [4]. The transmission range is an indicator of the rate of energy breakdown that occurs due to geometrical spreading (R). The rate of spreading in a spherical direction is decomposed at a rate of R-2, whereas the rate of spreading in a cylindrical direction is decomposed at a rate of R-1 [5]. Attenuation is the process by which sound energy is converted into heat in an environment [6]. A more in-depth explanation of attenuation can be found in section 2.
The absorption coefficient varies depending on the frequency of the sound [7]. The power required for transmission in sensor networks is one hundred times more than the power required for receiving [8]. Using acoustics as a foundation, the work that goes into networking sensor technologies in an ocean setting with a wireless medium focuses on the parameters defined by the sensor node (transmission power and reception power) and the parameters defined by the medium (attenuation, noise, and multipath). The transmission of data from sensor nodes to the sonobuoy (sink) may be based on a variety of reporting models, but it mostly includes monthly reporting. This means that the provided load, which refers to the data packets that are created, is made accessible in a periodic way. This method implies that there will be an equal amount of data arriving at each point.
Reporting that is driven by queries and event-driven reporting are the two other prevalent techniques. The reporting method known as querying is a stateful strategy that relies on messages coming from the sink. In contrast, the event-driven reporting method only gives data when an event really takes place [9]. The received sensory data may also be categorized in two different ways: the Eulerian method, in which the data are collected at that spot at that precise moment, and the Lagrangian method, in which the data are collected as each particle travels along its route [10]. There are a number of published works that indicate the employment of mechanical devices such as floating buoys, winches, and other similar tools that may specifically prevent the occurrence of routing void. This topic has been elaborated upon in great detail in section 3. Because of the additional energy costs that would be incurred, a synergy between the communication vacuum and data mules has not been investigated. Message-based techniques have been given the full attention they deserve as the primary emphasis of sensor networks.
2. Related Work
Low Energy Adaptive Clustering Hierarchy (LEACH) [11] is the name given to the benchmark technique that was designed. In the LEACH system, the sensor nodes will organize themselves into local groups or clusters, and one of the nodes will take on the role of the Cluster Head (CH) for each cluster. It does this by not picking set CHs but rather opting for random ones in each of the rounds, which is part of the randomization approach. This ensures that the energy burden is distributed evenly over all of the sensors in the network. Additionally, LEACH conducts local data fusion at CHs in order to reduce the quantity of data that is collected from sensors and then sends this data to BS. This helps to lower the amount of energy that is used and increases the lifespan of the network. There is a percentage chance that sensors may choose to become CHs for themselves. These CHs will periodically inform other sensors in the network of their current state. Each sensor node chooses which cluster it wants to be a member of by selecting the CH that takes the least amount of communication energy on its behalf. The Power-Efficient Gathering in Sensor Information Systems (PEGASIS) [12] protocol is a chain-based system that is very close to being ideal. The primary idea of PEGASIS, which was presented [26], is to connect the sensor nodes together in the form of a chain in such a way that each node will receive and transmit data from and to a near neighbor in a similar fashion. The information that has been gathered travels from one node to the next, where it is then consolidated, and, eventually, a chosen node sends it to the BS.
[13] presented the Hybrid Energy-Efficient Distributed (HEED) clustering protocol. This protocol periodically selects CHs in accordance with a hybrid parameter that combines the residual energy of a node with any secondary parameter. This secondary parameter could be a node's proximity to its neighbors or even a node's degree. This hybrid approach reduces the amount of control overhead while minimizing control overhead, terminating the clustering process within a fixed number of iterations or rounds, and distributing the energy usage. A novel network protocol for reactive networks was created by [14] given the name Threshold sensitive Energy Efficient sensor Network (TEEN). Nodes in a reactive network respond very rapidly to sudden changes in the value of a recorded characteristic, making these networks known as reactive. The CHs provided its members with two numbers that they referred to as Hard Threshold (HT) and Soft Threshold (ST). HT refers to the absolute value of an attribute, and it is the threshold beyond which a node that senses that value must activate its transmitter and report it to its CH. ST represents a little change in the value of a detected characteristic, which also enables the same process to initiate itself. The Adaptive Periodic Threshold sensitive Energy Efficient sensor Network (APTEEN) [15] is a hybrid solution for efficient routing and complete information retrieval in wireless sensor networks (WSNs). It is one of the variations of this protocol. The Geographical and Energy Aware Routing (GEAR) [16] method was described. The process of sending a data packet to each and every node in a target zone may be broken down into two distinct phases: 1) Sending the data packets using a heuristic that takes into account both the location and the amount of energy available in the network's neighbors 2) Moving the data packet around within the area, often by using a Recursive Geographic Forwarding (RGF) algorithm or a constrained flooding method.
Depth Based Routing (DBR) [17] is a protocol that was proposed for use in sensor networks. A data packet in DBR will include a field attribute that records the depth information of its most recent forwarder. This information will be updated at each hop in the data packet's journey. If the depth of the node at which the packet was received is greater than the depth specified in the packet, the node will reject the packet; otherwise, it will forward the packet. Let's imagine that one node, which we'll refer to as Node1, wishes to transmit data to another node, which we'll call Node2. As a result, Node1 sends a request to its neighbors, including the locations of the nodes that served as the source and the eventual destination. The matching power level that is utilized for transmission is taken into consideration when determining a radius value. It is expected that only the nodes that are located within this radius will receive the signals. After receiving the request from Node1, each of the nodes will first determine where they are in relation to Node1 and Node2 using an imaginary line that connects the two. In addition, nodes that are deemed to be relay nodes are those that are located inside a cone with an angle of /2 that extends from the source toward the ultimate destination. Nodes that are aware that they are located inside the cone of the transmitter will only react to the request of Node1 when it is made. The path will be marked out on the destination that will ultimately be reached by producing a cone-shaped outline at each sender. At any one time, if there is more than one relay node, the call will be taken by the sender that is currently in control. Within DUCS, the nodes will self-organize into local clusters, and one of the nodes will be chosen to serve as the CH for each cluster. All of the non-CH nodes send the data that they have sensed to their respective CHs, which then apply various signal processing functions to the data before sending it onto the sink. In order to prevent the batteries of acoustic sensors from being depleted too quickly, DUCS implements a system that uses a random rotation of the CHs [18] among the sensors. This results in an even distribution of the energy that is used. It is quite close to being the same as the LEACH technique.
The many types of assaults, as well as their potential sources and consequences, have been the subject of research in acoustic communication. They could be on the node hardware, the communication channel, or the network protocol, and they might be there because of environmental conditions or because someone intentionally put them. The purpose of this project is to use a certain secure method, such as a cryptographic algorithm [19], for the purpose of building reliable routing and concentrating on calculating energy usage in order to ensure secure communication in the UWSNs.
3. Proposed Work
Let z(u) be the signal that was received by the SU. The two hypotheses H 1 and H 0, which reflect the existence and absence of the PU in the perceived channel, respectively, are denoted by the notation. It is possible to formulate it in terms of the hypotheses H 1 and H 0 as,
{ fo fo t(u) is the PU transmitted signal, which is considered to be an independent and identically distributed (i.id) random process with zero mean and 2 variance; and n(u) is Additive White Gaussian Noise (AWGN) with zero mean, and variance _n2 and independent of the transmitted signal t. Here, g is the gain of the channel between the transmitter of PU and the receiver of SU; t(u) is the PU transmitted (u). Taking into consideration the fact that energy detection is now being recognized by all SUs as the sensing method in which the energies of O different samples of y(u) are added up in a single time period, i.e.
∑ (2) Therefore, in order for the SU to assess whether or not there is PUs in the channel, they compare Y to a previously determined threshold value known as Y "th." If Y is lower than Y o, then they conclude that there are PUs. The SU identifies the lack of a PU in the channel, which validates hypothesis I 0. (ii) X>X "tiu "; The SU detects that the PU is present in the channel, which is equivalent to saying that hypothesis H 1 is true. The performance of spectrum sensing is evaluated using two parameters: the probability of detection, denoted by P D, and the probability of false alarm, denoted by P F. In the context of hypothesis H 1, the term "P D" refers to the likelihood that the transmission of PU would be correctly detected. Under the hypothesis, H 0, the probability of a false alarm, denoted by the letter P F, is the likelihood of incorrect detection of the transmission of PU [20]. A lower value of P F guarantees the identification of greater spectrum opportunity for SUs, whereas a larger value of P D provides improved protection of the PU from interference caused by SUs.
Here, SNR denotes the received signal-to-noise ratio of the PU signal, under hypothesis . and erfc(.) is the complementary error function, i,e,
3.1 Illustration of Throughput of Secondary Users
The frequency of the sampling is indicated by the notation f s, while the length of the frame is indicated by the notation T. Then, the time required for sensing is denoted by T s (" " V)=N/f, Out of the total time allotted for the frame, which is T, the SUs that are taking part in spectrum sensing are required to devote T s (" " V) of their time to the sensing process. The time of the sensing process, denoted by the variables T s and V, may be thought of as a cost of sense that is not imposed on SUs that do not participate in the sensing process. As a result, the time that is left over, shown by the notation T-T s (Y), is the time that is available in every frame for the transmission of data. Taking into account the maximum capacity of the available slot, the average throughput of the SU is consistent with the null hypothesis H 0.

(8) The is inversely varying with . Consequently, the large implies more sensing time. The fewer the transmission time, the smaller the throughput. This indicates a tread-off between throughput and sensing samples. The must choose optimal to maximize throughput. Also, to maintain low and , SUs may cooperate with other SUs for sensing the same licensed band.
3.2 Hybrid Optimization in Attack Detection
Avoiding congestion on the internet and other packet-switched networks is becoming ever more important, and the random early detection technique is quickly becoming the standard for doing so. As a result of the gradual deployment of RED, a great number of algorithms that are entirely based on RED have been and continue to be presented in order to increase its performance. The Particle Swarm Optimization technique discards incoming packets with just a little increase in fairness compared to Random Early Detection and Gentle Random Early Detection (GRED). When the Dinit value is changed from Dmax to 1, there is a little but noticeable improvement. There are various restrictions associated with the Adaptive Gentle Random early detection technique. The value of the average wait time is an important factor in the regulation of congestion. (ii) The aql value is determined by the queue weight, which remains constant regardless of how many items are added or removed. Keeping the queue weight as a dynamic variable is one way that the suggested method, Improved Algorithm, may get around the issue described above. This can be accomplished by doing the following: (ii) Adapting the window size on the fly according to the aql value that was provided. Aql and dynamic window size are the metrics that are used to quantify congestion in the Particle Swarm Optimization technique that has been presented. The configuration of the parameters is comparable to that of the AGRED and the RED. The following is a discussion of the parameters that were used for the congestion measure: Queue It is possible to define a queuing system in networks as packets coming for service, waiting for service if it is not instantaneous, and then departing the system after being serviced if they have waited for service. The majority of the time, a sufficient description of a queuing system in networks may be derived from the following four fundamental properties of queuing processes: The pattern of arrival of packets (ii) The pattern of service provided by schedulers (iii) The discipline of the queue (iv) The capacity of the system Analytical models need information about the characteristics of the queues in order to properly simulate the behavior of networks. Delay The amount of time that has passed since a packet left its source premise or network ingress and arrived at its destination is referred to as the delay (e.g., destination premise or network degrees). The delay is crucial for the following reasons: I Some applications, such as audio and video applications, do not work properly if the end-to-end latency between nodes is considerable in comparison to a certain threshold value. (ii) The presence of erroneous variations in latency makes it difficult to handle a wide variety of real-time applications. (iii) The degree of delay determines how difficult it is for transport layer protocols to sustain high bandwidths, and the higher the amount of delay, the more difficult it is. (iv) The smallest value of this property shows the delay that is mainly caused by propagation and transmission delay. This delay is likely to be encountered when the route that is being traveled is only lightly loaded. 68 (v) Values of this feature that are greater than the minimal mean congestion level that is currently existent along the route. This characteristic may be expressed in a variety of different ways, such as the average delay, the variance of delay, and the delay bound. A series of intermediary nodes is used to transport each packet that is produced by a source on its way to its final destination. Therefore, the delay from beginning to finish is equal to the total of the delays that were encountered at each node along the route to the destination. The transmission delay at a node and the propagation time on the connection to the next node are both included in the constant component of each of these delays. The processing and queuing delays at the node are included in the variable component of each of these delays. The phrase "end-to-end loss" refers to the dropping of packets at intermediate nodes as a result of buffers being full. The purpose of congestion avoidance methods is to screen the traffic loads on a network in order to be able to anticipate and prevent congestion at typical network bottlenecks. The discarding of packets is the method used to prevent congestion. The Random Early Detection (RED) algorithm is the most effective strategy for avoiding congestion that is currently in use, and it is best suited for usage in high-speed transit networks. The mark probability, the lowest threshold, and the maximum threshold all play a role in determining the chance of a packet being dropped. When the average length of the queue is greater than the minimum threshold, RED will begin discarding packets. The rate of dropped packets climbs linearly along with the average queue size until it hits the maximum threshold, at which point the rate of dropped packets stops climbing. The proportion of packets that are lost because the average queue length has reached the maximum threshold is the mark probability denominator.
4. Experimental Results
The simulation is run for a variety of various instances, with the number of nodes, black holes, and packets all having their respective numbers changed. According to the findings of the analysis of the network, the already implemented system displays enhanced levels of immunity against assaults. Collecting Data in a Trustworthy Manner Using Wireless Sensor Networks. Using the Randomized Dispersive Routes (SDC) technique makes use of a mechanism that transfers distinct packets' shares by using a randomized multipath routing strategy. When we compare the method that we have presented to the method that is proposed, we discover that our procedure is much more secure. In the former method, the packets were supposed to be sent toward the source node in order to reduce the amount of time that passed between transmissions; however, this would make the adversary's job much simpler if he or she were to capture just the nodes that were moving in that direction. As a result of the fact that our strategy involves dispersing packets, the attacker will be unable to determine the path that the packets will follow as they travel across the network; as a result, our strategy is more secure. In contrast to the traversals, which only transmit packets to the immediate neighbors, the employment of the backpressure method allows for the most efficient transmission of data packets by selecting the least congested route possible.
5. Conclusion
The software-defined network (SDN) is a technology that is expanding at a fast rate and has significantly altered the topology of the existing network. SDN is now capable of handling hundreds of switches, but in the not-too-distant future, it may be able to manage thousands of switches simultaneously. As a direct consequence of this, there is a chance that the SDN network may get congested. The purpose of this research project is to develop a method that can recognize congestion and take preventative measures against it. The IP network often has congestion, but the existing degree of progress in the conventional network algorithm is not adequate to satisfy the everincreasing demand placed on the network. In order to solve the issue of network congestion, a software-defined strategy is necessary as the method of attack. SDN (Software-Defined Networking) is a relatively new architecture that is quickly gaining popularity since it simplifies the process of maintaining and configuring networks. It is important to point out that the programmable network will soon replace the one that is already in existence. In the future, in order to improve the programming that is done in the network area, the software controller may have scalability and reliability added to its list of improvements. The additional study might be directed toward the exploitation of softwarebased networks for the purpose of enhancing the performance of network components and making use of distributed controllers rather than a single controller in large-scale networks in order to reduce overhead. Python, a language that is simple to write, was utilized to construct the OpenFlow controller known as POX that was employed in this research project. A few of the POX's modules have room for development in terms of how they approach the interfaces. It would be beneficial to do further study on libraries and tools that would result in faster processing speeds.