## 1 Introduction
[18] used hierarchical predictive control for wastewater management, with a three-layer framework used to consider the different time scales of the involved biological processes. The upper hierarchy layers act in the longer term and send set points to lower levels, which act in the shorter term. The work of [PERSON] and [PERSON] [13] maximized the benefits of crops in a monthly model under constraints associated with cultivated areas to fulfill irrigation quotas and storage boundaries; however, this did not consider the effects of water insufficiency on crop yields. Given the limitations of water availability, the problem is how to distribute water among different crops. For this, the sum of relative crop yields has been maximized without considering aspects such as the crop yield or the expected returns [19]. However, this strategy benefits crops with lower water requirements or small, cultivated areas [20]. [PERSON] et al. [21] weighted the expected yield by the sale price of the crop and determined the distribution of water between different crops. [PERSON] and [PERSON] [22] and [PERSON] et al. [23] also added cultivated areas as a criterion. None of these works considered the minimum yield thresholds that crops must meet as self-consumption criteria. In Chile and other countries around the world, many rural communities lack adequate access to essential services such as water and electricity, which impacts their quality of life. The access and management of water and energy are conditioned by several territorial aspects and cause many energy-water-linked problems such as water shortages. Additionally, access to electricity generation technology (without any coordination between consumers) could generate indiscriminate water extraction from aquifers at a rate higher than the natural recharge, which would compromise water resource sustainability [24; 25]. Chile's case is explanatory, as the recent droughts in the period 2010-2018 were the longest in recorded history, with a rain deficit of 20-40% [26]. Studies conducted by the Ministry of Environment in Chile [27] indicate that this will become a critical situation in 2050, with a 30% water deficit in the Chilean central valley together with a temperature increase of 3 \({}^{\circ}\)C. Thus, Chile can be used as a case study to test the integrated optimization of an energy-water management system as a means of improving development in rural areas and ensuring water resource sustainability. To adequately manage irrigation without causing aquifer depletion, it is necessary to jointly analyze the energy use and water resource reserves considering integrated management with all sustainable aspects, such as technical, environmental, and economic factors [28]. Thus, the integrated control and management of the energy-water systems is necessary to ensure water resource reserves while considering energy availability/costs under different climate scenarios, such as drought. These aspects are analyzed here using the predictive control framework to consider the future dynamics and coupled behavior of water and energy resources. The main contributions of this work are summarized as follows:  
* A novel energy-water management system (EWMS) is proposed based on the joint optimization of water and energy resources using a model predictive control (MPC) strategy to manage the medium-term water requirements for irrigation and short-term energy requirements for water resource sustainability. * A water management system (WMS) based on the MPC technique is proposed to minimize energy costs, including the expected benefits from crops and the availability of energy sources. * An electricity management system (EMS) based on the MPC technique is established to include water availability and water use demand. * The proposed EWMS is validated using real data from a rural community in southern Chile, demonstrating successful performance in terms of determining and meeting water and energy requirements under constraints relative to aquifer sustainability.