## 6 Network Setup
### Simulation Results of 3D-Ocdma-Pon  
First, note that the eye diagrams of eight active users shown in Figure 16 are all different, and none of them are similar to each other. Moreover, the Q-factor values of the users are between 9 and 12 dB, which means that our proposed code offers good results in spite of high data rates, up to 8 Gbps. The 3D-SWZCC code has the ability to detect and restore the desired signals. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Subcarriers**} & \multirow{2}{*}{\(\mathbf{X_{g}^{T}}\)} & \multicolumn{2}{c}{\(Y_{h}\)} & \multicolumn{2}{c}{\(Z_{l}\)} & \multirow{2}{*}{**Implemented**} \\ \cline{3-3} \cline{5-6}  & & \(t_{1}\) & & \(t_{2}\) & & \(C_{1}\) & \(C_{2}\) & Code \\ \hline \multirow{2}{*}{\(1^{st}\)_Code_} & \(\lambda_{1}\) & & & & & & \\ \cline{2-6}  & \(\lambda_{2}\) & & & & & \(\lambda_{1},t_{1},C_{1}\) \\ \hline \multirow{2}{*}{\(2^{nd}\)_Code_} & \(\lambda_{1}\) & & & & & \(\lambda_{2},t_{1},C_{1}\) \\ \cline{2-6}  & \(\lambda_{2}\) & & & & & \(\lambda_{1},t_{2},C_{1}\) \\ \hline \multirow{2}{*}{\(3^{rd}\)_Code_} & \(\lambda_{1}\) & & & & & \(\lambda_{1},t_{2},C_{1}\) \\ \hline \multirow{2}{*}{\(4^{th}\)_Code_} & \(\lambda_{1}\) & & & & \(\lambda_{2},t_{2},C_{1}\) \\ \cline{2-6}  & \(\lambda_{2}\) & & & & \(\lambda_{1},t_{1},C_{2}\) \\ \hline \multirow{2}{*}{\(5^{th}\)_Code_} & \(\lambda_{1}\) & & & & \(\lambda_{2},t_{1},C_{2}\) \\ \cline{2-6}  & \(\lambda_{2}\) & & & & \(\lambda_{1},t_{2},C_{2}\) \\ \hline \multirow{2}{*}{\(7^{th}\)_Code_} & \(\lambda_{1}\) & & & & \(\lambda_{1},t_{2},C_{2}\) \\ \cline{2-6}  & \(\lambda_{2}\) & & & & \(\lambda_{2},t_{2},C_{2}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Performed code-word in our proposed system. Figure 15: Block diagram of the 3D-OCDMA system. In accordance with the aforementioned results in Figure 14, the fact that the eye diagrams of different users are not the same means that the BER and Q-factor values are also different. These phenomena can be explained by several factors:  
1. Power waste: All users have equal power on the transmitter side, but during the transmission, they are subject to power losses, and this loss is not necessarily the same for all of the users. 2. Synchronization absence: Each user sends its information, but it is not necessary for all users to be restricted to a given moment. 3. PIIN effect: Since the power loss is different for each user, there must be varying PIIN effects, as in Equation (24), so this will be reflected by the BER. Additionally, this was demonstrated in Figure 11.
4. Spectrum differential: OCDMA is considered a multi-service transmission technique. This means that it can send data in different formats, such as audio, videos, files, images, etc. Further, each format has its signal type; this means that there are various signal types carried in the same network, and each one has a distinct spectrum. Second, the performance of the 3D-SWZCC code is also estimated at different data rates and characterized by referring to the BER and the eye diagram patterns, as shown in Figure 17. It is clear that the SWZCC code gives the 3D-OCDMA system a good performance; this can be observed through the resulting BER and Q-factor values. The BER values are \(3.48\times 10^{-29}\), \(5.73\times 10^{-18}\), and \(7.55\times 10^{-13}\), and the Q-factor values are 18.84, 11.09, 8.51, and 7.05 for data rates of 0.622, 1, 1.5, and 2 Gbps, respectively. Consequently, we note that both the Q-factor and BER values do not override their sills (Q = 6 dB, BER = \(10^{-9}\)); they should be, respectively, greater than 6 dB and less than \(10^{-9}\). Additionally, the system performance can be evaluated through the opening of the eye diagram, because if it extends over a wider range, this denotes the diminishing of MAI and indicates that the system has better performance and vice versa. Figure 16: Eye diagrams of the eight users at a data rate of 1 Gbps. Figure 17: (**a**-**c**). Eye diagrams of the eight users using 3D-SWZCC code at 0.622, 1, and 2 Gbps.