Water Management in Agriculture: A Survey on Current Challenges and Technological Solutions

Water plays a crucial role in the agricultural field for food production and raising livestock. Given the current trends in world population growth, the urgent food demand that must be answered by agriculture highly depends on our ability to efficiently exploit the available water resources. Among critical issues, there is water management. Recently, innovative technologies have improved water management and monitoring in agriculture. Internet of Things, Wireless Sensor Networks and Cloud Computing, have been used in diverse contexts in agriculture. By focusing on the water management challenge in general, existing approaches are aiming at optimizing water usage, and improving the quality and quantity of agricultural crops, while minimizing the need for direct human intervention. This is achieved by smoothing the water monitoring process, by applying the right automation level, and allowing farmers getting connected anywhere and anytime to their farms. There are plenty of challenges in agriculture involving water: water pollution monitoring, water reuse, monitoring water pipeline distribution network for irrigation, drinking water for livestock, etc. Several studies have been devoted to these questions in the recent decade. Therefore, this paper presents a survey on recent works dealing with water management and monitoring in agriculture, supported by advanced technologies. It also discusses some open challenges based on which relevant research directions can be drawn in the future, regarding the use of modern smart concepts and tools for water management and monitoring in the agriculture domain.


I. INTRODUCTION
Agriculture is a fundamental sector that enables to sustain the growing world population food need and promote several regions economy on the different continents. Nevertheless, to reach such objectives, agricultural practices must take into account both ecological and environmental constraints. In particular, they must prevent the rapid degradation of lands, while guaranteeing the conservation of water resources in an optimized and clean manner. The Food and Agriculture Organization (FAO) even insists a strategy must be put in place for modern agriculture, in order to conserve, protect, valorize natural resources and ensure the health of the population [1]. More generally, to meet the world's food need, significant efforts must be pushed on the development of agriculture sectors like forestry, livestock, and crops.
The associate editor coordinating the review of this manuscript and approving it for publication was Kun Mean Mean Hou . At the same time, water is a natural resource that plays a central role in the answer to the aforementioned food demand. In particular, it is very important in the agriculture domain and significantly contributes to crop growth. Lack of water, inadequate soil supply or exploitation of untreated sources result in a poor, unsustainable crop, and may, in some cases, be unfavorable even for consumption in the contaminated water case that may lead to serious illnesses and even deaths.
There are several methods that help preserve and protect the water sources, such as building dams to store rainwater, seawater desalination, sewage water treatment and monitoring water pipelines to detect any damage or leak. Cyber-Physical Systems (CPS), Wireless Sensor Networks (WSN), Internet of Things (IoT) and Cloud Technologies are the main research paradigms used to enhance these methods by making them smarter. These paradigms have entered the agriculture industry as a means of creating an automated and integrated system. They rely on sensors that can record quantitative measurements of soil condition, crop growth, weather patterns, and other useful data. These sensors constitute a network of devices able to send and receive data, which streamlines data storage and processing.
Environmental sensors (e.g. humidity, pressure and temperature sensors) are deployed in WSN and CPS infrastructures. These sensors generate massive and heterogeneous spatio-temporal data stored and processed on a large scale. This data processing naturally implies the real-time feature required on the transmission operations, analysis and decision-making. The literature about this issue is becoming important, hence the need to make a state-of-the-art review, to take a look on the progress and current challenges related to water usage in agriculture in particular.

A. OUR CONTRIBUTION
In this paper, we present a survey on the use of innovative technologies to develop a smart concept in the water usage regulation in the agriculture domain. These technologies also enable to reduce water waste, as it is important to the overall sustainability of limited freshwater resources. Intelligent solutions implementation for water monitoring offers the possibility to enhance agricultural production and facilitate the management.
We discuss the need to preserve water resources, environment and improve the crops using advanced technologies. For this purpose, we identify four application fields in agriculture posing real challenges. These applications fields are carefully considered to improve water management as a premium factor for the development in the agriculture domain. We emphasize a number of selected approaches and methods that leverage modern technologies for smart water management.

B. OUTLINE OF THE PAPER
The remaining of this paper is organized as follows: Section II discusses four important challenges that involve water in agriculture; Section III generally focuses on the main technological paradigms currently applied for water use and distribution; Section IV gives a panorama of research efforts applying these paradigms to the four challenges identified earlier in the paper; Section V provides an outlook to future research directions regarding water management in the agriculture domain; finally, Section VI concludes the paper by summarizing our literature analysis.

II. FOUR CHALLENGES RELATED TO WATER MANAGEMENT IN AGRICULTURE
We discuss four important challenges in water use in the agriculture domain (see Fig. 1).
Each challenge motivates a significant shift from traditional water management solutions to smarter ones for higher efficiency, via the integration of modern technologies, e.g., WSN and IoT.

A. CHALLENGE 1: WATER REUSE AND WATER POLLUTION MONITORING
Human and industrial activities can introduce contaminants into the natural environment causing an aquatic ecosystem degradation due to the inadequately treated wastewater release [2]. For example, water bodies like lakes and rivers can be used as a water source for irrigation in agriculture. When these sources are contaminated, as a result, they lose mineral characteristics [3], not only this but in addition will contain external polluted chemical properties, leading to an agricultural crop deformation in terms of quality. This fact can result in a public health issue by increasing the possibility of consumers suffering from diseases causing death.
In fact, untreated sewage frequently contains pathogens, chemical contaminants, antibiotics residues and other hazards to the farmers' health, food chain workers and consumers. However, we must not ignore the importance of naturally occurring bacteria that maintain the fertility of soil and water quality. They transform minerals and nutrients in water and soil by producing materials useful for other organics such as plants. Therefore, they carry out useful activities to humans by degrading wastes and cleansing water from the pollutants, because they might be capable of growth on some organic and toxic compounds to other organisms. However, some bacteria are limited by oxygen absence, extremes of PH and temperature, by nutrients lack to support the growth.
One of the most current limitations to pollutant monitoring is real-time detection. Commercial devices used for online water quality monitoring are more expensive and they take a considerable amount of time compared to real-time response [4]. On-line bacteriological detection techniques and commercial devices are presented in [5].
Technological solutions are developed as an alternative water source to face scarcity in some areas. Industrial and domestic wastewater treatment plants are one of the most effective solutions that can be used to control water pollution devoted to irrigation [6], [7]. Desalination plants are also used in water reuse context as discussed by FAO [8]. In addition, water applied for irrigation inside greenhouses [9] and hydroponics [10] can be reused in the same context as long as this water is considered polluted by the fertilizers' remains. This technique requires a mini plant for water purification. Before the treatment process, water is mixed with fertilizer residues and excess salts that may affect the product growth, and hereby it, improves the environment by reducing the amount of waste discharged to the waterways (chemical fertilizers).
However, these plants are not fully accessible and not traded to all farmers categories, and that is due to the infrastructure facility cost, it cannot be traded for everyone, especially agricultural traditionalists who draw water directly from water bodies. Nevertheless, the treated water use in irrigation may have further negative effects on public health and the environment. This will depend on the water recycling application, on the soil characteristics, on climatic conditions and on agricultural practices. Therefore, it is crucial that all these factors be taken into account. In addition, consideration must be given to the risk of using recycled wastewater in the agricultural domain, to ensure recycling wastewater safety [11]. In fact, the recycled wastewater should be examined between World Health Organization's guidelines (WHO) [12], the United States Environmental Protection Agency (US EPA) [13] and FAO's user manual [14]. These documents recommend treated water quality criteria for irrigation.
WSN, IoT and cloud technologies are used for pollution detection and making wastewater management safer and efficient by connecting physical objects to Internet to monitor and use them at large scale more effectively. Smart sensors are typically mounted at various positions in the wastewater facility to enable real-time monitoring and reporting of sewer asset performance. These sensors collect data on water quality, temperature variations, water level, and water velocity. Water quality sensors are used for measuring physicochemical parameters such as temperature, PH and conductivity in order to detect water contaminants in sewage. Measurements taken by water level and water velocity sensors are used for tracking the flow across the whole treatment plant and monitoring water level using laser technology, ultrasonic emissions and pressure transducers. The data are transmitted to a cloud server for storage and visualization using a web application that synthesizes the information into actionable insights [15], [16]. Furthermore, the operators monitor water sensors, operate safety controls, and predictive maintenance. These technologies provide real-time monitoring and help to reduce the time for frequent checking of samples.
The related works discussed in Section IV rely on electrochemical, optical and acoustical based techniques using low cost and commercial sensors. These techniques are used to detect in real-time anomalies in water parameters obtained from the sensors (temperature, PH, Dissolved Oxygen, etc.) based on defined value ranges, without directly identifying the microbe (or some particular phenomenon). They seem to be adequate, but the need to adapt the available techniques to autonomous operation and optimized response time is a substantial challenge. In addition, data analysis must be integrated in these techniques using data mining algorithms to predict the quality of water and the presence of pathogens. Such an automated combination can be cost-effective and favor real-time microbe detection.

B. CHALLENGE 2: WATER PIPELINE MONITORING
Water distribution networks must be considered seriously, especially underground structure, which increases the concern for permanent monitoring of the network to preserve the environmental resources and ensure the homogeneous distribution of water to obtain a complete crop. Pipe's age, overpressure, improper installation, mechanical actuator malfunction (i.e. valves, pumps, sprayers, etc.) and natural disasters are the most important factors that can cause leaks and damages in the water pipeline distribution network.
A water leak in the irrigation network can cause a shortage in the productivity of the agricultural yield, due to an insufficient amount of water for crop growth. Real-time monitoring and controlling mechanisms help to overcome these issues concerning water distribution.
The water pipeline monitoring system [17], [18] is one of the most successful solutions, which requires technology to cover the problem of a water leak and provides an effective method for inspecting the pipeline infrastructure.

C. CHALLENGE 3: WATER IRRIGATION
This challenge is referred to under various denominations in the agricultural field such as watering, irrigation, sprinkling or spraying process. Its key objective consists in providing water to exploitable areas for agricultural uses based on the methodical and calculated manner, weather status, area's topography and the nature of soils (acidity, grading, etc.). Supplying soil with water preserves the moisture content required for plant growth, and on the other hand, the soil is washed with excess salts, to maintain an acceptable salinity concentration in the plant root area.
In some regions, farmers use saline water for irrigation. As a result, crop productivity is reduced because of soil salinization. This kind of problem appears in the arid and semiarid areas (e.g. Algeria). Therefore, managing irrigation in such areas is crucial using the spatial distribution approach of water salinity, in order to facilitate farmer's activities and water monitoring [19].
Selecting an irrigation technique varies depending on the region (coastal, inland, desert), agricultural product, climate (hot, cold, moderate), soil quality, soil fertility, quantity and how water is irrigated for sprinkling. The farms draw water from various sources, including ponds, wells, dams, rivers, and rainwater. Instead of using irrigation techniques traditional methods, switching to smart irrigation techniques will help farmers to prevent water wastage during irrigation. Unmanned Aerial Vehicles (UAVs) provide a very helpful solution for decision-makers to optimize the water used in irrigation by detecting uniformity water distribution in the crop field [20].
More generally, converging towards a smart concept [21] plays a key role in making agriculture processes effective and efficient, by enhancing the crop's overall quality and quantity. Automated irrigation reduces water overflow and resource consumption, such as time and electricity.

D. CHALLENGE 4: DRINKING WATER FOR LIVESTOCK
Livestock farming in agriculture is concerned with raising and maintaining livestock, primarily for the meat, milk and eggs producing purposes. Understanding the place of animal feeding operations in the agricultural activity is a necessary prelude to effective water use in this field [22]. Animals (as an organism) are influenced by water [23] (polluted or saltwater). They are essential elements in the natural atmosphere and have an active role in the ecological balance and regional economy.
Livestock is very important for human needs by providing large quantities of foodstuffs. For example, meat and milk have long been known for their high nutritive value, producing stronger, healthier people. Some farmers also rely on organic residues (animal) as natural fertilizers mixed with soil. When contaminated, they negatively affect crop growth and contribute to the transmission of infection and diseases to consumers.
Serious considerations must be taken into account to ensure livestock's health. This mainly depends on monitoring food supply which must be seriously addressed especially water.

III. TECHNOLOGICAL PARADIGMS FOR SMART WATER MANAGEMENT IN AGRICULTURE
Having the ability to monitor water via sensors provides farmers the power to enhance the growth of the crops. The use of these sensors provides accurate and real-time information on different parameters related to water so that farmers can effectively intervene at the right moment.

A. MAIN TECHNOLOGIES
Wireless Sensor Networks (WSN) are the basic smart building concepts [25]. It is composed of network nodes, each constituted of an embedded system supplied by a removable battery or using renewable energies such as solar panels. The network can be built according to many topologies (mesh, bus, and ring), depending on the application's concerns. WSN nodes follow communication protocols, such as Message Queuing Telemetry Transport (MQTT) [26] or Constrained Application Protocol (CoAP) [27], to link to edge control modules, i.e., interface connect to master. MQTT is a machine-to-machine connectivity protocol used for networks operating in local areas and with low bandwidth [17].
A Cyber-Physical System (CPS) is a collection of sensors and actuators with low-level computing, data storage and communication capabilities [28]. It refers to the embedded system control units called nodes. These are able to carry out low-level operations without waiting for commands from computing centers in the layer above [9].
The Internet of Things (IoT) [29] is a layered interface that contains a form of smart technology that can communicate with a larger interface. This paradigm interconnects embedded systems and brings together two evolving technologies: wireless connectivity and smart sensors.
The integration of IoT with the cloud is a cost-effective way for data processing and storage. It is generally divided into two layers communicating with each other directly by means of wireless connection: frontend and backend. The first consists of IoT node devices (gateways, IoT sensors, etc.) and the second one consists of data storage and processing systems (servers) located far away from the client devices and make up the cloud itself.
Application Programming Interfaces (APIs) can be provided in order to retrieve data in the context of web programming or development of mobile applications. Fig. 2 [24] describes a typical presentation of the correlations among these main technologies deployed on the field for agricultural application. The IoT gateway node is connected to a remote server via Internet to send data collected by the sensors and thus, users can retrieve data, be notified on their cellphones or send command actions to be executed on the actuators. Fig. 3 describes a typical architecture of a wireless IoT node. Sensing subsystem's analog signals are converted to digital signals using a converter, in order to be processed by the processing subsystem and transfer them to the transmission subsystem to be sent to the remote server using an RF transceiver. The power supply subsystem ensures the necessary electrical energy for the three subsystems.

B. QUICK LITERATURE OVERVIEW ON ADDRESSED WATER ISSUES IN AGRICULTURE
Based on the above technological paradigms, existing studies are selected for a general review regarding the application of these technologies for water management in the agriculture field. This review covers an analysis of the research topics tackled by authors of the selected studies, the applied solution VOLUME 8, 2020 approaches, the specific techniques (i.e. tools and algorithms) used for addressing the problems. Table 1 presents the general research topics related to the identified papers in our survey.
Here, most of the covered studies deal with water monitoring, water management, and water reuse.
According to our literature analysis, it is important to identify the notions and concepts used in the considered studies, which originate from different application concerns, such as on-site data collection in the farms based on WSN. The considered studies exploit data from various sources: • on-site sensors (e.g. weather stations, chemical detection devices, biosensors, probes, etc.) provide on data collection, • remote sensing technologies (e.g. UAVs and satellites) offer the possibility to gather media data (i.e. images and videos), and • online web services delivering valuable data such as information about plants and weather conditions. Data processing, media processing, networking, security aspect, analytical processing, energy management, and human-machine interface are the most research topics in water-related to the agricultural field. Table 1 summarizes some papers according to focused research topics, solutions, and applied techniques.
Cameras are used for obstacle detection based on image processing. They are installed on mobile engines devoted to irrigation [45]. Satellite's remote sensing images are useful for leakage detection [64]. Image processing includes algorithms for analyzing data using correlation, regression and histogram analysis [54] for monitoring correlated measurements of important characteristics, such as soil content and surface temperature.
The cloud platforms are responsible for processing data collected from farms such as the nutrient composition of the soil. In order to optimize the crop's growth and based on its needs (fertilizer availability, mixture volume, equilibrium nutrient concentrations, desired pH, etc.) the cloud platforms calculate theoretical inputs, such as the adequate irrigated water, the properties of the fertilizers' properties. FIWARE is one of the open-source cloud platforms through which programmers can execute their applications [66]. The cloud platform provides users with services to determine how to adjust the irrigation solution so as to keep the composition of the soil within desired parameter values.
The use of some online services involves message-oriented middleware for notifications and alerts. This concept is very useful and necessary for monitoring [56], [59], [62] in order to detect any failure or anomaly when occurs.
The different studies reported in Table 1 make use of the technologies discussed previously in variable ways. In the next section, we present in more detail some works according to the four challenges identified in Section II. For each work, the considered technologies are made explicit.

IV. LITERATURE SURVEY ON WATER MANAGEMENT IN AGRICULTURE
We now discuss some studies related to the four challenges on water management in agriculture introduced in Section II. The selected papers involve the technological paradigms presented in Section III. Appendix summarizes the discussed related works of the discussed challenges. Table 2 presents the most common measured parameters, their purpose and the weighting relative to their apparition in the literature. Here, the higher the occurrence of the parameter in the reviewed literature, the higher its degree of involvement, denoted by ''+'' symbols in Table 2. For example, PH and temperature are present in almost all covered studies. Some parameters, such as electrical conductivity and organic matter content are also often encountered in the studies. However, a few parameters, namely pressure, and the parameters related to the weather and obstacle detection are less present in the literature. Therefore, they have a lower degree of involvement.

A. ON WATER REUSE AND MONITORING WATER POLLUTION
In this section, we discuss the related work addressing water reuse and water pollution monitoring. A comparative summary of these studies is given in Table 3 of Appendix.
The global comparison criteria introduced in this table will allow us to discuss the existing studies. They include the used validation approaches (i.e. whether hardware/software prototypes or mathematical/analytical model); the involved technological paradigms (local or remote data storage and the analysis that determines the appropriate tools and techniques); the message passing interface addressing the data transmission between the sensors, the gateway and the cloud platform; the development cost of the used hardware platforms and devices; and the acquisition mode of the measured parameters (i.e. via the Web or mobile applications) providing the users with useful information for real-time decision making.
In [51], the authors proposed an analytical model and hardware prototype for analyzing parameters of four samples taken from different locations close to industrial areas. They provide a File Transfer Protocol (FTP) solution on a local area network using the Libelium's Waspmote [67] microcontroller board at the edge level. The tests were conducted in Fiji Island (Rewa River, central tap water, Sigatoka coast and Nabukalou Creek). A complete bundled includes the sensors, the microcontroller and the communication module. The storage was performed on local storage using an SD Card at the gateway level. Local FTP and cloud platform are connected for data analysis.
In [35], authors presented an approach based on a multichannel sensing module for water quality and air quality measurement using Raspberry Pi and sensing modules (unmanned surface vehicle and a hydrophone to extract information about underwater audio spectral components). The tests were conducted in a compo Grande's Garden in Brazil. The hardware prototype is designed and implemented to devise a system for water quality monitoring. The data are collected and saved at a local MySQL database. The cloud server is in charge of replicating the locally saved data to the cloud slave database. An Android application is used to retrieve data from the server using PHP script and Wowza streaming engine. 1 Authors in [34] proposed a data-driven approach named Smart FarmNet, which is an IoT-based platform built on OpenIoT [68] the widely used open source. This platform can automate the collection of soil quality and environment conditions data developed by a multi-disciplinary Australian team. The platform has been validated using actual farming data to confirm its elasticity, scalability and real-time statistical analysis. The platform provides a virtual laboratory environment for visualization and sharing by enabling sensor data collected in one study to be used in other studies. The platform on the cloud is responsible for performing realtime analysis on incoming sensor data streams. The platform on the edge, using Open IoT X-GSN component, collects filters and collates data streams from virtually any IoT device. Smart FarmNet is compatible to communicate with 30 IoT device platforms provided by several vendors. The platform provides a nice interface for end-users to monitor and visualize data. The server used to evaluate the performance is Amazon Elastic cloud Computing EC2. 2 In [56], the adopted approach was based on real-time water quality monitoring using WSN low power-aware context sensing. The area of deployment was in Pamba River in Kerala, India. The proposed architecture is built on an IoT framework for water quality monitoring using Waspmote (at sensing layer) which is an open-source sensor node for IoT applications, MS Azure on the cloud platform, and a web application provided to the central pollution control. The system architecture is composed of two parts: water quality monitoring and pollution control. The data are transmitted using cellular networks and Wi-Fi to/from the cloud and ZigBee protocol to/from the sensors.
In [39], a prototype of an integrated cloud-based WSN is proposed for monitoring industrial wastewater discharged into water sources. The collected data are sent to the ThingSpeak [69] platform using GPRS in the combination with HTTP protocol. An alert system is provided using a mobile messaging platform, in order to report in real-time any abnormal pollution values.
In [54], the authors proposed an analytical model based GIS web service application for crop yield and quality optimization potatoes cultivation. The platform is composed of a GIS-based web service environment for farmers based on a data-driven approach providing better control and management. The collected data are characterized by multi-temporal field measurement, satellite images, Unmanned Aerial Systems (UAS) observations and meteorological data sources in order to determine temporal development in a series of observations. Correlation, regression, and histogram analysis techniques are applied for data analysis.
In [44], the authors proposed an in-pipe water quality monitoring in water supply systems. The hardware prototype serves for the evaluation of novel in-pipe multi-parameter sensor probes for continuous water quality monitoring in water supply systems. The authors conducted experimental research to acquire continuous water quality changes occurring under steady and unsteady state flow conditions. The study demonstrates a significant impact of the unsteady state hydraulic conditions on disinfectant residual and turbidity. The experimentation was done inside a laboratory in the United Kingdom with local storage and using radio signals for data transmission.
In [70], the authors proposed an IoT-based water quality monitoring system. The proposed hardware prototype follows the WHO guidelines which define water quality metrics. The collected data are sent to a cloud system for realtime storage and processing. The main contribution of the authors concerns prediction, by applying a machine-learning algorithm to predict water quality via the used cloud server.
In [71], the authors proposed a hardware prototype for IoT-based water quality monitoring. A ZigBee module is 2 https://aws.amazon.com/fr/ec2/ used as a gateway for data collection from the sensors, and a GSM module is responsible for data transmission to a cloud server or a smartphone. The proposed prototype enables the real-time monitoring for anomaly detection among the collected parameters.
In [72], the authors also proposed IoT-based monitoring. Their prototype takes precise measurements about air and water quality parameters. The IBM Watson Cloud platform receives data from a microcontroller connected to six sensors. Temperature and humidity are critical water quality parameters since they directly influence the amount of dissolved oxygen (DO). The cloud platform uses natural language processing and machine learning to derive analytic conclusions.
In [73], the author proposed an IoT-based water quality monitoring using a Field Programmable Gate Array (FPGA) board as a core component of the hardware prototype. Five parameters are collected on the surface of the water. Here, the system is cost and power effective, while providing realtime monitoring. The sensing time interval is 1 hour, favoring a more frequent data refresh.
Finally, in [9] the authors proposed a water quality monitoring approach for water reuse. The approach consists in using the water flow after irrigation with the principle of water recirculation inside the greenhouse to avoid pollution. A prototype is built in an experimental greenhouse of CEBAS-CSIC in Murcia -Spain. The authors exploited edge and cloud computing, through the FIWARE platform to provide the main software modules. On the cyber-physical system layer, two protocols were used (MQTT and CoAP) to communicate with the edge plane. Moreover, the application layer provides management and analysis services.

B. ON WATER PIPELINE MONITORING
In this section, we discuss the related work dealing with water pipeline monitoring. In addition, a comparative summary of these studies is given in Table 4 of Appendix. Here, the comparison criteria are similar to those of Table 3. An additional criterion is introduced, indicating whether the pipeline monitoring uses an outside or in-pipe technique.
In [17], the authors proposed a hardware prototype for water leak detection with low energy consumption. The main concern is to enable an easy installation without influencing the pipe performance by using a relative sensing method based on force-sensitive resistors (FSR) to derive pressure measurements in the proposed underground WSN for pipeline monitoring. A test bench was developed and tested inside a laboratory.
In [74], the authors proposed a hardware prototype based on water flow monitoring. Using Arduino board and Arduino Ethernet shield, the collected data from the flow liquid meter sensor are sent to the server for real-time monitoring. A program is created on the Arduino board to detect whether there is a leak in the pipe and inform the monitoring application system about the leak location by processing the collected data.
EARNPIPE [75] is a testbed for water pipeline monitoring for above-ground long distances based on a mathematical model. The prototype is a WSN network-based technology. A hybrid mathematical model is developed for detecting leakage in pipelines (leak detection predictive Kalman filter and modified time difference of arrival). One model is mounted on the local mote and the second is implemented on a server for better accuracy. An interactive web user interface is developed to access the ftp server via the Internet and to the database for online visualization such as graphs, historical of data, pipeline state and network state. It also provides pipeline locations, maps, and controlled areas. The testbed was used in [65], where authors present an energy-aware sensor node platform for leak detection in water pipes. Experimental and comparative studies were performed on sensor prototypes with six different hardware platforms, communication interfaces, and power management techniques.
The authors in [76] proposed an IoT-based model for monitoring and controlling water distribution to avoid tanks from overfilling, pipe leakage due to overpressure. The proposed solution relies on low-cost devices. Controlling water pressure is done using sensors connected to the Arduino UNO micro-controller in order to maintain an acceptable pressure to safely distribute water in the main. If the pressure is either too low or too high, then a motorized electric valve is switched on or off. The collected data are sent to a web server installed on a Raspberry Pi module with MySQL database via SMS using the GSM module.
In [50], the authors proposed hardware and analytical prototype composed of multi-parametric in-pipe measurement probes to monitor in real-time water quality throughout a distribution network. The hardware prototype, named KAPTA TM 3000 AC4, was provided by the Veolia Company. 3 When it comes to the analytical model, the authors applied a method based on a calculation approach to determine the standard patterns from the huge amount of collected data in order to ensure the role of the multi-parametric probe sensors. This method is used to detect unusual variation in the measured values. The in-pipe measurement device is responsible for gathering the amount of active chlorine, conductivity, pressure, and temperature. In order to minimize the risk of microbiological contamination, active chlorine measurement is used to detect the presence of disinfectant within the network dosed. The pressure value can help the operator to detect any anomaly in water distribution when it varies. The data were collected and transferred to a central control center located in Paris city using wireless communication module-based GSM or radio signals.
In [77], the authors proposed a hardware prototype for detecting leakage in the water pipeline using flow rate, vibration, and pressure sensors. The proposed system mainly consists of two modules: the transmitter and the receiver. In the transmitter module, sensors are deployed to capture the flow rate of water within the pipe and to measure the durability of 3 https://www.veolia.com/fr the pipe. The vibration sensor data are analyzed on a server system to identify a pipe leakage. If any anomaly is detected, a notification message is sent to authority in order to take suitable actions. When the flow rate of water is above a given threshold, an SMS notification is sent to the authority of water board management via the GSM module.
In [78], the authors proposed a new solution for leakage detection based on the magnetic induction (MI) wireless sensor network for underground pipeline monitoring named MISE-PIPE. This solution promotes low-cost and real-time leakage detection and localization for underground pipelines. Different types of sensors (located both inside and around the underground pipelines) are used jointly for efficient detection. The authors adopted the MI technique [79] to transmit the collected data about the undergrounded soil properties. This technique is considered as a robust and efficient wireless communication in underground environments with minimum cost and energy consumption. Pressure and acoustic sensors are used as surface detectors near the checkpoints or pump stations to identify the areas where the pipelines are likely to have leakages.

C. ON WATER IRRIGATION
In this section, we discuss the related work dealing with water irrigation. In addition, a comparative summary of these studies is given in Table 5 of Appendix. A new comparison criterion is introduced beyond the previous ones (see Table 4). It indicates the usage of external data as complementary information to the used cloud platforms. Furthermore, the different actuators considered in water irrigation are listed in a specific column.
In [45], the authors proposed a multi-objective smart agriculture system. They implemented the system on a hardware prototype. The system is realized in combination with automation and IoT technologies through a remote smart device and a computer connected to the Internet. A robot with multiple sensors and actuators (obstacle sensor, camera, siren, cutter, and a sprayer) is controlled remotely based on location information by GPS. These devices are used to maintain vigilance and making sure that birds and animals cannot harm the crop. Another system consists of greenhouse management. Its role is to capture temperature, motion detector, and humidity and actuate the light, the heater, and the water pump. The last system is a smart wireless moisture sensor node to send collected data to greenhouse management to actuate the water pump based on real-time field data. The systems are built on the following hardware platforms: ZigBee modules, Raspberry Pi and AVR ATMega microcontroller.
In [37], the authors proposed an IoT-based smart water management platform (SWAMP) for irrigation which aims to maximize the production and minimize the costs. The authors deployed an analytic model in different countries (Brazil, Spain and Italy) by developing a test bench using five main tools: SenSE [80], MQTT Broker, MongoDB, 4 Web Client application, WANem network simulator [81], and FIWARE. MQTT and CoAP communication protocols were used to make the link to edge control modules.
The authors in [60] proposed automated irrigation management and scheduling system. The system prototype is deployed in plants located in Tanzania using WSN in automated irrigation management and scheduling system in agricultural activities. A coordinator node is used to collect data from sensor nodes and commanding the irrigation system. The gateway relays the coordinator node to the cloud via GSM and cellular networks. As a perspective, the authors aim to develop a mobile application in order to retrieve data from the cloud database.
In [59], the authors developed and deployed an automated irrigation system to optimize water use for agricultural crops inside a greenhouse near San Jose Del Cabo in Mexico. The system consists of distributed Wireless Sensors Units (WSUs) linked to a gateway unit (Wireless Information Unit -WIU) that handles sensor information and transmits the data to the web application for real-time data inspection using cellular Internet interface module based on HTTP over GPRS. Data storage was performed on a remote data SQL server 2005 databases. An algorithm is developed to monitor water quantity and ensures automated activated irrigation when necessary. According to the authors, the system has shown good results in water use optimization (about 90%) based on the comparison with traditional irrigation in this area. The choice of the used WSUs and WIU components was based on low power consumption using photovoltaic for system energy power needs.
In [48], the authors proposed a hardware prototype based smart farming system with a security approach. The main concern here is security. A prototype was realized using a camera to detect motions. The system is composed of sensors (field and environment parameters) and a camera connected to Raspberry Pi acting as a server at the edge level. The irrigation system is automated using a decision system exploiting the data updates from the sensor's values. The Raspberry Pi activates the actuators for irrigation (Sprinklers) based on the analyzed data. Then, the motor is triggered to supply water to the farms. On the cloud level, the data are stored and visualized using the ThingSpeak cloud-based platform.
In [30], a hardware prototype is developed with a WSN-based system for water irrigation. The system is composed of a microcontroller and a web application on the cloud, combined with data mining concepts to manage the system. The sensed data are stored in the cloud and are visualized through the web application that provides a graphical user interface helping the user to analyze and make decisions.
In [33], the authors proposed a cloud-based IoT architecture composed of 3 layers: front-end, gateway, and backend. At the front-end layer, they used a Raspberry Pi 2 as a microcontroller that is responsible for collecting the data of three sensor nodes, responsible for data collection of the following parameters: wind speed, rain volume, air temperature and humidity. The communication between the nodes is done by the gateway layer using nRF24L01 a wireless communication module operating on the 2.4 GHz. The gateway's microcontroller is the same as the one used at the frontend. It is connected to the back-end layer using Wi-Fi. The hardware prototype performance was evaluated data collected in a 200-minutes window in central Michigan University. The cloud platform architecture is composed of both Apache and MySQL and Google data sheet is used for data visualization.
In [31], authors developed a WSN-based infrastructure for watering agricultural crops in three villages in Surat Thani province, Thailand. They designed and developed a control system using hardware components and software (web and mobile applications). The hardware prototype is composed of sensors connected to a responsible control box for data measurements. The analysis made on these measurements is achieved with data mining techniques. A mobile application is responsible for remote watering management. The data collection was done for 5 months in order to perform yield analysis from the obtained IoT's information. These analyses are employed to predict the water need for crops. The Weka tool is used for data mining as open-source machine learning software in order to discover knowledge, expose relationships between field measurements and making decision for irrigation. An alert system is built on LINE API 5 to send notifications data via Internet.
In [32], authors proposed IoT-based smart water irrigation using a dynamic prediction. The developed hardware prototype is a system that predicts soil moisture based on the information collected using the sensors and the weather forecasting information. The collected data is transmitted to the server-side for visualization and analysis. The authors developed a novel algorithm based on Support Vector Regression and k-means clustering to devise a decision support system allowing an effective and optimum water usage for irrigation. The estimation of the soil moisture is based on the evapotranspiration related to the environmental data field (soil and air temperature, humidity, solar radiation, etc.). Three web applications were developed. The first is a web service for field sensor data collection. The second is for the real-time monitoring and the third for the control of the water motor. The storage was divided into two sections, Local SQLite on the Raspberry Pi gateway and MySQL on the remote server.
In [43], the authors proposed a WSN-based automated water irrigation management system using ECHERP (Equalized Cluster Head Election Routing Protocol) routing protocol in five neighboring parcels having different crops in Greece. The system is composed of two subsystems. The first is a WSN to collect data and the second is a decision support subsystem relying on the ZigBee hardware platform at the base station to transmit the data collected by sensors to the remote server. The prototype takes into consideration the historical data and the change of the climate values (humidity soil and air, temperature soil and air, wind, and duration of the sunshine) to calculate the water quantity needed for irrigation.
A routing protocol is also taken into consideration. The data collected from the sensors are routed to the base station using the ECHERP protocol energy-efficiency to increase the lifetime of sensors. The authors presented a performance evaluation compared to other energy-efficient routing algorithms.
In [36], the authors developed a web-based decision support system (DSS) for irrigation scheduling in developing countries. The developed prototype is a low-cost wireless weather station considered as the main station in the WSN architecture. This node is connected to six sensors. Each node is composed of a processing module and a sensor interface module for air temperature, humidity, solar radiation, rain sensors, and wind speed. The data measurements are collected every 5-minutes intervals and transmitted to the master node (via ZigBee) and then to the server over GPRS module. DSS on the server calculates the adequate values for irrigation in millimeters (using a mathematical model referred to as Penman-Monteith approximation) and triggers the irrigation alert. An interactive web-GIS application is also developed to visualize the irrigation area, water valve's state and display the sensed data.
In [46], authors developed a WSN-based application for irrigation facilities management (including reservoirs, pumping and drainage, stations, weirs, and tube wells). The application is based on the collection of field data using WSN technology based on RFID and QR codes (to enable identification and facilitating information sharing). This provides an efficient agricultural monitoring system, which can be used to monitor the real-time status of irrigation facilities at the regional scale. When an irrigation facility is tagged, the identification code of the location information (GPS) is verified and displayed on PDA (Personal Digital Assistant) to identify the facility's existence. Otherwise, the facility is registered at database level which contains the facility information stored in the management server and can be displayed on mobile devices such as the real-time water levels of irrigation canals.
In [49], the authors proposed an automated irrigation system based on low-cost devices. The system is based on alerting the farmer by SMS and E-mails once the water level reaches a suitable threshold. The main node is an Arduino Mega2560 microcontroller. It is connected to four sensors (temperature, humidity, moisture and tank's water level), two actuators (alarm and pump) and GPRS modems to inform the farmer. Web servers and webpages are developed to store and visualize the data. Remote access to control the pump is provided via a mobile application.
In [82], the authors proposed a real-time control of an irrigation system based on IoT platform for a five-hectares maximum size farm. The system is built on three main advanced technologies: IoT, cloud and a middleware mechanism for interfacing between them called context-aware platform. IBM's BlueMix cloud platform is used for data storage and real-time supervision. The gateway node named Control and Monitoring Unit (CMU), is equipped with interface connections that allow signal acquisition from sensors and sending commands to actuators. The CMU is responsible to forward the collected data to the BlueMix 6 cloud platform using MQTT protocol.

D. ON DRINKING WATER FOR LIVESTOCK
Smart livestock management solutions allow farmers to promote better livestock health [22]. IoT and WSN can be used to track animals living environments such as drinking water [83]. The data streamed to the cloud directly from wearables allows farmers to identify and address issues like pollution anomalies and feeding problems before they significantly affect the animal's health. In fact, to face these issues, it is required to make sure animals are taking the precise amount of the alimentation (water and vitamins). Any lack (or overdose) in quantity can influence livestock quality degradation. For example, water level sensors can be used to deliver real-time data about the remaining amount in the sink dedicated to livestock's drinking water. This helps farmers to be informed whether the livestock consumes an adequate amount of water within a precise time period. Furthermore, pollution sensors detect any water anomaly that can be harmful to the health of the livestock. Therefore, new solutions are developed to monitor livestock for safer and healthier productions. Table 6 in Appendix presents some works addressing different smart concepts to enhance the monitoring of the livestock's drinking water.
As can be noted in the above sections, the challenge concerning livestock drinking water is only marginally investigated in the literature, despite their relevance as stressed in [23] and other works [22], [83]. As this challenge remains very important, we believe it deserves to be addressed further in the future.

V. OPEN CHALLENGES AND DIRECTIONS
Most of the recent concerns in agriculture and environmental quality have focused on the impact of water management. Many water-related problems caused by humans and industrial activities, such as solid waste, can have an impact on the environment and agriculture. This ultimately yields complicated feedbacks like sustainable development paralysis and environmental degradation. Moreover, the exploitation of water resources in some regions can be naturally distorted, sometimes due to excessive salinity or acidity, which can reduce crop growth and productivity. More generally, water resources in agriculture should be managed carefully and in a sustainable way. The deployment of central wastewater treatment facilities is an example of an initiative aiming at risk reduction and pollution prevention.
Given the above context, we believe significant efforts must be pushed for establishing smart technological solutions that provide adequate water management services, capable of ameliorating the productivity of farmers whereas preserving the environment. A particular challenge concerns the development of smart water management pilots guaranteeing technological components are flexible enough to adapt to different contexts and be replicable in different locations and settings. In other words, the candidate platforms should be customizable to different pilots in various countries, climates, soils and crops. Accessibility is also a concerning factor. It promotes access to the platforms for a wide range of users, no matter how deeply they are trained in science, especially in developing countries. This can be achieved by making complex information understandable as much as possible.
An ongoing initiative aiming at improving the quality and safety of Mediterranean agriculture in the semi-arid area is the WATERMED 4.0 project of PRIMA Foundation. 7 It focuses on the above challenges by investigating new technologies and approaches for smart water management in agriculture, for increasing the quantity and quality of water in accordance with all stakeholders, and especially farmers. Its specific challenges include energy-efficient devices for water management systems, high-precision irrigation systems for agriculture in Mediterranean rural isolated areas with low access to electricity, minimization of water and fertilizer usage in agro-systems, water recycling based on numerical technologies; and socio-economic studies to improve water management governance.
In Section IV, we already underlined the fact that water reuse and livestock drinking water challenges should be investigated deeper. We also mention complementary research directions as discussed in the sequel. 7 http://prima-med.org/

A. ADAPTED DATA MANAGEMENT
A data management plan is necessary starting from creating adequate methodologies for collecting, processing and/or generating interoperable and reusable data for research. Designing new analytical models for water use in agriculture will be helpful to managers and decisionmakers. Machine learning paradigms [84] and bio-inspired algorithms [85] applied to big data are relevant in order to improve analytical models on heterogeneous data and making effective decisions. Developing innovative decision support systems based on WSN and IoT are suitable for usage in different tasks, including the management of the whole water cycle in agriculture, the monitoring of water resources and water demands as well as the creation of databases for the classification of all collected heterogeneous data.

B. DEVELOPMENT OF NEW PLATFORMS
Mobile and web-based platforms can be provided to farmers for the purpose of data monitoring across countries so as to bring together different regions where water resources data and information help resident farmers. This can be reached by leveraging the advantages of technologies such as WSN, IoT, and edge computing devices. On the other hand, this should take into account the integration of welltailored software/hardware developments realizing the monitoring and control for the expected new advanced water management systems. Model-driven engineering (MDE) applied to software-hardware codesign is relevant [86]- [88]    thanks to its high flexibility. It should integrate low-power embedded architectures such as ARM big.LITTLE design [89], [90] or edge computing power-efficient designs [91].
On the other hand, application-specific hardware synthesis [92] is another alternative to consider for dealing with this design challenge. For a few years, some innovative VOLUME 8, 2020 technological paradigms such as drones and UAVs have been adopted, particularly in precision agriculture. The development of such platforms induces some challenges when it comes to equipping them with advanced optical imaging systems and deploying very sophisticated image processing techniques for analyzing the quality of the soil.

C. DISRUPTIVE ENERGY-EFFICIENT TECHNOLOGIES
The ability to perform energy-efficient real-time data processing for the control and decision making during the water management process is highly crucial. Therefore, disruptive technologies such as non-volatile memories [93], [94], integrated with emerging ultra-low-power computing paradigms deserve high attention as key enabling solutions to the implementation of the required computing systems. For instance, the so-called normally-off computing [95], which involves inactive components of computer systems being aggressively powered off, enables it through the implementation of non-volatile processors. This ultimately provides drastic energy savings and longer battery life within the edge node frontier, near the sensors deployed in the farms. Another interesting challenge faced by the sensors is the maximum battery lifetime in order to keep delivering continuous and reliable measurements. Advanced energy harvesting technologies, and power-saving techniques should be leveraged for decreasing the sensors' energy consumption. Finally, reliable wireless communication modules with low energy consumption must deserve attention.

D. DEVELOPMENT OF NEW POWER-EFFICIENT SOLUTIONS
A further research direction should analyze how water pumps, sensors, water treatment or other electrical devices of the water distribution system can use the electricity produced by the photovoltaic setup [96]. Therefore, developing a new sensor characterized by power-efficiency is worth-mentioning. In addition, it is important to elaborate on new lightweight communication protocols for monitoring and control of water distribution systems, e.g. at wastewater treatment plants.
A starting track could be the use of more advanced, efficient and energy-efficient protocols such as [97], [98]. This will bring more efficiency by reducing operation and energy costs, better water cycle speedup and lower water losses.

VI. SUMMARY
In this paper, we presented a survey on recent studies regarding the crucial water management issue in agriculture, driven by advanced technologies. Several recent studies have been reviewed from literature. They address a diversity of topics regarding water usage in agriculture, including water pollution, irrigation, reuse, and leaks in pipelines and livestock drinking water. These directions have been investigated by the research community with consideration of modern water management and monitoring techniques relying on advanced technologies such as the Internet of Things (IoT), Wireless Sensor Network (WSN) and cloud computing. Such technologies arise as a promoter to overcome the drawbacks of traditional techniques and enhance water exploitation.
After our analysis of the existing literature, we discussed some relevant open challenges based on which future research directions have been identified. The foreseen coming efforts target the proposition of innovative smart concepts and tools for efficient water management and monitoring in the agriculture domain.

APPENDIX
The tables introduced in the current appendix provide a global comparison of all the papers discussed in Section IV. Table 3 presents the related work about water reuse and water pollution monitoring. Table 4 deals with papers related to water pipeline monitoring. Table 5 covers the related work on water irrigation. Finally, Table 6 discusses some papers on smart concepts that aim at enhancing the monitoring of livestock's drinking water.