1 Introduction

Among the constant developments in technology a prospective invention, IoT is a forthcoming road which is escalating as a universal worldwide computing system where billions of devices will be linked to the Internet [1]. IoT is constantly growing and is a latest exploration area where openings are countless. Due to its countless imaginations, it is placed into an updated and incorporated version instead of the existing procedure of the internet. The count of objects consuming internet facilities is developing each day and connecting all of them by wireless or wire will set as an influential base of evidence at our finger commands. The notion of empowering communication among smart devices and machines is an innovative technology; however, the IoT enabled technologies are not rather original for people [2]. IoT is the term and the method of joining data, acquired from diverse types of objects to any assumed platform on the online network organization [3]. The IoT delivers novel contestants and heritage wireless operators with additional opportunity for transporting connectivity to their clients as shown in Fig. 1.

Fig. 1
figure 1

Network planning for IoT applications

There are numerous conceivable upcoming presentations that can be of excessive benefit. Following are some of the applications of IoT:-

  1. (a)

    Intelligent transportation system (ITS): Traffic due to vehicles is a significant issue of a society. Therefore, all associated difficulties with it must be correctly given attention. ITS has an essential feature for a system which could reform the transportation cases based on the traffic material retrieved through objects by deployment of IoT technologies [4]. For such innovating schemes, an understanding of a novel methods for automatic monitoring of vehicles and other transportation parameters is very important. For its deployment, there is a requirement of IoT framework with enabling technologies rather than general image processing techniques [5].

  2. (b)

    Smart environment: Forecasting of natural catastrophes such as fire, floods, air pollution, land-sliding, earthquakes, volcanoes, etc. is possible by the use of inventive technologies of IoT. Environment monitoring systems will be available to predict the certain parameters of the disasters which will be helpful in determining the danger beforehand.

  3. (c)

    Smart home: IoT can deliver DIY (Do-It-Yourself) explanations for Smart Home Automation by which remotely controlled appliances will be available as per people’s requirements. Careful monitoring of efficacy meters, water and energy usage will aid in conserving resources and sensing unforeseen overfilling, water leakages, etc.

  4. (d)

    Smart hospitals: Doctors and other supporting staff will be capable of monitoring the blood rate, temperature, heart rate and other patient’s health conditions outside or inside the buildings of the hospital on the time of admission using smart malleable wearable embedded devices with RFID tags that make hospital smart and well-furnished [6].

  5. (e)

    Smart agriculture: Soil nutrition, Humidity, Temperature, etc. can be observed and can help in the improvement of the green housing experiences by automatic adjustment of various parameters to exploit production. Precise fertilization and watering will support in refining the water conserving and quality composting respectively [7].

For large-scale WSNs, the clustering is a key routing method which effectively broadens the network’s lifetime. In this paper, a reactive routing algorithm and neuron structure with transmission principle on the basis of dynamic clustering is proposed. Cluster head is efficiently elected in the occurrence region on the basis of residual energy after the amplification of the event.

The cluster head transmits the collected data back to the end nodes along with the network backbone information. Two types of accumulation methods are devised to increase the efficiency of data collection. In a designed method, data should be periodically transmitted by nodes outside the region if fluctuation is faced by the cluster head. By this cluster head can track the varying speed of the incident due to fluctuation raised in action-threshold. At last the results received from simulation verify that the DCRR algorithm boost ups the life duration of network and changes are adaptable as well as this algorithm has more significant merits under the middle and low load. Numerous fields and applications such as general engineering, disaster and hazards management, biomedical health and habitat monitoring, forest fire detection, animal tracking, commercial applications, seismic detection, homes applications, underwater applications etc. [8] are developed for WSNs. According to article [9] WSNs are considered as the rapid growing technology along with a most leading IoT technologies [10]. The motes known as sensor or sensing nodes are substantial entities characterized by: (1) a battery with defined energy; (2) a processor with restricted processing proficiency; (3) and a transceiver [11]. The sensor nodes can be disposed in supervising areas to collect diversified types of information (e.g., wind, humidity, light, temperature) and then transfer the assembled information to the sink using routing mechanism via multi-hop or single hop communication [12]. The access points or sensor nodes relay that gathered information to the users. However, when WSNs are deployed in distant areas; it is arduous to replace drained batteries [13], which lead to extend WSN lifetime durability crucially. The transceiver is the source of higher energy consumption that used in sensor nodes, and many papers or articles also discussed it in literature [14]. For minimal consumption of energy and the usage of transceiver in an attractive manner, strategies are in development. Clustering is grouping of sensors in numerous clusters in which individual cluster have a respective cluster-head including various cluster members. In dynamic clustering, a sensor node having high energy becomes the cluster head which makes the wireless network more stable. Contribution of the papers is outlined as below:

  • A literature survey of the existing integration of WSN with IoT is carried out.

  • Comparative Protocols of WSN are analyzed.

  • Usage and importance of Genetic Algorithms for Data Transmission is realized and new algorithm is proposed for IoT applications based on routing in WSN.

  • The proposed approach is validated in terms of throughput and standard deviation.

Rest of the paper is organized as: Sect. 2 throws light on the work done in the recent past by the researchers which is followed by the proposed algorithm in Sect. 3. Results and Discussions are done in the Sect. 4. Lastly, paper is concluded in Sect. 5.

2 Related work

There are many clustering algorithms and mechanisms used in literature such as Hierarchical Clustering [15], Distributed Clustering Algorithm (DCA) [16], Spanning Tree (or BFS Tree) [17], on-Demand Clustering Routing [18], Degree or Lowest Identifier Heuristics [19], Cognitive Routing Protocol for IoT [20], Energy Efficient Clustering Routing [21], Power Efficient And Adaptive Clustering Hierarchy (PEACH) [22], Optimal Energy Aware Clustering [21], Genetic algorithm for IoT [23], Hybrid based Energy- Efficient Distributed Clustering (HEED) [24], Power Aware Dynamic Clustering Protocol (PADCP) [21, 25].

Arboleda et al. [26] reflected some key approaches and gave comparability analysis among the various clustering protocols. In this paper, authors analyzed cluster structure, LEACH-based protocols, cluster types and its advantages along with reactive routing WSNs algorithms. The comparative analysis of these protocols’ characteristics and their uses in different applications were defined.

Kumarawadu et al. [27] identified the feasible clustering WSNs algorithms with CH election norms and cluster formation parameters. The authors also surveyed the challenges and issues related to neighborhood information, biologically inspired, probabilistic that depends on the identity-based clustering algorithms classification.

Jiang et al. [28] introduced clustering schemes and classification methods in WSN to examine three notable merits such as easy maintenance, fewer overheads, and more scalability thorough eight clustering attributes. The authors also figured out various algorithms in clustering such as PEGASIS, HEED, LEACH etc. and comparison of these algorithms was done with numerous attributes.

Authors in [29] presented a study on a simple clustering routing protocol classification to attain energy efficiency from the perspectives of data routing in WSNs. Along with some future research directions, pre-established and on-demand classes of nine clustering algorithms were summarized by authors in this research paper.

In [30] authors discussed the operations, advantages, and demerits of each clustering protocol algorithm briefly. In terms of energy utilization and network’s lifespan, authors surveyed the seven algorithms such as APTEEN, TEEN, LEACH and EEUC etc.

In [31] authors have proposed a survey to summarize nine leading clustering algorithms with their challenges such as EECS, HEED, LEACH, TL-LEACH, EEUC etc. The comparative analysis of these algorithms was done on the behalf of merits such as hop distance, cluster size, CH distribution uniformity, cluster formation approach, residual energy and delay.

To stabilize energy utilization among CHs, a distributed energy-effective unequal (DEU) cluster routing protocol presented in [32]. The DEU clustering protocol integrated the uneven clustering and multi-hop routing methods along with to select highly energy efficient nodes in the network to save energy. CHs considered factors like optimal hop count of candidate nodes, intra-cluster, residual energy and inter-cluster communication and transmission cost to elect RNs.

The above approaches have worked on the parameters of energy, delay, network stability etc. i.e. quality of metrics (QoS) for WSN. They have not considered the network throughput, scalability and reliability for transmitting the data which is required for IoT applications.

Certainly, literature exists in abundance for WSN software platforms related to the various domains of IoT applications. In [33] an architectural reference model (ARM) is specified within the project named IoT-A. The key concepts and functional groups of truly existing IoT platforms and scenarios are defined in [33] and have discussed about developing a domain and a functional model. For example, authors [34, 35] went through interoperability in IoT based scenarios with the use of designed guidelines of IoT based ARM and by defining acceptable IoT web-enabled technologies.

In the above approaches of IoT, authors have not considered the scalability, fault tolerance and load balancing. The proposed approach has shown the network throughput and slot utilization over 800 data transmissions which can be increased as per the network area. Moreover, it is considering standard deviation in the data transmission to validate it for the IoT.

As interoperability is an important facet, undeniably heterogeneity or cross-section is also one of the main threats to be directed in IoT environments. To virtualize the real-world entities, IoT ARM-based platform is introduced in this research. Data collected by the latent sensors or actions performed by underlying actuators exposed entities in a conceptual manner. A case is defined, in which Parking lots and holding space is monitored by sensors. Scalability is another issue that becomes the important aspect of IoT based platforms and scenario is also proposed. In [36] this approach works within the VITAL project. According to smart city scenario, authors have [37] considered an approach to define the main challenges namely; homogenization, resources management, and services exposure arise by these resources. Authors are working on the integration of WSN and IoT protocols [38, 39] which is raising challenge for the already existing protocols. Despite these facts, the proposed approach presented in only as a design concept. However, it does not give the working of each component of architecture, their implementation and deployed nature. The work proposed in the paper has elaborated the results retrieved after the implementation of the proposed algorithm.

3 Proposed algorithm

Recent work or research in IoT classified in terms of platform, network, devices and layers. For WSNs integrated with IoT, we focused on design and network planning with the use of dynamic clustering approach based genetic algorithm (GA). An IoT application performs well and seamlessly with well-designed IoT network architecture. Without it, IoT devices do not provide useful information and services to the end users. A novel architecture with some predictable techniques such as grouping, security and privacy, network and connection management is introduced in this research. Many other technologies as WSN, near field communications (NFC), machine-to-machine (M2M), personal area networks (PAN) such as Wi-Fi, cellular, Bluetooth etc. and body area networks (BAN) are also included in the IoT era.

3.1 Challenges and prospect of IoT

As IoT nodes should be united, extensive and flawless so it needs set up of high scale services formation within agreed standards to gives high impacts to the services related to different applications or scenarios and user requirements. Although IoT application development is a continuous process, still there are plentiful issues such as cost, power, computing, low latency, self-organization, dispersed intelligence and systems technology which need to be solved.

  1. (a)

    Challenges of IoT

Though IoT brings many new connections and opportunities to end users as well as to the industry insights to various application areas, still it lacks in efficient architecture and technology set of standards that connects the real and virtual world in an allied framework [38]. Some of the key challenges are listed as following.

  1. (1)

    Architecture challenge: Emerging of various sensors (e.g. physical, chemical, biometric and camera sensors), smart interlinked devices and intense far-reaching technologies involved in IoT applications depend on various fields and their architecture or scenario. Moreover, the communications between these interconnected devices are in a wireless, ad hoc and in an automatic manner. It makes the architecture services more decentralized, mobile and complicated.

  2. (2)

    Technical challenge: Although different application areas need different scenarios and architectures, therefore, different technologies are to be developed, related to the services that make the IoT complex. In this way, heterogeneous becomes one of the major challenges in smart IoT environments.

  3. (3)

    Hardware challenge: IoT equips smart systems with smart devices. To exploit the communication between the devices, speedy deployment and services of IoT applications are required. For this reason, researchers focus on hardware design like a wireless trackable system which is cost-effective, low size and highly functional.

GA is generally used to achieve high-quality solutions for search. To optimize the problems with historical data and to address the search for better performance is mostly accomplished by the efficient GAs as these algorithms are based on genetics and natural selection. The term natural selection means completion of tasks by those species who can adapt to changes occurring in an environment for surviving in next generation and to reproduce the new species. These algorithms pretend “survival of the fittest” as each generation consists of a population of individuals and each individual depicts a search space point along with attainable manner of integer/floats/string/bits/character, similar to the chromosome.

The GAs preserved the population of n individuals in addition to their fitness scores, means who has the ability to compete; a fitness score is given to that individual. Those who have better scores, mate and generate better descendant by bringing together chromosomes of parents. They are selected to reproduce more as compared to other individuals. As the size of a population is static and some of the individuals die, so a room has to be formed for the new generation for replacement of the old ones with new arrivals when all mating opportunities are expanded. When a least fit dies, it is assumed that superior solutions will be succeeded as each new generation has better genes.

Better genes are more efficient than the average genes besides having partial solutions as compared to the solutions of former generations. The population is said to converge when there is no considerable difference originated by off-springs comparable to previous populations. Therefore, the GA is also said to converge as a set of solutions for the problem.

  1. (b)

    Operators of Genetic Algorithms

The following operators are involved in algorithm for new generation of off-springs after the creation of primary generation:–

(1) Selection operator: In this, the one who has finer fitness scores, are selected to transmit their heredity to the succeeding generations. Preferences are given to the fittest off-spring.

(2) Crossover operator: This gives the idea of mating between individuals based on crossover sites and selection operator which are chosen randomly. Thus to create a completely new offspring, the genes at crossover sites are need to exchanged. For example:

These operations determine an efficient solution of exploration of all-around search space and focus to cover to the global space (Fig. 2). A fitness function is used to measure the quality of solution. The system flow chart is shown in Fig. 3.

Fig. 2
figure 2

Mutation process

Fig. 3
figure 3

Proposed system flowchart

3.2 Fitness of heredity

The fitness of heredity is introduced to reduce consumption of energy along with this, the network existence is also expanded. In this section, some of the fitness related parameters are described.

  1. (1)

    Direct distance (DD) to base station (BS): The term DD to BS is defined as the aggregation of the overall area or gap from sensing nodes to the BS (Eq. 1). This gap or distance is defined as follows (Eq. 1):

    $$DD = \sum\limits_{i = 1}^{m} {d_{is} }$$
    (1)

    whereas d = distance, i = ith node and s = base station sth node. dis is the distance among two nodes, node i and node s respectively. To make nodes as energy efficient in larger networks, the distance should be minimized to avoid wastage of energy of nodes.

  2. (2)

    Cluster distance (C): The total area covered by nodes to the cluster head and the area covered from the head or top to BS node is defined as the term cluster distance (Eq. 2). The C is defined as following with member of K collection of nodes (Eq. 2).

    $$C = \sum\limits_{i = 1}^{k} {d_{ih} } + d_{hs}$$
    (2)

    d = distance, i = node i and h = head of cluster. C is defined as the distance and gap covered from i to the h, Hence dhs defined as the distance between these two nodes.

  3. (3)

    Cluster distance—standard deviation (SD): The cluster distances deviations should be small for consistently placed and structural distribution of sensor nodes. But for node allocations at random and in non-uniformly areas, distances must not be same. The computation of cluster gaps, SD (Eqs. 3 and 4), along with µ deviation done as follows:

    $$\mu = \frac{{\sum\nolimits_{i = 1}^{h} {d_{cluster} } }}{h}$$
    (3)
    $$SD = \sqrt {\sum\limits_{i = 1}^{h} {(\mu - d_{clusteri}^{{}} } } )^{2}$$
    (4)
  4. (4)

    Transfer energy (E): Transfer energy E; define as the consumed energy to pass the entire message from the cluster head node to the BS node. With amount of K member cluster nodes, transfer energy is described as follow (Eq. 5)

    $$E = \sum\limits_{j = 1}^{k} {E_{Tjh} } + k + E_{R} + E_{ths}^{{}}$$
    (5)

    The first term of Eq. 5 depicts the absorbed energy to transfer messages from K nodes to head. The term second shows the energy carried by the head node of cluster to receive number of K messages from the cluster representative nodes. Finally, the third one term presents the transmission energy absorbed through BS node to the cluster head point.

  5. (5)

    Number of transmissions (T): For each stage for transferring data, BS assigns the number of transmissions T and the value of transmissions should be adapted in accordance to the presented energy levels and network conditions. In this way the values of T is not determined and the GA outcome will be used for longest time duration.

  6. (6)

    Fitness function: All the introductory fitness parameters and aspects of genes fitness function F is defined below as (Eq. 6):

    $$F = \sum\limits_{i} {w_{i} } *f_{i,\forall } f_{i} \varepsilon (C,DD,E,SD,T)$$
    (6)

    The primary fitness aspects can be ascribed the erratic impact, wi. The best fit chromosome is assessed after every generation.

4 Results and discussion

In our simulation system, 100 nodes of a network are systematically dispersed in a region of 100 × 100 m2. Simulations are carried out in MATLAB. Let t0 denotes the transmission time to begin. The transmission said to be successful as long as there is no other transmission begins during (t0 − 1, t0 + 1). Setting s = 2 (since the interval length is 2) and k = 0 in our Poisson formula1 we have P0 = \(e^{ - 2G}\) (Eq. 7):-

$$S = Ge^{ - 2G}$$
(7)

Setting \(ds/dG = 0\), we say S is maximum when G = 0.5, and on that time period S = 1/2e.

It is evident from the Fig. 3 that the best-case utilization of DCRN –GA(Curve in green)is best as compared to Previous methods i.e. LEACH And DCRN.

Comparison results in terms of a number of packets received to cluster head and a base station are shown in graphs (Figs. 4, 5 and 6). Figure 4 shows that in DCRN-GA protocols’ cluster head receives 3*104 packets from nodes as equating to DCRN packets to cluster head are 2*104. In basic LEACH packets to cluster head decreased to 1*104. It is noticed that DCRN-GA protocol executes much better than DCRN and LEACH protocols. Packets received at the base station are 1400 in case of DCRN-GA and 1000 packets are received at a base station in case of DCRN while only 800 packets are received in case of leach protocol as shown in Fig. 5. Therefore, it is observed that Dynamic clustering routing using Genetic algorithm is best for Network planning and design in Wireless Sensor Networks for IoT applications.

Fig. 4
figure 4

Slot utilization comparison

Fig. 5
figure 5

Comparison of packets transmission to cluster head

Fig. 6
figure 6

Comparison of packets transmission to base station

Figure 7 shows the standard deviation (SD) in terms of slot utilization, transmission of data packets to the BS and transmission of data packets to the cluster head. SD of DCRN is higher in slot utilization and packets transmission to the BS which is not suitable for IoT applications. Sensor nodes should be equally capable of utilizing the data transmission channels. However, comparison shows that newly proposed algorithm works efficiently and its SD is less as compare to both traditional approaches except in data transmission to the CH. Data transmitted to the CHs is sent to the BS only, therefore SD should not be high in later case. In IoT applications data is transmitted through the huge amount of heterogenous devices where each device should be able to use the channel in efficient manner. High SD affects the channel utilization in adverse manner while transmitting data to the BS. This case makes the proposed scheme more suitable to the IoT applications.

Fig. 7
figure 7

Comparison of standard deviation on the basis of slot utilization, packets to CH and packets to BS

5 Conclusion

In this work, to optimize the performance metric of WSNs, a generic Dynamic clustering routing approach based on GA is proposed which aid the escalation of both theoretical analyses as well as the models based on simulations for IoT applications. On the basis of Fitness function performance metrics, high availability and efficiency have been improved in the framework and the results received are compared via inexhaustive simulations. It is observed that DCRN-GA is a far better approach as compared to previously used approaches and will be a new revolution in IoT applications in the term of network planning. In the further work, to make each metric strictly at the same scale is still a challenge on the basis of optimization of weighted sum. Besides, the whole assessment process of framework could enhance with the expansion of System C-based simulations where a huge size of population and generations are employed.