FBG Optimization Using Spline Encoded Evolution Strategy

This paper presents an encoding scheme adapted for Fiber Bragg Grating (FBG) optimization using metaheuristics. The proposed encoding scheme uses spline approximations in order to build softened refractive index profiles from few encoded parameters. This approach is suitable for Fiber Bragg Grating (FBG) synthesis because it ensures both the reduction of the problem dimensionality and the respect of important restrictions associated to the FBG manufacture. Simulations are shown where an ES using the spline encoding was able to converge faster and produce more interesting filters, when compared with conventional encoding schemes. Index Terms — FBG, Evolution Strategies, spline, chromosome, encoding.


I. INTRODUCTION
Fiber Bragg Gratings (FBGs) are flexible components.By adjusting the parameters that describes their refractive index profile, it is possible to obtain filters showing reflectance spectrum adapted to almost any type of application.Unfortunately, this procedure (FBG synthesis) is not a trivial problem and several techniques have been proposed with some degree of success.
For example, if only weak gratings are considered, the refractive index profile can be obtained from the Fourier Transform of the reflection coefficient.This was the approach used by Winick and Roman [1] with interesting but inaccurate results.On the other hand, other techniques like these based on Layer Peeling (LP) [2] [3] are capable of very accurate solutions in terms of reflectance spectrum, but have as side effect the generation of large and complex refractive index profiles that are difficult to built using Ultra Violet (UV) mask manufacture techniques [4].In order to attend all restrictions associated to the FBG manufacture, Askanes et al [5] proposed a hybrid method that combines classical optimization techniques and the LP algorithm.
Other interesting design alternatives are those based on Evolutionary Algorithms (EA).Genetic Algorithm (GA) [6] and Particle Swarm Optimization (PSO) [7] allow achieving satisfactory results even under heavy restrictions imposed by the manufacture process.For example, in [8], a pioneer article about the use of GAs for FBG synthesis, feasible Wavelength Division Multiplexing (WDM) filters with negligible dispersion are obtained.In [9], the FBG synthesis is performed using the Covariance Matrix Adapted Evolution Strategy (CMAES) with relative great success.Similar results are achieved in [10] using PSO.In [11], a GA is applied in the synthesis of Triangular FBGs (TFBGs).In [12], the TFBG synthesis is performed again, but using the CMAES.
Although literature shows that metaheuristics can be used to synthesize FBGs, they suffer because of the high number of parameters needed to represent a FBG properly.Using the modeling based on uniform sections presented in [13], an apodized FBG one centimeter long could be well represented by about one hundred uniform sections, each one modeled by four parameters.Even considering a single parameter by section, about one hundred in total must be used to represent the entire FBG.This high dimensionality can make the metaheuristic optimization scheme not practical.Frequently in the literature a FBG is designed using a reduced number of uniform sections.For example, in [10], only 20 sections are considered.The use of a reduced number of sections can generate mismatches large enough to work like mirrors inside the FBG, which can create several cavities along the grating.In this case the reflectance spectrum can result noisy and full of undesired lobes, affecting the metaheuristic convergence.
Therefore, it is interesting to produce softened refractive index profiles and find a way to do that using as few parameters as possible.Fortunately, according to the information theory, softened signal formats shall carry naturally less information and, consequently, it is possible to use less parameter to encode them.This article explores the use of spline approximations to create softened profiles from few points stored in ES individuals (chromosomes) [14]- [16].Section II presents the basic FBG model.Section III presents the usual way to encode a FBG and the proposed spline encodings.
Section IV presents the ES algorithm.Section V compares the performance of several encoding schemes through computer simulations.Finally, Section VI presents the conclusions.

II. FBG MODEL
Following the matrix formulation from [13], the refractive index profile is given in function of the axial distance z: where n eff is the effective refractive index, δn the modulation parameter and λ B is Bragg wavelength.
Using the coupled mode theory, it is possible to calculate a 2x2 matrix F that represents a uniform section of length ∆z: where R(z) and S(z) stand for the field amplitude functions of the propagating and back propagating modes respectively.Hence, R(0) and S(0) represent the field amplitudes before the section at z = 0 and, at z = ∆z, R(∆z) and S(∆z) represent the field amplitudes after the section.The transfer matrix F is calculated in function of δn, λ B , ∆z, and n eff , all of them considered constant along the section.Indeed, in this work, n eff will be considered always constant for the entire grating.
A non uniform Bragg Grating can be modeled as a sequence of M uniform short gratings (uniform sections).Let F k be the transfer matrix of the k-th section, where k = 0 for the first section at z = 0.
The total transfer matrix for the apodized grating of length L = M × ∆z can be obtained by multiplying all its M section matrices: Now (2) can be rewritten in function of the total matrix F T : where R(L) and S(L) represent respectively the field amplitudes of the propagating and back propagating modes at z = L.
The FBG reflectance is given in function of F T elements by: An apodized FBG can be represented in a vector form like ( δn 0 , , which is also a natural way to represent a FBG as an individual in metaheuristics.In practical terms, not all parameters should be present in the vector because they could be constant or known for the entire grating.For example, the representation in the format ( δn 0 , δn 1 , …, δn k-1 , δn k , δn k+1 , …, δn M-2 , δn M-1 ) was essentially the way chosen in [12] to represent individuals in the CMAES.

III. ENCODING STRATEGIES Let us consider to be enough to represent ES individuals as
, where y k could be any parameter among δn k , λ B k or ∆z k .This encoding scheme will be referred here as direct encoding (DE), where the number of search space dimensions is equal to M, the same number of uniform sections.Satisfactory FBG representations make use of at least 20 sections for a centimeter long grating [10]- [12].
An interesting way to reduce the number of dimensions is through some sort of indirect encoding, where the individuals store few parameters in a vector form like X = ( x m-1 ) with m < M. Any y k can be calculated from X using linear interpolation: where And j = floor(d k ), with the function floor( ) returning the closest integer below the argument.The encoding scheme given by ( 6) and ( 7) will be referred as linear encoding or LE.
Another approach is to replace the linear interpolation by a spline approximation.This paper explores quadratic and cubic splines [16].For the quadratic spline encoding (QSE), y k can be calculated from X by ] [ (1 ) 0.5] , otherwise where d k is given by ( 7), j = round(d k ) and t = d kj + ½.The function round( ) returns the nearest integer from the argument.
For the cubic spline encoding (CSE), the relationship between y k and X is given by: (1 ) 3 (1 ) 3 ( 1) where d k is given by ( 7), j = trunc(d k ) and t = d kj.The parameters A, B, C and D are given respectively by: , otherwise , otherwise ( ) otherwise ( ) , 3 , otherwise For m < 3 the cubic spline approximation shall be replaced by linear interpolation and y k shall be calculated using ( 6) and (7).The adapted version of ES used in this article should be better defined as a (S A , S B ) -ES, where S A and S B are respectively the sizes of parent and child populations [19].The algorithm is shown in Fig.  intermediate crossover and Gaussian mutation.r in line 9 represents a uniform random value between 0 and 1.In this same line the function Aga( ) returns the crossover probability based on A 1 rank, using Adaptive Genetic Algorithm (AGA) procedure defined in [20].Thus, the intermediate crossover operator is optionally applied in line 11 using A 1 and A 2 (A 2 ≠ A 1 ) as parents.In line 12 the Aga( ) function is used again in order to feed Gaussian mutation with its standard deviation [18].In the line where N represents the number of samples used to build the reflectance curve and R i is calculated using (5).Since the fitness function is an error value, the ES of Fig. 2 minimizes f.
The Aga( ) function used in lines 9 and 12 can be defined as rank( ) , rank( ) Aga( , ) , otherwise where rank(A) returns the rank of the A individual inside population A (it returns zero for the best and (S A -1) for the worst), h is the rank of the individual whose fitness value is closest to the average, α is the control parameter.Aga( ) returns zero for the best ranked individual in the population and α for the worst.

V. SIMULATIONS
In order to validate the proposed encoding schemes, the ES defined in the previous section was applied using direct encoding, LE, QSE and CSE.All following results were obtained using S A = 10, S B =40, mutation deviation and crossover probability given by AGA using α equals to 0.01 and 1.0 respectively.The maximum number of generations of 10000 was used as stop criteria.
Two projects were used to compare the proposed techniques.The first one was a FBG centered in 1.55µm and the second was a TFBG from 1.5495µm to 1.5505µm.The target curves of both are shown in Fig. 3.Note that the target curve for the FBG is not continuous.The interval from 1.5498µm to 1.5502µm has two gaps of 0.05nm left and right.They offer accommodation space for reflectance curves once abrupt targets are very difficult to fit.
The fitness in all simulations was calculated using (14) with number of samples N set to 100.
Samples are spaced uniformly in terms of wavelength inside the target region.If one sample drops inside a gap in the FBG target, it is not considered in the sum of (14).In all simulations the number of uniform sections used was 50 (M = 50).
For each project and for each encoding, the ES was tested 20 times with different random initial populations.Furthermore, the computational time spent in interpolations and spline approximations were negligible next the processing time spent in fitness calculations.
Table I shows performance parameters: the best final fitness found in all 20 runs, worst fitness found, the mean fitness and the standard deviation.It also shows the convergence number, i.e., the average number of generations necessary to grant fitness value with an error of 0.1% in comparison to the last fitness value.

B. TFBG project
For the TFBG project, all sections used ∆z = 400µm and linear chirp defined by the variation of λ B in function of k.As stated in [12], the linear chirp is necessary in order to achieve the desired bandwidth of 1nm.However, differently from [12], where the linear chirp was fixed, here it was  for all encodings.Fig. 9 shows the average evolution of the fitness value in function of generation number for ES using direct encoding, LE, QSE and CSE.Table II shows some performance parameters for TFBG project.As observed in the FBG project, the DE resulted again the best among all encoding schemes in terms of fitness function.The DE superiority is not so obvious in terms of reflectance as one can see in Fig. 8.As expected, the optimization process using DE spends more generations to converge.However the difference between DE and indirect encodings is not so deep as observed in the FBG project.Quadratic spline encoding (QSE) should always be considered in detriment of cubic encoding (CSE) because it is simpler, has comparable performance and give better results.
However, spline encodings are not free of issues.If the search space is too much simplified, the possible solutions can lose its flexibility.As result, the direct encoding overcame the indirect encoding schemes.Nevertheless the results from spline schemes are more attractive due its simpler profiles.An interesting possibility to conciliate performance and flexibility would be to use spline encoding to achieve an initial solution for further application of a direct encoded meta-heuristic or another suitable optimization technique.
The definition of m parameter in indirect encodings was accomplished based on a trial and error procedure.A better way to do that could be through a progressive spline encoding scheme where the number of parameters m would be increased gradually whenever the population diversity drops below a threshold.This technique would require the insertion of new random parameters in individuals in the middle of optimization process, probably in a very similar way as performed in [21].

Fig. 1 .
Fig. 1. δn k profiles calculated using LE, QSE and CSE for M = 200, obtained from a test curve with m = 9.

2 .
It starts creating two populations, A and B, to store respectively S A and S B individuals.Inside the generation loop (line 5), each individual of B is replaced by a new one made by the application of the 14 all individuals of population A are replaced by the S A best individuals copied from B. The iteration is complete after the elitist procedure from 15 to 18.Note in the line 18 the individual A best being inserted in A, what set the population size temporally to S A + 1 until A be reset in line 14 in the next generation.The fitness calculations in lines 3 and 13 are based on the sum of squared errors between a target curve and the FBG reflectance spectrum.Let R i be the i-th reflectance value calculated for wavelength λ i and T i be the respective target value.The fitness value f for each individual can

Fig. 5
Fig. 5 shows the average evolution of fitness in function of generation number for ES using DE, QSE and CSE.Direct encoding has poor performance since spends more generations to reach convergence.This behavior was expected because here DE dealt with 10 times more dimensions in search space than indirect encodings.The number of generations can be used safely as performance measurement parameter because the fitness function is called exactly 40 times each generation.

Fig. 6 .
Fig. 6.Average curves of fitness value in function of generation number for QSE, CSE and DE.

Fig. 7 compares
Fig. 7 compares δn profiles and reflectance spectra of best ranked FBGs synthesized using LE, QSE and CSE schemes for the TFBG project.Fig. 8 compares only the results obtained by using QSE and DE encodings.As observed in the Bragg reflector project, the linear interpolation brings the worst results among all studied indirect encoding schemes.QSE and CSE are very similar to each other in terms of reflectance but inverted in terms of profile.Indeed, the chirp obtained for DE, LE, QSE and CSE were respectively 1.1536nm/cm, 1.4206nm/cm, 1.4254nm/cm and −1.4188nm/cm.The CSE minus signal indicates a decreasing λ B k toward the last section of the FBG.Since no restrictions were imposed concerning the inclination of λ B k curves, negative and positive values were obtained evenly

Fig. 9 .
Fig. 9. Average curves of fitness value in function of generation number for DE, LE, QSE and CSE.

TABLE II .
TFBG PERFORMANCE PARAMETERSSpline encodings combined to a modified evolutionary strategy have been successfully applied in the FBG synthesis.Two projects have been considered and comparisons involving quadratic and cubic spline encodings, direct encoding, and linear encoding have been provided.It has been shown that spline schemes are able to reduce the number of dimensions and generate attractive softened refractive index profiles.