nano-sim

Embed Size (px)

Citation preview

  • 8/11/2019 nano-sim

    1/8

    Nano-Sim: simulating electromagnetic-basednanonetworks in the Network Simulator 3

    Giuseppe Piro, Luigi Alfredo Grieco, Gennaro Boggia, Pietro CamardaDEE - Politecnico di Bari, Bari, Italy{g.piro, a.grieco, g.boggia, camarda}@poliba.it

    ABSTRACT

    The progress of nanotechnology is paving the way to theemerging concept of wireless nanosensor network (WNSN).In fact, it is now possible to create integrated machines atthe nano scale, which interact on cooperative basis usingwireless communications. The research in this field is still inan embryonal stage and the design of the WNSN protocolsuite represents a fundamental issue to address. Therefore,an open source simulation framework for WNSN would behighly beneficial to let research activities converge towardsparticipated design methodologies. In an our recent work,we presented a new NS-3 module, namelyNano-Sim, model-ing WNSNs based on electromagnetic communications in theTerahertz band. In its preliminary version,Nano-Sim pro-vides a simple network architecture and a protocol suite forsuch an emerging technology. In this paper, we significantlyimproved our previous work in several directions. First, wehave extended the tool by developing a new routing algo-rithm and a more efficient MAC protocol. Moreover, focus-ing the attention on a WNSN operating in a health monitor-ing scenario, we have investigated how the density of nodes,the transmission range of nanomachines, and the adoption

    of specific combinations of routing and MAC strategies mayaffect the network behavior. Finally, a study onNano-Simcomputational requirements has been also carried out, thusdemonstrating how the developed module guarantees greatachievements in terms of scalability.

    Categories and Subject Descriptors

    I.6.5 [Simulation and Modeling]: Model DevelopmentModeling methodologies; I.6.7 [Simulation and Model-ing]: Simulation Support SystemsEnvironments

    General TermsAlgorithm, Design, Performance, Verification

    Permission to make digital or hard copies of all or part of this work forpersonal or classroom use is granted without fee provided that copies arenot made or distributed for profit or commercial advantage and that copiesbear this notice and the full citation on the first page. To copy otherwise, torepublish, to post on servers or to redistribute to lists, requires prior specificpermission and/or a fee.

    WNS3, Cannes, French Riviera - March 5 2013Copyright 2013 ICST, ISBN .

    Keywords

    Nanonetworks, wireless nanosensor network, Modeling, Sim-ulation, Performance Evaluation

    1. INTRODUCTIONIn upcoming years, the innovation process triggered by

    nanotechnologies is expected to foster the development of in-

    tegrated devices, also known in literature as nanomachines(or nanodevices), with size ranging from one to few hun-dred of nanometers, very well suited for ICT, biomedical,industrial, and military applications [1]. Due to its limitedcapabilities, a nanodevice may only execute simple sensing,computing, actuation, and information storage tasks, butthis limit can be overcome considering more nanodevicesoperating in a coordinated fashion and communicating eachother [2]. In this way, the overall capability of many ofthem can be strong enough to create a wireless nanosen-sor network (WNSN), which can be very useful in severaldomains.

    However, the way information should be exchanged at thenano scale has not yet been defined once for all. Indeed, even

    if four diff

    erent communication modes (i.e., nanomechan-ical, acoustic, molecular, and electromagnetic) have beenpresented in literature, only those based on molecular dif-fusion and electromagnetic (EM) radiation seem to be themost suitable for really building a WNSN [4].

    The former supposes that nanodevices will be equippedwith transceivers able to encode information in molecules,whereas, the latter is based on the transmission and thereception of EM waves.

    We remark that the research on nanonetworks is still on-going and, for the time being, it has been mainly focusedon the characterization of the channel at the nano scale.Important contributions are provided in [3] and [10], wheresophisticated models for both molecular and EM communi-

    cations as well as the estimation of the maximum channelcapacity have been discussed. Today research, starting fromthese significant results, as well as considering the generalarchitectural guidelines in [2], is exploring protocol stacks,network architectures, and channel access procedures thatcould be adopted later on when the technology will be readyto the market.

    In this context, a flexible simulation tool would be highlybeneficial to support and let research activities converge to-wards common goals. At the time of this writing, severaltools, such as NanoNS [8], N3Sim [13], and the one pro-posed in [7], have been explicitly conceived for diffusion-based molecular communications. However, we have re-

  • 8/11/2019 nano-sim

    2/8

    cently presented in [16] an open source simulator for EM-based nanonetworks, namely Nano-Sim, developed withinthe Network Simulator 3 (NS-3) platform1. Despite thismodule poses the basis for the design and the evaluationof more complex network architectures, protocols, and al-gorithms related to WNSNs, it offers a protocol stack com-posed by a very simple Media Access Control (MAC), a rout-ing module based on the selective flooding strategy, and a

    generic unit for generating and processing messages.In this paper we notably improved our previous contribu-tion in several directions. First of all we extended Nano-Sim by implementing a more efficient MAC layer and anew random routing algorithm. The selective flooding rout-ing scheme has been ameliorated in order to avoid dupli-cate forward operations of the same packet, thus preventingan excessive waste of bandwidth. In addition, we carriedout a more thorough performance evaluation of a health-monitoring scenario where nanodevices are diffused into anartery for collecting information about chemical particlesand biological functions. In this study, several relevant fea-tures have been analyzed to highlight the impact of the den-sity of nodes, the way the transmission range of nanoma-chines may affect the behavior of the monitoring system, andthe performance gain deriving from the adoption of specificcombinations of routing and MAC strategies. Finally, a sig-nificant scalability study on the computational requirementsofNano-Simhas been also conducted.

    The rest of this paper is organized as follows. Sec. 2 de-scribesNano-Simas well as summarizes open issues relatedto WNSNs. The performance evaluation of a health-caresystem, as well as the scalability test, have been presentedin Sec. 3. Finally, Sec. 4 draws the conclusions and discussesplanned upgrades of the proposed module.

    2. MODELING EM-BASED NANO NETWORKSNano-Simhas been developed on top of NS-3, an emerg-

    ing discrete-event and open source network simulator, de-signed for replacing the popular NS-2 in both research andeducational fields. It has been conceived in a modular wayto enable graceful upgrades in the future. In addition, itscode is freely available under the GPLv2 license to boost itsdiffusion in the research community [15]. For this reason,we believe that implemented network architecture and pro-tocol stack represent a valid starting point for researchersinterested in evaluating novel nanonetworking solutions.

    Fig. 1 shows the UML diagram of the most importantclasses that compose the module, emphasizing the relation-ship they have with the NS-3 core. It is important to re-mark that the diagram only reports the most important datamembers and functions. Some details about relationships

    among objects have been omitted due to limited space.The following sub-sections provide a comprehensive pre-sentation ofNano-Sim features, with a major emphasis onthe potential contribution it could provide to the study ofWNSN open issues.

    2.1 Network ArchitectureThe definition of a novel network architecture for WNSNs

    is crucial to support the communication among nanoma-chines, as well as their interaction with the external world,

    1NS-3. Network simulator, available athttp://www.nsnam.org/.

    e.g., Internet. As suggested in [2], a generic WNSN shouldbe composed by three kinds of nodes (they may have a fixedposition or could be mobile according to the application):

    nanonodes: small and simple devices with very limitedenergy, computational, and storage capabilities. Theycan be diffused into a target area for capturing andproviding information about the environment.

    nanorouters: nano devices having sizes and resourceslarger than previous ones. They are in charge of aggre-gating and processing information coming from nanon-odes as well as controlling their behavior by means ofshort control messages.

    nanointerfaces: most complex nodes able to act asgateways between the nano and the micro scale world,that is they connect the WNSN to the rest of the world.They should be able to convert WNSNs messages to aconventional network system (i.e., WiFi, cellular net-works, and so on) and vice-versa.

    WNSNs can be adopted several domains, such as biomed-ical (e.g., health monitoring and drug delivery systems), en-

    vironmental (e.g., plants monitoring and plagues defeatingsystems), industrial (e.g., ultrahigh sensitivity touch sur-faces and interconnected offices), and military (nuclear, bi-ological and chemical defenses and damage detection sys-tems) [1]. We remark that, according to the application,each of the aforementioned nodes could have a fixed po-sition or could be mobile. For example, in an industrialscenario we can assume the presence of nanomachines instrategic locations for detecting some parameters such asthe intensity of the light, the movement of objects and peo-ple, the presence of specific chemicals in the air, and so on.In this case, all nodes maintain their position during thetime, so that the topology of the WNSN is static. On theopposite, in the health-care scenario, we could suppose the

    presence ofnanonodes in a body (i.e., within an artery)able to measure some biological parameters. Despite bothnanorouters and nanointerfaces could be placed in partic-ular points of the body, nanonodesshould be able to movewithin the medium (i.e., in our example following the di-rection of the blood), thus leading to a WNSN with a dy-namic topology. For all the envisaged scenarios, the networkconfiguration, the number of nanomachines, the communi-cations amongnanonodes, the interactions between themandnanorouters, and thenanointerfacesbetween a WNSNand the Internet still need to be investigated. Moreover,the design of the entire communication architecture shouldbe carried out taking into account the specific scope of aWNSN: one size fits all solutions cannot be deployed be-cause application domains entailed by such technology havevery different requirements.

    We modeled withinNano-Simall the aforementioned kindsof nanomachines, providing, for each of them, basic function-alities that could be improved and customized depending onthe scenario to be investigated. Furthermore, the possibil-ity to evaluate both static and mobile scenarios is supportdthanks to the integration of all the mobility models (i.e.,constant position, constant acceleration, constant velocity,random walk, random direction, and random waypoints) al-ready available in NS-3.

    In Nano-Sima device, which is identified by an uniqueDev-ID, has been conceived as a container of several entities,

  • 8/11/2019 nano-sim

    3/8

    NanoNetDevice

    +m_node: Ptr

    +m_phy: Ptr

    +m_mac: Ptr

    +m_routingModule

    +SetPhy(phy:Ptr): void

    +GetPhy(): Ptr

    +SetMac(mac:Ptr): void

    +GetMac(): Ptr

    +SendPacket(p:Ptr): void

    +ReceivePacket(p:Ptr): void

    +SetRoutingModule(routing:Ptr): void

    +GetRoutingModule(): Ptr

    ns3::NetDevice NanoMacEntity

    +m_device: Ptr

    +m_queue: std::list

    +SetDevice(d:Ptr): void

    +GetDevice(): Ptr

    +SetMacQueue(q:Ptr): void

    +GetMacQueue(): Ptr

    +SendPacket(p:Ptr): void

    TransparentNanoMacEntity

    +SendPacket(p:Ptr): void

    +DoSendPacket(): void

    ns3::Object

    ns3::SpectrumPhy

    NanoSpectrumPhy

    +m_mobility: Ptr

    +m_netDevice: Ptr

    +m_channel: Ptr

    +m_txPower: double

    +m_transmissionRange: double

    +SetTxPower(p:double): void

    +StartTx(p:Ptr): void

    NanoSpectrumChannel

    +m_phyList: std::vector

    +m_spectrumModel: Ptr

    +m_propagationDelay: Ptr

    +m_propagationLoss: Ptr

    +m_spectrumPropagationLoss: Ptr

    +StartTx(Ptr:params): void

    +StartRx(Ptr:params,

    Ptr:receivers): void

    +SetTransmissionRange(txrange:double): void

    +GetTransmissionRange(): double

    ns3::SpectrumChannel

    ns3::SpectrumSignalParameters

    +psd: Ptr

    +txPhy: Ptr

    NanoSpectrumSignalParameters

    +m_packet: Ptr

    +m_duration: Time

    +m_pulseDuration: Time

    +m_pulseInterval: Time

    TsOokNanoSpectrumPhy

    +m_pulseDuration: Time

    +m_pulseInterval: Time

    +m_state: enum:State

    +StartTx(p:Ptr): void

    +StartRx(params: Ptr): void

    +EndTx(): void

    +EndRx(params:Ptr): void

    +CheckCollision(params:Ptr): bool

    ns3::Header

    SmartMacEntity

    +SendPacket(p:Ptr): void

    +DoSendPacket(): void

    NanoNetworkHeader

    +m_sourceId: uint32_t

    +m_destinationId: uint32_t

    +m_ttl: uint32_t

    +m_packetId: uint32_t

    +GetSerializedSize(): uint32_t

    +Serialize(start:Buffer::Iterator): void

    +Deserialize(start:Buffer::Iterator): uint32_t

    +SetSource(src:uint32_t): void

    +SetDestinaiton(dst:uint32_t): void

    +SetTtl(ttl:uint32_t): void

    +SetPacketId(id:uint32_t): vois

    +GetSource(): uint32_t

    +GetDestination(): uint32_t

    +GetTtl(): uint32_t

    +GetPacketId(): uint32_t

    RoutingModule

    +m_dev: Ptr

    +m_mac: Ptr

    +m_receivedPacketsId: std::list

    +SetDev(dev:Ptr): void

    +GetDev(): Ptr

    +SetMac(mac:Ptr): void

    +GetMac(): Ptr

    +SendPacket(p:Ptr): void

    +ReceivePacket(p:Ptr): void

    +UpdateReceivedPacketId(uint32_t:id): void

    +CheckAmongReceivedPacket(uint32_t:id): bool

    MessageProcessUnit

    +m_dev: Ptr+m_packetSize: int

    +m_interarrivalTime: double

    +m_startTime: double

    +SetDev(dev:Ptr): void

    +GetDev(): Ptr

    +SetPacketSize(size:int): void

    +SetInterarrivalTime(time:double): void

    +SetStartTime(time:double): void

    +GenerateMessage(packet:Ptr): void

    +ProcessMessage(packet:Ptr): void

    SimpleNanoNetDevice

    RoutingNanoNetDevice

    GatewayNanoNetDevice

    RandomRoutingModule

    +SendPacket(p:Ptr): void

    +ReceivePacket(p:Ptr): void

    SelectiveFloodingRoutingModule

    +SendPacket(p:Ptr): void

    +ReceivePacket(p:Ptr): void

    Figure 1: UML class diagram ofNano-Sim.

    such as the message processing unit, the network layer, theMedia Access Control (MAC) entity, and the PHY interface.

    Since the TCP/IP suite cannot be directly adopted inWNSNs [2], we proposed a prototype protocol stack, whichis general enough to be considered as a starting point forfuture optimized solutions.

    The task of generating and processing messages is dele-gated to theMessage Process Unit, which can be finely tunedbased on the application requirements. The module holds aconstant bitrate source that creates periodically fixed-lengthpackets (both interarrival time and packet size can be mod-ified by the user), as it should be the case of WNSNs [2].Once a new message is created, the Message Process Unitsends it through the protocol stack to the physical (PHY)interface. On the contrary, when a new packet is correctlyreceived from the channel (i.e., no collisions are identified bythe PHY interface), it will be delivered to the network layerthat will verify if the message has been sent to the node.If so, the application data will be delivered to the MessageProcess Unit for processing. Otherwise the network layercould decide, according to the routing algorithm, to forwardthe packet.

    2.2 The Network LayerThe network layer is in charge of addressing and routing

    issues. In a WNSN, since nanomachines communicate atthe physical layer with very limited transmission ranges, itshould be essential to establish a multi-hop path between thesender and the receiver. Hence, the routing algorithm shouldefficiently handle multi-hop connections. To limit the com-plexity of routing operations, the WNSN could be organizedfollowing a hierarchical architecture [2]. In this way,nanon-

    odeswill be arranged in small clusters, each one having itsreferencenanorouter, which forwards nanomachine measure-ments towards the nanointerface. However, We cannot besure that every nanonode will be able to transmit directlyto its closestnanorouterbecause of its limited transmissionrange. This means that they should forward packets comingfrom nanomachines at the edge of the cluster to the referencenanorouter, and viceversa [2].

    Nano-Simprovides a flexible network layer that, support-ing both selective flooding and random strategies, can beused also to evaluate hierarchical routing operations.

    Before delivering the packet to the MAC entity, the net-work layer, independently on the adopted routing strategy,adds an header composed by five fields: source Dev-ID,sender Dev-ID, next-hop Dev-ID, packet ID, and Time ToLive (TTL). Source and senderDev-IDs identify the devicethat generated the message and the local node handling therouting strategy, respectively. Meanwhile the former field isset as soon as the message has been received from the Mes-sage Process Unitand it remains constant for the entire lifeof the packet, the latter one is updated hop by hop untilthe packet reaches the destination node. Thenext-hop Dev-ID defines the node which the packet will be sent to. Thecriteria exploited for setting its value depend, as it will beenough discussed below, on the specific routing scheme. Thepacket ID is assigned by theMessage Process Unit, whereasthe TTL is set to its default value (i.e., 100) and it is de-creased by one unit at each hop 2. In addition, a flag is

    2We remark that in a WNSN a message can reach the desti-nation after traversing hundred of nanodevices, this justifywhy it requires a so high default TTL value.

  • 8/11/2019 nano-sim

    4/8

    added into the network header for indicating if the messageshould be delivered to the nanointerface or to nanonodesforming the WNSN. Also in this case, its value is providedby theMessage Process Unitgenerating the message. Whenthe network layer receives a packet from the MAC, which isnot directed to the receiving node, it will be forwarded againdownstream according to the aforediscussed routing strate-gies.

    The selective flooding routing: a node, receiving amessage from the upper layer (i.e., by theMessage ProcessUnit it hosts) or from another device through the physi-cal interface, sends the packet to all the devices within itstransmission range. In this way, each message generatedby a nanonode is suddenly propagated within the WNSN.A similar approach has been already suggested in [4] formolecular-based communications. To prevent an excessivewaste of bandwidth, it is very important to avoid duplicateforward operations of the same packet. We remark that eachmessage can be uniquely identified by the pair [packet ID,source Dev-ID]; hence, keeping in memory the pair [packetID, source Dev-ID]associated to latest received messages,a node could not re-transmit packets already received inthe past. As default, each nanomachine stores informationabout at most 20 received packets. In addition, we conceiveda further mechanism for reducing the amount of messagessent into the network: with reference to the hierarchical ar-chitecture of a WNSN, we imposed that each node mustnot forward messages in the opposite direction of the des-tination. In detail, in the case the message is directed tothe nanointerface, nanonodescannot forward the packet ifit has been sent by a nanorouter. On the other hand, in-stead, nanorouterscannot handle a packet received by anynanonodeswhen the message it contains is directed to latterones.

    The random routing: a nanomachine that has to senda packet selects randomly thenext hop among its neighbors.Such an algorithm could be adopted for point-to-point com-

    munications, like those between a nanonodeand ananoint-erface. The random routing assumes that each node knowsall the devices within its transmission range. Hence, it mustwork in couple with a specific MAC strategy able to dis-cover this kind of information; the implemented MAC pro-tocol performing such feature, namelySmart-MAC, will bedescribed below. Whereas the major issue related to theselective flooding approach is to avoid duplicate forward op-erations, the most important challenge characterizing therandom routing algorithm is to prevent the creation of net-work loops in the multi-hop connection. To this end, eachdevice should avoid to consider asnext hop nodes that havealready been selected as next hop in the past for a givenpacket. This task is allowed by keeping in memory the pair

    [packet ID, next hop Dev-ID] associated to the latest sentmessages. Similarly to the previous case, each node stores,as default, information about at most 20 sent packets. Toaccelerate the delivering of messages to thenanointerface, ananonode tries to select a nanorouter as the next hop. Infact, it verifies, at the beginning of routing operations, thepresence of one or more nanorouters among its neighborsand then it randomly chooses one of them, subjected to theconstraints imposed by the previously described loop avoid-ance scheme. Otherwise,if no nanorouters in the neighbor-hood are identified, it has to send the packet to ananonode.From another hand, since we consider only communications

    betweennanonodes and nanointerface, we imposed that ananoroutercannot choose ananonodeas thenext hop. As afinal consideration, we remark that a given device could notbe able to select anext hop because it has not any neighborsor nodes within its transmission range cannot be consideredaccording to the constraints imposed by the routing algo-rithm itself. In this case, the packet will be enqueued at theMAC layer and the routing protocol will delegate the MAC

    entity to select thenext hopin the future (see the descriptionof theSmart-MAC strategy).

    2.3 Channel access proceduresFor all wireless technologies, the design of a channel access

    procedure is a very difficult task. In a WNSN, it becomeseven more critical due to the very high number of nodes ex-pected in such systems. In this context, protocols requiringthe synchronization among nodes are, in general, not recom-mended [2]. In addition, considering that the most suitabletransmission techniques are based on pulse-based communi-cations (more details will be provided in next sub-section),approaches based on carries sensing strategies, like the Car-rier Sense Multiple Access (CSMA), cannot be applied due

    to the lack of a signal to sense. Therefore, asynchronousMAC algorithms are the best candidates for a WNSN: theyallow packet transmission without any channel contention.Moreover, thanks to their very low computational require-ments, asynchronous MAC schemes are also easy to imple-ment on resource constrained nanodevices.

    In line with these premises, we implemented at the MAClayer two different asynchronous strategies: Transparent-MAC and Smart-MAC. We decided to not include furtherheaders at the MAC layer: all information useful for deliv-ering messages to the destination node are included withinthe header added at the network layer.

    Transparent-MAC: it is a very simple solution, whichlet packets be transmitted from the network layer to thephysical interface without executing any kind of control.

    Smart-MAC: it represents a more efficient algorithm.A packet received from the upper layer is not immediatelydelivered to the physical interface, but it is stored into adedicated queue. Before transmitting it, the MAC exploitsa handshake procedure for discovering nanomachines withinits transmission range. If at least one node is found, thepacket is sent to the PHY layer. Moreover, if the ran-dom routing algorithm is enabled and thenext hop has notbeen yet selected (see the previous sub-section for details),the MAC layer chooses it randomly among nanomachineswithin its transmission range. In the case the node has notany neighbors, the MAC entity applies a random backoffdelay prior to starting again the handshake procedure. Itis worth to note that this delay is uniformly extracted inthe range [minimum backoff time, maximum backoff time],whose boundaries can be modified by the user. Finally, inthe presence of multiple enqueued packets, each new trans-mission is scheduled after a specific time interval, which iscomputed through the same backoffmechanism. This addi-tional technique has been introduced for reducing the prob-ability to have physical collisions.

    2.4 Channel and Physical modelsNanoantennas may support EM communications in the

    Terahethz band (i.e., 0.1 10.0 THz). The entire spectrumcan range from a few hundred of gigahertz to almost 10 THz,

  • 8/11/2019 nano-sim

    5/8

    thus enabling a channel capacity in the order of few ter-abit/s and a transmission range that cannot exceed few tensof millimeters. [10]. Due to the size and energy constraintsof nanomachines, classical communication techniques basedon the transmission of signals with long duration, which aretypically adopted in wireless sensor network (WSN) [14],cannot be used in a WNSN. Considering the huge capac-ity of the Terahertz channel, a valid solution is to exchange

    very short pulses (i.e., each one lasting some femto or picoseconds) spread over the entire spectrum. The most promis-ing modulation scheme allowed for the nano technology, isthe Time Spread On-OffKeying (TS-OOK) [11]. With TS-OOK, a logical 1 is transmitted by using a short pulse anda logical 0 is encoded as a silence. It is important to ob-serve that this scheme is able to ensure, at the sender side,both high energy and communication efficiency. For whatconcern the receiver, instead, it just should be equipped byan energy detection system in order to notice the presenceor the absence of a pulse. Due to technological limitations(i.e., the communication unit can work only with a very lowduty-cycle), the only drawback affecting the TS-OOK mod-ulation scheme is that the time between two consecutivepulses should be much longer than the pulse duration. Onthe other hand, it offers two important advantages. Firstly,it does not require that nanodevices should be synchronizedbefore starting the transmission of the packet. Moreover,it causes the sharing of the medium among multiple users.In fact, since the time between the transmission of two con-secutive pulses has to be much longer than the pulse dura-tion, several nanodevices can concurrently send sequence ofpulses which are slightly time-shifted, without incurring incollisions.

    TS-OOK parameters (such as the duration, the transmis-sion frequency, and the energy of pulses) need to be carefullytuned according to the application scenario and to the upperlayers of the protocol stack. To this aim, Nano-Sim providesa PHY layer based on TS-OOK and allows its parameters

    to be easily adjusted based on the user needs.The characterization of the channel at the nano scale has

    been discussed in [10] and [9]. These works demonstratedthat the maximum channel capacity depends on the mediumcomposition, the distance among nodes, the power transmis-sion capability of a nanomachines, and TS-OOK parameters.As a consequence, a WNSN must be accurately designedtaking into account all properties of the scenario of interestand of the target behavior that have to be reached for theconsidered system.

    At the time of this writing,Nano-Simmodels the impactof the channel behavior by means of the the knowledge of thephysical transmission range (note that the same approachis frequently adopted by other famous simulators like NS-2

    and Omnet++). During the simulation, due to the limitedtransmission range that we expect at the Terahertz band,nanomachines will be split in different broadcast domains.For this reason, the channel can deliver a packet to a givennode (thus triggering the reception procedure at the PHYlayer) if its distance with respect to the source does notexceed the transmission range threshold. An user can ex-ploit sophisticated channel models, like those presented in[10] and [9], for properly setting the transmission range ofnanomachines and some physical parameters. Then, focus-ing the attention on a specific application field of its inter-est, he can test performances of the WNSN and the protocol

    stack devised by itself from a system level point of view.Anyway, in order to favour future upgrades of the de-

    veloped module, we have implemented channel and physicalentities by extending libraries provided within the SpectrumFramework [5]. With the Spectrum Framework, in fact, itwill be possible to implement more complex models thatmay model the selectivity of the Teraherz channel in bothfrequency and time domains.

    According to the TS-OOK modulation scheme, the mes-sage is sent by means of a sequence of pulses. We remarkthat simulating the transmission and the reception of eachsingle pulse would unnecessarily increase the complexity ofNano-Sim, due to the very high number of nodes belong-ing to a WNSN. For this reason, the packet transmission ishandled at the system level as depicted in the following:

    1. the MAC entity, after the channel access procedure,calls the method of the PHY interface which is incharge of packet transmission.

    2. The PHY layer creates the data structure associatedto the signal to transmit, storing details such as, thetime instant when the transmission starts, the pulse

    duration,Tp, the pulse transmission interval , Ti, andthe transmission duration,txTime. In particular, thetotal transmission duration, is computed as

    txTime= [(L 1) Ti] +Tp (1)

    whereL represents the packet length expressed in bits.

    3. The aforementioned data structure is delivered to thechannel and then sent to all the nodes which are in thetransmission range of the sender.

    4. The destination node handles the reception procedure.In particular, it verifies if there are physical collisionsduring the time interval required for receiving the packet,

    i.e., txTime. A collision occurs if pulses belonging todifferent transmissions overlap in the time domain. Inorder to detect this episode, a nanomachines storestransmission parameters (i.e., those listed at the point2) associated to all active reception procedures. Oncea reception procedure ends, the node exploits these pa-rameters for re-building the sequence of received pulsesduring the time interval required for receiving the con-sidered packet. In this way, it is able to evaluate thepresence of overlapped pulses. If the packet is cor-rectly received, it will be forwarded to upper layers ofthe protocol stack. Otherwise, all collided messageswill be deleted.

    3. PERFORMANCE EVALUATIONThe aim of this section is twofold: first, it is intended for

    demonstrating the practical utility of the developed tool inthe biomedical field, by studying a health-monitoring systembased on WNSN. Then, it investigates the simulator scala-bility in terms of computational requirements (i.e., simula-tion time and memory usage) in order to understandNano-Sim limits and forecasts future research.

    3.1 Analysis of a Health-monitoring SystemThe WNSN we considered is composed by a number of

    nanonodes, nanorouters, and a nanointerface deployed in

  • 8/11/2019 nano-sim

    6/8

    "#$% '%$()"

    *%+&,-. &*#/#01&*2$%-,&%",-.

    +%3&40"#

    0""5 *%+&,-.

    !"!#!#$%& 0-6!"!#'#()%'&

    !"!#*!)%'+",%

    7,8, '%--#'&,%-

    9#&4##- &*# !"!#*!)%'+",%

    0-6 "#$% '%$()"

    Figure 2: The studied health-monitoring system.

    0.5 1 1.5 20

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100

    Density of nanonodes [nanonodes/mm3]

    Pack

    etLossRatio[%]

    Tx Range = 0.001m

    Tx Range = 0.005m

    Tx Range = 0.01m

    Tx Range = 0.015m

    Tx Range = 0.02m

    (a)

    0.5 1 1.5 20

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100

    Density of nanonodes [nanonodes/mm3]

    PacketLossRatio[%]

    Tx Range = 0.001m

    Tx Range = 0.005m

    Tx Range = 0.01m

    Tx Range = 0.015m

    Tx Range = 0.02m

    (b)

    0.5 1 1.5 20

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100

    Density of nanonodes [nanonodes/mm3]

    PacketLossRatio[%]

    Tx Range = 0.001m

    Tx Range = 0.005m

    Tx Range = 0.01m

    Tx Range = 0.015m

    Tx Range = 0.02m

    (c)

    Figure 3: PLR achieved in WNSNs with (a) selectiveflooding and Transparent-MAC, (b) selective flood-ing and Smart-MAC, and (c) random routing andSmart-MAC protocols.

    0.5 1 1.5 20

    500

    1000

    1500

    Density of nanonodes [nanonodes/mm3]

    PhysicalTransmissions[#103]

    Tx Range = 0.001m

    Tx Range = 0.005m

    Tx Range = 0.01m

    Tx Range = 0.015m

    Tx Range = 0.02m

    (a)

    0.5 1 1.5 20

    500

    1000

    1500

    Density of nanonodes [nanonodes/mm3]

    PhysicalTransmissions[#103]

    Tx Range = 0.001m

    Tx Range = 0.005m

    Tx Range = 0.01m

    Tx Range = 0.015m

    Tx Range = 0.02m

    (b)

    0.5 1 1.5 20

    500

    1000

    1500

    Density of nanonodes [nanonodes/mm3]

    PhysicalTransmissions[#103]

    Tx Range = 0.001m

    Tx Range = 0.005m

    Tx Range = 0.01m

    Tx Range = 0.015m

    Tx Range = 0.02m

    (c)

    Figure 4: Number of physical transmission han-dled in WNSNs with (a) selective flooding andTransparent-MAC, (b) selective flooding and Smart-MAC, and (c) random routing and Smart-MAC pro-tocols.

    0.5 1 1.5 20

    10

    20

    30

    40

    50

    60

    Density of nanonodes [nanonodes/mm3]

    SimulationTime[minutes]

    Transparent-MAC with Selective Flooding, Tx Range = 0.00 1m

    Smart-MAC with Selective Flooding, Tx Range = 0.00 1m

    Smart-MAC with Random Routing, Tx Range = 0.001m

    Transparent-MAC with Selective Flooding, Tx Range = 0.02 m

    Smart-MAC with Selective Flooding, Tx Range = 0.02 m

    Smart-MAC with Random Routing, Tx Range = 0.02m

    Figure 5: Simulation time vs number of nanonodes.

  • 8/11/2019 nano-sim

    7/8

    Table 1: Simulation Parameters.

    Parameter Value

    System parametersSimulation duration 5 sDensity of nanonodes [0.5 - 2]nodes/mm3

    Number of nanointerfaces 1Number of nanorouters 50

    Artery size 1031031.15m3

    PHY detailsPulse energy 100 pJPulse duration 100 fsPulse Interarrival Time 10 psTX range of nanonodes [0.001 - 0.02] mTX range of nanorouters 0.02 mMACBackoff interval (only for theSmart-MAC)

    [0 ns, 100 ns]

    Network LayerInitial TTL value 100MessageProcessingUnit

    Packet size 128 bytesMessage generation time interval 0.1 s

    an artery of the arm, whose length and diameter have beenset to 30 cm and 1 mm, respectively [6].

    At the beginning of the simulation, nanonodes are uni-formly distributed within the first 15 cm of the artery. Then,they move along the artery following the direction of theblood at the speed of 20 cm/s [6]. Nanoroutersare uniformlydistributed inside the entire artery, whereas the nanointer-

    face is deployed at the center of it. Both of them maintaintheir position fixed during the time.

    All nanonodes are equipped with a sensing unit and areable to sense the surrounding environment and to collect in-formation about chemical particles and biological functions.Starting from these measurements, they generate, periodi-cally, messages that are sent, through multi-hop paths, tothe closest nanointerface, which is connected to the healthremote server by means of a IEEE 802.11 wireless connection(see Fig. 2).

    Focusing the attention on the aforedescribed scenario, westudied the impact of the density of nanomachines and theirphysical transmission range on the behavior of the health-care system. We tested three different protocol stacks com-posed by the following mix of routing and MAC algorithms:(i) selective flooding routing protocol withTransparent-MAC,(ii) selective flooding routing protocol withSmart-MAC, and(iii) random routing protocol with Smart-MAC. We notethat the random routing cannot be adopted together withthe Transparent-MAC strategy because, as highlighted inthe previous section, it must work in couple with a MAC pro-tocol able to discover nodes within the transmission rangeof the sender.

    Simulation settings are summarized in Tab. 1. We re-mark that the PHY layer has been configured according toparameters suggested in [12]. In line with the study pre-sented in [10], according to which the transmission rangeof nanomachines cannot exceed few tens of millimeters, weevaluated the network behavior for different values of trans-

    mission ranges, selected in the range [0.001, 0.02] m.Fig. 3 shows the percentage of packets that are not re-

    ceived by the nanointerface, i.e., the Packet Loss Ratio (PLR),measured for all the considered scenarios. The first interest-ing result is that the PLR decreases as the density ofnanon-odesand their transmission range increase because there aremore chances to find a multi-hop path to thenanorouter.This finding is relevant and should be very carefully ac-

    counted for sizing a WNSN. In details, the transmissionrange equal to 0.001 m entails, independently from adoptedrouting and MAC protocols, as well as from the numberof nodes, the worst results: the PLR is so high that it be-comes unacceptable. This underlines that a WNSN can-not guarantee the delivery of messages betweennanonodesand the remote server, and viceversa, when the compositionof the medium (i.e., the blood in the considered example)and the characteristics of the physical interface allow verylimited transmission capabilities. When the transmissionrange is equal to 0.005 m, the WNSN is able to deliver ahigher amount of messages to the remote server. Moreover,a smaller and smaller PLR could be registered by increasingthe node density. For higher transmission ranges, instead,the PLR is lower thanks to the capability of the WNSN tocorrectly establishing the multi-hop connection between thenode generating the message and the nanointerface.

    We can observe that, the adoption of the random routingalgorithm leads to a slight increase of the percentage of lostmessages. In fact, the random selection of thenext hop mayprevent some packets to reach the destination before theend of the simulation or before the expiration of the TTL.When the selective flooding strategy is adopted at the net-work layer, theSmart-MACprocedure is able to guaranteebetter performance (expressed in terms of a lower PLR) onlyin scenarios where it is very difficult to establish the multi-hop connection (e.g., see results achieved with the transmis-sion range equal to 0.001 m). In this case, all additionalmechanisms implemented with the considered MAC proto-

    col could increase the probability to send messages to nodesthat, being within the transmission range of the sender, areable to receive them correctly. However, no evident perfor-mance gains can be observed for other network conditions.

    Hence, we can conclude saying that theTransparent-MACcould be the best MAC scheme to use in couple with theselective flooding routing because it requires few computa-tional capabilities. For the random routing, instead, theSmart-MACis the only possible solution for the reasons al-ready discussed in Sec. 2.

    The number of physical transmissions handled in the WNSNhas been pictured in Fig. 4. When the selective routing al-gorithm is used, physical transmissions increase with thedensity ofnanonodes because there are more devices that

    generate messages to sent to the remote server. Moreover,the highest the transmission range, the highest the numberof physical transmissions. This result can be justified consid-ering that all nodes receiving a packet are allowed to performforwarding operations and that the amount of these devicesincreases by enhancing the transmission range. In the casethe transmission range ofnanosensorsis set to 0.001m, therandom routing algorithm registers the highest number ofphysical transmissions because the random selection of thenext hop leads to longer multi-path connections. A differentbehavior is achieved for higher transmission range values:in these conditions the number of physical transmissions is

  • 8/11/2019 nano-sim

    8/8

    fewer than the one measured for the selective flooding algo-rithm. The reason is that for each sent packet only one nodein the network (i.e., thenext hop selected by the routing al-gorithm) can perform forwarding operations.

    To summarize, the presented analysis demonstrates thatthe PLR is a critical issue in a WNSN. We found thatthe random routing is able to guarantee a good compro-mise between the registered PLR and the number of physi-

    cal transmissions. Anyway, with the aim of further improv-ing network performances, sophisticated MAC and routingstrategies as well as a careful tuning of the network size arerequired. In general, an optimized trade-offamong protocolcomplexity and network size is a relevant topic in WNSNsthatNano-Simwill help to solve in the future.

    3.2 Scalability TestTo provide a further insight, we evaluate the scalability of

    the proposed module in terms of both simulation time andmemory usage on a Linux machine with a 2.6 GHz CPUand 4 GBytes of RAM. We considered a WNSN with set-tings equal to those used before, focusing the attention toa sub set of transmission ranges. We have measured thatthe memory usage is always less that 250 MB and no signif-icantly differences have been obtained when increasing thenumber of nodes. On the other hand, we observed that thesimulation time (see Fig. 5) increases with the transmissionrange of nanomachines because there are more nodes ableto receive and forward messages in a WNSN. Furthermore,among all considered protocol suites, the one exploiting therandom routing at the network layer requires the lowest sim-ulation time because of a limited number of physical trans-mission handled in the network. Finally, all results regis-tered for the conducted tests represent, without any doubts,great achievements in terms of scalability.

    4. CONCLUSION AND FUTURE WORKS

    This paper presents some enhancements we added toNano-Sim, i.e., an open source tool modeling WNSNs within theNS-3 simulator. Moreover, a deeply analysis on theoreti-cal assumptions considered during the development of themodule and a more complete performance evaluation of aWNSN operating in a health-monitoring system have beenalso provided. Thanks to its extremely modularity, Nano-Simhas all the characteristics to become a reference tool forresearchers working in the area of nanonetworks. As nextsteps of our work, we plan to extend the simulator by im-plementing new features, e.g., more sophisticated routing,MAC, and PHY protocols and models. Furthermore, morecomplex applications in both medical and industrial fieldswill be also investigated. Finally, we will try to merge themodule into the official release of NS-3.

    Acknowledgment

    This work was supported by the PON projects (ERMES-01-03113, DSS-01-02499, EURO6-01-02238) funded by the Ital-ian MIUR, and by the Apulia Region Project PS 025 (ICTsupporting logistic services: a model of organized market).

    5. REFERENCES[1] I. Akyildiz and J. Jornet. Electromagnetic wireless

    nanosensor networks. Nano Communication Networks,1(1):319, Mar. 2010.

    [2] I. Akyildiz and J. Jornet. The internet of nano-things.IEEE Wireless Communications, 17(6):58 63, Dec.2010.

    [3] I. F. Akyildiz, J. MiquelJornet, and M. Pierobon.Propagation models for nanocommunication networks.In Proc. of the Fourth European Antennas andPropagation Conference, EuCAP, pages 1 5, Apr.2010.

    [4] B. Atakan and O. B. Akan. Carbon nanotube-basednanoscale ad hoc networks. IEEE CommunicationsMagazine, 48(6):129 135, Jun. 2010.

    [5] N. Baldo and M. Miozzo. Spectrum-aware channel andphy layer modeling for ns3. In Proc. of ICSTVALUETOOLS, Pisa, Italy, October 2009.

    [6] D. G. Cramp and E. R. Carson. The CirculatorySystem. Taylor & Francis, 1986.

    [7] L. Felicetti, M. Femminella, and G. Reali. Asimulation tool for nanoscale biological networks.Nano Communication Networks, Oct. 2011.

    [8] E. Gul, B. Atakan, and O. Akan. Nanons: a nanoscalenetwork simulator framework for molecularcommunications. Nano Communication Networks,

    1(2):138156, Oct. 2011.[9] J. Jornet and I. Akyildiz. Channel Capacity of

    Electromagnetic Nanonetworks in the Terahertz Band.In Proc. of IEEE Int. Conf. on Commun., ICC, pages1 6, May 2010.

    [10] J. Jornet and I. Akyildiz. Channel modeling andcapacity analysis for electromagnetic wirelessnanonetworks in the terahertz band.IEEETransactions on Wireless Communications,10(10):3211 3221, Oct. 2011.

    [11] J. Jornet and I. Akyildiz. Information capacity ofpulse-based wireless nanosensor networks. In Proc. ofIEEE Conf. on Sensor, Mesh and Ad HocCommunications and Networks, SECON, pages 80

    88, Jun. 2011.[12] J. M. Jornet, J. C. Pujol, and J. S. Pareta. PHLAME:

    A Physical Layer Aware MAC protocol forElectromagnetic nanonetworks in the Terahertz Band.Nano Communication Networks, 3(1):74 81, 2012.

    [13] I. Llatser, I. Pascual, N. Garralda,A. Cabellos-Aparicio, and E. Alarcon. N3sim: asimulation framework for diffusion-based molecularcommunication.IEEE Technical Committee onSimulation, 8:34, 2011.

    [14] M. R. Palattella, N. Accettura, X. Vilajosana,T. Watteyne, L. A. Grieco, G. Boggia, and M. Dohler.Standardized protocol stack for the internet of(important) things.IEEE Commun. Survs. Tut., 2013.

    to be published.[15] G. Piro. Nano-sim- The open source framework for

    simulating EM-based WNSNs. [OnLine] Available:http://telematics.poliba.it/nano-sim.

    [16] G. Piro, L. A. Grieco, G. Boggia, and P. Camarda.Simulating wireless nano sensor networks in the ns-3platform. Inin Proc. of Workshop on PerformanceAnalysis and Enhancement of Wireless Networks,PAEWN, Barcelona, Spain, Mar. 2013.