# Optimization of Electric Field Assisted Mining Process Applied to Rare Earths in Soils
## 2 Materials and Methods
### Electromining Process Optimization  
The optimization the EM process intends to extract the highest possible mass of \(Y^{3+}\), with the lowest density of dissipated electric current. This panorama is characterized as a multi-objective optimization problem. However, in this paper, the objective function to be minimized is given by the negative \(Y^{3+}\) extracted mass (\(-m_{Y}\)), considering the limit quantity for the average value of electric current density (\(I_{lim}\)). Thus, it is possible to formulate a constrained non-linear optimization problem, denoted as \(P_{Y}\), that can be written in a standard form [32], as  
\[P_{Y}:\left\{\begin{array}{l}\min-\ m_{Y}=-\ m_{Y}\big{(}\overline{C},\ \overline{\varepsilon}\big{)}\\ \text{constraints}:\left\{\begin{array}{l}I(\overline{C},\ \overline{ \varepsilon})=I_{m}\big{(}\overline{C},\ \overline{\varepsilon}\big{)}-\ I_{lim}\leq 0\\ -\ 1.0\leq\overline{\varepsilon}\leq 1.0\end{array}\right.\\ -\ 1.0\leq\overline{C}\leq 1.0\end{array}\right. \tag{3}\]  
where \(\overline{C}\) and \(\overline{\varepsilon}\) are, respectively, the design variables of the electric field and electrolyte concentration, as described in the coded form. Therefore, the design variables vector is \(\left\{\overline{C},\ \overline{\varepsilon}\right\}^{T}\in\ \text{D}\), where \(\text{D}=[-1.0,\ 1.0]^{2}\ \subset\ \Re^{2}\) is the design space of the problem.  
The extracted \(Y^{3+}\) mass (\(m_{Y}\)) and average electric current density (\(I_{m}\)) functions are defined by two response surfaces, based on the values obtained experimentally. These surfaces are obtained by a polynomial fit of a bilinear empiric model, employing the least squares method.  
It is important to perform an analysis of the proposed optimization problem \(P_{Y}\) (Equation (3)). As the objective function and inequality constraint are obtained by response surfaces, it is possible to state that these functions are continuous. Furthermore, the design space is closed, thus establishing an adequate value of the limit electric current density, that guarantees a non-empty viable set; considering the Weierstrass theorem, it is possible to state that this problem has a solution [32].  
An alternative for the \(P_{Y}\) solution is to use nonlinear programming techniques (NLP) [32]. It is noted that the design space of the problem is convex, as it is defined by a square region of dimension two. This characteristic favors the numeric solution of the problem. However, in general, it is not possible to guarantee that the objective and constraint functions are also convex. These properties could be satisfied if the Hessian matrices of the two evaluated functions were positive-definite in all points of the design space. If these conditions are not satisfied, the problem is not convex and the direct application of NLP is not advised, as the obtained solution depends on the optimal point initial estimative to be used in the interactive search process.  
To overcome this difficulty, a viable alternative is to use heuristic optimization techniques [32; 33; 34]. In this paper, a hybrid optimization methodology proposed by [PERSON] et al. [33] as used. For this, initially, the problem was solved applying the genetic algorithm technique to obtain an approximation of the global optimal point, regardless of the non-convexity of the problem. Afterwards, a sequential quadratic programming NLP was used to refine the solution. Both methods use specific routines of the Matlab(r) software (ga.m and fmincon.m).