1 Introduction

Over the past decade wireless sensor networks (WSNs) have been the subject of intensive research in cross-layer optimization. WSNs comprise a vast number of sensor nodes deployed for collecting surrounding context and environment information [32]. A myriad of medium access and routing protocols [18, 28] along with many physical layers have been proposed for WSNs. These kind of protocols have been made energy-aware [31, 34]; fusion and aggregation strategies were employed [22]; location enriched basic infrastructures have been deployed [11], timing [40], and security protocols [12] enhanced; operating systems were specifically designed to support such higher-level abstractions [6]. Today, we stand at the cusp of Internet of Things (IoT), which is expected to massively span across these interconnecting WSNs.

The vast heterogeneousness in capacities of Internet of Things (IoT) device hardware and the diverse communication methods used among things warrant a cross-layer based design [2, 15] for IoT. The IoT aims to network various things, e.g., smart watches, phones, tablets, sensors, actuators, cars and other mobile devices, utilizing a variety of existing physical network infrastructures, including WiFi, Bluetooth, 802.15.4, Z-wave, and LTE-advanced [3, 5]. Basically, IoT is realized by amalgamating communication capabilities with functionalities of sensing, identification and actuation into everyday things and then initiating communication in expansive Internet technologies.

2 Synthesizing TDMA based MAC protocols

Schemes based on scheduling in the initialization phase are responsible for designating collision free links between neighboring nodes. These links are assigned as code division multiple access (CDMA), frequency division multiplexing (FDM) bands, or time division multiplexing (TDM) slot based spectrum codes. TDMA schemes are favored by IoT Networks due to the complexities faced by the CDMA and the FDMA schemes [30].

System time in the TDMA schemes is split into slots, that are then allocated to the neighboring nodes. Authorization of the participant on resources with regular time is managed by the schedule. While generally monitored by the central authority, the schedule may also be computed, fixed or a hybrid on demand. Since a node can only access its allocated time slot, there is no conflict with the neighbors. Prime advantages of using scheduling based schemes are implicitly avoidance of idle listening, minimum collisions and less overhearing. Also an anticipated and bounded end to end delay can be administered by scheduling based schemes. Considering that a node must wait for its allocated time slot before accessing the channel,the average queuing delay is generally high. Allocating conflict free TDMA schedules, however is a complex task. Major concerns with these schemes are lacking of adaptability, extra and overhead traffic, low throughput and reduced scalability. Since the nodes are only allowed to communicate with the central authority, it is also impractical for scheduling based schemes to have peer-to-peer based communication.

While many designs of wireless MAC protocols established on TDMA were suggested [7], despite needing global topology information, most of them could not be adaptable for very large size networks [1, 42]. To reduce the problem of acquiring global topology information in nigger networks, many distributed slot assignment schemes were proposed like, TRAMA [41],PACT [4] and DRAND [17]. Local interference and topology information at every node is obtained by the multicolor-GCF (M-GCF) [9], Green Conflict Free (GCF), or the depth first search (DFS) [42] algorithms. In all of these approaches, schedules are composed by exchanging messages between local nodes with the interference range. The cost increases corresponding to the schedule length [7] when global topology information is demanded in distributed scheduling in order to make it more flexible. A TDMA-MAC protocol derived from TRAMA is the Flow-Aware Medium Access (FLAMA) [23], it is optimized for monitoring applications periodically. The gist of FLAMA is evading the overhead linked to the traffic information exchange. FLAMA set up first flows before using a pull-based mechanism due to the message flow in periodic reporting applications being relatively stable. As a result, the data is transferred only when requested specifically.

Classical slot reservation algorithms are often not flexible and quite complex. Hence, researchers have explored simpler schemes that also aim in achieving better energy efficiency. A protocol to demonstrate the joint interconnect in the fair rate allocation and maximum throughput in IoT was proposed in [19] for slot reuse based TDMA in consideration.

3 Related work

We discuss some of the recent attempts at standardization of point-to-point communications with respect to data link layer for IoT that are only relevant to our model in regards to OSI protocol [39] stack.

The most widely used data link layer standards are Bluetooth Low Energy (BLE) [16, 29] and ZigBee [10]. IEEE 802.11ah [27], on the other hand, is the most convenient standard employed due to existing and widely separated infrastructure of IEEE 802.11 [14]. Also, IEEE 802.15.4 is the most commonly used IoT standard for Medium Access Control (MAC) sublayer of data link layer. However, some providers would seek for more reliable and secured technology and have recently employed HomePlug [21] for LAN connectivity. In addition, the newly arising LoRaWAN [37] has made huge strides in usage of low-power Wide Area Networks (WANs) having low cost, mobility, security, and bi-directional data link communication for IoT applications.

3.1 Time-division multiple access (TDMA)

Used in digital 2G cellular systems, a channel access method for shared medium networks as shown by Fig.  1 is known as Time-Division Multiple Access (TDMA). In this protocol, a signal gets divided into different slots of time which enables multiple users to share the same frequency channel [13]. Despite being similar to time division multiplexing, TDMA has multiple transmitters rather than just one. Each user uses their own allocated time slot. Data is transmitted in swift progression hereby permitting multiple stations to share the same frequency channel despite using only a part of the channel capacity. Figure 1 shows the TDMA structure where the data stream is divided into frames and the frames are further divided into time slots.

Fig. 1
figure 1

TDMA frame structure

3.2 IoT system overview

3.2.1 Protocol set-up

The various cross-layered protocols that were developed by researchers for Ad-Hoc networks [24], Wireless Mesh Networks [46] and Wireless Sensor Networks (WSNs) [25] could not be used in experimenting and incorporating the suggested IoT framework. The main issue why synthesizing these networks into the IoT structure was due to the heterogeneity of the devices in these networks. The hardware specifications, the Quality-of-Service requirements and data precision requirements of all of these devices were different than those being used in the listed protocols of [8, 24, 25] where the hardware specifications in the WSNs are identical and thus the communication requirements can be shared since the objectives are shared too. Unlike the flat networks proposed without the Internet in [24, 25, 46], the IoT network comprises of the Internet. As a result, the reference architecture resembles practical scenarios which are generally integrated and organized hierarchically. A cross-layered protocol named the intel-LEACH [34], was developed to centralize the routing, MAC and the physical layer functionalities into a common communication scheme. intel-LEACH also picks a node with high yields based on a strategy of dynamic optimization which is autonomous of the layout of the network architecture. The intel-LEACH protocol is used on the proposed on the IoT network model because it is regarded as an appropriate fit in performing comparison evaluations and for testing the performance metrics with the state-of-the-art protocols.

3.2.2 Network architecture

The network architecture of the IoT used as a reference in the course of this article is depicted in Fig. 2 The following elements form an essential part in the network:

Fig. 2
figure 2

An example of network architecture for IoT

Gateway Access Point (GAP):

Devices that act as an administrator of communication between the Internet and things are know as Gateway Access Points (GAP). They have a higher computation capacity. GAP domain is referred to as a set of things that are in complete control of a single GAP. For routing though a GAP, there are two types of possibilities of communications during the routing process. These are: inter-GAP and intra-GAP. Inter-GAP communication is responsible for dealing with things in different GAP domains. The GAP behaves as both, a coordinator and a gateway. The optimization algorithms are locally initiated by exploiting the network knowledge by the GAP. Intra-GAP communication deals with things in the same GAP domain. It is desirable to use the GAP for coordination in the IoT network because of the different hardware capabilities in things.

Things:

Objects that have different abilities owing to their different hardware specifications with respect to memory and data storage capacity, computation, transmission power or communication. Fig  2 shows different appliances and other equipments that are all examples of things. All of these things do not have the ability to communicate with the GAP directly, thus multi-hop links are a critical requirement. GAP is able to communicate with all of the things within its domain in one hop. Thus, GAP may have a higher transmission power compared to the things due to the asymmetry of the links.

Internet:

A primitive component of the IoT network is the Internet. When the network is synthesized using Delta-Diagrams, it is characterized by a stochastic packet loss model [43] and a stochastic queuing delay model. Most of the things are connected to the Internet via the common gateway access point (GAP) as shown in Fig. 2.

4 MAC layer design synthesis

In this section, we propose a novel optimization model for the IoT using a parameter synthesizing road map provided by a delta diagram illustrated in Fig. 4 for the MAC layer. Furthermore the delta diagram synthesizer can be generalized and extended to any layer chosen by the optimization model adopted by a communication system [35]. For the IoT network architecture specified in Fig. 2, the delta diagram is applied to synthesize MAC layer of the protocol stack described in Fig. 3.

Fig. 3
figure 3

Open systems interconnection reference model magnifying network, data link and physical layers

Our model assumes K heterogeneous sources that transmit data wired or wirelessly to a central Base Station (BS). The nodes access the up-link channel using TDMA based MAC protocol, and time is partitioned into frames, where frame m corresponds to the time interval \(\left[ \right.{\mathcal{T}}_m\), \({\mathcal{T}}_{m+1} \left. \right) \). Every duty cycle of the node periodically produces data and evaluates the compression ratio resulting in final transmission to the common receiver.

Fig. 4
figure 4

Delta diagram synthesizer for Medium Access Control (MAC) layer

Fig. 5
figure 5

Energy parameter synthesizing final action for data link layer synthesis

We adopt a resource allocation approach which involves centralized management [32] to estimate resource availability and environmental dynamics, coordinate the allocation of resources across applications and nodes, and therefore adapt the protocol energy parameters at each level based on the synthesizer road map provided by delta diagram. This approach assists in integrating scattered communication functionalities into a united coherent optimization model and provide an flexible solution for MAC layer design and control. We use this approach to jointly control and synthesize a select case of Quality of Service (QoS) requirements. Based on our selected QoS case, we synthesize the MAC layer of network architecture represented in Fig. 2 using the delta diagram in Fig. 5 that results in mapping respective energy parameters. The synthesizer produces these parameters based on differentiated services for applications having contrasting QoS requirements, ranging from error-limited applications or minimum energy consumption applications to highly-delay-sensitive applications or any combination of them. We can model this case as a multi-objective optimization problem that must simultaneously optimize multiple conflicting objectives of QoS requirements subject to distortion constraints of delta diagram synthesizer, given by a minimization fitness function that produces a triple as follows,

$$\begin{aligned} \begin{aligned}&{\mathcal{F}}^{{\tt {fit}}} = \underset{x}{\text{minimize}} \ J({\mathsf {x}}) \\&\iff \underset{x}{\text{minimize}} \ J({\mathsf {x}}) = \Big ( \ x_0, \ x_1, \ x_2, \ x_3 \ \Big ) \\&\qquad \qquad \qquad = \Big ( \ \xi ^{\mathtt{pe}}_{min}, \xi ^{\mathtt{te}}_{min}, \xi ^{\mathtt{sd}}_{min}, \xi ^{\mathtt{ec}}_{min} \ \Big ) \\&\text{subject to} \ {\mathcal{E}}_\mathtt {D}^m\le {\mathcal{E}}_\mathtt {DTH}^\mathtt {m}, \ \forall \ m \\&\qquad \qquad \xi ^m_{\mathtt{Total}} \le \xi ^m_{\mathtt{max}}, \ \forall \ m \end{aligned} \end{aligned}$$
(1)

The fitness function \({\mathcal{F}}^{\tt {fit}}\) is a minimization function. It takes a vector \({\mathsf {x}}\) of dimensions \(4 \times 1\) having elements \(x_0\), \(x_1\), \(x_2\) and \(x_3\) and produces a minimized tuple ( \(\xi ^{\mathtt{pe}}_{min}\), \(\xi ^{\mathtt{te}}_{min}\), \(\xi ^{\mathtt{sd}}_{min}\), \(\xi ^{\mathtt{ec}}_{min}\) ) for a given instance when subjected to constraint conditions in Eq. (1). For the IoT network architecture in Fig. 2, we consider the end-to-end communication as point-to-point communication due the vast diversity of end nodes and its heterogeneousness with respect to its computing capacity, storage, etc. The terms in Eq. (1) are as follows: \(\xi ^{\mathtt{pe}}_{min}\) is processing energy for compressing data, \(\xi ^{\mathtt{te}}_{min}\) is transmission energy of the thing, \(\xi ^{\mathtt{sd}}_{min}\) is combination of equipment circuitry sink energy and sensing detection energy, and finally \(\xi ^{\mathtt{ec}}_{min}\) is the encryption/decryption cost for data to be transmitted or received. Note that all the above discussed energies must be optimally minimal. The total energy consumption \(\xi ^m_{\mathtt{Total}}\) of a thing in frame m is obtained by summing all the energies (\(\xi \)’s) mentioned above.

The average physical rate of user \(\ell \ \in \ K\) in frame m is denoted using Shannon’s bound [38] as,

$$\begin{aligned} \begin{aligned} {\mathfrak {r}}_\ell ^m = B \ \log _{10} ( 1 \ + \mathsf {SNR}_\ell ^m )\\ \iff {\mathfrak {r}}_\ell ^m = B \ \log _{10} ( 1 \ + g \cdot {\mathsf {P}}_\ell ^m ) \end{aligned} \end{aligned}$$
(2)

where SNR is the signal-to-noise ratio, \({\mathsf {P}}_\ell ^m\) is transmission power, g is noise normalized channel gain and B is the bandwidth of the channel. The channels gains for every thing \(\ell \) is affected by fast fading evolving independently over time and every user.

The processing energy \(\xi ^{\mathtt{pe}}\) for compressing data is obtained by exploiting the results from [45] that is characteristically expressed as,

$$\begin{aligned} \xi ^{\mathtt{pe}}= \xi _{\mathtt{Proc}}^m\cdot {\mathfrak {d}}_\ell ^m\cdot {\mathfrak {C}}_{\mathrm{f}}( \ \{ {{\mathfrak {C}}_{\mathrm{r}}} \}_\ell ^m\ ) \end{aligned}$$
(3)

where \(\xi _{\mathtt{Proc}}^m\) is the energy consumed per duty cycle of the thing’s processor, \({\mathfrak {d}}_\ell ^m\) is magnitude of data generated in frame m by node \(\ell \), \({\mathfrak {C}}_{\mathrm{f}}\) is a function returning the number of duty cycles of the processor per bit required to compress the original signal and takes data compression ratio \(\{ {{\mathfrak {C}}_{\mathrm{r}}} \}_\ell ^m\) as an argument. The \(\{ {{\mathfrak {C}}_{\mathrm{r}}} \}_\ell ^m\) requires less energy for higher compression and depends on the algorithm employed. For example, temporal compression (TC) and low pass filter (LPF) algorithms can be approximated as linear viz., \( {\mathfrak {C}}_{\mathrm{f}}( \{ {{\mathfrak {C}}_{\mathrm{r}}} \}_\ell ^m) = a_{\ell }^m \cdot \{ {{\mathfrak {C}}_{\mathrm{r}}} \}_\ell ^m- b_{\ell }^m\) where \(a_{\ell }^m\) and \(b_{\ell }^m\) are coefficients [45]. Consequently the energy consumption becomes,

$$\begin{aligned} \begin{aligned} \xi ^{\mathtt{pe}}&= \xi _{\mathtt{Proc}}^m\cdot a_{\ell }^m \cdot \{ {{\mathfrak {C}}_{\mathrm{r}}} \}_\ell ^m\cdot {\mathfrak {d}}_\ell ^m+ \xi _{\mathtt{Proc}}^m\cdot \{ {{\mathfrak {C}}_{\mathrm{r}}} \}_\ell ^m\cdot b_{\ell }^m \ \\ \text{where} \ \{ {{\mathfrak {C}}_{\mathrm{r}}} \}_\ell ^m&= \frac{\text{Uncompressed Size}}{\text{Compressed Size}} \\ \iff \{ {{\mathfrak {C}}_{\mathrm{r}}} \}_\ell ^m&= \frac{{\mathfrak {d}}_\ell ^m}{\hat{{\mathfrak {d}}_\ell ^m}} \end{aligned} \end{aligned}$$
(4)

In our model, we assume that \({\mathfrak {C}}_{\mathrm{f}}\) to be increasing in \(\{ {{\mathfrak {C}}_{\mathrm{r}}} \}_\ell ^m\). The transmission energy \(\xi ^{\mathtt{te}}\) of a thing \(\ell \) for a time interval \({\mathcal{T}}_{\ell }^m\) seconds having fixed power \({\mathsf {P}}_\ell ^m\) is calculated as,

$$\begin{aligned} \xi ^{\mathtt{te}}= \frac{{\mathsf {P}}_\ell ^m \cdot {\mathcal{T}}_{\ell }^m}{\psi _{Ant}^m} \end{aligned}$$
(5)

where \(\psi _{Ant}^m\) is a constant term that is proportional to the efficiency of the power amplifier for antenna. The combined equipment circuitry sink and sensing energy \(\xi ^{\mathtt{sd}}\) consists of total energy expended to sense the environment and the eddy losses due to circuitry, such as the energy spent for node switches between sleep and active modes, the synchronization costs, as well as energy spent for transmission and given by,

$$\begin{aligned} \begin{aligned} \xi ^{\mathtt{sd}}= \mathfrak {R}_{\ell }^m \cdot {\mathcal{T}}_{\ell }^m + c_{\ell }^m \\ \qquad \qquad \text{where } c_{\ell }^m = s_{\ell }^m + e_{\ell }^m \end{aligned} \end{aligned}$$
(6)

In Eq. 6, \(\mathfrak {R}_{\ell }^m\) represents the rate of equipment circuitry power consumption for transmitting data and \(c_{\ell }^m\) is a constant denoting the sensing \(s_{\ell }^m\) and equipment \(e_{\ell }^m\) sink costs respectively. It is important to note that there is no wastage of energy due to collisions and overlapping since TDMA-based MAC has been adopted in this model and therefore devices get exclusive access to communication channel for their respective slot (Fig. 1). The encryption/decryption cost [44] for data to be transmitted or received \(\xi ^{\mathtt{ec}}\) of a thing \(\ell \) for a time interval \({\mathcal{T}}_{\ell }^m\) seconds having fixed power \({\mathsf {P}}_\ell ^m\) is calculated as,

$$\begin{aligned} \begin{aligned} \xi ^{\mathtt{te}}= \frac{{\mathsf {P}}_\ell ^m \cdot {\mathcal{T}}_{\ell }^m}{\phi _{\text{size}}^m} \\ \text{where} \ \phi _{\text{size}}^m = \frac{\mu }{\text{P}_{\text{load}}} \end{aligned} \end{aligned}$$
(7)

where \(\phi _{\text{size}}^m\) is a function that returns a term that is proportional to the pay load \(\text{P}_{\text{load}}\) and block size \(\mu \) to be encrypted. For a block cipher, \(\mu \) is the block size, while for a stream cipher, it represents the keystream block size which is the amount of keystream produced at one time to be used in the bit-wise XOR of \(\mu \) bits in parallel. We apply a novel hybrid multi-objective optimizer algorithm WOABC to derive top \(\eta \) number of optimal minimized tuples specified in Eq. 1. The working of WOABC algorithm is described in Sect. 5.3.

5 WAOABC cross-layer optimizer framework

5.1 Whale optimization algorithm

Fig. 6
figure 6

Whale optimization algorithm

We adopt a WAOABC framework proposed in [26] and apply it to extract a minimized tuple using fitness function defined in Eq. (1) by synthesizing the parameters discussed in delta diagram Fig. 5. In [26], the core function lies in closely mimicking the behavior of the whales in prey hunting. The WAO consists of two steps: The Encircling Step and the Prey Attacking Step. This algorithm closely mimics the social behavior of these big exquisite creatures that mostly move around in groups. These prey hunt for small schools of fish or krills close to the surface of the water body. Their method of scavenging for food is also known as the Bubble-Net feeding Method. In this bubble-net feeding method, it was observed by the researchers that the whales encircle their prey in the form of a spiral of bubbles that entraps the smaller fish. Two methods in which they do this is by the “Upward Spiral Method” and the “Double Loops” Method. The mathematical modeling of the whales hunting activities is described in the following steps.

5.1.1 Prey encircling

Once the prey is spotted by the humpback whales, they encircle it as shown in Fig. 6a. Theoretically, we are unaware of the position of the optimal design in the search space in the beginning. Thus it is assumed that the best solution in the current iteration is the prey or is at least close to it. Once this best search agent is established, the other ones try to update their positions towards the best. The following equations represent this behavior:

$$\begin{aligned} \overrightarrow{D}= & {} \mid \overrightarrow{C}\times \overrightarrow{X}^*(t) - X(t)\mid \end{aligned}$$
(8)
$$\begin{aligned} \overrightarrow{X}(t+1)= & {} \overrightarrow{X^*}(t) - \overrightarrow{A} \times D \end{aligned}$$
(9)

where t is the current iteration, A and C are coefficient vectors and \(X^*\) is the position vector.

To calculate A and C, we use the following two equations:

$$\begin{aligned} \overrightarrow{A}= & {} 2\overrightarrow{a} \overrightarrow{r} - \overrightarrow{a} \end{aligned}$$
(10)
$$\begin{aligned} \overrightarrow{C}= & {} 2\overrightarrow{r} \end{aligned}$$
(11)

\(\overrightarrow{a}\) is reduced linearly from 2 to 0 and \(\overrightarrow{r}\) is a random vector in the range [0,1]

5.1.2 Spiral update position

Once the encircling and the spiral formation is done, the next step of the humpback whales is to attack their prey as depicted in Fig. 6b. In the mathematical modeling of the WOA algorithm, the helix shaped movement of the whales is mimicked to create a spiral equation between the position of the prey and the whale. The equation is as follows:

$$\begin{aligned} \overrightarrow{X}( t + 1 ) = \overrightarrow{D^{\prime }}\cdot e^{ b \ell }\cdot cos (2\pi \ell )+\overrightarrow{X^*}( t ) \end{aligned}$$
(12)

Here \(D^{\prime }\) specifies the best solution so far, which is the distance of the ith whale to the prey. It is given by the following equation:

$$\begin{aligned} \overrightarrow{D} = \mid \overrightarrow{X^*}(t) - \overrightarrow{X}(t) \end{aligned}$$
(13)

The logarithmic spiral is designated by b and l is a random number in [− 1,1]. The humpback whales swim around the prey in a spiral path in a shrinking circle, both at once. Thus a probability of 0.5 is assumed for choosing between the spiral model or the shrinking encircling method to update the position of the whales, which can be seen from the following equation,

$$\begin{aligned} \overrightarrow{X}( t + 1 ) = {\left\{ \begin{array}{ll} \overrightarrow{X^{*}} ( t ) - \overrightarrow{A} \cdot \overrightarrow{D} &{} if \ p < 0.5 \\ \overrightarrow{X}( t + 1 ) = \overrightarrow{D^{\prime }} \cdot e^{bl} \cdot cos (2\pi \ell )+\overrightarrow{X^*}(t) &{} if \ p > 0.5 \end{array}\right. } \end{aligned}$$
(14)

where p is a random number between [0,1]. A random search is conducted by the humpback whales in addition to the bubble-net method where their positions keep getting updated according to those of the other search agents. This helps in finding the global optimal solution in the search space. \(\overrightarrow{a} > 1\) and \(\overrightarrow{a} < 1\) are used to move the whale away from the reference whale and is mathematically computed as:

$$\begin{aligned} \overrightarrow{D}= & {} \mid \overrightarrow{C} \overrightarrow{X_{rand}} - X\mid \end{aligned}$$
(15)
$$\begin{aligned} \overrightarrow{X}(t+1)= & {} \overrightarrow{X_{rand}} - \overrightarrow{A} \cdot \overrightarrow{D} \end{aligned}$$
(16)

5.2 Artificial Bee Colony algorithm

The Artificial Bee Colony (ABC) algorithm [20] consists of colonies of bees in three different groups namely the employed bees, the onlooker bees and the scout bees. There is just one employee bee per food source. In the colony, the first half are the employee bees and the other half are the onlooker bees. Scout bees are the bees who were employed before but their food sources ran out or were abandoned.

The food source with the most amount of nectar in it, is the best possible solution of the optimization problem. Here the amount of nectar in the food source correlates to the fitness of the solution. The number of solutions in the population are equal to the number of the employed or the onlooker bees. When the mathematical modeling of this algorithm is done, first the initial population is generated with various food source positions, which are also the solutions of the population. Each solution is a D dimensional vector where D represents the number of parameters of optimization. Once the initialization is complete, the employed,onlooker and the scout bees are subject to the search processes. The position of the food source and the nectar amount is embedded into the brain of the employed bee, who goes out in search for it. If the employed bee succeeds in finding a new food position with a greater nectar amount in it, she forgets the old one otherwise she still remembers the old one. The nectar information given by the employed bee is evaluated by the onlooker bees and a food source is chosen. If the onlooker bee succeeds in finding a new food position with a greater nectar amount in it, she forgets the old one otherwise she still remembers the old one. The food source chosen by the onlooker bee depends on the probability value of that food source, which is calculated by the following equation:

$$\begin{aligned} p_{i} = \frac{fit_{i}}{\sum _{n=1}^{SN}fit_{n}} \end{aligned}$$
(17)

where SN is the total number of food sources which is the same as the number of employed bees. and \(fit_{i}\) is the value of the fitness function or the nectar amount in the food source. The candidate food position is updated using the following equation:

$$\begin{aligned} v_{ij} = x_{ij} +\phi _{ij}(x_{ij} - x_{kj}) \end{aligned}$$
(18)

where k and j are randomly chosen indexes and k \(\ne \) i, \(\phi _{ij}\) is a random number between [− 1,1]. \(\phi _{ij}\) represents a comparison of two food sources as seen visually by a bee and is also responsible for controlling the production of the food sources from the neighboring sites. As the difference between \((x_{ij} - x_{kj})\) decreases, it means that the search is approaching the most optimum solution. The Limit of Abandonment is a crucial control parameter of the ABC algorithm which is set up at the start of the algorithm. Now, we choose the best properties of the WAO and ABC algorithms to construct a hybrid WAOABC algorithm to shortlist \(\eta \) number of near optimal solutions for Eq. 1

5.3 Hybrid WOAABC algorithm

Researchers have been working on developing many hybrid approaches in Evolutionary Algorithms in order to enhance the exploration performance of the algorithms in the search space. Our attempt is to hybridize the Whale Optimization Algorithm with the Artificial Bee Colony algorithm to generate a hybrid which consists of functionalities of the two individual approaches. The capability of exploitation in the Artificial Bee Colony algorithm coupled with the capability of exploration in Whale Optimizer Algorithm is improved in hybridizing of both algorithms. Since in the WOA algorithm, the whales use the bubble-net foraging method to trap the prey, it is used in the exploration phase. The position of the whale that is supposed to find the most optimal solution is replaced with the position of the artificial bee, which is equivalent to the updated position of the whale but is more highly efficient to move the solution to the global best solution. As a result, with the mix of the best characteristics from both, the WOA and the ABC algorithm, is it easier and guaranteed that the global best solution will be reached, thereby avoiding the local best or the local optima problems.

The mathematical modeling of the WOABC Algorithm is as follows: In WOA algorithm, the position of the humpback whale with probability greater than 0.5 is given by:

$$\begin{aligned} \overrightarrow{X}( t + 1 ) = \overrightarrow{D\prime }\cdot e^{bl}\cdot cos (2\pi \ell )+\overrightarrow{X^*}(t) \end{aligned}$$
(19)

where l is a random number between [− 1,1], which along with ’b’ defines the shape of the logarithmic spiral. In the ABC algorithm, the updated new position of the bee is given by the following equation:

$$\begin{aligned} v_{ij} = x_{ij} +\phi _{ij}(x_{ij} - x_{kj}) \end{aligned}$$
(20)

where \(\phi \) is responsible for comparing two food sources visually seen by the bee and also for controlling the creation of food sources from the neighboring sites. The \(\phi \) from the ABC algorithm replaces the \(\ell \) in the WOA algorithm. Since \(\phi \) is also in the range of [− 1,1], it does not affect the ability of the whales to form the spirals in the bubble-net method, however, is enables them to improve the exploration method as the \(\phi \) also looks in the neighboring sites for similar prey.

In the equation, \(\overrightarrow{A} = 2\overrightarrow{a} \overrightarrow{r} - \overrightarrow{a}\), a represents the Shrinking Encircling Mechanism, which means that once the prey is circled around by the whales, they attack on it and thus the spiral shrinks in on them. This is replaced by the following equation from the ABC algorithm:

$$\begin{aligned} a = ( 2/\text{Max}\_\text{Iterations} ) \end{aligned}$$
(21)

In the ABC algorithm, “a” signifies the acceleration coefficient upper bound. It decreases from 2 to 0. In order to update the whale position when the probability is less than 0.5, for the equation,

$$\begin{aligned} \overrightarrow{X^*}( t ) - \overrightarrow{A}\cdot \overrightarrow{D} \end{aligned}$$
(22)

The parameter A is replaced the \(\phi \) from the ABC algorithm again, for further exploration purposes. The probability value in the WOA algorithm is taken as a random number,however in the ABC algorithm it is calculated as per the following equation:

$$\begin{aligned} \frac{fit_{i}}{\sum _{i=1}^{SN}fit_{i}} \end{aligned}$$
(23)

In the WOABC algorithm, the search for a better position for the whale is based on the probability found by the ABC algorithm rather than just a random number. This makes the search more detailed and thus better than the individual searches of both, the WOA or the ABC algorithm.

Now we apply the hybrid WOABC algorithm to find the near optimal solutions in the form of tuples that satisfy the fitness function in Eq. 1 using the pseudo code in Algorithm 1.

figure a

6 Results and analysis

Fig. 7
figure 7

Comparison of energy dissipation among various optimization algorithms

Fig. 8
figure 8

Energy dissipation rate over iterations for various compression ratios of Eq. 1

Fig. 9
figure 9

Comparative tests of algorithms for delta diagram synthesizer using box-plot

The intel-LEACH protocol [34] was incorporated to test our framework from synthesis to optimization steps in practical point-to-point IoT scenarios. The operation is briefly listed in following phases.

  1. 1.

    Transmission phase

    • Check route validity from point to point nodes and following initialization routines of MAC operation described in Sect. 4.

    • Failure mitigation by generating Route Request (RR) packet containing the destination thing ID directed towards nearest GAP.

  2. 2.

    Service phase

    • GAP transmits its ID in broadcast mode periodically

    • GAP has sufficiently large power to directly communicate with every thing in its domain (Sect. 3.2.2).

    • The things register themselves to GAP with Network Association (NAS) packet.

  3. 3.

    Messaging phase

    • Upon receiving packet data, the thing sends a Route Acknowledge (RA) packet to the previous hop in the route to show its alive.

    • The above process is repeated in multi-hops scenario until source is reached.

    • Data is transmitted by following the optimal route with the chosen communication parameters defined by delta diagram in Fig. 5 and according to description in Sect. 4.

    • Computation complexity is shifted from things to GAP which reduces multi-flow problems.

  4. 4.

    Routing phase

    • GAP receives the RR packet via several paths, the intermediate nodes are earmarked as priority candidates for data transmission

    • GAP initiates the WOABC framework for potential paths and QoS requirements to find the near optimal path and the associated communication parameters, as explained in Sect. 5.3.

The performance of the hybrid WOABC MAC optimizer framework and state of the art solutions was compared and analyzed by setting up the network with different parameters and methodologies described as follows.

7 Energy analysis

A critical cost analysis for energy benchmarking WOABC-Crosslayer Framework with traditional crosslayer models having different modulation levels is depicted in Fig. 8. It can clearly interpreted from Fig. 8 that our model based on delta diagram outlasts all the other models in terms of network longevity and energy conservation.

The comparison of energy dissipation among various optimization algorithms is shown in Fig. 7. We begin the study of evolutionary algorithms by applying the multi-objective optimization (MOO) for energy factor described in fitness function of Eq. 1. Initially we choose MOO algorithms such as Simulated Annealing (SA) algorithm and the Genetic Algorithms (GA) for our model. However, SA algorithm suffers from extreme slowness thereby searching for an optimal solution is not very efficient and feasible. Thus as depicted in Fig  9, the curve for SA predicates worst performance among all other comparative algorithms for energy model in Eq. 1. Although relatively the Genetic Algorithm (GA) performs better than SA, it encounters issues about not only termination time, but also with the convergence rate. This is due to the fact that GA has a major drawback of getting stuck in local minima, making it unsuitable for multi-objective based optimization problems. Particle Swarm Optimization (PSO) overcomes the above challenges faced by SA and GA, however it still falls short with problems related to high dimensional space. Furthermore, Hybrid Grey Wolf Optimizer Sine Cosine Algorithm (HGWOSCA) [36], Grey Wolf Optimizer (GWO) [33] and Artificial Bee Colony (ABC) [20] methods overcome most of the problems faced by other algorithms described earlier. But the WOABC based framework described in Alg. 1 performs optimally for our the specific context and able to find the best possible fitness energy scores with least number of iterations. The Fig. 9 show that the box-plot of WOABC is significantly lower and narrower than other algorithms. Figure 9 shows that the box-plot of SA is super narrow implying worst suitability for our model; while WOABC is under the minima of other algorithms. This means that WOABC tends to find the global minimum and significantly outperforms other algorithms.

8 Conclusion

In this article, we presented the novel energy optimized design for MAC-Layer of the IoT protocol stack. The approach uses a Delta-diagram based synthesizer to identify the energy parameters of MAC layer to be considered for optimization. The parameters chosen are completely dependent on the type of network and topology of IoT setup and hence it is highly customizable. Furthermore, synthesis process enables parsing differing levels of parameters and moving across different domains of Behavior, Structural and Optimizer requirements of the chosen protocol for IoT.

We constructed a model for deriving the fitness function which simultaneously minimizes energy requirements across different paradigms for the MAC layer of network protocol subjected to the QoS constraints.

We introduced a hybrid WOABC algorithm to optimize and search the near optimal minimized tuple resulting from model search space. The results and analysis of the methodology shows that our approach using a test protocol outperforms other cross-layered approaches significantly and is highly flexible in nature so that it can adapted to any type QoS requirements of different type of MAC layers across various network protocols.