1 Introduction

Wireless sensor network (WSN) is the set of teeny, battery-operated sensor nodes in the defined covered area. These sensor nodes have the responsibility to collect, process, and aggregates the data and then forward it to the processing center called a sink. There are many challenges associated with these networks, such as the data acquisition is accomplished in a remote or dense area, which can be inaccessible, limited energy resources, limited onboard processing and computing, and the distributed nature of WSNs. Various energy-aware routing protocols are present in the literature to address these issues [1,2,3] A WSN has wide scope in many fields such as monitoring, tracking, and surveillance in the military [4, 5], natural calamity conditions [6], health monitoring in biomedical field [7, 8], and in dangerous environment analysis and seismic sensing [9, 10].

The deployment of sensor nodes is accomplished randomly or uniformly. On the basis of deployment WSN can be classified into two classes: structured and unstructured. An unstructured WSN carries a heavy group of sensor nodes. The maintenance of the network is difficult in the unstructured network as it is a challenging task to manage, process, connection, and detection of failures due to a large number of sensor nodes. In the structured WSN, there are few sensor nodes, and deployment of these nodes are pre-planned, so it becomes easy to maintain the network. The lifespan of sensor nodes relies upon the residual energy in the nodes; hence it becomes vital to use the energy-efficient resources in WSNs. The conventional routing protocols include direct-transmission (DT) [11] and minimum-transmission energy (MTE) [12], are not capable of distributing the energy load among nodes in the wireless sensor network. In the direct-transmission, sensors send information directly to the sink, due to this fact, nodes having more distance from the sink would die first. In the MTE nodes, follow the minimum distance path, where cost reflects the transmission power expended. For this problem, the LEACH protocol was proposed in the literature. To enhance the lifetime of a network and to save energy, nodes are grouped and termed as clusters, and a cluster head is selected in each cluster. Remaining sensor nodes behave as cluster members. Each sensor node must relate to only one cluster. The cluster head collects the data from each cluster members and aggregates information and transmits the useful information to the base station (BS) or sink via single-hop or multi-hop communication. The clustering in WSN can be classified in the following: centralized, distributed and hybridized clustering. Also, clustering can be achieved in equal or unequal manner. The equal clustering algorithms are LEACH, HEED etc. and unequal clustering algorithms are ULEACH, UHEED, EEUC, EDUC etc. the hot spot problem is associated with equal clustering due to which unbalanced energy consumption in clusters. The sensor network also categorized as homogeneous WSN and Heterogeneous WSN. If all sensor nodes have the same energy amount, this is called a homogeneous network. In contrast, if some percentage of sensor nodes contained extra energy than other nodes is called a heterogeneous network.

Different type of engineering optimization problems are tackled by numerous optimization algorithms available in the literature including slime mould algorithm (SMA) [13], salp swarm algorithm (SSA) and its variants [14,15,16], sine cosine algorithm (SCA) [17,18,19], Harris hawk optimizer [20, 21], grey wolf optimizer (GWO) [22,23,24], gravitational search algorithm (GSA) [25], Multi-verse optimizer (MVO) [26], whale optimization algorithm (WOA) [27, 28]. The fuzzy theory is also investigated in the literature as in [29, 30].

In this paper, Diversity driven multi-parent evolutionary algorithm-based optimal cluster-head selection in the heterogeneous WSN is proposed. The paper is arranged as follows: the first section described the background and brief introduction to the paper. The second section presents the literature review, and the third section highlights the contributions of the paper. In the fourth section, the proposed algorithm is detailed, and the next fifth section elaborates the problem formulation. The sixth section presents the results and discussion of the proposed work, presenting the competitive performance of the proposed algorithm. Finally, the seventh section concludes the paper.

2 Related Works

In this section, various cluster head selection and energy-efficient techniques are discussed, which are gives the motivation to design the proposed algorithm. The architecture of wireless sensor nodes with the cluster head and sink is given in Fig. 1.

Fig. 1
figure 1

The Wireless sensor node architecture with cluster heads and sink

Various energy based routing protocols are explored in the literature such as low energy adaptive clustering hierarchy (LEACH) version of LEACH (VLEACH) [31], LEACH-B protocol [32], hybrid energy-efficient distributed (HEED) protocol [33], adaptive multi clustering algorithm based on fuzzy logic (Adaptive MCFL) [34], and Cluster chain weight metrics approach (CCWM) [35]. The LEACH protocol guarantees that the energy load is well distributed dynamically chosen based on a priori optimal probability. The role of the cluster head is performed through each sensor node by rotating uniformly. Cluster-head.

In the literature, various optimization-based energy-aware routing protocols and cluster head selection techniques are also proposed described in Table 1. The parameters considered and identified problems are summarised in this section. Every method delivers new contributions to energy-efficient routing or cluster head selection.

Table 1 Literature review

Ghugar et al. proposed a protocol layer trust-based intrusion detection system (LB-IDS) [44] and physical layer trust-based intrusion detection system (PL-IDS) [45] to provide security for wireless sensor network. A light weight trust management technique based on penalty and reward policy has been proposed by Sahoo et al. to detect malicious, selfish and compromised nodes [46]. Bhoi et al. proposed a density-based clustering method to identify the faults in WSNs [47], a software defined network based fault detection in WSN [48] and a geometric constraint based range free localization scheme for WSNs [49]. A fault detection method for heterogeneous WSN is proposed by Swain et al. by incorporating three phases namely; clustering phase, fault detection phase and fault classification phase [50].

3 Contribution of the Paper

The significant contributions of the paper are talked about as follows.

  1. (1)

    Proposed new optimization technique A diversity driven multi-parent evolutionary algorithm is proposed in this paper, which furthers the process of searching the search space by sensing the diversity of the population to avoid local optimum.

  2. (2)

    Optimized cluster head selection for the heterogeneous network The proposed algorithm is modified for the application on heterogeneous wireless sensor node network to choose cluster head in order to enhance the life of the network.

  3. (3)

    Use of fuzzy set theory to formulate fitness function and uneven clustering Fuzzy set theory is used in decision making to choose a solution effectively out of the available non-inferior solutions. Uneven clustering is also performed using the fuzzy theory.

Here a fitness function is designed to evaluate cost function for the selection of cluster head. In this paper, the residual energy of sensor nodes and the distance between nodes and sink is considered in the creation of the objective function. Also, to approve the proposed optimization algorithm, the wireless sensor network is simulated. Also, the presentation of the calculation is widely dissected with different points of view, such as alive nodes, residual energy of nodes and cluster head. The efficacy of the optimization algorithm is tested on benchmark functions, which include unimodal, multi-modal, separable, and non-separable characteristics.

4 Proposed Algorithm

This section is covering the detailed steps of operation performed. The proposed algorithm is named as Diversity-driven multi-parent evolutionary algorithm (DDMPEA) with adaptive non-uniform mutation (ANUM) [51]. In this algorithm, the multi-parent selection strategy is adopted for crossover operation to generate new offspring. Some defined percentages of individuals are selected randomly from the initial population, ensuring that parents are chosen once in an iteration. For mutation, Adaptive non-uniform mutation (ANUM) is applied conditionally based on a probability index calculated from the fitness variance of the population, which signifies the actual aggregation of the population in the search space defined by the problem objective. This mutation helps in diverting the population from local minima as sensed by the search space aggregation. The steps for the proposed algorithm are illustrated in detail as follows:

4.1 Initialization of Population

The initial NP numbers of members are randomly generated within the search space using uniform distribution using the following equation

$$x_{ij} = x_{j}^{\min } + r_{ij} \left( {x_{j}^{\max } - x_{j}^{\min } } \right);\quad \left( {i = 1,2, \ldots ,NP;\;j = 1,2, \ldots ,D} \right)$$
(1)

where \(r_{ij}\) the uniform random number for \(i^{th}\) member of the population and \(j^{th}\) dimension of the variable, NP is the size of the population, and D is the dimension of the search space. \(x_{j}^{min}\) and \(x_{j}^{max}\) are the minimum and maximum of \(j^{th}\) dimension of the control variable.

4.2 Opposition-Based Learning

The optimization algorithms initially randomly chose the members, and to obtain the optimal solution quality of these members is improved. The computational time is calculated using the distance and initial guesses obtained through an optimum solution. By utilizing the opposite solution of initial guesses simultaneously, it can be possible to enhance the search process to obtain better solutions. The initial position, either from the uniformly random distribution or its opposite guess, is chosen. The initial position and its opposite are being used to compute the objective function. Based on this, a decision has been taken for solutions to be considered primarily, which has the capability to accelerate the convergence. The same method can be used not only to initial positions but also continues to each position in the current population [30]. The oppositional learning in population is initialized as

$$x_{i + NP,j}^{t} = x_{j}^{\min } + x_{j}^{\max } - x_{ij}^{t} \left( {i = 1,2, \ldots ,NP ;j = 1,2, \ldots ,D} \right)$$
(2)

4.3 Multi Parent DE Crossover

In the multi-parent crossover, three parents are selected randomly for crossover to generate offspring. A pool of mating parents is created by selecting the best P% of the total population. Out of this pool three members \(x_{r1} ,x_{r2} \;{\text{and}}\;x_{r3}\) are randomly chosen for the crossover operation and create an offspring as per the following equation

$$O_{ij}^{t} = x_{r1,j}^{t} + \alpha_{ij} \left( {x_{r2,j}^{t} - x_{r3,j}^{t} } \right);\quad \left( {i = 1 , 2, \ldots, \frac{1}{3}\cdot NP\cdot \frac{P}{100} ;\quad j = 1, 2, \ldots , D} \right)$$
(3)

where \(\alpha_{ij}\) is a weighting factor and is a random number from a normal distribution with a mean of 0.7 and a variance of 0.1. t represents the index for the current generation. It is taken care that once a member is selected for the crossover is not selected again in the same iteration. The following equation is used to fix the off-limit offspring.

$$O_{ij}^{t} = \left\{ {\begin{array}{*{20}ll} {\frac{{x_{j}^{min} + O_{ij}^{t} }}{2},} \hfill &\quad {{\text{if}}\, O_{i,j}^{t} < X_{j}^{min} } \hfill \\ {\frac{{x_{j}^{max} + O_{ij}^{t} }}{2},} \hfill &\quad {{\text{if}}\;O_{i,j}^{t} > X_{j}^{max} } \hfill \\ \end{array} } \right.$$
(4)

After the multi-parent crossover operation, fitness value is evaluated from newly created offspring by solving the objective definition of the problem at hand [52].

4.4 Adaptive Non-uniform Mutation Strategy

The mutation is an operator used to maintain diversity from one generation to next. Fitness variance of the population is used as a signal of the diminishing diversity of the population. Whenever an algorithm tends to stick in a local minimum, the fitness variance of the population tends to become zero. This condition is used to trigger the adaptive non-uniform mutation to perturb the population from being stuck somewhere in a local optimum. Hence, the proposed algorithm kicks out the population from premature convergence situation by using an adaptive non-uniform mutation operator. The adaptive non-uniform mutation is performed according to Eq. (5).

$$Om_{ij}^{t} = O_{ij}^{t} \left( {1 + 0.5\eta } \right);\quad \left( {i = 1 , 2, \ldots , \frac{1}{3}\cdot NP\cdot \frac{P}{100};\quad j = 1, 2, \ldots , D} \right)$$
(5)

where \(\eta\) stands for the weighting factor from a normal distribution with a value of a mean as 0 and a variance of 1[53]. \(Om_{ij}^{t}\) is a mutated version of offspring \(O_{ij}^{t}\). This mutation is carried out if \(r_{i} \left( {0,1} \right) < P_{m}\), where \(r_{i} \left( {0,1} \right)\) is a uniform random number between 0 and 1 for \(i^{th}\) offspring. \(P_{m}\) is the mutation probability and is defined as

$$P_{m} = \left\{ {\begin{array}{*{20}c} {\frac{{\exp \left( { - h} \right)}}{5.0},} & {\sigma^{2} < \sigma_{1} } \\ {0,} & {\sigma^{2} \ge \sigma_{1} } \\ \end{array} } \right.$$
(6)

where \(\sigma_{1}\) is the threshold value of variance based on the search space range of the search variables as

$$\sigma_{1} = \left( {x_{j}^{max} - x_{j}^{min} } \right)\frac{1}{100}$$
(7)

\(\sigma^{2}\) is the fitness variance of the population. The degree of diversity, \(h\), in the \(t^{th}\) iteration is defined as

$$h = \frac{{max_{1 \le i \le NP} \left( {x_{i,j}^{t} - x_{best2}^{t} } \right)}}{{max_{t} \left\{ {max_{1 \le i \le NP} \left\{ {x_{i,j}^{t} - x_{best2}^{t} } \right\}} \right\}}}$$
(8)

where \(x_{best}^{t}\) is a position of the variable in the search space corresponding to the best fitness value and \(d_{2}\) is \(L_{2} - norm\) of \(d\).

The parameter \(h\) is the normalized distance of the member of the population from the optimum point, not necessarily the global optimum. The value of \(h\) signifies the diversity in the population. When the value of \(h\) is high, particles are more dispersed in space and requiring the small value of mutation probability. When the value of \(h\) is small, particles are congregated to assemble in the near proximity of a probable local optimum and hence to require significant mutation probability. The essential requirement is to improve the solutions in terms of enhanced ability of exploration is fulfilled by mutation strategy. When the algorithm stuck at local minima, an individual’s position and its interaction with the rest of the population are relatively estimated by employing the concept of the fitness variance.

figure d

The fitness variance, which is used as an indicator of a stuck population, is calculated using Eq. (9).

$$\sigma^{2} = \mathop \sum \limits_{i = 1}^{NP} \left[ {\frac{{f_{i} - f_{avg} }}{f}} \right]^{2}$$
(9)

where \(f_{avg}\) is the average of fitness values of population, \(f\) is the returning factor and \(f_{i}\) is the fitness of \(i^{th}\) individual. The returning factor is used to control the fitness variance of particles. The value of returning factor is calculated as

$$f = \left\{ {\begin{array}{*{20}ll} {max\left\{ {\left| {f_{i} - f_{avg} } \right|} \right\},} &\quad {\left\{ {\left| {f_{i} - f_{avg} } \right|} \right\} < 1} \\ {1,} &\quad {otherwise } \\ \end{array} } \right.$$
(10)

This fitness variance hints about the degree of the congregation of the population. The smaller the value of fitness variance, the nearer the particles are assembling at a point in the search space; otherwise, they are randomly dispersed in the search space [54].

A pool is created involving the present population at time \(t\), newly created offspring from crossover and the mutated offspring when the following steps are performed. This population from this pool is arranged according to their cost evaluations. Finally, the best \(NP\) members are selected from this pool to substitute the individuals of the present population. The gradual procedure is elaborated in Algorithm-1. The flow chart of proposed algorithm is given in Fig. 2.

Fig. 2
figure 2

Flow Chart of Diversity driven multi-parent evolutionary algorithm with adaptive non-uniform mutation

5 Problem Formulation for Cluster-Head Selection in Heterogeneous Wireless Sensor Networks

In this section, the formulation of the problem for heterogeneous wireless sensor networks is discussed in which a portion of the nodes has an additional energy source initially. The scenario in which a population percentage of sensor nodes carries additional energy resources compared to other sensor nodes in different proportions is considered. In this structure, the total number of nodes, \(n\), are divided into three categories; advanced nodes, intermediate nodes and normal nodes expressed by \(N_{ADV}\), \(N_{INT}\) and \(N_{NRM}\) respectively.

$$N_{ADV} = n \times m$$
(11)
$$N_{INT} = n \times m_{0 }$$
(12)
$$N_{NRM} = n \times (1 - m - m_{0} )$$
(13)

where \(m_{0}\) and \(m\) are the fractions of intermediate and advanced nodes, respectively. The energy of the advanced nodes and intermediate nodes are α and β times higher in energy as compared to normal nodes, respectively [55]. The energy of normal, intermediated and advanced nodes is as follows

$$E_{ADV} = E_{0} \times \left( {1 + \alpha } \right) \times n \times m$$
(14)
$$E_{INT} = E_{0} \times \left( {1 + \beta } \right) \times n \times m_{0}$$
(15)
$$E_{NRM} = E_{0} \times \left( {1 - m - m_{0} } \right) \times n$$
(16)
$$E_{T} = E_{ADV} + E_{INT} + E_{NRM}$$
(17)
$$E_{T} = E_{0} \times \left( {1 + \alpha } \right) \times n \times m + E_{0} \times \left( {1 + \beta } \right) \times n \times m_{0} + E_{0} \times \left( {1 - m - m_{0} } \right) \times n$$
(18)
$$E_{T} = n \times E_{0} \times \left( {1 + \beta \times m_{0} + m \times \alpha } \right)$$
(19)

where the total energy of the network is denoted by \(E_{T}\) and \(E_{0}\) represents the initial energy of the sensor node.

The problem of cluster head selection in a heterogeneous wireless sensor network is created as a multi-objective optimization problem. The two objectives which are considered are residual energy of the node and the distances between cluster heads and base station and cluster head and other nodes. The objectives considered are conflicting in nature in the sense that when distance objective is decreasing, the residual energy of the nodes increases as with lesser distances consumed energy decreases. Search space is searched for non-inferior solutions by employing the proposed algorithm DDMPEA-ANUM. Fuzzy set theory is used for decision making to find the best solution.

5.1 System Energy Dissipation Model

The calculation of energy dissipation for data transmission in WSN is carried out by comparing the distance travelled like the distance between the transmitter and the receiver, and the critical value \(d_{0} = \sqrt {\frac{{E_{efs} }}{{E_{amp} }}}\). In transmission of each packet energy loss occurs which follows a free-space and multi-path fading model. A model for radio transmission and reception is shown in Fig. 3.

Fig. 3
figure 3

Radio energy dissipation model

The energy required in the transmission of \(k\)-bit data at the distance \(d\), is given by \(E_{dis} \left( {l,d} \right)\) and calculated as

$$E_{dis} \left( {k,d} \right) = k \times E_{elec} + k \times E_{efs} \times d^{2} \;\forall d \le d_{0}$$
(20)
$$E_{dis} \left( {k,d} \right) = k \times E_{elec} + k \times E_{amp} \times d^{4} \;\forall d > d_{0}$$
(21)

where \(E_{efs}\) is for free space energy model, \(E_{amp}\) is an energy consumed in the power amplifier and \(E_{elec}\) represents the electronic energy of the circuit given as

$$E_{elec} = E_{TX} + E_{DA}$$
(22)

where \(E_{TX}\) is transmitter circuit’s energy and \(E_{DA}\) is energy required in data aggregation. \(d\) is the distance between the sender node and the receiver node. \(k\) represents the packet size of the data transmitted. The energy consumed during the reception of data per bit is given by

$$E_{dis} \left( l \right) = E_{elec} \times k$$
(23)

Hence the total energy consumed by cluster head nodes is given by

$$E_{C}^{{t_{r} }} \left( i \right) = N_{CH} \times \left( {E_{dis} \left( k \right) + E_{elec} } \right)$$
(24)

and the total energy dissipated by other nodes is given by

$$E_{C}^{{t_{r} }} \left( i \right) = E_{dis} \left( {k,d} \right)$$
(25)

5.2 Residual Energy of the NODE

The energy estimation of each node is revise subsequently to sending or getting \(k\). bytes of information. This procedure is rehashed until each node is said to be a dead node. A node is said to be dead node when the leftover energy gets negative or zero. The residual energy of the node in the current round is considered as the first objective for evaluating the optimum cluster. The cluster head consumes more energy as compared to other sensor nodes as it has the responsibility of transmitting, receiving, aggregating, and forwarding the data. After every round of communication the cluster head decreases its energy more rapidly than the other nodes. Therefore, the re-establishment of cluster heads in each round on the basis of the residual energy of a node becomes obligatory. The residual energy of the node is represented mathematically as

$$E_{R}^{{t_{r} + 1}} \left( i \right) = E_{R}^{{t_{r} }} \left( i \right) - E_{C}^{{t_{r} }} \left( i \right);\quad \left( {i = 1,2, \ldots ,n} \right)$$
(26)

where \(E_{R}^{{t_{r} }}\) is the residual energy of \(i^{th}\) node after \(t_{r}\) number of rounds and \(E_{C}^{{t_{r} }}\) is the energy consumed in the \(t_{r}^{th}\) round. It is clear that for each type of heterogeneous nodes, the value of \(E_{R}^{{t_{r} }}\) will be different according to the type of node. For the first round \(\left( {t_{r} = 1} \right)\), \(E_{R}^{{t_{r} }}\) would be \(E_{ADV} , E_{INT}\) and \(E_{NRM}\) for advanced, intermediate, and normal nodes, respectively. It is obvious that the node with the higher value of energy wins the selection of a node to be cluster head.

5.3 Distance Between Node and Sink

Any communication that takes place between nodes and cluster head or between nodes and sink consumes some energy according to the role performed by the node. Higher the distance between the nodes while communicating; higher energy will be required and vice-versa. The distance between sensor nodes to sink is calculated as

$$D_{i} = \sqrt {\left( {x_{BS} - x_{i} } \right)^{2} + \left( {y_{BS} - y_{i} } \right)^{2} } ;\quad \left( {i = 1,2, \ldots ,n} \right)$$
(27)

This is the second fitness objective for the multi-objective problem at hand. The distance between sensor nodes and cluster heads is calculated as

$$D_{ij} = \sqrt {\left( {x_{j} - x_{i} } \right)^{2} + \left( {y_{j} - y_{i} } \right)^{2} } ;\quad \left( {i = 1,2, \ldots ,n;\quad j = 1,2, \ldots ,N_{CH} } \right)$$
(28)

where \(N_{CH}\) are the number of cluster heads specified.

5.4 Decision Making

In the problem at hand, two objectives are considered, which are of conflicting nature as residual energy is to be maximized, and the distances between the cluster heads and base station are bound to be reduced. Hence, to find the best-compromised solution, the fuzzy set theory is employed. In general, the decision-maker's assessment is of an imprecise type, and it is worth thinking that the DM might have blurred or imprecise objectives for each objective feature. The Fuzzy Sets are described as membership functions by equations. These functions reflect a membership degree in some fuzzy sets by using values from 0 to 1. The membership function is defined by assuming \(\mu \left( {F_{i}^{k} } \right)\) is a decreasing and continuous function that is strictly monotonous. In fuzzy set theory membership values are calculated for both fitness parameters; residual energy of each node (considered as \(F_{i}^{1}\)) and distance between sink and nodes (considered as \(F_{i}^{2}\)) as given below

$$\mu \left( {F_{i}^{k} } \right) = \left\{ {\begin{array}{*{20}l} {1;} \hfill & {F_{i}^{k} \le F_{k}^{min} } \hfill \\ {\frac{{F_{k}^{max} - F_{i}^{k} }}{{F_{k}^{max} - F_{i}^{min} }};} \hfill & { F_{k}^{min} < F_{i}^{k} < F_{k}^{max} } \hfill \\ {0;} \hfill & {F_{i}^{k} \ge F_{k}^{max} } \hfill \\ \end{array} } \right.\left( {i = 1,2, \ldots ,n;k = 1,2} \right)$$
(29)

The satisfaction level of \(F_{i}^{k}\) objective of non-inferior solution arranged in range of [0,1], is reflected by the value of membership function. The accomplishment of \(k\) non dominated solutions [56] given below

$$\mu_{D}^{i} = \frac{{\left[ {\mathop \sum \nolimits_{k = 1}^{2} \mu \left( {F_{i}^{k} } \right)} \right]}}{{\left[ {\mathop \sum \nolimits_{i = 1}^{n} \mathop \sum \nolimits_{k = 1}^{2} \mu \left( {F_{i}^{k} } \right)} \right]}}$$
(30)

The solution corresponding to the maximum membership \(\mu_{D}^{i}\) chosen as the best solution. Hence the problem statement becomes

$$\begin{aligned} & Max \left\{ {\mu_{D}^{i} :i = 1, 2, \ldots ,n} \right\} \\ & {\text{subject}}\;{\text{to}}\;x_{j}^{min} < x_{ij} < x_{j}^{max} \\ \end{aligned}$$
(31)

In the proposed work, the clusters are re-elected after each round, and as a result, the load is very much conveyed and adjusted among the nodes of the network. After cluster head selection, uneven clustering is accomplished using fuzzy theory based on the distance between nodes and sink. The working procedure for optimum clustering is given in Algorithm-2.

figure e

5.5 Implementation

The proposed protocol works in two stages, namely, setup stage and steady stage (Fig. 4). In this step, the wireless sensor network is formulated by the uniformly random deployment of heterogenous energy sensor nodes termed as advanced, intermediate, and normal nodes at the start. From the second iteration onwards, the locations of these nodes are modified employing the proposed algorithm in the crossover and mutation steps. Then, the decision maker chooses the configuration to be updated to further the process of the algorithm. The base station or sink is placed in the center of the formulated network. After the network formulation, cluster heads are selected, and nodes are assigned to their cluster heads on the basis of the distance between sensor nodes and the sink and the residual energy of nodes. Cluster head selection operation is performed by employing the proposed optimization technique. The parameters utilized in the formulation of fitness function are residual energy of each node and distance between nodes and sink.

Fig. 4
figure 4

Flow chart of DDMPEA with ANUM for CH selection and working of proposed protocol

The second stage, that is, the steady-state stage, indicates the initialization of data transmission. It is run for some specified number of rounds in every iteration. For communication to take place, the threshold value of the distance is compared with the distance between sensor nodes and the sink. This helps to make the decision that communication occurs via single hop or multiple hops. When data is received by the cluster head, it collects, processed the data and forwards it to the sink. Also, the energy of each node is analysed if it is equal or less than zero if it happens so, the node is flagged as the dead node. This dead node does not participate in the process further after it is flagged as so.

As mentioned in Eq. (9) of the proposed algorithm, the fitness variance is calculated using the objective function value of each member. But in the case of the problem at hand, there is only one objective value collectively for the whole NP population, i.e., the number of live nodes after a certain specified number of data transmission rounds executed. Hence, this parameter is molded according to the problem at hand to the location variance of sensor nodes. The advantage of this modification is that whenever nodes tend to aggregate at a particular location, the mutation is performed. The two-dimensional spatial variance of the sensor node locations is calculated as follows

$$\sigma^{2} = \frac{1}{n}\mathop \sum \limits_{i = 1}^{n} \sqrt {\left( {x_{i} - \overline{x}} \right)^{2} + \left( {y_{i} - \overline{y}} \right)^{2} }$$
(32)

where \(\left( {\overline{x},\overline{y}} \right)\) is the mean of all the sensor node locations. The value of mutation probability is modified accordingly as

$$P_{m} = \left\{ {\begin{array}{*{20}c} {\frac{{\exp \left( { - \sigma^{2} } \right)}}{5.0},} & {\sigma^{2} < \sigma_{1} } \\ {0 ,} & {\sigma^{2} \ge \sigma_{1} } \\ \end{array} } \right.$$
(33)

The whole working process of DDMPEA with ANUM applied in this work is described in Algorithm-3 as follows.

figure f

6 Results and Discussion

The efficacy of DDMPEA with ANUM is tested in two different scenarios. First, on the basic benchmark optimization problems and second on the cluster head selection in case of a heterogeneous wireless sensor network. The simulation is carried out in MATLAB-2015b platform running under the windows-10 operating system with the Intel Core i3 processor @ 1.70 GHz frequency with 4 GB RAM memory. The obtained results are tabulated and discussed in this section.

6.1 Basic Benchmark Functions

This section discusses the performance of the proposed algorithm tested on benchmark functions. The functions \(f_{1} - f_{7}\) are unimodal while functions \(f_{8} - f_{23}\) are multi-modal [18]. The results are obtained and tabulated in terms of mean, median, standard deviation, and worst values in Table 2. The population size is taken as 50, and maximum iterations are set to 1000 for comparison. The other optimization algorithms considered for comparison are SCA [17], PSO[57], TLBO[58], MFO[59], DE[60], WOA [27], GWO[22], CSA[61] and SCA-PSO[18] as available in the literature.

Table 2 Results of 23 benchmark functions for different algorithms with initial population NP = 50

For functions \(f_{1} , f_{2} , f_{3} {\text{ and }}f_{4}\), the results obtained from the proposed algorithm are competitive to the results obtained from other algorithms. Functions \(f_{8}\) to \(f_{13}\) are multi-modal, separable and non-separable, high dimensional benchmark functions which are usually used to benchmark the ability of an algorithm to tackle with the premature convergence problem. From the results obtained, it is observed that functions \(f_{9}\), \(f_{10}\) and \(f_{11}\) gives competitive results as compared to the results from other algorithms in terms of mean, median, standard deviation and worst value. Hence, it can be inferred that the proposed algorithm works effectively to solve the premature convergence problem. This observation shows the better exploration ability of the proposed algorithm. SCA perform better for function \(f_{8}\). For functions \(f_{12}\) and \(f_{13}\) classical DE performs better compared to results from other algorithms.

Functions \(f_{14}\) to \(f_{23}\) are the multi-modal low dimensional functions. It can be observed from Table 1, the proposed algorithm works effectively for these functions too. Functions \(f_{16}\), \(f_{18}\), \(f_{19}\), \(f_{20}\), \(f_{22}\) and \(f_{23}\) gives optimum global values in terms of mean, median, standard deviation and worst value. The convergence behaviour of benchmark functions and their box plots are given in Figs. 5 and 6., respectively. From the box plots, it is observed that proposed algorithm gives results with minimum standard deviation in case of almost all considered functions.

Fig. 5
figure 5

Convergence behaviour for the results of DDMPEA with ANUM algorithm

Fig. 6
figure 6

Box plots of the results of proposed algorithm for function f1f6, f9f12, f16f20

6.1.1 Statistical Analysis of Benchmark Functions

The comparison of results obtained by the proposed algorithm with the results available in the literature from other algorithms is tabulated based on the mean, standard deviation, median, and worst values from 30 independent runs. For the comparison of results from each run, a nonparametric test, the Wilcoxon rank-sum test is conducted with a 5% significance level, and obtained p values are shown in Table 3. The null hypothesis is rejected if the p-values are less than 0.05, which represents that the better objective functions values are obtained by the proposed algorithm in each case are statistically significant and have not occurred by chance. For this analysis, the best value is considered of which has the smallest mean value. In case if there exists more than one mean value of compared algorithms, then algorithm which have the smallest standard deviation is selected. Not applicable (N/A) is written for the best algorithm because the best algorithm cannot be compared with itself.

Table 3 p-values calculated for the Wilcoxon rank-sum test (with significance level 0.05) for basic benchmark functions

From Table 3, it is clear that DDMPEA with ANUM obtained best results for function \(f_{5} , f_{6} , f_{9} - f_{11} , f_{16} - f_{19}\) and \(f_{21} - f_{23}\). For function \(f_{8}\) CSA gives the best values. For remaining functions, the proposed algorithm gives competitive results as compared to other optimization algorithms.

6.2 Heterogeneous Wireless Sensor Network

Validating the proposed algorithm on benchmark problems, the application of heterogeneous wireless sensor networks is investigated. The parameters considered for simulation of heterogeneous WSN are given in Table 4. The heterogeneous energy sensor nodes are deployed randomly in area 100 × 100 m2, and the sink is located in the middle of the network.

Table 4 Parameters considered for Heterogeneous wireless sensor network

The 0.5 J is taken as initial energy of normal nodes, and the intermediate nodes have energy two times of normal nodes, while advanced nodes have three times more energy of normal nodes. The number of intermediate nodes is ten percent of total sensor nodes in the considered network, and the number of advanced nodes is 20 percent of total nodes, and energy fraction is given in Table 4. The assumptions considered for the proposed protocol.

A few assumptions are considered about the qualities for a portion of the sensor nodes enlisted bellow.

  • In the network, all sensor nodes are stationary after the deployment, including the sink. They have enough capacity for forwarding and receiving data packets from other nodes and sink, covering their sensing range. Also, the coverage area is taken in meter square.

  • The deployed nodes are heterogeneous in terms of their initial energy, i.e., some of the nodes have more energy resources compared to other nodes. Hence three types of nodes are considered advanced, intermediate, and normal nodes.

  • The sink is viewed as having an infinite energy source.

  • Once the sensor nodes are depleting their energies, they cannot be recharged again. Also, the sensor nodes are not aware of their location.

  • The different components, for example, signal blurring, happen during transmission and gathering, impedance, and sign misfortune because of different natural elements, and physical deterrents are not thought of.

6.2.1 Performance Measures

The analysis of the proposed protocol is carried out using measures such as network lifetime, residual energy of the network, stability period, and the number of data packets transmitted to the sink (network throughput).

The lifetime of a network The number of alive nodes in the network represents the lifetime of the network, i.e. the active nodes having sufficient energy for transmission of data packets.

residual energy of the network As the data transmission takes place in the wireless sensor network, the sum of residual energy of sensor nodes decreases gradually due to the fact that nodes squander their energy during the data transmission with other sensor nodes and the sink. This performance measure is obtained by adding residual energy of all nodes after each round of data transmission.

Stability Period The stability period of WSN is defined in terms of numbers of the round until the first sensor node consumes its total energy in the process of data transmission. This first dead sensor node can be advanced, intermediate, or normal.

Network throughput The number of data packets satisfyingly transmitted over time is termed as network throughput. This performance metric plays a vital role as it ensures the reliability of the network to obtain the best network performance.

6.2.2 Simulation Analysis

The simulation analysis of the proposed protocol is carried out on the basis of performance measures discussed in Sect. 6.2.1. The working process is described in Sect. 5.5 for a heterogeneous wireless sensor network. The obtained results of the proposed protocol are compared with other optimization algorithms based protocols such as GAOC, GADA_LEACH, TEDRP, and DCH_GA from genetic algorithm based paper [55].

Network Lifetime From Fig. 7., it is evident that in the proposed protocol, sensor nodes die after 21,000 rounds whereas GAOC, GADA-LEACH, and DCH-GA cover 19,648, 17,113, 18,498 and 14,729 rounds respectively. The improvement in network lifetime by proposed protocols as compared to other protocols, in terms of percentage is 6.88, 22.71, 13.52, and 42.57% compared to GAOC, GADA-LEACH, TEDRP, and DCH-GA respectively. The alive nodes vs. rounds given in Fig. 8.

Fig. 7
figure 7

Comparison of DDMPEA with ANUM with other protocols in terms of stability period, HND and network lifetime

Fig. 8
figure 8

Alive nodes vs. rounds for proposed algorithm

The dead nodes vs. rounds given in Fig. 9. In the proposed work, half sensor node dead (HND) after 10,627 rounds of data transmission in the wireless sensor network. The HND for GAOC, GADA-LEACH, TEDRP, and DCH-GA are 10,674, 7722, 9086, and 7111, respectively.

Fig. 9
figure 9

Dead nodes vs rounds for proposed protocol

The residual energy of the network The occurrence of the data transmission process in heterogeneous wireless sensor networks costs the energy loss of sensor nodes. The remaining energy in WSN is observed after each round of data transmission. Figure 10. presents energy consumption per round in the data communication process. The figure is given for 100 sensor nodes, which are used to cover the 100 × 100 m2 area. The total energy for this configuration is 70 J.

Fig. 10
figure 10

Residual energy of heterogeneous WSN for 100 sensor nodes

Stability period From Figs. 7. and 8., it is clear that the proposed algorithm shows improvement in the stability period of WSN in percentage as 0.77, 33.41, 33.71 and 62.69% as compared to GAOC, GADA-LEACH, TEDRP and DCH-GA respectively. This improvement ensures reliable data transmission in the network.

Network throughput This parameter is related to the number of data packets transmitted successfully to the base station. The proposed algorithm transmits 1,680,000 data bits to the sink from the cluster heads. This performance metric plays a significant role in acquiring a higher network lifespan.

6.2.3 Summarized Analysis of Proposed Protocol

From the obtained results, it is clear that the proposed method not only enhances the reliability but also improves the stability period of the network. The comparative analysis and percentage improvement in performance metrics are shown in Tables 5 and 6.

Table 5 Comparison of proposed protocol with other protocols in terms of performance metrics
Table 6 Comparison in terms of percentage improvement

7 Conclusion

In a given study, a new technique named 'Diversity driven multi-parent evolutionary algorithm with adaptive non-uniform mutation' has been suggested for cluster head selection in heterogeneous wireless sensor networks. Residual energy and distance travelled are two objective functions that are to be optimized simultaneously in order to minimize the overall fitness function. Fuzzy set theory is utilized to evaluate membership function for both objective functions, i.e. residual energy and distance travelled. The best value of a membership function is selected for cluster head selection based on higher cardinal ranking. The clustering of nodes is achieved utilizing fuzzy theory based on the remaining energy of nodes and distance between sensor nodes and base station. The proposed algorithm proved to be beneficial as it shows the improvement in the stability period, alive nodes, and network lifetime in comparison with other optimization-based methods. The percentage improvement in the stability period is 0.77, 62.91, 33.71, and 33.41 percentage as compared to GAOC, DCH-GA, TEDRP, and GADA-LEACH, respectively. In the same manner, the percentage improvement in network lifetime is 6.88, 42.51, 13.52, and 22.71% as compared to these protocols. The efficacy of the proposed algorithm is also validated on benchmark functions, and improvement is observed in terms of mean, worst, median, best, and standard deviation.

For future work, we are going to investigate the following issues: First, the proposed DDMPEA with ANUM can be applied to other challenging real-world problems like signal processing and fault diagnosis. Second, it could be interesting to incorporate DDMPEA with ANUM with some effective mechanisms of other metaheuristics, such as SCA, and SSA.