Molecular communication (MC) has recently emerged as an underpinning paradigm of exchanging information in nano-scale environments such as organs, tissues, soil, and water . This information exchange is conducted among nanomachines which are the devices with nano-scale functional components. Within the research community, diffusion-based MC is a simple but commonly adopted MC system. In such a system, information molecules propagate using kinetic energy only, which preserves a high energy efficiency. One of the major challenges in designing and analyzing a diffusion-based MC system is receiver modeling. The majority of the existing MC studies have considered two types of receivers: passive receivers and active receivers. Passive receivers do not impose any impact on molecule propagation, while active receivers can absorb molecules when they hit the receiver’s surface. In nature, most receiver nanomachines react with or remove selected information molecules from the environment when they hit the receiver’s surface. Thus, active receivers are generally more realistic than passive ones in describing the chemical detection mechanism in MC. This motivates us to investigate the properties of absorbing receivers.
The notion of diffusion with absorption is a long existing phenomenon that has been described in the literature, e.g., . Considering a diffusion-based MC system with a single fully absorbing receiver within an unbounded three-dimensional environment,  presented the hitting rate of molecules at different times and the fraction of molecules absorbed until a given time. Recently,  and  evaluated the impact of receiver with reversible absorption on the performance of MC systems, where a molecule can be released back to the environment at some time after being captured by the receiver.
, the simulation of MC systems is also an effective means for performance evaluation. One of the most common MC simulation methods is particle-based microscopic simulation. For diffusion-based MC, molecules are moved by adding Gaussian random variables (RVs) to their-, -, and -coordinates at the end of every simulation time step. In practice, molecules may actually diffuse into an absorbing receiver between two sampling times. To determine this absorption, some existing simulation algorithms simply compared the observed coordinates of molecules with those of the receiver [6, 4, 7]. As a consequence, the molecules that hit a receiver between sampling times cannot be considered as “absorbed” by using these simulation algorithms. Recently,  and  investigated the possibility of molecule absorption between sampling times. Specifically,  declared a molecule as “absorbed” if its straight-line trajectory within a time step crossed an absorbing surface. Differently, 
approximated the intra-step absorption probability for spherical receiver boundaries using the equation for planar receiver boundaries given by. This approximation was referred to as the refined Monte Carlo (RMC) algorithm.
The key contribution in this paper is that we propose a new algorithm, i.e., the a priori Monte Carlo (APMC) algorithm, for simulating an MC system with an absorbing receiver, considering a relatively large time step length. We show that using our APMC algorithm, the fraction of molecules absorbed at the receiver precisely matches the corresponding analytical result when the time step length is relatively large, or equivalently, the receiver’s radius is small. This demonstrates that our APMC algorithm achieves a high simulation efficiency.
Ii System Model
We consider a diffusion-based MC system within a three-dimensional space, as depicted in Fig. 1. In this system, a point transmitter (TX) is located at the origin of the space and a single fully absorbing spherical receiver (RX) is centered at location . We denote as the RX’s radius and as the RX’s boundary. At the beginning of a transmission process, the TX instantaneously releases molecules. We assume that the molecules are small enough to be considered as points. Once released, molecules diffuse in the environment according to Brownian motion until hitting the RX’s boundary. We denote as the number of molecules released from the origin at time and absorbed by the RX at time . As per [11, Eq. (3.116)], we express as
where is the diffusion coefficient and is the complementary error function. Here, describes the proportionality constant between the flux due to molecular diffusion and the gradient in the concentration of molecules.
As mentioned in Section I, the majority of the existing simulation algorithms for absorbing RXs did not consider the possibility of intra-step molecule absorption. This absorption is depicted in Fig. 2, which shows that the actual trajectory of a molecule may cross the absorbing boundary during one simulation time step, even if its initial position at the beginning of the time step and its final position at the end of the same time step are both outside the absorbing RX. If this crossing occurs, the molecule is absorbed by the RX in practice. The ignorance of this absorption leads to an underestimation of the number of molecules absorbed, thus deteriorating the accuracy of simulation. In this work, we refer to the probability that a molecule is absorbed during a simulation time step as the intra-step absorption probability. We note that the intra-step absorbing probability was only considered in [9, 8]. In , the intra-step absorption probability of a fully absorbing RX with the spherical boundary was approximated as that of a fully absorbing RX with an infinite planar boundary, given by [10, Eq. (10)]
where is the initial distance of a molecule from the absorbing boundary at the beginning of a time step, is the final distance of a molecule from the absorbing boundary at the end of the same time step, and is the simulation time step length.
Iii Simulation Algorithms
In this section, we first clearly present the common structure of the existing simulation algorithms for absorbing receivers. Then we present our proposed APMC algorithm.
Iii-a Common Structure of Existing Simulation Algorithms
Built upon the observation of the existing simulation algorithms for microscopic molecule absorption (such as those in [6, 8, 9]), we find that they follow a common structure. This common structure is presented in Algorithm 1.
We clarify that each algorithm has its own criterion for determining whether or not a molecule is absorbed by the RX, as given in Line 9 of Algorithm 1. The determination criteria for the existing algorithms in [6, 8, 9] are summarized as follows:
As per the determination criterion in , the molecules being observed inside the RX at the end of a time step are absorbed. This criterion is referred to as the simplistic Monte Carlo (SMC) algorithm.
As per the determination criterion in , a molecule is absorbed if the line segment from its initial position to its final position crosses the RX’s boundary. However, we note that the line segment crossing the RX’s surface is neither sufficient nor necessary to correctly detect intra-step absorption.
Iii-B A New A Priori Monte Carlo Algorithm
In this subsection, we propose a new simulation algorithm for approximating the fraction of molecules absorbed at a fully absorbing RX when is larger than that considered for the RMC algorithm in . We refer to the newly proposed algorithm as the APMC algorithm.
The procedure of the APMC algorithm is to first calculate, before the th molecule diffuses, the probability that this molecule will be absorbed in the current time step. This probability depends on the distance between this molecule and the center of the RX, , and the time step length, . Specifically, this probability is calculated as
which is obtained by scaling (1) by , replacing the total simulation time with , and replacing with . Then the molecule absorption is determined by generating a uniform RV , where , and comparing its value with the probability obtained by (3). A molecule is marked as “absorbed” if . After determining the molecules absorbed, each not-yet-absorbed molecule is propagated according to Brownian motion. If any not-yet-absorbed molecule is inside the RX’s boundary at the end of the current time step, we revert the movement of this molecule and let it propagate again, until this molecule diffuses to a location outside the RX. The APMC algorithm is detailed in Algorithm 2.
Iv Numerical Results
In this section, we use Monte Carlo simulations to compare the time-varying results produced by the SMC algorithm, the RMC algorithm, and the APMC algorithm for a single receiver. The algorithms are implemented in MATLAB. Throughout this section, we set the diffusion coefficient as and assume that other parameters vary. In the figures, denotes the number of time steps. If not otherwise noted, the TX-RX distance is and the number of molecules released is . The fraction of molecules absorbed is defined as the ratio between the number of molecules absorbed at the RX and the total number of molecules.
Fig. 3 plots the simulated fraction of molecules absorbed versus time for , , and or . In this figure, the analytical result obtained from (1) is also plotted for evaluating the accuracy of the algorithms. From this figure, we observe that our APMC algorithm achieves a higher accuracy when decreases while , , and remain unchanged. Specifically, Fig. 3(a) shows that the RMC algorithm matches the fraction of molecules absorbed expected by the analytical result when is small, which meets our expectation. Indeed, the performance of the RMC algorithm depends on the value of . When approaches 0 and is larger than , the surface area of the RX can be approximated by an infinite plane. Therefore, the probability of a molecule entering the RX between sampling times is comparable to the probability of a molecule crossing a planar boundary between sampling times. We also observe from Fig. 3(a) that when is small, the SMC algorithm and the APMC algorithm underestimates and overestimates the fraction of molecules absorbed, respectively. Unlike Fig. 3(a), Fig. 3(b) shows that the APMC algorithm matches the fraction of molecules absorbed expected by the analytical result whereas the other two algorithms do not. Particularly, the fractions of molecules absorbed produced by the RMC and SMC algorithms are very far away from the analytical result when . Indeed, when is large, the spherical RX’s boundary cannot be approximated by a plane. Therefore, the RMC algorithm overestimates the fraction of molecules absorbed.
Fig. 4 plots the simulated fraction of molecules absorbed, together with the analytical result from (1), versus time for , and or . We observe from this figure that when increases from to , our APMC algorithm achieves a higher accuracy. Specifically, Fig. 4(a) shows that the gap between the fraction of molecules absorbed produced by the APMC algorithm and that produced by the RMC algorithm is very small. Also, Fig. 4(a) shows that both the APMC and the RMC algorithms overestimate the fraction of molecules absorbed. Unlike Fig. 4(a), Fig. 4(b) shows that the APMC algorithm matches the fraction of molecules absorbed expected by the analytical result. Fig. 4(b) shows that the fraction of molecules absorbed produced by the RMC algorithm is approximately twice of that produced by the APMC algorithm when . This demonstrates the accuracy of our APMC algorithm when is large.
Fig. 5 depicts the distribution of molecules newly absorbed during each time step (e.g., from to ) for both the RMC and APMC algorithms for , , and . The analytical result in this figure is obtained based on (1). We observe from this figure that the RMC algorithm significantly overestimates the number of molecules newly absorbed when
, while our APMC algorithm gives an improved estimation accuracy whenby absorbing molecules according to (3). When increases, the overestimation of the RMC algorithm is slightly less severe than that of the APMC algorithm. We further observe that the distribution of molecules newly absorbed in Fig. 5(b) is very similar to that in Fig. 5(a), which demonstrates that our APMC algorithm does not noticeably affect this distribution. Importantly, the average of the simulated distribution using our APMC algorithm is not far from the analytical result.
We proposed a new a priori Monte Carlo (APMC) algorithm to simulate the probability that a molecule is absorbed by a spherical receiver in MC systems. Based on numerical results, we confirmed that our APMC algorithm produces a more accurate result for the fraction of molecules absorbed than the existing RMC and SMC algorithms when is large. This demonstrates that our algorithm is suitable to enable an efficient simulation with a relatively large diffusion time step length.
-  T. Nakano, A. W. Eckford, and T. Haraguchi, Molecular Communication. Cambridge University Press, 2013.
-  H. C. Berg, Random Walks in Biology. Princeton University Press, 1993.
-  H. B. Yilmaz, A. C. Heren, T. Tugcu, and C. B. Chae, “Three-dimensional channel characteristics for molecular communications with an absorbing receiver,” IEEE Commun. Lett., vol. 18, no. 6, pp. 929–932, June 2014.
-  Y. Deng, A. Noel, M. Elkashlan, A. Nallanathan, and K. C. Cheung, “Modeling and simulation of molecular communication systems with a reversible adsorption receiver,” IEEE Trans. Mol. Biol. Multi-Scale Commun., vol. 1, no. 4, pp. 347–362, Dec. 2015.
-  A. Ahmadzadeh, H. Arjmandi, A. Burkovski, and R. Schober, “Comprehensive reactive receiver modeling for diffusive molecular communication systems: Reversible binding, molecule degradation, and finite number of receptors,” IEEE Trans. Nanobiosci., vol. 15, no. 7, pp. 713–727, Dec. 2016.
-  H. B. Yilmaz and C.-B. Chae, “Simulation study of molecular communication systems with an absorbing receiver: Modulation and ISI mitigation techniques,” Simulation Model. Practice. Th., vol. 49, pp. 136–150, Dec. 2014.
-  I. Llatser, D. Demiray, A. Cabellos-Aparicio, D. T. Altilar, and E. Alarcón, “N3sim: Simulation framework for diffusion-based molecular communication nanonetworks,” Simulation Model. Practice. Th., vol. 42, pp. 210–222, Mar. 2014.
-  A. Noel, K. C. Cheung, R. Schober, D. Makrakis, and A. Hafid, “Simulating with AcCoRD: Actor-based communication via reaction–diffusion,” Nano Commun. Netw., vol. 11, pp. 44–75, Mar. 2017.
-  D. Arifler and D. Arifler, “Monte Carlo analysis of molecule absorption probabilities in diffusion-based nanoscale communication systems with multiple receivers,” IEEE Trans. Nanobiosci., vol. 16, no. 3, pp. 157–165, Apr. 2017.
-  S. S. Andrews and D. Bray, “Stochastic simulation of chemical reactions with spatial resolution and single molecule detail,” Phys. Biol., vol. 1, no. 3, p. 137, Aug. 2004.
-  K. Schulten and I. Kosztin, “Lectures in theoretical biophysics,” University of Illinois, vol. 117, 2000.