# Solution of Orifice Hollow Cathode Plasma Model Equations by Means of Particle Swarm Optimization
## 3 Particle Swarm Optimization Methodology  
### Overview  
The finding of a solution to a so complex system of equations would have had to be carried out by resorting to a very high number of manual attempts until the correct combination was reached. It was therefore decided to solve the equations system using a heuristic optimizer such as the Particle Swarm Optimization (PSO) [19; 20; 21]. PSO is a population-based stochastic optimization technique developed by [PERSON] and [PERSON] in 1995 ([PERSON] and [PERSON], 1995), inspired by the social behaviour of bird flocking or fish schooling. The Particle Swarm Optimization concept consists of the generation of a swarm of individuals, each of them characterized by a proper set of variables' value, and hence, a unique state variable vector, \(\hat{X}\). During the generation of the swarm, all these values are randomly assigned in such a way as to cover the variable's domain as it is defined in the initial problem setup. In fact, all the individuals try to find the problem's solution by searching inside the associated domain and their boundaries, using a performance index as the main indicator. Thisatter is usually called the fitness index or cost function. So, once the domain has been defined, it is necessary to determine the structure of the cost function to optimize. In this regard, the cost function can be written as linear combination of target values and/or any constraints to be imposed. In this work, it is required that all the residuals, as defined in the following, are minimized. Now, deepening in the procedure, at the first iteration, after the swarm generation, the solver is applied to each individual in order to calculate the cost function that defines how much that solution would be good. The calculation of the cost function \(J\) is the starting point for the next iteration. In fact, to start the exploration of the variables' domain, all the individuals need a proper velocity. Thisatter is calculated as the sum of many different contributions linked to their Personal Best and the Global Best index. The Personal Best (PB) and the Global Best (GB) are, respectively, the best solutions found from a single individual and from the whole swarm in the exploration's history. To understand what is best, each individual in the swarm must remember the set of variables associated with the best cost function it has previously encountered. In this way, the information coming from the next iteration \(q+1\) can be compared with the previous one, q, and the exploration process is driven towards the most promising region of the domain. Another contribution to the velocity calculation comes from the velocity itself at the previous iteration. In fact, this term is also called Inertia. With the same criterion, the term due to the PB is called Nostalgia, and the other one, due to the GB, is called Social. The composition of these three terms defines the new velocity for the next iteration \(q+1\), as showed in Figure 2.  
So, the Personal Best and the Global Best of that iteration are used to update the individual velocity and hence their position (variables' set). These positions, in the respective domains, are the starting point for the next iteration. At each time step, the domain can be explored, iteration after iteration, changing the velocity of all the individuals and hence accelerating toward the updated Personal Best and Global Best. The cycle stops with the criteria selected by the user, at a fixed number of iterations, or in a dynamic way depending  
Figure 2: PSO: Schematic view of the velocity contributions. Full orange arrows are the single velocity contributions; the dotted orange arrows are the projections of the velocity terms that define the final velocity (blue/red arrow) and hencead the updated state \(X_{z}^{q+1}\). Circles represent figurative positions in the exploration domain. on the number of concluded iterations without significant optimization. In both cases, the user obtains the final solution that should also be the optimal one in that domain.