# Optimal Control of an Ultraviolet Water Disinfection System
## 5 Discussion
### Study of Optimal Solutions  
Section 4 shows the development of a metaheuristic-based algorithm to solve the bi-criteria OP (UV-OCP1) stated in Section 3. We recall the practical statement of the UV-OCP1: the proposed algorithm has to yield the values \(I_{0}\) and \(Q_{0}\) that meet the performance index (16), with \(A_{0}\) being the imposed bacterial abatement. That is, algorithm HTPSO_UV1 has to minimize the objective function (17) that aggregates both disinfection and energy criteria.  
Using the script \"Study1.m\", the implemented algorithm \"HTPSO_UV1.m\" was executed for different values \(A_{0}\) (see Appendix D). First, we set the reference domain of parameter \(A_{0}\), which for our study is:  
\[A_{0}\in[2.5,\ 4.1]. \tag{24}\]  
The values characterizing the optimal solutions were stored and are represented in Figure 6. We recall that the energy consumption necessary to provide the UV dose is proportional to \(D(I_{0},Q_{0},t_{\beta})\). The first term of the objective function (17) corresponds to the UV dose and is represented in Figure 6 by the black curve. In this work, the parameter \(\alpha\) from Equation (17) is set as \(\alpha\ =\ 100\) after calibration tests. For each value \(A_{0}\), an optimal solution is represented through four points corresponding to \(I_{0}\), \(Q_{0}\), \(D(I_{0},Q_{0},t)\), and \(J(I_{0},\ Q_{0})\). These points generate the four curves depicted in Figure 6.  
The objective of our study is to answer the following questions:  
1. Is there an optimal solution for any given \(A_{0}\)?
2. To what extent is the disinfection criterion met?
3. To what extent is the energy criterion met?  
Figure 6: Optimal solutions as functions of \(A_{0}\).  
Questions #2 and #3 make sense because the objective function (17) aggregates both criteria.  
We can remark that there is a unique optimal solution for every value \(A_{0}\) of the reference domain (see (24)).  
Let us note that the red and black curves from Figure 6 define two functions of argument \(A_{0}\).  
The performance index minimizes the sum of both terms of Equation (17) and is described by the red curve. Figure 6 shows that the red curve is slightly shifted up on purpose, such that the black curve can be distinctly seen. In fact, the two curves are identical, and the energy term is equal to the performance index. Therefore, it holds that:  
\[\alpha\cdot\left|A(I_{0},Q_{0},t_{f})\ -\ A_{0}\right|\ =\ 0. \tag{25}\]  
We can now answer question #2: The optimal bacterial abatement always reaches the reference value A\({}_{0}\).  
Considering the structure of the objective function, we can answer question #3: our algorithm searches for the solution \((I_{0},Q_{0})\), which minimizes the energy consumption on the condition that the constraint (25) is met.  
The analysis of the four curves of Figure 6 shows us the particular placement of each optimal solution; the point \((I_{0},Q_{0})\) is placed on the boundary of the searching domain SD (see (22)) as below:  
* if \(A_{0}\in[2.5,\ 3]\), then \(Q_{0}=0.8\) L/s and \(8.5\leq I_{0}\leq 10\) mW/cm\({}^{2}\);
* if \(A_{0}\in[3,\ 4.1]\), then \(I_{0}=10\) mW/cm\({}^{2}\) and \(0.3\leq Q_{0}\leq 0.8\) L/s;  
In other words, the optimal solutions are placed on two sides of the rectangle SD.