1 Introduction

Recent advances in nanotechnology have led to the development of nano devices that are equipped with the processor, memory, battery, transceiver and sensing units in nano-scale. A nano-machine is an integrated device with sizes ranging from one to a few hundred nanometers that is able to pursuit simple tasks such as sensing, plain computation, communication and local actuation [1].

A nanonetwork is formed through communication between nano-machines, they are capable of performing more complicated and collaborative tasks in the distributed manner such as drug delivery, health monitoring, military and industrial applications [2]. Networked nano-machines can carry out macro-scale objectives and cover a larger area varying from meters to kilometers, while a single nano-machine can only act in limited workspace and nano-scale targets [3].

Due to the small size of a nano-machine and its limited capabilities, there are different communication approaches for the interaction among nano-machines including mechanical, acoustic, chemical or molecular and electromagnetic communication patterns [4]. In nano-mechanical communication, the message is transmitted by a mechanical contact between sender and receiver. However, this approach is not useful for many cases because creating a physical and direct contact between two nano-machines is not always possible. In acoustic communication, the information is encoded in ultrasonic waves and is transmitted by acoustic energy such as pressure variations. However, the problem with this technique is that the size of traditional acoustic transducers is larger than the devices that can be incorporated into nano-machines. In molecular communication, the information is encoded in molecules as information carriers that move from sender to receiver. The electromagnetic communication is based on the transmission of information through modulation and demodulation of electromagnetic waves by components that are manufactured by novel nano-materials.

According to the problems of acoustic and nano-mechanical approaches, the molecular and electromagnetic are currently promising techniques for communication among nano-machines and building a nanonetwork. Obviously, wiring a large number of miniature nano-machines is not easily achievable. As a result, wireless communication is the enabling design for nano-networking [3, 5].

However, the size and complexity of contemporary electromagnetic transceivers do not make it possible to integrate them in nano-scale devices. As an alternative, the use of carbon electronic nano-components could be helpful to overcome this problem [1, 6]. Recent advances in nanotechnology and carbon nano-structures such as Carbon Nanotubes (CNTs) and Graphene Nanoribbons (GNRs) (known as derivatives of Graphene) have paved the way to produce nano-electronic components such as nano processors, nano memories, nano antennas, nano batteries, nano actuators and sensing units. Graphene is an one-atom-thick planner sheet that consists of carbon atoms arranged as a honeycomb lattice. The carbon materials have unique electrical and optical capabilities, including high-current capacity and high thermal conductivity that make them efficient in terms of energy consumption [7]. On the other hand, the mechanical strength of them is very high (stronger than steel), and the special lattice of carbon atoms allows them sensitive to the detection of adsorbed molecules (even detect single gas molecule). Considering the amazing features of graphene-based nanomaterials, the problem of wiring nano-machines and the limitation of size, a WNSN can be developed using the electromagnetic communication [8,9,10]. However, the use of common frequency ranges from hundreds of MHz to several GHz requires an antenna size in the order of centimeters, which is not possible for nano-scale systems. Therefore, a high operating frequency (0.1–10 THz) should be reserved for communication among nano sensors [1, 11]. Hence, the classical communication paradigms should be revised before being used in a nanonetwork. Characteristics of the Terahertz channel and the constraints of nano devices resulting in design of architecture and protocols to develop a WNSN with particular communication mechanisms. However, Terahertz band communications have been considered in prior research articles [1, 12, 14]. In addition, recent studies focus on issues such as protocol suites, network stacks and channel access procedures that could be applied when the technology is available for commercialization [12, 15].

Due to the high density of nano-nodes in WNSNs, the novel medium access control (MAC) protocols are critical to handle access to the Terahertz channel and to coordinate concurrent transmission among nano-nodes [16]. According to resource constraints of nano-machines, we need a MAC protocol with low complexity and high efficiency in terms of energy [13]. Moreover, generating high-power signal to sense the channel is very challenging in nanonetworks. Alternatively, pulse-based communications (will be explained in Sect. 2) can be used for data transmission among nano-scale devices. Therefore, it is not feasible to use the approaches based on carrier sensing such as CSMAFootnote 1 because there is no ongoing signal to sense the channel [1, 15, 17]. Also, asynchronous MAC protocols are the best candidates, because they do not require tight synchronization between all of the nano-machines and can easily be implemented [12].

In this paper, we propose a new nano MAC protocol namely EEWNSN-MAC and evaluate its performance using nano-sim, an open source simulator for nanonetworks, based on electromagnetic communication that is implemented in the NS-3 platform. The EEWNSN-MAC is located on top of a physical channel which is based on the characteristics of Terahertz channel. Also, it uses the advantages of clustering and TDMA algorithms to improve the energy consumption and the packet loss ratio compared with “Smart-MAC” protocol, a nano MAC protocol that has been already presented and simulated.

The rest of this paper is organized as follows. In Sect. 2, we review the related works, and previous MAC protocols that have been proposed for electromagnetic based nanonetworks. In Sect. 3, we present our novel MAC protocol for WNSNs. In Sect. 4, we present the simulation results and performance evaluation of the EEWNSN-MAC protocol. Finally, we conclude the paper in Sect. 5.

2 Related Work

In this section, we will review some of the previous nano MAC protocols and network architecture which have been already presented for WNSN.

Piro et al. [15] proposed and simulated a prototype protocol stack for the WNSNs. They focused on a WNSN application in a health monitoring scenario. They present a WNSN consists of three types of nodes: nano-node, nano-router and nano-interface, all of which constitute a hierarchical architecture. In this hierarchical structure, the nano-nodes are partitioned into small clusters. A nano-router is in charge of the data aggregation in a cluster and forwarding them to nano-interface. Their protocol stack consists of three layers: the network layer, Media Access Control (MAC) layer, channel and the physical layer.

2.1 Network Layer

Piro et al. consider two routing strategies namely the selective flooding routing and the random routing in their scenario. In selective flooding routing, when a node receives a packet, it broadcasts the message to all the devices within its transmission range. Thus, a packet generated by a node is rapidly propagated into the network.

In the random routing, the nano-nodes send a packet to a neighboring node that is randomly selected. First, nano-node attempts to send its packet to a nano-router, which is randomly selected among nano-routers within its transmission range. If there is no nano-router, the nano-node has to randomly send the packet to a neighboring nano-node.

2.2 Channel Access Procedures

In the MAC layer, they implemented two different asynchronous MAC strategies: the transparent-MAC and Smart-MAC. In transparent-MAC, the packet is easily forwarded from the network layer to the physical layer. In Smart-MAC, the packet received from the upper layer is kept in a queue until deliver to physical layer. Before sending out a packet, the MAC layer starts a handshaking process to find the neighbors of the node and when there is one or more node within its transmission range, it sends the packet to the physical interface. In addition, if the network layer has not already determined the next-hop, the MAC layer will select it randomly among neighboring nano-nodes. Moreover, a nano-node may not have any neighbors. In this case, the node waits a random back off time, and then it starts the handshaking process to find the nodes in its transmission region.

2.3 Channel and Physical Models

They built the MAC protocol on top of the TS-OOKFootnote 2, a pulse-based communication scheme in the Terahertz channel (described in next section).

Srikanth et al. [13] presented a MAC protocol for WNSNs. Their MAC protocol consists of two phases, the selection of a master node and the data transmission phases. In the selection of a master node, a node is chosen, which is equidistant from the other nodes. Then, to establish the communication, the selected master node must inform other nodes. In their scheme, the nodes are placed in small clusters. A cluster has a coordinator called cluster head (master node) and a number of member nodes. Clustering is formed in a two-tiered WNSN architecture, i.e., cluster heads and member nodes that make up the higher and the lower tiers, respectively. The cluster heads aggregate the data measured by member nodes and send it to the central base station through other cluster heads. Re-clustering is done periodically because all nodes are identical and the cluster heads consume more energy than the member nodes, then they should be replaced to conserve energy. There are two types of communication in their network: intra-cluster and inter-cluster. TDMAFootnote 3 scheduling can be used in intra cluster communication. After the selection of the cluster head, it sets the TDMA scheduling and broadcasts it to its cluster members. The data transmission stage is the communication of other devices with the master node. In this phase, when a node wants to send a packet, it sends a control packet to the master node. The nodes that request the channel are queued at the master node. After queuing, master node allocates the channel to member nodes by First Come First Served (FCFS) algorithm.

Jornet et al. [16] propose a new physical layer aware MAC protocol for electromagnetic nanonetworks in Terahertz band (PHLAME). This protocol is implemented on top of a novel pulse-based communication scheme called RD TS-OOK.Footnote 4 This scheme is based on transmission of the asynchronous femto second-long pulse, which follows an on-off keying modulation. It is the same as its simplified version, TS-OOK, but with a difference that it uses the benefit of the low-weight channel coding scheme. In other words, the time between symbols and the symbol rate are different for distinct nano-machines. So, every nano-machine uses a different symbol rate.  Using this scheme, the transmitter and receiver can jointly select the communication parameters and channel coding to mitigate the interferences among multi-user and maximize the probability of successfully received packets. This scheme prevents collisions between the sequential multiple symbols in a packet. Thus, collision in one symbol cannot continue on the next symbols of the packet and they can be received correctly. Therefore, RD TS-OOK helps neighboring nano-machines to transmit in orthogonal channels. In the end, they presented an analytical model to examine the performance of PHLAME in terms of energy consumption, packet latency and normalized throughput.

Wang et al. [18] have developed an energy and spectrum-aware MAC protocol for WNSN. They take advantage of hierarchical architecture of WNSN, so that all of nano sensors can directly communicate with nano-router through single-hop. This MAC aims to achieve fair throughput and lifetime optimal access to the channel by jointly optimization of the energy harvesting and consumption in nano sensors. To do so, they consider a parameter called the critical packet transmission ratio (CTR), the maximum allowable ratio between the transmission duration and the harvesting time, so below which the harvesting energy is more than consumed one and the perpetual data transmission is achieved. They believe that the nano sensor can harvest energy and replenish its battery in both transmission and sleeping times. Also, they introduced a symbol-compression scheduling algorithm that is applied to TS-OOk, i.e., by unique elasticity of time space between consequence symbols compress the symbol transmissions of multiple nano sensor to send in parallel without any collisions. Furthermore, they presented a packet-level timeline scheduling for theoretical capacity-optimal physical layer that indicates the order of packet transmission for nano sensors at a set of discrete uneven time instances causes the balanced single-user throughput and infinite network lifetime.

3 EEWNSN-MAC Protocol

In this section, we present a novel MAC protocol (EEWNSN-MAC) for mobile WNSN that consists of a number of nano-nodes, nano-routers and a nano-micro interface. The nano-nodes are randomly moving with constant velocity while the nano-routers and the nano-micro interface are stationary nodes. To limit the complexity of MAC procedures, the EEWNSN-MAC protocol supports a hierarchical architecture of the network, while combines clustering algorithm with a contention free communication style, TDMA. Therefore, the nano-nodes send their packets to the nano-routers based on TDMA scheduling. The nano-router then aggregates coming information and forwards it to a nano-micro interface. Finally, nano-micro interface sends the measurement information to a remote server by using an IEEE 802.11 wireless connection. In this paper, we have neglected the energy harvesting mechanism for nano sensors. However, energy efficiency and communication reliability are two critical issues in this WNSN, i.e., the information could be provided to the monitoring center with the lowest energy consumption and minimum packet loss ratio.

It was mentioned before, WNSNs support electromagnetic communications in the Terahertz band. Therefore, the transmission range is extremely short (almost a few tens of millimeters). In recent decades, the pulse-based communication approaches such as Impulse Radio Ultra Wide Band (IR-UWB) have been successfully used for high-speed communication systems. In IR-UWB, the pico-second long pulses are shared by users following the orthogonal time-hopping sequences. However, due to the complexity of the generation and distribution of orthogonal time-hopping sequences, this approach is not feasible in WNSNs. Therefore, a novel pulse-based communication approach such as TS-OOK or RD TS-OOK are required for nanonetworks (For more details, see [19]). The TS-OOK uses an on-off keying modulation rather than a binary pulse amplitude modulation (PAM) or pulse position modulation (PPM) that is employed in IR-UWB. The TS-OOK is based on the transmission of femto-second long pulses and follows an on-off keying modulation spread in time. In this scheme, a logical “1” is sent by a femto-second long pulse, whereas a logical “0” is transmitted by the silence of the transmitter. Also regarding technological limitations, time between symbols is fixed and much longer than the pulse duration, for example, the time between symbols is considered \(T_{s}=10\,\hbox {ps}\) while the pulse duration is \(T_{p}=100\,\hbox {fs}\) [15, 17]. It is important to ensure that TS-OOK makes a distinction between silence and no transmission. For this, an initialization preamble is used to identify that the transmitter is going to send a packet. Since the length of packets and the time between consecutive transmissions are fixed, after a nano-node detects an preamble, it does not require to continuously listen to the channel for the next symbol, result in saving more energy by nano-node [17]. In this paper, we will also build the proposed MAC based on TS-OOK scheme as physical layer communication paradigm.

Concerning the hierarchical structure of WNSN, the nano-nodes are partitioned into small clusters with a reference cluster head namely nano-router. As aforementioned, all nodes are not identical in WNSN, so the nano-router is more resourceful (larger computational and energy resources) than nano-nodes and is suitable for the aggregation and processing of information received from nano-nodes and forwarding it to a nano-micro interface [1, 12]. As a result, we assume that the nano-routers are in charge of the cluster head at all times and there is no need to rotate the cluster head periodically in a cluster. There are two types of communications in a cluster: intra-cluster and inter-cluster. In intra-cluster communication, nano-nodes by following TDMA scheduling and through multi-hop paths send packets to their own cluster head. Whereas in inter-cluster, the nano-routers can deliver the packets to nano-micro interface (serves as a base station in the network) directly or through other nano-routers. In this paper, we focus on intra-cluster communication. The inter-cluster communication is considered same as described in [15]. Therefore, it is important that the nano-node can detect the best nano-router and sends data to it. Our EEWNSN-MAC protocol is divided into rounds composed of three stages: the selection of the cluster head, scheduling and data transmission phases.

  1. (a)

    Selection of cluster head

    In this phase, the proposed MAC protocol uses a handshaking procedure to discover neighboring nodes. As a matter of fact, the nano-nodes broadcast a probe packet every \(T_{probe}\) to identify their neighbors. Every nano-machine that receives the broadcast packet will respond with an ACK packet that contains the information about its node-type and amount of energy. If there are any nano-routers within the transmission range of the source, it calculates the distance from each nano-router based on the propagation delay and then chooses the nearest one as the cluster head to which it will communicate.

  2. (b)

    Scheduling phase

    After the nano-node specifies the desired nano-router, it allocates specific time slots to this nano-node according to a symmetric allocation pattern. We consider a slot time equals the time is required for a packet transmission (Eq. 1).

    $$\begin{aligned} slotTime=WLT_{p}+(L-1)T_{i} \end{aligned}$$
    (1)

    where L is the packet length in bits, W is the coding weight symbol, i.e., the percentage of logical “1” in a packet which must be transmitted by a pulse. On average, the number of “1” is equal to “0” in a packet (\(W=0.5\)) [20]. The time \(T_{p}\) and \(T_{i}\) symbols stand for pulse duration and pulse transmission interval, respectively. It is clear that each node can only transmit during its time slot. Due to the fixed slots time, the node can estimate its time slot and sleep at other times [21]. Consequently, the idle periods and the data transmission to the closest nano-router can highly decrease the energy consumption of nano-nodes and prolong the network lifetime.

    However, Sometimes it may not be possible to select a nano-router as the next hop. Due to the mobility of nano-nodes, one of the following conditions may occur:

    • As mentioned earlier, there is one or many nano-routers in the transmission range of a node, and it selects the closest one as the next hop.

    • If there is no nano-router in the transmission range of a node, it must find the closest nano-node in its transmission range that has adequate energy to receive and transmit at least one packet, and also can directly forward the packet to a nano-router. In this case, the packet is sent to aforementioned nano-node for forwarding it to its nano-router. Suppose nano-node A decides to transmit its packet to nano-node B that can directly communicate with a nano-router. first, nano-node A sends a transmit request to it. nano-node B then accepts this request and sends its wake up pattern to it for receiving packets of nano-node A.

    • If there are neither the nano-router nor the nano-node which can directly access to a nano-router, our protocol will perform same as Smart-MAC and the node randomly selects one of its neighboring nano-nodes as the next hop and send the packet to it.

    • Finally, it is likely that there are not any nano-machines in the transmission range of the source. In this case, the MAC entity after a random back off period will start a new handshaking procedure to find nano-machines within its transmission range.

  3. (c)

    The data transmission phase

    In this phase, when the MAC layer of nano-node receives a packet from upper layer, it is not immediately sent to physical interface, but, it is stored in a specific queue. Before transmitting it, the MAC layer should discover the next hop that is done as explained in a and b steps. If a nano-router is selected as the next hop, then the nano-node will transmit the packets during dedicated time slots are allocated to it. Otherwise, if a nano-node with direct access to a nano-router is chosen as destination, the packets stay in the queue until the next hop’s wake up time slots, and then are forwarded to it. Obviously, the source node can turn off its radio during other times. Otherwise, the packets are transmitted to a randomly selected nano-node as soon as their turn comes. Finally, the MAC layer adds a header to the packet includes the sender ID, the next hop ID, packet ID and TTL, then sends it to the physical layer. Note that due to the hierarchical architecture of intended WNSN, the nano-nodes always try to send the packet in the direction of the nano-micro interface.

The EEWNSN-MAC protocol is described in Fig. 1. Figure 2 also shows a view of multi-hop communication in studied WNSN.

In multi-hop connection, a loop may be formed during the forwarding packet. Therefore, as described in [15], to avoid the loop, the pair [packet ID, next hop ID] belonging to recently sent packets is stored in memory. By default, we also assume the information of at most 20 recent packets is kept in memory.

Note, due to the mobility of nodes, there is the possibility that the distance between nano-node and its cluster head becomes greater than its transmission range and the communication link of them is broken. It is important to estimate \(T_{probe}\), the time that the nano-nodes should certainly start a new handshaking procedure (new round) to select another nano-router as possible. In this paper, we assume the mobile nano-nodes move linearly at a constant velocity \(\overrightarrow{v}\) in random directions whereas the nano-routers are fixed. We consider a communication disk model (as considered in [11]), a disk centered at the mobile nano-node with radius its transmission rang R. Cho et al. [22] demonstrate that, on average, \(2\lambda R\overrightarrow{v}\) links generate or break per unit time by a mobile node. Where, \(\lambda\) is the density of nano-routers in the network. As a result, \(T_{probe}\) equals the average time that it takes to generate a new link between mobile nano-node and other nano-router or break the old link between it and its cluster head. Thus, the time between consecutive rounds, \(T_{prob}\) is given by Eq. 2.

$$\begin{aligned} T_{probe}= \frac{1}{2\lambda R\mathbf {\overrightarrow{v}}} \end{aligned}$$
(2)
Fig. 1
figure 1

The EEWNSN-MAC protocol procedure

Fig. 2
figure 2

multi-hop communication in studied WNSN

In the next section, we will evaluate EEWNSN-MAC compared with a similar protocol called Smart-MAC. The reason that we only consider Smart-MAC for evaluation is the Srikanth’s algorithm paid no attention to requirements of Terahertz channel and there is no suggestion for communication scheme in physical layer which MAC layer founded on it. On the other hand, we do not utilize PHLAME algorithm, because it does not exploit a hierarchical structure also is based on a different pulse-based communication scheme (RD TS-OOK). Moreover, the Wang’s algorithm is based on one-hop communication and there is no discussion on mobility of nano-nodes.

In general, we believe that the EEWNSN-MAC protocol can perform better than Smart-MAC according to the following reasons:

  • First, we expect that the proposed MAC protocol consumes less energy than the Smart-MAC, because it tries to select the nearest nano-router for data transmission and uses the TDMA scheduling, thus, the node will only stay awake during a certain slot to send data.

  • Second, the EEWNSN-MAC protocol exploits the TDMA scheme as a collision-free algorithm. Therefore, the packets that belong to the same cluster can be sent without any collision. As a result, the EEWNSN-MAC protocol can be more reliable than Smart-MAC.

  • Third, due to the use of TDMA and periodic re-clustering, we envisage that the proposed MAC protocol can manage the high network traffic better than Smart-MAC.

4 Performance Evaluation

In this section, we evaluate our proposed MAC protocol in comparison to “Smart-MAC” (detailed in [15]) in terms of three critical evaluation metrics for a WNSN namely the total energy consumption per packet, packet loss ratio and scalability. Towards this end, we have simulated both protocols in a WNSN composed of nano-nodes, nano-routers and a nano-micro interface. The nano-nodes are randomly deployed and moving with constant velocity around the workspace area. The nano-routers are uniformly distributed throughout the simulation area as well as the nano-micro interface is located at the center of the field. As previously mentioned, we utilize TS-OOK as simulated communication scheme in physical layer of our WNSN. According to [15], due to high density of nodes in WNSN, the transmission procedure of any single pulse can increase the complexity of the system in simulating, because at the end of each reception we need to check the pulse for error. Therefore, we use a channel and a physical model same as [15]. So, the packet transmission steps are considered as:

  • The MAC layer, after performing the channel access procedure sends the packet to the physical layer for transmission to the destination [15].

  • The physical layer adds a data structure to the transmission signal that contains the beginning time of transmission, pulse duration (\(T_{p}\)), pulse transmission interval (\(T_{i}\)) and the transmission duration (slotTime).

  • When the packet reaches the destination, it checks whether there is a physical collision during receiving time. In order to detect the overlapping pulses, the receiver node exploits the above transmission parameters of received pulses to rebuild the sequence received pulses during the time takes for receiving the packet. Then it checks the overlapping pulses, if the packet has been received free of collision, it will be forwarded to the MAC layer. Otherwise, it will be discarded [15].

In the next subsections, first, we briefly overview the evaluation parameters then present the simulation results and will discuss how EEWNSN-MAC improves the network performance.

4.1 The Evaluation Parameters

4.1.1 Energy Consumption Parameter

One of the challenges in WNSN is the limited energy resource that is stored in a nano-battery [20]. In general, the energy consumption consists of the energy that is consumed by the transmitter and receiver. At this time, it is impossible to measure the energy consumption of graphene-based nano-electronics [16]. So, we only focus on the energy that is consumed by the communication process in our simulation. As described, for pulse-based communication, it can be observed that the energy is consumed only during transmission of “1”. It is presumed that a packet consists of \(N\,bits\) including header and payload bits. The energy is needed to send and receive a packet is given by equations (3) and (4) [20]:

$$\begin{aligned} E_{packet-tx}= & {} N_{bits}.W.E_{pulse-tx} \end{aligned}$$
(3)
$$\begin{aligned} E_{packet-rx}= & {} N_{bits}.W.E_{pulse-rx} \end{aligned}$$
(4)

where \(E_{pulse-tx}\) and \(E_{pulse-rx}\) are the energies that are needed in order to transmit and receive a pulse, respectively.

4.1.2 Communication Reliability

In WNSN, we evaluate communication reliability as packet loss ratio. The PLR parameter refers to the percentage of packets that are lost due to the inter-cluster collisions or the expiration of the TTL. The packet loss ratio can be estimated from equation (5):

$$\begin{aligned} PLR= \frac{packet_{sent}-packet_{received}}{packet_{sent}} \end{aligned}$$
(5)

where \(packet_{sent}\) is the number of packets sent by sources (nano-nodes) and the \(packet_{received}\) is the number of successfully received packets by nano-micro interface.

4.1.3 Scalability

Scalability is the ability of a network to handle a large amount of workload. Therefore, we evaluate the scalability of EEWNSN-MAC protocol by increasing the number of transmitter nano-nodes (i.e., increasing the packet generation rate). Finally, to evaluate the scalability, we compare the PLR and energy consumption of the network for different density of nano-nodes.

4.2 Analysis of Simulation Results

To evaluate our proposed MAC protocol, we consider two important factors in simulations, the different density and transmission range of nano-nodes in the network. In this regard, we have considered two different scenarios to compare EEWNSN-MAC protocol with Smart-MAC in terms of the energy consumption and the PLR. The value of simulation parameters are given based on [12, 15, 20] in Table 1.

Table 1 Simulation parameters

4.2.1 First Scenario: Direct Communication with Nano-Micro Interface

In first scenario, we consider a certain percentage of nano-nodes to be cluster heads. Therefore, we have deployed the nano-routers to be 10% of the total number of nano-nodes in the network. In this scenario is assumed that all of the nano-routers can directly communicate with nano-micro interface. Figure 3a, b show the energy consumption and PLR in Smart-MAC and EEWNSN-MAC protocols for different density and transmission range of nano-nodes, respectively.

As Fig. 3a shows, the energy consumption of network per sent/received packet in EEWNSN-MAC protocol is far less than the Smart-MAC. The energy consumption of Smart-MAC dramatically increases for higher levels of the density of nano-nodes and transmission range. It caused by added neighboring nano-nodes within the transmission range of each transmitter node. As a result, the probability that a nano-node is selected as the next hop would be greater than the selection of a nano-router. Also, due to the random nature of Smart-MAC, the packet may travel more hop counts to arrive at the destination. On the contrary, EEWNSN-MAC protocol shows a slight increase in the energy consumption, because it tries to select the nearest neighbor as the next hop and takes the TDMA scheduling into account to reduce the power consumption.

As Fig. 3b shows, the PLR in EEWNSN-MAC protocol is much less than the Smart-MAC. The PLR decreases as the density of nano-nodes and transmission range increase, since the nano-nodes have more chances to find a multi-hop path to the nano-routers. Furthermore, the PLR parameter for Smart-MAC protocol is relatively high especially at 0.001 transmission range (larger than 80%). This means that there is no guarantee that the source can deliver the packets to the nano-micro interface (unreliable WNSN).

Table 2 shows the statistics for the first scenario. It can be observed that EEWNSN-MAC has improved the energy consumption and PLR in comparison to the Smart-MAC protocol.

Table 2 Average results in first scenario
Fig. 3
figure 3

Performance evaluation in first scenario. a Energy consumption of Smart-MAC and EEWNSN-MAC in first scenario. b PLR of Smart-MAC and EEWNSN-MAC in first scenario

4.2.2 Second Scenario: Indirect Communication with Nano-Interface

Depending on the radio range of nano-routers, they may not be able to directly communicate with the nano-micro interface. In this case, they should deliver the packets through other nano-routers and multi-hop communication. In other words, the nano-router forwards its packet to another nano-router as the next hop and this procedure continues until the packet reaches the nano-micro interface. Furthermore, the fact that a certain percentage of the nano-nodes are nano-router is not always possible. Hence, in this scenario, same as [15] we consider 50 nano-routers in the network that are evenly deployed throughout the region. In this scenario, we deploy the nano-routers in such a way there is at least one nano-router within the radio range any of them. Other simulation parameters are provided in Table 1.

Figure 4a, b show the comparison between the Smart-MAC and EEWNSN-MAC protocols for different density of nano-nodes and transmission ranges in terms of energy consumption and PLR parameters. As Fig. 4a depicts, EEWNSN-MAC protocol presents less energy consumption of network per sent/received packet compared with Smart-MAC. The energy consumption of Smart-MAC increases as the transmission range expands, while it can be seen in EEWNSN-MAC protocol, the energy consumption is only a little more when the density of nano-nodes and transmission range increase. As shown in Fig. 4b, the PLR in EEWNSN-MAC protocol is lower than the Smart-MAC. In EEWNSN-MAC protocol, the PLR would just reduce a small amount as the density of nano-nodes and transmission range increase, because the nano-nodes have higher chances to find a multi-hop path to the nano-router. Table 3 shows the EEWNSN-MAC improves the average energy consumption and PLR in the second scenario.

Table 3 Average results in second scenario
Fig. 4
figure 4

Performance evaluation in second scenario. a Energy consumption of Smart-MAC and EEWNSN-MAC in second scenario. b PLR of Smart-MAC and EEWNSN-MAC in second scenario

According to the curves in both scenarios, it can be found that the energy consumption and PLR of EEWNSN-MAC protocol do not significantly increase as the density of nano-nodes increase. As Figs. 5a and 6a show, the energy consumption of EEWNSN-MAC protocol slightly increases as the transmission range and the density of nodes increase. Therefore, the EEWNSN-MAC protocol demonstrates higher efficiency than Smart-MAC in terms of energy. In addition, Figs. 5b and 6b indicate that the PLR parameter of EEWNSN-MAC protocol in two scenarios could decrease as the density of nodes and transmission range increase. Therefore, EEWNSN-MAC protocol offers the more reliable network communication. This is especially considerable in the first scenario, because the PLR parameter of EEWNSN-MAC protocol is very low (less than 10%) at high density of nano-nodes. As a result, it can be concluded that the EEWNSN-MAC is potentially a scalable protocol.

Fig. 5
figure 5

EEWNSN Scalability in first scenario. a Scalability in energy consumption for first scenario. b Scalability in packet loss ratio for first scenario

Fig. 6
figure 6

EEWNSN Scalability in second scenario. a Scalability in energy consumption for second scenario. b Scalability in packet loss ratio for second scenario

5 Conclusion

In this paper, we presented a new Energy Efficient Wireless Nano Sensor Network MAC protocol (EEWNSN-MAC) for electromagnetic communication in the Terahertz band. We considered a WNSN consists of a number of nano-nodes, nano-routers and a nano-micro interface in a rectangular field. So that, it exploits the hierarchical structure and combines the TDMA scheme with a clustering algorithm for communication in the network. To evaluate the performance of EEWNSN-MAC protocol, we compared it with a similar nano-MAC protocol namely “Smart-MAC” in terms of energy consumption, PLR and scalability parameters. For this purpose, we presented two different scenarios for different density of nano-nodes and transmission range. In the first scenario, all of the nano-routers can directly communicate with nano-micro interface, whereas in the second scenario, the radio range of nano-routers is not enough and they have to use the multi-hop communication to send their packet toward nano-micro interface. The results showed that the EEWNSN-MAC protocol performs better than Smart-MAC protocol, in the best case (i.e. first scenario), EEWNSN-MAC protocol improved the energy consumption and PLR by 88 and 80% respectively, compared to Smart-MAC protocol. However, in this paper we did not discuss the mechanisms such as acknowledgement messages for data packets, packet retransmission or error control techniques. These features would be considered as future work and can be implemented by special fields in the MAC layer header. In addition, the effect of other pulse-based schemes such as RD TS-OOK on the MAC layer can be studied as used communication approach in the physical layer to reduce inter-cluster collisions.