## 2 Principles of the Proposed Method
### OSNR Monitoring Based on the IBPSO-Based DNN Trained with AHs
#### 2.2.1 Principle of Particle Swarm Optimization (PSO)  
The basic idea of PSO is that the potential solution of each optimization problem is a particle in the search space. All particles have a fitness value determined by the function of optimization. Each  
Figure 4: Block diagram of deep neural network.  
Figure 3: Constellation diagrams and amplitude histograms with Fourier fitting at three different OSNRs for PM-NRZ-16 QAM signals.  
particle has a velocity vector to determine the direction and distance of their movement, and then the particles follow the search of the current optimal particle in the solution space. The PSO algorithm is initialized as a group of random particles, and then the optimal solution is found by iteration. The particle updates itself by tracking two extremes values in each iteration. The first extreme value is the best solution found by the particle itself until the current moment, which is called individual best value. The other is the best solution found by the whole population until the current moment, which is called the global best value.  
Suppose that in a D-dimensional target search space, there are \(n\) particles forming a population \(X=(X_{1},X_{2},\cdots,X_{n})\), where the ith particle is expressed as a D-dimensional vector \(x_{i}=(x_{i1},x_{i2},\cdots,x_{iD})\), representing the position in the D-dimensional search space of the \(i\)th particle, and also representing a potential solution of the problem. According to the objective function, the fitness value corresponding to each particle position \(x_{i}\) can be calculated. The velocity of the \(i\)th particle is \(v_{i}=(v_{i1},v_{i2},\cdots,v_{iD})\), its previous best position in the history of each particle is \(p_{i}=(p_{i1},p_{i2},\cdots,p_{iD})\), and the best position associated with the best particle in the population is \(p_{g}=(v_{g1},v_{g2},\cdots,v_{gD})\). During the evolutionary process, the best previous position of a particle is recorded as the personal best _pbest_ and the best position obtained by the population thus far is called _gbest_.  
In each iteration, the particle updates its velocity and position through individual and global extremum. The updating formula is as follows:  
\[v_{id}(t+1)=\omega\cdot v_{id}(t)+c_{1}\cdot rand()\cdot(p_{id}-x_{id}(t))+c_ {2}\cdot rand()\cdot(p_{gd}-x_{id}(t)) \tag{1}\]  
\[x_{id}(t+1)=x_{id}(t)+v_{id}(t+1) \tag{2}\]  
where, \(\omega\) is inertia weight, \(i=1,2,\cdots,n\), \(d=1,2,\cdots,D\), \(t\) is the current iteration number. The learning factor \(c_{1}\) and \(c_{2}\) are non-negative constants. These two constants enable the particles to self-summarize and learn from the excellent individuals in the group, thus, approaching their own historical optimum and the global optimum within the group or in the field. \(rand()\) is a random function evaluated in the range [0,1]. The first part expresses the influence of historical inertia on the present, the second part shows the recognition and reflection of particles on themselves, and the third part expresses the learning, comparison, and imitation of particles on the whole population. \(v_{id}\in[-v_{\max},v_{\max}]\) is the current velocity of the ith particle, and \(v_{\max}\) is a non-negative number, that is, after the implementation of the velocity update formula, there are:  
\[\begin{array}{l}\mbox{ {if }}v_{id}<-v_{\max},\mbox{ {then }}v_{id}=-v_{\max}\\ \mbox{ {if }}v_{id}>-v_{\max},\mbox{ {then }}v_{id}=v_{\max}\end{array} \tag{3}\]