## 3 Evolutionary Techniques for Intelligent Sensor Systems Design
### Particle Swarm Optimization  
Particle swarm optimization (PSO) is a stochastic optimization based on Swarm Intelligence, which also is affiliated to evolutionary computation techniques. Similar to GA, PSO is a population-based search algorithm inspired by the behaviour of biological communities, that exhibit both individual and social behavior, such as fish schooling, bird flocking, swarm of bees, _etc._[24].  
In PSO, each solution is called a particle. Each particle has a current position in search space, \(\mathbf{x}_{i}^{t}=\left<x_{i,1}^{t},x_{i,2}^{t},\ldots,x_{i,d}^{t}\right>\), a current velocity, \(\mathbf{v}_{i}^{t}\), and a personal best position in search space, \(\mathbf{p}_{i}^{t}\). Particles move through the search space, remembering the best solution encountered. The fitness function is determined by an application-specific objective function. During each iteration, the velocity of each particle is adjusted based on its momentum and influenced by its local best solution \(\mathbf{p}_{i}^{t}\) and the global best solution of the whole swarm \(\mathbf{p}_{g}^{t}\). The particles then move to new positions, and the process is repeated for a prescribed number of iterations. The new velocities and positions in the search space are obtained by the following equations [42]:  
\[v_{i,  
The original PSO explained above is basically designed for real-values (floating-point) problems. Due to the variation in the representation of solution (e.g., binary or discrete and integer), a modification of updating position of particles is required. For a binary representation, the velocity is used to determine a probability threshold. If the velocity is higher, the values of particles are more likely to choose '1', and lower values favor the '0' choice. One of the functions accomplishing this feature is the sigmoid function [25]:  
\[s(v^{\prime+1}_{i,j})=\frac{1}{\left(1+e^{-v^{\prime+1}_{i,j}}\right)} \tag{6}\]  
Then a new position of particle is computed by the following equation:  
\[x^{\prime+1}_{i,j}\coloneqq\begin{cases}1&\text{if}\quad s(v^{\prime+1}_{i,j} )>\rho\\ 0&\text{if}\quad s(v^{\prime+1}_{i,j})\leq\rho\end{cases} \tag{7}\]  
where \(\rho\) is a random numbers from uniform distribution between 0 and 1.  
The adaptation approach of PSO for integer representations is based on the binary PSO, where a small modification in the scaling function is required. The outputs of the scaling function are symmetric about 0 and both negative and positive values to lead to high probabilities. The comparison of scaling function used for binary and integer representations is shown in Figure 14. The scaling function [49] is given by:  
\[si(v^{\prime+1}_{i,j})=\frac{2}{\left(1+e^{-\frac{1}{v^{\prime+1}_{i,j}}} \right)}-1 \tag{8}\]  
The new position of integer PSO is computed by the following equation:  
\[x^{\prime+1}_{i,j}=RandI(),\ \ \text{if}\quad rand()<si(v^{\prime+1}_{i,j}) \tag{9}\]  
where _RandI()_ is a random integer, _rand()_ is a random number from a uniform distribution. However, this approach is suitable for a small range of integer-valued problems and for cardinal attributes (e.g.,  
Figure 13: The general process of PSO.  
the compass points). For large ranges of integer-valued problems and ordinal attributes (e.g., 4 is more close to 5 than 30), the adaptation of particle is almost similar to real-value PSO. The difference in the integer PSO from real-valued PSO in equation (3) is that the velocity values are rounded to the nearest integer values. The updated particles are computed as follows:  
\[x_{i,j}^{t+1}=x_{i,j}^{t}+round\left(v_{i,j}^{t+1}\right) \tag{10}\]