A QoS-Aware Dynamic Bandwidth Allocation Algorithm for Passive Optical Networks with Non-Zero Laser Tuning Time

: Time- and Wavelength-Division Multiplexing (TWDM) increases the capacity of Passive Optical Networks by up to 40 Gbps by using several wavelengths (typically four). It introduces tunable transceivers into the Optical Network Units (ONUs) for switching from one wavelength to the other, thus addressing the ever-increasing bandwidth demands in residential broadband and mobile fronthaul networks based on Fiber to the Home (FTTH) technology. This adds complexity and sources of inefficiency, such as the laser tuning time (LTT) delay, which is often ignored when evaluating the performance of Dynamic Bandwidth Allocation (DBA) mechanisms. We present a novel DBA algorithm that dynamically handles the allocation of bandwidth and switches the ONUs ’ laser from one wavelength to the other while taking LTT into consideration. To optimize the packet delay, we introduce a scheduling mechanism that follows the Longest Processing Time first (LPT) scheduling discipline, which is implemented over the Interleaved Polling with Adaptive Cycle Time (IPACT) DBA. We also provide quality of service (QoS) differentiation by introducing the Max-Min Weighted Fair Share Queuing principle (WFQ) into the algorithm. The performance of our algorithm is evaluated through simulations against the original IPACT algorithm, which we have extended to support multi-wavelengths. We obtain an improved performance of up to 73% and 33% reduction in queue delay in, respectively, IPACT and WFQ.


Introduction
Passive Optical Networks (PON) are one of the major driving forces behind residential broadband access and 5G networks [1], as they meet the ever-increasing demand for bandwidth-intensive applications such as ultra-high-definition TV, immersive video, and the stringent end-to-end latency required by mission-critical applications. PON is a cost-effective optical technology that provides the advantage of using passive network elements to connect users in access networks. It is widely employed for efficiently managing the increasingly growing traffic in corporate and residential access networks and other scenarios such as mobile networks, and specifically cloud radio access networks (C-RAN) [2,3]. The PON system consists of a central unit called an Optical Line Terminal (OLT) at the central office of the internet service provider, and it connects through optical fiber to several Optical Network Units (ONUs) located in-or close to-the customers' premises within a 20 km range [4]. The optical fiber cable is shared by introducing passive optical splitters into the optical distribution network (ODN) located between the OLT and the ONUs, by which it reaches up to 64 users [5] (although some architectures allow split ratios of up to 1024 [6]). The PON architecture is referred to as a point-to-multipoint (P2MP) system [7]. It is a very cost-effective and easy-to-manage solution, as it does not require any active electronic devices between the OLT and the ONUs [8].
The PON system is based on a shared model that allows bi-directional communication between the ONUs and the OLT. The downstream traffic is broadcast from the OLT to all ONUs while the upstream communication from the ONUs to the OLT is achieved using a time-sharing principle [9]. Owing to the shared nature of the PON, and ONU systems competing for network capacity, a mechanism must be put in place to control the allocation of the upstream transmission capacity in real time, thus avoiding data collision if two or more ONUs transmit simultaneously towards the OLT. PONs employ a dynamic bandwidth allocation (DBA) algorithm to orchestrate the allocation of network resources in the shared medium. One of the main requirements of a DBA is that it satisfies the low latency and huge bandwidth requirements of emerging applications [10].
The new generation of PON technology is based on the Time-and Wavelength-Division Multiplexing (TWDM) technique, which has been described as an evolutionary step that allows using multiple wavelengths to increase the capacity of the PONs [11]. TWDM is a hybrid technique that combines Wavelength-division multiplexing (WDM) capacity expansion with the inherent resource granularity of a Time-division multiplexing (TDM-PON) to meet the growing demands for bandwidth [12]. TWDM-PON with four wavelengths typically has a maximum throughput capacity of 40 Gbps, thus meeting the requirements of the NG-PON2 standards [3] [13]. TWDM-PON is used as a major application in mobile fronthaul networks for connecting the centralized baseband unit (BBU) and remote radio heads (RRHs) in 5G C-RANs, which have extreme requirements in terms of capacity, latency, and cost-efficiency [14,15].
In TWDM-based PONs, the resource allocation in the upstream link is two-dimensional, consisting of wavelength and bandwidth allocation. The DBA scheme dynamically allocates the wavelengths (typically four) among the ONUs and shares available bandwidth in terms of time slots among the ONUs in the upstream link. An important characteristic of TWDM-PONs is the use of tunable transceivers at the ONUs [4], which are thus enabled to switch their wavelengths. It is important for the DBA to efficiently handle the assignment of the wavelengths, which involves the switching of ONUs from one wavelength to the other. The wavelength assignment decision is communicated to the ONUs by the OLT, and the ONUs can transmit their frames at their allotted time slots on the assigned wavelength [4]. This approach makes it necessary for ONUs to change their wavelengths to optimize the use of the shared medium. ONUs use tunable lasers to facilitate the switching of the wavelengths as instructed by the OLT, thus adding both complexity and a Laser Tuning Time (LTT) delay that may have a great impact on the performance of the system [3,4]. Only a few research works consider LTT when designing or evaluating the performance of DBAs for TWDM networks [16,17]. It is, therefore, necessary to develop more sophisticated TWDM-DBA algorithms that will ensure fair distribution of resources among ONUs while taking into consideration the delays from the switching of wavelengths.
In this paper, we propose a novel DBA algorithm to efficiently manage the allocation of bandwidth and wavelength assignment while considering the LTT delay. Transmitting on multi-wavelength PON poses the problem of scheduling with a constraint on the total completion time and an overall effect on the delay. Therefore, we aim to reduce the queue delay by introducing a scheduling scheme based on the Longest Processing Time first (LPT) principle [18]. The goal of LPT is to minimize the maximum completion time for processing and transmitting the requests from the ONUs. This is achieved by the OLT sorting the ONUs' bandwidth requests in descending order, with the largest request being processed first. Finally, we introduce weight-based QoS differentiation following the Max-Min Weighted Fair Share principle [19] to ensure a guaranteed bandwidth for demands requested by the users.
The main contribution of our TWDM-DBA is to effectively reduce frame delay, and efficiently utilize the bandwidth while achieving QoS differentiation. We validated our algorithm by comparing it with the traditional IPACT algorithm, which has been extended to use up to four wavelengths. The performance metrics of our study include queue delay and throughput. The results show that our proposed DBA can significantly improve network performance in terms of queue delay and throughput while adding QoS differentiation.
The remainder of the paper is organized as follows. Related work and the state of the art are summarized in Section 2. Section 3 introduces the proposed TWDM-DBA algorithm. Section 4 describes a performance evaluation of the proposed approach using simulation results. Conclusions and future work are described in the last section.

PON Standards
The International Telecommunication Union (ITU) and the Institute of Electrical & Electronics Engineers (IEEE) are active players that have been at the forefront of developing PON standards over the past twenty years [20]. IEEE introduces the concept of Ethernet over the shared media of Passive Optical Networks, called Ethernet PON (EPON) standards [9]. These standards fall within the IEEE 802.3 standards series [21], and they have continued to evolve. The latest version is known as NG-EPON under the IEEE 802.3ca standard, and it aims to support more capacity and improve data transmission efficiency in the access network by using multiple wavelengths [22].
The ITU has developed its variant of PON known as Gigabit-capable Passive Optical Networks (GPON), which handles Asynchronous Transfer Mode (ATM) packets and GEM (GPON Encapsulation Method) frames while providing QoS assurance [20]. The latest version of ITU GPON standards is ITU-T G.989.2, which specifies Next-Generation Passive Optical Network 2 (NG-PON2) [23] It has three types of channel rates in each of the wavelengths: 10/2.5 Gbps, 10/10 Gbps, and 2.5/2.5 Gbps-downstream and upstream. NG-PON2 introduces time and wavelength division multiplexing (TWDM), which aggregates multiple wavelengths to achieve increased capacity with a nominal aggregate capacity of 40 Gbps in the downstream direction and 10 Gbps in the upstream direction [23] [24].

Laser Tuning Time
Tunable optical components in the ONUs enable extensive wavelength flexibility and allow the ONUs to change from heavily loaded wavelengths to idle ones in order to reduce delay and create resource allocation balance in the system [10]. There are several types of tunable lasers, which are categorized based on the speed at which they can switch wavelengths [3,4]. Three classes are defined by ITU-T [23], as shown in Table 1. The lasers can switch between wavelengths within a few microseconds and one second. While the slow lasers are considerably cheaper, the fast lasers are very costly and energy-consuming [11].

DBAs for TWDM-PONs
The issue of the OLT allocating bandwidth to the ONUs is resolved by following a layered approach for job scheduling, as proposed in [25]. The scheduling concept can be divided into scheduling framework and scheduling policy. The scheduling framework deals with the OLT making scheduling decisions for job processing, and the scheduling policy addresses how the DBA allocates time and wavelengths to the ONUs. There are three ways of implementing the scheduling framework: Online, Offline, and Just-in-Time. Online 4 scheduling allows bandwidth to be allocated to ONU jobs as soon as they are received at the OLT. Since requests are granted to the ONUs immediately without waiting to consider requests from other ONUs, the system is considered unfair. In offline scheduling, decisions are made after all the requests from the ONUs are received at the OLT, thereby assuring fairness in the system. The downside of the offline scheme is the delay and the link underutilization during the time when the OLT receives the report from the first ONU and the time when it issues the grant. To address the aforementioned problems, Just-in-Time scheduling was proposed by [25] to allow the OLT to postpone the moment of decision-making until one channel is about to become idle. The decision-making in Just-in-Time scheduling occurs later than in online scheduling and sooner than in offline scheduling. Many research studies have been carried out on the dynamic bandwidth allocation (DBA) algorithms for TWDM-PONs. The DBA algorithms in TWDM-PON are two-dimensional and can be implemented by using either separate time and wavelength scheduling (STWS) algorithms or joint time and wavelength scheduling (JTWS) algorithms [11]. STWS algorithms decouple the wavelength assignment from the time slot allocation and are thus simple. JTWS algorithms, on the other hand, combine the wavelength assignment with time slot allocation. JTWS is more efficient and scalable but more complex than STWS [26,27]. The work of [28] decouples the wavelength assignment from the Time-Division Multiple Access (TDMA) assignment and removes scheduling complexity by using an adaptive threshold, thus leading to a lower processing requirement. An adaptive wavelength allocation pattern for scheduling multi-wavelength ONUs in NG-EPON is proposed in [29] to achieve a low packetloss ratio. The wavelength allocation pattern is based on an adaptive threshold that reflects both the ONU's absolute bandwidth request size and the relative bandwidth request size sent to other ONUs.
Some of the recent works on DBA concern specific network architectures. The work of [3] is on mobile fronthaul, with attention given to the bursty nature of its traffic. This efficiently synchronizes the data transmission in order to satisfy the strict latency requirements. A Dynamic Wavelength and Bandwidth Allocation (DWBA) scheme for TWDM-PON is proposed in [10], who designed it to satisfy the strict delay requirement for fronthaul with a minimum number of active wavelength channels. It minimizes active wavelength channels by considering the high burstiness of fronthaul data transmission and using the difference in the propagation delay between the OLT and ONUs. A low latency DBA scheme for NG-PON2 to support both 5G fronthaul services and data services is proposed in [30]. The DBA splits the upstream frame into sub-frames of equal duration, and each ONU is allocated with a time slot in each sub-frame without specifying an allocation interval for the associated queue.
The DBA in TWDM-PON requires wavelength tuning functions; however, most of the dynamic wavelength assignment algorithms do not consider the tuning time. Wavelength tuning reduces channel utilization and increases packet delay [17]. The work of [16] is, to the best of our knowledge, the first to consider the laser tuning time in the design of the DBA. It notes that proper DBA algorithms should maximally exploit the statistical gain among requests, under the condition that lasers are given enough time to switch wavelengths. A DBA based on a minimum wavelength tuning (MWT) scheme is proposed in [31]. The scheme minimizes the frequency of wavelength tuning to reduce packet delay and improve channel utilization. The DBWA proposed in [17] manages transceivers with tunable lasers that have different LTT values combined with transceivers that have non-tunable (fixed) lasers in a single transmission.
Concerning the quality of service (QoS) in TWDM-PON, some works have recently started to appear in the literature, but they are very limited. A high-priority first dynamic wavelength and bandwidth allocation algorithm in TWDM-PON is proposed in [32]. The DWBA is implemented using five types of transmission containers (T-CONTs), and it can execute four kinds of bandwidth strategies to effectively reduce the average delay, slightly improve bandwidth utilization, and ensure greater fairness for the diverse types of traffic. A max-min fair allocation scheme is introduced into the algorithm proposed in [33] to provide a minimum level of service in every frame. This technique uses a combination of status reporting and traffic monitoring techniques to achieve fairness and a significant decrease in the average delay.
Our work is based on IEEE EPON standards while drawing on several ideas, such as multiwavelength capability and the associated LTT delay introduced in ITU standards under NG-PON2, which allows ONUs to change their wavelengths. Our contributions align with the work of [16,31] on the application of LTT in DBA algorithms, and we go further by focusing on maintaining a balance between the switching of the ONUs' wavelengths and the associated delay, thus allowing us to achieve optimal bandwidth utilization. We reduce the frame makespan and minimize the delay by introducing the LPT scheme, which is a member of the bin-packing method that is similar to the MULTIFIT used on IPACT in [16] for scheduling the requests from the ONUs.
Additionally, we apply a weight-based bandwidth guarantee scheme in accordance with the Max-Min Weighted Fair Share principle in order to assure QoS differentiation in multi-wavelength PONs like NG-PON2. The Max-Min Weighted Fair Share principle is based on maximizing the minimum share of the ONU whose demand has not been satisfied. Our proposal extends the basic max-min fair allocation proposed in [33] by using priority based on weight in order to capture users' service requirements and weights accordingly. To the best of our knowledge, this is the first time an LTT-aware DBA is enhanced with LPT and WFQ.

The proposed algorithm
Our proposal builds on IPACT DBA [34], an online algorithm that follows an interleaved polling scheme to schedule transmission from the ONUs in a centralized approach. The requests from the ONUs are sent to the OLT, which has complete knowledge of the queue of the ONUs and when the last bit will arrive. With this knowledge, the OLT will start scheduling the grant for the next ONU. Since the OLT does not have to wait for the rest of the ONUs' requests to reach the OLT before it starts processing them, the waiting time is reduced and the overall delay is minimized.
The original IPACT algorithm has been extended with the capability of coping with multiple wavelengths of the TWDM-PON in [35]. Optimally scheduling the requests from the ONUs on the four wavelengths in TWDM-PON is a problem similar to the scheduling of computational tasks in a multiprocessor environment with identical processors acting in parallel. Mapping this environment with multiprocessor scheduling, with wavelength channels as machines and ONUs' requests as jobs, is indicative of an NP-hard optimization problem, which is computationally prohibitive [36]. Given a set J of jobs where job Ji has length Li and several wavelengths ω, our objective is to achieve the earliest possible time required to schedule all jobs in J on ω wavelengths such that none overlaps. Since there is a large number of requests coming from the ONUs to be transmitted on the four wavelengths in real-time, heuristic approaches are most suitable in achieving near-optimal scheduling efficiency [18].
We introduce the LPT scheduling algorithm, due to its simplicity, to solve the problem of scheduling the requests on multiple wavelengths to achieve minimal makespan of the requests' processing [37,38]. LPT is a non-preemptive scheduling algorithm that uses the priority to schedule requests to achieve nearoptimal efficiency. LPT allows the sorting of the requests made to the OLT during a cycle i by the ONUs J1(i), J2(i)…JM(i), according to the length of time needed for them to be processed such that Lr(i) ≥ Ls(i) ≥ …≥ Lm,(i) being r, s, and m ≤ M. LPT has the advantage of scheduling almost equal loads on the wavelengths and avoiding situations where some wavelengths will be idle. The upper limit of LPT ) is the maximum makespan of an optimal scheduler [39].
At the beginning of each cycle, the algorithm acknowledges the number of connected ONUs whose queues are not empty. Based on the lengths of the jobs, the jobs reported from connected ONUs (Jm) are sorted in descending order. The ONUs are then assigned to the respective available wavelengths ω such that ONU m with job Jm (i) with the longest processing time Lm(i) is processed first and followed by the next one, assigned to the minimally loaded channel. If ∑ ≤ 0 , the requested time is granted for the connected ONUs in a cycle ( ), else will be granted and certain jobs with lower lengths have to wait for the cycle ( + 1). The aforementioned parameters are summarized in Table 2, and the pseudocode is provided in Algorithm 1. Furthermore, to guarantee fairness in the sharing of resources as IPACT has no inherent QoS mechanism, we introduce QoS guarantees based on Weighted Fair Queuing (WFQ) scheme in accordance with the Max-Min Weighted Fair Share principle [40] for weight-based differentiation of users. WFQ is a discrete implementation of the generalized processor sharing (GPS) policy and an extension of fair queueing. It is realistically assumed that users have different bandwidth needs with varying priorities, therefore, all the ONUs do not request for an equal share of the resources at every given cycle. Consequently, allocating equal resources to them will lead to a waste of resources by the ONUs whose demands are lower than allocated grants, and some ONUs with higher requests will not be satisfied. Accordingly, some ONUs that have higher bandwidth demands are given more weight compared to ONUs with lower bandwidth demands and they are thus allocated relatively higher resources.
As shown in the pseudocode provided in Algorithm 2, we associate weights 1, 2, ..., m with ONUs 1, 2, ..., m, which reflect their relative resource share. The resources are allocated to the ONUs in increasing order of their requests, normalized by their weights, with the small requests being fully granted first. In this case, the ONU with the lowest demand is maximized, if satisfied, only then the ONU with the secondlowest demand will be maximized. After the ONU with the second-lowest is satisfied, only then the ONU with the third-lowest demand will be maximized, and so on. Therefore, no ONU gets more than its demand, and the ONUs whose demands are not met get a fair share of the resources in proportion to their weights. This also avoids the situation where the resources will be monopolized by ONUs with bigger requests and consequently eliminating network congestion to some extent. We combine the WFQ principle with the LPT algorithm to give us WFQLPT, a hybrid algorithm that provides inherent QoS with the minimal makespan associated with LPT. Regarding the assignment of wavelength ( ), our proposed DBA algorithm combines the time allocation and wavelength algorithms following the JTWS scheme previously described in [11]. Once the OLT receives the requests from all connected ONUs by following an offline scheduling framework, it sorts the jobs according to the LPT scheme and thereafter assigns wavelengths in accordance with the Next Available Supported Channel (NASC) scheduling policy [25]. This allows the ONUs to be assigned to the next available wavelength, where their requests will be granted. The choice of NASC aligns with the principles of the LPT scheme, in which the unassigned task with the largest computation time is assigned to the next available wavelength [41].

// Check for connected ONUs with non-empty
The assignment of the wavelength according to NASC occurs in offline scheduling mode. The offline scheduling framework gives room for the LPT scheme and allows for applying WFQ QoS differentiation as scheduling decisions are made with full knowledge of all the jobs to be scheduled for a particular scheduling cycle. The cycle is the time difference between two consecutive allocation decisions. A profound advantage of the offline scheduling framework is the increased level of scheduling control, by which the OLT differentiates QoS. Specifically, the OLT adds all the ONUs with REPORT messages into a scheduling pool, and the scheduling is done after the OLT has sorted the REPORT messages and prioritized the ONUs based on their respective QoS. The channel is considered busy until the end of the last scheduled reservation, and then the procedure is applied for considering LTT when deciding whether or not to tune the supported wavelengths. Therefore, when a wavelength becomes free, it is assigned to the ONU with the longest job in the pool, as shown in Algorithm 3.
Pseudocode of the Max-Min weighted fair-share queuing

Algorithm 3: Pseudocode for NASC with LTT executed at the OLT for each cycle i.
Our algorithm sorts the requests from the ONUs at the OLT according to the length of time needed for them to be processed, in descending order according to the LPT principle. The OLT sends grant messages (GATE) to the ONUs and schedules the ONU with the longest processing time first, which is then transmitted on the next available wavelength. We introduce the concept of LTT, and if the wavelength that the ONU is currently tuned to is the same as one that has been newly assigned by the OLT, then no laser tuning time is added. As shown in Algorithm 3, if the newly assigned wavelength is different from the current wavelength, the ONU checks the time needed for its current wavelength to become free and adds the laser tuning time to it. If the time needed to tune to a new wavelength is more, the ONU will remain on its current wavelength and no tuning time delay will be added. If the time to tune to a new wavelength is less, the ONU will tune to the newly assigned wavelength, and the tuning time delay will be added. This process happens continuously whenever GATE and REPORT messages are exchanged during the lifecycle of the communication between the OLT and the ONUs. Figure 1 illustrates the steps in the application of our algorithm.

Performance Evaluation
In this section, we evaluate the performance of our DBA algorithm. To validate the efficiency of our algorithm, we carried out extensive simulations using OPNET Modeller under different conditions.

Simulation Model
Our simulation setup consists of ONUs at the customers' premises, a centralized OLT, and an ODN that emulates a passive optical splitter/combiner, which splits the optical fiber cable running from the OLT to the ONUs. To check the impact on our algorithms from the number of ONUs in a PON system, we have created two different sets of scenarios; one with 16 ONUs and the other with 8 ONUs. The simulations involving 16 ONUs scenarios are further classified into two subcategories based on the distances from the ONUs to the OLT. One scenario is composed of 16 ONUs that are physically located at distances uniformly distributed between 18 km and 20 km, while the other set of 16 ONUs are physically located at distances uniformly distributed between 2 km and 20 km. In the downstream communication, the OLT broadcasts data to the ONUs, and each ONU filters the data sent to it and discards others. The upstream channel has a total capacity of 4 Gbps on four wavelengths, each one with a rate of 1 Gbps dynamically managed by the DBA. All ONUs are connected to their respective traffic sources and equipped with a packet generator over a link of 1 Gbps, thus avoiding possible bottlenecks. The maximum cycle time (δmax) is 1 ms, and the sources generate self-similar traffic [35] [42] with Hurst parameter H = 0.75 and a mean packet rate that is adjusted according to varying offered load. The frame size follows a uniform distribution with a lower limit of 512 bits and an upper limit of 12144 bits, thus realistically modeling Ethernet traffic [35].
Several scenarios are created for the simulations in order to evaluate the effect on the algorithms from LPT scheduling, WFQ-based differentiation, and laser tuning time. A guaranteed weight of a specified percentage of the system's total bandwidth capacity is allocated to some ONUs, thus causing them to have different QoS. A laser tuning time of LTT = 10 µs is selected in reference to ITU-T G.989.2 specifications class 2 devices [23]. Traffic loads vary from 5% to 100% of the total load, where the maximum global offered load is 4 Gbps. The simulated algorithm sets are classified as IPACT, LPT, WFQ, and WFQLPT, depending on the configuration:

Results
In terms of throughput and queue delay, we evaluate the performance of our novel DBA algorithm in comparison with IPACT, which has been extended to support four wavelengths. The results and discussion of each parameter based on allocated weight are presented as follows.

Throughput
The throughput represents the average number of bits per unit time, measured in Mbps, and it includes the Ethernet header (destination and source addresses) and trailer (frame check sequence) that are successfully transmitted by the ONUs. In this subsection, we present the comparative performance of the four DBA algorithms in terms of throughput for the upstream link under varying offered loads. Figure 2 shows the QoS differentiation of our algorithms by allocating different weights to the ONUs in order to see the effect of LPT scheduling on the algorithms. We separate the Max-Min-based algorithms (WFQ and WFQLPT) from IPACT and LPT because of uneven bandwidth allocated to different ONUs. Figure 2 (left) presents the results for IPACT and LPT transmitting on all four wavelengths at 0 LTT for all the ONUs. In this case, all ONUs have an equal share of the system, with each ONU having a share of 250 Mbps. Here, we see that both IPACT and LPT behave similarly, as they can transmit an equal amount of throughput up to 220 Mbps before reaching saturation at an offered load of 210 Mbps. Thus, the introduction of LPT scheduling has no noticeable effect on IPACT in terms of throughput. The scenarios in Figure 3 show the effect of LTT on the throughput for the four algorithms.

at both LTT = 0 µs and LTT = 10 µs in a 16-ONU scenario; IPACT and LPT (left); and WFQ and WFQLPT (right).
In Figure 3 (right), we compare WFQ and WFQLPT at LTT = 0 µs and LTT = 10 µs for ONU1. In this case, ONU 1 has a share of 10% (400 Mbps) of the total resources, and the rest of the ONUs share the remaining 90%. We can see that at higher offered load, there is a difference in the throughput between LTT = 0 µs and LTT = 10 µs for both WFQ and WFQLPT. While     In order to check the effect of the distance between the OLT and ONUs in our algorithms, we compare the results for the set of 16 ONUs that are scattered within a distance range of 2-20 km versus those within a distance range of 18-20 km from the ONUs to the OLT. Figure 5 (left) shows the throughput in the case of the LPT algorithm. As we can see, LPT behaves the same within both ranges, as it can transmit up to 220 Mbps before reaching saturation at an offered load of 210 Mbps at LTT=10 µs.

Figure 5: Throughput for all ONUs at LTT = 10 µs for a range of 18-20 km vs 2-20 km for LPT (left) and for IPACT (right)
Figure 5 (right) shows the results for ONUs within 18-20 km against 2-20 km from the OLT under the IPACT algorithm at LTT=10 µs. As we can see, the IPACT algorithm has the same behavior within both distance ranges, as the ONUs can transmit up to 222 Mbps before reaching saturation at 225 Mbps. Figure 6 shows the LPT's impact on the throughput in function of the distance and load for LTT = 0 µs. ONU 1 and ONU 4 are located at 2 km and 20 km from the OLT, respectively. Figure 6 (left) shows the CDF of the throughput for IPACT. Therefore, we can conclude that the range in which the ONUs are spread has no impact on the throughput of the system at low loads. For both IPACT and LPT at heavy loads, the ONUs closest to the OLT have the same behavior. In contrast, for the distant ONUs, LPT suffers a deviation of less than 10% in terms of IPACT. This is because LPT reduces the delay of the frames even if the system works at heavy loads.

Queue delay
The queue delay measured in our simulations is the average packet waiting time in the ONU queues before being processed. The ONUs' queue delay is one of the components that forms the end-to-end delay, and the only one that is variable. In our scenario, packet transmission delay and propagation delay are negligible compared to the queue delay. We compare the queue delay for the IPACT, LPT, WFQ, and WFQLPT algorithms.   LPT at both LTT = 0 µs and LTT = 10 µs. We can see that IPACT at LTT = 0 µs has a slightly lower queue delay (0.281 ms) than when LTT = 10 µs (0.296 ms).

Figure 8: Queue delay for ONU 1 at both LTT = 0 µs and LTT = 10 µs; IPACT and LPT (left); and WFQ and WFQLPT (right).
In Error! Reference source not found.8 (right), WFQ and WFQLPT are compared under LTT = 0 µs and LTT = 10 µs. In this case, ONU 1 has an allocation of 400 Mbps. For WFQLPT, the effect of LTT can be seen, as the queue delay is slightly lower when LTT = 0 µs in the working area (0.279 ms at an offered load of 15 Mbps) than when LTT = 10 µs (0.297 ms at an offered load of 15 Mbps). If we compare the LPT queue delay with WFQLPT, we observe that the queue delay in the working area has increased by up to 50 µs. This increase is justified because the proposed WFQLPT algorithm offers quality of service, guarantees throughput, and thus minimizes delay. In the figure for WFQ with WFQLPT on the right, the former only guarantees throughput while the latter guarantees both parameters. Figure 9 shows the results for the simulations of the IPACT and LPT algorithms, which were run to check the behavior of our system when different numbers of ONUs are connected. The queue delay results for 8 ONUs against 16 ONUs at LTT = 10 µs show that LPT and IPACT behave similarly, regardless of the number of ONUs in the system.   In Figure 10, we evaluate the performance of the LPT and IPACT algorithms in two scenarios with 16 ONUs: in the first, the ONUs are scattered within a distance range of 2-20 km to the OLT; and in the second, the distance range is 18-20 km. Figure 10 (left) shows the queue delay results for the LPT algorithm, and it is evident that the behavior is the same in both ranges, as the queue delay is kept at 0.11 ms before reaching saturation at 190 Mbps.   Figure 11 (left) shows that, at low load, LPT's margin of improvement is between 50 µs to 100 µs for IPACT, while under LPT the impact of the distance is limited to below 25 us. In Figure 11 (right), we show the queue delay for both ONU 1 and ONU 4 at an offered load of 150 Mbps.For heavy loads, the improvement of LPT with respect to IPACT is more evident, as it increases the difference by 150 µs. Furthermore, the variability of the queue delay for heavy loads and different distances is kept at around 40 µs. This delay is similar to that of low loads. Thus, it can be deduced from Figures 10  and 11 that even though the queue delay increases together with the distance between the ONU and OLT, the difference in the queue delay narrows as the offered load increases.

Discussion of the results
The results show four main aspects. First, we have our analysis on the influence of laser tuning time on IPACT,in terms of throughput, and queue delay as a function of the system load and the distance between the ONUs and the OLT. Second, the LPT optimizes the queue delay more than IPACT in all the above scenarios. Third, as the WFQ guarantees a throughput for each user, we have evaluated the impact when the LTT is introduced. Finally, the performance of the WFQLPT has been evaluated, which guarantees a minimum queue delay and the bandwidth requested by the different ONUs.
We can achieve an average bandwidth efficiency of about 85% in the upstream link, which conforms to the minimum absolute efficiency that is stipulated in [43]. The inefficiency in the system is a result of overhead from encapsulation, such as control message overhead (which represents bandwidth lost to GATE and REPORT message exchanges between the ONUs and OLT), guard band overhead, discovery overhead, and frame delineation overhead [43]. The overhead consumes up to 16.37% of the bandwidth, with the minimum throughput being 836.3 Mbps on a 1 Gbps link.
Introducing a realistic LTT of 10 µs provokes a noticeable decrease in the throughput and an increase in the queue delay. The effect on the throughput is seen only at higher loads, above 320 Mbps (80% offered), with the delay introduced as a result of LTT reducing the throughput capability of the ONUs by 10% compared to when there is no LTT, thus reducing the bandwidth utilization of the system. The effect of LTT is not noticed at lower loads because the system is not operating at nearly full capacity. As such, the system can transmit up to the maximum allowable throughput. The effect of LTT on the queue delay is seen only at the point where the queue delay starts skyrocketing, which is at a much higher offered load when the LTT is 0 than when the LTT is 10 µs. At lower loads, the queue delay is kept minimal and comparable to when there is no LTT applied.
The number of ONUs connected to the OLT does not in any way affect the performance of the DBA algorithms in terms of queue delay and throughput. When the resources are to be shared equally among the ONUs in the PON, the algorithms behave the same way, with each ONU's throughput and queue delay having similar values. The distance between the ONU and the OLT within the maximum allowed distance (20 km) of PON does not have any impact on the throughput. It does not matter where the ONU is located in the PON, the throughput will still be the same. However, the queue delay is affected and it decreases as the ONUs become closer to the OLT. However, the impact of the distance between the ONU and the OLT decreases as the offered load increases.
These results emphasize the need to consider LTT when designing DBA and evaluating its performance in order to obtain realistic results and model the behavior of a system whose delay requirements are within a band of 1 ms to 100 ms [44], which is what critical services demand in 5G networks.
The LPT scheme is introduced to solve the problem of minimizing the total finish time when scheduling requests on multiple wavelengths. When LPT is applied to the IPACT algorithm, the queue delay is reduced (by 73%), but there is no noticeable effect on the throughput. Applying LPT to the WFQ algorithm gives us the WFQLPT algorithm, which is a hybrid that combines the low delay of LPT with the QoS differentiation provided by WFQ. Therefore, WFQLPT achieves QoS differentiation and proves to be superior to WFQ in terms of delay, which is reduced by approximately 33%. In terms of throughput, there is no noticeable difference between WFQLPT and WFQ.
When implementing QoS differentiation in WFQ and WFQLPT algorithms, the ONUs with higher priority obtain their share and the remaining ONUs obtain a fair share of the resources without any of them being starved. The introduction of QoS based on WFQ reduces wasted bandwidth because the bandwidth utilization is in the region of 91%, which is higher than when no QoS is applied (88%), and there is no noticeable impact on the delay.

Conclusions
TWDM-based PON is a promising technology with great potential for providing the high bandwidth capacity and low latency required by emerging services. TWDM-PON DBA algorithms need to take into account the laser tuning time (LTT), which is often ignored. In this paper, we have presented a WFQLPT, QoS-aware algorithm that considers LTT. Our algorithm builds on IPACT by adding the capability of supporting four wavelengths. We apply a scheduling mechanism based on the LPT scheme that arranges the requests from the ONUs in descending order before being scheduled on the assigned wavelengths in accordance with the NASC principle, thus reducing delay. As IPACT is known to lack QoS capability, we have introduced weight-based QoS differentiation based on Max-Min Weighted Fair Share in order to ensure fair sharing of resources. We evaluated our approach through simulations, and our results show that the bandwidth is shared fairly among the users while wavelengths are allocated in a more balanced manner. Introducing WFQ guarantees the allocation of resources based on the Service Level Agreement (SLA) while keeping delay bounded. We can see the effect of LPT in reducing the average packet delay on IPACT by 73% and on the WFQ algorithm by 33%. We have also shown that the delay introduced as a result of LTT gives the system more realistic behavior in terms of the throughput and queue delay. This paper opens up a new horizon of research on the implementation of the DBA algorithm while focusing on efficient energy utilization in order to save power, which is a worthwhile contribution, given the predominant role of PONs in next-generation networks. We plan to introduce power-saving features such as laser doze/sleep mode [45] and further exploit the laser tuning time to achieve optimal results while keeping the delay minimal. We also intend to enhance the algorithm by implementing it in a just-in-time manner in order to further reduce the delay [25]. Furthermore, we will work on improving the management architecture of TWDM-PON by introducing the software-defined networking principle to decouple the OLT and move the DBA functions to a centralized controller, which will thus manage the network with flexibility [46]. An interesting direction for future research will be to consider Long-Reach Passive Optical Networks (LRPON), with a multi-thread polling scheme to enhance their operations.