## 3 Simulation Results  
This section presents the simulation results using MATLAB to evaluate the effectiveness and performance of the proposed method. The bit error rate (BER) performance of the proposed method was compared with that of the binary concentration shift keying (CSK) [21] and faster molecular-based CSK (FM-CSK) methods [11]. The CSK method is a conventional approach that uses fixed-time synchronization-based detection. It requires knowledge of the statistics for the quantity of molecules that arrive at the sampling time. The FM-CSK method provides a beneficial effect on BER performance by using two types of molecules with different diffusion coefficients. Bit-1 and bit-0 were transmitted by the emission of \(Q\) molecules and without molecules, respectively. The \(\gamma\) value of \(c_{r}\) was set to 0.8, and the initial detection time was set to a random value. Table 1 lists the simulation parameters, and the results were averaged over 100 iterations.  
Figure 3 shows the BER performance of the proposed, CSK, and FM-CSK methods in cases where \(M=4\), \(M=8\), and \(M=12\), respectively. The transmission distance between the transmitter and receiver was set between 400 and 1100 nm. Figure 3 clearly shows that, with the increase in transmission distance, the BER values of all three methods also increased. This result indicates that a higher \(M\) value led to a higher BER because the severity of the disturbance of the diffusion-based channel was intensified as the distance increased, which resulted in a larger detection error. Furthermore, as the number of bits of the symbol increased, BER was deteriorated by a stronger ISI. Among the three methods, CSK demonstrated the worst performance at all \(M\) values and distances, except when the distance was less than 450 nm, because CSK employed a fixed-time synchronization-based detection that is sensitive to ISI in a fluctuating environment. On the basis of the peak concentration levels of the synchronization molecules, a small initial estimation error could significantly affect the detection accuracy. Conversely, in terms of BER performance, the proposed method consistently outperformed the CSK and FM-CSK methods at all distances and \(M\) values. Moreover, no significant increase occurred in the BER performance curve of the proposed method with the increase in either \(M\) or distance compared with those in the CSK and FM-CSK methods.  
Figure 4 shows the effect of \(L\) on the BER performance. The value of \(L\) was \(L=1\sim 7\) at various distances between \(r=600\) and 1100 nm, respectively. The value of \(M\) was set to 8. The results reveal that, for a distance of less than 800 nm, the increase in \(L\) did not significantly affect BER. However, at distances of more than 900 nm, a higher \(L\) value evidently led to a lower BER, which means that the more historical the data for the reflection are, the more helpful the proposed method is in reducing the estimation errors for longer transmission distances between transmitter and receiver.  
\begin{table}
\begin{tabular}{l l} \hline
**Parameter** & **Value** \\ \hline Distance between two nanomachines \(r\) & 400 nm\(\sim\)1100 nm \\ Number of bits in a symbol \(M\) & 4, 8, 12 \\ History length \(L\) & 1\(\sim\)7 \\ Diffusion coefficient \(D\) & 2.2 \(\times\) 10\({}^{-9}\) m\({}^{2}\)/s \\ Number of molecule released from transmitter \(Q\) & 5 \(\times\) 10\({}^{5}\) \\ Symbol duration \(T_{s}\) & 8 ms \\ Sampling number \(N_{s}\) & 5 \\ \hline \end{tabular}
\end{table}
Table 1: Simulation parameters.