Optical Network Optimization Based on Particle Swarm Intelligence

Modern optical communication networks are expected to meet a broad range of services with different and variable demands of bit rate, connection (session) duration, frequency of use, and set up time [1]. Thus, it is necessary to build flexible all-optical networks that allow dynamic resources sharing between different users and clients in an efficient way. The alloptical network is able to implement ultrahigh speed transmitting, routing and switching of data in the optical domain, presenting the transparency to data formats and protocols which increases network flexibility and functionality such that future network requirements can be met [2]. Optical code division multiplexing access (OCDMA) based technology has attracted a lot of interests due to its various advantages including asynchronous operation, high net‐ work flexibility, protocol transparency, simplified network control and potentially enhanced security [3]. Therefore, recent developments and researches on OCDMA have been experi‐ enced an expansion of interest, from short-range networks, such as access networks, to highcapacity medium/large networks.


Introduction
Modern optical communication networks are expected to meet a broad range of services with different and variable demands of bit rate, connection (session) duration, frequency of use, and set up time [1].Thus, it is necessary to build flexible all-optical networks that allow dynamic resources sharing between different users and clients in an efficient way.The alloptical network is able to implement ultrahigh speed transmitting, routing and switching of data in the optical domain, presenting the transparency to data formats and protocols which increases network flexibility and functionality such that future network requirements can be met [2].Optical code division multiplexing access (OCDMA) based technology has attracted a lot of interests due to its various advantages including asynchronous operation, high network flexibility, protocol transparency, simplified network control and potentially enhanced security [3].Therefore, recent developments and researches on OCDMA have been experienced an expansion of interest, from short-range networks, such as access networks, to highcapacity medium/large networks.
The optical network presents two promising scenarios: the transport (backbone) networks with optical code division multiplexing/wavelength division multiplexing (OCDM/WDM) technology and the access network with OCDMA technology.In both, transport OCDM/WDM and access OCDMA networks, each different code defines a specific user or logic channel transmitted in a common channel.In a common channel, the interference that may arise between different user codes is known as multiple access interference (MAI), and it can limit the number of users utilizing the channel simultaneously [3].In this work we have focus on hybrid OCDM/WDM systems.In this one, data signals in routing network configuration are carried on optical code path (OCP) from a source node to a destination node passing through nodes where the signals are optically routed and switched without regeneration in the electrical domain.Hence, in routing and channel (code/wavelength) assignment (RCA) problem, suitable paths and channels are carefully selected among the many possible choices for the required connections [2].
Establishing OCP with higher optical signal-to-noise plus interference ratio (SNIR) allows reducing the number of retransmissions by higher layers, thus increasing network throughput.Therefore, RCA techniques that consider physical layer impairments for the establishment of an OCP, namely Quality of Transmission-Aware (QoT-aware) RCA, could be much more practical [4][5].For a dynamic traffic scenario the objective is to minimize the blocking probability of the connections by routing, assigning channels, and to maintain an acceptable level of optical power and adequate SNIR all over the network [6].Furthermore, different channels can travel via different optical paths and also have different levels of quality of service (QoS) requirements.The QoS depends on SNIR, dispersion, and nonlinear effects [6].Therefore, it is desirable to adjust network parameters in an optimal way, based on on-line decentralized iterative algorithms to accomplish such adjustment [7].
As a result, this dynamic optimization allows an increased network flexibility and capacity [6][7].The SNIR optimization problem appears to be a huge challenge, since the MAI introduces the near-far problem [7].Furthermore, if the distances between the nodes are quite different, like in real optical networks, the signal power received from various nodes will be significantly distinct.Thus, considering an optical node as the reference, the performance of closer nodes is many orders of magnitude better than that of far ones.Then, an efficient power control is needed to overcome this problem and enhance the performance and throughput of the network; this could be achieved through the SNIR optimization [6].In this case, which is analogous to the CDMA cellular system, the power control (centralized or distributed) is one of the most important issues, because it has a significant impact on both network performance and capacity.It is the most effective way to avoid the near-far problem and to increase the SNIR [6][7].
The optical power control problem has been recently investigated in the context of access networks aiming at solving the near-far problem [7][8] and establishing the QoS at the physical layer [9][10][11].In [7], the impact of power control on the random access protocol was investigated.In [8], the effect of near-far problem and a detailed review of the power control were presented including the use of distributed algorithms.On the other hand, in [9][10][11][12] the concept that users of various classes should transmit at different power levels was applied.Distinct power levels were obtained with power attenuators [10], adjustable encoders/decoders [11], and adjustable transmitters [12].Furthermore, the optimal selection of the system's parameters such as the transmitted power and the information rate would improve their performances [9,[13][14][15].In [13], optical power control and time hopping for multimedia applications using single wavelength was proposed.The approach accommodates various data rates using only one sequence by changing the time-hopping rate.However, in order to implement such system an optical selector device that consists of a number of optical hard-limiters is needed [13].On the other hand, in [14] a multi rate and multi power level scheme using adaptive overlapping pulse-position modulator (OPPM) and optical power controller was proposed.The bit rate varies depending on the number of slots in the optical OPPM system and has the advantage that it is not required to change the code sequence depending on the required user's information rate.The power level can be achieved by accommodating users with the different transmitted power.The power controller requires only power attenuator, and the difference of the power does not cause the change of the bit rate.In [15] a hybrid power and rate control nonlinear programming algorithm for overlapped optical fast frequency hopping (OFFH) was proposed.The multi rate transmission is achieved by overlapping consecutive bits while coded using fiber Bragg grating (FBG).The intensity of the transmitted optical signal is directly adjusted from the laser source with respect to the transmission data rate.The proposed algorithm provides a joint transmission power and overlapping coefficient allocation strategy, which has been obtained via the solution of a constrained optimization problem, which maximizes the aggregate system throughput subject to a peak laser transmission power constraint.In [9], a control algorithm to solve the unfairness in the resource allocation strategy presented in [10] has been analyzed.Also, a unified framework for allocating and controlling the transmission rate and power in a way that it can be applied for any expression of the system capacity was implemented.
Besides, recently researches have showed the utilization of resource allocation and optimization algorithms such as Local Search, Simulated Annealing, GA, Particle Swarm optimization (PSO), Ant Colony optimization (ACO) and Game Theory to regulate the transmitted power, bit rate variation and the number of active users in order to maximize the aggregate throughput of the optical networks [16][17].However, the complexity and unfairness in the strategies presented are aspects to be improved.On the other hand, resource allocation has not been largely investigated considering energy efficiency aspects.This issue has become paramount since energy consumption is dominated by the access segment due to the large amount of distributed network elements.The related works have showed the utilization of resource allocation and optimization algorithms to optimization of the access network; however, these issues have not been largely investigated considering routed OCDM/WDM networks [6].In the case of the OCP networks optimization, it is necessary to consider the use of distributed iterative algorithms with high performance-complexity tradeoffs and the imperfections of physical layer, which constitute a new research area so far, which was investigated under an analytical perspective in [6].
It is worth noting the routed OCDM/WDM networks brings a new combination of challenges with the power control, like amplified spans, multiple links, accumulation, and self-generation of the optical spontaneous noise power (ASE) noise, as well as the MAI generated by the OCPs.On the other hand, the dispersive effects, such as chromatic or group velocity dispersion (GVD) and polarization mode dispersion (PMD), are signal degradation mechanisms that significantly affect the overall performance of optical communication systems [6,[18][19][20][21].
In this chapter, optimization procedures based on PSO are investigated in details, aiming to efficiently solve the optimal resource allocation for SNIR optimization of OCPs from OCDM/WDM networks under QoS restrictions and energy efficiency constraint problem, considering imperfections on physical constraints.Herein, the adopted SNIR model considers the MAI between the OCP based on 2-D codes (time/wavelength) [22,23], ASE at cascaded amplified spans, and GVD and PMD dispersion effects.
The optimization method based on the heuristic PSO approach is attractive due to its performance-complexity tradeoff and fairness features regarding the optimization methods that deploy matrix inversion, purely numerical procedures and other heuristic approaches [9] [17].
The chapter is organized in the following manner: in Section 2 the optical transport (OCDM/ WDM) is described, while in Section 3 the SNIR optimization for the OCPs based on particle swarm intelligence is described in order to solve the resource allocation problem.In the network optimization context, figures of merit are presented and the PSO is developed in Section 4, with emphasis on its input parameters optimal choice and the network performance.Afterward, numerical results are discussed for realistic networks operation scenarios.Finally, the main conclusions are offered in Section 5.

Network architecture 2.1. OCDM/WDM transport network
The transport network considered in this work is formed by nodes that have optical core routers interconnected by OCDM/WDM links with optical code paths defined by patterns of short pulses in wavelengths, such as shown in Fig. 1.The links are composed by sequences of span and each span consists of optical fiber and optical amplifier.The transmitting and receiving nodes create virtual path based on the code and the total link length is given by , where d i tx is the span length from the transmitting node to the optical router and d j rx is the span between optical routers in the OCP route and the receiving node.
The received power at the j-th node is given byP r = a star p i G amp exp( − α f d ij ), where p i is the transmitted power by the i-th transmitter node, α f is the fiber attenuation (km -1 ) and a star is the star coupler attenuation (linear units), and G amp is the total gain at the route.Considering decibel units,a star = 10log(K ) − 10log 2 (K )log 10 δ , where, δ is the excess loss ratio [6].A typical distance between optical amplifiers is about 60 km [20].
The optical core router consists of code converter routers in parallel forming a two-dimensional router node [23] and each group of code converters in parallel is pre-connected to a specific output performing routing by selecting a specific code from the incoming broadcasting traffic.This kind of router does not require light sources or optical-electrical-optical conversion and can be scaled by adding new modules [22].This code is transmitted and its route in the network is determined by a particular code sequence.For viability characteristics, we consider network equipment, such as code-processing devices (encoders and decoders at the transmitter and receiver), star coupler, optical routers could be made using robust, lightweight, and low-cost technology platforms with commercial-off-the-shelf technologies [23][24].For more details about transport networks the references [19], [25] should be consulted.

OCDMA codes
The OCDMA can be divided into a) non-coherent unipolar systems, based only on optical power intensity modulation [20], and b) coherent bipolar systems, based on amplitude and phase modulation [26].As expected, the performance of coherent codes is higher than that of non-coherent ones when analyzing the SNIR [27].This effect occurs, because the bipolar code is true-orthogonal, and the unipolar code is pseudo-orthogonal.However, the main drawback to the coherent OCDMA lies in the technical implementation difficulties, concomitant with the utilization of phase-shifted optical signals [20], [27].In this work we adopt non-coherent codes because their technological maturity and implementation easiness when compared with coherent codes [28].The non-coherent codes can be classified into one-dimensional (1-D) and two-dimensional (2-D) codes.In the 1-D codes, the bits are subdivided in time into many short chips with a designated chip pattern representing a user code.On the other hand, in the 2-D codes, the bits are subdivided into individual time chips, and each chip is assigned to an independent wavelength out of a discrete set of wavelengths.The 2-D codes have better performance than the 1-D codes, and they can significantly enhance the number of active users [29].Besides, the 2-D codes have been applied only in access networks [2]; in this way, recently the utilization of the 2-D codes to obtain optical code path routed networks was proposed, which performance evaluated by simulation, considering coding, topology, load condition, and physical impairment [2] The 2-D codes can be represented by N λ × N T matrices, where N λ is the number of rows, that is equal to the number of available wavelengths, and N T is the number of columns, that is equal to the code length.The code length is determined by the bit period T B which is subdivided into small units namely chips, each of duration T c = T B / N T , as show Fig. 2(a).In each code, there are w short pulses of different wavelength, where w is called the weight of the code.An (N λ × N T, w, λ a , λ c ) code is the collection of binary N λ × N T matrices each of code weight w; the parameters λ a and λ c are nonnegative integers and represent the constraints on the 2-D codes autocorrelation and cross-correlation, respectively [3].The 2-D code design and selection is very important for good system performance and high network scalability with low bit error rate (BER).In [3] and [28] is presented an extensive list of code construction techniques, as well as their technological characteristics are discussed.
The OCDMA 2-D encoder creates a combination of two patterns: a wavelength-hopping pattern and a time-spreading pattern.The common technology applied for code encoders/ decoders fiber Bragg gratings (FBGs), as show Fig. 2(b).The losses associated with the encoders/ decoders are given by C Bragg (dB) = N λ a Bragg + a Circulator [22], where a Bragg is the FBG loss and a Circulator is the circulator loss.The usual value of losses for these equipments are a Bragg = 0.5 dB and a Circulator = 3dB.

SNIR optimization procedures
In the present approach, the SNIR optimization is based on the definition of the minimum power constraint (also called sensitivity level) assuring that the optical signal can be detected by all optical devices.The maximum power constraint guarantees the minimization of nonlinear physical impairments, because it makes the aggregate power on a link to be limited to a maximum value.The power control in optical networks appears to be an optimization problem.

Problem description
Denoting Γ i the carrier-to-interference ratio (CIR) at the required decoder input, in order to get a certain maximum bit error rate (BER) tolerated by the i-th optical node, and defining the K-dimensional column vector of the transmitted optical power p = [p 1 , p 2 ,…, p K ] T , the optical power control problem consists in finding the optical power vector p that minimizes the cost function J ( p) can be formulated as [6], [8] : where 1 T = [1,..., 1] and Γ * is the minimum CIR to achieve a desired QoS; G ii is the attenuation of the OCP taking into account the power loss between the nodes, according to network topology, while G ij corresponds to the attenuation factor for the interfering OCP signals at the same route, G amp is the total gain at the OCP, N sp eq is the spontaneous noise power (ASE) for each polarization at cascaded amplified spans [29], p i is the transmitted power for the i-OCP and p j is the transmitted power for the interfering OCP; σ D is the pulse spreading due to the combined effects of the GVD and the first-order PMD for Gaussian pulses [30].Using matrix notations, (1) can be written as Ι -Γ * H p ≥ u, where I is the identity matrix, H is the normalized interference matrix, which elements evaluated by H ij = G ij / G ii for i ≠ j and zero for an- other case, thus , where there is a scaled version of the noise power.
Substituting inequality by equality, the optimized power vector solution through the matrix inversion p * = Ι -Γ * H -1 u could be obtained.The matrix inversion is equivalent to centralized power control, i.e. the existence of a central node in power control.The central node stores information about all physical network architecture, such as fiber length between nodes, amplifier position and regular update for the OCP establishment, and traffic dynamics.These observations justify the need for on-line SNIR optimization algorithms, which have provable convergence properties for general network configurations [6,16,29].
The SNIR and the carrier to interference ratio in eq. ( 1) are related to the factorN T / σ, i. e., The bit error probability (BER) is given by P b (i) = erfc( γ i / 2) / 2, when the Gaussian approximation is adopted, and the signal-to-noise plus interference ratio (SNIR) at each OCP, considering the 2-D codes, is given by [6,8], ( ) where the average variance of the Hamming aperiodic cross-correlation amplitude is represented by σ 2 [3].
Optical Network Optimization Based on Particle Swarm Intelligence 7

Physical restrictions
The physical impairments are signal degradation mechanisms that significantly affect the overall performance of optical communication systems [6].For the data that are transmitted through a transparent optical network, degradation effects may accumulate over a large distance.The major linear physical impairments are group velocity dispersion (GVD), polarization mode dispersion (PMD), and amplifier spontaneous emission (ASE) noise [24].On the other hand, the major nonlinear physical impairments are self phase modulation (SPM), crossphase modulation (XPM), and four wave mixing (FWM), stimulated Brillouin scattering (SBS), and Raman scattering (SRS).The nonlinear physical impairments are excited with high power level [24].However, the maximum power constraint guarantees the minimization of nonlinear physical impairments, because it makes the aggregate power on a link to be limited to a maximum value [6].In the currently technology stage, besides GVD, the main linear impairment is the PMD, that must be considered in high capacity optical networks.Differently from GVD, PMD is usually difficult to accurately determine and compensate due to its dynamic nature and its fluctuations induced by external stress/strain applied to the fiber after installation [5] [21] [22].As a result, the signals quality in an OCDM/WDM network can be quickly evaluated by analyzing the GVD, PMD and MAI restrictions.PMD impairment establishes an upper bound on the length of the optical segment due to fiber dispersion which causes the temporal spreading of optical pulses.On the other hand, due to the advances in the fiber manufacturing process with a continuous reduction of the PMD parameter, the deleterious effect of PMD will not be an issue for 10 Gbps or lower bit rates, for future small and medium-sized networks [20] [21].In this context, the dominant impairment in SNIR will be given by i) ASE noise accumulation in chains of optical amplifiers for future optical networks [29] and ii) ASE, GVD and PMD for currently stage of optical networks.
The dispersive effects, such as chromatic or group velocity dispersion (GVD) and polarization mode dispersion (PMD) constitute degradation mechanisms of the optical signal that significantly affect the overall performance of optical communication systems [21].Currently, the PMD effect appears to be the only major physical impairment that must be considered in high capacity optical networks, which can hardly be controlled due to its dynamic and stochastic nature [5][21-22].On the other hand, the GVD causes the temporal spreading of optical pulses that limits the product line rate and link length .The pulse spreading effect due to the combined effects of the GVD and the first-order PMD for Gaussian pulses can be calculated as [30]: where C p is the chirp parameter, is the RMS pulse width, T c is the chip period at half maximum, β 2 = − Dλ 0 and d ij is the link length.Although there is a difference in the GVD for each wavelength, resulting from time skewing between the wavelengths, the consideration of the same GVD value for the entire transmission window is reasonable for a small number of wavelengths, as for the present code [27], [28].On the other hand, this approximation is utilized to obtain an analytical treatment of the GVD and the PMD, in the same and less complex formalism, rather than to apply a formalism based on numerical methods [6].
The ASE (N sp eq ) at the cascaded amplified spans is given by the model presented in Fig.
Pre-amplifier This model considers that the receiver gets the signal from a link with cascading amplifiers, numbered as 1, 2,.., starting from the receiver.The pre-amplifier can be contemplated as the number 0 cascade amplifier.Let G i be the amplifier gain, i. e. N sp -i will be its spontaneous emission factor.The span between the i-th and the (i − 1)-th amplifier has the attenuation G ii .Let P ti be the mark power at the i-th amplifier input.The equivalent spontaneous emission factor is given by [24], [29] ( ) ( ) Calculating recursively the N sp eq factor, one can find the noise at the cascading amplifiers.The noise for i-th amplifier is given by N sp−i = 2n sp hf (G i − 1)B 0 , which take into account the two polarization mode presented in a single mode fiber [24].Where n SP is the spontaneous emission factor, typically around 2 − 5, h is Planck's constant, f is the carrier frequency, G i is the amplifier gain and Bo is the optical bandwidth.Ideally, to reduce the ASE noise power, the optical bandwidth can be set to a minimum of Bo = 2R, where R is the bit rate.Without loss of generality, all employed optical amplifiers provide a uniform gain, setting the maximum obtainable Erbium-doped fiber amplifier (EDFA) to 20 dB across the transmission window.This is a reasonable assumption for the reduced number of wavelengths in the code transmission window (4 wavelengths), considering the optical amplifier gain profile, where the maximum difference of this gain is 0.4 dB for the wavelength, which is the most distant one from the central wavelength (1550 nm), with spectral spacing of 100 GHz [6][17].

PSO description
Particle Swarm Optimization (PSO) is a population-based stochastic optimization algorithm for global optimization that was presented first in 1995 [31].It is based on the behavior of social groups like fish schools or bird flocks and it differs from other well-known Evolutionary Algorithms (EA).As in EA, a population of potential solutions is used to probe the search space, but no operators, inspired by evolution procedures, are applied on the population to generate new promising solutions [32].The fact which is recursively exploited is that an improved performance can be gained by interactions between individuals, or more specifically by imitation of successful individuals.In a PSO system, particles fly around in multidimensional search space.During the flight, each particle adjusts its position according to its own experience, and the experience of neighboring particles, making use of the best position encountered by itself and its neighbors.The swarm direction of a particle is defined by the set of particles neighboring the particle and its history experience.Although PSO does not rely on the survival of the fittest principle, it is often classified as an evolutionary algorithm (EA) because the update equations, which control the movement of individuals, are similar to the evolutionary operators used in EAs.
In general, the PSO performance for resource allocation problem can guarantee fast convergence and fairness within fewer iterations regarding the genetic algorithm-based [16].It is well known in the literature that the PSO performance for resource allocation problem is highly dependent on its control parameters and that recommended parameter settings from the literature often do not lead to reliable and fast convergence behavior for the considered optimization problem [33], [34], [35].
In the PSO process, each particle keeps track of its coordinates in the space of interest, which are associated with the best solution (fitness) it has achieved so far.Another best value tracked by the global version of the particle swarm optimizer is the overall best value, and its location, obtained so far by any particle in the population.At each time iteration step, the PSO concept consists of velocity changes of each particle toward local and global locations.
Acceleration is weighted by a random term, with separate random numbers being generated for acceleration toward local and global locations.Let b p and v p denote a particle coordinates (position) and its corresponding flight speed (velocity) in a search space, respectively.In this strategy, each power-vector candidate b p t , with dimension K x 1, is used for the velocity- vector calculation of the next iteration [33]: Search Algorithms where ω t is the inertia weight of the previous velocity in the present speed calculation, the velocity-vector has K dimension v p t = v p1 t v p2 t … v pK t T ; the diagonal matrices U p1 t and U p2 t with dimension K have their elements as random variables with uniform distribution ∼ U ∈ [0, 1], generated for the pth particle at iteration t = 1, 2,..., G; b g best t and b p best t are the best global vector-position and the best local vector-position found until the t th iteration, re- spectively; C 1 and C 2 are acceleration coefficients regarding the best particles and the best global positions influences in the velocity updating, respectively.The p th particle's position at the tth iteration is defined by the power candidate-vector b p t = b p1 t b p2 t … b pK t T .The position of each particle is updated using the new velocity vector for that particle, where P is the population size.In order to reduce the likelihood that the particle might leave the search universe, maximum velocity factor V max factor is added to the PSO model, which will be responsible for limiting the velocity to the range ±V max .Hence, the adjustment of velocity allows the particle to move in a continuous but constrained subspace, been simply accomplished by: From (7) it's clear that if |v pk t | exceeds a positive constant value V max specified by the user, the pth particle' velocity of kth user is assigned to be sign(v pk t )V max , i.e. particles velocity on each of K -dimension is clamped to a maximum magnitude V max .Besides, if the search space could be defined by the bounds P min ; P max , then the value of V max typically is set so that V max = τ(P max -P min ), where 0.1 ≤ τ ≤ 1.0; please refer to Chapter 1 within the definition of reference [35].
In order to elaborate further about the inertia weight it can be noted that a relatively larger value of ω is helpful for global optimum, and lesser influenced by the best global and local positions, while a relatively smaller value for ω is helpful for convergence, i.e., smaller inertial weight encourages the local exploration as the particles are more attracted towards b p best and b g best [31,32].Hence, in order to achieve a balance between global and local search abilities, a linear inertia weight decreasing with the algorithm convergence evolving was adopted, which has demonstrated good global search capability at beginning and good local search capability latter iterations: where ω initial and ω final is the initial and final weight inertia, respectively, ω initial > ω final , G is the maximum number of iterations, and m ∈ 0.6; 1.4 is the nonlinear index [36].

Optical code path resource allocation optimization
The following maximization cost function could be employed as an alternative to OCP resource allocation optimization [33].This single-objective function was modified in order to incorporate the near-far effect [37], [38] where L is the number of different group of information rates allowing in the system, and K l is the number of user in the lth rate group with minimum rate given by R min l .Important to say, the second term in eq. ( 9) gives credit to the solutions with small standard deviation of the normalized (by the inverse of rate factor, F l ) received power distribution: i.e. the more close the normalized received power values are with other (small variance of normalized received power vector), the bigger contribution of the term ρ σ rp .For single-rate systems, F 1 = … = F l = … = F L .It is worth to note that since the variance of the normalized received power vector, σ rp 2 , normally assumes very small values, the coefficient ρ just also take very small values in order to the ratio ρ σ rp achieves a similar order of magnitude of the first term in (9), been determined as a function of the number of users, K .Hence, the term ρ σ rp has an effective influence in minimizing the near-far effect on OCDM/WDM systems, and at the same time it has a non-zero value for all swarm particles [33].Finally, the threshold function in ( 9) is simply defined as: where the SNIR for the kth user, γ k , is given by (2).The term 1 -p k P max gives credit to those solutions with minimum power and punishes others using high power levels [33].
The PSO algorithm consists of repeated application of the updating velocity and position, eq. ( 5) and ( 6), respectively.The pseudo-code for the single-objective continuous PSO power allocation problem is presented in Algorithm 1.
The quality of solution achieved by any iterative resource allocation procedure could be measured by how close to the optimum solution is the found solution, and can be quantified by the normalized mean squared error (NMSE) when equilibrium is reached.For power allocation problem, the NSE definition is given by, where • 2 denotes the squared Euclidean distance to the origin, and E • the expectation operator.
Optical Network Optimization Based on Particle Swarm Intelligence 13

Energy efficiency optimization in OCPs
Recent studies have showed the importance of the consideration of energy consumption in optical communications design [39], considering the transmission infrastructure (transmitters, receivers, fibers and amplifiers) [40] and network infrastructure (switchers and routers) [41] aspects.Researches in a global scale network have indicated that the energy consumption of the switching infrastructure is larger than the energy consumption of the transport infrastructure [39][40][41].In this context, it is necessary to improving the energy efficiency of switching and optimizing the network design in order to reduce the quantity of switching and overheads.The energy necessary for 1 bit transmission on each OCP can be expressed as [40], , 1,.., where T bit =1/R is the time to transmit one bit over the network, with R is the bit rate.In our analysis, to determinate the energy is necessary define the individual OCPs transmitted power (p i ).The p i is obtained by power control PSO algorithm given in Algorithm 1 and may be associated to a specific QoS, SNIR and maximum BER tolerated by the i-th optical node.In a power control situation, each optical node adjusts its transmitter power in an attempt to maximize the number of transmitted bits with minimum consumption of energy.This concept is formulated by the energy efficiency [42]: ( ) , 1,.., where g(γ i ) = 1 − BE R i is the efficiency function, which represents the number of correct packets received for the for the i-th node, given a SNIR γ i .In the same way this concept is used in a metric called utility that is the number of bits received per energy expended or the relation of the throughput and power dissipation [41].
For each i-th OCP, the maximum number of transmitted bits occurs at power level for which the partial derivative of energy efficiency function in (14) with respect to p i is zero Considering a SNIR general formula for CDMA networks, given by [6]   , 1,.., where h ij are the total loss in the path that connects i-th transmitter node to j-th receiver node, I 1 is the interference from the others transmitters nodes and N i is the receiver noise.
We can obtain the derivative of energy efficiency referring to efficiency function and ( 15), ( ) From ( 16) we observe, for p i > 0, the necessary condition to maximize the energy efficiency is To satisfy (17) it is necessary that the received node achieves the target SNIR, namelyγ i * .In this context, we propose the utilization of PSO power allocation algorithm in order to establish the lower energy per bit according to the OCDM/WDM network QoS requirements.

Numerical results
For all simulations, it is considered the transmission over a nonzero-dispersion shifted fiber (NFD)-ITU G.655 with fiber attenuation (α) of 0.2 dB/km, non-linear parameter (Γ) of 2 (W.km) -1 , zero-dispersion wavelength (λ 0 ) of 1550 nm, dispersion slope (S 0 ) of 0.07 ps/ (nm 2 .km).The signal is placed at λ 0 and its peak power is P. Note that the nonlinear length [24] L NL = 1/(ΓP) is limited to 500 km, which is much longer than the considered fiber lengths; besides self-phase modulation (SPM) should not seriously affect the system performance.Furthermore, the threshold power for stimulated Brillouin scattering (SBS) is below a few mW; as a result, SBS should also not interfere in our results.Similarly, for these considerations, the physical impairments, such as stimulated Raman scattering (SRS) should not be relevant [24].Typical parameter values for the noise power in all optical amplifiers were assumed [21].So, it was adopted n SP = 2, h=6.63 × 10−34 (J/Hz), f=193.1 (THz), G=20 (dB) and Bo=30 (GHz).Herein, it was considered an amplifier gain of 20 dB with a minimum spacing of 60 km, D PMD =0.1ps / km, and D=15 ps/nm/km.Losses for encoder/decoder and router ar- chitecture of 5 dB and 20 dB, respectively, were included in the power losses model [22][23][24].
The parameters are code weight of 4 and code length of 101, thus the code is characterized by (4 × 101, 4, 1,0) and the target SNIR γ i * = 20dB was adopted.

PSO parameters optimization for resource allocation problem
For power resource allocation problem, simulation experiments were carried out in order to determine the suitable values for the PSO input parameters, such as acceleration coefficients, C 1 and C 2 , maximal velocity factor, V max , weight inertia, ω, and population size, P, regarding the power optimization problem.
The continuous optimization for resource allocation problem was investigated in [33], [34], it indicates that after an enough number of iterations (G) for convergence, the maximization of cost function were obtained within low values for both acceleration coefficients.The V max factor is then optimized.The diversity increases as the particle velocity crosses the limits established by ±V max .The range of V max determines the maximum change one particle can take during iteration.With no influence of inertial weight (ω = 1), it was obtained that the maximum allowed velocity V max is best set around 10 to 20% of the dynamic range of each particle dimension [33].The appropriate choose of V max avoids particles flying out of meaningful solution space.Herein, for OCP power allocation problem, similar to the problem solved in [33], the better performance versus complexity trade-off was obtained setting the maximal velocity factor value as V max = 0.2 (P max -P min ).For the inertial weight, ω, simula- tion results has confirmed that high values imply in fast convergence, but this means a lack of search diversity, and the algorithm can easily be trapped in some local optimum, whereas a small value for ω results in a slow convergence due to excessive changes around a very small search space.In this work, it was adopted a variable ω, as described in ( 8), but with m = 1, and initial and final weight inertia setting up to ω initial = 1 and ω final = 0.01.Hence, the initial and final maximal velocity excursion values were bounded through the initial and final linear inertia weight multiplied by V max , adopted as a percentage of the maximal and minimal power difference values [33], Finally, stopping criterion can be the maximum number of iterations G (velocity changes allowed for each particle) combined with the minimum error threshold: where typically ∊ stop ∈ 0.001; 0.01 .Alternately, the convergence test can be evaluated through the computation of the average percent of success, taken over T runs to achieve the global optimum, and considering a fixed number of iterations G.A convergence test is considered 100% successful if the following relation holds: where, J |p*| is the global optimum of the objective function under consideration, J | G | is the optimum of the objective function obtained by the algorithm after G iterations, and ∊ 1 , ∊ 2 are accuracy coefficients, usually in the range 10 -6 ; 10 -2 .In this study it was assumed that T = 100 trials and ∊ 1 = ∊ 2 = 10 -2 .
The parameter ρ in cost function (9), was set as a function of the number of users OCPs (K), such that ρ = K × 10 −19 .This relation was adapted from [38] for the power-rate allocation problem through non-exhaustive search [33].The swarm population size was set by In power resource allocation problem for access network systems the parameters optimization, mainly acceleration coefficients C 1 and C 2 , depend on the number of simultaneous transmitted users [16], [33].In the case of realistic OCDM/WDM routed networks, the number of simultaneous transmitted OCPs is low, generally around or less than 10 [2], [5], [6], [25].Fast convergence without losing certain exploration and exploitation capabilities could be obtained with optimization of acceleration parameters in relation to the standard values adopted in the literature [16].Previous works have shown that the best convergence versus solution quality trade-off was achieved with C 1 = 1 and C 2 = 2 for number of codes less than 10 [16], [33].On the other hand, the classical value adopted are [32][33][34][35].In this context, simulation experiments were carried out in order to determine the good choice for acceleration coefficients C 1 and C 2 regarding the power optimization problem.Fig. 4 illustrates different solution qualities in terms of the normalized mean squared error (NMSE), when different values for C 1 combining with C 2 = 2 in a system with number of OCPs equal to 7, considering 1 span.Previous simulations have shown the non poor convergence for different value of C 2 [33].The lengths of OCPs are uniformly distributed between 2 and 100 km.
The NMSE values where taken as the average over T = 100 trials.Besides, the NMSE convergence values were taken after G = 800 iterations.The algorithm reaches convergence for C 1 = 1.4,1.6, 1.8, 2, 2.2 and 2.4, however it doesn't reach acceptable convergence for C 1 = 1.Simulations revealed that increasing parameter C 1 results in a slower convergence with approximately 320, 343, 373, 639, 659 and 713, iterations, respectively.However, NMSE for faster convergence is higher than for the slower convergence parameters with minimum value for C 1 = 1.8, as indicated in Fig. 4. In this context, the best convergence versus solution quality trade-off was achieved with C 1 = 1.8 and C 2 = 2 for number of OCPs of 7.
It is worth to expand this analysis to other number of OCPs that are generally between 4 and 8 OCPs.For this purpose, Fig 6 shows the NMSE for the number of OCPs regarding two combination of acceleration coefficient: i) optimized herein (C 1 = 1.8 and C 2 = 2.0) and reported in the literature (C 1 = 2.0 and C 2 = 2.0).The OCPs increasing affects the solution quality.This effect is directly related to the MAI rising which increases with the number of OCPs, i.e., the MAI effects are strongly influenced by the increase of the active OCPs; an error occurs when cross-correlational pulses from the (K -1) interfering optical code paths built up to a level higher than the autocorrelation peak, changing a bit zero to a bit one.
In conclusion, our numerical results for the power minimization problem have revealed for low system loading that the best acceleration coefficient values lie on C 1 = 1.8 and C 2 = 2.0, in terms solution quality trade-off.This result was compared with C 1 = 2.0 and C 2 = 2.0 previously reported in the literature [32]- [35].

PSO optimization for OCPs
The solution quality versus convergence trade-off analysis presented in Figs. 4, 5 and 6 for the PSO's acceleration coefficients optimization in the case of OCDM/WDM networks with 1 span should be extended taking into account the use of more spans.The state-of-art for the number of spans without electronic regeneration is around 4 considering the ASE effect limiting applying fibers with low PMD effects for bit rate of 10 Gbps (lower than 40 Gbps) [29].In Fig. 7 the analysis of subsection 4.1 is extended until 8 spans, showing the influence of the number of spans on the NMSE for 7 OCPs and the same parameters values optimized in that subsection.The results show that NMSE decreases when the number of spans increases until 6 spans, after this number of spans the NMSE alters the tendency and increases.This behavior shows the limitation of PSO convergence when the ASE increases.After 6 spans the PSO algorithm does not reach the total convergence.This fact occurs, directly by the limitations generate with the increase of the ASE.In other sense, the transmitted power needed to reach the target SNIR will overcome the maximum allowed transmitted power.The average number of spans increases slightly as K increases, as longer OCP routes become available.This increase is, however, not very significant, and on average, the path lengths are around four spans [22].
The convergence quality of the PSO algorithm presents variation with the increase in the number of spans.The figure of merit utilized as tool to this analysis is the rate of convergence (RC), which can be described as the ratio of PSO solution after the t-th iteration divided by the PSO solution after total convergence, which in this optimization context is given by the matrix inversion solution, as discussed in Section 3.1.Recalling eq. ( 19), the RC can be expressed in term of ∊ stop as: The reader interested in quality of solution metrics, a similar definition for RC and another figure of merit for the PSO, namely success cost, are presented in [35].the amplifier with signal, besides for more than 6 spans the contribution of the amplifier is for the ASE noise.On the other hand, the increase in the number of OCPs results in a slow convergence that results from the MAI between the OCPs.In summary, our numerical results for the power minimization problem considering different number of spans have revealed the viability of the PSO algorithm deployment to solve a power allocation in OCPs with until 6 spans in order to guarantee the solution quality in terms of NMSE.Furthermore, the numerical results revealed that increasing the number of spans results in a faster convergence.In this context, the PSO algorithm is quite suitable to solve a power allocation in OCPs that presents an average of 4 spans as reported in the literature [22].
In order to evaluate the impact of physical restrictions on the OCM/WDM network, further numerical results presented in Fig. 9 shows the sum power evolution of the PSO algorithm with respect to the number of iterations, considering a) 4 OCPs, and b) 8 OCPs.One span was considered as reference for bit rate of 10 Gbps taking into account two situations: i) with only ASE effects, ii) with ASE, GVD and PMD effects.
The target SNIR established for all the nodes is equal, and if the perfect power balancing with ideal physical layer (no physical impairments) is assumed, it could be demonstrated that the maximum SNIR and the transmitted power are defined by the number of OCPs in the same route.However, when the ASE, GVD and PMD effects are considered, there is a penalty.This penalty represents the received power reduction due to temporal spreading.Fig. 9 shows that when ASE, GVD and PMD effects are considered there is a power penalty of 3 decades compared with the situation where only ASE is considered (fibers with low PMD).Comparing Figs.9(a) and 9(b), it could be noticed that the convergence velocity depends on the number of OCPs.The increase of OCPs from 4 to 8 affects the convergence velocity, from ≈ 200 to ≈ 500 iterations, respectively.This effect is directly related to the MAI increasing, which increases with the number of OCPs.The MAI effects are strongly influenced by the increase of the active number of OCPs; as explained before, an error occurs when cross-correlational pulses from the (K -1) interfering optical code paths built up to a level higher than the autocorrelation peak, changing a bit zero to a bit one.The PMD effects degrade the performance when the link length and bit rate increase.This effect occurs because PMD impairment establishes an upper bound on the link length, which causes the temporal spreading of optical pulses.The upper bound for link distance depends on the chip-rate distance product (d.R.N T ), where d is the link length, R is the bit rate, and N T is the code length.The analysis of code parameters, MAI and PMD effects for 2D-based OCPs was previously reported in [20].
In OCDM/WDM networks, the OCPs with various classes of QoS are obtained with transmission of different power levels.Distinct power levels are obtained with adjustable transmitters and it does not cause the change of the bit rate.The intensity of the transmitted optical signal is directly adjusted from the laser source with respect to the target SNIR by PSO algorithm.The results in Table I show the necessary values for transmitted power, as well as the solution quality evaluation in terms of NMSE.The increase in the target SNIR results in the increase of the transmitted power, which is major for more OCPs.On the other hand, the solution quality (NMSE) decreases with the increase of SNIR target, since the number of the PSO iterations is fixed.

PSO optimization for energy efficiency in OCPs
An efficient resource allocation algorithm is needed to overcome the problem of energy efficiency and to enhance the performance and QoS of the optical network.This could be achieved via signal-to-noise plus interference (SNIR) PSO optimization.Fig. 10 shows the sum of energy per bit as a function of the rate of convergence of eq. ( 21) for the PSO optimization with different QoS requirements represented by SNIR target of 17, 20 and 22 dB, considering a) 4 OCPs and b) 8 OCPs, i.e., same scenario presented in the previous subsection.One can see when rate of convergence evolving, the energy per bit solution offered by the PSO algorithm convergences to the best lower values as predicted in (17).
It can be seen from Fig. 10 the impact of the PSO power allocation optimization procedure (in terms of transmitted energy per bit) on the energy efficiency improvement.The deployment of PSO with 100% of rate of convergence results in an enormous saving of energy.Indeed, with very low number of PSO iterations, rate of convergence is poor (RC < 0.03), the transmitted energy per bit is high because the MAI are strongly influenced by near-far effects.As expected, the increase of the active OCPs from 4 to 8, results in the increase of the transmitted energy per bit to reach the SNIR target.Furthermore, one can analyze the variation of saving energy for different levels of convergence rate; for instance, the variation of saving energy regarding the rate convergence in the range RC ∈ 0.5; 1.0 remains in approximately from 40 to 60 % for different SNIR target and number of OCPs, as presented in Fig. 10.In this context, aiming to analyze the effect of the number of spans in the transmitted energy per bit for 4 and 8 OCPs, Table 2 presents the sum energy per bit considering SNIR target of 20 dB and rate of convergence of 0.5 and 1.0, for 2 and 4 spans.The results show the impact of the number of spans in the transmitted energy per bit for the variation of rate convergence of 0.5 and 1.As expected, the increase in the number of spans and the number of OCPs results in the increase of the transmitted energy per bit.Besides, the sum energy per bit variation, regarding the RC from 0.5 to 1.0, declines with the increase of the number of spans from 2 to 4. This results agree with the previous results illustrated in Fig. 8, meaning the increase of the number of spans accelerate the RC.

Conclusions
In this chapter, optimization procedures based on particle swarm intelligence are investigated in details, aiming to efficiently solve the optimal resource allocation for signal-to-noise plus interference ratio (SNIR) optimization of optical code paths (OCPs) from OCDM/WDM networks under quality of service (QoS) restrictions and energy efficiency constraint prob-Optical Network Optimization Based on Particle Swarm Intelligence 25 lem, considering imperfections on physical constraints.The SNIR model considers multiple access interference (MAI) between the OCP based on 2-D codes (time/wavelength), amplifier spontaneous emission (ASE) at cascaded amplified spans, and group velocity dispersion (GVD) and polarization mode dispersion (PMD) dispersion effects.The characteristic of the particle swarm optimization (PSO) is attractive due their performance-complexity tradeoff and fairness regarding the optimization methods that use numerical methods, matrix inversion and other heuristics.The resource allocation optimization based on PSO strategy allows the regulation of the transmitted power and the number of active OCPs in order to maximize the aggregate throughput of the OCDM/WDM networks considering QoS and energy efficiency constraint.For the network optimization context, system model was described, figures of merit were presented and a suitable model of PSO was developed, with emphasis in the optimization of input parameters and network performance.Afterward, extensive numerical results for the optimization problem are discussed taking into account realistic networks operation scenarios.
In order determine the suitable values for the PSO input parameters, such as acceleration coefficients, C 1 and C 2 , maximal velocity factor, V max , weight inertia, ω, and population size, P, simulation experiments were carried out in regarding the power optimization problem for OCDM/WDM networks.In these networks, the number of simultaneous transmitted OCPs is low, generally around or less than 10.For our specific problem, the optimized input parameters are different from the reported in the literature for similar problems.The numerical results considering the number of spans have revealed the viability of the PSO algorithm deployment in order to solve a power allocation in OCPs with until 6 spans to guarantee the solution quality and convergence.This result is adequate considering the average of 4 spans without electronic regeneration presented for this kind of network.Besides, the numerical results have shown a penalty when the ASE, GVD and PMD effects are considered.This penalty represents the received power reduction due to temporal spreading.Indeed, when ASE, GVD and PMD effects are considered there is a power penalty of 3 decades compared with the situation where only ASE is considered (fibers with low PMD).Finally, our numerical results reveal considerable variation of transmitted energy for different levels of convergence rate of PSO algorithm, in which the maximum energy efficiency is reached when the convergence of PSO algorithm is total.Interesting, even with only 10%-20% of the total PSO convergence, the network is able to operate within a remarkable energy efficiency gain region compared to network operation without power allocation policy.

Figure 4 . 2 Figure 5 .
Figure 4. Normalized mean squared error (NMSE) for different values for C 1 combining with C 2 = 2 in a system with number of OCPs equal to 7, considering 1 span.

Figure 7 .
Figure 7. NMSE for the number of spans for 7 OCPs.

Figure 8 .
Figure 8. Rate of convergence versus the number of iterations for 1 until 6 spans for (a) 4 OCPs and (b) 8 OCPs.

Fig. 8 (
Fig.8(a) and (b) shows the convergence rate of the sum of power for vector evolution through the 800 iterations for 4 a 8 OCPs, respectively, considering 1 until 6 spans.The results have shown that increasing span number results in a faster convergence.This fact occurs because until 6 spans the increase of the number of span increases the contribution of

Figure 10 .
Figure 10.Energy per bit sum of the OCPs as a function of the rate of convergence using PSO algorithm.Three different SNIRs target of 17, 20 and 22 dB; a) 4 OCPs and b) 8 OCPs.

Table 1
shows the optimization aspects of QoS regarding different levels of SNIR considering sum power and NMSE for 4 and 8 OCPs with 1 span.

Table 1 .
The optimization aspects of QoS.

Table 2 .
Sum energy per bit in[pJ]for SNIR target of 20 dB.