# WON-OCDMA System Based on MW-ZCC Codes for Applications in Optical Wireless Sensor Networks
## 5 Theoretical Analysis  
To analyse the results obtained, we assume each sensing point acts as a data transmitter operating at the same data rate and using OOK modulation. This analysis aims to provide a lower bound of the system capacity. The SNR of a consecutive fibre optic communication system is attained as [23]:  
\[SNR=\frac{\langle I\rangle^{2}}{\langle I^{2}\rangle}=\frac{I_{b}^{2}}{i_{nb}^{2}} \tag{11}\]  
where \(i_{nb}^{2}\) is the power of noise sources that exist in the photocurrent and \(I_{b}\) is the mean acquired photocurrent at the receiver. It can be determined as:  
\[I_{b}=RbW_{h}P_{r} \tag{12}\]  
where \(P_{r}\) is the achieved optical power per wavelength, \(R\) is the photodiode responsivity, \(b\) is a bit value and is equal to 1, and where the specified subscriber transmit bit \"1\", elsewhere it is zero. \(W_{h}\) is the count of wavelengths for the users in group \(h\) which are retrieved by the photodetector. Their values depend on the detection technique and the coding technique. For complementary subtraction \(W_{h}=W\) because all frequencies of the users are received by the photodetector. Nevertheless, in the direct decoding, that is the technique used for decoding the MW-ZCC, the \(W_{h}\) figure is reliant on the used coding technique. For example, \(W_{h}\) is equal to 1 when the utilised code has a modified quadratic congruence, 2 for MDW code and \(W\) for ZCC. In addition, parameter \(i_{nb}^{2}\) represents the variance of the total noise power, and for the SAC-OCDMA set-up which employs a multiwavelength laser, it is attained by [33; 34]:  
\[i_{nb}^{2}=i_{RINb}^{2}+i_{slb}^{2}+i_{th}^{2} \tag{13}\]  
Figure 6: Eye diagram of signals related to (**a**) data service and (**b**) video surveillance data after 3.2 km propagation in atmosphere. where \(i^{2}_{RINb}\), \(i^{2}_{th}\) and \(i^{2}_{shb}\) are the variance of the noises incidental to the relative intensity noise (RIN), thermal noise and shot noise. \(i^{2}_{shb}\) is expressed as:  
\[i^{2}_{shb}=2 EbW_{h}P_{r}B_{e} \tag{14}\]  
\(B_{e}\) denotes the electrical bandwidth, where \(E\) represents the electron's charge. With the assumption that the number of disturbing signal transmitting bit \"1\" at every wavelength for all the users are the same, the mean value for \(x\) is:  
\[x=\frac{W_{h}^{2}(K-1)}{2N} \tag{15}\]  
Since \(RIN\) occurs at the transmitter and all other interfering users cause crosstalk with the desired user signal, it is concluded that \(W_{h}=W\) and  
\[i^{2}_{RINb}=RIN(bWP_{r}+xP_{c})^{2}B_{e} \tag{16}\]  
where \(RIN\) is the noise factor. The thermal noise can be achieved by:  
\[i^{2}_{th}=\frac{4K_{B}TB_{e}}{R_{L}} \tag{17}\]  
where \(T\) is temperature, \(K_{B}\) is the Boltzmann constant, and \(R_{L}\) is the load resistor. Then the power variance of the total noise is calculated as:  
\[i^{2}_{n}=i^{2}_{RIN}+i^{2}_{sh}+i^{2}_{th} \tag{18}\]  
To obtain the SNR, considering that the probability of sending bit '1' by every user is \(1/2\), then the \(RIN\), as well as the shot noise, must be divided by 2. Therefore, the total SNR can be achieved by:  
\[SNR=\frac{R^{2}W_{h}^{2}P^{2}|_{r}}{\frac{RIN}{2}(WP_{r})^{2}B_{e}+EW_{h}P_{r} B_{e}+\frac{4K_{B}TB_{e}}{R_{L}}} \tag{19}\]  
where \(P_{r}\) in a SAC-CDMA operating in WON is obtained as:  
\[I_{b}=RbW_{h}P_{r} \tag{12}\]0  
Here, \(P_{t}\) is the total sent power into the free space medium, \(D\) is the diameter of the utilised receiver aperture, \(N\) denotes the code length, \(\Omega\) represents the attenuation coefficient, \(L\) is the total length of WON medium, and the \(\theta\) is the beam divergence. To achieve BER as the system performance parameter, the air turbulence effect should be taken into account. The intensity of the turbulences is measured by a Rytov variance, which is attained by:  
\[I_{b}=RbW_{h}P_{r} \tag{12}\]1  
here \(C_{n}^{2}\) is the refractive index structure coefficient and \(K_{own}=2\pi/\lambda\) is the optical wave number.