1 Introduction

Wireless Sensor Network (WSN) comprises huge number of sensor nodes to perform particular task [1, 2]. Typically, these nodes are resource constrained since the battery energy will sustain for only small period of time. Thus, energy efficiency is the foremost issue in WSN. Likewise, Internet of Things (IoT) is an emerging paradigm that introduces even more smart applications [3]. In particular, IoT is integrated with WSN which can be applicable in smart city, healthcare, transportation, and so on. However, this integration also brings some challenges as scalability, interoperability, energy efficiency and security. In WSN, energy efficiency is improved by optimal clustering, routing and data aggregation along with the mobile sink node [4]. In that, cluster formation is adapted to improve energy efficiency in many research works [5, 6]. In cluster-based network, the sensor nodes are segregated into small clusters upon some criteria. Formation of clusters supports energy efficiency and Quality of Service (QoS) through data aggregation. In addition, the network energy efficiency is improved by constructing the network in an optimal structure. For example, the network is considered as hexagonal network [7,8,9] to improve the energy efficiency. The hexagonal-based WSN improves the performance of the network in scalability, reliability and energy efficiency. Specifically, it improves the data aggregation process by enabling hop-by-hop data aggregation.

Further, optimal routing is also performed in WSN-IoT for the objective of energy efficiency and QoS improvement [10, 11]. In the absence of efficient routing scheme, the data loss and the energy consumption will be high. The reason behind this degradation is increase in transmission distance. Thus, optimal routing is necessary for energy efficient WSN-IoT networks. Optimal routing also improves the efficiency of IoT applications like wildlife monitoring, smart city, and so on [12]. For satisfying QoS constraints, computational intelligence techniques like optimization techniques, fuzzy logic, reinforcement learning and machine learning (ML) techniques have been used [13]. In route selection multiple metrics are considered by authors. Some of them are residual energy level, hop count, distance, trust value, expected delay and link quality. However, computing these metrics for each route is the major challenging issue in routing. For this reason, some research works consider a single metric and objective. For example, optimal route is selected based on the energy consumption metric [53]. But these works are not able to achieve both QoS and energy efficiency. Security is one of the QoS services that is the major part of any network. However, many research works have been conducted in WSN and IoT in the perspective of security. As stated earlier, WSN-IoT nodes are resource constrained which means lightweight security scheme is essential [14]. A lightweight cryptography scheme mitigates the issue of complex encryption processes which further results in energy efficiency [15, 16]. Especially, the conventional cryptography schemes are designed with the aim to work with desktops and laptops (i.e.) devices with higher energy level. In contrast, the lightweight ciphers are designed to handle the resource constrained devices like sensors, RFID and so on. Thus, the lightweight security protocols become a research trend in recent years [17]. Besides, ML techniques are utilized to improve the security level of IoT networks [18]. These ML techniques are utilized for authentication, access control, cryptography and intrusion detection. The main feature of WSN-IoT network is that it involves both IoT devices like sensors, RFID and also IoT users who access the IoT device data [19]. Thus, it is essential to authenticate the IoT users in order to avoid the unauthorized user access. For authentication, multiple factors such as identity, physical context, tokens and past history are utilized [20]. An efficient authentication procedure will defend many attacks in the WSN-IoT networks [21]. Thus many research works are held on WSN-IoT networks to improve energy efficiency, QoS and security. However, each work focuses on individual objective. In that too, many research problems are not focused. Thus it is necessary to design a new WSN-IoT network design to achieve better performance. With this in mind, this paper formulates the objectives as follows,

  • To improve QoS in WSN-IoT environment along with energy efficiency

  • To provide data security by using strong and lightweight cryptography technique

  • To prevent unauthorized user access via strong authentication

Although, energy efficiency and security are also QoS constraints, we have separate objectives since both are major challenges in WSN-IoT.

1.1 Motivations

In recent years, WSN-assisted IoT has great attention in many application areas such as medical field, transportation fields, public safety, monitoring application and smart environments [22, 23, 52]. In general, the WSN-IoT network generates huge volume of data which has to be processed and accessed by the remote users [24, 25]. Due to this large volume of data generation and resource constraint ability make achieving QoS in WSN-IoT. Typically, WSNs are divided into multiple clusters to support energy efficiency [50, 51].Further, security is also major aspect of WSN-IoT [26]. Mostly, the WSN-IoT networks are deployed in an open environment and the data is accessed by the remote users. Thus, there is high possibility for data leakage and theft. In most of the IoT applications, the data must be sure and do not disclosed to unauthorized users since the data is sensitive. In this case security is unavoidable. Majorly, WSN-IoT has following research problems [27, 28],

In QoS—Due to the wireless nature the data transmission is challenging in WSN-IoT. In addition, the data generation rate and dynamic network topology are also affecting the QoS. Till now, QoS is guaranteed through optimal routing and clustering. However, tradeoff between QoS and energy efficiency is not yet achieved by previous works. Thus, achieving better QoS is still major challenging issue in WSN-IoT. In particular, the QoS affecting factors are listed as follows,

  • Non-optimal route selection

  • High energy consumption

  • Poor algorithm design

  • Lack of network management

In Energy Efficiency—As we know, WSN-IoT is typically large-scale network involves with huge number of resource constrained sensor nodes. Energy efficiency is achieved by minimizing energy consumption through cluster formation and data aggregation. Furthermore, redundant data is also major problem in WSN-IoT. Transmission of redundant data and retransmissions of data will result in huge energy consumption [54]. In cluster formation, CH selection also plays pivotal role. Thus, the factors affecting energy efficiency are,

  • Network formation and topology creation

  • Improper and frequent CH selection

  • Redundant data transmission

  • Inefficient data aggregation

In Security—In many research works, the conventional cryptography techniques are utilized for data security and user authentication [55]. However, these existing solutions are not suitable for resource constrained WSN-IoT environment. Besides, these works are unable to ensure high level security level. However, in WSN-IoT it is essential to achieve high-level security without increase in energy consumption. The major security factors are,

  • Complexity results is high energy consumption

  • Ineffectual algorithm design

  • Lack of security in route selection

  • Unauthorized user access

These problems are the major motivations of this research. Although all three issues are individual but has a logical relation. Since achieving high level security and QoS will demand high level energy consumption and vice versa. Thus, we are motivated to address this research problem of achieving better security and QoS without loss in energy efficiency in this work.

1.2 Major Contributions

The major contribution of this work lies on the objective design of QoS, Security and Energy Efficiency provision in WSN-IoT. For this objective, this paper has the following contributions,

  • Novel SecDL approach is presented with mobile sink enabled Bi-Concentric Hexagonal (BiC-Hex) network structure. Further, the BiC-Hex structure is partitioned into different regions as per angular function.

  • Data aggregation is handled by cluster formation in each region of BiC-Hex. Energy efficiency and QoS is achieved by optimal CH selection using Quality Prediction Phenomenon (QP2) through cumulative parameters. Two-way Data Elimination then Reduction (TDETR) is presented for redundant data elimination which results in energy efficiency.

  • Security is ensured for the aggregated data through dynamic one time key. For that, a One Time-PRESENT (OT-PRESENT) which is dynamic and lightweight cryptography technique is proposed.

  • Secure data is transmitted through a trusted as well as quality-aware route. Here deep learning-based routing algorithm namely Crossover based Fitted Deep Neural Network (Co-FitDNN) is designed. The design Co-FitDNN converge QoS, energy efficiency and security parameters in routing.

  • Finally, IoT users are authenticated by strong authentication scheme designed based on data mining concept. For IoT-user authentication a new Apriori based Robust Multi-factor Validation (ARMV) algorithm is proposed.

1.3 Paper Layout

The rest of this paper is organized as follows: Sect. 2 surveys previous research works held on WSN-IoT network. In Sect. 3, the major research problems are discussed. Section 4 explains the proposed SecDL approach with novel algorithms. In Sect. 5, the proposed SecDL approach is evaluated experimentally and the results are compared with prior works. Finally, Sect. 6 concludes the contributions of this paper. In Table 1, the notations used in this paper are listed out.

Table 1 List of notations

2 Related Works

This section surveys the previous research works held on QoS improvement, energy efficiency and security in WSN-IoT. From this critical survey, the existing research gap is identified.

2.1 QoS Improvement in WSN-IoT

Kumar et al. [29] have presented an artificial neural network and fuzzy inference system (ANFIS) for optimal route selection. Along with the ANFIS model, the fuzzy-based CH selection also presented. The major objective of this work is to improve the QoS performance of IoT-oriented WSN networks. For that, multiple parameters such as link bandwidth, centrality, latency, channel state information, SNR, and packet loss ratio are fused by ANFIS model to select optimal route. Here, the ANFIS model is trained by Particle Swarm Optimization (PSO) algorithm. Typically, PSO has convergence issues and falls in local optimal solutions. Thus, PSO-trained ANFIS algorithm degrades the efficiency of route selection. Elappila et al. [30] have proposed a survivable path-based routing in WSN for IoT applications. Authors focus on the performance improvement through optimal route selection. Optimal route is selected based on multiple criteria such as signal-to-noise ratio (SNR), survivability factor, and congestion level. The survivability factor is derived as the ratio of minimum value of available residual energy among every node along that path to the total consumed energy for communication through that path. However, network management is not considered in this work. To improve the network performance it is also necessary to handle the large scale network since the node located far away from the sink will have large energy consumption and loss rate.

Amjad et al. [31] have designed a QoS-ware and heterogeneously clustered routing (QHCR) protocol. The QHCR protocol assures energy efficiency and provides dedicated paths for even delay-sensitive applications. The heterogeneity is introduced by using sensing nodes and fluctuating nodes conjointly in the network. Cost metric and path metric are designed for optimal CH and route selection respectively. The path metric is the cumulative score of initial energy, expected transmission count, and minimum loss. But, consideration of initial energy is not efficient for current route selection since the energy level of a node varies over time period. Zhang et al. [32] have introduced an energy and QoS aware routing protocol for WSN in industrial applications. AT first, the data is provided with priority level through sensing data classification. Then, optimal route is selected based on reliability parameters and timeliness parameters. For path reliability measurement, a link quality measure algorithm (LQMA) is proposed. The LQMA algorithm relies on the energy model and trigonometric function. Further, received signal strength indicator (RSSI) and link quality are used for reliability parameter. The considered parameters are limited and not suitable for selecting an optimal route in the network. Further, security is major aspect of industrial network and not considered in this work. Deepa et al. [33] have proposed an optimized QoS-based clustering with multipath routing (OQoS-CMRP) protocol. In this work, modified PSO algorithm is used for cluster formation and SingleSink-AllDestination algorithm is proposed for optimal multi-hop route selection. The routing algorithm allows the nodes to select optimal next hop in each round. However, PSO based clustering is not effective since it has the convergence issues. Thus, QoS provisioning works are suffered with non-optimal route and CH selection. That is, there is huge research space for QoS improvement in WSN IoT networks.

2.2 Energy Efficiency in WSN-IoT

Preeth et al. [34] have presented adaptive fuzzy multi-criteria decision making (AF-MCDM) approach in WSN-assisted IOT system. The AF-MCDM approach is made up of fuzzy analytical hierarchy process (AHP) and fuzzy technique for order performance by similarity to ideal solution (TOPSIS) methods. Energy efficiency is improved by opting optimal CH using AF-MCDM approach. Execution of fuzzy AHP and fuzzy TOPSIS for CH selection increases time and energy consumption. Ullah et al. [35] have used a hybrid hierarchical clustering approach (HCCA) in WSN-IoT. The HCCA organizes the sensor nodes in distributed three-layer architecture. The upper-layer heads are selected by sink node and are known as grid heads. Then the grid heads select the lower-layer heads which are known as CHs. Network management is performed in a hierarchical manner. Here all nodes are homogenous which means the energy level of all nodes is same initially. Thus selection of a normal node as grid head increases energy consumption for those particular nodes. Rani et al. [36] have introduced a dynamic clustering approach for WSN IoT applications. The major aim of this work is to improve the energy efficiency of the WSN network for IoT applications. For that, this work uses dynamic CH selection process. Dynamic CH is selected by using genetic algorithm (GA). In GA, fitness is evaluated based on distance with sink node, cluster distance and standard deviation. GA is a typical algorithm that takes large time to find an optimal solution. Thus, using GA for dynamic CH selection is not efficient. Xu et al. [37] have designed an energy efficient region source routing protocol (ER-SR) for WSN-IoT networks. The ER-SR protocol uses a distributed energy region algorithm to select source nodes dynamically. Then the source routing nodes selects optimal path for data transmission. As the sink node is considered to be static, there is high energy consumption for nodes which are located nearer to the sink node. Srinidhi et al. [38] have designed a hybrid energy efficient and QoS aware (HEEQA) algorithm. The HEEQA is the combination of quantum PSO (QPSO) and non-dominated sorting genetic algorithm (NGSA). Authors have aimed to balance the energy among devices along with better QoS. This paper uses NGSA to overcome the convergence problem of QPSO algorithm. However, execution of QPSO and NGSA increases time consumption as NGSA typically consumes more time to converge. Thus energy efficient schemes lack with poor algorithm design which further degrades the energy efficiency.

2.3 Security in WSN-IoT

Li et al. [39] have presented a three-factor authentication scheme for WSN in IoT environments. In three-factor authentication, fuzzy approach is utilized for bio-metric extraction. In general, the considered three factors are biometric, smart card and password. An IoT user is considered to be authorized user when three-factors are satisfied. However, smart card based authentication is not reliable since it has high possibility to be lost. Sathyadevan et al. [40] have presented a protean authentication scheme for IoT environment. Authors have aim to achieve strong and extreme lightweight authentication for IoT end devices. This protean authentication scheme intends to change the security key in regular time interval. In each time, the changed keys are exchanged securely. However, the dynamic key generation process generates fresh keys at any time. This will consume more energy and also time consumption. Ali et al. [41] have attempted to enable trust-based scheme for IoT-assisted WSN. Here data aggregation is performed by external mobile elements (ME). For optimal ME selection, the trust based scheme has been proposed. The trust value for all MEs has been managed by base station and the sensors transmit the data to ME with high trust value. The trust value is updated based on the interaction history with the base station. In this work, trust computation needs the involvement of base station at all time. This means to increased complexity in the network.

Mughal et al. [42] have proposed a logical-tree based secure mobility management (LT-SMM) scheme using mobile service computing in WSN assisted IoT. LT-SMM scheme includes group deployment phase in which mobile node joining and migration protocol is incorporated. Initially, all devices are formed as secure groups. For security purpose, chaotic map based one-way hash function is utilized. Typically, the tree-based keying method increases time consumption and complexity in the network. Tabassum et al. [43] have considered void problem in the WSN-IoT network. In order to mitigate this void problem in routing, GAR and RUT schemes are implemented in which the next-hop neighbor is searched by a greedy search algorithm. The data is secured by using a random number for encryption. This work has limitations as follows: (1) Route selection by greedy algorithm is not efficient and leads to void problem (optimal next-hop selection will avoid this issue), (2) Appending key (random number) with the transmitted data increases the vulnerability of data and (3) Encryption strength is not ensured and fully depends upon the random number generated. Thus, this work is not suitable for IoT environment.

Literature Synthesis—Overall, QoS provisioning schemes, energy efficiency schemes and security schemes are unable to achieve better performance in WS-IoT. The major limitations addressed in these schemes are listed in Table 2. Thus there is achieving QoS, energy efficiency and security is still challenging due to many factors.

Table 2 Analysis on related works

3 Problem Definition

This section summarizes the overall research problems considered in this work. This work considers a WSN-IoT network with \(n\) number of sensor nodes including static and dynamic nodes, \(m\) number of IoT users, mobile sink node and gateway. This work majorly concentrates on three problems as QoS provisioning, energy efficiency and security. For that, specific problems are defined from prior works.

A secure and energy efficient routing model is uses RSA for encryption and type-2 fuzzy for route selection [44]. In general, RSA algorithm requires large time and key size to attain high-level security. Thus, it is not suitable for resource constrained environment. Further, route selection by type-2 fuzzy and then reliability verification increases time consumption. One time pad (OTP)-based cryptography scheme is designed with random number generator [45]. However, generation of OTPs increases the complexity as the security level fully depends upon the randomness. A neuro-fuzzy scheme uses convolutional neural network (CNN) for energy efficient clustering and routing [46]. Here CH is selected based on energy level and distance which is not significant. But cluster formation decision considers multiple metrics which may results in imbalanced clusters (some CHs may have relatively small members compared to others). Cluster formation consumes large energy and time since CNN has to be executed in every sensor node for decision making. To achieve energy efficiency and QoS, energy and interoperable aware routing [47] and residual energy-based CH selection [48] approaches are proposed. The routing algorithm increases bandwidth and energy consumption for initial path set-up. Further, the CH selection by considering single metric is not effective for WSN-IoT. In addition, cluster formation by conventional low-energy adaptive clustering hierarchy (LEACH) protocol doesn’t support better scalability.

Problem Statement—Overall, QoS and Security provisioning with energy efficiency lacks due to higher time complexity, energy consumption and poor algorithm design. Still, achieving all three objectives is challenging. Thus, it is necessary to design a novel WSN-IoT structure for this objective. This statement arises following research questions,

  • How to design a WSN-IoT network such that it improves energy efficiency?

  • What are the major criteria for CH and route selection?

  • How to ensure high-level security without loss in energy efficiency?

All these research questions are addressed in this work. And novel algorithms and methodologies are derived to solve these research questions.

4 Proposed SecDL for WSN-IoT

This section explains the overall proposed SecDL approach for WSN-assisted IoT environment. Each proposed algorithm and methodology is explained in detail.

4.1 Network Model

In this work, we consider a network model with \(n\) number of sensor nodes denoted as \(N_{1} ,N_{2} , \ldots ,N_{n}\) and \(m\) number of IoT users denoted as \(U_{1} ,U_{2} , \ldots ,U_{m}\), a mobile sink (\(MS\)) and a gateway (\(GW\)). Further, the network is constructed as BiC-Hex structure with a mobile sink node. The BiC-Hex is constructed by arranging two hexagons in a concentric manner. Let the BiC-Hex consists of two hexagons such interior (\(Hex_{I}\)) and exterior (\(Hex_{E}\)). The network is constructed with two hexagons in order to improve energy efficiency. Consideration of two hexagons allows network division which enable effectual cluster formation. Then, the height and base of \(Hex_{I}\) (\(H_{I} ,B_{I}\)) are always lower than height and base of \(Hex_{E}\) (\(H_{E} ,B_{E}\)) i.e. \(H_{I} ,B_{I} < H_{E} ,B_{E}\). The area of \(Hex_{I}\) is computed as,

$$A\left( {Hex_{I} } \right) = \frac{1}{2}H_{I} B_{I}$$
(1)

Similarly, the area of \(Hex_{E}\) is computed as,

$$A\left( {Hex_{E} } \right) = \left( {\frac{1}{2}H_{E} B_{E} } \right) - A\left( {Hex_{I} } \right)$$
(2)

Then, the BiC-Hex is split into six equal sectors to improve the energy efficiency by forming clusters within the sectors. In addition, splitting the network into sectors also allows the allocation of visiting points for MS. For that, the BiC-Hex is divided by 120° based on the origin point (\(O\)). This intersection is considered as the visiting point (\(VP\)) for the \(MS\). A data collection round starts from \(VP_{1}\) and ends with \(VP_{6}\). In this way, \(MS\) visits each \(VP\) and collects the sensing data. The considered network model is shown in Fig. 1.

Fig. 1
figure 1

The proposed WSN-IoT model

The proposed network model has following assumptions,

  • The network involves with \(n_{1}\) number of static (\(SN)\) and \(n_{2}\) number of mobile (\(MN\)) sensor nodes such that \(n_{1} + n_{2} = n\).

  • Always, \(n_{1} > n_{2}\).

  • Initially, all nodes have the same energy level and deployed random manner over the network. Each sensor uses GPS positioning technology to find the current location of its own and the neighboring nodes.

  • The network is constructed with a mobile sink node to collect the data from all sensor nodes. From here, the sink node and the mobile sink node represent the same in this paper. The current position of sink node is known to all other nodes in the network.

With the above assumptions, the network is constructed and the proposed algorithms are applied.

4.2 Energy Model

In this work, all nodes perform sensing, transmission and reception. The energy is consumed for all three operations. Besides, processor energy (\(E_{pro}\)) function is also consumed by the processor.

The overall energy consumption for a node is computed as follows,

$$E_{Con} = E_{TX} + E_{RX} + E_{Idle} + E_{CCA}$$
(3)

where \(E_{Con}\) is computed in terms of energy consumed for transmission (\(E_{TX}\)), reception (\(E_{RX}\)), idle listening (\(E_{Idle}\)) and channel assessment (\(E_{CCA}\)). Further, \(E_{TX}\) and \(E_{RX}\) for transmitting and receiving \(\rho\) bits is computed as follows,

$$E_{TX} = E_{Proc} *\rho + \varepsilon_{FS} *\rho *d^{2} , d \le d_{0}$$
(4)
$$E_{TX} = E_{Proc} *\rho + \varepsilon_{MF} *\rho *d^{4} , d \ge d_{0}$$
(5)

The \(E_{TX}\) is computed based on free space model parameter (\(\varepsilon_{FS}\)) and fading model parameter (\(\varepsilon_{MF}\)). The threshold distance \(d_{0}\) is computed as follows,

$$E_{RX} = E_{Pro} *\rho$$
(6)

In the proposed network, each sensor node follows the above energy model.

4.3 Overall Architecture of SeC-DL

The overall architecture of SecDL approach is shown in Fig. 2. The BiC-Hex is split into six sectors such a way it supports effective data aggregation. Then, clusters are formed within each sector. Dynamic clusters are formed with optimal CHs. Then data is aggregated without any redundant data. For data collection, DL-based routing scheme is deployed. Data security and user security is ensured by lightweight cryptography and authentication schemes. Each process is explained in the following subsections.

Fig. 2
figure 2

Overall SecDL-based WSN-IoT Architecture

4.4 Dynamic Cluster Formation

When the network is constructed, then the nodes in each sector are clustered in order to support data aggregation. Cluster formation improves both energy efficiency as well as QoS. In this work, the network model is considered with static and mobile sensor nodes. Energy consumption of mobile sensor node is greater than static nodes. Thus, static sensor nodes are considered as CH candidates. The CH selection process is initiated by using QP2. In each sector, the number of static nodes is fixed and the mobile nodes vary over the time period. At first, the CHs are selected in each sector. For that, QP2 computes quality value (\(\delta\)). A quality of a node to become CH is computed in terms of cumulative parameters such as remaining energy level (\(\alpha\)), distance with VP (\(\beta\)), node degree (\(\gamma\)) and centrality factor (\(\omega\)). Each parameter is defined as follows,

Definition 1

(residual energy level) It denotes the current energy level of the node. It is computed as the difference between initial energy level and total consumed energy over a period. A node with higher \(\alpha\) is has high possibility to become CH since the CH is responsible for data collection and aggregation.

Definition 2

(distance) It represents the distance between a node and the nearby VP. As sink node aggregates the data at VP, it is necessary to select node nearby to the VP. The distance between node \(N_{i}\) and \(VP_{j}\) is computed by using Euclidean distance measure as follows,

$$\beta = \sqrt {\left( {x_{i} - x_{j} } \right)^{2} + \left( {y_{i} - y_{j} } \right)^{2} }$$
(7)

Definition 3

(node degree) It is the measure of number of neighboring nodes connected with the candidate node. It can be determined through Received Signal Strength Index (RSSI) values recived from the neighboring nodes. Higher value of \(\gamma\) increases the possibility to become CH.

Definition 4

(Centrality factor) It defines the closeness of the candidate node with its neighbors. That is, it computes the average distance between the candidate node and its neighboring nodes. It can be computed as follows,

$$\omega_{i} = \frac{\gamma - 1}{{\mathop \sum \nolimits_{i \ne j} d\left( {i,j} \right)}}$$
(8)

By using all four important parameters, optimal CH is selected. The quality value is determined as follows,

$$\delta = \frac{a.\alpha + c.\gamma + d.\omega }{b.\beta }$$
(9)

where \(a,b,c,d\) are the weight values and selected in way that \(a + b + c + d = 1\). In this work, initial CH selection is performed by sink node and CH rotation is performed in a self-organized manner. After identification CHs, cluster formation is initiated.

Dynamic Clustering—Each CH sends Join_Req to its neighboring nodes. By receiving the request message, each non-CH node computes the distance with the CH. Then, the node sends Join_Rep to the CH which has minimum distance. When the CH is closer to the node, then the energy efficiency and QoS will be improved. Thus we perform clusters based on distance measure. As per our work, both static and mobile nodes are involved in the network. Thus, it is necessary to perform re-clustering in the case of node movement. In this work, clustering and re-clustering process is performed in self-organized manner (i.e.) without involvement of sink node. Thus, it minimizes the overhead introduced by sink node communication. Dynamic clustering and re-clustering is performed in following three cases,

Case 1—When a mobile node is moved from one cluster, then the current CH removes that node from member list. Similarly, the moved mobile node sends Rejoin_Req to the nearby another CH. Upon receiving the request, the nearby CH joins that node as member and updates its member list.

Case 2—When a cluster has lower number of nodes due to movement of mobile nodes, then the CH of that cluster initiates the cluster merging process. For that, a lower bound (\(LB\)) value is set for number of nodes in the cluster. The \(LB\) value is computed as follows,

$$LB = \frac{2n - n}{{k_{max} }}$$
(10)

The lower bound is set based on the number of nodes in the network and the maximum number of clusters \(k_{max}\). When cluster merging decision is made, then CH sends a Merge_Req to nearby CHs. Then the CHs respond the Merge_Res to the CH with the information of number of members. Then the CH sends confirmation message Confirm_Res to the CH which has minimum number of nodes. Then, both clusters are merged and the CH with high quality value is selected as CH.

Case 3—Similar to case-2, when the number of nodes in a cluster exceeds the upper bound (\(UB\)), then the CH initiates cluster splitting process. The \(UB\) value is computed as follows,

$$UB = \frac{n}{{k_{max} }}$$
(11)

The \(UB\) is computed based on \(n\) and \(k_{max}\) value. When a cluster has more that \(UB\) members, then it starts cluster splitting process. For that, it sends splitting message Split_Msg to the member which has higher quality value. Then the member become a CH and performs cluster formation.

Thus, proposed cluster formation is performed in a self-organized manner without frequent involvement of sink node. When current CH drains out of energy, then it selects another node as next CH and rotates its role the next CH. Proposed dynamic cluster formation not only supports energy efficiency but also improves QoS.

4.5 Data Aggregation

In each cluster, CH performs data aggregation process to minimize the size of data to be transmitted to sink node. In several WSN-IoT applications, the nodes intend to report periodic report which leads to the presence of redundant data. On the other hand, network coding process has great attention in minimizing the transmission data size. Thus, we present TDETR-based data aggregation. The process of TDETR is twofold as: (1) it eliminates the redundant data from the aggregated data (2) then it reduces the data size through network coding. After aggregation of data, CH checks the similarity between a data against all other data. For example, consider a data series as \(P_{1} ,P_{2} ,P_{3} ,..,P_{l}\) where \(l\) denotes the number of members in the cluster. In first level, the similarity distance (\(Sim\_ Dis\)) is computed between each packet. It is formulated as follows,

$$Sim\_Dis = \left| {x\left( {P_{i} } \right) - x\left( {P_{j} } \right)} \right| + \left| {y\left( {P_{i} } \right) - y\left( {P_{j} } \right)} \right|$$
(12)

Here \(x,y\) represents the coordinates of data packets \(P_{i}\) and \(P_{j}\). If \(Sim\_ Dis = 0\), then the both packets are more similar and one packet is dropped. In this manner, CH finds \(Sim\_ Dis\) between all data packets and eliminates all redundant data from the aggregated data.

In second level, the aggregated data is compressed into single packet in order to minimize the number of transmission between CH and MS. For data compression, TDETR uses random linear coding (RLC) approach. In RLC, a random coefficient is utilized to compress the aggregated data. Let \({\mathbb{l}}\) be the number of data packets after redundant data elimination. The CH compresses \({\mathbb{l}}\) packets into single packet as follows,

$$ComPac = \mathop \sum \limits_{j = 1}^{{\mathbb{l}}} \varXi_{j} P_{j}$$
(13)

Here \(\varXi_{j}\) represents the random coefficient. At this stage, CH compresses \({\mathbb{l}}\) number of packets into single \(ComPac\). That is, CH minimizes the number of transmissions with MS. Thus the proposed work minimizes energy consumption by minimizing the number of transmission between CH and MS.

4.6 Data Security Provision

After aggregation of data packets, the CH performs encryption top secure the aggregated data \(A\left( P \right)\). For data security, we proposed a new OT-PRESENT which is the lightweight encryption protocol. The PRESENT algorithm is ultra-lightweight and works better than the conventional AES, RSA cryptosystem [58]. As it achieves better security level without increase in overhead, it can be used in WSN network. Initially, all mobile and static nodes are provided with a secret key \(\varkappa\) which is generated by the sink node initially. Initial key is generated as the sequence of pseudo-random bits. In proposed work, 80-bits of pseudo-random bits are generated for each node by sink node. Although PRESENT is ultra-lightweight procedure, it is symmetric cryptography primitive. That is, it uses same key for encryption and decryption. Thus, we propose a novel OT-PRESENT algorithm which generates OT-Cluster Key (\(OT - \varPsi\)) at each round. The cluster key is the new concept in PRESENT algorithm that uses the secret keys of cluster members for key generation. As per the proposed SecDL, the clusters are formed dynamically which means the cluster members are varied over time period. With this in mind, we utilize this self-organized property for dynamic key generation.

Let us consider a cluster with \(l\) members as \(N_{1} ,N_{2} ,N_{3} , \ldots ,N_{l}\). Each node has initial secret key as \(\varkappa_{1} ,\varkappa_{2} ,\varkappa_{3} , \ldots ,\varkappa_{l}\) correspondingly. In the proposed work, the CH is responsible to generate \(OT - \varPsi\) in each round. For that, it applies simple XOR operations on the secret keys of its member nodes. The \(OT - \varPsi\) is generated at time \(t_{1}\) as follows,

$$OT - \varPsi = \varkappa_{1} \oplus \varkappa_{2} \oplus \varkappa_{3} \oplus \cdots \oplus \varkappa_{l}$$
(14)

Likewise, when the cluster is organized dynamically, the member list will be modified. Thus, in next round the CH generates the \(OT - \varPsi\) with the new member keys. In this way, the cluster key is changed at each time. After the generation of \(OT - \varPsi\) performs encryption as in PRESENT algorithm. In PRESENT algorithm, 31 rounds are performed to produces the ciphertext. In each round, the RoundKey is XOR-ed with the data block that is resulted from previous round. At first round, the plaintext of \(A\left( P \right)\) is XOR-ed with \(OT - \varPsi\). Then, the \(OT - \varPsi\) is shifted in a right circular manner to produce RoundKey. Then, the XOR-ed value from the first block is again XOR-ed with the RoundKey. In this manner, 31-rounds are performed to produce the ciphertext (\(\phi \left[ {A\left( P \right)} \right]\)).

figure c

Pseudocode 1 Description—The algorithm 1 presents pseudocode of proposed OT-PRESENT algorithm. The first four lines explain the process of \(OT - \varPsi\) generation. Then the subsequent lines explain the procedure of encryption and RoundKey generation by OT-PRESENT algorithm. At last, the \(\phi \left[ {A\left( P \right)} \right]\) is generated for the plaintext of \(A\left( P \right)\). In this manner, the aggregated data is encrypted by OT-PRESENT algorithm.

As the proposed OT-PRESENT uses simple XOR operations, it is relatively lightweight. At the same time, generation of \(OT - \varPsi\) in each round increases the security level of OT-PRESENT algorithm.

4.7 Optimal Data Transmission

After completion of encryption, the CH transmits the aggregated ciphertext \(\phi \left[ {A\left( P \right)} \right]\) to the \(MS\). As stated earlier, the \(MS\) follows the moving strategy as,

$$Strategy = \left[ {VP_{1} \to VP_{2} \to VP_{3} \to VP_{4} \to VP_{5} \to VP_{6} \to VP_{1} } \right]$$
(15)

All CHs have the knowledge of current \(VP\) of the MS. Thus, the CH selects trusted optimal route for data transmission. Selection of optimal path results in QoS improvement as well as energy efficiency. Besides, selection of trusted route will improve the security level. Thus, we propose Co-FitDNN algorithm that selects trusted optimal route for data transmission. The proposed Co-FitDNN uses deep learning [56] approach for acquiring most suitable route from the set of available paths based on multiple metrics. Processing route selection in deep structure will results in better performance. We apply crossover operator over the first layer of deep neural network to generate all available paths between CH and sink node. Then, each route is evaluated based on the fitness function in hidden layers. In the output layer, the optimal route is selected for data transmission. The overall structure of proposed Co-FitDNN is shown in Fig. 3.

Fig. 3
figure 3

Structure of proposed Co-FitDNN

The process of proposed Co-FitDNN can be explained as follows,

Input layer—This layer is composed of input neurons. In this layer, the candidate routes \(\varPhi = \left\{ {r_{1} ,r_{2} , \ldots ,r_{u} } \right\}\) are initialized. The candidate routes are direct route between source CH (\(CH_{S}\)) and the MS.

Hidden layers—The Co-FitDNN comprises multiple hidden layers (up to \(L\)) as \(h_{1} ,h_{2} , \ldots ,h_{L}\). In the first layer applies crossover operator on the input routes.

The crossover is a genetic operator that generates new combination of routes from the \(\varPhi\). The process of crossover operator is shown in Fig. 4. From the crossover layer, all available routes are discovered. It can be denoted as \(\varPi \varPhi = \left\{ {r_{1} ,r_{2} , \ldots ,r_{{\mathbb{u}}} } \right\}\) and \({\mathbb{u}} > u\). Then, each route is provided with a weight value in hidden layers. In Co-FitDNN, the weight value is computed in terms of fitness function (\(f\left( r \right)\)).

Fig. 4
figure 4

Function of crossover operator

The \(f\left( r \right)\) is computed by considering the following routing metrics,

1. Trust value (\(\tau\))—Trust value is computed as the forwarding ability of the nodes in a route. For a node \(N_{i}\), the trust value can be computed as follows,

$$\tau_{i} = \mathop \sum \limits_{j = 1}^{n} \frac{{{\mathfrak{B}}_{ij} + 1}}{{{\mathfrak{B}}_{ij} + {\mathfrak{M}}_{ij} + 2}}$$
(16)

Here \({\mathfrak{B}}_{ij}\) represents the normal behavior of node \(N_{i}\) that is observed by node \(N_{j}\). Likewise, \({\mathfrak{M}}_{ij}\) represents the malicious behavior of \(N_{i}\) that is observed by \(N_{j}\). The normal behavior counts the number of packets forwarded by the node successfully and malicious behavior counts the number of packets dropped by the node. In this manner, each node computes the \(\tau\) and share its trust value with others. In general, the malicious nodes involve in packet dropping which can be overwhelmed by our work.

2. Congestion Level (\(\varGamma\))—It defines the number of packets available in the buffer. When congestion level is high, then the data will get delay to reach the destination.

3. Link bandwidth (\(\mu\))—It measures the available bandwidth between the nodes. When bandwidth is lower, then data loss will occur.

4. Delay (\(\zeta\))—The expected delay is computed based on the propagation, processing, and queuing delay introduced in that node.

5. Number of hops (\(\eta\))—It counts the number of hops between \(CH_{S}\) and MS.

Along with the above metrics, \(\alpha\) of the route is also considered. By combining all six parameters, the \(f\left( r \right)\) function is formulated as follows,

$$f\left( r \right) = \left( {\mathop \sum \limits_{x = 1}^{y} \frac{{\tau_{x} + \mu_{x} + \alpha_{x} }}{{\varGamma_{\text{x}} + \zeta_{x} }}} \right) + \left( {\frac{1}{\eta }} \right)$$
(17)

Here \(x\) represents the \(x\)-th node in \(r\) and \(y\) represents the number of nodes in the route \(r\). In typical DNN, the weight function provides the importance of the corresponding input. In Co-FitDNN, the importance of each route is determined in term of \(f\left( r \right)\).

Output layer—This layer selects the optimal route from all available routes generated in hidden layers. The output is computed as follows,

$$\varTheta = \sigma \left( {f\left( r \right)_{L} \sigma \left( {f\left( r \right)_{L - 1} \sigma \left( { \ldots \sigma \left( {f\left( r \right)_{1} } \right)} \right)} \right)} \right)$$
(18)

where \(\sigma\) is the activation function. In this way, the output layer selects a trusted optimal route \(r_{TO}\) for data transmission. Through this \(r_{TO}\), the \(CH_{S}\) transmits the \(\phi \left[ {A\left( P \right)} \right]\) to MS.

Pseudocode 2 Description—Algorithm 2 describes the pseudocode for route selection by Co-FitDNN. At first, the candidate routes are fed into input layer. Then, crossover operation is applied to generate available routes. The number of generated available routes is always higher than candidate routes. The hidden layer learns major metrics for each route in the available route set. Then, these metrics are fused to obtain the fitness value. This fitness value is assigned as the weight value for each route. Finally, the most fitted routed is selected for data transmission. Then optimal route is selected based on the fitness function.

figure d

Through dynamic clustering, data aggregation, and routing the network performance is optimized. The data is collected by MS and stored in the cloud for end users. To enable internet connectivity, gateway is used. The MS transmits the data to gateway to serve the end users.

4.8 IoT User Authentication

Proposed SecDL based WSN-IoT allows the end users to access the sensory data through gateway. Before access, the gateway validates the legitimacy of the users in order to secure the data from unauthorized access. SecDL proposes ARMV algorithm for user authentication. The ARMV algorithm uses the data mining concept for user authentication in a novel manner. The idea of ARMV algorithm is to map the idea set of authentication credentials of the user through frequent itemset analysis. At first, each user register their credentials as user ID (\({\mathbb{U}}_{ID}\)) and password (\(PW\_\)) to the gateway. For all registered users, the secret key (SK) is generated and given that can be used in authentication process. We assumed that the gateway stores all historical information for each user from the time of registration. For instance, for a user \({\mathbb{U}}_{ID} \left( i \right)\) the past history include \(A_{1} ,A_{2} ,A_{3} , \ldots ,A_{A}\). Here \(A\) denotes the attribute and a history includes \(A\) number of attributes for each user. In ARMV algorithm following attributes are considered: Location (\(Loc\_\)), Timestamp (\(T\_\)), internet information (\(Int\_\)) and channel state information (\(CSI\_\)). In most of the times, the temporal differences in \(CSI\_\) of the mobile users can be used for authentication [49]. The idea behind this consideration is that, \(CSI\_\) measurements for the same user within coherence time period will be moreover same. Likewise, the \(Int\_\) defines the ratio between number of access requests and number of successful requests through the internet. The Apriori algorithm is an important data mining approach that finds the frequent itemset from the several transactions. We use this technique to mine frequent attribute set for each user for authentication.

Let consider a set of attributes for \({\mathbb{U}}_{ID} \left( i \right)\) over a time period \(T = \left\{ {t_{1} ,t_{2} ,t_{3} , \ldots ,t_{10} } \right\}\). For \({\mathbb{U}}_{ID} \left( i \right)\), the ARMV algorithm first mines the frequent attribute set as ideal attribute set (\(Att_{Ideal}\)) as follows,

  1. 1.

    First, it scans the history of \({\mathbb{U}}_{ID} \left( i \right)\) to get support of \(s\) each instance.

  2. 2.

    Then set of candidate attributes are generated and prune the unfrequent instance.

  3. 3.

    Then, this candidate is set is scanned to find the frequent attribute set and store it in the candidate set.

This process is performed for all instances in the candidate set.

Finally, the support and confident values are determined to find the ideal set. Based on the support and confident value, the Apriori algorithm maps the ideal set for each user. This process is performed for all registered users (Table 3).

Table 3 Attribute set of \({\mathbb{U}}_{ID} \left( i \right)\)

For our considered example, the ideal attributes are \(Loc\_\to XXX, Int\_\to 1,CSI\_\to 10db\). Thus the \(Att_{Ideal}\) for \({\mathbb{U}}_{ID} \left( i \right)\) is {\({\text{XXX}},1,10\)}. When, the user sends authentication request, the gateway extracts the current attributes (\(Att_{cur}\)) values from the request. Then, the correlation (\(\Delta C\)) between \(Att_{cur}\) and \(Att_{Ideal}\) is determined as follows,

$$\Delta C = \Delta Loc\_+ \Delta Int\_+ \Delta CSI\_$$
(19)

where,

$$\Delta Loc\_= 1, if\,Loc\_= XXX$$
(20)
$$\Delta Int\_= \left| {1 - Int} \right|$$
(21)
$$\Delta CSI\_= \left| {10 - CSI\_} \right|$$
(22)

Then the authentication is performed based on different levels according to the \(\Delta C\) value. The ARMV authenticates the user as follows,

  • Level 1—if \(\Delta C = 3\), then the user id is verifies to validate the user

  • Level 2—if \(2 < \Delta C < 3\), then the \({\mathbb{U}}_{ID} \left( i \right)\) and the \(PW\_\) is verified to authenticate the user

  • Level 3—if \(1 < \Delta C < 2\), then the \({\mathbb{U}}_{ID} \left( i \right)\), \(PW\_\) and the \(SK\_\) are verified to validate the user

If \(\Delta C < 1\), then the user request is denied. Thus the ARMV algorithm users both user credentials and channel credentials for user authentication. Involvement of ARMV algorithm prevents the unauthorized user access in the network.

Pseudocode 3 description—The pseudocode of proposed ARMV algorithm is presented. Initially, the users are registered and then the ideal attribute set is learned for each user. When the user sends \(Auth_{Req}\), the algorithm extracts the current attribute set. Then, the correlation is determined between ideal and current attribute set. Upon the \(\Delta C\) value the authentication is performed.

Therefore, the proposed SecDL presents a novel approach for achieving better QoS, energy efficiency, and security in WSN-IoT networks. Proposed clustering, data aggregation, encryption, routing and authentication schemes support the objectives in WSN-IoT. The proposed SecDL improves QoS and energy efficiency without loss in security.

figure e

At last, the proposed SecDL is evaluated based on performance metrics. For that QoS and energy efficiency metrics are considered.

5 Experimental Analysis

In this section, the proposed SecDL is analyzed through experimentations. This section introduces the simulation environment and then provides brief comparative analysis.

5.1 Simulation Setup

The proposed SecDL based WSN-IoT network is modeled in network simulator-3.26 (ns-3.26). The ns-3.26 is the event based simulation tool that supports various network simulations [57]. Firstly, the ns-3.26 is installed in the PC that uses Ubuntu 14.04 operating system. Then, the network parameters are set according to our work. The algorithms are written in C++ programming languages then executed with the support of Python language. Before starting the simulation, we set the \(n\) value, initial energy, positions of the nodes in ns-3.26. According to this setup, the overall simulation is performed and the results are observed.

In Table 4, the significant simulation parameters considered to model the SecDL is depicted. Each node is configured upon these parameters. Here we consider 100 sensor nodes with 70% of static nodes and 30% of mobile nodes (i.e.) 7o static nodes and 30 mobile nodes. Thus, \(n_{1} > n_{2}\) condition is satisfied. However, our work supports even large number of nodes. Transmission rage of each node is set to 200 m. Further, the mobility of the sink node is set to 10 m/s (maximum). By considering these parameters, the SecDL is modeled in the simulator and experimentally analyzed to obtain the results.

Table 4 Simulation parameters

The Fig. 5a, b illustrate the simulation topology and environment of proposed SecDL in ns-3.26 and netanim. From this setup, the results are observed and analyzed with existing works. Here the nodes in red color represent the static nodes, blue denotes the mobile nodes, and green represents the IoT users. With the above configuration, we start the implementation.

Fig. 5
figure 5

a Topology of SecDL. b Simulation environment of SecDL

Real-world Use Case of SecDL WSN-IoT—The proposed WSN-IoT network has many real-time applications. Here we demonstrate one apt use case of smart city application. The major aspect of smart city application is that in covers both static as well as mobile nodes for various purposes. As our work supports both types of nodes, SecDL is more suitable for WSN-IoT environment.

In Fig. 6, the proposed SecDL approach is validated for pollution monitoring in smart city applications. In smart cities, pollution monitoring is the prime process. For pollution monitoring, the sensor nodes are deployed on the smart buildings (static sensors). Growing technology in transportation allows us to use vehicles for monitoring applications. Thus, the mobile sensor nodes are deployed on the moving smart vehicles. In this case, all sensor nodes are specified to perform monitoring task. We consider the following sensors for real-time monitoring,

Fig. 6
figure 6

SecDL-based smart city application (pollution monitoring)

  • MQ 135—It is used to monitor the combustible gases. It is highly sensitive to Ammonia, Sulphide and Benzene steam.

  • HR202—It measures the humidity level in the air. It detects the ambient humidity in three levels.

  • Liquid pH Value detection sensor—It measures the pH value in the air. The pH value ranges from 0 to 14.

  • DHT-11—It detects the temperature with \(\pm\) 2° accuracy. Typically, it measures the temperature from 0° to 50°.

All these sensor nodes are deployed in static as well as in vehicles. Then, the sensed data is aggregated from sensor nodes by CHs and the redundant data is eliminated.

The aggregated data is encrypted then stored in remote server. For the connectivity, we use WiFi gateway. In smart city applications, the data is accessed by the citizens and also by authorities. Thus, the data is vulnerable to many security threats. The SecDL allows the users to access the data only after strong authentication. That is the proposed SecDL is more suitable for smart city applications.

5.2 Comparative Study

In order to validate the efficiency of SecDL, this section performs comparative analysis. The proposed work is evaluated under QoS, energy efficiency and security metrics. The observed results are compared with existing CNN [46], QoS routing [47], LEACH-CH [48], OTP [45] and Secure WSN-IoT [44]. All these works are compared in the major aspects in Table 5.

Table 5 Limitations of Prior Works

5.3 Analysis on Network Lifetime

Network lifetime is defined as the amount of time in which the network is fully active. In other words, it is defined as the maximum operational duration of the network to perform specified task. We compare the network lifetime with respect to network size (i.e.) number of nodes and packet size. Figure 7 shows the comparative analysis on the network lifetime with respect to network size and packet size. The analysis shows that the proposed SecDL improves the network lifetime even with large number of nodes and packet size. When the number of nodes increases then the network lifetime is also increased. This is because the in the presence of large number of nodes, there will be high possibility for minimized retransmissions. In addition, optimal CH selection is also improved with large \(n\). Thus, network lifetime is gradually increases in all works. However, the SecDL achieves highest lifetime up to 220 rounds while LEACH-CH achieves lowest lifetime up to 100 rounds. Thus, the nodes in LEACH-CH based network sustain only for 100 rounds which is 50% lower than SecDL. Besides, other works as CNN (112), QoS routing (107), and secure WSN-IoT (135) also have lower lifetime when compared to SecDL.

Fig. 7
figure 7

Analysis on network lifetime a based on network size, b based on packet size

Similarly, Fig. 7b shows the analysis with respect to packet size. When packet size is increased, then more energy is required to transmit the data from source to destination. Thus, the lifetime is decreased with the increase in packet size. As well, proposed SecDL achieves better network lifetime even with the large packet size. Even with the 1000 bits of packets, the SecDL sustains for 200 rounds. But the existing works drop between 150 rounds. In particular, LEACH-CH method provides 70 rounds for the packet size of 1000 bits. That is, optimal CH selection alone is not sufficient for improving network lifetime. Proposed SecDL uses TDETR for data aggregation which eliminates the redundant data and also minimizes the number of transmissions. Thus, the proposed work achieves better network lifetime.The major reason behind this huge difference is that, proposed work concentrates on all three major aspects such as QoS, energy efficiency and security. In the presence of better QoS, and strong security the network lifetime will be improved.

5.4 Analysis on PDR

PDR is defined as the amount of packets generated by the network to the number of packets successfully delivered to the destination.

In Fig. 8, the PDR is compared between proposed and previous research works. With the increase in number of nodes, the PDR is also increased. SecDL provides PDR above 90% without regarding to the network size. That is, \(\cong\). 9 of packets have reached the destination successfully. At the same time, LEACH-CH transmits only 70% of packets without loss. The reason behind this huge loss is, LEACH-CH transmits the data through non-optimal route. However, QoS-routing scheme also has 24% of packet loss. This routing algorithm considers the initial path set-up stage which consumes more energy and bandwidth. Further, data transmission through initial optimal path is efficient. Likewise, all other works like CNN (25%) and Secure WSN-IoT (15%) also have huge packet loss. The analysis shows that any previous works is able to achieve better PDR.

Fig. 8
figure 8

Analysis on PDR a based on network size, b based on packet size

Likewise, Fig. 8b compares the proposed SecDL with respect to packet size. When the packet size is large then there will be additional need of energy and bandwidth. Thus, the PDR is inversely proportional to packet size. The proposed SecDL transmits 93% of packets (has the size of 1000 bits) successfully. For the same packet size, the LEACH-CH and QoS routing algorithm transmits inly 49% of packets. This is 44% lower than SecDL. In data transmission, security is also major aspect since most of the attackers drop the packets to degrade the network performance. For this reason, we Co-FitDNN with trust value. Thus, the proposed SecDL achieves better PDR regardless packet size. Further, we compress the \(A\left( P \right)\) into single packet which minimizes the packet loss.

In WSN-IoT, PDR will be high when the network has the ability to handle huge number of nodes and packets. For that, it needs a new architecture since the existing works are unable to achieve better data transmission. Consideration of QoS, energy efficient, and security parameters improves the PDR and optimizes the data transmission in SecDL.

5.5 Analysis on Throughput

Throughput is defined as the amount of data transmitted successfully to the specific destination at given period of time. In WSN-IoT, it estimates the amount of data received by the sink node successfully.

In Fig. 9a, b, the throughput achieved by proposed SecDL in compared with prior research works. The analysis shows that, the throughput is increased with increase in network size and decreased with the increase in packet size. But in both cases, SecDL outperforms with other works. The major reason behind this huge deviation is that, the proposed work considers the major three objectives as QoS, energy efficiency and security in WSN-IoT. Thus, proposed work achieves better throughput. At given period of time, the proposed SecDL achieves throughput higher than 90% with respect to both network size and packet size. When \(n = 100\), then SecDL achieves throughput up to while the LEACH-CH have throughput of 65%. This is 34% lower than SecDL. That is, the prior works are unable to perform well in all the time. But the SecDL has the ability to outperform at any given period of time.

Fig. 9
figure 9

Analysis on throughput a based on network size, b based on packet size

When the packet size is high, then the previous works have much lower throughput. Specifically, LEACH-CH method provides throughput of 55%. The major reason is the prior works not able to handle large packet size. For instance, LEACH-CH uses non-optimal path for data transmission, CNN has higher energy consumption, QoS routing has higher bandwidth consumption and Secure WSN-IoT has time and energy consumption. Therefore, the previous research works are not suitable for resource constrained WSN-IoT environment. At the same time proposed SecDL achieves better throughput by extending QoS, security and energy efficiency. Thus, the proposed SecDL is suitable for WSN-IoT environment.

5.6 Analysis on Delay

Delay is measured as the time taken by a data packet to reach its destination rom the source. It includes, propagation delay, processing delay and queuing delay.

Figure 10 shows the comparative analysis for delay. When the data packet is transmitted through the non-optimal route, then the delay will be high. However, we transmit the data through fittest route selected by Co-FitDNN by considering six major matric. In that, we also consider the delay as the metric for \(f\left( r \right)\) computation. Thus we transmit the data through the route which provides lower delay. This idea is reflected in the results also. In the comparison graph, the proposed SecDL has lower delay than prior works. The previous research works are not able minimize delay due to improper algorithm and initial path set-up phase. In that, the LEACH-CH protocol has delay up to 16 s as it transmits the data through non-optimal path. Even QoS-routing algorithm also fails to minimize the delay since it consumes time to set the initial path. In secure WSN-IoT route selection itself consumes large time and energy. Thus the prior research works are not able to handle the delay. Besides, the proposed work introduces 1 s of delay even in the presence of 100 nodes. This is due to our work elects optimal CH and aggregates the data. Further, a trusted and energy efficient route is selected for data transmission. Thus, the proposed work minimizes the delay.

Fig. 10
figure 10

Analysis on delay

5.7 Analysis on Encryption time

Encryption time measures the time taken to encrypt the data before transmission. This metric evaluates the efficacy of OT-PRESENT algorithm.

In Fig. 11, the comparison on encryption time is depicted. Here, OTP method and secure WSN-IoT are considered for comparison. In OTP method, the key length and randomness ensures the security level and time consumption. In secure WSN-IoT, RSA is used for encryption which is not suitable for resource constrained environment. When \(n = 100\), then the OTP algorithm takes 10 s to encrypt the data and RSA algorithm takes 5 s for encryption. For the same network size, proposed OT-PRESENT algorithm takes only 1.1 s which is much lower than prior works. As the PRESENT algorithm is ultra-weight, we achieve this much of results. Thus, the proposed work is suitable for resource constrained environment too.

Fig. 11
figure 11

Analysis on encryption time

5.8 Complexity Analysis and Results Discussion

Time complexity is compared between proposed SecDL and secure WSN-IoT in Table 6. Time complexity is computed for cluster formation, data aggregation, route selection, encryption and authentication. The comparison shows that the proposed SecDL has lower complexity that previous work.

Table 6 Time complexity comparison

As we minimize the frequent clustering and routing, the time complexity is much minimized. Further, routing is performed between CHs and MS. This reduces the complexity in route selection.

From the obtained results, it is assured that the proposed SecDL achieves better QoS, energy efficiency, and security. The major reason behind this work is a novel construction of WSN-IoT network with the necessary considerations. Table 7 summarizes the numerical observations on mean and standard deviation achieved by the proposed and existing works.

Table 7 Numerical analysis on results

The analysis shows that the proposed work outperforms with prior research works in all aspects. That is, the proposed cluster formation, data aggregation, routing, encryption and authentication schemes enhance the performance of SecDL. The analysis shows that the proposed work achieves better mean values for each performance metric. Furthermore, the standard deviation (SD) is also minimum in the proposed work. Thus the proposed work is suitable for WSN-IoT environment.

In Table 8, the theoretical facts behind the numerical results are summarized. The table analyzes each and every aspect of proposed approaches and its contributions in the results.

Table 8 Theoretical Assessment

Overall, the proposed SecDL satisfies all requires of QoS, energy efficiency and security in WSN-IoT. Besides, the complexity analysis confirms that the proposed SecDL is apt for resource constrained environment.

6 Conclusion

In this paper a novel SecDL approach is designed to improve QoS, energy efficiency and security in WSN-IoT environment. At first, the network is constructed as BiC-Hex and divided into six sectors. In each sector, dynamic clusters are formed and reformed in a self-organized manner. In each cluster, CH selection follows QP2 algorithm that selects optimal CH according to multiple parameters. Data aggregation follows TDETR algorithm that minimizes redundant data and compress the data. The aggregated data is encrypted by OT-PRESENT algorithm which is lightweight and also provides strong security. For data transmission, optimal route is selected based on six major parameters. The optimal route is selected in Co-FitDNN with trust, QOS, and energy parameters. In order to secure the data from unauthorized user access, IoT users are authenticated at gateway. For strong authentication, ARMV algorithm is proposed. Finally, the SecDL approach is modeled in ns-3.26 and analyzed in terms of performance metrics. The results show promising research directions in WSN-IoT. In future, we have planned to extend this work with more than one sink nodes to further reduce the energy consumption. We have also interested to evaluate SecDL in large-scale environment.