# OpticalTrust: A Sensor-to-Blockchain Framework Using Free-Space Optical Communication
## 3 Methodology
### Sensor Nodes  
Sensor networks have emerged as a transformative technology in the field of environmental monitoring, industrial automation and smart communication. These distributed systems, comprising numerous spatially dispersed autonomous devices equipped with sensors, have revolutionized data collection and analysis across various domains [33]. The fundamental architecture of a sensor network typically consists of sensor nodes, gateway nodes, and a central server or base station. Sensor nodes, often referred to as \"motes\", are compact devices capable of measuring diverse environmental parameters such as temperature, humidity, pressure, or chemical concentrations. These nodes are designed to operate with minimal energy consumption, often relying on battery power or energy harvesting techniques for long-term deployment [34].  
Consider a sensor network comprising a set of \(\
u\) sensors, denoted as \(\Omega=\omega_{1},\omega_{2},\ldots,\omega_{\
u}\). Each sensor \(\omega_{i}\) collects data at discrete time intervals \(\tau\). The data stream generated by sensor \(\omega_{i}\) at time \(\tau\) can be represented as \(\chi_{i}(\tau)\). The data collection process for each sensor can be modeled as afunction:  
\[\chi_{i}(\tau)=\mathcal{F}_{i}(\varepsilon(\tau),\sigma_{i}) \tag{1}\]  
where \(\mathcal{F}_{i}\) represents the sensing function of \(\omega_{i}\), \(\varepsilon(\tau)\) denotes the environmental state at time \(\tau\), and \(\sigma_{i}\) represents the inherent noise and inaccuracies of the sensor. These individual data streams are aggregated by a gateway \(\Gamma\). The aggregation process can be mathematically expressed as:  
\[\Psi(\tau)=\Gamma(\chi_{1}(\tau),\chi_{2}(\tau),\ldots,\chi_{\
u}(\tau)) \tag{2}\]  
where \(\Psi(\tau)\) is the composite data stream produced by the gateway. The edge device \(\mathcal{E}\) applies a series of transformations to \(\Psi(\tau)\). These transformations can include filtering, compression, and encoding operations. Let \(\mathcal{H}\) represent the composite transformation function applied by the edge device. Then:  
\[\Psi^{\prime}(\tau)=\mathcal{H}(\Psi(\tau))=\mathcal{H}(\Gamma(\chi_{1}(\tau),\chi_{2}(\tau),\ldots,\chi_{\
u}(\tau))) \tag{3}\]  
where \(\Psi^{\prime}(\tau)\) is the processed data stream ready for transmission. The processed data stream \(\Psi^{\prime}(\tau)\) from the edge device is fed into the FSOs system's data modulator. This process can be represented as follows:  
\[M(\tau)=\mathcal{M}(\Psi^{\prime}(\tau)) \tag{4}\]  
where \(M(\tau)\) is the modulated signal, and \(\mathcal{M}\) is the modulation function. The modulated signal \(M(\tau)\) is then combined with the continuous wave laser output in the Mach-Zehnder Modulator (MZM) [35]. The optical signal produced by the MZM can be expressed as:  
\[S(\tau)=A_{0}\cos(\omega_{0}\tau+\pi M(\tau)/V_{\pi}) \tag{5}\]  
where:  
* \(A_{0}\) is the amplitude of the optical carrier,
* \(\omega_{0}\) is the angular frequency of the laser,
* \(V_{\pi}\) is the half-wave voltage of the MZM.  
This optical signal \(S(\tau)\) is then amplified and transmitted through free space via the FSOs transmitter optics.  
The light signal subsequently undergoes amplification by the EDFA [36]:  
\[S^{\prime}(\tau)=G\cdot S(\tau) \tag{6}\]  
where \(G\) is the gain of the EDFA. The amplified signal \(S^{\prime}(\tau)\) is then transmitted through free space via the FSOs transmitter optics. The received signal \(\text{R}(\tau)\) at the FSOs receiver can be modeled as:  
\[R(\tau)=\eta\cdot S^{\prime}(\tau)+N(\tau) \tag{7}\]where \(\eta\) represents the channel attenuation factor. N(\(\tau\)) is additive noise in the channel, including thermal noise, and background radiation at the receiver.