## 2 Unipolar Optical Digital Modulation Schemes and Spreading Codes
### One-Dimensional Optical Spreading Codes  
Time-division multiple access (TDMA), wavelength-division multiple access (WDMA), and OCDMA are techniques of multiple access in optical wireless communications that implement multiplexed transmission and multiple access. Of these, OCDMA supports simultaneous multiple transmissions at the same frequency and the same time slot, and it uses optical spreading codes so that multiple users can be separately identified without interfering with one another. In the simplest type of optical spreading code, one-bit period \(T_{B}\) is divided into \(M\) time chips with duration \(T_{\text{C}}=\frac{T_{B}}{M}\), and these \(M\) chips are filled with optically spread code. That is, the spreading code sequence is selected to characterize the maximum auto-correlation and minimum cross-correlation to optimize the difference between a correct signal and interference. Primary time spreading codes suitable for OCDMA schemes are OOCs and various PC families. These are very sparse codes, and their code weights are small, thus requiring a long transmission time after spreading. In optical spreading codes, the weight is the number of ones in each of its codewords and the most important parameters in characterizing spreading codes, such as the number of chips, pulse peak power, and error probability [27]. OOCs are generally expressed as a quadruple \((N,w,\lambda_{a},\lambda_{c})\), where \(N\) is the code length, \(w\) is code weight (i.e., the number of ones), \(\lambda_{a}\) is the upper bound of the autocorrelation value for a non-zero shift, and \(\lambda_{c}\) is the upper limit of the cross-correlation value [29; 56; 57; 58]. In the OOC, a particular case where \(\lambda_{a}=\lambda_{c}=\lambda\) is expressed by the optimal OOC \((N,w,\lambda)\). \(|C|\) represents the cardinality of the OOC family (i.e., the size of the code set as the number of codewords in the code set). For OOCs to satisfy the condition \(\lambda_{a}=\lambda_{c}=\lambda=1\), \(|C|\) is upper-bounded by \([C]<\lfloor\frac{N-1}{w(w-1)}\rfloor\), where the \(\lfloor x\rfloor\)  
\begin{table}
\begin{tabular}{l c c c c} \hline \hline \multirow{2}{*}{**Modulation**} & **Peak-To-Average** & \multirow{2}{*}{**Peak Current**} & **Energy of a** & **Energy of a** \\  & **Symbol (PAPR)** & & **of a Symbol (\(I_{p}\))** & **Symbol (\(E_{s}\))** & **Bit (\(E_{b}\))** \\ \hline NRZ-OOK & 2 & \(2E_{RX\_OOK}\) & \(\frac{4E_{RX\_OOK}^{2}}{K}\) & \(4E_{RX\_OOK}^{2}\) \\  & 2 & \(2E_{RX\_OOK}\) & \(\frac{1}{K}E_{RX\_OOK}^{2}\) & \(\frac{  
equation denotes the largest integer less than or equal to \(x\). Various algorithms can generate OOC codes that satisfy this condition. By default, the unipolar sequences generated by these algorithms can all be assumed to be OOC code sets, as long as the code set correlation constraints are met. The code generation of OOC \((N,3,1)\) and OOC \((31,3,1)\) are shown in Tables 4 and 5, respectively. Compared to that of OOC, the PC generation process is relatively simple. A code set with a code length of \(n=p^{2}\) and code weight \(w=p\) has \(p\) unique sequences [24; 27; 29]. An example of a PC set with \(p=5\) is shown in Table 6. The main disadvantage of PC is that the number of available codes is limited. The code length of PC is only \(p^{2}\), which may affect the system's performance in terms of bit error rate (BER) and multiple access interference (MAI) [24; 27]. Therefore, longer codes that maintain desirable properties are beneficial. As the cardinality of the PC corresponds to the number of concurrent users, \(M\), it is equal to the \(w\) of the PC, and \(w\) is equal to the prime number \(p\). Thus, \(p\) must be increased. To increase the number of users on the network, the weight \(w\) must be greater. A modified prime code (MPC) has been proposed to overcome the drawbacks of the PC [24; 27; 29; 59]. This optical sequence eliminates some redundant pulses from the original PC with a pulse, assuming a BER requirement such as \(10^{-9}\) and a certain number of users.