# Visible-Light CDMA Communications Using Inverted Spread Sequences
## 2 Optical CDMA with MUI Cancellation
### Generalized MPSC  
It has been reported that MPSCs can be generalized to extension fields other than prime fields [17; 18]. The generalized codes are called _GMPSCs_ or _generalized MPSCs_. A GMPSC is constructed from an extension field GF(\(q\)), where \(q=p^{m}\), \(p\) is a prime number, and \(m\) is a positive integer. The code has \(q^{2}\) codewords with a code length of \(q^{2}\) and a weight of \(q\). These codewords are divided into \(q\) groups of \(q\) codewords, as with the case of the original MPSCs constructed from a prime field. It is shown that the correlation property of any GMPSC is also the same as that of the original MPSCs. Any GMPSC has the same following correlation property:  
\[\Gamma\big{(}\mathbf{c}_{i_{1},j_{1}},\mathbf{c}_{i_{2},j_{2}}\big{)}=\left\{ \begin{array}{l}q,\ \text{if}\ i_{1}=i_{2}\ \text{and}\ j_{1}=j_{2},\\ 0,\ \text{if}\ i_{1}=i_{2}\ \text{and}\ j_{1}\
eq j_{2},\\ 1,\ \text{if}\ i_{1}\
eq i_{2},\end{array} \right. \tag{1}\]  
where \(q\) is the size of the finite field and \(\mathbf{c}_{i,j}\) is the \(j\)th codeword in the \(i\)th group (\(i=0,\ 1,\ \cdots,\ q-1\), and \(j=0,\ 1,\ \cdots,\ q-1\)). A GMPSC is constructed from an extension field GF(\(p^{m}\)). Let \(\alpha\) be a primitive element of GF(\(p^{m}\)). GF(\(p^{m}\)) has \(p^{m}\) elements. For example, the set of four elements in GF(\(4\)) is \(\big{\{}0,\ 1,\ \alpha,\ \alpha^{2}\big{\}}\), where \(\alpha^{2}+\alpha+1=0\). Following the code construction procedure described below, we first generate a code \(\mathbf{C}^{*}\) over GF(\(p^{m}\)); then, we transform it into a binary code, that is a GMPSC. The length of the code \(\mathbf{C}^{*}\) is \(p^{m}\) (symbols), and that of the GMPSC is \(p^{2m}\) (bits). Figure 1: Model of an optical CDMA system. First, set up a generator vector \(\mathbf{g}=\left(g_{0},\ g_{1},\ \cdots,\ g_{p^{m}-1}\right)\), where \(g_{i}\in\text{GF}(p^{m})\) and no two elements \(g_{i}\) and \(g_{j}\) (\(i\
eq j\)) are equal. For example, we can choose \(\mathbf{g}=\left(0,\ 1,\ \alpha,\ \alpha^{2}\right)\) for \(q=4\). 2. A group coefficient \(x_{i}\) (\(x_{i}\in\text{GF}(p^{m})\)) is selected for each group. No two group coefficients are to be equal. We can choose \(x_{0}=0,\ x_{1}=1,\ x_{2}=\alpha,\ \text{and}\ x_{3}=\alpha^{2}\) for \(q=4\). 3. Set up \(p^{m}\) constant vectors \(\mathbf{h}_{j}\) (\(j=0,\ 1,\ \cdots,\ p^{m}-1\)) over \(\text{GF}(p^{m})\). The vectors \(\mathbf{h}_{j}\) have length \(p^{m}\). All elements in a single vector are identical, and no two vectors are the same. We can choose \(\mathbf{h}_{0}=\left(0,\ 0,\ 0,\ 0\right)\), \(\mathbf{h}_{1}=\left(1,\ 1,\ 1,\ 1\right)\), \(\mathbf{h}_{2}=\left(\alpha,\ \alpha,\ \alpha,\ \alpha\right)\), and \(\mathbf{h}_{3}=\left(\alpha^{2},\ \alpha^{2},\ \alpha^{2},\ \alpha^{2}\right)\) for \(q=4\). 4. Then, the codewords \(\mathbf{c}_{i,j}^{*}\) in the code \(\mathbf{C}^{*}\) over \(\text{GF}(p^{m})\) are generated by the following equation: \[\mathbf{c}_{i,j}^{*}=x_{i}\mathbf{g}+\mathbf{h}_{j}\] (2) for \(i=0,\ 1,\ \cdots,\ p^{m}-1\) and \(j=0,\ 1,\ \cdots,\ p^{m}-1\). Multiplication and addition in Equation (2) are the operations over \(\text{GF}\ (p^{m})\). The \(p^{m}\) codewords in the \(i\)th group are \(\mathbf{c}_{i,\ 0}^{*},\ \mathbf{c}_{i,\ 1}^{*},\ \cdots,\ \mathbf{c}_{i,\ p^{m}-1}^{*}\). 5. Finally, the codewords \(\mathbf{c}_{i,j}^{*}\) in \(\mathbf{C}^{*}\) are transformed into binary codewords \(\mathbf{c}_{i,j}\), which constitute a GMPSC. Every element in \(\text{GF}(p^{m})\) which appears in a vector \(\mathbf{c}_{i,j}^{*}\) is transformed into the binary \(p^{m}\)-tuple of weight one, and no two tuples are the same. For example, the zero element \(0\) in \(\text{GF}(4)\) can be transformed into \({}^{1}000^{\prime}\), \(1\) into \({}^{0}0100^{\prime}\), \(\alpha\) into \({}^{0}0100^{\prime}\), and \(\alpha^{2}\) into \({}^{0}0001^{\prime}\). As an example, a GMPSC with \(q=4\) is shown in Table 1. This code has sixteen codewords, which are divided into four groups of four codewords.