key: cord-0272180-9711xywo authors: Canovas-Carrasco, Sebastian; Asorey-Cacheda, Rafael; Garcia-Sanchez, Antonio-Javier; Garcia-Haro, Joan; Wojcik, Krzysztof; Kulakowski, Pawel title: Understanding the Applicability of Terahertz Flow-guided Nano-Networks for Medical Applications date: 2021-03-18 journal: nan DOI: 10.1109/access.2020.3041187 sha: c01bdce83cc08e22335d70aa6d535a83b34ce890 doc_id: 272180 cord_uid: 9711xywo Terahertz-based nano-networks are emerging as a groundbreaking technology able to play a decisive role in future medical applications owing to their ability to precisely quantify figures, such as the viral load in a patient or to predict sepsis shock or heart attacks before they occur. Due to the extremely limited size of the devices composing these nano-networks, the use of the Terahertz (THz) band has emerged as the enabling technology for their communication. However, the characteristics of the THz band, which strictly reduce the communication range inside the human body, together with the energy limitations of nano-nodes make the in-body deployment of nano-nodes a challenging task. To overcome these problems, we propose a novel in-body flow-guided nano-network architecture consisting of three different devices: i) nano-node, ii) nano-router, and iii) bio-sensor. As the performance of this type of nano-network has not been previously explored, a theoretical framework capturing all its particularities is derived to properly model its behavior and evaluate its feasibility in real medical applications. Employing this analytical model, a thorough sensitivity study of its key parameters is accomplished. Finally, we analyze the terahertz flow-guided nano-network design to satisfy the requirements of several medical applications of interest. Electromagnetic (EM) nano-communications have been attracting attention in recent years as a powerful technological advance enabling novel applications that could revolutionize different areas [1] - [6] , with particular relevance to medicine [7] - [13] . This emerging field deals with communication among size-constrained devices (known as nano-devices) forming nano-networks, and the connection between these nano-networks to the Internet paving the way for a new paradigm, the Internet of Nano-Things (IoNT) [1] . As the size of nano-devices can be scaled down to a few cubic micrometers [12] , the integration of a communication module inside each nano-device is a challenging issue that has been thoroughly addressed in different works in the literature [14] - [19] . All these studies point to the miniaturization of the antenna embedded into each nano-device, which requires the use of THz frequencies to communicate, leading to the standardization of the THz band (0.1-10 THz) as the working frequency spectrum for EM nano-communications [20] . However, these high EM frequencies entail high path losses when the signal propagates throughout the medium, greatly reducing the communication range between nanodevices. This limitation becomes more restrictive when the physical medium has a high water content, as is the case of human body tissues (e.g., skin or fat) and fluids (e.g., blood), due to their high absorption coefficient at THz frequencies VOLUME 8, 2020 [21]- [24] . Even though these nano-devices present several technical limitations, they are able to perform simple tasks in scenarios where larger artificial devices would be excessively intrusive. This is of special relevance within the human body, where simple tasks (e.g., monitoring a biomarker and sending warnings) performed in vivo and in real time would significantly improve the effectiveness of disease diagnoses. Concretely, we focus on a nano-communication network composed of micrometer-sized devices (hereafter referred to as nanonodes) located inside the human cardiovascular system to assist the immune system in detecting specific bacteria in blood, severe inflammatory response that may lead to sepsis, blood flow disorders, and ischemic heart diseases, as discussed later in this work. This type of network, where nanonodes are in constant movement throughout the bloodstream, is known as a flow-guided nano-network [25] . Flow-guided nano-networks are designed to overcome two important challenges that must be carefully investigated. First of all, the limited communication range inside the human body makes direct communication between nano-nodes and an external device unachievable [22] , [24] . Secondly, the amount of energy that can be stored in a nano-node is scarce due to the constraints derived from downsizing the battery. To alleviate this restriction and provide a continuous source of energy, nano-nodes should use a piezoelectric nano-generator to harvest energy from the environment, as proposed in several works in the literature [26] - [32] . Still, the energy provided by the piezoelectric generator does not allow nanonodes to be continuously working, so they need to alternate between idle (stand-by) and active cycles. The human vascular system is a closed system, composed of many sub-circuits (see Fig. 1a ), so the nano-devices, when injected into it, travel within the bloodstream carried by the force of the pumping heart, reaching all the human tissues in subsequent cycles. Up to now, flow-guided nano-networks aimed at medical applications have been designed assuming that nano-nodes both sense the medium (i.e., blood) and transmit the information. However, this approach is not useful for certain applications where monitoring a critical part of the body is required. Thus, an additional sensing device positioned at the place of interest is necessary. With this objective in mind, we have conceived a new kind of flowguided nano-network consisting of three different types of devices (depicted in Fig. 1 ): • Nano-node. This is the smallest device, and it continuously flows through the blood circulatory system, being able to either receive (from a bio-sensor) or transmit data frames (to a nano-router). It is endowed with a THz communication module, in line with the proposals in [14] , [19] , and a piezoelectric generator to recharge the battery periodically. Due to its extremely limited resources, a nano-node cannot always be operative, so it can only perform one task (transmission or reception), and only when its battery level is high enough. the special characteristics of this novel THz flow-guided nano-network architecture based on Markov chains. This model jointly considers: (i) the energy balance in nano-nodes derived from the energy harvesting and consumption processes, and (ii) the probability of reception and transmission based on realistic values of the cardiovascular system and the limited communication range of nano-nodes due to communication in the THz band. We note that this model is general enough to be employed in different applications in which this nanonetwork could be used. • We provide insightful results about nano-network performance as a function of different parameters to accurately predict nano-network behavior in diverse scenarios. We pay special attention to the required number of nano-nodes in the network for less intrusiveness and an adequate network dimensioning for the different medical applications under study. • We validate the proposed model by simulating this type of flow-guided nano-network under different conditions. The results obtained from the simulations have been compared with those derived from the analytical expressions, showing that the mathematical framework accurately models the performance of this nano-network architecture. • We analyze the requirements and limitations of potential flow-guided nano-networks to be used in medical applications of early-stage detection of bacterial and viral infections, sepsis, heart attacks, and restenosis, employing realistic and accepted values for all the parameters employed. The rest of the paper is summarized as follows. In Section II, several potential medical applications where this kind of nano-network can play a critical role are identified. Section III rigorously defines the analytical model, considering all the characteristics of this new type of flow-guided nano-network. All the results are discussed in Section IV, confirming the analytical model by means of simulations. The impact on network performance of the most relevant parameters is also analyzed and discussed. Finally, Section V concludes the paper. While a few years ago nano-devices in human blood were matters of theoretical concepts and early prototypes [35] , substantial progress has been made recently and numerous fully developed nano-bot systems have been presented. In [36] , an effective application of nano-sponges cleaning the blood of toxins was reported. Later, the way a swarm of magnetotactic bacteria loaded with drugs and steered with a magnetic field could assist in tumor therapies was demonstrated [37] . Also recently, nano-bots neutralizing pathogenic bacteria and toxins in blood have been presented [38] . In this section, we focus on some more challenging applications, where nano-devices should not only effectively perform their functions in the human vascular system, but also commu-nicate with each other. Thus, examples of such applications related to bacteria and viral infections, sepsis, heart attacks, and restenosis, are discussed in detail. While the presence of numerous bacteria types is quite common in a human body, their appearance in the vascular system is very dangerous, as they can then spread and infect multiple human organs. It is an especially serious problem in the case of hospital patients with many comorbidities, because their immune systems are already weakened. The ability to rapidly detect bacteria, like Pseudomonas, Escherichia coli, Acinetobacter, Staphylococcus, or Streptococcus in cases of patients in a critical condition, might be a matter of life and death, as the early antibiotic administration is correlated with increased survival rate. Even a very low number of these bacteria in blood is dangerous. Thus, we propose a bio-sensor consisting of antibodies for each of these bacteria types. Antibodies (immunoglobulins) are protein molecules, about 10-30 nanometers in size, which recognize a epitope unique for different bacteria. Antibodies may signal the presence of the bacteria in many ways, but here, we focus on the technique described in [39] , where the antibody is attached to an electrode. After detecting the bacteria, the electrode resistance changes. Thus, assuming a simple micro-device is connected to the electrode, this device should be able to measure the resistance and start transmitting a warning immediately after detecting a change. A single sensor, no larger than a millimeter, can have antibodies detecting numerous important bacteria. Multiple sensors, such as these should probably be located close to important organs like lungs, the bladder, and kidneys, in order to identify the source of the bacteria. The same technique proposed for bacteria detection [39] can be used for viral load, i.e., density monitoring [40] . Viruses are responsible for infectious diseases, but they differ from bacteria in a few important aspects. The main differences include: (a) the size, as viruses are significantly smaller than bacteria (ca. 10x); (b) different strategy of replication, as viruses use the host cell machinery to create their new copies. Viral infections can be divided into two groups. The first group are acute (severe, but short-lived) infections, like typical flu viruses, and also COVID-19. These viruses may not be present in the blood at all, thus the discussed monitoring system will not be able to identify them. The second group, however, are chronic (long-term) infections, in which case the viruses are detectable in blood. The most important infection of this group requiring viral load monitoring is the human immunodeficiency virus (HIV). This measurement is crucial to evaluate of therapy results, plan further treatment, and, most importantly, evaluate the risk of HIV transmission. The threshold for HIV viral load is 1500 copies/ml [41] , and this is a cornerstone of the so-called U=U campaign (Undetectable Equals Untransmitable). Thus, this task will VOLUME 8, 2020 require a new function from the proposed system: not only the detection of certain particles but also the ability to quantitatively measure the concentration of studied elements. In the case of HIV, this is the number of copies per ml. Sepsis is a state of the human immune system when its reaction to infections may threaten its own healthy tissues and organs, finally causing death. Sepsis is signaled by a very high density of cytokines in the blood, in particular interleukin 6 (IL-6) molecules. IL-6 molecules are normally present in blood of a healthy individual as well, but in the case of sepsis, their density suddenly rises from about 1.5·10 10 /ml (a healthy person) to 3.75 · 10 11 /ml and higher (for sepsis) [42] . They are produced by living cells and their lifetime may be modeled by an exponential distribution with an average of 45 minutes [43] . Sepsis is usually detected via blood analysis in a laboratory. However, this is quite time consuming, as the blood must be taken from the patient, delivered to the lab and analyzed. Sepsis occurrence is very often detected too late, as it could be a matter of hours which determine whether a patient survives or not. The bio-sensor located inside the vascular system could check the patient's state constantly. However, as IL-6 density is quite high even in healthy people, sensors with antibodies cannot be used, as in the previous case with bacteria. Such a sensor would be immediately blocked with IL-6 cytokines, detecting and signaling their high density all the time. Instead, we propose using a special small tube, about 0.25 mm long, implanted inside of a human vein. At one end, the tube has a membrane that is semi-permeable, i.e., small molecules like IL-6 cytokines can flow through but living cells cannot (living cells are quite large, about 10-20 micrometers in diameter). The other walls of the tube are not permeable. So, the IL-6 can pass through the membrane and propagate inside the tube by diffusion, finally reaching the opposite end of the tube after about 15 minutes [44] . At this end, we have a layer of antibodies matching IL-6 cytokines. When an antibody catches an IL-6, the electrical resistance of the connected electrode changes (as described in the previous subsection). The size of the semi-permeable membrane and the length of the tube are carefully chosen so that only a small number of IL-6 cytokines reach the antibodies for a healthy person. However, when sepsis appears, the number of IL-6 cytokines is much larger, so the nano-node connected to the electrode receives a much higher signal and should send a warning only in this case. With such a tube, the sensor with antibodies detecting IL-6 cytokines may work for a long time. As most of the IL-6 molecules brake when propagating through the tube, only a small amount of them reach the opposite end of it. After matching an IL-6, an antibody is not active during a certain period of time, but recovers after that and can work again. Moreover, as the membrane is semi-permeable, not letting living cells inside, the IL-6 cytokines cannot be produced inside the tube. A single tube in a vein is enough, because with sepsis, the density of IL-6 cytokines quickly rises in the entire vascular system. A second similar device could be considered as a back-up. The discussed nano-network may also be critically helpful in cardiac issues, e.g., in the case of people at risk of heart attacks (myocardial infarctions). A marker which helps to detect the danger of a heart attack very early is a so called Heart-type Fatty Acid Binding protein (H-FABP). If the H-FABP density exceeds 1.8 · 10 11 /ml, this is considered to be a serious warning that may suggest a myocardial infarction [45] . Here, we also propose a bio-sensor comprised of a layer of specific antibodies attached to an electrode, but the layer is not in a tube, instead, it is covered with a shutter, opening just for the time necessary to make a measurement. The shutter is normally closed, so the H-FABP present in the blood does not block the bio-sensor completely. The shutter opens periodically, once per e.g., 15 minutes, in order to measure H-FABP density. If the density is high, a warning signal is transmitted by the bio-sensor. It may also be activated externally in order to take the H-FABP measurement on demand. This procedure can be initiated if a person feels sick, e.g., has some clinical symptoms like chest pain, dyspnea (shortness of breath), or low tolerance to physical effort. Clinical symptoms correlated with high H-FABP levels are a clear indication of a myocardial infarction [45] . One more application is related to stenosis, i.e., the process of the narrowing of blood arteries, usually caused by atherosclerosis. A popular solution is to put a stent into the narrowed artery to keep it open. However, stents frequently get blocked after some time, as some thrombus (solidified blood) may gather on it and, in consequence, the artery becomes blocked again, which may cause a heart attack [46] . In order to control the state of a stent, a micro-sensor can be mounted on it. The sensor on the stent would then periodically transmit signals to mobile nano-nodes flowing through the artery. When the process of restenosis becomes significant, which usually means the lumen of an artery is more than 90% closed, i.e., the stent is covered with 1-1.5 millimeters of thrombus [46] , the signals from the sensors on the stent will be much weaker. Thus, the network can detect this situation and dispatch a warning to the gateway and then to the external medical devices. About 20-30 sensors can be mounted on a single stent, in order to have clear information about its condition. Considering the limitations implicitly derived from employing nano-devices, the analytical model for the proposed THz flow-guided nano-network is based on the following assumptions: • There are n nano-nodes randomly distributed throughout the human vascular system, n ≥ 1, n ∈ N , with a uniform distribution throughout the total volume (V t ). Therefore, the nano-node concentration per unit of volume can be considered as constant in the entire system. In addition, two types of larger (less resourceconstrained) devices are placed in two different parts of the system: (i) the nano-router, which is in charge of receiving and gathering all the information transmitted by nano-nodes (encapsulated in data frames), and (ii) the bio-sensor, which is continuously transmitting the collected data from the area of interest to the nanonodes. • Nano-nodes constantly move through the cardiovascular system, which can be modeled as a branched closed circuit (i.e., each branch would be equivalent to a vein or an artery). The nano-router is placed in one of these branches to receive the data frames previously taken in another branch, where the bio-sensor is located. Although the time to complete a round depends on the branch through which a nano-node flows, on average, nano-nodes take T seconds to complete a round through the circuit. • As the vascular system is divided into different subcircuits, the blood only flows through one of them in each round before returning to the lungs. This implies the inability of a nano-node to reach both bio-sensor and nano-router in just one round if they are located in separate subcircuits. Therefore, to prevent the overestimation of the probability of transmitting a previously received frame, we assume that the full data transmission from the bio-sensor to the nano-router requires at least 2 rounds, one round to receive the frame from the bio-sensor and the following one to transmit it to the nano-router. • Due to the motion of nano-nodes within the bloodstream, the integrated nano-generator periodically charges the battery every 1/f seconds, with f as the frequency of charge. Thus, nano-nodes alternate idle and active cycles. Due to battery and memory constraints, we consider the worst-case scenario, that is, that nanonodes can only transmit or receive one data frame per active cycle. During idle cycles, nano-nodes just keep the frame stored in memory. • As the communication distance of the nano-node/nanorouter link is greatly limited by the high path loss of the THz band experienced in blood [21] , [24] , we define V cv as the volume in which nano-nodes are able to send a frame to the nano-router, that is, the coverage volume. This volume is defined by two parameters: (i) the communication range (r) and (ii) the diameter of the vein on which the nano-router is placed (D). Assuming an isotropic THz antenna is used [47] , the communication range of nano-nodes can be considered constant across the three dimensions of space. We remark that the model can be adapted to any type of transceiver just by tuning V cv as needed. Thus, generally speaking, the volume in which nano-nodes could communicate with the nano-router would be a sphere with a radius r and the nano-router at its center. However, all the nanonodes are confined within a vein, so the real volume V cv in which nano-nodes can indeed carry out a successful transmission is determined by the intersection between the already mentioned sphere and a cylinder with diameter D, as shown in Fig. 2 . The expression required to analytically calculate V cv using Cartesian coordinates is defined by: where: (2) this approach, we are able to develop, a priori, a model for any circular fluid system just by knowing the average round time, thus not needing the instantaneous velocity of nano-nodes when flowing through every part of the circuit, which can be really challenging in complex scenarios (e.g., the human cardiovascular system). • Without limiting the generality, we assume that nanonodes cannot perform more than one transmission when crossing V cv since the time between transmissions is longer than the time to cross V cv . As shown in Fig. 2 , this assumption can be expressed mathematically as 2r/v 1/f . Therefore, nano-nodes can only perform one transmission per round. • A successful transmission can only be achieved when a nano-node starts and ends the transmission of a data frame within V cv . Thus, with t f as the time to transmit a complete frame, we define the transmission volume (V tx ) as: where χ min,tx , χ max,tx , γ min,tx , and ζ max,tx correspond to expressions (9) to (12) . • The probability of a nano-node being in the zone where a frame can be completely transmitted (p tx ) is modeled as the ratio between the transmission volume (V tx ) and the total fluid volume (V t ), that is: • Even though the TS-OOK modulation presents a really low probability of interference between pulses (due to the extremely short pulse duration), it is required perfect multiplexing at reception to distinguish pulses from different transmitters and successfully demodulate more than one frame simultaneously. Thus, in order to keep the probability of receiving a flawed frame as low as possible and not to overestimate the performance of the nano-network, we assume that a collision occurs when the nano-router simultaneously receives two transmissions from two or more different nano-nodes. Hence, if a nano-node is performing a transmission within V tx , a second nano-node can collide in two different cases: (i) it starts the transmission outside V cv but enters while the transmission is still active and (ii) it starts a transmission in any part of V cv . So, there is a collision volume (V cx ) larger than V cv defined by: where: • Similarly to the definition of p tx , the probability of a nano-node being in the collision zone (p cx ) is modeled as: • As the bio-sensor is a larger device strategically located within a vein or an artery, covering its whole section, we consider that the probability of a nano-node passing through it in each round relies on the fraction of the total blood flow (η) that circulates through the vein/artery in which the bio-sensor is placed. In addition, the energy required by a nano-node to listen to the medium and receive a bit is much lower than to transmit it (approx. 10 times lower [26] ) and could even be passively detected without a preamplification stage [25] . As the presence of a bio-sensor is detected only once per round, the required energy for reception has a negligible impact on the total energy consumption of a nano-node. Therefore, we assume that nano-nodes are able to receive a frame if passing through the bio-sensor vein. Consequently, the probability of a nano-node receiving a frame in each round is: p rx = η. For the sake of illustration, Fig. 3 shows a nano-node flowing through the bloodstream communicating with a nanorouter attached to a vein. As the transmission of a frame (9) Probability of a nano-node being in the transmission volume pcx Probability of a nano-node being in the collision volume prx Probability of receiving a frame per round ps Probability of successfully transmitting a frame per active cycle p s,rnd Probability of successfully transmitting a frame per round k Number of rounds that the frame is stored in nano-nodes memory is performed every 1/f , many other nano-nodes remain discharged when passing through V cv and are not able to successfully send data to the nano-router. Likewise, other nano-nodes are transmitting outside the coverage zone, so they do not cause any collision. Based on these assumptions and considering that the frame is stored during two rounds (the minimum storage time to carry out a transmission from the bio-sensor to the nano-router), the throughput achieved by the proposed nanonetwork can be modeled by this expression: This metric measures the frames per second that can successfully reach the nano-router. In order to achieve a correct transmission, nano-nodes must receive an updated frame, store it in their memories, and then transmit it to the nano-router without collisions. As can be seen, this model is generic enough to be employed in different applications, where any of the considered parameters may vary its value. Once the throughput considering that nano-nodes store a frame for the minimum required time to complete a transmission (i.e., two rounds) is obtained, we extend the analytical model by analyzing the scenario in which nano-nodes are able to keep the frame in memory during an arbitrary k number of rounds. To achieve this, we start by deriving the probability of having a frame stored (p f rame ) as a function of the number of rounds k that nano-nodes keep the frame, with k ≥ 2. Likewise, we get the expression of not having a frame stored (p empty ). To obtain these probabilities we employ the Markov chain shown in Fig. 4 , where the state 0 is associated with not having a frame in memory, and states from 1 to k stand for having a frame stored in round numbers 1 to k, respectively. The transition matrix T 1 associated to this Markov chain is defined as: As the stationary distribution of a Markov chain with a VOLUME 8, 2020 transition matrix T can be obtained by a vector, π, so that πT = π, we define the vector π = {π 0 , π 1 , π 2 , ..., π k−1 , π k } as the stationary probabilities of being in the states 0, 1, 2, ..., k − 1, k, respectively. Using this property, the series of equations of our Markov chain is defined as follows: Eq. 22 is derived from the second condition of the stationary probabilities; that is, the sum of all the probabilities contained in vector π must be 1. Working with Eqs. 19 to 22, we get the following expressions for the values in vector π: Once the values in vector π have been obtained, we can directly calculate the values of p empty and p f rame : Upon the expressions of p empty and p f rame , the raw throughput of the nano-network as a function of the number of rounds that the frame is stored in memory can be calculated following the same procedure as in Eq. 17: As raw throughput considers all the frames received, some of them could be repeated if a nano-node sends the frame stored more than once until it receives a new one. Thus, we also provide an expression for effective throughput (i.e., not considering repeated frames). To do this, we focus on the states of the Markov chain in Fig. 4 . As we can see, if the received frame should not be transmitted more than once, there are two valid options: (i) the frame is transmitted in state 1 or (ii) the frame is transmitted in any of the remaining states (from 2 to k − 1) but not in any of the preceding ones (e.g., if the frame is transmitted in state 3, it cannot have been transmitted in states 1 and 2). Note that it cannot be transmitted in state k, since the nano-node discards the frame to be ready to receive a new one. Mathematically, considering that only one transmission can be performed per round, we express the probability of transmitting a frame only once during k rounds (p ef f ) as: where: Using Eqs. 24 and 27, the effective throughput (T h ef f ) can be directly obtained as: Apart from the throughput, another important metric that can be useful to predict and measure the performance of a THz flow-guided nano-network is the probability of capturing and transmitting a frame before a certain number of rounds. We define this concept as the Quality of Delivery (QoD). It will determine how efficiently the nano-network is able to generate and transmit useful data. Thus, employing this metric, the number of nano-nodes required in a nano-network to satisfy a given performance can be more accurately predicted. To this end, we again rely on Markov chains, specifically the one shown in Fig. 5 . For the design of this Markov chain, the following assumptions were made: • State transitions take place in every round, i.e., the state in the Markov chain does not change until a round is totally completed. To achieve this, we define the probability of one nano-node successfully transmitting a frame (without collisions) per round when this frame has been previously received and stored in memory (p s,rnd ) as: • Each nano-node stores the frame in memory during a generic number of rounds k, following the same approach developed in the previous subsection. • State Q represents the transmission of the stored frame. • Nano-nodes cannot receive and transmit in the same round. We assume a worst-case scenario in which nanonodes first capture a frame and transmit it, at the earliest, in the following round. Therefore, if a nano-node stores a frame for k rounds, it has k−1 chances (one per round) to transmit the frame. This is the reason why state k is not linked to state Q, as the round k + 1 is devoted to receiving a new frame and not to transmitting the former one. The transition matrix T 2 of this Markov chain is: with a size of (k + 2) × (k + 2). Employing this approach, the QoD for one node matches the probability of entering in the state Q after a certain number of rounds m, denoted by π mQ . Thus, we define the vector π m = {π m0 , π m1 , π m2 , . . . , π mk , π mQ } as the probabilities of being in states 0, 1, 2, ..., k, Q, respectively, after m state transitions. In a Markov chain, π m can be calculated as: where π 0 = {π 00 , π 01 , π 02 , ..., π 0k , π 0Q } stands for the initial distribution probabilities across the state space of the chain. To get QoD we assume that the nano-network is already working in a stationary state. So, values in vector π 0 equal those in vector π, obtained in the previous section. The remaining value, π 0Q , is equal to 0. Thus, from Eq. 32, we get the expression for every single value of vector π m in terms of k and m: Then, once the probability of sending a frame in m rounds for each node has been obtained, we derive the general expression of QoD as follows: where n represents the number of nodes in the nano-network. We note that, even though there is not a direct expression for QoD, recursive expressions from Eq. 33 to 36 can be easily implemented in any numerical computing environment to obtain the QoD of any flow-guided nano-network, as analyzed in Section IV. Finally, we define the delay of a transmitted frame (τ ) as the time elapsed from its reception by a nano-node to the transmission to the nano-router, with kT ≥ τ ≥ 2T . To provide a consistent metric to measure the average information delay of a nano-network, in this subsection, we derive an analytical expression for the average nano-network delay (τ av ). This indicates how fresh the information that the entire nano-network provides to an external agent is, which could be critical for applications that require real-time information streams. Assuming the same conditions as in the previous section, we define a new Markov chain with a state space comprising 2k states, as shown in Fig. 6 , with the transition matrix T d shown in Eq. 38. As in Subsection III-A, we rely on the stationary distribution of a Markov chain to derive the expression of the average delay of a transmitted frame. Thus, we define the vector π d = {π d 0 , π d 1 , π d 2 , . . . , π d k , π d Q2 , π d Q3 , . . . , π d Qk }, so that π d T d = π d . The first k + 1 states, from 0 to k, are devoted to nano-node states in which the frame is stored but it has not been transmitted to the nano-router, as in the previous subsection. States from Q 2 to Q k represent the fact that the frame has been transmitted in a specific round, from 2 to k (we should note that the frame cannot be transmitted in the same round as that in which it has been received; that is, the first round). As a transmitted frame should be counted only once (if the same frame is transmitted twice, the second transmission is discarded), when one of the Q states is reached, the next state transitions will be in the remaining Q states until round number k. Based on the expression π d T d = π d , the equations associated with the stationary probabilities are: (1 − p s,rnd ) j−2 π d 1 , i = 2, 3, . . . , k (42) VOLUME 8, 2020 FIGURE 6: Markov chain to derive the average delay. Probabilities of state changes are shown over each transition. Working with this series of equations, values in vector π d are defined as follows: According to the design of the Markov chain, the general expression of the average delay for the frames transmitted can be calculated as: where T stands for the time required to complete a round. We note that the minimum average delay in this expression is 2·T , since we assume that a nano-node takes at least two complete rounds to send a frame. In this section, we first evaluate network performance (considering the figures of merit defined in Section III) as a function of different parameters, so that the influence of each one of them on the performance of a THz flow-guided nanonetwork is thoroughly discussed. Then, we study the feasibility of using flow-guided nano-networks in medical applications in terms of their network performance. To do this, we apply the analytical model to the applications described in Section II, employing realistic and accepted values for all the parameters employed. All the results obtained throughout this section have also been validated by means of simulations. Simulations have been implemented in MATLAB with the following scenario variables: number of nano-nodes, communication range, diameter of vein, battery charging frequency, nano-node velocities in the flow, time to complete one round through the system, time to transmit a complete frame, total volume of the flow, and simulation seed. The nano-network has been simulated considering a branched, closed-loop medium (modeling the cardiovascular system) where nano-nodes flow for an equivalent (simulated) time of 1 hour. Nano-nodes flow through each branch of the circuit, simulating veins, with a certain probability equal to the actual percentage of blood flowing through that vein, containing a total volume of 5 liters (total volume of blood in the human body) [48] . The average time to complete a round through the cardiovascular system (T ) is set to 60 seconds [48] . Every point in the simulations has been repeated ten times with a different seed. In this subsection, we conduct a sensitivity analysis for the four most relevant parameters: (i) number of nano-nodes, (ii) diameter of vein, (iii) communication range, and (iv) number of rounds storing a frame. To this end, we set the values of the remaining parameters as follows: • The time to transmit a complete frame (t f ) is determined by two factors: (i) the frame length (in bits) and (ii) the symbol rate. Regarding the first factor, we assume 64 bits, so frames are short enough to be stored and transmitted by nano-nodes but large enough to include accurate medical measurement and some fields of an ad-hoc protocol, aimed at preserving the integrity and robustness of the transmitted data. For the second factor, we assume a conservative nano-node symbol rate of 10 6 symbols per second, in accordance with the related literature [28] , [47] , [49] , [50] . Thus, assuming an On-Off keying modulation [47] where one symbol equals one bit, the bitrate (R) is equal to 1 Mbps and the value of t f is 64 µs. • As nano-nodes are powered by means of a piezoelectric generator, we assume that the mechanical strength caused by a heart rate of 60 beats per minute will allow us to harvest enough energy to activate and transmit or receive a frame once per second; that is, 1/f = 1 s. To justify this claim, we analyze the energy balance in each nano-node once a frame has been received, as data transmission is the most energy-consuming task. On the one hand, the energy expected to be consumed in each cycle is given by: where W is the probability of transmitting a pulse, since the transmission of a logical "1" is carried out by sending a pulse, whereas a logical "0" is sent as silence. To ensure that the nano-network is working in all cases, we assume W = 1 to cover the worstcase scenario, that is, all the frames are composed of "1"s (the energy consumption is at its maximum). E p stands for the energy of a pulse, which is considered 0.1 fJ to get a communication range of 1 mm [25] . This range was calculated considering the particular characteristics of THz waves propagation inside the human body, specifically in blood, and a transmission power of 1 mW using the TS-OOK modulation. L f is the length of the frame (64 bits) and P bit denotes the power required by the circuitry to keep a bit stored in memory (2.4 fW [51] ). On the other hand, we consider that each nano-node features a nano-generator able to gather ∆Q = 6 pC per compress-release cycle (induced by each heartbeat) with a generated voltage (V g ) of 0.2 V, as analyzed in the literature [25] - [27] , and a nano-capacitor with a capacitance (C) of 10 pF -with a maximum energy capacity E max = CV 2 g 2 of 200 fJ-. Using these parameters, the energy harvesting rate (λ h ) can be calculated by this expression (taken from [25] ): where E nc is the energy already stored in the nanocapacitor and f ng is the frequency of compress-release cycles (1 Hz). Using this expression and applying the energy consumption of the nano-node with W = 1, the nano-generator is able to perform a frame communi-cation every second and stabilize the energy level at around 140 fJ. • The velocity of nano-nodes when passing through the nano-router coverage zone (v) is set in accordance with the velocity of blood flow in a superficial vein in the hand [52] ; that is, 10 cm/s on average [53] . • The percentage of the blood flow (η) flowing through the bio-sensor is set to 10%, taking as a reference a renal vein [54] in which a bio-sensor could be implanted to detect bacteria from kidneys. • The diameter of the vein where the nano-router is placed (D) is set to 6 mm, provided that it is not the parameter under study. This value is in line with a generic application in which the nano-router is placed in a superficial vein in the hand [53] . • When applicable, the communication range (r) is established at 1 mm, a worst-case value for the THz-based communication in blood according to both the high path-loss in this medium and the low energy employed to generate the EM pulses of the modulation in use [25] . Using all the parameters above, Fig. 7 represents the throughput and QoD as a function of the number of nano-nodes in the nano-network for different values of k, both theoretically (solid line) and obtained by simulation (dots). As can be seen in Fig. 7a , nano-network throughput increases almost linearly as the number of nodes grows with all the values of k, since the number of collisions is still negligible. The impact of k on the throughput can also be observed, as it increases the probability of a nano-node having one frame stored in memory. However, when the number of nano-nodes is high enough, collisions become relevant (see Fig. 7b ) and the throughput reaches a maximum. Then, it progressively decreases until it reaches zero due to the increasing number of collisions. Another notable fact is that when k increases (that is, the percentage of nano-nodes ready to transmit a frame is higher), the maximum throughput is greater. This occurs, fundamentally, because in order to get this value the density of nodes in the circuit is less than with lower values of k, thus reducing the number of collisions for a similar amount of transmitting nano-nodes. It can also be noted that as k increases, the enhancement of the throughput lessens, since the percentage of nano-nodes with a frame stored in memory increases to 100%. The same trend can be observed in the QoD selected metric. Concretely, Fig. 7c shows the QoD of a flow-guided nano-network with m = 10 (that is, the probability of transmitting a frame before 10 rounds) as a function of the number of nano-nodes. As n increases, the value of QoD gets closer to one. Also in this case, the effect of k is noticeable, showing a significantly higher QoD as k grows but moving toward a maximum value when it becomes excessively high. So far, raising the value of k has had a positive impact on nano-network performance in terms of throughput and QoD. However, as shown in Fig. 8a , there is a significant drawback VOLUME 8, 2020 to increasing k because this increases the average delay (τ av ) of the transmitted frames. When nano-nodes keep a frame in memory for a longer time, the availability is higher, entailing a higher global throughput, but the freshness of these frames is compromised. It is also worth noting that, in this scenario, the average delay of the transmitted frames is completely independent of the number of nano-devices in the network (see Fig. 8b ). From these results, we can conclude that the time each nano-node needs, on average, to transmit a frame from its reception does not change, although the number of nodes that can transmit becomes higher. Therefore, there is a trade-off between throughput and information freshness when varying k that should be considered in the design of a flow-guided nano-network. Another relevant factor in nano-network performance is the diameter of the vein in which the nano-router is implanted. Fig. 9 shows the nano-network throughput as a function of D for two different values of n. As can be noted in Fig 9a, if n is not excessively high (i.e., collisions are not relevant yet), the throughput noticeably grows for values of D below 2 mm and then it stabilizes for larger diameters. This result is derived from the communication range of nano-devices, set to 1 mm, so the throughput grows as V cv gets larger. Interestingly, if the nano-network is working in a state in which collisions are not numerous, we can confirm that placing the nano-router in thicker veins does not penalize nano-network performance. However, if n grows and collisions become more frequent, there is an optimal D where the throughput is maximized (see. Fig 9b) at around 0.75 mm. This is due to the fact that transmission and collision zones increase at different paces as a function of D. The collision zone increases faster than the transmission zone, making the impact of collisions higher for larger diameters. Therefore, to reach the maximum throughput in a scenario where the number of collisions is substantial, the value of D should be optimized. The QoD shows similar behavior for 10 4 nano-nodes, as shown in Fig. 9c , with a sharp increase for low diameters and stabilizing when D grows. This is because the number of collisions for 10 4 nano-nodes is not relevant. If n increases, the value of QoD tends to be 1, reducing the impact of D, since the number of nano-nodes needed to hinder the value of QoD is too high (higher than 10 7 ) to be relevant. Even though the high path loss in watery mediums strictly limits the communication range of nano-devices, we should also analyze its impact on nano-network performance and highlight its relevance, even for small variations. The fact that future research could reveal that there are some parts of the human body where blood flow presents lower absorption at THz frequencies (extending the communication range of nano-devices), therefore making this analysis useful to highlight how performance can be affected. Thereby, Fig. 10 shows the throughput as a function of the communication range (r), varying it from 0 to 5 mm (values in line with the ranges expected for nano-networks [1] , [24] ), with 10 4 nanonodes. As can be noted, the impact of r on nano-network performance is the most significant among all the parameters analyzed. For example, the act of increasing r from 1 to 2 mm implies an improvement of approximately 8 times in throughput for D = 5 mm and k = 10. The larger D is, the more noticeable the enhancement will be, since the volume of the vein within the coverage range is greater. If progress in nano-communications enabled nano-devices to increase r up to 5 mm inside the human body, nano-network throughput would increase by a factor of approximately 70, drastically boosting the potential of flow-guided nano-networks. In this subsection, we analyze potential flow-guided nanonetworks based on the applications described in Section II. For all the applications, the nano-router would be located on the cephalic vein, a superficial vein in the hand that would allow communication between the nano-router and an external device, as studied in [24] . On average, the diameter of this vein is about 6 mm with a flow velocity of 10.9 cm/s, in accordance with the study in [53] . Regarding the communication range of nano-nodes, we consider a worstcase scenario in which the communication range is limited to Table 2 . For the first application (bacterial blood infections), it is necessary to locate a bio-sensor in a renal vein (η = 0.1 [54] ) which is able to send a warning frame (to the nano-router) before 1 hour (3600 seconds) from the moment the level of bacteria reaches a given threshold. In order to ensure this condition with a probability of 99%, three parameters must VOLUME 8, 2020 FIGURE 11: τ av · n min vs k, so that the value of QoD is equal to 0.99 for m = m target . be taken into account: QoD, τ av and k. On one hand, the number of nano-nodes in the nano-network should be high enough to ensure a QoD equal to 0.99 for a certain number of rounds (m target ), defined as: m target = τ target /T , where τ target is the target deadline required for the application under study. In this case, τ target = 3600 s, with the value of m target being equal to 60 rounds. On the other hand, QoD also depends on the value of k, with m target ≥ k ≥ 2, obtaining higher values as k increases (see Fig. 7c ). However, as shown in Fig. 8a , when k grows, the freshness of the transmitted frames is compromised, implying an increase of τ av . Therefore, to calculate the values of n and k to meet a specific deadline, a trade-off between QoD and τ av should be considered to achieve a good nano-network performance with acceptable information freshness. To this end, we define the metric τ av · n min , with n min as the minimum number of nano-nodes necessary to obtain a QoD equal to 0.99. This metric provides a balance between the number of nodes required (that decreases when k gets higher) and the average frame delay (that increases with k). Fig. 11 shows the normalized value of this metric as a function of k. The maximum value of τ av · n min indicates the equilibrium point between n min and τ av , obtaining the optimal value of k. When k is excessively low, n min gets too high, even though τ av is at a minimum, resulting in a metric value close to zero. Similarly, when k becomes too high, n min decreases but the value of τ av becomes too high to meet the application requirement. Results reveal that a nano-network with 6246 nano-nodes storing a frame for 11 rounds (k = 11) should be able to send a frame before 1 hour (i.e., 60 rounds) with a QoD of 0.99, thus being enough to provide robust and reliable service. The throughput provided by this nano-network is 0.073 frames/min (i.e., one frame every 13.7 minutes, on average), with τ av equal to 6.5 minutes. The following three applications (i.e., viral load monitoring, sepsis, and heart attacks) have similar requirements since the nano-network must be designed to send a warning before a specific time limit. For the viral load monitoring application, the bio-sensor should be located in the cephalic vein (η = 0.0056 [53] ) and the warning must be delivered before 1 day (τ target = 86400 s). Following the same procedure as in the previous application, the optimal value of k to minimize the number of nano-nodes is 55, while the nano-network would need 580 nano-nodes to meet the requirements. Regarding sepsis detection, the bio-sensor is placed in the jugular vein (η = 0.14 [55] ), the deadline is 1 hour (τ target = 3600 s), while for heart attacks the bio-sensor is positioned in the cava vein (η = 0.35 [56] ), and the warning must be reported before 15 minutes (τ target = 900 s). In these two cases, the minimum number of nano-nodes in the nano-network is 5397 (k = 11) and 19294 (k = 6), respectively. As can be observed, the impact of the target deadline on the size of the nano-network is much greater than the location of the bio-sensor. Finally, the last application (restenosis) requires a periodic update of the state of the bio-sensor, located in a coronary artery (η = 0.03 [57] ), so the performance requirement relies on the throughput and the average delay. An update period of 1 hour should be enough to keep medical staff well informed about a patient's condition. In this case, we size the nanonetwork to get a throughput of 0.033 frames per minute (2 frames per hour), with τ av = 30 minutes. Thus, the number nano-nodes required for this application would be 2328. The nano-network features obtained with the proposed analytical model for each application are shown in Table 3 . The use of the THz band in the field of nano-communications could be a real breakthrough in applied medicine and revolutionize the way information about the state of human organisms and particular tissues is collected. In pursuit of this objective, in this paper we have conceptually presented an inbody flow-guided nano-network composed of three different types of devices: (i) bio-sensors measuring medical parameters, (ii) nano-nodes circulating within the bloodstream and working as data carriers, and (ii) nano-routers performing as gateways and forwarding vital medical information acquired from the nano-network to external devices directly connected to medical personnel. As thoroughly reviewed, this nanonetwork would be able to play an essential role in diverse applications, concretely, in the early-stage detection of bacterial and viral infections, sepsis, heart attacks, and restenosis. Based on this nano-network architecture, we have derived an analytical model jointly considering the peculiarities of nano-devices (i.e., energy balance and communication in the THz band) and the complex branched nature of the cardiovascular system. This model accurately predicts nanonetwork performance, employing different figures of merit; that is, throughput, Quality of Delivery (QoD), and average transmission delay. In addition, this model can be used to adequately project the number of nano-nodes required for each application. Nano-network performance has been analyzed as a function of different parameters, highlighting the impact of (i) the number of nano-nodes, (ii) the number of rounds that a frame is stored in nano-nodes memory, (iii) the diameter of the vein where the nano-router is implanted, and (iv) the nano-nodes communication range. All the results obtained have also been validated by means of simulations. Finally, we have analyze nano-network dimensioning based on the particular requirements of each medical application. To this end, we have tuned the parameter k to minimize the number of nano-nodes employed to meet the specifications. Outcomes reveal that a nano-network employing a reasonable number of nano-nodes would be able to effectively fulfill medical application specifications, reducing intrusiveness. Keeping in mind the ultra-small size of these nano-nodes, the number of devices considered (between 580 and 20000), deployed in-body, should be seen as non-invasive. To sum up, this work has shown that THz nanocommunications can pave the way for multiple and promising medical applications, being able to perform useful tasks without needing a huge number of nano-devices. Besides, the analytical model proposed here represents a step forward in the design and deployment of flow-guided nano-networks, as it is generic enough to be directly employed or easily adapted to many other different applications, widening the scope of THz flow-guided nano-network applicability. He has been the head of several research projects in the field of communication networks and optimization, and he currently is a reviewer of several journals listed in the ISI-JCR. He is also inventor/co-inventor of 9 patents or utility models, and he has been a TPC member or Chair in about thirty International Congresses or Workshops. His main research interests are in the areas of wireless sensor networks (WSNs), streaming services, smart grid, IoT, and nano-networks. PAWEL KULAKOWSKI received his Ph.D. in telecommunications from the AGH University of Science and Technology in Krakow, Poland, in 2007, and currently he is working there as an assistant professor. He spent about 2 years in total as a post-doc or a visiting professor at Technical University of Cartagena, University of Girona, University of Castilla-La Mancha and University of Seville. He was involved in research projects, especially European COST Actions: COST2100, IC1004 and CA15104 IRACON, focusing on topics of wireless sensor networks, indoor localization and wireless communications in general. His current research interests include molecular communications and nanonetworks. He was recognized with several scientific distinctions, including 3 awards for his conference papers and a governmental scholarship for young outstanding researchers. VOLUME 8, 2020 The Internet of nano-things Electromagnetic wireless nanosensor networks Realizing the internet of nano things: Challenges, solutions, and applications Survey on terahertz nanocommunication and networking: A top-down perspective Computing and communications for the software-defined metamaterial paradigm: A context analysis From nano-communications to body area networks: A perspective on truly personal communications A comprehensive survey on hybrid communication for internet of nano-things in context of body-centric communications Function Centric Nano-Networking: Addressing nano machines in a medical application scenario Internet of nano-things network models and medical applications Molecular communication for drug delivery systems: A survey Applications of molecular communications to medicine: A survey Routing in fret-based nanonetworks Molecular communication and nanonetwork for targeted drug delivery: A survey Fully electronic silicon-based THz pulse sources and detectors Graphene-based plasmonic nano-antenna for terahertz band communication in nanonetworks Study of hybrid and pure plasmonic terahertz antennas based on graphene guided-wave structures Use of terahertz photoconductive sources to characterize tunable graphene rf plasmonic antennas Graphene-based nano-patch antenna for terahertz radiation Graphene-based plasmonic nanotransceiver for terahertz band communication IEEE recommended practice for nanoscale and molecular communication framework Numerical Analysis and Characterization of THz Propagation Channel for Body-Centric Nano-Communications Terahertz electromagnetic field propagation in human tissues: A study on communication capabilities Terahertz channel characterization inside the human skin for nano-scale body-centric networks A nanoscale communication network scheme and energy model for a human hand scenario Optimal transmission policy derivation for iont flow-guided nanosensor networks Joint Energy Harvesting and Communication Analysis for Perpetual Wireless Nanosensor Networks in the Terahertz Band On the Nature of Energy-Feasible Wireless Nanosensor Networks TH-PPM with non-coherent detection for multiple access in electromagnetic wireless nanocommunications An Energy Conserving Routing Scheme for Wireless Body Sensor Nanonetwork Communication Energy Scavenging Methods for WBAN Applications: A Review Nanodevice arrays for peripheral nerve fascicle activation using ultrasound energy-harvesting Optimizing Energy Consumption in Terahertz Band Nanonetworks The internet of bio-nano things TTL-based Efficient Forwarding for Nanonetworks with Multiple Coordinated IoT Gateways A logic-gated nanorobot for targeted transport of molecular payloads A biomimetic nanosponge that absorbs pore-forming toxins Magneto-aerotactic bacteria deliver drugcontaining nanoliposomes to tumour hypoxic regions Hybrid biomembrane-functionalized nanorobots for concurrent removal of pathogenic bacteria and toxins Multisensor-integrated organs-onchips platform for automated and continual in situ monitoring of organoid behaviors Hcv detection, discrimination, and genotyping technologies Time above 1500 copies: a viral load measure for assessing transmission risk of hiv-positive patients in care Mean cell volume of neutrophils and monocytes compared with c-reactive protein, interleukin-6 and white blood cell count for prediction of sepsis and nonsystemic bacterial infections Plasma clearance, organ distribution and target cells of interleukin-6/hepatocyte-stimulating factor in the rat Cell biology by the numbers. Garland Science Troponin t and heart type fatty acid binding protein (h-fabp) as biomarkers in patients presenting with chest pain Understanding and managing in-stent restenosis: a review of clinical data, from pathogenesis to treatment Femtosecond-Long Pulse-Based Modulation for Terahertz Band Communication in Nanonetworks The Cardiovascular System -2nd Edition: Systems of the Body Series A flexible medium access control protocol for dense terahertz nanonetworks Congestion control by deviation routing in electromagnetic nanonetworks Circuits for a cubic-millimeter energy-autonomous wireless intraocular pressure monitor Highresolution blood flow velocity measurements in the human finger Hemodynamic changes in the cephalic vein of patients with hemodialysis arteriovenous fistula Morphometric analysis of the renal veins Flow volume in the jugular vein and related hemodynamics in the branches of the jugular vein Vena caval flow: assessment with cine mr velocity mapping SEBASTIAN CANOVAS-CARRASCO received the B.S. degree in telecommunication systems engineering and the M.S. degree in telecommunications engineering from the Universidad PolitÈcnica de Cartagena