# Machine Learning Models Applied to Manage the Operation of a Simple SWRO Desalination Plant and Its Application in Marine Vessels

^{1}

^{2}

^{*}

## Abstract

**:**

^{3}per day. The input variables to the system were seawater pH, seawater conductivity, and three requirements: permeate flow rate, permeate conductivity, and total energy consumed by the desalination plant. These requirements were decided based on a cost function that prioritizes the water needs in a vessel and the maximum possible energy savings. The intelligent system modifies the actuators of the plant: feed flow rate control and high-pressure pump (HPP) operating pressure. This tool is proposed for the optimal use of desalination plants in marine vessels. Although both machine learning techniques output satisfactory results, it was concluded that the DTs technique (HPP pressure: root mean square error (RMSE) = 0.0104; feed flow rate: RMSE = 0.0196) is more accurate than SVMs (HPP pressure: RMSE = 0.0918; feed flow rate: RMSE = 0.0198) based on the metrics used. The final objective of the paper is to extrapolate the implementation of this smart system to other shipboard desalination plants and optimize their performance.

## 1. Introduction

^{3}per berth [4]. Another study says that the average consumption of drinking water on cruise ships is more than 984 m

^{3}per day [1]. As can be seen, this depends on the number of passengers, size of the ship, etc. Therefore, this research is a useful tool to improve the control systems of desalination plants and save as much energy as possible.

## 2. Materials and Methods

#### 2.1. Description of the Equipment and Data Collection

^{3}/day. It is an industrial plant designed by the Canary Islands Institute of Technology (ITC) to be used in R&D projects within the DESAL + LIVING LAB platform. The plant is inside a 20 ft shipping container (Figure 1), which makes it enormously versatile in terms of its transport to warranty that could be moved to different locations for being fed with different seawater conditions. In terms of design and operationality, this plant should be similar to one on-board SWRO plant except for the high level of sensors installed and the possibility to move the nominal operation point, according to its research purposes. Some of its main characteristics are shown in Table 1.

#### 2.2. Table of Optimal Values and Application of Machine Learning Techniques

- First requirement: the amount of water produced in 24 h (based on the need of a marine vessel). The amount of water produced was obtained from the permeate flow rate. For the authors, one of the main concerns was the amount of water available to the crew on a marine vessel.
- Second requirement: permeate conductivity. In this case, an affordable maximum was established, although this limit may vary for another case study. The maximum limit chosen was lower than the values recommended by the WHO’s GDWQ. Therefore, this water could be used for the consumption of the crew. If water was needed for other uses, this limit could be extended.
- Third requirement: total energy consumption of the plant. This was considered one of the most important aspects of this study and was focused on obtaining the maximum energy savings possible on the marine vessel.

- Daily amount of permeate water: 20%;
- Permeate conductivity: 30%;
- Total energy consumption of the plant: 50%.

- Support vector machines (regression), also known as support vector regression.
- Decision trees (regression), also known as regression trees.

## 3. Results and Discussion

^{2}) [32].

^{2}values obtained were satisfactory. The least accurate result obtained was for module 3B.

^{−13}Bar for the HPP operating pressure, 1.27 × 10

^{−13}m

^{3}for the amount of water, 6.82 × 10

^{−13}µS/cm for permeate conductivity. That is, all errors are practically zero in the worst case. On the other hand, the worst-case errors are 0.67999 m

^{3}/h for feed flow and 0.00113 kWh for total energy consumption. These errors are acceptable since they are small values compared to the global values taken by these variables. These data show the goodness of the methods used.

^{3}of water per day, a maximum conductivity of 600 µS/cm, and maximum energy consumption of the desalination plant of 9 kWh. For these initial data, the system was trained, and the results obtained were within the estimated parameters, so the results obtained were satisfactory.

## 4. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Krile, S. Fresh Water Supply from Different Sources in the Shipping. Procedia Eng.
**2016**, 149, 190–196. [Google Scholar] [CrossRef] [Green Version] - World Health Organization. Guidelines for Drinking-Water Quality, 4th ed.; Incorporating the First Addendum; World Health Organization: Geneva, Switzerland, 2017. [Google Scholar]
- World Health Organization. A Global Overview of National Regulations and Standards for Drinking-Water Quality; World Health Organization: Geneva, Switzerland, 2018. [Google Scholar]
- Garcia, C.; Mestre-Runge, C.; Morán-Tejeda, E.; Lorenzo-Lacruz, J.; Tirado, D. Impact of Cruise Activity on Freshwater Use in the Port of Palma (Mallorca, Spain). Water
**2020**, 12, 1088. [Google Scholar] [CrossRef] - Macharia, P.; Kreuzinger, N.; Kitaka, N. Applying the Water-Energy Nexus for Water Supply—A Diagnostic Review on Energy Use for Water Provision in Africa. Water
**2020**, 12, 2560. [Google Scholar] [CrossRef] - Shammi, M.; Mostafizur, M. (Eds.) Desalination technologies and potential mathematical modeling for sustainable water–energy nexus. In Water Engineering Modeling and Mathematic Tools, 1st ed.; Elsevier: Amsterdam, The Netherlands, 2021; pp. 251–269. [Google Scholar]
- Balcombe, P.; Brierley, J.; Lewis, C.; Skatvedt, L.; Speirs, J.; Hawkes, A.; Staffell, I. How to decarbonise international shipping: Options for fuels, technologies. Energy Convers. Manag.
**2019**, 182, 72–88. [Google Scholar] [CrossRef] - Padrón, I.; Avila, D.; Marichal, G.N.; Rodríguez, J.A. Assessment of Hybrid Renewable Energy Systems to supplied energy to Autonomous Desalination Systems in two islands of the Canary Archipelago. Renew. Sustain. Energy Rev.
**2019**, 101, 221–230. [Google Scholar] [CrossRef] - Mitchell, T. Machine Learning; McGraw Hill: New York, NY, USA, 1997. [Google Scholar]
- Chen, C. Fuzzy Logic and Neural Network Handbook; McGraw Hill: New York, NY, USA, 1996. [Google Scholar]
- Marichal, G.N.; Acosta, L.; Moreno, L.; Méndez, J.A.; Rodrigo, J.J.; Sigut, M. Obstacle avoidance for a mobile robot: A neuro-fuzzy approach. Fuzzy Sets Syst.
**2001**, 124, 171–179. [Google Scholar] [CrossRef] - Zhong, R.Y.; Xu, X.; Klotz, E.; Newman, S.T. Intelligent Manufacturing in the Context of Industry 4.0: A Review. Engineering
**2017**, 3, 616–630. [Google Scholar] [CrossRef] - Alshehri, M.; Kumar, M.; Bhardwaj, A.; Mishra, S.; Gyani, J. Deep Learning Based Approach to Classify Saline Particles in Sea Water. Water
**2021**, 13, 1251. [Google Scholar] [CrossRef] - Al Aani, S.; Bonny, T.; Hasan, S.W.; Hilal, N. Can machine language and artificial intelligence revolutionize process automation for water treatment and desalination? Desalination
**2019**, 458, 84–96. [Google Scholar] [CrossRef] - Pohl, R.; Kaltschmitt, M.; Holländer, R. Investigation of different operational strategies for the variable operation of a simple reverse osmosis unit. Desalination
**2009**, 249, 1280–1287. [Google Scholar] [CrossRef] - El-Hawary, M.E. Artificial neural networks and possible applications to desalination. Desalination
**1993**, 92, 125–147. [Google Scholar] [CrossRef] - Murthy, Z.V.P.; Vora, M.M. Prediction of reverse osmosis performance using artificial neural network. Indian J. Chem. Technol.
**2004**, 11, 108–115. [Google Scholar] - Abbas, A.; Al-Bastaki, N. Modeling of an RO water desalination unit using neural networks. Chem. Eng. J.
**2005**, 114, 139–143. [Google Scholar] [CrossRef] - Aish, A.M.; Zaqoot, H.A.; Abdeljawad, S.M. Artificial neural network approach for predicting reverse osmosis desalination plants performance in the Gaza Strip. Desalination
**2015**, 367, 240–247. [Google Scholar] [CrossRef] - Azad, A.; Aghaei, E.; Jalali, A.; Ahmadi, P. Multi-objective optimization of a solar chimney for power generation and water desalination using neural network. Energy Convers. Manag.
**2021**, 238, 114152. [Google Scholar] [CrossRef] - Sadi, M.; Fakharian, H.; Ganji, H.; Kakavand, M. Evolving artificial intelligence techniques to model the hydrate-based desalination process of produced water. J. Water Reuse Desalination
**2019**, 9, 372–384. [Google Scholar] [CrossRef] - Cabrera, P.; Carta, J.A.; González, J.; Melián, G. Wind-driven SWRO desalination prototype with and without batteries: A performance simulation using machine learning methods. Desalination
**2018**, 435, 77–96. [Google Scholar] [CrossRef] - Pascual, X.; Gu, H.; Bartman, A.R.; Zhu, A.; Rahardianto, A.; Giralt, J.; Rallo, R.; Christofides, P.D.; Cohen, Y. Data-driven models of steady state and transient operations of spiral-wound RO plant. Desalination
**2013**, 316, 154–161. [Google Scholar] [CrossRef] - Al Dhaifallah, M.; Nisar, K.S. Wiener modeling and identification of a reverse osmosis desalination process using least square support vector machine. In Proceedings of the 2015 IEEE International Conference on Industrial Technology (ICIT), Seville, Spain, 7–19 March 2015. [Google Scholar]
- Cristianini, N.; Shawe-Taylor, J. An Introduction to Support Vector Machines and Other Kernel-Based Learning Methods; Cambridge University Press: Cambridge, UK, 2000. [Google Scholar]
- Vapnik, V.N. The Nature of Statistical Learning Theory; Springer: New York, NY, USA, 1995. [Google Scholar]
- Betancourt, G.A. Las máquinas de soporte vectorial (SVMs). Sci. Tech.
**2005**, 1, 27. [Google Scholar] - Burges, C.J.C. A tutorial on Support Vector Machines for pattern recognition. Data Min. Knowl. Discov.
**1998**, 2, 121–167. [Google Scholar] [CrossRef] - Ali, J.; Khan, R.; Ahmad, N.; Maqsood, I. Random Forests and Decision Trees. Int. J. Comput. Sci. Issues
**2012**, 9, 272–278. [Google Scholar] - Duda, R.O.; Hart, P.E.; Stork, D.G. Pattern Classification; John Wiley & Sons: Hoboken, NJ, USA, 2001. [Google Scholar]
- Hastie, T.; Tibshirani, R.; Friedman, J. The Elements of Statistical Learning, 2nd ed.; Springer: New York, NY, USA; Berlin/Heidelberg, Germany, 2008. [Google Scholar]
- Mathworks, Statistics and Machine Learning Toolbox User’s Guide (MATLAB). 2020. Available online: https://www.mathworks.com/help/pdf_doc/stats/stats.pdf (accessed on 5 December 2020).
- Willmott, C.J.; Matsuura, K. Advantages of the mean absolute error (MAE) over the root mean square error (RMSE) in assessing average model performance. Clim. Res.
**2005**, 30, 79–82. [Google Scholar] [CrossRef] - Willmott, C.J.; Matsuura, K.; Robeson, S.M. Ambiguities inherent in sums-of-squares-based error statistics. Atmos. Environ.
**2009**, 43, 749–752. [Google Scholar] [CrossRef] - Chai, T.; Draxler, R.R. Root mean square error (RMSE) or mean absolute error (MAE)?—Arguments against avoiding RMSE in the literatura. Geosci. Model Dev.
**2014**, 7, 1247–1250. [Google Scholar] [CrossRef] [Green Version]

**Figure 5.**(

**a**) Errors according to the RMSE metric in the system’s five modules; (

**b**) similar graph to the previous one, ignoring module 3B, to observe the error more clearly in the other modules.

**Figure 6.**Coefficients of determination of the modules. Note, as was identified in Table 5, that the correlation coefficients of the system modules had very satisfactory results.

Parameter | Unit Values/Characteristics |
---|---|

Production capacity | 80–100 m^{3}/day |

High-pressure pump operating pressure | 20.8–57 bar |

HPP maximum pressure | 57 bar |

HPP RPM nominal point | 600 |

Feed flow rate | 8.01–10.15 m^{3}/h |

Permeate flow rate | 3.09–4.15 m^{3}/h |

General energy consumption | 3.8–9 kWh |

Total specific energy consumption (Salino pressure center) | 2–2.5 kWh/m^{3} |

Type of membrane Permeate recovery rate | Hydranautics SWC4 MAX (Spiral wound) 34–43% |

Row Number | Seawater pH | Seawater Conductivity (mS/cm) | Feed Flow Rate (m^{3}/h) | HPP Outlet Pressure (Bar) | Permeate Conductivity (μS/cm) | Permeate Flow Rate (m^{3}/h) | Total Energy Consumption (kWh) |
---|---|---|---|---|---|---|---|

1 | 6.85 | 54.5 | 8.13 | 53.8 | 669 | 3.23 | 6.712 |

… | … | … | … | … | … | … | … |

… | … | … | … | … | … | … | … |

300 | 6.86 | 54.2 | 8.11 | 53.7 | 661 | 3.32 | 6.684 |

… | … | … | … | … | … | … | … |

… | … | … | … | … | … | … | … |

500 | 6.87 | 53.6 | 9.18 | 55.2 | 592 | 3.63 | 7.794 |

… | … | … | … | … | … | … | … |

… | … | … | … | … | … | … | … |

580 | 6.85 | 53.6 | 9.81 | 56.2 | 561 | 3.89 | 8.568 |

… | … | … | … | … | … | … | … |

… | … | … | … | … | … | … | … |

660 | 6.85 | 54.1 | 8.8 | 54.7 | 619 | 3.57 | 7.393 |

… | … | … | … | … | … | … | … |

… | … | … | … | … | … | … | … |

900 | 6.86 | 54.3 | 8.09 | 53.9 | 669 | 3.2 | 6.67 |

… | … | … | … | … | … | … | … |

… | … | … | … | … | … | … | … |

1149 | 6.85 | 54.6 | 8.13 | 53.6 | 658 | 3.24 | 6.678 |

Requirement | Variable | Limit | Value |
---|---|---|---|

1 | Daily amount of permeate water (m^{3}) | Minimum | 70 |

Maximum | 100 | ||

2 | Permeate conductivity (µS/cm) | Minimum | 520 |

Maximum | 680 | ||

3 | Total energy consumption (kWh) | Minimum | 6.5 |

Maximum | 10 |

Row Number | Req. 1 (m ^{3}) | Req. 2 (μS/cm) | Req. 3 (kWh) | Seawater pH | Seawater Conductivity (mS/cm) | Feed Flow Rate (m^{3}/h) | HPP Outlet Pressure (Bar) | Permeate Conductivity (μS/cm) | Daily Amount of Permeate Water (m^{3}/day) | Total Energy Consumption (kWh) |
---|---|---|---|---|---|---|---|---|---|---|

1 | 85 | 610 | 9.5 | 6.85 | 53.4 | 10.14 | 56.9 | 539 | 98.88 | 8.95 |

… | … | … | … | … | … | … | … | … | … | … |

… | … | … | … | … | … | … | … | … | … | … |

200 | 75 | 680 | 10 | 6.85 | 53.4 | 10.14 | 56.9 | 539 | 98.88 | 8.95 |

… | … | … | … | … | … | … | … | … | … | … |

… | … | … | … | … | … | … | … | … | … | … |

300 | 80 | 560 | 8.25 | 6.84 | 53.6 | 9.81 | 56.1 | 559 | 92.4 | 8.18 |

… | … | … | … | … | … | … | … | … | … | … |

… | … | … | … | … | … | … | … | … | … | … |

400 | 80 | 660 | 9.5 | 6.85 | 53.4 | 10.14 | 56.9 | 539 | 98.88 | 8.95 |

… | … | … | … | … | … | … | … | … | … | … |

… | … | … | … | … | … | … | … | … | … | … |

500 | 70 | 650 | 9.5 | 6.87 | 53.7 | 10.14 | 55.8 | 575 | 92.16 | 7.78 |

… | … | … | … | … | … | … | … | … | … | … |

… | … | … | … | … | … | … | … | … | … | … |

600 | 95 | 560 | 9.5 | 6.86 | 53.4 | 10.1 | 56.8 | 539 | 96.96 | 8.58 |

… | … | … | … | … | … | … | … | … | … | … |

… | … | … | … | … | … | … | … | … | … | … |

745 | 95 | 640 | 9.25 | 6.86 | 53.4 | 10.1 | 56.8 | 542 | 96.96 | 8.58 |

… | … | … | … | … | … | … | … | … | … | … |

… | … | … | … | … | … | … | … | … | … | … |

Module | Regression Trees | Support Vector Machines | ||||
---|---|---|---|---|---|---|

RMSE | MAE | R^{2} | RMSE | MAE | R^{2} | |

1 | 0.010468 | 0.00092 | 1 | 0.091868 | 0.28531 | 0.98 |

2 | 0.019671 | 0.0014382 | 1 | 0.019854 | 0.017723 | 1 |

3A | 0.029727 | 0.0024161 | 1 | 0.095684 | 0.042981 | 1 |

3B | 0.70717 | 0.061857 | 1 | 1.1645 | 0.91048 | 1 |

3C | 0.019558 | 0.0019232 | 1 | 0.023966 | 0.01957 | 1 |

Module | Type of Error | |||
---|---|---|---|---|

RMSE | MAE | Maximum Error | ||

1 | HPP operating pressure | 7.4 × 10^{−13} | 6.33 × 10^{−13} | 2.77 × 10^{−13} Bar |

2 | Feed flow rate | 0.34021 | 0.19012 | 0.67999 m^{3}/h |

3A | Water amount | 4.7 × 10^{−13} | 4.01 × 10^{−13} | 1.27 × 10^{−13} m^{3} |

3B | Permeate conductivity | 1.61 × 10^{−12} | 1.308 × 10^{−12} | 6.82 × 10^{−13} μS/cm |

3C | Total energy consumption | 0.00037 | 5.3 × 10^{−5} | 0.00113 kWh |

Module | Type of Error | |||
---|---|---|---|---|

RMSE | MAE | Maximum Error | ||

1 | HPP operating pressure | 2.1618 | 2.0827 | 2.9249 Bar |

2 | Feed flow rate | 0.0226 | 0.0024 | 0.2499 m^{3}/h |

3A | Water amount | 0.0106 | 0.0091 | 0.0208 m^{3} |

3B | Permeate conductivity | 0.8822 | 0.8387 | 1.1862 μS/cm |

3C | Total energy consumption | 0.0206 | 0.0022 | 0.2280 kWh |

Inputs | Outputs | ||||
---|---|---|---|---|---|

Variable | Units | Value | Variable | Units | Value |

Req. 1 (Min. daily water amount) | m^{3} | 75 | HPP operating pressure | Bar | 55.8 |

Req. 2 (Max. permeate conductivity) | µS/cm | 600 | Feed flow rate | m^{3}/h | 9.46 |

Req. 3 (Max. total energy consumption) | kWh | 9 | Daily water amount | m^{3} | 92.16 |

Seawater pH | - | 6.85 | Permeate conductivity | µS/cm | 559 |

Seawater conductivity | mS/cm | 53.5 | Total energy consumption | kWh | 7.78 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Marichal Plasencia, G.N.; Camacho-Espino, J.; Ávila Prats, D.; Peñate Suárez, B.
Machine Learning Models Applied to Manage the Operation of a Simple SWRO Desalination Plant and Its Application in Marine Vessels. *Water* **2021**, *13*, 2547.
https://doi.org/10.3390/w13182547

**AMA Style**

Marichal Plasencia GN, Camacho-Espino J, Ávila Prats D, Peñate Suárez B.
Machine Learning Models Applied to Manage the Operation of a Simple SWRO Desalination Plant and Its Application in Marine Vessels. *Water*. 2021; 13(18):2547.
https://doi.org/10.3390/w13182547

**Chicago/Turabian Style**

Marichal Plasencia, Graciliano Nicolás, Jorge Camacho-Espino, Deivis Ávila Prats, and Baltasar Peñate Suárez.
2021. "Machine Learning Models Applied to Manage the Operation of a Simple SWRO Desalination Plant and Its Application in Marine Vessels" *Water* 13, no. 18: 2547.
https://doi.org/10.3390/w13182547