# A Dynamic Restructuring Algorithm Based on Flexible PON Slices
## 2 Architecture and Network Model  
The centralized flexible PON architecture is shown in Figure 1. Multiplexers/demultiplexers and an optical connection matrix consisting of WSS or AWG are deployed at the local end to form a flexible optical distribution network (ODN) with the existing traditional ODN, and tunable lasers are added to the ONUs. Each splitter can receive signals from different OLTs through the flexible ODN, and ONUs can change the wavelength used. Therefore, the affiliation between ONUs and OLTs becomes dynamically tunable and a method of traffic grooming is considered; allocate the ONUs with high communication traffic between each other to the same OLT, so that the traffic transmitted across different PON trees can be converted to the same PON tree as much as possible. In this way, the incoming traffic to the core network can be reduced and the bandwidth resources of the core network can be saved.  
A PON tree is abstracted as a virtual slice, so the internal communication of the PON tree is the traffic within the slice, and the traffic that needs to be transmitted through the core network is the traffic between slices. The whole dynamic adjustment process is controlled by the Software Defined Network (SDN) controller. The SDN controller firstly obtains the communication traffic relationship among all ONUs through the Mac table of the OLT, and then finds an allocation scheme that minimizes the traffic between slices. Finally, according to the calculation results, the controller sends adjustment instructions to the OLT through the southbound interface to adjust the affiliation between ONUs and OLTs.  
Since the traffic between users changes over time, the current affiliation may not be optimal after a while, which will result in a waste of core network bandwidth. Therefore, a criterion is need to be set in actual scenarios, such as a time period or OLT outbound traffic threshold. When this condition is met, the SDN controller recalculates and allocates the affiliation between OLTs and ONUs to reduce the traffic to the core network.  
Considering the factor that influences the bandwidth of the core network is the value of traffic between ONUs, rather than the direction of the traffic, the access network scenario is defined as an undirected graph \(G\)(\(V\),\(E\)). As shown in Figure 2, each ONU represents a node in \(V\), each edge in \(E\) represents the communication between two ONUs, and the weight of the edge represents the traffic between the two ONUs. Since each ONU belongs to and can only belong to one OLT, the nodes corresponding to ONUs belonging to one OLT are classified as a subset. Suppose there are \(M\) OLTs in the scene, then there are \(M\) subsets, which do not intersect each other and together form the set \(V\). At the same time, the nodes and the traffic between them in each subset together form a subgraph. Therefore,the problem of ONU regrouping in a centralized flexible PON is transformed into dividing the \(G(V,E)\) into \(M\) subgraphs \(G_{i}\) (\(i=1,2\)... \(M\)), and the goal of minimizing the traffic into core network is transformed to minimize the sum of edge weights between M subgraphs.