In this paper, we presented a secure and blockchain based EDM protocol for 5G-enabled vehicular edge computing. To provide scalability and latency for the proposed scheme, we adopted a 5G cellular architecture due to its projected features compared to 4G long-term evaluation (LTE) for vehicular communications. We considered an edge computing architecture to provide local processing of EDM in order to improve the response time. We made use of lightweight multi-receiver signcryption scheme without pairing that offers lightweight consuming operations, security, privacy and access control. To keep EDM records into a distributed system for reliability and auditability, we constructed a private blockchain using the edge nodes. The performance analysis of the proposed protocol in terms of security analysis, communication, computational and simulation confirms the efficiency of the protocol.

**Author Contributions:** Conceptualization, L.N.; methodology, L.N.; validation, B.A.T.; writing—original draft preparation, L.N.; writing—review and editing, M.K.S.; supervision, Y.-H.C.; funding acquisition, Y.-H.C. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was supported by BK21PLUS, Creative Human Resource Development Program for IT Convergence, by basic science research program through national research foundation korea (NRF) funded by the ministry of science, ICT and future planning (NRF-2018R1D1A3B07043392).

**Acknowledgments:** This work was supported by BK21PLUS, Creative Human Resource Development Program for IT Convergence, by basic science research program through national research foundation korea (NRF) funded by the ministry of science, ICT and future planning (NRF-2018R1D1A3B07043392).

**Conflicts of Interest:** Authors declare that there is no conflict of interest.

#### **References**

c 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## **Fast, Resource-Saving, and Anti-Collaborative Attack Trust Computing Scheme Based on Cross-Validation for Clustered Wireless Sensor Networks**

**Chuanyi Liu 1,2 and Xiaoyong Li 3,***<sup>∗</sup>*

Received: 9 February 2020; Accepted: 9 March 2020; Published: 12 March 2020

**Abstract:** The trust computing mechanism has an increasing role in the cooperative work of wireless sensor networks. However, the computing speed, resource overhead, and anti-collaborative attack ability of a trust mechanism itself are three key challenging issues for any open and resource-constrained wireless sensor networks. In this study, we propose a fast, resource-saving, and anti-collaborative attack trust computing scheme (FRAT) based on across-validation mechanism for clustered wireless sensor networks. First, according to the inherent relationship among three network entities (which are made up of three types of network nodes, namely base stations, cluster heads, and cluster members), we propose the cross-validation mechanism, which is effective and reliable against collaborative attacks caused by malicious nodes. Then, we adopt a fast and resource-saving trust computing scheme for cooperation between between cluster heads or cluster members. This scheme is suitable for wireless sensor networks because it facilitates resource-saving. Through theoretical analysis and experiments, the feasibility and effectiveness of the trust computing scheme proposed in this study are verified.

**Keywords:** cross-validation; anti-collaborative attack; resource-saving; trust computing; wireless sensor networks

#### **1. Introduction**

Wireless sensor networks (WSNs [1–5]) are widely used in several fields such as intelligent perception, military, disaster warning, medical care, etc. The main application of WSN is to sense the surrounding environment and send the obtained information to the base station (BS) for subsequent processing. For clustered WSNs such as EEHC [6], EC [7], HEED [8], TRAST [9], and LDTS [10], clustering algorithms can significantly improve the performance and efficiency of wireless sensor networks [11]. The clustering algorithm is used to divide nodes into multiple clusters. In each cluster, a node with powerful computing capability is selected as the cluster head (CH). Multiple CHs together form a higher level information transmission network. This layered network structure helps increase the speed of data collection and can limit network operations that consume large amounts of bandwidth [10,12]. Many applications in WSNs require coordination through wireless communications between participating nodes for interactive operations such as task collaborations and data transmissions [10,13–15].

However, the inherent security issues of WSNs also arise in the cooperation between participating nodes. WSNs are usually highly accessible in existing applications, which makes them very vulnerable to malicious attacks. Therefore, it becomes very important to provide a secure and trusted collaboration mechanism for WSNs. The trust mechanism and network entity behavior are an important factors that WSNs must consider [10,16–20]. The trust mechanism can be used to detect the reliability and security of the cooperative nodes (or to identify the faulty nodes) or to assist in the decision-making process, such as whether a node needs to choose a partner to complete the data transmission task [21–26].

#### *1.1. Challenges and Motivations of This Work*

The trust mechanism is an important element in any network computing environment [27–33]. There are many advantages to introducing a trust mechanism in clustered WSNs [16–20] and selecting a CH to detect failed or malicious nodes in the cluster [34]. In a multi-hop cluster environment [8], the trust mechanism supports the selection of a trusted routing node (usually a CH), and a cluster member (CM) can send the collected data to the CH. In communication between clusters, the trust mechanism also supports the selection of trustworthy routing gateway nodes or other trustworthy CHs through which the sender forwards data to the BS [10]. The BS is a powerful device that can process the information collected from the CM and interact with the user.

However, due to its high resource consumption (such as memory, time, and communication overhead), this makes traditional trust computing solutions developed for wired and wireless ad hoc networks unsuitable for sensor networks. The computing speed and resource-saving problem of a trust system are the most key requirements for resource-constrained WSNs. At the same time, the anti-collaborative attack ability of a trust computing mechanism itself is another challenging issue for any WSN (including clustered WSNs). Currently, there is a lack of a universal trust computing solution designed for clustered WSNs that can simultaneously achieve computing speed, resource efficiency, and resistance to collaborative attacks.

By identifying the inherent relationship among CMs, CHs, and BSs, we propose a fast, resource-saving, and anti-collaborative attack trust computing scheme based on the cross-validation

mechanism. This scheme can effectively eliminate collaborative attacks initiated by large collaborative groups and large-scale malicious nodes. Different from the previous trust computing methods, in the proposed trust mechanism, feedback comes not only from CMs, but also from CHs and BSs. This cross-validation mechanism can effectively reduce malicious feedback and improve system security.

#### *1.2. Main Idea and Contributions*

To the best of our knowledge, this study is the first to construct a fast, resource-saving, and anti-collaborative attack trust computing scheme based on an innovative cross-validation mechanism. Compared with existing methods, the main contributions of this paper are as follows:

Together, these innovative designs made the fast, resource-saving, and anti-collaborative attack trust computing scheme (FRAT) solution a fast, resource-efficient, and cooperative attack-resistant solution that could be used in a clustered WSN environment. This study provided the theoretical basis and experimental results for verifying the design of FRAT. Theoretical analysis and experimental results showed that compared with the existing methods, FRAT had superior performance.

The main contents of the rest of this study are as follows: Section 2 provides an overview of related work. The cross-validation mechanism for trust computing for clustered WSNs is described in Section 3. Section 4 gives the details of the trust scheme in the FRAT scheme. Sections 5 and 6 respectively provide the theoretical and experimental analyses of FRAT. Section 7 is the conclusion of this paper.

#### **2. Related Work**

Desai et al. proposed a trust evaluation method that used node's internal resources to evaluate node-level trust [12]. Using the suggested self-test algorithm, this method helped nodes trust themselves after booting by ensuring reliable system memory. This algorithm was a completely intermediary technology and had nothing to do with the network topology and auxiliary information.

In [18], a group-based trust computing mechanism (GTMS) was proposed for clustered WSNs. Compared with traditional trust schemes that always focus on the trust value of a single node, GTMS evaluates the trust of a group of nodes. This approach provides a benefit to WSNs, which requires less memory to store trust records on each node. GTMS helps to reduce the costs associated with trust evaluation of remote nodes significantly.

In [34], a belief-based trust evaluation mechanism (BTEM) was developed for wireless sensor networks. The proposed mechanism could resist against various network attacks such as on-off attacks, bad-mouth attacks, and DoS (denial of service) attacks. Simulation-based experimental results showed that the trust mechanism could not only successfully identify and isolate malicious nodes to a certain extent, but also improve the detection rate of malicious behaviors.

In [37], a trust-based cluster head (CH) election mechanism (TCHEM) was proposed. Its basic framework was proposed based on the clustered network model. In this network collaboration model, all nodes had unique local IDs. This method could reduce the possibility of malicious or damaged nodes becoming CHs. This mechanism discouraged sharing trust information between sensor nodes. Therefore, this method reduced the impact of cooperative attacks.

In [36], a trust and reputation scheme (ATRM) based on a distributed agent mechanism was proposed for WSNs. With the help of a mobile agent running on each network node, ATRM collects trusted information and calculates the node's trust. The benefits of local management schemes for trust and reputation are that there is no need for a centralized repository, and the node itself can provide its own reputation information when needed. As a result, there are no network-wide floods or acquisition delays when performing reputation calculations and propagation.

In [35], the authors proposed a robust trust-aware routing framework (TARF) for dynamic WSNs. Because there was no consideration of tight time synchronization, TARF provided a reliable and energy-saving trust scheme. Facts have proven that TARF could effectively prevent harmful attacks due to identity spoofing; through simulation and empirical experiments on large WSNs in various scenarios including mobile and RF shielded network conditions, verifying the flexibility of TARF through extensive evaluation. In addition, the authors implemented a low-overhead TARF module. This implementation could be incorporated into existing routing protocols with minimal changes.

In [10], the authors proposed LDTS, a lightweight and highly reliable trust system for collecting data through wireless sensor networks. First, a lightweight trust decision scheme based on node identity (role) in a clustered wireless sensor network was proposed. This scheme is suitable for such wireless sensor networks because it is conducive to energy saving. Because feedback between cluster members (CM) or the cluster head (CH) is eliminated, this method can greatly improve system efficiency while reducing attacks on the system by malicious nodes. Considering that the CH undertook a large number of data forwarding and communication tasks, this study defined the cooperation of reliability enhancement trust assessment methods between CHs. This method could effectively reduce the network consumption caused by malicious or selfish CHs.

The research on the trust mechanism for WSNs has received extensive attention from scholars. In WSNs, how to identify malicious nodes accurately is a challenging problem that has aroused widespread concern in academia and industry. Table 1 concludes about the features of the trust computing mechanism for WSNs mentioned. From Table 1, we can find that, in view of the security and trustworthiness of WSNs, some feasible and rich solutions were proposed [10,12,18,34–37], but an efficient trust computing mechanism designed for clustered WSNs from the simultaneous achievement of overhead-saving and anti-collaborative attack ability is still necessary.

**Table 1.** The comparison of the trust computing mechanisms for WSNs. FRAT, fast, resource-saving, and anti-collaborative attack trust computing scheme.

#### **3. Cross-Validation Mechanism for Trust Computing**

In this section, we first present the conceptual model and formal definitions based on the cross-validation mechanism, which is employed by FRAT. We then establish a trustworthy clustered WSN environment based on the trust relationship among network entities (CMs, CHs, and BSs). We will also analyze possible attack patterns that threaten to build trust relationships.

#### *3.1. Three-Tier Network Architecture Model*

The clustering algorithm provides one of the most feasible solutions for communication in WSNs due to its inherent resource-saving characteristics and its suitability for highly scalable networks. The FRAT solution is based on a clustered WSN with a backbone, and its core function is to build a reliable and efficient data aggregation network.

As shown in Figure 1, according to its characteristics, the nodes in a clustered WSN environment can be identified as the CH or CM [10]. The CM in the cluster can communicate directly with its CH. The communication between the CM and the BS can only be performed through the CH. In each cluster, only the CH can forward data directly to the BS. The CH collects, aggregates, and forwards data from the CM to the BS. The BS, CH and CM form a three-layer network architecture model (Figure 1).

**Figure 1.** Three-tier network architecture model, in which a member can be identified as a BS, a CH, or a CM according to their features.

One of the key tasks of this study is to construct a trust-based network topology model that can reduce the possibility of malicious members being selected as cooperative partners in data forwarding. Through the cooperation of other CHs, one CH can forward the collected data to the central BS node. It was assumed that the members were divided into multiple clusters based on existing clustering

algorithms, such as [8,10]. We also assumed that each node had a unique ID, which could be used to distinguish it from other nodes, similar to the assumptions in [18,34,37]. Once the cluster was formed, they would maintain the same CMs unless a CM was blacklisted or dead or a new node joined the sensor network.

#### *3.2. Formal Definitions of Trust Based on Cross-Validation*

Based on the inherent relationship among CMs, CHs, and BSs, this paper first systematically studies and constructs a cross-validation trust computing scheme for clustered WSN environment. In Figure 2, following the functions of the network nodes in the cluster WSN, a total of three network entities exists, namely CMs, CHs, and BSs. Thus, a total of three collaborative groups can be formed: a CM group ({*CM*1, *CM*2, ··· , *CMi*, ··· , *CMI*}, where *i* is the unique identity of a CM, *I* is the total number of CM nodes in the system); a CH group ({*CH*1, *CH*2, ··· , *CHj*, ··· , *CHJ*}, where *j* is the unique identity of a CH, *J* is the total number of CHs); and a BS group ({*BS*1, *BS*2, ··· , *BSk*, ··· , *BSK*}, where *k* is the unique identity of a BS, *K* is the total number of BSs). There are two basic trust relationships between these network entities. One is the trust relationship between two CMs. This is the most basic trust relationship in a clustered WSN environment [12]. The other is the trust relationship between two CHs, and this is a special trust relationship in the clustered wireless sensor network environment. This is a crucial factor in encouraging cooperation between CHs and is highly important in successfully deploying a trustworthy clustered WSN. Referring to the methods in [10,33,38], we then provide the cross-validation definitions of the trust relationship used in the clustered WSN environment.

**Figure 2.** Cross-validation mechanism for trust computing based on the three-tier network architecture model.

The main innovation of the cross-validation approach is embodied in the following two aspects:

in a set and the mean of the set [40]. Different from traditional methods, our mechanism based on the theory of deviation analysis is a cross-validated trust calculation mechanism based on multiple trust factors (in CM-level trust computing, including CM-to-CM direct trust, CM-to-CM feedback, and CH-to-CM feedback; in CH-level trust computing, including CH-to-CH direct trust, CH-to-CH feedback, and BS-to-CH feedback). The trust factor with a larger deviation compared with the other two values is eliminated from the overall trust aggregation process. At the same time, this removal solves the adaptive aggregation problem caused by malicious nodes (malicious CMs or CHs).

**Definition 1.** *Trust relationship between two CMs based on the cross-validation mechanism (called CM-to-CM overall trust). The CM-to-CM overall trust is a quantifiable value of the competence of another CM (the CM to be evaluated) to complete the task of the CM, based on the CM's direct evaluation and the feedback of CHs and other CMs. As the CH feedback information is integrated into CM-to-CM overall trust computing, this CM-to-CM overall trust computing approach is a cross-validation mechanism.*

Definition 1 and Figure 2 shows that the overall trust degree from CM to CM is the result of fusion calculation through three trust factors, namely CM-to-CM direct evaluation, CH-to-CM feedback, and CM-to-CM feedback. Due to feedback from two sources, this trust computing approach is called the cross-validation mechanism. In traditional feedback-based trust calculation mechanisms, such as in [12], feedback information mainly comes from the CMs, which could cause many problems, such as malicious attacks and coordinated deception. In a clustered WSN, a CH is usually selected by CMs according to its reliability, such as power, data forwarding success rate, and trust. Thus, feedback from the CHs should have higher reliability. From this point of view, the cross-validation mechanism can minimize system risks and improve the security of clustered WSNs.

**Definition 2.** *Trust relationship between two CHs based on the cross-validation mechanism (called CH-to-CH overall trust). The CH-to-CH overall trust is a a quantifiable value in the judgment of another CH (the CH to be evaluated) to complete the task of the CH, based on the CH's direct evaluation, and the feedback of BSs and other CHs (as the BS feedback information is integrated into CH-to-CH overall trust calculation, this CH-to-CH overall trust computing approach is a cross-validation mechanism).*

Similar to CM-to-CM overall trust, the overall trust of CH-to-CH is the result of aggregation calculation through three trust factors, namely CH-to-CH direct evaluation, CH-to-CH feedback, and BS-to-CH feedback. To integrate more reliable feedback from BSs, existing BS equipment is usually managed by a reputable ISP. The CH-to-CH overall trust is significantly enhanced. In addition, the basic function of BSs allows for dynamic monitoring of the forwarding behavior of CHs. Thus, each BS could provide feedback based on real monitoring data, which could then partly solve the problem of malicious feedback from CHs.

**Definition 3.** *Feedback between two CMs or between two CHs (called CM-to-CM feedback or CH-to-CH feedback). Feedback between two CMs (or between two CHs) is a rating based on the CM or CH history behavior. After the data forwarding task is completed, the CM or CH will calculate the real-time trust. When another CM or CH requests it, the CH provides the value to the requester.*

**Definition 4.** *Feedback of a CH to a CM (called CH-to-CM feedback). CH's feedback on the CM is an objective rating based on the historical behavior of the CM. A CH dynamically monitors the CM behavior during the data forwarding. After the data forwarding task is completed, the CH calculates the real-time trust of the CM. When another CM requests it, the CH provides the value to the requester.*

**Definition 5.** *Feedback of a BS to a CH (called BS-to-CH feedback). BS's feedback on the CH is an objective evaluation based on the historical behavior of the CH. A BS dynamically monitors the CH behavior*

#### *during the data forwarding. After the data forwarding task is completed, the BS will calculate the real-time trust of the CH. When another CH requests it, the BS provides the value to the requester.*

According to Definitions 1 and 2, the FRAT scheme needs to maintain two levels of trust relationship: CM-to-CM overall trust and *CH-to-CH* overall trust. In this paper, CM-to-CM overall trust is represented by *TCMx*,*CMy* (Δ*t*), and CH-to-CH overall trust is represented by *TCHi*,*CHj* (Δ*t*). Since trust is a dynamic value that changes over time, we added a timestamp *Deltat* to the expression. Likewise, the FRAT scheme needs to maintain four levels of feedback relationship: (1) feedback between a CM and a CM, (2) feedback of a CH to a CM, (3) feedback of a CH to a CH, and (4) feedback of a BS to a CH. We use *FCMx*,*CMy* (Δ*t*) to represent CM-to-CM feedback (use *FCHi*,*CHj* (Δ*t*) to represent *CH-to-CH* feedback), *FCHi*,*CMx* (Δ*t*) to represent *CH-to-CH* feedback, *FCHi*,*CHj* (Δ*t*) to represent *CH-to-CH* feedback, and *FBSz*,*CHj* (Δ*t*) to represent *BS-to-CH* feedback. *DCMx*,*CMy* (Δ*t*) and *DCHi*,*CHj* (Δ*t*) are the direct trust between two CMs or CHs. These are different from traditional trust computing methods (such as LDTS [10], GTMS [18], DST [19], BTEM [34], ATRM [36], and TCHEM [37]), in which the feedback comes from a single source. In summary, in the proposed FRAT scheme, the feedback information comes from multiple mutual cross-validation sources. Three types of feedback relationship form a cross-validation mechanism, and this mechanism has a protective ability against collaborative attacks caused by malicious nodes through the theory of deviation analysis.

To clarify the cross-validation mechanism, we provide the following example. Consider the case in Figure 3, where CM-to-CM overall trust is computed based on the cross-validation mechanism. In this case, if CM1 wants to compute the overall trust of CM2, CM1 first asks for the feedback of CM2 in two ways (CMs and its CH). When the CM transmits data, all other CMs in the cluster are listening. Each CM can hear the transmission of all other CMs within its broadcast range, and these CMs are generally neighbor nodes. The neighbor nodes of CM1 (including CM3, CM4, and CM5) will send their feedback to CM1 (including *FCM*3,*CM*<sup>2</sup> (Δ*t*), *FCM*4,*CM*<sup>2</sup> (Δ*t*), and *FCM*5,*CM*<sup>2</sup> (Δ*t*)). The CH1 will send its feedback *FCH*1,*CM*<sup>1</sup> (Δ*t*) to CM1. Then, integrating its direct trust *DCM*1,*CM*<sup>2</sup> (Δ*t*), CM1 can obtain an overall trust *TCM*1,*CM*<sup>2</sup> (Δ*t*) for CM2 based on a fusion calculation method. CM-to-CM direct trust, CM-to-CM feedback, and CH-to-CM feedback constitute a cross-validation relationship.

**Figure 3.** CM-to-CM overall trust computing based on the cross-validation mechanism. CM-to-CM direct trust, CM-to-CM feedback, and CH-to-CM feedback constitute a cross-validation relationship.

A similar example of CH-to-CH overall trust computing based on the cross-validation mechanism is depicted in Figure 4. We can easily understand how to compute the overall trust in the CH-to-CH case from the CM-to-CM overall trust example in Figure 3. In this case, if CH1 needs to compute the overall trust of CH4 (CH1-to-CH4 overall trust *TCH*1,*CH*<sup>4</sup> (Δ*t*)), CH1 will ask for the feedback of CM4 in two ways (CHs and its BS). In the case of Figure 4, CH2 and CH3 provide their CH-to-CH feedback *FCH*2,*CH*<sup>4</sup> (Δ*t*) and *FCH*3,*CH*<sup>4</sup> (Δ*t*) to CH1, and BS1 provides its BS-to-CH feedback *FBS*1,*CH*<sup>4</sup> (Δ*t*) to CH1. At the same time, CH1 needs to compute the direct trust of CH4 (CH1-to-CH4 direct trust

*DCH*1,*CH*<sup>4</sup> (Δ*t*)). After the collection of trust information, CH1 uses the theory of standard deviation analysis to perform the fusion calculation of overall trust *TCH*1,*CH*<sup>4</sup> (Δ*t*).

In the proposed FRAT scheme, evaluation methods are different for these trust (or feedback) relationships. Both *TCMx*,*CMy* (Δ*t*) and *TCHi*,*CHj* (Δ*t*) are trust decision credentials (or trust authorization credentials), and they can directly act as authorization credentials for node selection in data aggregation, fusion, and higher level transmission. However, *DCMx*,*CMy* (Δ*t*), *DCHi*,*CHj* (Δ*t*), *FCMx*,*CMy* (Δ*t*), *FCHi*,*CHj* (Δ*t*), *FCHi*,*CMx* (Δ*t*), and *FBSz*,*CHj* (Δ*t*) are trust evaluation factors. Each of these factors is one-sided and cannot fully reflect the interactive relationship of nodes in the entire system. Therefore, these factors cannot act as the authorization credential directly. We need to perform fusion calculations on these trust factors in order to obtain a more adequate and accurate overall trust. As mentioned in Section 1, in terms of accuracy, calculation speed, storage overhead, and communication overhead, the trust mechanism should be fast and resource-saving in order to provide services for a large number of resource-constrained nodes. In this work, we propose a series of fast and resource-saving trust computing methods for cooperation between CMs or between CHs. The calculation methods for these nodes' trust (or feedback) relationships are introduced in Section 4.

**Figure 4.** CH-to-CH overall trust computing based on the cross-validation mechanism. CH-to-CH direct trust, CH-to-CH feedback, and BS-to-CH feedback also constitute a cross-validation relationship.

The content of the feedback mainly includes three types of trust, that is the CM-to-CM overall trust degree, or CH-to-CM feedback trust, or CH-to-CH overall trust degree. In Sections 4.1and 4.2, we introduce the calculation methods of these three types of trust. According to the calculation methods in Sections 4.1 and 4.2, the information transmitted during feedback should be a positive integer between one to 10.

#### *3.3. Attack Pattern Analysis in the FRAT Scheme*

In a clustered WSN, the ultimate goal of a trust system is to obtain accurate and reliable functionality against selfish or collaborative network attacks [10]. An effective trust computing system should have a good defense against malicious attacks, that is it should be able to resist selfish or cooperative attacks from the CH and CM. In a clustered WSN environment, network attacks may originate from both malicious CHs and CMs [41].

**Definition 6.** *Collaborative attacks from CMs or CHs. As long as feedback is considered, a malicious CM or CH will provide dishonest feedback to structure a good CM or CH and/or increase the trust of its stakeholders. This type of attack is called a collaborative attack and is the most direct type of attack in a clustered WSN environment.*

The feedback from the cooperative nodes may produce incorrect trust evaluation results and how to adopt a defense mechanism to prevent cooperative attacks by malicious nodes is the key task of

this work. After determining the attack methods of malicious nodes, we can create an effective trust calculation method to prevent malicious entities from achieving their goals by evaluating the behavior of malicious entities, thereby resisting such attacks. However, directly identifying collaborative attacks is a daunting task. In this study, we adopt an adaptive fusion computing method to eliminate false feedback based on the theory of bias analysis, in which the three trust factors are further cross-validated with each other. Compared with the traditional method, our mechanism based on the theory of bias analysis is a cross-validation trust computing mechanism. Compared with the other two values, the biased feedback is eliminated from the entire trust aggregation process.

#### **4. Trust and Feedback Calculation in FRAT**

As shown in Figures 2–4, there are two types of direct trust relationship and four types of indirect feedback relationship in the clustered WSN environment. These trust factors have different computing systems because their attributes are completely different. In this section, we introduce related computing mechanisms for these trust factors.

#### *4.1. CM-to-CM Overall Trust Calculation*

**CM-to-CM direct trust calculation.** As mentioned earlier, the problem of saving overhead is the most basic WSN that requires resource constraints. In probability theory and statistics, the beta distribution is a series of continuous probability distributions defined on the interval [0, 1]. It is parameterized by two positive shape parameters, which are indexed by random variables. The form appears and controls the shape of the distribution. In [42], a beta trust system based on statistical theory was proposed. The system had the characteristics of flexibility and high resource efficiency. Inspired by the innovative work in [10,42], we used an improved betaprobability density function to calculate the CM's direct trust in the CM. The direct trust calculation on the CM is defined by the following formula:

$$\begin{aligned} &D\_{\text{CM}\_x,\text{CM}\_y}(\Delta t) \\ &= \left[10 \times E(\varphi(p|S\_{\text{CM}\_x,\text{CM}\_y}(\Delta t), \text{UL}\_{\text{CM}\_x,\text{CM}\_y}(\Delta t)))\right] \end{aligned} \tag{1}$$

where Δ*t* is a time window. The length Δ*t* can be shorter or longer depending on the network analysis scheme. Therefore, as time goes by, the window forgets the old experience, but adds new experiences. The operation · is the closest integer function, such that 0.82148 = 8. The symbol *p* reflects the posterior probability of the binary event (*SCMx*,*CMy* (Δ*t*), *UCMx*,*CMy* (Δ*t*)), and *SCMx*,*CMy* (Δ*t*) is the total number of successful data communications between nodes *CMx* with *CMy* during time Δ*t*. *UCMx*,*CMy* (Δ*t*) is the total number of unsuccessful data communications between nodes *CMx* with *CMy* during time Δ*t*. *E*(*ϕ*(*p*|*SCMx*,*CMy* (Δ*t*), *UCMx*,*CMy* (Δ*t*))) is the expected probability of the beta distribution *ϕ*(*p*|*SCMx*,*CMy* (Δ*t*), *UCMx*,*CMy* (Δ*t*)):

$$\begin{aligned} \left\lceil \left[ E\left( \varphi(p|\mathrm{S}\_{\mathrm{CM}\_{x}\mathrm{CM}\_{y}}(\Delta t), \mathrm{l}\mathrm{L}\_{\mathrm{CM}\_{x}\mathrm{CM}\_{y}}(\Delta t) \right) \right] \right. \\ \left. = \left[ \frac{10 \times \left( \mathrm{S}\_{\mathrm{CM}\_{x}\mathrm{CM}\_{y}}(\Delta t) + 1 \right)}{\mathrm{S}\_{\mathrm{CM}\_{x}\mathrm{CM}\_{y}}(\Delta t) + a \ast \mathrm{l}\mathrm{L}\_{\mathrm{CM}\_{x}\mathrm{CM}\_{y}}(\Delta t) + 2} \right] \end{aligned} \tag{2}$$

where positive integer *α* ∈ [1 − *N*] is a punitive factor that reflects the punitive nature of failed interactions. In special cases, if *SCMx*,*CMy* (Δ*t*) + *UCMx*,*CMy* (Δ*t*) = 0, which denotes no interactions between node *CMx* with *CMy* during time Δ*t*. According to Equation (1), the value of *DCMx*,*CMy* (Δ*t*) = 5. If *SCMx*,*CMy* (Δ*t*) = 0 and *UCMx*,*CMy* (Δ*t*) = 0, then the value of *DCMx*,*CMy* (Δ*t*) is a positive increasing value with the increase in the number of successful interactions. Figure 5 depicts the evolution trend of CM-to-CM direct trust. We can observe that the value of CM-to-CM direct trust quickly reduces with the increase in the number of failed interactions, which reflects the strictly punitive nature of the proposed trust mechanism for the failure of interactions.

(**a**) The number of unsuccessful interactions is 0 to 5, and that of successful interactions is 0 to 80. (**b**) The number of unsuccessful interactions is 0 to 20, and that of successful interactions is 0 to 80.

(**c**) The number of unsuccessful interactions is 0 to 40, and that of successful interactions is 0 to 80.

**Figure 5.** The value of CM-to-CM direct trust with penalty factor *α* = 4.

Compared with the original method proposed by [42], the main difference of the improved beta probability density function is the penalty factor *α* to be introduced. If *α* = 1, then our approach falls back to [42]. In *α* > 1, then our approach reflects the punitive nature of the failure of interaction. We use Figure 6 for quantitative analysis of CM-to-CM direct trust under different values of penalty factor *α*. In Figure 6, *S*is the number of successful interactions, and *U*is the number of unsuccessful interactions. From Figure 6, the value of CM-to-CM direct trust shows a downward trend with increasing *α*, which reaches our design goal for punishment of failed interactions. In WSN systems with high security requirements, we should choose the value of *α* to approach 10.

**CM-to-CM feedback calculation.** As mentioned earlier, feedback is an important task for both CMs and CHs. It also provides information and key performance indicators for trust assessment. There are many collaborative CMs in a clustered WSN environment, and the feedback from these CMs is considered as a social rating and should have a high reference value for node trust evaluation. We used the improved beta probability density function with a strict punitive nature to compute *FCMx*,*CMy* (Δ*t*). As a result, the calculation efficiency was improved.

$$F\_{\rm CM\_x, CM\_y}(\Delta t) = \left\lceil \frac{10 \ast (\S(\rm CM\_y) + 1)}{(\S(\rm CM\_Y) + a \ast \gamma(\rm CM\_Y) + 2)} \right\rceil \tag{3}$$

where the positive integer *α* ∈ [1 − *N*] is a penalty factor, which reflects the penalty nature for malicious feedback. *ξ*(*CMy*) is the number of positive feedbacks (>0.5) toward *CMy* from other CMs in the cluster, whereas *γ*(*CMy*) is the number of negative feedbacks (<0.5) from other CMs.

**Figure 6.** Analysis of CM-to-CM direct trust under different values of *α*.

**CH-to-CM feedback calculation.** As shown in Figure 3, different from CM-to-CM feedback, the CH-to-CM feedback is a value based on the CH rating. We assumed that *I* CMs existed in a cluster. The CH would broadcast request packets in the cluster periodically. In response, all CMs in the cluster would forward their direct trust values to other CMs to the CH. CHs would then maintain these trust values in the matrix *fCHi* , as follows:

$$f\_{\mathbb{C}H\_{i}} = \begin{pmatrix} D\_{\mathbb{C}M\_{1},\mathbb{C}M\_{1}} & D\_{\mathbb{C}M\_{1},\mathbb{C}M\_{2}} & \cdots & D\_{\mathbb{C}M\_{1},\mathbb{C}M\_{l}} \\ D\_{\mathbb{C}M\_{2},\mathbb{C}M\_{1}} & D\_{\mathbb{C}M\_{2},\mathbb{C}M\_{2}} & \cdots & D\_{\mathbb{C}M\_{2},\mathbb{C}M\_{l}} \\ & & & \ddots & \\ & & & \ddots & \\ D\_{\mathbb{C}M\_{l},\mathbb{C}M\_{1}} & D\_{\mathbb{C}M\_{l},\mathbb{C}M\_{2}} & \cdots & D\_{\mathbb{C}M\_{l},\mathbb{C}M\_{l}} \end{pmatrix} \tag{4}$$

where *DCMi*,*CMy* (*i* ∈ [1, *I*], *y* ∈ [1, *I*]) is the direct trust of a network member *CMi* for *CMy*. In addition, if *i* = *y*, this means that the value is the node's feedback for itself. In this study, an improved beta probability density function is used to calculate *FCHi*,*CMy* (Δ*t*).

$$F\_{\rm CH\_{\tiny{j}}\complement\mathcal{M}\_{\rm{x}}}(\Delta t) = \left\lceil \frac{10\*(\mathcal{g}(\rm{CM}\_{\rm{Y}})+1)}{(\mathcal{g}(\rm{CM}\_{\rm{Y}})+a\*b(\rm{CM}\_{\rm{Y}})+2)} \right\rceil \tag{5}$$

where positive integer *α* ∈ [1 − *N*] is the penalty factor, which reflects the penalty function of malicious feedback. *g*(*CMy*) is the number of positive feedbacks (>0.5) toward *CMy* from other CMs in the cluster, whereas *b*(*CMy*) is the number of negative feedbacks (<0.5) from other CMs. Analyzing Equations (4) and (5), we find that both feedback aggregation mechanisms are resource-saving methods with simple formulas and are suitable for resource-constrained wireless sensor networks with large sensor nodes.

The feedback value is a positive integer between one and 10. Thus, we can define how a CH/CM detects that a received feedback is positive or negative. If the value is less than or equal to five, we consider this feedback to be negative. If the value is more than five, we consider this feedback to be positive.

**CM-to-CM overall trust aggregating calculation based on standard deviation analysis.** As indicated in Definition 1, the *CM-to-CM* overall trust is evaluated based on three factors: *DCMx*,*CMy* (Δ*t*), *FCMx*,*CMy* (Δ*t*), and *FCHi*,*CMy* (Δ*t*). Therefore, aggregating these trust factors into a single value in an unbiased manner is a challenging problem. In statistics, standard deviation analysis means the absolute

difference between any number in a set and the mean of the set [39,40]. The basic idea of standard deviation analysis is (1) to eliminate the number with a larger deviation than the other numbers and (2) to calculate the average of the remaining numbers.

We suppose that *μ*(Δ*t*) is the summation value of the three trust factors at time stamp Δ*t*. *fmax*(Δ*t*) is the maximum value of the three trust factors at time stamp Δ*t*. *fmin*(Δ*t*) is their minimum value at the same time stamp Δ*t*. *γ*(Δ*t*) is the average value of the three trust factors. Then, the standard deviation of the three trust factors is defined as follows:

$$\delta(\Delta t) = \sqrt{\Omega(\Delta t)/3} \tag{6}$$

$$\Omega(\Delta t) = (D\_{\mathbb{C}M\_x, \mathbb{C}M\_y}(\Delta t) - \gamma(\Delta t))^2 + \tag{6}$$

$$\begin{aligned} & \quad (F\_{\mathbb{C}M\_x, \mathbb{C}M\_y}(\Delta t) - \gamma(\Delta t))^2 + \\ & \quad (F\_{\mathbb{C}H\_t, \mathbb{C}M\_y}(\Delta t) - \gamma(\Delta t))^2 \end{aligned} \tag{7}$$

From a statistical perspective, the standard deviation of a dataset is a measure of the amount of deviation between the observations contained in the dataset. Relying on the theory of bias analysis, we adopted an aggregation method for the overall trust, which could overcome the limitations of the traditional trust computing system [39,40]. The traditional trust mechanism weighs the attributes of the trust manually or subjectively.

$$T\_{\complementM\_x, \complementM\_y}(\Delta t) = \begin{cases} \frac{\mu(\Delta t) - f\_{\text{max}}(\Delta t)}{2}, f\_{\text{max}}(\Delta t) > \left(\gamma(\Delta t) + \delta(\Delta t)\right) \\\frac{\mu(\Delta t) - f\_{\text{min}}(\Delta t)}{2}, f\_{\text{min}}(\Delta t) < \left(\gamma(\Delta t) - \delta(\Delta t)\right) \\\gamma(\Delta t) \end{cases} \tag{7}$$

Compared with the traditional methods, our mechanism in Equation (7) performs adaptive trust calculation. The trust factor with a larger deviation compared with the other two values is eliminated from the overall trust aggregation process using Equations (5), (6), and (7). This removal solves the adaptive aggregation problem caused by collaborative attack CMs.

#### *4.2. CH-to-CH Overall Trust Calculation*

**CH-to-CH direct trust calculation.** We used a similar mechanism to calculate the direct trust from CH-to-CH, that is the direct trust from CM-to-CM. The direct trust assessment method on CHs is defined by the following formula:

$$D\_{CH\_i,CH\_j}(\Delta t) = \left\lceil \frac{10 \times (\psi\_{CH\_i,CH\_j}(\Delta t) + 1)}{\psi\_{CH\_i,CH\_j}(\Delta t) + a \ast \beta\_{CH\_i,CH\_j}(\Delta t) + 2} \right\rceil \tag{8}$$

where *α* ∈ [1 − *N*] is a penalty factor. Δ*t* is a window of time. *ψCHi*,*CHj* (Δ*t*) is the total number of successful data forwards. *βCHi*,*CHj* (Δ*t*) is the total number of unsuccessful data forwards of node *CHi* with *CHj* during time Δ*t*.

**CH-to-CH feedback calculation.** In this study, we use an improved beta probability density function to calculate *FCHi*,*CMj* (Δ*t*).

$$F\_{CH\_i,CM\_j}(\Delta t) = \left\lceil \frac{10 \ast (\varpi(\text{CH}\_j) + 1)}{(\varpi(\text{CH}\_j) + \mathfrak{a} \ast \theta(\text{CH}\_j) + 2)} \right\rceil \tag{9}$$

where *α* ∈ [1 − *N*] is a penalty factor. (*CHj*) is the number of positive ratings (>0.5) toward *CHj* from other CHs, whereas *θ*(*CHj*) is the number of negative ratings (<0.5) from other CHs.

**BS-to-CH feedback calculation.** As shown in Figure 4, the BS-to-CH feedback is a value based on the BS rating. We assumed the existence of *J* CHs that interacted with a BS. The BS periodically broadcast the request packet for feedback. In response, all CHs forwarded their direct trust values to other CHs to the BS. The BS then maintained these trust values in the matrix *cCHi* :

$$h\_{CH\_i} = \begin{pmatrix} D\_{CH\_1, CM\_1} & D\_{CH\_1, CM\_2} & \cdots & D\_{CH\_1, CM\_f} \\ D\_{CH\_2, CM\_2} & D\_{CH\_2, CM\_2} & \cdots & D\_{CH\_2, CM\_f} \\ & & \ddots & \\ & & D\_{CH\_f, CM\_f} & \ddots & \\ & & D\_{CH\_f, CM\_f} & \cdots & D\_{CH\_f, CM\_f} \end{pmatrix} \tag{10}$$

where *DCHi*,*CHj* (*i* ∈ [1, *J*], *j* ∈ [1, *J*]) is the direct trust of node *CHi* for *CHj*. In this study, we use an improved beta probability density function to calculate *FBSz*,*CHj* (Δ*t*).

$$F\_{\rm BS\_z,CH\_j}(\Delta t) = \left\lceil \frac{10 \ast (o(CH\_j) + 1)}{(o(CH\_j) + a \ast p(CH\_j) + 2)} \right\rceil \tag{11}$$

where *α* ∈ [1 − *N*] is the penalty factor. *o*(*CHj*) is the number of positive ratings (>0.5) toward *CMy* from other CHs, whereas *p*(*CHj*) is the number of negative ratings (<0.5) from other CHs.

**CH-to-CH overall trust aggregating calculation based on standard deviation analysis.** We used an aggregation method for overall trust based on deviation analysis theory, which could overcome the limitations of traditional trust computing mechanisms where trusted attributes were weighted manually or subjectively [39]. We supposed that *v*(Δ*t*) was the summation value of the three trust factors (*DCHi*,*CHj* (Δ*t*), *FCHi*,*CHj* (Δ*t*), and *FBSz*,*CHj* (Δ*t*)) at time stamp Δ*t*. *smax*(Δ*t*) is the maximum value; *smin*(Δ*t*) is its minimum value; and *ρ*(Δ*t*) is the average value. The standard deviation of the three trust factors is defined as follows:

$$\begin{aligned} \omega(\Delta t) &= \sqrt{\Psi(\Delta t)/3} \\ \Psi(\Delta t) &= (D\_{CH\_i,CH\_j}(\Delta t) - \rho(\Delta t))^2 + \\ &\qquad (F\_{CH\_i,CH\_j}(\Delta t) - \rho(\Delta t))^2 + \\ &\qquad (F\_{BS\_z,CH\_j}(\Delta t) - \rho(\Delta t))^2 \end{aligned} \tag{12}$$

Then, the overall trust degree based on deviation analysis is defined as follows:

$$T\_{\mathcal{C}H\_{i}\mathcal{CH}\_{\!}}(\Delta t) = \begin{cases} \frac{\frac{\upsilon(\Delta t) - s\_{\text{max}}(\Delta t)}{2}, s\_{\text{max}}(\Delta t) > \left(\rho(\Delta t) + \omega(\Delta t)\right)}{\frac{\upsilon(\Delta t) - s\_{\text{min}}(\Delta t)}{2}, s\_{\text{min}}(\Delta t) < \left(\rho(\Delta t) - \omega(\Delta t)\right)}\\ \qquad \rho(\Delta t) & \text{, otherwise} \end{cases} \tag{13}$$

This trust aggregation in Equation (13) is an adaptive trust calculation mechanism. The trust factor with a larger deviation compared with the other two values is eliminated from the overall trust aggregation process using Equations (12) and (13).

#### **5. Performance Analysis**

In this section, we analyze the proposed trust mechanism from three aspects: (1) the attacker's ability to resist collaborative attacks and the trust computing scheme itself, (2) time complexity, and (3) communication overhead (the latter two can reflect the computing speed and resource efficiency of the trust computing solution).

#### *5.1. Time Complexity Analysis*

We took some resource-saving steps to calculate the trust value between nodes, which was suitable for WSNs because it helped to save resources. In addition, we used an improved beta probability density function to calculate the overall trust value. It was found that this mechanism was a method to save resources and was suitable for resource-constrained nodes in large-scale sensor networks. Because the calculation of all these trust factors was a statistical operation, the computational overhead of the calculation could be ignored.

**Theorem 1.** *Using the proposed trust evaluation scheme, the total time complexity of CM-to-CM overall trust computing was no more than O*(*g*) + *O*(*m*) + *O*(*k*) + *O*(1)*.*

**Proof.** In the period of CM-to-CM direct trust calculation (from Equation (1) to Equation (2)), the time complexity is *O*(*g*), and *g* = *SCMx*,*CMy* (Δ*t*)+*UCMx*,*CMy* (Δ*t*). In the period of CM-to-CM feedback calculation (Equation (3)), the time complexity is *O*(*m*) and *m* = *ξ*(*CMy*) + *γ*(*CMy*). In the period of CH-to-CM feedback calculation (from Equation (4) to Equation (5)), the time complexity is *O*(*k*) and *k* = *g*(*CMy*) + *b*(*CMy*). In the period of CM-to-CM overall trust aggregating calculation (from Equation (6) to Equation (7)), the time complexity is *O*(1). Thus, the time complexity is *O*(*g*) + *O*(*m*) + *O*(*k*) + *O*(1).

**Theorem 2.** *Based on the proposed trust evaluation scheme, the total time complexity of CH-to-CH overall trust computing was no more than O*(*q*) + *O*(*w*) + *O*(*r*) + *O*(1)*.*

**Proof.** In the period of CH-to-CH direct trust calculation (Equation (8)), the time complexity is *O*(*q*) and *q* = *ψCHi*,*CHj* (Δ*t*) + *βCHi*,*CHj* (Δ*t*). In the period of CH-to-CH feedback calculation (Equation (9)), the time complexity is *O*(*w*) and *w* = (*CHj*) + *θ*(*CHj*). In the period of CS-to-CH feedback calculation (from Equation (10) to Equation (11)), the time complexity is *O*(*r*) and *r* = *o*(*CHj*) + *p*(*CHj*). In the period of CH-to-CH overall trust aggregating calculation (from Equation (12) to Equation (13)), the time complexity is *O*(1). Thus, the time complexity is *O*(*q*) + *O*(*w*) + *O*(*r*) + *O*(1).

In the period of trust factor measurement based on improved beta probability density functions (from Equation (1) to Equation (13)), the computing time complexity was no more than *O*(*g*) + *O*(*m*) + *O*(*k*) + *O*(1) (or *O*(*q*) + *O*(*w*) + *O*(*r*) + *O*(1)), which showed that the computing complexity of the proposed trust computing scheme was far superior to those of some existing schemes, such as the fuzzy-based trust models [11]), whose time complexity was *O*(*n*3*log*2*n*). In traditional trust computing schemes, if *n* → ∞, trust aggregation calculations would become extremely slow. In this study, we used a time-saving computer system that greatly increased the speed of trust calculation, which made the trust calculation scheme very suitable for large WSNs.

#### *5.2. Communication Overhead Analysis*

In order to analyze the communication overhead of the FRAT mechanism under full load conditions, we assumed that in the worst case, each CM wanted to communicate with other CMs in the cluster and each CH wanted to communicate with other CHs in the cluster. In addition, each CH needed to collect feedback from other CMs, and the BS must collect feedback reports from other CHs.

**Theorem 3.** *Supposed that the network consists of J clusters and that the average size of clusters is I (including the CH of the cluster). Based on the proposed trust computing scheme, the maximum communication overhead is:* <sup>2</sup>*I*<sup>2</sup> + <sup>2</sup>*J*<sup>2</sup> + <sup>2</sup>*<sup>I</sup>* ∗ *J.*

**Proof.** (1) From Figure 3, in the cross-validation-based CM-to-CM overall trust calculations, feedback came from three sources. First, when node *CMi* wanted to collect feedback from node *CMx*, the node *CMi* sent at most one CM feedback request, and this node *CMi* received a response. Second, *CMi* sent a feedback request to its CH and obtained feedback from the CH. Finally, *CMi* used its self-feedback information, which required no communication overhead. Therefore, if node *CMi* wanted to collect feedback from all nodes in the cluster, the maximum communication overhead became 2[(*I* − 1) + 1] = 2*I*. If all nodes wanted to transfer data to each other, the maximum communication overhead was 2*<sup>I</sup>* ∗ *<sup>I</sup>* = <sup>2</sup>*I*2.

(2) From Figure 3, in the cross-validation-based CH-to-CH overall trust calculation, the feedback came from three sources. First, when *CHj* wanted to collect feedback from *CHy*, *CHj* sent a maximum of one CH feedback request, for which *CHi* received one response. Second, *CHj* sent one feedback request to its BS and received one feedback from the BS. Lastly, *CHj* used its self-feedback information, which did not require communication overhead. Therefore, if *CHj* wanted to collect feedback from all CHs in the network, the maximum communication overhead became 2[(*J* − 1) + 1] = 2*J*. If all CHs wanted to communicate with one another, then the maximum communication overhead was <sup>2</sup>*<sup>J</sup>* ∗ *<sup>J</sup>* = <sup>2</sup>*J*2. In addition, in the trust calculation from CH to CH, when the CH wanted to collect feedback from its *I* members, it sent a *I* request and received a *I* response, thus resulting in a total communication overhead of 2*I*. Therefore, the overall trust of the largest communication overhead CH-to-CH was calculated as 2*J*<sup>2</sup> + <sup>2</sup>*<sup>I</sup>* ∗ *<sup>J</sup>*.

#### *5.3. Anti-Collaborative Attack Ability Analysis*

In Figures 2–4, according to the inherent relationship among the three network entities, we propose the cross-validation mechanism, which is effective and reliable against collaborative attacks caused by malicious nodes. In this sub-section, we analyze the anti-collaborative attack ability of the FRAT scheme against collaborative attacks on the trust mechanism.

**Theorem 4.** *Equations (1)–(3) consider not only the number of positive (or negative) ratings (ξ*(*CMy*) *and γ*(*CMy*)*), but also the punitive nature for failed transactions. The feature of Equations (1)–(3) can effectively prevent collaborative attacks from accomplice CMs.*

**Proof.** If *γ*(*CMy*) > *ξ*(*CMy*), then *FCMx*,*CMy* (Δ*t*) ≥ 5, which covers a collaborative scenario where individual CMs attempt to lie about a bad CM [10,18]. We must prove that when *γ*(*CMy*) > *ξ*(*CMy*), then *FCMx*,*CMy* (Δ*t*) < 5. From Equation (3), feedback from CMs can be calculated using the following improved beta probability density functions:

$$F\_{\mathbb{C}M\_{\mathbb{X}}\mathbb{C}M\_{\mathbb{Y}}}(\Delta t) = \left\lceil \frac{10 \ast (\pounds(\mathbb{C}M\_{\mathbb{Y}}) + 1)}{(\pounds(\mathbb{C}M\_{\mathbb{Y}}) + \boldsymbol{\pi} \ast \gamma(\mathbb{C}M\_{\mathbb{Y}}) + 2)} \right\rceil \Longrightarrow$$

$$F\_{CM\_{x},CM\_{y}}(\Delta t) \le \frac{10 \ast (\xi(CM\_{\mathcal{Y}}) + 1)}{(\xi(CM\_{\mathcal{Y}}) + \mathfrak{a} \ast \gamma(CM\_{\mathcal{Y}}) + 2)}.$$

Under the case that *γ*(*CMy*) > *ξ*(*CMy*), we must prove that *FCMx*,*CMy* (Δ*t*) < 5, that is,

$$\frac{(\xi(\text{CM}\_{\text{y}}) + 1)}{(\xi(\text{CM}\_{\text{y}}) + \alpha \ast \gamma(\text{CM}\_{\text{y}}) + 2)} < \frac{1}{2}$$

Under the condition *γ*(*CMy*) > *ξ*(*CMy*), a negative feedback exceeds a positive feedback. Thus, we only need to prove the following:

$$2\left(\xi(CM\_{\mathcal{Y}}) + 1\right) < \xi(CM\_{\mathcal{Y}}) + \alpha \* \gamma(CM\_{\mathcal{Y}}) + 2 \Longrightarrow$$

$$2\xi(CM\_{\mathcal{Y}}) + 2 < \xi(CM\_{\mathcal{Y}}) + \alpha \* \gamma(CM\_{\mathcal{Y}}) + 2 \Longrightarrow$$

$$\xi(CM\_{\mathcal{Y}}) < \alpha \* \gamma(CM\_{\mathcal{Y}})$$

Due to *γ*(*CMy*) > *ξ*(*CMy*) and *α* > 1, *ξ*(*CMy*) < *α* ∗ *γ*(*CMy*) must exist, which proves Theorem 4.

Through Theorem 4, we proved that our trust system at the CM level had a protective ability against collaborative attacks from malicious nodes because this system could prevent such nodes from fulfilling their objectives.

**Theorem 5.** *Equation (9) considers not only the number of positive (or negative) feedbacks from CHs, but also the punitive nature for failed transactions. The feature of Equation (7) can effectively prevent collaborative attacks caused by accomplice CHs.*

**Proof.** We assumed that (*CHj*) was the number of positive feedbacks and *θ*(*CHj*) was the number of negative feedbacks in CH-to-CH trust computing. If (*CHj*) < *θ*(*CHj*), then *FCHi*,*CHj* (Δ*t*) ≥ 5, which covers a collaborative attack scenario where individual CHs attempt to lie about a bad CH. We must prove that when (*CHj*) < *θ*(*CHj*, then *FCHi*,*CHj* (Δ*t*) < 5. From Equation (9), feedback from CHs can be calculated using the following improved beta probability density functions:

$$F\_{CH\_i,CM\_j}(\Delta t) = \left\lceil \frac{10 \ast (\varpi(CH\_j) + 1)}{(\varpi(CH\_j) + \kappa \ast \theta(CH\_j) + 2)} \right\rceil \implies$$

$$F\_{CH\_i,CM\_j}(\Delta t) \le \frac{10 \ast (\varpi(CH\_j) + 1)}{(\varpi(CH\_j) + \kappa \ast \theta(CH\_j) + 2)}$$

We must prove that *FCHi*,*CMj* (Δ*t*) < 5, that is,

$$\frac{(\mathcal{O}(CH\_j) + 1)}{(\mathcal{O}(CH\_j) + \mathfrak{a}\*\theta(CH\_j) + 2)} < \frac{1}{2}$$

Under the condition (*CHj*) < *θ*(*CHj*), the number of negative feedbacks exceeds the number of positive feedbacks. Thus, we only need to prove the following:

$$2(\mathcal{\sigma}(\mathsf{CH}\_{\circ}) + 1) < \mathcal{\sigma}(\mathsf{CH}\_{\circ}) + \mathfrak{a} \* \theta(\mathsf{CH}\_{\circ}) + 2 \Longrightarrow$$

$$2\mathcal{\sigma}(\mathsf{CH}\_{\circ}) + 2 < \mathcal{\sigma}(\mathsf{CH}\_{\circ}) + \mathfrak{a} \* \theta(\mathsf{CH}\_{\circ}) + 2 \Longrightarrow$$

$$\mathfrak{\sigma}(\mathsf{CH}\_{\circ}) < \mathfrak{a} \* \theta(\mathsf{CH}\_{\circ})$$

Based on known conditions, existing *θ*(*CHj*) > (*CHj*), and *α* > 1, thus (*CHj*) < *α* ∗ *θ*(*CHj*) must be established, which proves Theorem 5.

Through Theorem 5, we proved that our trust system at the CH level had a protective ability against collaborative attacks from malicious nodes because this system could prevent such nodes from fulfilling their objectives.

#### **6. Experiment-Based Analysis and Evaluation**

In this section, we first describe how to set up the experimental method in a simulated WSN environment, including how to deploy the recommended trust scheme on the simulated environment and how to set up the experimental configuration. The experimental results are then reported.

#### *6.1. Experimental Methods and Parameters*

Extensive experiments were conducted by using the NetLogo event simulator [10,43–45] to validate the effectiveness of FRAT. For comparison, we also added GTMS [18] and ATRM [36] into the simulator because both of them are independent of any specific routing mechanism.

In order to make the experiment closer to the real WSN environment, three types of nodes were deployed in the simulator according to their identity, namely the CM, CH, and BS [10]. The CM could be one of two types: good CM (GCM) and bad CM (BCM). The GCM always provided successful cooperation, while the BCM provided unsuccessful cooperation. The behavior of a CM as a feedback provider could be one of two types: honest CM (HCM) and malicious CM (MCM). The HCM always provided correct feedback to any CM, while the MCM always provided feedback to other CMs contrary to actual data. Similar to the CM, the GCH always provided successful cooperation, while the BCH provided unsuccessful cooperation. The HCH always provided the correct feedback, while the MCH always provided the opposite feedback of the actual data of the other CHs.

In the proposed trust computing scheme based on the cross-validation mechanism, the main threat was caused by malicious feedback. We designed several performance mechanisms for a comprehensive trust assessment scheme. Due to the limitation of the paper length, we mainly evaluated the performance of FRAT based on the following two aspects: the successful packet transmission rate under different MCMs and the successful packet transmission rate under different MCHs.

Table 2 lists the simulation parameters and default values used in the experiment. A total of 1000–10,000 nodes were deployed in the simulator, and an average of 100 CMs were deployed in each cluster. The penalty factor *α* was set at two to reflect a double punitive factor for selfish nodes or failed collaborators. The total time step of the simulation run was 1000, and the time window for trust calculation was 20. The percentage of the HCM was 30–100%, and the percentage of the HCH was 50–100%.

**Table 2.** Parameters and their possible values. HCM, honest CM; HCH, honest CH.

#### *6.2. Evaluation under Different MCMs*

We computed the packet successful delivery ratio (PSDR) [10] to reflect the reliability of the trust computing systems. A higher PSDR indicated higher reliability. In this set of experiments, we assumed that most CHs in the WSN environment were trusted, of which MCHs only accounted for 10%. This WSN environment was very similar to the actual situation, and most CHs were honest and trustworthy.

Figure 7 illustrates the PSDR comparison at different percentages of the MCM. In this set of experiments, we assumed that the WSN environment was a trusted network community, of which 90% of the CHs were honest. The remaining 10% of CHs were malicious feedback providers. We set the percentage of MCMs to 10%, 20%, 30%, 50%, 60%, and 70%, which indicated that the cluster environment was fully honest (10%), honest (20%), relatively honest (30%), partly dishonest (50%), dishonest (60%), and fully dishonest (70%), respectively. Figure 7a shows a fully honest WSN environment, where the percentage of MCMs was only 10%. All three kinds of trust mechanisms had high PSDR values beyond 92%. These results reflected that the three kinds of trust mechanisms exhibited high reliability under an honest WSN community.

A robust trust mechanism should have a strong ability to counteract malicious behavior from MCMs. To evaluate the performance of the trust system under a more complex network environment, we gradually increased the proportion of malicious nodes. In Figure 7b–f, the proportion of MCMs were set to 20%, 30%, 50%, 60%, and 70%, and the results indicated larger differences compared with MCMs set to 10%. With the increase in the percentage of MCMs, the performance of GTMS and ATRM exhibited a marked decline; the PSDR of GTMS dropped to 93%, and the PSDR of ATRM dropped to 90%. The performance degradation may be mainly due to the usage of a one-way feedback mechanism. Relatively, FRAT exhibited robust performance in a complex network environment with a larger number of MCMs. These results were consistent with the actual situation, that is in a dishonest network environment, the MCM may conduct cooperative attacks, which may seriously affect the performance of the WSN environment. In order to improve the reliability of the proposed trust management mechanism, we adopted the idea that the overall trust of CM-to-CM was an adaptive combined value of bidirectional feedback (CM-to-CM feedback and CH-to-CH feedback). This new feedback mechanism could significantly improve the reliability of the proposed trust mechanism.

SDFNHWVXFFHVVIXOGHOLYHU\UDWLR

(**b**) Proportion of MCMs is 20%

)5\$7 \*706 \$750

(**e**) Proportion of MCMs is 60%

(**d**) Proportion of MCMs is 50%

7LPHVWDPSVQXPEHURILQWHUDFWLRQV

SDFNHWVXFFHVVIXOGHOLYHU\UDWLR

(**f**) Proportion of MCMs is 70%

**Figure 7.** PSDR comparison with different percentages of malicious CMs (MCMs), where the proportion of malicious CHs is 10% GTMS, group-based trust computing mechanism; ATRM, a trust and reputation scheme.

#### *6.3. Evaluation under Different MCHs*

To evaluate the performance of the proposed trust mechanism at different MCH percentages, in this set of experiments, we assumed that each cluster environment was honest, and the MCM ratio was 20%. We set the proportion of MCHs to 10%, 20%, 30% 50%, 60%, and 70%, respectively. When the proportion of MCHs was set to 10%, the WSN environment was trustworthy. Most CHs in this network could keep their commitment and provide consistent stable feedbacks. When the proportion of MCHs was set to 20% or 30%, the WSN environment was relatively untrustworthy. More than half of the CHs in this WSN environment could keep their commitment and provide a consistently stable feedback. When the proportion of MCHs was set to 50%, the WSN environment was highly untrustworthy. Over half of the CHs in this WSN environment provided contrary feedback of the actual data for other CHs. Figure 8 shows a comparison of PSDR with different MCH percentages. A reliable trust computing system should have a strong ability to resist malicious behavior from MCHs.

>

SDFNHWVXFFHVVIXOGHOLYHU\UDWLR

7LPHVWDPSVQXPEHURILQWHUDFWLRQV

(**b**) Proportion of MCHs is 20%

7LPHVWDPSVQXPEHURILQWHUDFWLRQV

\*706 +RQHVW:60HQYLURQPHQW

)5\$7

\$750

(**d**) Proportion of MCHs is 50%

(**e**) Proportion of MCHs is 60%

(**f**) Proportion of MCHs is 70%

**Figure 8.** PSDR comparison with different percentages of MCHs, where the proportion of malicious CMs is 20%.

In order to evaluate the performance of trust mechanisms in more complex network environments, we gradually increased the proportion of malicious CHs in the system, and the proportion of MCHs was set to 10%, 20%, 30%, 50%, 60%, and 70% in Figure 8a–8f. Figure 8a shows an honest WSN environment, where the percentage of MCHs was only 10%. All three kinds of trust mechanisms had a high PSDR under this WSN environment, in which all values fluctuated around 90%. These results reflected that the three kinds of trust mechanisms exhibited high reliability under an honest WSN community.

With the increase in the percentage of MCHs, the WSN environment rapidly evolved from honest to fully dishonest. Figure 8d–f show that the performance of GTMS and ATRM exhibited a marked decline; the PSDR of GTMS dropped from 92% to 83%, and the PSDR of ATRM dropped from 90% to 82%. The performance degradation may be mainly due to the usage of a one-way feedback mechanism in GTMS and ARTM. Relatively, FRAT exhibited a more reliable performance in a complex network environment with a larger number of MCHs. These results were consistent with the actual situation, that is, in a dishonest network environment, MCHs may conduct cooperative attacks, which may seriously affect the performance of the WSN environment. To improve the reliability of the proposed trust management mechanism, we adopted the idea that the CH-to-CH overall trust was an adaptively merged value by the cross-validation feedback mechanism: CH-to-CH feedback and BS-to-CH feedback. This cross-validation feedback mechanism could significantly improve the anti-collaborative attack ability of the proposed trust mechanism. Thus, FRAT had a more robust reliability than GTMS and ATRM under five kinds of WSN environment, i.e., honest, relatively honest, partly dishonest, half dishonest, and fully dishonest, and it was suitable for trust computing under an open WSN.

#### *6.4. Overhead Evaluation*

To evaluate the performance in a large-scale network environment, we adopted different cluster numbers and different cluster sizes. Figure 9 shows the compared results of communication overhead under different network scales. Six types of network environments were evaluated: (a) the network consisted of 10,000 clusters, and each cluster included 20 nodes; (b) the network consisted of 10,000 clusters, and each cluster included 50 nodes; (c) the network consisted of 10,000 clusters, and each cluster included 100 nodes; (d) the network consisted of 10,000 clusters, and each cluster included 200 nodes; (e) the network consisted of 10,000 clusters, and each cluster included 300 nodes; and (f) the network consisted of 10,000 clusters, and each cluster included 500 nodes. We compared our mechanism with GTMS [18], ATRM [36], and UWSN [20].

As the value of each feedback was a positive integer between one and 10, one byte was required for each feedback information. Table 3 lists the communication overhead (bytes) under full-load conditions. When the number of nodes in each cluster was relatively small (Figure 9a–c), we could observe that the communication overhead of FRAT was far below that of the other two trust mechanisms, GTMS and ATRM, but slightly larger than UWSN. The reason was that UWSN adopted a flat wireless sensor networks and did not require the overhead of the CH node. When the number of nodes in each cluster was relatively larger (Figure 9d–f), we could see that the communication overhead of FRAT was far below those of GTMS and ATRM. The communication overhead of FRAT gradually approached that of UWSN. According to Theorem 3. and Figure 9, the proposed trust computing scheme based on the cross-validation mechanism needed less communication overhead, and it was suitable for large-scale resource-constrained WSNs.

(**a**) network consists of 10,000 clusters, each cluster includes 20 nodes (**b**) network consists of 10,000 clusters, each cluster includes 50 nodes

(**c**) network consists of 10,000 clusters, each cluster includes 100 nodes (**d**) network consists of 10,000 clusters, each cluster includes 200 nodes

(**e**) network consists of 10,000 clusters, each cluster includes 300 nodes (**f**) network consists of 10,000 clusters, each cluster includes 500 nodes

**Figure 9.** Comparing results of communication overhead under different network scales.

**Table 3.** Communication overhead under full-load conditions.

#### **7. Conclusions**

In this study, we proposed a trust computing scheme based on a cross-validation mechanism for clustered WSNs. Based on the theory of standard deviation analysis, this mechanism could remove the biased factor from multiple feedback sources. The theoretical analysis and experimental results provided useful insights. In a highly complex WSN environment with large percentages of malicious and selfish nodes, the proposed trust computing scheme based on the cross-validation mechanism may be insignificant, and thus, it should be given considerable attention in practical WSN applications. However, future work can pursue the following research directions:

**Author Contributions:** Conceptualization, C.L. and X.L.; methodology, X.L.; software, X.L; validation, C.L. and X.L.; formal analysis, X.L.; investigation, X.L.; resources, X.L.; data curation, X.L.; writing–original draft preparation, C.L. and X.L.; writing–review and editing, C.L. and X.L.; visualization, C.L. and X.L.; supervision, X.L.; project administration, X.L.; funding acquisition, X.L. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was supported by the National Nature Science Foundation of China (61872110, 61672111), the Joint Fund of NSFC-General Technology Fundamental Research (U1836215), and Capital Science and Technology Leading Talent Training Project, China (Z191100006119030).

**Acknowledgments:** The authors would like to convey their heartfelt gratefulness to the reviewers and the editor for the valuable suggestions and important comments which greatly helped them to improve the presentation of this paper.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**

c 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## *Article* **A Blockchain Framework for Securing Connected and Autonomous Vehicles**

#### **Geetanjali Rathee 1, Ashutosh Sharma 2,\*, Razi Iqbal 3, Moayad Aloqaily 4, Naveen Jaglan <sup>2</sup> and Rajiv Kumar <sup>2</sup>**

Received: 29 May 2019; Accepted: 3 July 2019; Published: 18 July 2019

**Abstract:** Recently, connected vehicles (CV) are becoming a promising research area leading to the concept of CV as a Service (CVaaS). With the increase of connected vehicles and an exponential growth in the field of online cab booking services, new requirements such as secure, seamless and robust information exchange among vehicles of vehicular networks are emerging. In this context, the original concept of vehicular networks is being transformed into a new concept known as connected and autonomous vehicles. Autonomous vehicular use yields a better experience and helps in reducing congestion by allowing current information to be obtained by the vehicles instantly. However, malicious users in the internet of vehicles may mislead the whole communication where intruders may compromise smart devices with the purpose of executing a malicious ploy. In order to prevent these issues, a blockchain technique is considered the best technique that provides secrecy and protection to the control system in real time conditions. In this paper, the issue of security in smart sensors of connected vehicles that can be compromised by expert intruders is addressed by proposing a blockchain framework. This study has further identified and validated the proposed mechanism based on various security criteria, such as fake requests of the user, compromise of smart devices, probabilistic authentication scenarios and alteration in stored user's ratings. The results have been analyzed against some existing approach and validated with improved simulated results that offer 79% success rate over the above-mentioned issues.

**Keywords:** connected vehicles, internet of vehicles; security; IoT; blockchain; vehicular ad-hoc network

#### **1. Introduction**

In order to increase their own comforts, human daily life routines have been partially or completed replaced by embedded or automated machines in all aspects of business. Embedded systems monitor their environmental surroundings and subsequently respond or control the situation without any human intervention [1]. Recently, with the development of wireless communications and the advancement in vehicular industry, vehicular ad-hoc networks (VANETs) have become a mature research area. A VANET consists of a group of stationary and moving vehicles connected via a wireless network. Until recent times, the main use of VANETs was to provide comfort and safety to drivers in a vehicular environment [2]. However, this view is changing the infrastructure towards intelligent transportation systems where vehicles are connected and communicate using smart devices. Connected and Autonomous Electric Vehicles (CAEVs) is the most emerging vehicular technology

among them all [3].The optimum value of this destructive technology has been seen a big successful business model for auto makers [4] [Vehicles that may connect to the internet and provide improved data sharing in the form of risk data, sensory and localization data and environmental perception is known as the internet of vehicles (IoV) or connected autonomous vehicles (CAV) [5]. In addition, with the continuous increase in urban population and rapid expansion of cities, vehicle ownership has been increasing at an exponential rate. CAV has been considered as one of the essential applications of VANETs where vehicles are becoming smarter by having sensors, adapters and control units for monitoring and communicating with their surroundings. A potential area for the application of CAV that has witnessed an unprecedented growth is in online cab booking services. The use of CAV yields a better result in vehicle entertainment experiences and helps in reducing the congestion by allowing the current information to be obtained by the vehicles instantly. Recently, online cab facilities or ride sharing services have drastically changed the public transportation industry and have been widely accepted by the users to avail the services at any time [6]. Further, it reduces the overhead of money negotiation between driver and customer and allows the customers to book their ride on a phone by tracking driver availability through global positioning systems (GPS). In spite of several advantages of using these services, there are various issues that need to be tackled, such as any person may register its vehicle number and provide online cab sharing services with the means of benefitting his/her personnel concerns by compromising the smart/IoT (internet of things) sensors/devices. However, until now, there exists no tracking systems or recording mechanisms that keep a check on compromised sensors or misbehavior with the customers during the rides, especially at night. A group of technical experts may forge the network system and increase or decrease their service ratings in order to continue their misconduct with the customers. Further, in case of any mishap or misbehaving, the registered taxi driver is punished with a low rating depending upon the behavior [7]. Further, the online cab services which provide cab booking facilities and customized pick up taxi convenience can be further automated and secured by connecting and analyzing using sensors. Every vehicle may connect to the IoT devices so that any malicious activity can be analyzed and averted. An intruder can try to alter the stored information or compromise the vehicle or IoT device for their selfish interests. However, using a secure mechanism, almost all activities can be traced in real time, such as traffic jams, weather conditions that hamper the drive, vehicular damage and repair etc. In addition, intruders may further compromise some IoT sensors in order to increase their credit points or to disable their location. Further, any alteration or change in stored data or information may not be transparently reflected to other drivers or users in the network that further encourages these people to continue their misbehavior [8]. As soon as the driver uses this application, his/her necessary information is registered somewhere and the vehicle is tracked through sensors during the nights for customer safety. Therefore, a blockchain technique has engrossed the attention of organization associates across a broad spectrum of industries, such as healthcare, real estates, transportation, government sectors and finance [9–11].The demand for transparency is rising at an astounding pace. In addition, it is able to ensure the security and transparency among the users in spite of IoT devices being vulnerable to intruders. Further, a blockchain technique is able to track, organize and bear out communications by storing the data from a large number of devices and facilitating the formation of parties without any federal cloud. The blockchain can confine the devices or CAV activities and trace the location from IoT objects when the cab moves from one place to another. Supply chain usage is the most relevant part of a blockchain technique for resolving the tangible harms to businesses due to the requirement of analysis of IoT devices or a vehicle's legal or illegal activity information. Furthermore, the need of the blockchain in CAV is that it would capture the vehicle's location, trace the vehicle's position, record information or cab riding ratings phenomenon from IoT objects committed to the components or vehicle. Supply chain usage is the most general application of a blockchain for resolving real business issues due to the dearth of traceability of vehicle locations or in relation to the users or vehicles moving through the supply chain [12].

Figure 1 depicts a typical vehicular blockchain network where IoT objects (I1, I2 ... I6) are connected among several peers. Further, the vehicles are considered as various peer nodes in the network which are further divided into miner nodes depending upon their service criteria. Miner nodes are responsible for validating the trust of remaining nodes or IoT devices while peer nodes are part of the entire blockchain.

**Figure 1.** The blockchain framework.

#### *1.1. Motivation of the Paper*

The motivation of this manuscript is to provide security in the CAV network through IoT devices, safety and transparency among the users/customers during cab riding through a blockchain technique. During the movement of a user from one place to another, the vehicle number, current and previous vehicle ratings, captured through IoT devices are stored at the blockchain network. Therefore, even if intruders hack one or more IoT objects in order to gain their benefits, the users or vehicles present in the network are aware of the information registered under that compromised IoT device. Although, most of the researchers and scientists have proposed various smart frameworks in VANETs, however, most of the work is still at an early stage of CAV development. Further, many surveys have not affirmed the security concerns in the current progress of CAV applications.

#### *1.2. Research Significance*

Therefore, the scope of this paper is to ensure the transparency and security among drivers and customers using the blockchain. Further, the IoT sensors that automatically track the cab location and their identity using various IoT systems are traced by the blockchain network so that any compromise in any IoT device are recorded. The proposed blockchain framework has been validated against various security concerns such as user's fake requests, the compromise of IoT devices, probabilistic authentication scenarios and alteration in stored users' ratings. Further, the impact of using blockchain technology in IoV systems benefitted the society in variety of ways, such as ensuring the security and traceability of IoT devices or a vehicle's legal or illegal activity information. The experimental analysis of the proposed framework has been measured upon the illegal activities or communications done by malevolent IoT objects. The percentage of vehicles data security upon compromising of IoT devices has been discussed.

The rest of the paper is organized as follows. The survey of literature related to VANETs, vehicles and the blockchain along with various applications is presented in Section 2. The proposed blockchain framework for online cab services is described in Section 3. Further, Section 4 analyzes the performance metrics of the proposed framework against certain networking scenarios. Finally, Section 5 clinches the work and highlights the future scope of the paper.

#### **2. Related Work**

Various authors and researchers have formerly presented reviews on several use cases of VANETs and the blockchain in different areas. However, very few researchers have introduced a blockchain technique in CAV. In this section, a detailed description of the CAV along with various security techniques and role of the blockchain in one of the VANETs known as IoV has been elaborated.

Lin et al. [13] have proposed an intelligent transportation system in order to assist the drivers for efficient traffic schemes, optimal routes and dynamic guidance of routes during their travel. In this paper, during real time scenarios for reducing the fuel consumption and travel time with less road congestion, the authors have proposed a dynamic en-route decision real-time route guidance scheme. Further, the author's approach considers the real time traffic generation and transmission processes of the vehicular networks and predicts the traffic conditions based on multiple metrics by computing their trust probability. Furthermore, the authors have validated the proposed approach and shown the improved traffic efficiency by simulating the results in terms of efficient fuel, time and traffic parameters. Wang [14] introduced the basic methods and their major issues with their current applications for controlling and managing the traffic in parallel transportation management systems. The authors claim that the parallel transportation and management system is very effective for analyzing complex traffic networks. In this paper, the authors have described the parallel transportation and management system architecture, components, processes including Dyna, CAS, Itop, Adapts and Trans World. Finally, the author's proposed framework has been experimented and validated by analyzing real-world applications.

Hamid et al. [15] illustrated the overview of IoV by explaining its emergence, history and current applications of IoV in autonomous vehicles. Further, the authors pointed out certain issues occurred during IoV connectivity with the environment and its security concerns. In order to verify the CAV importance, a case study with computational simulation is done. In addition, various research ideas and future work directions are listed in smart city highways. The authors omitted a detailed technical specification of CAV. Wu et al. [16] introduced the IoV with its various applications by describing the background, notion, the IoV network architecture and their characteristics analysis along with its new research and challenges. Further, the authors described some enabling technologies by illustrating MAC standards and routing protocols. In addition, the core of this paper is to present a complete taxonomy with several categories, such as efficiency services, driving safety, informative services and intelligent traffic management system. Finally, Wu discussed the future directions in IoV research. With the continuous increase in urban population and rapid expansion in cities, vehicle ownership has been increasing at an exponential rate. In order to keep this view, traffic management has become a great issue in day to day life of human beings. The motivation of Dandala et al [17] in this paper is to provide a traffic management solution using CAV for overcoming the issues prevailing in daily life. Further, Liang et al. [18] provided an overview of VANETs from a research viewpoint. The paper begins with describing the basic network architecture by discussing three popular research issues and general methods. At last, the authors end with the analysis on research challenges and future drifts. Rawat et al. [19] presented data falsification threat detection using hashes for improving the network performance and security by acclimatizing the contention window size to broadcast accurate information to neighboring vehicles in timely manner. Further, the authors have proposed a clustering scheme to overcome travel time during traffic jams. The proposed mechanism is validated through numerical results attained from virtual simulations. Qian et al. [20] added cognitive engines in traditional CAV by restricting security strategies and transmission delays. Further, the study specified the switches of path selection as 0-1 programming issues and non-convex optimization problems. In addition, the 0-1 programming problem is converted into non-convex optimization via a log-det

heuristics algorithm. The proposed mechanism is validated through experimental results. Sharma [21] proposed an efficient model proficient of handling energy demands of the blockchain enabled IoV by optimally controlling the number of transactions through distributed clustering. The simulated numerical results suggest that the proposed approach is 40.16% better in terms of energy conservation and 82.06% better in terms of transactions required to share the entire blockchain data compared with the traditional blockchain. Castillo et al. [22] discussed the IoV benefits along with topical industry standards expanded to endorse its implementations. They further present proposed communication protocols to facilitate operation and seamless integration of CAV. At last, IoV future research work was presented by requiring further deliberation from the vehicular research community.

Furthermore, Pustisek et al. [23] briefly explained the blockchain technique by outline architecture in the automatic selection of an electric vehicle charging station. Several blockchain use cases for prototypic implementation were presented. Various security concerns exist due to high exposure of information and data flow between vehicles to intersection and vehicle to vehicle. Buzachis et al. [24] proposed a blockchain framework for verifying, negotiating and facilitating among the consent entities. In this paper, the authors proposed a multi agent vehicle to intersection and vice versa communication to secure the vehicles through intersections. Further, Kuzmin et al. [25] introduced the concept of blockchain in unnamed aerial vehicles where each vehicle is considered as a node in which the functionality for reading and creating the transactions or communication exchange in done through the blockchain network. Yang et al. [26] used the concept of blockchain during the sharing of traffic flow among vehicles by ensuring the tamper resistant and data correctness in the agreement mechanism. The proof-of-event agreement is used to collect the traffic data bypassing of roadside vehicles. A two-phase transaction is introduced to access the warnings through the blockchain. The simulated result validates the proposed mechanism against tracing the events with trust verification. Further, in order to ensure the vehicles security, the authors proposed various authentication mechanisms by restricting the several attacks. By identifying various attacks such as replay, location spoofing, guessing and authentication time requirement, Chen et al. [27] proposed an improved security mechanism by forming a formal proof. Furthermore, the proposed mechanism is validated by comparing with existing results in terms of performance and security. Moreover few researchers have focused on secure information exchange between various vehicles where any intruder has the capability to disrupt integrity, authenticity, confidentiality. In a smart city for ensuring a secure message exchange, Dua et al. [28] proposed a novel elliptic curve cryptographic mechanism for providing two level authentications. For validating the proposed mechanism, the analysis is done using burrows logic along with formal and informal analysis using internet security protocols. Further, the proposed mechanism is compared with existing security schemes against high reliability, latency and overheads.

Malicious users in CAV may mislead the whole communication and create chaos on the road. Further, data falsification attack is one of the main security issues in CAV where vehicles rely on information received from other vehicles or peers. Until now, the numbers of secure CAV mechanisms have been proposed by different researchers and scientists, however, very few works have presented CAV with a blockchain technique. This paper has proposed the issue of IoT sensors which are compromised by expert intruders by proposing a blockchain framework.

#### **3. Proposed Blockchain Framework for CAV Services Delivery**

This section describes the blockchain framework of CAV that ensures the security and transparency of users and vehicles. In order to trace each and every activity of malevolent resources, a security mechanism is proposed that keeps track of each activity done by IoT sensors. Therefore, for providing and ensuring the security during ride sharing in CAV, each transmission among entities through smart devices is tracked. Although it would be easy to trace or record each and every activity of vehicles, however it may further enhance the complexity of computational communication during tractability in real time scenarios where upon the mobility of vehicles, intruders may attack through denial of service

or man-in-middle threats. Whereas, in a case where IoT devices keep record of each and every vehicle, any attempt by intruders to compromise the IoT devices can be easily traced and identified. Also, since IoT devices form an upper layer in the network, the probability of attack is significantly reduced as compared to edge level comprising vehicles. For ensuring the security of smart devices, registered providers are verified, so that nobody changes, alters or tracks the information or IoT devices after they are casted. Also, individuality in money bank vehicles is completed, so that nobody can steel any tracking information. These issues can be easily resolved by a blockchain technique where the required smart contracts are defined which is the same as writing the rules, models, objects and code among the parties. Smart contracts are considered as a consensus or an agreement between the two parties. Once the smart contracts are designed, they cannot be further deleted or altered from the blockchain network. In this mechanism, there is no need of a central authority to provide validation of the work. All the nodes or vehicles may compute their results of contracts without any outside interference.

In the proposed blockchain framework, every automated vehicle or IoT device is registered or logged into the network before providing or accessing the vehicular services. Further, the necessary information of both vehicles and IoT devices are entered into an ordinary database initially and then stored in the blockchain permanently in order to track each and every activity of both the entities. Figure 2 depicts the architectural framework of CAV using the blockchain technique where all the vehicles are connected to IoT sensors or smart devices in order to control, monitor and guide the drivers on the road. In the proposed framework, the number of vehicles connected to the IoT devices or sensors depend upon their communication and transmission ranges. The vehicle number, ratings given by customers or users along with their IoT device are stored in ordinary tables as well as in the blockchain network to keep track and record each legal and illegal activity of the vehicle or IoT devices. In case of any IoT device being compromised by the intruders, the respective authorities which are part of the blockchain may be able to identify and take immediate actions against that compromised IoT device. Instead of recording IoT devices, each vehicle can be traced, analyzed and recorded over the blockchain. However, the keeping of records of such huge vehicular data during their mobility in real time scenarios may increase the possibility of computational power and time. Therefore, in order to limit the storage and computational power, it can be easy to record, analyze and store the activities of only IoT devices in the blockchain. The devices which trace a certain number of vehicles and provide services according to the user's request can be easily traceable and recordable in the blockchain. Each IoT device containing its vehicle record and providing services to different vehicles can be used as mining information to store over the block. Any change or alteration in information communication in vehicles or devices by intruders can alter the history or previous interactions that may further punish the devices or vehicles by blocking or reducing the ratings of vehicles. This paper details the security of both vehicles and IoT device through the blockchain in two different cases.

**Figure 2.** The architectural framework of a connected vehicle blockchain.

#### *3.1. Vehicle Security: Registration of Every IoT Device on the Blockchain Network*

In order to ensure security and transparency during a ride, every IoT device that provides the information about the vehicles registers itself on the blockchain network before providing the services to the vehicles. Further, every vehicle number or rating given by the customers is stored on the blockchain network. In CAV, smart objects continuously monitor and control the cab services and each IoT device authenticates to a peer in the blockchain network as depicted in Figure 3.

**Figure 3.** The blockchain network.

The blockchain network is a combination of peer and miner nodes that are responsible for generating the cryptographic keys and verifying the authenticity of a new vehicle or IoT device joining the network in order to avoid network failures. More than one manager is elected to ensure the security in the network for a particular period of time. Once the manager is selected, a secondary blockchain manager is chosen in order to recover from the failure of the primary manager. All the IoT devices or vehicles (providers) are registered in the blockchain network, by sending a subscription request to the peer manager. Further, the authenticity or legitimacy of each IoT device or provider is verified by the miner nodes with the help of device information, such as the international device identity, device identifier, innovation technology crop etc. Once the authentication is successful, miners generate a shared key that will help in further validation. At last, all IoT devices connect with their assigned peer nodes using their shared key between peer nodes and IoT devices/objects.

Each vehicle acts as a node connected to its subscribed or nearby peer nodes. The flowchart of the proposed framework is depicted in Figure 4. As depicted in Figure 4, whenever a user X needs to book a ride, he makes a ride request by sharing the time, pickup and drop-off points of the ride. In this paper, the users or customers are considered as legitimate and need not submit their identity in the blockchain network. This ride request is visible to all the registered providers in the network who are the part of the blockchain. A rider may get positive or negative reviews from other users based on their behavior. Various parameters are used in order to compute the ranking of providers such as trust factor or rating. The provider with a high trust factor (TF) or rating is considered to be most trustworthy. The user may choose its provider depending upon the rating or TF. In the cab ride service, various communications are performed between the service provider and the requester. If provider Y wants to respond to this request, it can share its intent to X.

**Figure 4.** Flow work of the proposed framework.

The provider Y chooses to respond to a ride request based on certain criteria such as the user's route, where if the travel route of Y matches with the route of X, then Y accesses the ride request. Whenever a user X or provider Y' agree upon a ride request, a blockchain can be maintained along with a hash so that any misbehavior or alteration in the location pick or drop point can subsequently be identified in the network as depicted in Figure 5. Each block contains the information about the IoT devices attached with a previous block through a hash as depicted in Figure 6 so that any alteration or deletion of any information from the intruder can come to the notice of other devices.

**Figure 5.** Consent through the blockchain among provider and ride requester.

**Figure 6.** The blockchain among sender and receiver.

#### *3.2. Attacking Scenarios*

Whenever an intruder wants to perform some malicious activities in the network, it may adopt a number of attacking strategies. The compromise of IoT devices or sensors, modification of ratings given by riders, data falsification and traffic jams are some issues that can be easily generated by the intruders in order to fulfill their own interests. Attacking scenarios that can be possible during a ride service between user and vehicle are detailed as follows:

However, in order to prevent these attacking strategies, this study has proposed a secure cab riding and sharing mechanism through the blockchain. Further, in order to validate the proposed mechanism, a numerical simulation is done on various parameters that show the outperformance of the proposed framework.

#### **4. Performance Analysis**

For validating the proposed framework, the simulation of the CAV blockchain framework has been ensured using the blockchain technique through NS2 simulator. In this paper, the possibility of attacks encountered at IoT devices or vehicles of the proposed framework has been analyzed. Initially, a network area of 700 × 700m was created having network sizes of 50 numbers of nodes where the vehicles are dynamic in nature and can abscond and join any other device's range as depicted in Table 1. For the deployment of network establishment, an initial random rating or TF (such as 70% and 5) was also assigned on the network to each device/vehicles and 5 nodes were created that act as blockchain nodes. In order to measure the validity of the proposed phenomenon, the performance was measured against several security metrics, such as the user's fake message alteration, the attack possibility on IoT devices and the modification of users' record information, such as the ratings. In order to measure validity or verify the proposed blockchain's CAV framework, NS2 simulator was used where numbers of attacking scenarios at IoT devices were considered. An attacking scenario or adversary model of the proposed framework is depicted in Figure 7 where intruders compromise the IoT devices either by forging the identity of legitimate devices or hacking the existing legitimate IoT sensors in the network. In order to validate or measure the authenticity of the proposed phenomenon, the attacking nodes were added with the rate of 10% for legitimate nodes in the network.

**Table 1.** Parameters.

**Figure 7.** An adversary network model of the proposed phenomenon.

The intruders that try to compromise the IoT devices either by hacking the legitimate devices' identity (ID) in order to perform man-in-middle attack or behave like legitimate devices are considered for analyzing the proposed framework. Further, the proposed phenomenon has been verified against network congestion and compromising ability where intruders consume network resources by broadcasting fake requests. In addition, the proposed framework was measured against authentication probabilistic scenarios where attackers try to compromise IoT devices and showed how the possibility of attacks can still be analyzed and measured where intruders compromise the IoT devices. The proposed phenomenon showed false, no and correct authentication scenarios values that depicted how the proposed phenomenon efficiently measured the attacks where intruders compromised the devices. Further, in order to verify the framework against threats, malicious devices or nodes were added into the network based on normal distribution during the communication process. Further, the established blockchain environment is a combination of miners and peer nodes for validating and adding the new nodes (devices) in the network. Amongst them, some miner nodes were also converted to malevolent nodes to see the security recovery process. In addition, IoT devices were considered which are under the threat of intruders. The invasion of IoT signified that in a single unit of time, 2 out of 5, 10 out of 20 and 20 out of 50 devices were compromised as depicted in Table 2. Further, the user's fake request was considered another threat where insertion of a fake request by the intruders caused network congestion in the network. Taking all these assumptions, performance analysis was done for 60 s. The proposed framework was validated and compared against conventional approach as discussed in the below subsection.

**Table 2.** The configuration of NS2 for a different network environment.

#### *Existing Method*

Rawat et al. [17] presented data falsification threat detection using hashes for improving the network performance and security by acclimatizing contention window size to broadcast accurate information to neighboring vehicles in a timely manner. Further, the authors proposed a clustering scheme to overcome travel time during traffic jams. The existing mechanism was validated through numerical results attained from virtual simulation. The proposed paper analyzes the blockchain mechanism of IoT framework for CAVs over various networking parameters, such as the users' fake requests, compromise of IoT devices and alteration in the stored user's ratings. The proposed framework was measured against Rawat et al. [17] where the authors ensured the security by generating the hashes of information transmitted among the entities. However, the encrypted messages can be easily hacked and altered by the intruders. Further, a single change or compromise of IoT devices in the CAV network may be unaware of the entire network. However, in our proposed mechanism a single change in any information or device may immediately alert the remaining networks.

The proposed phenomenon results are measured against two attacking scenarios, i.e. network congestion and compromising ability that is further compared against existing approaches explained in subsection A of Section 4. The proposed method tries to improve the security of vehicles through the blockchain where every IoT device is recorded and analyzed for detecting the threat possibility. Rawat et al. on the other hand proposed a phenomenon where a block of hash chains of each vehicle was recorded over the network that may further have enhanced the possibility of an attack due to network congestion and computational power at the lower level of vehicles. The experimental evaluation of the proposed and conventional approaches was accomplished successfully and multiple results regarding various parameters have been recorded. The performance and system state parameters results are presented in previous subsections of the performance analysis. The system behaved as expected and all performance parameters for any CAV data were positive for the proposed framework. The movement

and recording of activity is done by IoT devices that are static and can analyze and detect efficiently. The movement of vehicles allows new connection to the IoT device of their range where devices may collaborate among each other to further analyze their interactions.

Further, the accuracy of the proposed approach was close to 86% which may improve with the time because of removal of detected malicious nodes (MNs) from the system. The detection of MNs is based on trust where removal of detected MNs does not hinder the performance of other nodes. The proposed mechanism computes the trust of other nodes after every specific interval of time where nodes that are compromised and behave maliciously can have lower rating and trust because of high product loss ratios, black holes, and falsification attacks and may never be considered in the future. The depicted results showed the outperformance of the proposed mechanism against existing approaches with a success rate of 86%. This can be further improved if the experiment runs for a longer period. The measuring parameters in the proposed framework performed better in comparison to existing systems. Further, the obtained framework accuracy can be further improved with time because of the removal of detected MNs from the network. The detection of MNs followed by their removal does not alter the trust or hinder the performance of other nodes. The proposed mechanism computes the trust factor of their nodes after a specific interval of time. The nodes that are compromised and behave maliciously can have low ratings and trust, and may never be considered for the path formation. In all the depicted graphs from Figures 8–10, the proposed security framework outperforms better results against existing mechanisms. In case of the user's fake request graph as shown in Figure 8 corresponding to network congestion, the existing scheme performs less efficiently as the number of fake requests increase with the network size. The congestion of fake requests overloads the network and communication between the sender and the receiver and can become very difficult to maintain. Further, the increase of network congestion may consume the necessary resources that further leads to drastic degradation in network performance. Furthermore, corresponding to compromised devices, the data monitoring and controlling mechanism was affected highly as shown in Figure 9. In case of compromised IoT devices, the intruders not only affect the network performance, but also gain access to restricted areas or may further steal the confidential information for their own benefits. However, in the case of Figure 10, the intruders may alter the stored ratings of users and continue their misbehavior with their customers.

**Figure 8.** The users' fake requests corresponding to network congestion.

Along with the blockchain technology, all the necessary documenting or monitoring or controlling records are stored at the blockchain so that a single alteration, modification, deletion or compromise of any IoT device may quickly get under the surveillance and be known to other devices in order to secure or prevent from future possible harms. In our proposed phenomenon, a vehicular security framework was projected with the blockchain technique that enhanced the network performance and secured the online cab services. The performance analysis of proposed framework was further explained in detail along with verification time depending upon its various probabilistic attacking strategies. Figure 11 depicts the probabilistic strategies in terms of false, no and correct authentication and illustrates the

validation of the proposed phenomenon with fake requests and compromising ability. The approach can be applied efficiently in real time scenarios by measuring its attacking possibilities.

**Figure 9.** The attack possibility against compromised devices.

**Figure 11.** Probabilistic scenarios of attack possibility.

#### **5. Conclusions**

This paper has considered the IoV application and proposed a security mechanism for connected autonomous vehicles services framework using the blockchain technique. In order to provide the secrecy and transparency among the customers and cab drivers, each activity of the entities regarding vehicles or IoT devices is traced and recorded inside the blockchain. The blockchain mechanism is used to extract the information from IoT devices and store the extracted records in order to ensure the customer's safety and the devices' security by providing transparency among various authorities. The proposed framework significantly reduced the users' fake requests, the compromise of IoT devices and the alteration in the stored user's ratings. The simulated results against various parameters showed a 79% success rate in the proposed framework as compared to the existing approach against mentioned parameters. The proposed phenomenon against a larger number of nodes and the transaction alteration already stored at the blockchain network will be reported in future communications. Further, technology such as deep and reinforcement learning will be adopted to increase the system intelligent [29].

**Author Contributions:** The need of blockchain framework in vehicular technology along with literature survey is done by R.K. and A.S. The issue of security in smart sensors of connected vehicles that can be compromised by expert intruders addressed by a blockchain framework is proposed by G.R. and N.J. The identification and validation of the proposed mechanism based on various security criteria, such as fake requests of the user, compromise of smart devices, probabilistic authentication scenarios and alteration in stored user's ratings is detailed by R.I. The results validation against existing mechanisms along with success rate has been analyzed by M.A.

**Acknowledgments:** The authors are sincerely thankful to the anonymous reviewers for critical comments and suggestions to improve the quality of the manuscript.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

#### *Article*

## **An Adaptive Wake-Up-Interval to Enhance Receiver-Based Ps-Mac Protocol for Wireless Sensor Networks**

**Mohammed Sani Adam 1,\*, Lip Yee Por 1,\*, Mohammad Rashid Hussain 2, Nawsher Khan 2, Tan Fong Ang 1, Mohammad Hossein Anisi 3, Zhirui Huang <sup>1</sup> and Ihsan Ali 1,\***

Received: 12 June 2019; Accepted: 2 August 2019; Published: 29 August 2019

**Abstract:** Many receiver-based Preamble Sampling Medium Access Control (PS-MAC) protocols have been proposed to provide better performance for variable traffic in a wireless sensor network (WSN). However, most of these protocols cannot prevent the occurrence of incorrect traffic convergence that causes the receiver node to wake-up more frequently than the transmitter node. In this research, a new protocol is proposed to prevent the problem mentioned above. The proposed mechanism has four components, and they are Initial control frame message, traffic estimation function, control frame message, and adaptive function. The initial control frame message is used to initiate the message transmission by the receiver node. The traffic estimation function is proposed to reduce the wake-up frequency of the receiver node by using the proposed traffic status register (TSR), idle listening times (ILTn, ILTk), and "number of wake-up without receiving beacon message" (NWwbm). The control frame message aims to supply the essential information to the receiver node to get the next wake-up-interval (WUI) time for the transmitter node using the proposed adaptive function. The proposed adaptive function is used by the receiver node to calculate the next WUI time of each of the transmitter nodes. Several simulations are conducted based on the benchmark protocols. The outcome of the simulation indicates that the proposed mechanism can prevent the incorrect traffic convergence problem that causes frequent wake-up of the receiver node compared to the transmitter node. Moreover, the simulation results also indicate that the proposed mechanism could reduce energy consumption, produce minor latency, improve the throughput, and produce higher packet delivery ratio compared to other related works.

**Keywords:** wireless sensor networks; wake-up radio; medium access control protocol; receiver-initiated MAC protocol; traffic adaptation

#### **1. Introduction**

Wireless sensor networks (WSN) have gained a prolific attention in both academy and industry because of their wide-ranging applications, for example, health and remote monitoring/sensing [1,2]. WSNs are mostly deployed randomly in hostile and inaccessible areas. The main components of sensor nodes are a sensing unit, a control unit, a memory unit, and a limited battery power supply. The sensing unit is responsible for detecting the environment regarding humidity, temperature, and vibration. The control unit processes the sensed data and stores it into the memory unit of the sensor nodes. The sensor nodes are mainly powered by a battery with limited energy supply [3–6]. Research

studies reveal that, in traditional WSN networks, the most energy consumption is done by the radio receiver. Furthermore, the radio receiver is monitored by the Medium Access Control (MAC) [7–10]. To utilize the wireless medium, MAC protocol was used to attain higher energy efficiency and low packet delivery latency. However, the leading bases of energy consumption in this protocol are idle listening and overhearing [11–13]. To reduced energy consumption, duty cycling has been widely used to design an energy-efficient MAC protocol [7,14]. Historically, the duty cycle mechanism has been proposed in MAC protocol, which falls into synchronous or asynchronous [11,15–18].

The synchronous mechanism coordinates neighboring sensor nodes to minimize energy consumption. Nonetheless, multi-hop time synchronization leads to huge overhead [19,20]. In disparity, the asynchronous duty cycle mechanism does not depend on any previous synchronization. Under a less congested traffic load, a huge number of the available asynchronous MAC protocols minimize energy consumption. However, the energy depletion in the synchronous duty cycling declines momentously with one or multiple communications and parallel traffic flows, and as a result, the synchronous does not scale well in huge and condensed networks [21,22].

Furthermore, in the duty cycling approach, sensor nodes periodically wake-up and check for an incoming message from the available channel. If there is no message received or sent, the sensor device changes from "active" to "sleep" mode to minimize energy consumption. Therefore, energy efficiency is the major concern in WSNs, and the MAC protocol handles most of the energy-related issues. The concern is to use the MAC protocol to improve the energy utilization of the WSN. As a result, designing a new protocol that reduces energy consumption is essential.

An Adaptive Wake-up-interval to enhance Receiver-based Preamble Sampling MAC protocol (AWR-PS-MAC) is proposed in this paper. Our proposed mechanism is designed for preventing the incorrect Traffic Status Register (TSR) convergence problem that causes the receiver node to wake-up more frequently than the transmitter node. The remainder of the paper is structured as follows. Relevant work of the receiver-initiated and the adaptive MAC protocols is described in Section 2. Then, background on the AWR-PS-MAC and the receiver-initiated MAC protocol discourse is given in Section 3. The methodology used and the simulation are explained in Section 4. The simulation results and evaluation through network simulations of the proposed mechanism compared with other related works are illustrated in Section 5. The final section of this paper presents the conclusion.

#### **2. Related Works**

Over the years, a large number of receiver-based PS-MAC protocols have been proposed by [23–30] to overcome the problem of a receiver node, which might wake-up twice or more compared to the transmitter node due to wrong traffic estimation. The following are the selected related works that have been analyzed based on strengths and weaknesses.

In [23], the authors proposed a protocol named Receiver-Initiated MAC (RI-MAC). In this protocol, when the receiver node is in an "active" mode, it broadcasts a preamble beacon message to the transmitter nodes. Then, the transmitter node starts sending the data message. Once the receiver node receives the data message, the receiver node sends another preamble beacon message. The preamble beacon message has two roles: (i) to acknowledge the data message was successfully received, and (ii) to notify the transmitter node that it is prepared to receive another data message. According to authors in [23], RI-MAC could minimize the energy depletion of the transmitter nodes because the transmitter nodes might only take part in transmitting a packet once they received the data message. However, the receiver node in this protocol uses a fixed wake-up interval and wakes-up twice or more compared to the transmitter node due to the incorrect TSR convergence because of the traffic pattern. Traffic patterns that are varied and unpredictable (variable traffic) might not be suitable to use with the fixed wake-up method, because this method might produce high latency for the transmitter nodes.

In [24], the authors proposed a protocol named Predictive Wake-Up MAC (PW-MAC). In PW-MAC protocol, if the transmitter node has a data message to transmit, the transmitter node switches into an "active" mode and waits for a preamble beacon message from the receiver node. After receiving the preamble beacon message, the transmitter node starts sending the data message. Once the receiver node receives the data message, the receiver node sends another preamble beacon message. The preamble beacon message has three roles: (i) to acknowledgement the data message was successfully received, (ii) to inform the transmitter node that it is prepared to receive another data message, and (iii) to provide the current wake-up time to the transmitter node so that it can predict the future wake-up interval of the receiver node. According to the authors, PW-MAC could limit the Idle Listening Time of the transmitter nodes, because this method could forecast the wake-up interval of the receiver node. However, the prediction mechanism used in this method considered only the current wake-up time of the receiver node. Using only the wake-up interval of the receiver node causes more frequent wake-up than the transmitter node, because the prediction does not consider traffic estimation. To predict a traffic pattern that is varied and unpredictable (variable traffic), other parameters such as traffic estimation might need to be taken into consideration.

In [31], the authors proposed a protocol named Traffic-Aware Dynamic MAC (TAD-MAC). In this protocol, when the receiver node is in an "active" mode, it periodically broadcasts a preamble beacon message to the transmitter nodes. Then, the transmitter nodes only start sending the data message. Once the receiver node has received the data message, it aligns its wake-up interval based on the traffic rate of the transmitter node. Such information is kept at the specific register called the TSR. After that, the receiver node sends another preamble beacon message. This preamble beacon message has two roles: (i) to acknowledge the data message was successfully received, and (ii) to inform the transmitter node that it is prepared to receive another data message. According to authors, TAD-MAC could reduce overhearing and Idle Listening Time of the transmitter nodes, because the receiver node could use TSR to determine the wake-up interval for each of the transmitter node. However, the receiver node in this protocol might wake-up more frequently than the transmitter node. Moreover, the traffic pattern that is varied and unpredictable (variable traffic) might increase the overhead of the receiver node, because it might need to align its wake-up interval, often due to the fluctuation of the traffic data rate produced by the transmitter nodes.

In [25], the authors proposed a protocol named Receiver-Initiated X-MAC with Tree Topology (TRIX-MAC). In this protocol, when the receiver node is in an "active" mode, it appends a new field into the preamble beacon message and periodically broadcasts it to the transmitter nodes. This field consists of the information about the number of time-slots that are required for each transmitter node to transmit their data message. The purpose of this field is to let the transmitter nodes forecast the next wake-up interval of the receiver node. According to the authors, TRIX-MAC could reduce energy consumption by enabling the transmitter nodes to forecast the receiver nodes' wake-up times. Moreover, this protocol could decrease the number of data message exchanges between the receiver node and the transmitter nodes. However, the receiver node in this protocol might still wake-up more frequently than the transmitter node, because it is difficult and challenging to approximate the data transmission rate of each of the transmitter nodes.

In [32], a protocol named Heuristic Self-Adaptive MAC (HSA-MAC) was proposed. In this protocol, the receiver node uses open-loop and closed-loop to adapt its wake-up and sleep patterns. Open-loop is used to evaluate the behavior pattern of the static traffic rate, while closed-loop is used to bring up the next wake-up interval of the receiver node. According to the authors, HAS-MAC allows the receiver node to adapt its wake-up and sleep intervals in static and variable traffic rates. However, the feedback method used in the closed-loop needs more energy, especially in variable traffic networks, because the receiver node needs to wake-up more frequently than the transmitter node to predict and update its wake-up and sleep intervals.

In [26], a protocol named Adaptive Scheduling Predictive-Wakeup MAC (AS-PW-MAC) was proposed. AS-PW-MAC uses a similar predictive mechanism as in PW-MAC protocol, but there is an additional pseudo-random scheduling generator incorporated in the predictive wake-up mechanism. This pseudo-random scheduling generator is used to enable the transmitter node to forecast the wake-up time of the receiver node so that the transmitter node can wake-up before the receiver node. According to the authors, AS-PW-MAC is able to achieve a better packet delivery ratio in the maximum range of traffic loads compared to PW-MAC. However, AS-PW-MAC requires additional computation energy to forecast the wake-up time of the receiver node. Moreover, the pseudo-random scheduling generator might not be suitable to be used in variable traffic in WSNs, because the receiver node in AS-PW-MAC has to wake-up more frequently due to incorrect TSR convergence, and this protocol cannot detect traffic rate changes.

In [27], a protocol named Prediction-Based Asynchronous MAC (PBA-MAC) was proposed. The receiver node in this protocol sporadically wakes-up to broadcast a preamble beacon message to inform the transmitter nodes to start the data message transmission. Upon receiving the preamble beacon message by the transmitter node, the transmitter node can send the data message to the receiver node. PBA-MAC used an advanced mechanism to enable the transmitter node to forecast the wake-up time of the receiver node. According to the authors, the use of an exponential advance mechanism in PBA-MAC could reduce the communication cost by allowing the transmitter node to forecast the wake-up time of the receiver node. Although the transmitter node can forecast the wake-up time of the receiver node using the exponential advance mechanism, the receiver node might not be able to coordinate its wake-up interval with the traffic rate of the transmitter nodes. Therefore, the receiver node might wake-up more frequently than the transmitter node, and this might lead to high energy consumption because of avoidable wake-ups of the receiver node.

In [30], a protocol named A Low Duty Cycle Efficient MAC Protocol Based on Self-Adaption and Predictive Strategy (AP-MAC) was proposed. In this protocol, an information table is used to store the receiver nodes and the neighboring transmitter nodes information. The transmitter nodes use the information table to control the wake-up time of the receiver node. The transmitter nodes wake-up to listen to a preamble beacon message from the receiver node. After receiving the preamble beacon message, the transmitter nodes set up a channel to transmit the data message. The authors claimed that this protocol could reduce the crosstalk problem. Crosstalk happens when there is communication interference between transmitter nodes. Nonetheless, AP-MAC protocol is not proper to be implemented in variable traffic, because the traffic changes are unpredictable. Therefore, this protocol might result in unnecessary wake-ups that incur extra energy consumption.

In [33], an adaptive contention window MAC protocol was proposed to provide better throughput under a heavy load. This protocol chooses from the history of the collision to reflect the communication status and the usage of the wireless channel. A huge collision reflects greater competition in the wireless channel, and a big contention window is needed based on this condition. The authors claimed to prolong the access time to get rid of the competition. However, this exponential increase in speed when the traffic load is dense could possibly lead to avoidable delays. Therefore, this protocol might lead to heavy traffic load that incurs latency.

In [34], a protocol named self-adaptive sleep/wake-up scheduling was proposed. In this scheduling protocol, a reinforcement learning technique is used to allow every sensor node to independently choose its own operation mode—sleep, listen, or transmission mode—and every time slot is in a distributed system. In this proposed protocol, the time axis is distributed into the time slots. However, in each of the time slots, each sensor node independently chooses to either sleep or wake-up. Furthermore, it is primarily focused on the abstract level with some assumptions that the problem addressed has not been solved. Therefore, the aforementioned problem still exists under these assumptions.

In [35], a novel receiver-initiated MAC protocol was proposed to improve the data delivery packet delay. In this protocol, all sensor nodes choose a different time slot for beacon message transmission in a distributed system in respect to their transmission range, and hop counts from the based station improve the data delivery delay. The proposed protocol extended RI-MAC to achieve the aforementioned property. In addition, the author extended the back-off mechanism to support control messaging. Differently from the RI-MAC, when a node attempts to send a control message, it sends the message instantly after the beacon reception. However, the receiver node in this protocol uses a time slot, and it may not be suitable for variable traffic patterns. A traffic pattern that is varied

and unpredictable (variable traffic) might not be suitable to use with the time slot method, because this method might produce high delay.

In [36], the authors presented a novel MAC protocol for energy-harvesting based WSNs using the advantage of ultralow-power wake-up radios. To eliminate this issue of a small range of wake-up radios, more than one hop wake-up technique based on a two radio system is proposed for aiding the communications between destination and any sensor nodes while upholding low latency and minimal energy consumption. To minimize the energy depletion, wake-up calls and data packets are sent using two different data rates with the address of the destination node. Moreover, by spending high data rate for data transmission, it reduces the risk of data transmission collisions. However, only three sensor nodes are used for evaluating the performance. As a result, conclusions could not be made, because the investigation was not carried out in larger and denser networks.

In [14], a Bird-MAC protocol for the Internet of Thing (IoT) applications was proposed that extremely minimizes the energy consumption of IoT applications in which sensor nodes report monitored status in a quasi-periodic manner, as in organized health-related and static environmental monitoring. The Bird-MAC protocol boasts extremely minimal energy consumption because it periodically sends the monitored information via a very low data rate. The high energy-saving impact of Bird-MAC (regardless of either a transmitter or a receiver) is because sensor nodes only wake-up for the duration of the actual clock drift among the transmitter–receiver pair, while the time duration of the wake-up is relative to the extreme clock drift. However, Bird-MAC requires additional computation energy to determine the maximum clock drift, and this protocol cannot be applied to variable traffic.

#### **3. Background on Receiver-Initiated MAC and the Proposed Mechanism**