## 2 The Proposed Bi-Directional RoF System with Power Control Scheme  
The architecture of the bi-directional SAC-based RoF along with the power control and wavelength reuse is shown in Figure 2. For simplicity, there are only two classes, and each of them has one user in it. As for Class 1, BLS#1 is separated into two optical carriers by a De-Mux. Downlink passband signal is modulated on the first carrier by intensity modulation (IM). Then, the modulated carrier is sent to the SAC encoder employed in [11] for encoding. An optical coupler (OC) combines the coded carrier with the un-modulated one to obtain the downlink signal. The downlink signal of Class 2 is similar to that of Class 1, except for the code vector assigned to each user and the power level of the BLS. Before being transmitted to the BS, downlink signals from Class 1 and Class 2 are combined again by another OC. Figure 1: User classification and power distribution in the proposed differential service system with spectral amplitude coding (SAC) optical code-division multiple-access (OCDMA). We use a modified stuffed-shift prime code (MSSP code) [12] in the proposed OCDMA-based RoF system. A MSSP code has the following properties: \(M=p^{2}+p+1\), \(\omega=p+1\), and \(\lambda=1\), where \(M\) is the code length, \(\omega\) is the code weight, \(\lambda\) is the cross-correlation, and \(p\) is a prime number. Two MSSP codes of \(p=2\)--(1, 0, 1, 0, 1, 0, 0) and (0, 1, 0, 1, 1, 0, 0)--are assigned to user#1 and user#2, respectively. The power of BLS#2 is twice than that of BLS#1, the coded spectrum of these two are (0, \(\lambda_{2}\), 0, \(\lambda_{4}\), \(\lambda_{5}\), 0, 0) and (2\(\lambda_{1}\), 0, 2\(\lambda_{3}\), 0, 2\(\lambda_{5}\), 0, 0). The corresponding power spectral densities (PSDs) of the two users are shown in Figure 3.  
In BS, a De-Mux divides the downlink signal into two parts. One part of the coded carriers is separated again by an optical splitter (OS) and sent to the decoders of both classes. Then, the passband signal from the CO is recovered after balanced detection and optical-to-electrical (O/E) conversion. The other part with the un-modulated carriers is split by another OS with the power ratio of 2:1. The carrier with larger power is used for the uplink transmission for Class 2. Since the optical uplink data generated from the two classes have different power levels, multi-service transmission is still supported. Here, we use one of the carriers from CO to achieve a wavelength scheme. Since the uplink signal is directly modulated on this carrier, it not necessary to equip an extra light source at the BS. Therefore, the burdens of cost and the system requirement at the up-link receiver are released. After being encoded by two distinct MSSP codes and combined by an OC, the uplink optical signals  
Figure 3: Downlink transmitted spectrum for user in (**a**) Class 2 and (**b**) Class 1. Figure 2: Configuration of the wavelength-reused radio-over-fiber (RoF) network with power control technique. from both classes are transmitted to the CO. The passband signal is down-converted from optical to electrical domains by the decoding and photo-detecting procedures similar to the BS. To retrieve the original data from other users, interference cancellation is performed at the decoder. In the SAC scheme, codes with fixed cross-correlation and proper decoder design remove MAI effect significantly. Correlation property between any two code vectors \(\mathbf{C}_{i}\) and \(\mathbf{C}_{j}\) is described as follows:  
\[\mathbf{C}_{i}\odot\mathbf{C}_{j}=\left\{ \begin{array}{c}p+1,\ i=j\\ 1,\ i\
eq j\end{array} \right., \tag{1}\]  
\[\text{and}\ \mathbf{C}_{i}\odot\overline{\mathbf{C}}_{j}=\left\{ \begin{array}{ c}0,\ i=j\\ p,\ i\
eq j\end{array} \right., \tag{2}\]  
where \(\overline{\mathbf{C}}_{j}\) is the complementary code vectors of \(\mathbf{C}_{j}\) and \(\odot\) is the dot-product symbol.