1. Introduction
Secure and ease in human lifestyle have led to a healthy increase in the adoption of smart cities in the last decade. In a smart city, its residents enjoy smart services, such as IoT-based healthcare services, intelligent farming, live surveillance, smart industry, and intelligent transportation systems [
1,
2]. Improved communication and advancement in information technologies help in provisioning quality implementation of these smart city applications by ensuring secure and reliable data delivery [
3,
4,
5,
6].
Smart city applications save their data on cloud servers for analysis and take proactive measures to avoid any disturbance. However, due to remotely placed cloud servers with increased propagation delay and with the emergence of fog-computing nodes, which are created by placing computing nodes in the near vicinity of smart city applications, fog-computing nodes are now becoming a permanent part of IoT-based smart cities, as shown in
Figure 1.
Smart cities rely on IoT applications, which use numerous sensors to transmit data to other nodes by sharing the medium. Different medium access control (MAC) protocols have been designed for wireless sensor networks. MAC protocols are differentiated into contention-based and contention-free access. In contention-based MAC protocols, data-sending nodes have to contend with other nodes to transmit their data within the medium [
7,
8]. However, in contention-free MAC protocols, data-sending nodes are assigned dedicated slots to transmit their data without contending with other nodes [
9,
10,
11,
12]. The increased number of nodes increases the probability of collisions in contention-based MAC protocols; hence, contention-free MAC protocols are preferred in such environments.
Wireless mediums in IoT networks are vulnerable to malicious nodes causing network collision, denial of service, and unfair allocation [
13]. The presence of malicious nodes raises a question as to the trust level of the nodes’ requests, and a trust level of the networking nodes is required, resulting in compromised QoS in the networks [
14,
15,
16,
17]. Attacks during the contention period are hard to identify because there are already chances of collision, medium busyness, and unfairness due to system occupation by other nodes. Thus, contention-free MAC protocols are preferred over contention-based MAC protocols because there are dedicated slots for each node and because interference of any other node can easily be determined. However, in contention-free MAC protocols, malicious nodes acting as member nodes are allocated dedicated slots in each communication session and disturb the medium, leading to reduced medium utilization.
In smart cities, different applications require sensor nodes to collect and transmit data in various time intervals. These data requirements may change based on the situation and need to be adaptable. A classic TDMA-based MAC protocol with fixed-duration time slots for all nodes is not recommended because each node is assigned a fixed-duration time slot in each communication session. If a node wants to transmit more data than the assigned allocation, it may not be possible during that communication session. To meet these adaptive data requirements, an adaptive TDMA-based MAC protocol with enhanced medium utilization with secure and reliable data communication is required. This can be achieved by implementing a trust management algorithm that verifies the authenticity of nodes [
18,
19].
This research work proposes a time-slot-based medium access control protocol to meet adaptive data requirements () of trusted nodes for fog-enabled smart city applications. distinguishes between malicious and trusted nodes, and guaranteed time slots (GTSs) are only assigned to the trusted nodes. The salient features of are mentioned below.
A trust mechanism for fog nodes to differentiate the data forwarded from the legitimate and malicious nodes.
An efficient TDMA-based MAC protocol for IoT nodes to transfer their data in a contention-free manner to meet adaptive data requirements.
TMPAD allows varying lengths of communication sessions. If the number of data-requesting slots is less, the session is reduced. However, if the slot requests increase, the session size increases till a certain threshold.
TDMA slots are assigned to the nodes by applying TOPSIS and 0/1 knapsack algorithms.
The organization of the manuscript is as follows:
The previous studies and trust-based data management in different areas of communications applications are discussed in
Section 2. Our proposed TDMA-based MAC protocol with different frame structures, a trust management system, and the slots allocation mechanism are described in detail in
Section 3. Comparative performance analysis of the proposed scheme with other well-known algorithms, along with extensive simulation results, is discussed in
Section 4, and
Section 5 provides the conclusion of our manuscript.
2. Related Work
IoT-based smart city applications rely on secure wireless communications and require efficient techniques to detect malicious attacks and evaluate the trust of the IoT nodes. Trustful communication between different wireless nodes is an important area of research these days.
In [
20], the authors examined the trade-off between benefits and risks associated with trustworthy communication. They introduced an adaptive trust-based situation-aware access control framework, known as MATS, which incorporated semantic web technologies and game theory. The proposed framework used the dynamic and adaptive nature of the network, and its performance was evaluated through experimental results.
In [
21], the authors proposed a trust framework for IoTs and UAVs in the scenario of vehicular networks. The proposed framework implemented security and privacy measures to enhance the trust level of high-priority vehicle safety data. Additionally, the work proposed a trajectory optimization algorithm to establish a trustworthy agreement between nodes for data collection. The proposed framework improved the trust level of vehicle safety data by 33.34%.
In [
22], the authors proposed a framework named MapReduce to manage trust in big data. The proposed framework reduced data complexity and applied a trust mechanism using the bipartite matching algorithm. Furthermore, the work allocated trust-based time slots to the network users. Results showed a 94.7% improvement in searching the big data as compared to the exhaustive search technique.
The authors in reference [
23] addressed the necessity for reliable data in online networks, highlighting potential threats such as the creation of fraudulent accounts. They introduced a trust-aware framework designed to identify malicious users and utilized a data-balancing technique to pinpoint nodes causing disruptions in terms of frequent message sharing. Through extensive experiments, it was shown that the proposed scheme enhances data precision by 59.16% compared to baseline algorithms.
In reference [
24], the authors presented a trust-based attestation model to mitigate challenges arising from virtual networks in online real estate scenarios. The model uses rule-based decision making to recognize legitimate users of property data, thus establishing trust to foster reliable applications for authorized data users. The work also implemented the prototype of the proposed trust management system on an open-source MANO platform.
Exploiting evidence theory, the authors in reference [
25] proposed a decentralized service-oriented trust management model, concentrating on an IoT-based healthcare system. The work introduced a reward and punishment system where legitimate healthcare service providers are rewarded and punitive measures are applied to malicious users. The proposed system enabled trust in healthcare services and recommendations by providing security against on–off attacks, bad-mouthing, and good-mouthing simultaneously.
3. Proposed Scheme
Smart-city-based IoT applications use a Wireless Personal Area Network (WPAN) comprising IoT devices, sensors, and computing servers. IoT devices face security attacks by different malicious nodes that corrupt the data and increase the chances of collisions while accessing the medium for data transmission. It is hard to identify attacks by malicious nodes when they become a member of the network. In addition, malicious attacks in accessing medium during the contention access period are hard to identify and may cause a collision. That is why contention-free medium access control protocol is preferred over contention-based MAC protocol in wireless sensor-based IoT networks. A proposed time-slot-based medium access control protocol to meet adaptive data requirements (TMPAD) is designed for IoT-based wireless networks in fog-enabled smart cities. The protocol aims to provide a collision-free environment for nodes to transfer varying amounts of data while identifying and preventing malicious attacks. TMPAD’s main features include the following:
Offers scalability by allowing new nodes to become members of the WPAN in each session.
Modifies data slots to align with the adaptive data requirements determined by GTS-requesting IoT nodes.
Computes the trusted data by calculating the trust level of each node.
Efficiently allocates GTS to accommodate more GTS-requesting nodes with better data transmission and higher mean trust value by applying the TOPSIS algorithm.
A list of notations used in
Section 3 and
Section 4 of this manuscript, along with their descriptions, are mentioned in
Table 1.
3.1. Communication Round of the Proposed Scheme
The communication round in the proposed MAC protocol comprises multiple sessions. Each session starts with a beacon frame, followed by a contention access period, an announcement period, and a data transmission period, as shown in
Figure 2.
3.1.1. Beacon Frame
The beacon frame of each session in the proposed scheme informs other nodes about its presence and informs nodes about the CAP duration (
CD) with the help of TDMA slot duration (
SD) as follows:
However, SD is calculated by following the modulation scheme and symbol rates used in IEEE 802.15.4 standard [
26] by allowing 4 bits/symbol with a symbol rate of 62,500 symbols/s and a data rate of 250 kbps as follows:
and the number of bits in an SD (
) is calculated as
3.1.2. Contention Access Period
During the contention access period, all nodes contend with each other in accessing the medium by applying the CSMA/CA algorithm. In this period, two types of requesting frames are received by the PAN coordinator, such as
Nonmember nodes after listening to the beacon frame message send a join request (JR) message to the PAN coordinator to become a member of the WPAN. The frame includes the information of the requesting node ID. In response, the WPAN coordinator allocates the requested node a membership during the next beacon frame message and allocates a unique 8-bit short address. All the member nodes in a WPAN are allocated a unique 8-bit short address for their identification. This limits the size of WPAN to 256 nodes.
All member nodes that are assigned a short 8-bit address are allowed to send their data during the contention-free period by allocating GTS. Nodes without allocating a short address are not allowed to send their GTS request to the WPAN coordinator. Nodes having data transmit a GTS request to the WPAN coordinator with the number of slots required to send their data. Nodes calculate the number of GTS required (
) in transmitting their data with the help of data slot capacity and the amount of data (D) required to be transmitted as follows:
3.1.3. GTS Announcement Period
The WPAN coordinator, after successfully receiving all the GTS requests, informs nodes about their slot allocation in the GTS announcement period (
). In addition, the PAN coordinator also informs about the total number of GTS assigned to the nodes, which helps nodes to know about the start of the next beacon frame. Each node is informed about its allocated slot by providing information about the starting slot and the number of requested slots assigned to the node. The duration of the GAP varies in each session and depends upon the number of GTS assigned to GTS-requesting nodes in each session. A complete GTS announcement frame is shown in
Figure 3.
3.1.4. Data Transmission Period
At the end of the announcement period, nodes know their allocated GTS. The data transmission period (
) comprises a number of TDMA slots and allows nodes to transfer their data without contending with other nodes. All those nodes that are allocated GTS are allowed to send their data to the WPAN coordinator in their assigned data slots. DTP varies according to the number of slots allocated to the GTS-requesting nodes. However, the maximum duration of a DTP (
) in a session is calculated as follows:
If the number of GTS requests is less than the available slot limit, all the nodes are assigned GTS according to their requests on a first come first serve (FCFS) basis. However, if the number of GTS requests is more than the available slots limit, GTS will be allocated to nodes by applying the TOPSIS algorithm, as described in
Section 3.3.1. A communication session concludes once all nodes transmit their data during the DTP.
3.2. Trusted Data Identifications
Infiltration of malicious nodes in IoT networks degrades the performance of the network. Malicious nodes being network members seriously degrade the network’s performance as they are not easily identified. This section outlines a method to identify the trustworthy data. assists fog nodes in differentiating the malicious and legitimate nodes by evaluating the probability of trusted and malicious nodes within a WPAN.
The trust level of a node is established through the assessment of its interactions with neighboring nodes during packet exchanges. More precisely, it is determined by the accurate reception of requested data packets in response to the generated requests. For example, if a node
X transmits
A requests to its neighboring node
Y and receives
B response files from node
Y, with
denoting the corrupted files received, the trust probability of node
X for node
Y (
) is calculated as follows:
where the channel capacity (CC) between two links is calculated by using Shannon capacity [
27] as follows:
where
is the signal-to-noise ratio, and
B represents the bandwidth. The higher the trust value, the higher the trust level of the neighboring node.
Each node computes the trust value for every directly connected neighboring node. In the case where there are
m nodes situated close to a trust-finding node
, and the trust value for each neighboring node is established using Equation (
6), the collective trust value of
is then calculated as follows:
The potential threat arises from a malicious node capable of transmitting a deceitful trust value, whereas a genuine node would accurately relay the true trust value of its neighboring nodes. Consequently, depending solely on this parameter is insufficient for determining the trustworthiness of a node. To authenticate the trust value provided by a node, it becomes essential to collect input from other nodes within the clustering network. All nodes directly linked to the trust-finding nodes are required to transmit their trust values concerning the trust-finding node to the PAN coordinator, as shown in
Figure 4. This procedural step aids in the assessment of the trust value associated with each neighboring node.
The trust value of a node by all its available
N neighbors
is calculated as
To calculate the trust probability of all nodes in a cluster, a weighted metric is assigned to the trust values calculated in Equations (
8) and (
9) as below.
A high weight is assigned to the neighboring trust value, as calculated in Equation (
9).
A low weight is assigned to the self-calculated trust value, as determined in Equation (
8).
A sigmoid function is defined to determine the trust probability for each network node in a WPAN and is calculated as follows:
A higher probability of trust value means that nodes are legitimate and their GTS requests needs to be preferred over the nodes with reduced probability. However, if the trust probability is less than a critical value then its GTS request will not be entertained. Algorithm 1 represents the complete procedure.
Algorithm 1: Trust-evaluating algorithm. |
|
3.3. GTS Allocation Procedure
All the member nodes who have data calculate the number of GTSs required to send their data with the help of Equation (
4). The WPAN coordinator, after receiving all these requests, discards the GTS requests that are originated by the malicious nodes and calculates the total number of GTS requests originated by the nonmalicious nodes. If the total number of GTSs requested by the nodes is within the available GTS limit of the session, as mentioned in Equation (
5), then all the nodes are assigned GTSs according to their demand by applying the TOPSIS algorithm, as mentioned in
Section 3.3.1. Suppose the number of GTSs is more than the available limit of the session. In that case, the PAN coordinator scrutinizes the nodes by applying the 0/1 knapsack algorithm, as mentioned in
Section 3.3.2. If the number of GTSs exceeds the session limit, the PAN coordinator evaluates nodes using the 0/1 knapsack algorithm outlined in
Section 3.3.2.
3.3.1. TOPSIS
If the number of GTS requests received by the PAN coordinator is less than its available slot capacity, then all the GTS requests will be entertained by informing all the successful nodes about their time slot information. Due to adaptive data slot requirements with varying channel conditions and the waiting time to transmit data, a technique for order performance by similarity to ideal solution (TOPSIS) is applied to determine the priority of the GTS-requesting nodes. The node with a higher TOPSIS value will be assigned GTSs before the other nodes.
In this work, the TOPSIS value is calculated by considering the following parameters.
Trust value: The trust value of the requesting nodes is accorded the highest weight in the TOPSIS calculation, as detailed in
Section 3.2. This ensures that nodes with a higher level of trustworthiness are given precedence in GTS allocation.
Emergency data: Priority is assigned to nodes presenting emergency data, such as critical patient health parameters. This proactive approach ensures that nodes with urgent data transmission requirements are prioritized for GTS allocation.
Channel capacity: Considering the communication channel’s pivotal role in data transfer from IoT nodes to the PAN coordinator, the TOPSIS algorithm factors in the channel capacity. A superior communication channel is favored, as it enables the PAN coordinator to achieve better data rates during the data transfer process.
Data request failure: Nodes that were not allocated GTS in the last session receive preferential treatment in the TOPSIS calculation. This ensures a fair and adaptive allocation strategy, taking into account the historical performance and needs of the nodes.
By integrating the TOPSIS algorithm into our GTS allocation framework, we aim to optimize the prioritization process, considering dynamic data slot requirements and varying channel conditions. This adaptive approach enhances the efficiency and responsiveness of our PAN coordinator in managing GTS requests, ultimately contributing to the overall robustness of our wireless communication system.
The TOPSIS algorithm is applied to guaranteed time slot (GTS) allocation, where the goal is to rank alternatives (nodes) based on their performance across multiple criteria, as shown in Algorithm 2. In the first step, each criterion value for each alternative is normalized to bring them to a comparable scale. This is achieved by dividing each criterion value by the square root of the sum of the squared values for that criterion across all alternatives. Next, the normalized values are then multiplied by their respective weights and summed to obtain a weighted normalized value for each alternative. This step incorporates the importance of each criterion in the decision-making process. Further, for each criterion, the maximum (ideal solution) and minimum (negative-ideal solution) values across all alternatives are determined. These values represent the best and worst possible performances for each criterion. Then, Euclidean distances are calculated for each alternative based on the differences between the weighted normalized values and the ideal and negative-ideal solutions. This step quantifies how close or far each alternative is from the ideal and negative-ideal solutions for each criterion.
Algorithm 2: TOPSIS algorithm for GTS allocation. |
|
After that, the relative closeness values are calculated for each alternative by following the criteria described in TOPSIS algorithm [
28], as shown in Equation (
11).
Here, and are the distances calculated from the positive and negative ideals, respectively.
After that, the relative closeness values for all criteria are combined into an overall TOPSIS value for each alternative by following Equation (
12).
This step ensures a balanced consideration of all criteria. Finally, alternatives are ranked based on their overall TOPSIS values in descending order. The higher the TOPSIS value, the better the alternative is considered in terms of GTS allocation.
The algorithm provides a systematic and quantitative way to evaluate and rank alternatives considering multiple criteria. It is particularly useful in decision-making scenarios where a trade-off between different criteria needs to be made.
3.3.2. 0/1 Knapsack Algorithm
When the number of GTS requests is more than the available GTSs in that session, then it is not possible for the PAN coordinator to allocate GTSs to all the legitimate requested nodes, and it needs to scrutinize them.In this work, an optimal GTS allocation mechanism based on the 0/1 knapsack algorithm is proposed. The 0/1 knapsack problem optimally scrutinizes the most valuable items within the available sack capacity.
The nodes have different amounts of data with different priority levels that are required to be sent to the fog node acting as a PAN coordinator. In addition, all the nodes do not have the same channel capacity. If we represent the number of available GTSs in a session as
, and the GTS requests received by the PAN coordinator from node
i as
, along with its calculated TOPSIS value
, we can map the GTS scrutiny problem to the 0/1 knapsack problem. This can be seen in
Table 2.
Suppose T legitimate nodes require N number of GTS slots to transmit their data to the PAN coordinator. The proposed 0/1 knapsack-based algorithm scrutinizes k number of GTS-requesting nodes to send their data in the allocated TDMA-based slots by meeting the following two constraints:
The requested slots should be allocated within the available limit and are represented as
The GTS-requesting nodes must be selected to maximize the TOPSIS values of the selected nodes.
The proposed knapsack algorithm to scrutinize the requested nodes is shown in Algorithm 3.
Algorithm 3: Optimal GTS allocation criteria. |
|
4. Results and Analysis
To analyze the performance of the proposed MAC protocol, a system model based on multiple IoT-based smart sensors with adaptive data requirements creates a WPAN in a smart city. These IoT nodes may comprise some malicious nodes that disturb the TDMA-based medium by requesting the number of TDMA-based time slots. All the nodes in the WPAN transfer their data to the fog node acting as a PAN coordinator by using TDMA-based time slots in a contention-free manner.
WPAN comprises a total of
J nodes comprising
K legitimate nodes and
M malicious nodes. If one of the WPAN nodes
i requests
slots in transferring its data in a session to the PAN coordinator, then the number of slots requests received by a fog node in a session
a (
) is calculated as
If node
i transmits
amount of data in its allocated time slots and
N nodes are successfully assigned GTSs in transmitting their data in a session, then the data that are transmitted in
X number of sessions (
) are calculated as
If there are
B malicious nodes that are allocated TDMA slots during these sessions, then the total data transmitted by only legitimate nodes (
) during
X number of sessions are calculated as
The data transmission time of a node is calculated as the time when a node has data to send until it successfully transmits all its data to the PAN coordinator. The data transmitting time of slots allocating time depends upon the data size as well as the channel capacity between the data transmitting node and the PAN coordinator. If the transmission time of node
i in transmitting its time during a session is
, and
P nodes successfully transmitted their data during that session, then the network delay
of all the GTS-allocating nodes in a session is calculated as
For
X number of sessions, the total network delay (
) is calculated as
If there are
B malicious nodes among the successfully allocated nodes, then the time calculated in transmitting the data of only legitimate nodes during
X number of sessions
is calculated as
Nodes have different times for transmitting their data to the PAN coordinator. If there are
nodes that transmitted data during
X sessions and there are
malicious nodes during these sessions, then the average transmission delay of all slots allocating nodes and of legitimate nodes for
X are represented as
and
, respectively, and are calculated as shown in Equations (
21) and (
22).
To assess the effectiveness of
from various perspectives, we set up a simulation environment that covers a wide range of possibilities that can be experienced by the network, ranging from 50 to 150 nodes. The network mostly comprises legitimate nodes and there are two to four malicious nodes in the network as, generally, the malicious nodes will be fewer than the legitimate nodes. These IoT nodes are a member of a WPAN and the fog node is their PAN coordinator. The data rate is 250 kbps. The simulation environment also considers the varying bandwidth as well as varying power of the transmission of the node’s data, as these are the resources that can be adjusted for data transmission. The simulation parameters used in this simulation environment are shown in
Table 3.
The results of the proposed scheme in this simulation environment are compared with well-known standards such as first come first serve (FCFS) [
29], longest job first (LJF) [
30], and shortest job first (SJF) [
31] algorithms. The comparative analysis includes transmitted data, number of GTS-requesting nodes entertained, transmission delay, and the mean trust value of GTS-allocating nodes for varying numbers of data-requesting nodes, for varying channel bandwidth, and for varying signal power. Furthermore, the performance of the proposed scheme is compared in different prospects with 0/1 knapsack, FCFS, SJF, and LJF for varying trust threshold values.
4.1. Data Transmission
Data transmitted is calculated for a node that is allocated its requested GTS to transmit its data. In this section, data transmission by the legitimate node is calculated for a complete communication session. The results are evaluated for varying numbers of GTS-requesting nodes, for varying transmitting power, and for varying bandwidth capacity.
Results shown in
Figure 5 are observed for varying numbers of GTS-requesting nodes received by the fog node. It is evident from the results that when the number of GTS-requesting nodes is 50 then GTSs allocated to the nodes in TMPAD select nodes in such a way that maximum data are transmitted within a session. This difference with other competitors increases with the increase in data-requesting nodes with the same number of data slots. It is because the proposed scheme by applying TOPSIS and the knapsack algorithm allows more data to be transmitted within a session; however, the other three standards do not scrutinize data-requesting nodes intelligently and almost the same amount of data is transmitted with the increase in data-requesting nodes.
Results in
Figure 6 and
Figure 7 show the amount of data transmitted by nodes for varying trust probability of the networks calculated and for varying transmission power of 100 data-requesting nodes. It is evident from the results that the data transmitted in a session by the proposed TMPAD is significantly more than the other three standards.
Figure 6 shows that when GTS-requesting nodes have varying channel bandwidth, the higher the channel bandwidth, the more the data can be transmitted by a node. These results show that with the increase in channel bandwidth, the data transmitted by all session nodes increases. However, TMPAD allows significantly more data as compared to the other three algorithms. The results in
Figure 7 are observed when the transmitting power of the GTS-requesting node is increased. The results show that increased transmission power increases the data transmission capability of a node. It is evident from the results that TMPAD allows more data-transmitting nodes to transmit their data within a session as compared to the other three standards for all different values of transmission power.
4.2. GTS-Allocated Nodes
Fog nodes, after receiving several GTS requests during CAP of a session, scrutinize the nodes that are allowed to send their data in their allocated GTS during that session. The proposed
assists fog computing nodes in scrutinizing nodes by applying the 0/1 knapsack algorithm on TOPSIS values. However, FCFS assigns GTSs to nodes by applying a first come first serve algorithm, SJF allocates GTSs to those nodes first which have initiated the least number of time slot requests, and in LJF, the nodes with the highest slot requests will be allocated GTSs first. The results are compared for varying numbers of nodes, varying channel bandwidth, and varying transmission power of the GTS-requesting nodes and are shown in
Figure 8,
Figure 9 and
Figure 10, respectively.
Results shown in
Figure 8 verify that the
entertains more GTS-requesting nodes in a session as compared to the other three algorithms. When the number of GTS-requesting nodes is 50, then
scrutinizes 32 legitimate nodes to transmit their data as compared to 20 legitimate nodes in other algorithms within the same time slot capacity in a session, because
scrutinizes the nodes with higher trust values. However, the other three algorithms do not differentiate between legitimate and malicious nodes. With the increase in the number of GTS-requesting nodes, more legitimate nodes are entertained in
as it allocates GTSs to nodes efficiently to transmit more data. However, the other standards have the same number of GTS-requesting nodes because they have already fulfilled all of the available GTSs in the session.
Results in
Figure 9 and
Figure 10 verify that
allocates the same number of available GTSs to more GTS-requesting nodes as compared to the other three algorithms for varying channel bandwidth and varying transmission power of the nodes. Results in
Figure 9 show that the proposed
entertains more legitimate nodes in allocating GTSs as compared to all three standards. The increase in channel bandwidth allows nodes to send fewer GTSs for the same amount of data. This results in allowing more GTS-requesting nodes to assign their requested GTSs in a communication session. However, for all varying channel bandwidths,
allocates time slots to more GTS-requesting nodes as compared to the other three standards. The same trend follows for varying transmission power of nodes, as shown in
Figure 10. It is evident from the results that the
assigns the same number of GTSs to more GTS-requesting nodes for all different transmission power levels. The increase in power allows more data transmission capacity within a time slot, which allows nodes to transmit the same amount of data in fewer time slots, resulting in more GTS-requesting nodes to be assigned the same number of GTSs within a current session.
4.3. Transmission Delay
The data transmission delay of a node is calculated when a node has data to transmit until it successfully transmits its data in its allocated time slot. If a data-requesting node is not entertained in the current session then it will resend the GTS request again in the next session. However, its data transmission time will be calculated from the time when it originates its first GTS request to the fog node. The data transmission time in a session is calculated for only those nodes that are successfully allocated GTSs in the current communication session. The results are observed for varying numbers of GTS-requesting nodes, for varying channel bandwidth, and varying transmission power, as shown in
Figure 11,
Figure 12 and
Figure 13, respectively.
Results in
Figure 11 show the accumulated transmission time of all GTS-allocating nodes in a session for varying numbers of nodes. The results show that the nodes’ transmission time in TMPAD is longer than the other three schemes. This is because the TMPAD prioritizes GTS-requesting nodes that could not transmit their data in the previous session/s, and the longer time a node has to wait, the greater will be its priority towards the GTS allocation. This results in increased data transmission time of the nodes during that session. However, all other algorithms decide to scrutinize the GTS-requesting nodes by considering their current session request. The results show that in
, data transmission time is more than the other three standards. The same trend is observed in
Figure 12 when 100 nodes are sending GTS requests to a fog computing node in a session with varying channel bandwidth. With an increase in channel bandwidth, nodes can transmit more data in a slot, resulting in less requirement of GTSs in transmitting the same amount of data. This allows more nodes to be allowed to transmit their data in the allocated time slots in a session, prioritizing the waiting nodes and, consequently, increasing the accumulated transmission time of nodes.
Results in
Figure 13 are observed for 100 GTS-requesting nodes with varying transmission power. The results show that with the increase in transmission power, more nodes can transmit their data to the fog node in fewer time slots. This allows more GTS-requesting nodes to transmit their data in a session, resulting in more accumulating transmission time for all successfully allocated GTS nodes.
4.4. Mean Trust Value
The mean trust value in a session is calculated for all GTS-requesting nodes that have been successfully allocated GTSs. The results are calculated for varying numbers of nodes, for varying bandwidth, and for varying transmission power, as shown in
Figure 14,
Figure 15 and
Figure 16, respectively.
Figure 14 shows that the means trust value of all the successfully allocated nodes in a session in the proposed
is higher than the other three standards for varying numbers of nodes. It is due to the fact that
scrutinizes GTS-requesting nodes in transmitting their data by applying TOPSIS, and trust calculation is one of the important parameters in calculating the TOPSIS value. The results show that with the increase in the number of GTS-requesting nodes, the mean trust value of all GTS-allocating nodes remains similar; however, it is more than the other three standards.
Results in
Figure 15 and
Figure 16 further show that the mean trust value of all successfully allocated GTS-requesting nodes in
is higher than the other three algorithms for varying channel bandwidth and for varying transmission power, respectively.
Figure 15 shows that the mean trust value calculated for increasing channel bandwidth is 0.64, whereas mean trust values in all GTS-allocated nodes of all three algorithms are about 0.5. It means that
assists the fog node in scrutinizing GTS-requesting nodes with higher calculated trust values. However, all other algorithms do not scrutinize GTS-requesting nodes based on their trust values and, consequently, their mean trust value is less than the proposed scheme. The same trend is observed for varying transmission power, as shown in
Figure 16. It is evident from the results that the mean trust value calculated in
is significantly greater than the other three schemes, and up to 33% more mean trust value is achieved because
allows fog nodes to scrutinize nodes with higher trust values. However, the other three standards allocate GTS without considering their trust values, and some malicious nodes may also be entertained.
In the end, we evaluated the performance of our proposed scheme in different prospects for varying trust threshold values, as discussed in Algorithm 1.
Figure 17 comprises four subfigures, showing transmitted data of legitimate nodes, the number of GTS-requesting nodes entertained, the data transmission time of all the legitimate nodes, and the mean trust values. The results are compared with the 0/1 knapsack algorithm [
32] in addition to the other three standards. The results show that the proposed scheme allows more legitimate nodes to transmit their data as compared to the four other schemes. In addition, it allows more data to be transmitted by all legitimate nodes to the fog computing node. Another subplot shows that the time to transmit data by all the selected legitimate nodes is more than the other four schemes. This is due to the reason that the transmission time of only the successfully allocated nodes is calculated, and TMPAD allows more nodes to transmit their data as compared to the other four competing algorithms. The fourth subplot evaluates the mean trust value of the selected nodes that are allowed to transmit their data. The results show that the proposed scheme allocates GTS to those GTS-requesting nodes which have higher trust values as compared to the other four schemes.
5. Conclusions
In this work, a TDMA-based MAC protocol to meet adaptive data requirements (TMPAD) of trusted nodes for fog-enabled smart cities by applying TOPSIS and 0/1 knapsack algorithms is proposed. TMPAD efficiently scrutinizes the GTS-requesting nodes to increase their data transmission in a session, by allowing more number of GTS-requesting nodes to transmit their data with increased mean trust value. The results show that allows 110% up to 335% more data transmission in a session than the well-known standards of FCFS, SJF, and LJF for varying numbers of nodes, varying channel bandwidth, and varying transmission power. Furthermore, the proposed scheme entertains up to 188% more GTS-requesting nodes to transmit their data in a session, as compared to the other algorithms. The results further verify that the mean trust value calculated for GTS-allocating nodes in is up to 33% more than the other three algorithms for varying communication environments. However, the accumulated transmission time of all GTS-allocating nodes in is more than the other three algorithms because it allocates GTSs to more nodes and, consequently, more nodes require more time to transmit their data. The results show that data transmission time calculated in is 18% to 167% more, as compared to the other three algorithms with 110% to 335% more data transmission.