1 Introduction

Wireless sensor networks (WSN) are widely used in various applications to monitor and acquire data from real time environment. From medical to military applications [1, 2] WSNs are used and it is not limited to certain domain. Wireless sensor networks are composed of tiny sensor nodes that collect and transmit data. These nodes can be distributed randomly to observe the changes in the system or environment. The data collected from all the nodes are processed to obtain the essential information. In such a case, node localization is one of the important parameters which need to be considered in the wireless sensor network. Node localization is required to report the incident origin, assist sensor queries, routing and network coverage issues [3]. Moreover, the energy efficiency of sensor nodes is also depending on node localization. Nodes are efficient to collect and transfer data to the base station, but it has limited storage capacity due to size and energy requirements [4]. Recently cloud gains more attention due to its storage and data processing abilities, integrating cloud with wireless sensor networks will reduce the energy requirements of wireless sensor nodes [5]. On contrary, transferring data to the cloud using complex routing procedures will again increase the energy requirements. So it is essential to obtain a minimum data transfer path to reduce the energy requirements of sensors. Identifying the shortest path not only reduces the energy consumption it reduces the chance of data attack. Since if the transmission is performed through the longest path the chances of data pruning [6], data alteration, and other attacks [7,8,9,10] are more. Sample schematic for cloud assisted wireless sensor networks is depicted in Fig. 1.

Fig. 1
figure 1

Cloud assisted wireless sensor networks [8]

Localization schemes are broadly classified into anchor based or anchor free, centralized or distributed, fine grained or coarse grained, GPS based or GPS free, stationary or mobile sensor node based, range based or range free models. In anchor based localization scheme [11], the node positions are known and based on these, the unknown node positions are localized. Whereas anchor free scheme [12] estimates the relative position instead of computing absolute node position. In centralized scheme [13], sink node computes the position of nodes and forwards the information to other nodes. In distributed scheme, sensors individually estimate the position and communicate with anchor nodes directly [14]. GPS based schemes directly reveal the node localization whereas GPS free models calculates the distance between the nodes depends on local network [15]. Received signal strength [16] is used for localization in fine grained localization and it is not used in coarse grained localization.

Depends on the above categories various localization models are evolved. Still, the research gap is more to obtain an efficient node localization model to improve the performance of wireless sensor networks. Findings this research gap, this research work is aimed to propose an energy efficient cloud assisted wireless sensor network. Research work is further structured into a short literature survey in Sect. 2, Proposed energy efficient hybrid optimization model in Sect. 3 and its performance are evaluated in Sect. 4 and summarized the observation in conclusion.

2 Related Works

Node localization in wireless sensor networks improves network performance and enhances energy efficiency. Various localization models are introduced to reduce the issues in wireless sensor networks. Few research models are analyzed in this section to identify the research gap and to frame the proposed research objective. Yun et al. [17] proposed a self-localization algorithm with mobile anchor node to solve the node localization issues in underwater acoustic sensor nodes. The issues in path selection are addressed through compressive sensing and the node path is identified by random waypoint and layered scan model. High localization accuracy is the observed advantage of the localization algorithm. Xiufang et al. [18] proposed a privacy preserving distributed localization algorithm to improve location privacy in internet of things. Trust evaluation is an important factor in data transfer through nodes. Identifying the dishonest nodes and neglecting them for path formation is achieved using a distributed location algorithm.

Shikai et al. [19] handled the node localization issues through an improved Distance vector (DV) -Hop algorithm for accurate node localization which is a major limitation of conventional DV-Hop localization scheme. Beacon nodes are selected through probability information based selective strategy. The average hop distance of beacon nodes is determined using actual distance and estimated distance between beacon nodes. Yuxiao et al. [20] reported the localization accuracy is further improved in DV-Hop algorithm using dynamic anchor nodes. By utilizing a part of anchor node the accuracy and energy efficiency are improved in the localization model. Songyut et al. [21] proposed an optimized distance vector hop localization using particle swarm optimization to improve the localization precision.

Mingxing et al. [22] proposed an optimal power allocation scheme to improve localization performance in jammed wireless sensor networks. Average Cramer-Rao lower bound of agent nodes is proposed to improve the localization accuracy and network lifetime. Wang et al. [23] reported node localization issues through kernel extreme learning machine algorithm based on hop count quantization. The actual hop count between the anchor nodes and unknown nodes is used as training inputs. Using trained anchor nodes, the location of unknown nodes is identified in the learning model. Herman et al. [24] proposed Maximum-Likelihood sensor node localization approach using received signal strength to possess multipath features in wireless sensor networks. Received signal strength is used to perform ranging measurements. The statistical model used in the research work estimates the node coordinates and reduces various signal degradation effects.

Hassan et al. [25] proposed Message Passing Hybrid Localization to reduce the issues in cooperative distributed localization. Belief propagation and Markov chain Monte Carlo sampling are used to frame the hybrid localization model which improves the localization performance optimally. Recently various optimization models are introduced to solve the node localization issues. Prabhjot et al. [26] proposed a hybrid optimization model for efficient localization using dragonfly and firefly optimization models. The concept of single anchor node placement using hexagonal pattern introduced in the optimization approach reduces the localization errors compared to conventional localization modules.

2.1 Research Gap

The findings from the above review are summarized as research gap as follows.

  • Node localization issues are widely approached by various techniques. However, most of the research works are focused on a single parameter.

  • Multiple objective localization models are introduced in a few research models. However, their performance can be improved.

  • To obtain an optimal path for data transfer various nature inspired optimization approaches are evolved.

  • Few research works only addressed the node localization issues through hybrid optimization approach.

2.2 Objective

Based on the above research gaps listed, the objective of the proposed works is framed as follows.

  • To develop a hybrid optimization model to improve the node localization accuracy, energy efficiency as a multi objective approach.

  • Identify the shortest path using the optimal model to improve the reliability of the cloud assisted wireless sensor networks.

Considering the above objectives, the proposed optimization approach is developed using Particle Swarm Optimization (PSO) and Grey Wolf Optimization (GWO) as a hybrid model. It has a strong statistical foundation and the ability to handle raw data sequences. Through its consistent data handling process, inputs of variable length can be handled effectively.

2.3 Proposed Work

The proposed hybrid optimization included two phases of operation in which particle swarm optimization is used to achieve optimal node localization and grey wolf optimization is used to obtain the shortest path for data transmission. Swarm intelligence is incorporated into the proposed approach node localization objective and attacking strategy of grey wolfs used to obtain the minimum shortest path. Before formulating the optimization model the network parameters are defined and few parameters are assumed. The network model used for analysis is a finite two dimensional plane with randomly placed wireless sensor nodes. The coverage area is assumed as circular for nodes and the nodes are placed at the center of the coverage area. All the nodes in the network have the same communication radius. The neighbor node information and location of all nodes are predetermined. The initial energy of the nodes is sufficient for node random movement. The coordinates for the monitoring area \(M \times N\) is given as \(\left( {m,n} \right)\) for \(M \in m\) and \(N \in n\). The distance from senor to coordinate point \(CP_{i}\) is formulated as

$$D\left( {CP_{i} ,g} \right) = \sqrt {\left( {n - x_{i} } \right)^{2} + \left( {m - y_{i} } \right)^{2} }$$
(1)

where \(x_{i}\) and \(y_{i}\) are the node coordinates. The gridpoint covered by the sensors are formulated as a probability function and it is given as

$$P\left( {g,CP_{i} } \right) = \left\{ {\begin{array}{*{20}l} 1 \hfill & {if\; D\left( {CP_{i} ,g} \right) \le r_{s} } \hfill \\ 0 \hfill & {otherwise} \hfill \\ \end{array} } \right.$$
(2)

where \(g\) is the grid point which is covered by maximum sensor nodes and the probability is considered as 1 and for other factors, it is considered as zero. The total number of grid points in the coverage area is formulated as \(Cov_{tot} = \sum\nolimits_{M \times N} {P\left( {g,CP_{i} } \right)}\) and the coverage is formulated based on the monitoring region as follows

$$C_{m} = \frac{{Cov_{tot} }}{M \times N}$$
(3)

Particle swarm optimization is used to obtain optimal node localization. To frame the optimization model, consider a randomly initiated population \(S = \left\{ {s_{1} , s_{2} , \ldots ,s_{n} } \right\}\) where \(n\) is the number of particles. The position and velocity othe particle is defined as \(Sp_{i} = \left\{ {p_{i1} , p_{i2} , \ldots ,p_{ik} } \right\}^{T}\). and \(Sv_{i} = \left\{ {v_{i1} , v_{i2} , \ldots ,v_{ik} } \right\}^{T}\). Where k is the space, the individual maximum population is formulated as \(sbest_{i} = \left\{ {sbest_{i1} , sbest_{i2} , \ldots ,sbest_{ik} } \right\}^{T}\) and the global maximum is formulated as \(gbest = \left\{ {gbest_{1} , gbest_{2} \ldots gbest_{k} } \right\}^{T}\). The position of particle is updated based on the velocity is formulated as

$$Sv_{i}^{z + 1} = wSv_{i}^{z} + \rho_{1} rand\left( {0,1} \right)\left( {sbest_{i}^{z} - Sp_{i}^{z} } \right) + \rho_{2} rand\left( {0,1} \right)\left( {gbest^{z} - Sp_{i}^{z} } \right)$$
(4)
$$Sp_{i}^{z + 1} = Sp_{i}^{z} + Sv_{i}^{z}$$
(5)

where \(\rho_{1}\) and \(\rho_{2}\) are acceleration constants and \(w\) is the inertia coefficient. To improve the dynamic search process, the inertia coefficient is adjusted during the search process. The particle diversity and search speed is increased by using mutation operator and the updated position and velocity is formulated as

$$Sv_{i}^{z + 1} = \frac{1}{2}\left( {sbest_{i}^{z} + sbest_{rand()}^{z} } \right)$$
(6)
$$Sp_{i}^{z + 1} = \frac{1}{2}\left( {Sp_{i}^{z} + Sp_{rand()}^{z} } \right)$$
(7)

The optimal solution for node localization is can be obtained from the above mathematical model and the process is explained through the following summarized algorithm.

figure a

The shortest path is need to be obtained for energy efficient cloud assisted wireless sensor networks. Grey wolf optimization is used to obtain the shortest path in the proposed model. The hunting nature of wolves is related to the optimization problem. Basically, grey wolf hunting included three processes such as (1) tracking, approaching and chasing the prey, (2) encircling the prey, (3) attacking the prey. Mathematically these three processes are formulated and the encircling process is expressed as

$$D = \left| {v \times s_{p} \left( t \right) - S\left( t \right)} \right|$$
(8)
$$S\left( {t + 1} \right) = S_{p} \left( t \right) - \vartheta \times D$$
(9)

where \(s_{p}\) is the prey position, instantaneous iteration is represented as \(t\), location of wolves is represented as \(S\) and \(\vartheta ,v\) are the coefficient for vectors and it is given as \(\vartheta = l\left( {2r_{1} - 1} \right)\) and \(v = 2r_{2}\). The value of \(r_{1}\) and \(r_{2}\) is a uniform random number in the range {0,1}. The best solution obtained in grey wolf optimization depends on the alpha (\(\alpha )\) wolf decision which identifies the prey position. Beta (\(\beta )\) and delta (\(\delta )\) wolves identify the second best and third best solutions. This scenario is formulated as

$$\left. {\begin{array}{*{20}l} {D_{\alpha } = \left| {v_{1} \times s_{\alpha } - S\left( t \right)} \right|} \hfill \\ {D_{\beta } = \left| {v_{1} \times s_{\beta } - S\left( t \right)} \right|} \hfill \\ {D_{\delta } = \left| {v_{1} \times s_{\delta } - S\left( t \right)} \right|} \hfill \\ \end{array} } \right\}$$
(10)

The best three wolves in each iteration are represented by \(s_{\alpha }\), \(s_{\beta }\) and \(s_{\delta }\) and it is given as

$$\left. {\begin{array}{*{20}l} {S_{1} = \left| {s_{\alpha } - l_{1} D_{\alpha } } \right|} \hfill \\ {S_{2} = \left| {s_{\beta } - l_{2} D_{\beta } } \right|} \hfill \\ {S_{3} = \left| {s_{\delta } - l_{2} D_{\delta } } \right|} \hfill \\ \end{array} } \right\}$$
(11)

The position of prey is expressed as \(S_{P} \left( {t + 1} \right)\) and based on Eq. 11, it is obtained as

$$S_{P} \left( {t + 1} \right) = \frac{{S_{1} + S_{2} + S_{3} }}{3}$$
(12)

In order to attack the prey, wolves must move close enough to the prey it is defined based on \(\vartheta\) which varies in the range {− 2 \(\vartheta\), 2 \(\vartheta\) }. When this value is equal to or greater than one, wolves abandon the current hunting process and move away to find the next optimal solution. If it is less than one, then wolves are forced to attack the prey. This condition helps the wolves to avoid local minimum. The exploration ability of grey wolf optimization is used to obtain the shortest path by preventing the risk positions in node localization process. This parallelly improves the particle swarm optimization by directing the nodes to the optimal position.

figure b

2.4 Process Flow of Proposed Hybrid Optimization Model

The entire process of the proposed hybrid optimization is depicted in Fig. 2. The process starts from initializing the particles which is related to node initialization and then fitness function of each particle is calculated. This gives the relative energy and distance details about the node and based on the fitness function, optimal particle and global maximum are obtained. The positions are updated to the new position if the iterative is divisible otherwise the process is repeated by obtaining the inertia coefficient. Once the best positions are obtained for maximum network coverage, these optimized nodes are used for shortest path identification. For that grey wolf optimization is utilized. In the beginning, the nodes are initialized and the fitness function is calculated based on the energy and trustworthiness. From that, the best wolves are selected to proceed further, it is iteration is reached the maximum, then that position is considered as best position and the selected node is utilized for path creation. Otherwise, the process is repeated till the selection of best nodes. Once the path is identified, the data is transferred to the cloud and the process is halted.

Fig. 2
figure 2

Process flow of proposed hybrid optimization model

3 Result and Discussion

The performance of the proposed model is experimentally verified using network simulator 2. Proposed hybrid optimization approach for cloud-assisted wireless sensor network performance is evaluated through parameters such as latency, reliability, packet loss, route failures, computation cost, and lifetime. The simulation parameters used for experimentation are listed in Table 1.

Table 1 Simulation parameters

Figure 3 depicts the delay performance analysis of the proposed model. The proposed hybrid optimization approach improves network coverage through optimized node localization. Moreover, the discovery of the shortest path to transfer the data to cloud using the optimization model reduces the latency in transmission. To validate the superior performance, existing ant colony optimization (ACO) based node localization, conventional genetic algorithm (GA), and firefly optimization models (FA) are compared with the proposed hybrid particle swarm grey wolf optimization (PSGWO) approach. It is observed that proposed model attains minimum delay compared to other models due to its improved node localization policies and shortest path routing.

Fig. 3
figure 3

Delay performance analysis

The reliability of the network model is increased due to hybrid optimization approach. Without compromising the energy efficiency this increased performance is achieved. Moreover, the reduced delay performance while packet transmission supports the proposed model to achieve reliable performance. It is observed from Fig. 4 the conventional models lag in performance due to routing policies. Compared to genetic and firefly algorithm performance, ant colony optimization based localization approach provides better performance due to the shortest path routing. However, when it is compared to proposed approach the reliability of proposed model is high.

Fig. 4
figure 4

Reliability analysis

The energy efficiency of the proposed cloud assisted wireless sensor networks depends on its routing process and efficient packet delivery. If more packets are lost in transmission, then all those missed packets are needed to be transmitted again which again increases the energy consumption. Due to optimal path identification, the possibility of packet loss is reduced in proposed model compared to existing methods. Figure 5 depicts the packet loss comparison for all the models. It is clearly visible that proposed model has less packet loss ratio compared to other models. Similarly, the network lifetime depends on the node energy.

Fig. 5
figure 5

Packet loss

To review the node energy consumption and network lifetime, a comparative analysis is depicted in Fig. 6. It could be seen that number of alive nodes in the proposed network is high compared to other models. Due to improved energy management, the energy efficiency of the nodes is increased which further increases the network lifetime. Whereas other models have minimum lifetime due to their energy management issues.

Fig. 6
figure 6

Network lifetime

The efficiency of the proposed hybrid optimization model is validated based on the energy efficiency performance, reliability, and network lifetime. Due to improved node localization and energy efficiency proposed model attains better efficiency compared to other models. Though the efficiency difference is minimum between the ant colony model, the performance of proposed model is adequate to prove its superior performance. Figure 7 depicts the efficiency comparison of all the models. It is observed from the experimental results, the proposed hybrid optimization model performance is better than existing ant colony optimization, firefly optimization, and genetic algorithm based node localization models. Moreover, proposed model attains better efficiency, improved network lifetime due to its optimal solution for localization and path identification.

Fig. 7
figure 7

Efficiency

4 Conclusion

An energy efficient cloud-assisted wireless sensor network model is proposed in this research work using hybrid optimization module. Node localization and shortest path identification are the important factors in wireless sensor networks. The performance of network depends on these two factors. To obtain an optimal node localization scheme and to improve the energy efficiency a hybrid optimization model using particle swarm optimization and grey wolf optimization is proposed. Proposed hybrid optimization model attains better performance in terms of improved reliability, reduced delay and packet loss, enhanced network lifetime. By identifying the shortest path using hybrid optimization model reduces the energy requirements of the nodes and avoids packet loss. The computation cost is the limitation observed from this model due to hybrid optimization however, the performance is better compared to other optimization models. In the future, this research work can be further improved to reduce the computation cost.