## 4 The EDBA Simulation Program and Results of the \(Rh\) Optimization  
### The EDBA Functionalites  
We prepared a simulation program with real data traffic loading that is utilized for analyzing extended dynamic wavelength and bandwidth allocation methods improving the bandwidth utilization in the NG-PON2 network. This program incorporates the EDBA algorithm in a basic form together with its modifications focused on the bandwidth allocation utilization efficiency. Specifically, the program executes the allocation process managed by the OLT unit in both bandwidth and wavelength areas dynamically for each service cycle. The program also incorporates REPORT messages that present particular requests of the data traffic loading from each ONU unit. In the presented simulations, we used real data traffic loading from the current GPON network. Four ONU units can operate at 1 Gbit/s, 0.6 Gbit/s, 0.12 Gbit/s and 0.06 Gbit/s data rates in a descending order. Each ONU unit has a reported requested 12 KB bandwidth, and the decision criterion \(Rh\) has a selected value equal to 1 in the EDBA algorithm, as displayed in Figure 1.  
Figure 1: The command window with the selection of simulation parameters. The first ONU1 unit with the 1 Gbit/s data rate reports the 12 KB requested bandwidth. Starting cycle times \(SCi\) of wavelengths have the 0 KB value at the beginning of the first cycle. The first iteration begins, and the values are compared based on the Equation (3) (3.1250 < 12). In this case, a result is true, and a part of the reported bandwidth is assigned to the first wavelength, as displayed in Figure 2. This part of the reported bandwidth depends on the \(Rh\) decision criterion and determines a minimum bandwidth utilization of the actual bandwidth. In the next step, the redundant bandwidth is considered for removal based on the Equation (5). However, because starting cycle times of wavelengths are equal to 0, the algorithm waits for iteration based on Equation (3) and adds in sequence a number of wavelengths \(W\) for assigning to Equation (4) until it reaches a value that does not comply with a condition. In this case, the value \(W\) is equal to 3 assigned, as displayed in Figure 3.  
After finishing the allocation process, the \(GT\) data space equal to 3.1250 KB for each assigned wavelength is added to avoid data collisions. As displayed in Figure 4, a bandwidth allocation based on the EDBA algorithm can save one wavelength compared to the Water-Filling Algorithm that is trying to balance a bandwidth on all four wavelengths. The data transmission from the ONU1 unit takes 32 us (at the 1 Gbit/s data rate and the 1 us \(GT\) guard time) for each of three wavelengths. Figure 3: The allocated bandwidth of three wavelengths for the ONU1 bandwidth request. Figure 2: The allocated bandwidth of the first wavelength for the ONU1 bandwidth request with a residual bandwidth. The second ONU2 unit has the 600 Mbit/s data rate with the 12 KB requested bandwidth. First, wavelengths are ordered from the smallest starting cycle time \(SC_{i}\) to the highest. Because the fourth wavelength from a previous allocation process is not being used, its starting cycle time \(SC_{4}\) is equal to 0, and it is moved to the first place (Figure 5). The starting cycle times of wavelengths \(SC_{2}\) for the ONU2 unit correspond to finished cycle times \(FC_{1}\) for the ONU1 unit. Because of a long time difference between the first and second wavelength, an iteration is closed already on the first wavelength based on the Equation (5) and a completely reported bandwidth is assigned to this first wavelength. The data transmission from ONU2 unit takes 160 \(\upmu\)s (at the 0.6 Gbit/s data rate and the 1 \(\upmu\)s \(GT\) guard time) on one wavelength. In this case, the EDBA algorithm corresponds to the First Fit algorithm because it occupies only one (first) available wavelength.