# Development of New Spectral Amplitude Coding OCDMA Code by Using Polarization Encoding Technique
## 5 Performance Analysis
### Theoretical Analysis
Integrating the PSD in Equations (11) and (16), the obtained result is:  
\[\int_{0}^{\infty}G(v)dV=\int_{0}^{\infty}\Bigg{[}\frac{P_{sr}}{\Delta V}\sum_{ k=1}^{K}d_{K}\sum_{i=1}^{L}C_{K}(i)C_{l}(i)\bigg{\{}u\bigg{[}\frac{\Delta V}{N} \bigg{]}\bigg{\}}\bigg{]}dV \tag{17}\]  
When all users are transmitting bit \"1\":  
\[\sum_{k=1}^{K}d_{K}=W \tag{18}\]  
the photocurrent can be expressed as:  
\[I_{p}=\Re\bigg{[}\frac{P_{sr}W}{N}\bigg{]} \tag{19}\]  
the variance of photocurrent can be expressed by:  
\[\langle i^{2}\rangle=2 eBI_{p}+\frac{4K_{b}T_{n}B}{R_{L}} \tag{20}\]  
by using Equations (19) and (20), an SNR for direct detection technique can be derived as follows [26]:  
\[SNR=\frac{(I_{p})^{2}}{\langle I^{2}\rangle} \tag{21}\]\[SNR=\frac{\frac{\Re^{2}P_{p}^{2}W^{2}}{N^{2}}}{\frac{2 eB\Re P_{p}W}{N}+\frac{4K_{ k}T_{k}B}{R_{L}}} \tag{22}\]  
Thus, the BER is obtained by [26]:  
\[BER=\frac{1}{2}\epsilon rfc\sqrt{\frac{SNR}{8}} \tag{23}\]  
Based on Equations (22) and (23), respectively, the results of BER are shown in Figure 2. Note that Figure 2 shows a significantly better performance FDW can support more than 220 simultaneous users compared to EDW, which can support no more than 80 simultaneous users before the system starts to degrade. This is due to the superior code properties of the FDW code, such as cross-correlation, which is always equal to one. By using a polarization encoding technique, the code can support much more users, as shown in the analysis. Hadamard and MFH, on the other hand, can support no more than 30 simultaneous users. Hadamard was designed to have a long code length, \(N\) and a small code weight, \(W\). This is because the temporal overlap between pulses from different users at the intensity correlator output is much smaller. These previous codes have much higher bit error rate (BER), and the number of coactive users is also limited. Hadamard code is not an efficient code because as the number of users increases, the cross-correlation will also increase. MFH has an ideal cross-correlation, but the code structure is complicated to design. In order for MFH to increase the performance in Figure 2, the amount of weight, \(W\), and the value of \(Q\) must be increased. The design will become much more complex as the amount of weight and \(Q\) increases [29]. The number of code sequences supported by MFH is determined by the value of the prime integer \(Q\). The relationship between the maximum number of users and the value of the prime number \(Q\) for the MFH code sequence is given by \(K=Q^{2}\). The prime number \(Q\) can have any value, such as 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53,..., \(Q_{PrimeNumber}\). For \(Q=7\), the maximum number of users that MFH can accommodate is 49. However, based on theoretical calculations (refer to Figure 2), the maximum number of users can only support up to 30 users with a BER of \(10^{-9}\), leaving 19 codes unused and making the code less efficient. However, the FDW code family is clearly more efficient because the sequence can be generated precisely according to the number of users. In addition, the performance of FDW is also determined based on BER vs. received power, Psr(dBm), as shown in Figure 3. Note that the Hadamard code has a slightly better BER at \(-25\) dBm than FDW code, but FDW code has a much better BER at \(-20\) dBm than Hadamard, MFH, MDW and EDW code. To obtain a clear explanation, the graph signal and noise power of the OCDMA code were plotted in \[\int_{0}^{\infty}G(v)dV=\int_{0}^{\infty}\Bigg{[}\frac{P_{sr}}{\Delta V}\sum_{ k=1}^{K}d_{K}\sum_{i=1}^{L}C_{K}(i)C_{l}(i)\bigg{\{}u\bigg{[}\frac{\Delta V}{N} \bigg{]}\bigg{\}}\bigg{]}dV \tag{17}\]0 The noise power for Hadamard and MFH is higher than FDW code when the Psr reaches \(-20\) dBm and above. FDW signal power is in between Hadamard and MFH, in which Hadamard has the highest signal power. However, due to the noise power increasing exponentially, the overall performance of Hadamard and MFH systems drop significantly.