3.1. Overview
The finding of a solution of 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 Eberhart and Kennedy in 1995 [
16], inspired by the social behaviour of bird flocking or fish schooling. The particle swarm optimization concept consists in 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,
. During the generation of the swarm all these values are randomly assigned in such a way to cover the variables domain as it is defined in the initial problem setup. In fact, all the individuals try to find the problem’s solution searching inside the associated domain and their boundaries, using a performance index as main indicator. This latter is usually called 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 a 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. This latter 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 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 dynamic way depending from the number of concluded iterations without significant optimization. In both cases the user obtain the final solution that should also be the optimal one in that domain.
The theory behind the PSO, as for all the others heuristic techniques, excludes that the solution obtained could be effectively the optimal one in absolute sense [
21]. This situation could be relevant if this technique is used in a scientific field admitting high number of "local optima", such as astrodynamics. Unfortunately, the OHC model seems to be very similar to this situation because of the high number of variables and equations and their strong non-linearity. So, it is reasonable to start the optimization process many times, to overcome, or at least mitigate, the possibility that the result is not the real best solution, in absolute sense. Also for this reason, in the last years, PSO has been updated with many variants and advancements [
22,
23,
24,
25] in order to enhance the research capability and/or faster convergence.
3.2. PSO General Model
As aforementioned, the solution of the equation’s system has to be searched in a certain domain. The constrains are set to the ten independent variables i.e., neutral and plasma densities in the orifice and the emitter (
), the electron and wall temperatures (
), the emission length (
) and the plasma potential (
). In fact, by analysing Equations
1, it is simple to verify that the keeper plasma unknowns (
) depend on the plasma density and the electron temperature of the orifice. Moreover the keeper wall temperature (
) is set constant to typical value. The ten parameters govern the entire problem and therefore represent the 10-dimensional exploration domain of the PSO method. The boundaries of the exploration domain (min and max) for each variable can be arbitrarily defined; clearly, reasonable values must be used to foster the research and do not waste computational effort in regions representing non-physical operative conditions. Thus, a good way to proceed is to use values in agreement with the typical value reported for cathodes, well characterized in open literature.
Once the domain has been defined it is necessary to initialize the swarm assigning an initial state and velocity for each individual. Between the ten variables defined above, some of those, such the electronic temperature
, have a range with a minimum and maximum in the same order of magnitude, and the value of the specific variable can be assigned with a simple random approach as in
19. Other variables, instead, are defined in a range with an order of magnitude much greater than one, such as neutral density
, that spans from
up to
. For this second type of variable, a different equation for the state generation is required (
20). Indeed, if the equation
19 were used for these variables, an in-homogeneous swarm distribution would be obtained, with a greater concentration near the upper boundary. This undesirable condition is overcome thanks to the equation
20. Using the notation of
and
, respectively, for the minimum and maximum of a general variable
X of the state vector
of the problem, the two different expressions can be considered:
with
and
with
. Here
is a random operator that randomly assumes values between 0 and 1.
The wider order of magnitude of certain variables is irrelevant for the initial velocity definition as it is quickly updated during the first iterations. Hence, in a simple manner, it also defines the first velocity of each variable as follow:
At this point, after the swarm initialization, each individual, with its own state vector, represents a possible solution of the problem, hence it is processed in the numerical model, in order to solve the associated equations (plasma density, electronic temperature, etc...), and obtain the residuals
of that specific running setup. So, the cost function
J is evaluated, for each individual, as the sum of the residuals
,
where:
= RHS - LHS of the Equation
9b, (current)
= RHS - LHS of the Equation
9c (emitter power)
= RHS - LHS of the Equation
9a (emitter ions)
= RHS - LHS of the Equation
9d (emitter pressure)
= RHS - LHS of the Equation
2b (orifice power)
= RHS - LHS of the Equation
2a (orifice ions)
= RHS - LHS of the Equation
2c (orifice pressure)
where
is the cost function evaluated for the
individual at the
iteration. Furthermore, all the residuals, as defined above, have been divided to their reference variable (i.e., discharge current, power, and so on) in order to obtain dimensionless residuals with the same order of magnitude. This operation allows the optimization code to operate with different variables, but all with the same weight. Now, all these first cost functions
are assigned as the PB of each individual, so:
while the GB has to be selected as the one with minimum value in the entire swarm, hence:
With this latter step, the swarm initialization can be said concluded, and the real optimization process can start. So, to update the state of all the individuals, using the information coming from the exploration, and hence from the swarm, the new velocities can be calculated with the ultimate form:
where
z is the
individual and
q is the
iteration, C1-C2-C3 are constants in the range between 0 and 2,
X refers to the variable whose velocity is being calculated, and
is a random operator that assumes values between 0 and 1, as mentioned above.
Now, the individuals’ state can be updated with the velocity in order to start effectively the domain exploration:
This updated state is considered as a temporary state since it has to be checked with respect to the original domain as defined at the beginning of this section. In fact, it could happen that the updated state results to be out of the domain bounds because of its movement due to the applied velocity. In this case, the state is corrected assigning the boundary value that it was trying to violate during the update.
With the updated state, also the cost function can be updated in order to compare the values with the ones calculated at the iteration before
. If
results to be minor than the iteration before, for one or more individuals, than its own Personal Best would be updated and so:
The same happens for the Global Best, where its own value is compared with all the PB of the entire swarm. If at least one individual has found a better solution
, with respect to the GB of the iteration before
, also the Global Best would be updated, so:
This criterion is the fundamental of this optimization technique, since it allows to drive the individuals close to the promising region of the domain where better solutions are found. From this point ahead the cycle is continuously repeated until the stop criterion is satisfied.
3.3. PSO-Code Based Solver
It has been assessed that the developed PSO-code base solver can be used both to support the preliminary design of new hollow cathodes and for the rebuilding of plasma properties, if the electrical characteristics are known.
To design a new cathode, primarily the cathode geometry (i.e., insert, orifice and keeper diameters, orifice and keeper-orifice lengths), the propellant mass flow rate, the insert material and the current value have to be set. Secondly, a reasonable exploration domain must be defined. Then PSO-code can be run. It will give the evaluation of all the unknowns within a confidence bounds.
It has been verified (this become clear in the application example of
Section 4) that the trend of the emitter wall temperature as function of mass flow rate can be better reproduced if a target total discharge voltage
is defined, which is calculated as the ratio of the absorbed power to the discharge current
.
Thus it’s necessary to modify the formulation of the cost function
J since it has to consider a new parameter, i.e.,
, as in Equation
29. In fact, in this case, the optimization process has to minimize also the difference between the total voltage
and the target value
.
It is clear that this last approach can be used also for the rebuilding of plasma properties in an existing hollow cathode when the experimental electrical characteristics are known.