## 7 Network Simulation and Discussion  
In the second phase, in order to prove the results obtained in the first phase of the simulation by MATLAB software, our system, simulated using Optisystem software, is shown in Figure 15 for eight users; further, Table 6 shows the parameters that are used during the simulation. Moreover, Table 7 presents the coding process used in the simulation using Optisystem software, where the table is divided into three parts: spectral coding Y, which is performed by fiber Bragg gratings (FBG); temporal coding Y, which is performed by the delay lines; and spatial coding Z, which is performed by the star couplers. Moreover, the process is carried out according to the proposed code. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Value** \\ \hline Data rate & 1 and 2 Gbps \\ Effective source power & \(-115\) dBm \\ Central wavelength & \(1552.5\) nm \\ FBG bandwidth & \(0.8\) nm \\ MZM extinction ratio & \(30\) dB \\ PD responsivity & \(1\) A/w \\ Dark current & \(5\) nA \\ Thermal noise & \(1.8\,\times\,10^{-23}\) W/Hz \\ Coupling coefficient & \(0.5\) \\ Cutoff frequency & \(R_{b}\times 0.75\) GHz \\ Number of users & \(08\) \\ Code weight & \(2\) \\ Time delay & \(0\) ns, \(0.25\) ns, \(0.5\) ns, and \(0.75\) ns \\ Shot noise distribution & Gaussian \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Simulation parameters of a 3D-VWZCC network. Figure 14: EVM versus data rate when the number of active users K = 250 and effective source power P\({}_{\rm{sr}}=-10\) dBm. Figure 15: Diagram block of the 3D-VWZCC/OCDMA system. The three-dimensional encoding is explained as follows:  
The optical bandwidth is divided into four wavelengths, \(Y_{1}\), \(Y_{2}\), \(Y_{3}\), and \(Y_{4}\), according to the spectral sequence \(X_{1}=[1100]\) and \(X_{2}=[0011]\) (\([Y_{1}Y_{2}Y_{3}Y_{4}]\)), where the following four wavelengths are: \(Y_{1}=1550\) nm, \(Y_{2}=1552\) nm, \(Y_{3}=1554\) nm, and \(Y_{4}=1555\) nm, as four optical bandwidths between (1550-1555 nm). Similarly, for the time coding, it is divided into four different time delays: \(\tau_{1}=0\) ns, \(\tau_{2}=0.25\) ns, \(\tau_{3}=0.5\) ns, and \(\tau_{4}=0.75\) ns, according to the time sequence \(Y_{1}=[1100]\) and \(Y_{2}=[0011]\) (\(\{\tau_{1}\tau_{2}\tau_{3}\tau_{4}\}\)). Moreover, the spatial coding is also divided in the same way, into four branches of couplers C\({}_{1}\), C\({}_{2}\), C\({}_{3}\), and C\({}_{4}\), according to the spatial sequence \(Z_{1}=[1100]\) and \(Z_{2}=[0011]\)( \(\{\)C\({}_{1}\)C\({}_{2}\)C\({}_{3}\)C\({}_{4}\))); consequently, we connect each component with the other according to the 3D-VWZCC code. In the first part, each user contains an information source (pseudo-random bit sequence (PRBS), white light-type optical generator (white light source), non-return-to-zero pulse generator (NRZ Pulse Generator), electrical/optical modulator (Mach-Zehnder Modulator MZM), two sets of fiber Bragg gratings FBG1 and FBG2, two timers, and star couplers. Firstly, the PRBS generator generates a bit stream of 1 Gbps and converts this data to an NRZ line code signal (\(-1\), \(+1\)), then, an optical source is sent to the spectral encoder FBG1 to select the desired wavelengths; afterwards, the selected wavelengths are reflected and sent to the FBG2 encoder for compensation for the run-trip delay according to the spectral sequence. Then, the optical code is modulated with the NRZ signal and converted to optical domain using an external MZM modulator, secondly, the coded pulses are sent to the delay line for time encoding, and thirdly, the delay line output is connected with star couplers for spatial encoding. In this case, the signal is encoded to 3D-VWZCC. In the second part, each receiver contains star couplers, two timers, two sets of fiber Bragg gratings FBG1 and FBG2, PIN photo-detector, and low pass filter (low pass Bessel filter LPF).