Economic, Environmental and Social Gains of the Implementation of Artiﬁcial Intelligence at Dam Operations toward Industry 4.0 Principles

: Due to the increasing demand for water supply of urban areas, treatment and supply plants are becoming important to ensure availability and quality of this essential resource for human health. Enabling technologies of Industry 4.0 have the potential to improve performances of treatment plants. In this paper, after reviewing contributions in scientiﬁc literature on I4.0 technologies in dam operations, a study carried out on a Brazilian dam is presented and discussed. The main purpose of the study is to evaluate the economic, environmental, and social advantages achieved through the adoption of Artiﬁcial Intelligence (AI) in dam operations. Unlike automation that just respond to commands, AI uses a large amount of data training to make computers able to take the best decision. The current study involved a company that managed six reservoirs for treatment systems supplying water to almost ten million people at the metropolitan area of S ã o Paulo City. Results of the study show that AI adoption could lead to economic gain in ﬁgures around US$ 51,000.00 per year, as well as less trips between sites and less overtime extra costs on the main operations. Increasing gates maneuvers agility result in signiﬁcant environmental gains with savings of about 4.32 billion L of water per year, enough to supply 73,000 people. Also, decreasing operational vehicle utilization results in less emissions. Finally, the AI implementation improved the safety of dam operations, resulting in social beneﬁts such as the ﬂood risk mitigation in cities and the health and safety of operators.


Introduction
The United Nations Organization (UN) selected "clear water and sanitation" as a target of the 2030 Agenda for Sustainable Development [1]. It emphasizes the role of water supply systems to increase the level of sustainability by providing clean water to people. Failures in planning population growth at huge urban centers make water demand forecasting more challenging. As consequence, agencies need to find new sources of clean water, which usually are more expensive. The fluctuation of water demand requires many maneuvers on the water flow in reservoir operations, which means hidden waste in process. An alternative to reduce wastes is the use of Artificial Intelligence, which aids optimization with the simulation of changes on systems.
Artificial Intelligence (AI) got notoriety in the 1980's with several studies that used AI in simulation to aid improvement in manufacturing systems [2]. Nilsson [3] defined the principles of AI, Davis and Lenat [4] presented knowledge-based systems in AI and Joshi et al. [5] formalized process planning in an AI framework. Although several studies on AI can be found throughout 40 years, there are few scientific papers referring specifically to the utilization of AI Technologies on reservoir gates operations, basically connecting controlling systems to gate automation.
AI has been incorporated in operational process replacing traditional systems led by human decisions [6][7][8]. AI is defined as the ability of a computer-powered machine to take a set of information, analyze, decide and autonomously take action [9]. It is the essence of machine learning that uses a large amount of data training to make the computer have spontaneous simulation of human behavior [10]. On the other hand, automation is the mechanization of a system by means of a set of electrical and mechanical components that respond to a command [11]. Then, AI and automation are complementary to each other. The role of AI is to identify the best decision and provide the right command to automatized system that performs the action.
The concern on structural integrity of the dam, using sensors and other technological autonomous devices to monitor and evaluate dam safety issues were found in researches carried out by Magrini et al. [12]. Also, others studies as per Jiang et al. [13] and Di Sarno et al. [14], discussed utilization of internet devices to deal with secondary aspects of dam operations, such as controlling and monitoring human resources and IT safety systems. Furthermore, investigations on Internet of Things utilization through wireless sensors networks to monitor and manage dams are on papers [15,16]. Moreover, some researchers developed conceptual models to support reservoir management, focusing targets for mitigating floods, as can be seen on papers [17,18]. In addition, the development of the simulations to estimate water flow can be found in studies [19,20]. The article of Russel [21] is just one of a few studies that take into account economic gain using fuzzy logic to optimize a hydropower plant. In Mao et al. [22] an algorithm was developed to filter and select information from a large database, related to monitoring a water dam. Sordo-Ward et al. [23] and Sulis et al. [24] sought to understand variables that are related to a reservoir and identified sludges behavior and chemical wastes influencing dam operations.
Furthermore, recent studies showed advantages of the use of AI. Liao et al. [25] investigated AI-based techniques to reduce transmission and processing delays of virtual network functions in datacenters. Lin et al. [26] evaluated algorithmic approaches for load balancing and time balancing that resulted in saving time and energy. Kalsi et al. [27] brought deep learning to improve performance of DNA cryptography. Sood et al. [28] made an experimental evaluation on meteorological data collected that indicated the effectiveness of the proposed architecture. Siddiqa et al. [29] analyzed advanced big data techniques to improve accuracy and performance of indexing mechanisms. In dam operations, Coppolino et al. [30] presented a Security Information and Event Management system to perform analysis of reports generated by security devices of dam infrastructure, and Coppolino et al. [31] investigated a framework for event collection and correlation to process heterogeneous data and spot evidence of security issues.
Thus, studies on AI application in dam operations are present in the literature. However, none of these papers emphasized the use of Artificial Intelligence to aid dam operations, focusing on economic, environmental and social gains. This finding denotes the research gap identified by this investigation. The opportunity surfaces to carry out an exploratory study that intends to seek the answer for the following research question: Does the use of Artificial Intelligence on dam operations result in economic, environmental and social gains?
In order to answer the proposed question, this paper has the following specific and general objective: to evaluate the economic, environmental and social benefits through the adoption of AI in gates operations for water dams. Specifically: (i) To perform a systematic review on AI utilization; (ii) to analyze the use of AI in dam gates control and; (iii) to account the economic, environmental and social gains with AI implementation.
Thus, the defined objective is not to present the functionality and technical details of AI in dam operations. The aim is to perform an exploratory investigation to account the economic, environmental and social gains in water supply system operations after AI implementation.

Systematic Literature Review on Economic and Environmental Advantages of Using Enabling Technologies on Dam Operations
This investigation performed a systematic literature review on papers about the use of technologies to manage dam gates and the evaluation of related economics and environmental gains. Eight scientific databases were used in this search: Emerald, ProQuest, Science, Scopus, Scielo, Capes, Taylors & Francis, and Wiley. The content analysis of papers related to this research theme identified advantages of using Industry 4.0 enabling technologies on dam operations, such as the integration of forecast models to water inlet and evaporation at reservoirs with operational regulations by means of simulation procedure [19]; the use of Gray Wolf Optimization (GWO) and an Adaptive Neuro-Fuzzy Inference System (ANFIS) to simulate the weather forecast on a month in advance, at the hydropower plant location [32]; the Epsilon-Dominance Non-Dominate Sorted Genetic Algorithm II (NSGAII) to find the optimal solution for decision-making about operations sequence of the four dams [33]; the analysis of free water flow to increase the flow measurement automation of a dam [34]; an implementation of structural monitoring system for safety of dams to hydropower plants [12].
In addition, the development of a low-cost information systems for collecting and sharing data of water levels in real time with a central control office [35]; The development of a management and monitoring system for disasters based on Internet of Things (IoT) for dams, capable to send messages on an autonomous way to the population [16]; The use of three different models of Artificial Intelligence (AI) to simulate reservoir operation on a monthly, daily and hourly time base, using around 30 years of historical records on reservoir operation [36]; A review about IoT impact on hydropower plant dams, having focus on increasing accessibility of dam security monitoring systems for improving dam efficiency and avoiding structural damages [37]; An IoT-based system to control the dam position, according to water level [38].
Furthermore, the development of IoT tools for dam safety monitoring that identify and eliminate data potentially out of range, resulted in a reduction of 87.5% on transmission costs and lower response time by 54% comparing to centralized processing data algorithms [22]; The information security system that improves safety on IT infrastructure of hydropower plant dam by detecting errors on network configuration paths and giving prompt answer to cyber-attacks [14]; The impact assessment of multiple gates integration that resulted in lower levels of water in reservoirs and water quality [39]; An optimization model to reach a reduction of water flow peaks, considering all possible scenarios and a faster operation response time [17]; The integration of IoT and Big Data to increase safety at a reservoir [40].
Moreover, the evaluation of space sensors for monitoring dams that are useful to detect deformations on critical structures such as dams [41]; The model for real time control of hydro meteorological regulations based on reservoirs simulation using a flood control simulation model for water reservoirs [18]; The wireless monitoring system for radical changes on rivers and lakes water level [42]; An automated control that manages gates opening considering the presence of humans downstream of the dam and the need for energy generation and agriculture watering [15]; A system for estimating the required work force for dam building, useful in Project Management to define the quantity of labor that has to be payed to Contractors [13]; Also, the comparison of three different methods-Least Squares Support Vector Machines (LSSVMs), Relevance Vector Machine (RVM), and General Circulation Model (GCM)-to carry out a weather forecast on gate water flow [43]; A model for pollution prevention and water supply management of Huai River using multi targets and constrains [44]; The simulation to control floods recommends to empty the reservoir as soon as possible, avoiding the maximum flow capacity of the gate [45]; The advantages of automation to improve a hydrologic forecast is helpful for several areas such as industrial, agriculture, rivers and dams [46]; A real time monitoring system based on IoT and cloud computing that analyses the saturation, the level of waste, and dam deformation in mining operations [47].
Besides, a Dynamic Bayesian Network model to overcome the deficiencies from standard methods for dams monitoring and to improve safety conditions of these structures [48]; A 500 to 10,000 years Monte Carlo Simulation to replicate a dam behavior to identify factors that affect the safety of the reservoir [23]; A real time automation system to perform civil works on structures and to verify possible displacements on checked positions [49]; A software for monitoring safety issues on waste dams, combined with images transmissions, videos and GPS, to avoid a catastrophic failure [50]; A technical approach to safety management at mining waste dams by means of tracking several dam indicators that allow to anticipate a possible safety alert issuance [51].
Additionally, the use of Artificial Neural Network to create a model to forecast the amount of water discharged by the gate and in keeping the water level under control [20]; A neural network that improved gates outflow compared to traditional methods [52]; An evaluation tool to forecast water management, sludges and chemical products used in agriculture, which takes into account economics and environmental issues on the region supplied by Caia River [24]; A Fuzzy Logic based on two algorithms that shown efficiency at identifying a high probability of floods events and providing reliable results if compared with manual control ones [53].
Furthermore, the relationship assessment of variables from reservoirs and rivers natural system [54]; A Bayesian network to manage gates to avoid floods, helpful on decision making about which maneuvers has to be performed [55]; The analysis of water temperature variation due to dams structure revealed that gates operation does not have a great influence on water temperature, and that this variable is mainly influenced by climate conditions and hydrologic variables [56]; A Fuzzy Logic for the reservoirs operation system on hydropower plants, taking into account energy cost uncertainties on gate water flow [21].
Thus, the systematic literature review identified the concern of authors in increasing safety, pollution prevention, process efficiency and cost savings, which denotes the link between the gate operations for water dams and the economic, environmental and social aspects.

Research Methodology
This study is an exploratory and descriptive research. An exploratory research provides a wider familiarity to a problem, starting from a small subject to be explored, through a bibliographic research in conjunction with a case study, while a descriptive research aims to describe facts and events from a defined reality. This research consists of a case study that assumes qualitative and quantitative approaches for the data analysis. The development of this case study consists of five steps: (i) Problem definition; (ii) research delineation; (iii) data collection; (iv) data analysis; (v) results. Figure 1 shows the sequence of these steps. safety of the reservoir [23]; A real time automation system to perform civil works on structures and to verify possible displacements on checked positions [49]; A software for monitoring safety issues on waste dams, combined with images transmissions, videos and GPS, to avoid a catastrophic failure [50]; A technical approach to safety management at mining waste dams by means of tracking several dam indicators that allow to anticipate a possible safety alert issuance [51]. Additionally, the use of Artificial Neural Network to create a model to forecast the amount of water discharged by the gate and in keeping the water level under control [20]; A neural network that improved gates outflow compared to traditional methods [52]; An evaluation tool to forecast water management, sludges and chemical products used in agriculture, which takes into account economics and environmental issues on the region supplied by Caia River [24]; A Fuzzy Logic based on two algorithms that shown efficiency at identifying a high probability of floods events and providing reliable results if compared with manual control ones [53].
Furthermore, the relationship assessment of variables from reservoirs and rivers natural system [54]; A Bayesian network to manage gates to avoid floods, helpful on decision making about which maneuvers has to be performed [55]; The analysis of water temperature variation due to dams structure revealed that gates operation does not have a great influence on water temperature, and that this variable is mainly influenced by climate conditions and hydrologic variables [56]; A Fuzzy Logic for the reservoirs operation system on hydropower plants, taking into account energy cost uncertainties on gate water flow [21].
Thus, the systematic literature review identified the concern of authors in increasing safety, pollution prevention, process efficiency and cost savings, which denotes the link between the gate operations for water dams and the economic, environmental and social aspects.

Research Methodology
This study is an exploratory and descriptive research. An exploratory research provides a wider familiarity to a problem, starting from a small subject to be explored, through a bibliographic research in conjunction with a case study, while a descriptive research aims to describe facts and events from a defined reality. This research consists of a case study that assumes qualitative and quantitative approaches for the data analysis. The development of this case study consists of five steps: (i) Problem definition; (ii) research delineation; (iii) data collection; (iv) data analysis; (v) results. Figure 1 shows the sequence of these steps.
The steps described above will be approached in the following sub-sections. The first steps are the research problem definition and the literature review description. The second sub-section addresses research methods adopted to develop this case study identifying matters which are out of scope. The third section explains data collection systems from reservoir operations records and available information from a company data bank. Data analysis is in the fourth sub-section.

Problem Definition
The definition of a research problem is the typical approach of initiating an investigation. The research problem is the starting point to the following research activities [57]. The research question should be defined on an accurate, consistent and evident structure in order to present a clear notion of the objective. The research question must be realistic, so it may possibly be achievable and pertinent, approaching already explored matters on the main subject and looking for substantiated changes as a result of new studies about it. From a defined problem, in an objective and specific way, it is possible to guide the research, circumscribing its boundaries, allowing an investigation on The steps described above will be approached in the following sub-sections. The first steps are the research problem definition and the literature review description. The second sub-section addresses research methods adopted to develop this case study identifying matters which are out of scope. The third section explains data collection systems from reservoir operations records and available information from a company data bank. Data analysis is in the fourth sub-section.

Problem Definition
The definition of a research problem is the typical approach of initiating an investigation. The research problem is the starting point to the following research activities [57]. The research question should be defined on an accurate, consistent and evident structure in order to present a clear notion of the objective. The research question must be realistic, so it may possibly be achievable and pertinent, approaching already explored matters on the main subject and looking for substantiated changes as a result of new studies about it. From a defined problem, in an objective and specific way, it is possible to guide the research, circumscribing its boundaries, allowing an investigation on theoretical and relevant topics. The research problem showed at the introduction of this paper is a result of following the original question: Does the implementation of Artificial Intelligence on dam operations result on economic, environmental and social gains?

Research Delineation
The sanitation company involved in this research is a company responsible for supplying drinking water and for the sewage system in 371 cities at São Paulo State, Brazil, serving almost 28 million people, one of the biggest sanitation companies in the world in terms of served customers. The water production system mentioned in this study is one of the biggest production systems of the world and its configuration include six big reservoirs, forty-eight kilometers of tunnels and channels and a pumping station with 80,000 HP of installed power. The interconnection among reservoirs are made through tunnels and water channels, using mainly gravity due to level variation where the reservoirs are located.
In order to better evaluate this project, this study seeks to limit the analysis to the implementation of Artificial Intelligence at reservoir gates on tunnel number five. This tunnel connects Atibainha reservoir to Paiva Castro water system, streaming water to it. The aforementioned research limitation to a specific place is to reduce the analysis complexity, since if it is done on a different framework, collecting data in every place of the Cantareira system would be necessary. On the other hand, focusing on a specific operational place of the system does not affect benefits generated by this analysis and could apply to the system. The results can only be extrapolated for the whole water system in a qualitative manner, and never quantitative, since each operational place has its own characteristics. Figure 2 shows the boundaries of this study. theoretical and relevant topics. The research problem showed at the introduction of this paper is a result of following the original question: Does the implementation of Artificial Intelligence on dam operations result on economic, environmental and social gains?

Research Delineation
The sanitation company involved in this research is a company responsible for supplying drinking water and for the sewage system in 371 cities at São Paulo State, Brazil, serving almost 28 million people, one of the biggest sanitation companies in the world in terms of served customers. The water production system mentioned in this study is one of the biggest production systems of the world and its configuration include six big reservoirs, forty-eight kilometers of tunnels and channels and a pumping station with 80,000 HP of installed power. The interconnection among reservoirs are made through tunnels and water channels, using mainly gravity due to level variation where the reservoirs are located.
In order to better evaluate this project, this study seeks to limit the analysis to the implementation of Artificial Intelligence at reservoir gates on tunnel number five. This tunnel connects Atibainha reservoir to Paiva Castro water system, streaming water to it. The aforementioned research limitation to a specific place is to reduce the analysis complexity, since if it is done on a different framework, collecting data in every place of the Cantareira system would be necessary. On the other hand, focusing on a specific operational place of the system does not affect benefits generated by this analysis and could apply to the system. The results can only be extrapolated for the whole water system in a qualitative manner, and never quantitative, since each operational place has its own characteristics. Figure 2 shows the boundaries of this study.

Data Collection
The methods used to collect data were observation on practical field, documentation analysis and managerial reports. This step intended to verify conditions where technological innovation based on Industry 4.0 could work and to evaluate advantages that such system provides. Then, documental analysis carried a huge importance through electronic and printed systems, allowing access to historical information and operational data on systems covered by this case study. the main analyzed documentations were numerical database, operational reports, and performance indicators.
Moreover, direct observations were carried out about dam gates operational processes to identify characteristic conditions and relevant behaviors for this research. A direct observation has the advantage of providing an overview of the field for the researcher to have the same perspective of the operational team [57]. Information collected from databases and company documentation were

Data Collection
The methods used to collect data were observation on practical field, documentation analysis and managerial reports. This step intended to verify conditions where technological innovation based on Industry 4.0 could work and to evaluate advantages that such system provides. Then, documental analysis carried a huge importance through electronic and printed systems, allowing access to historical information and operational data on systems covered by this case study. the main analyzed documentations were numerical database, operational reports, and performance indicators.
Moreover, direct observations were carried out about dam gates operational processes to identify characteristic conditions and relevant behaviors for this research. A direct observation has the advantage of providing an overview of the field for the researcher to have the same perspective of the operational team [57]. Information collected from databases and company documentation were historical of maneuvers performed on tunnel 5 since year 2000 until March 2019, type of operation, water flow inside the tunnel (in m 3 /s) and recorded reservoir level. Other records are related to crew travels to perform maneuvers outside their working location, related costs for these trips, reports of eventualities, failure issues, lack of energy, etc.
In addition to modeling this system optimization, monthly data was also collected from January of 2000 to July of 2019, searching for following parameters: monthly average outflow from Paiva Castro reservoir; monthly average outflow on tunnel 5; fluvial inflow to Paiva Castro reservoir; recorded water losses at Paiva Castro reservoir; average precipitation over Paiva Castro reservoir; average evaporation. These records were also used as a data source to project definition and analysis of technical documentation that belong to the sanitation company, besides scientific papers about mentioned systems. Inquiries with suppliers and AI consultants were also performed to know the infrastructure required to the AI implementation.

Data Analysis
The data analysis is an empirical verification that offers further elements or relationships initially neglected. In addition, it provides an interpretation of new facts and a revision of initial hypotheses, looking for a proposition of new studies and researches. In this study, data analysis seeks to evaluate earned gains through implementation of Artificial Intelligence, covering economic, environmental, and social dimensions.
Under an economic perspective, the analysis consisted in accounting the total investment required for the AI system integration. This amount was compared with costs saving by system installation, such as vehicles rent, fuel, and labor costs (salary and working expenses). The results were submitted to a feasibility enterprise analysis, calculating the project net present value, internal return rate, payback time and return on investment. The Net Present Value (NPV) is found by the sum of the initial investment and the discounted cash flow of the period. Internal Return Rate (IRR) means the interest rate at which the net present value of all the cash flow from an investment equal zero. MS Excel was used to calculate the IRR. The payback time refers to the period to recover the funds expended in an investment. The positive value in accumulated cash flow indicates the payback period. The Return on Investment (ROI) is used to evaluate the efficiency of an investment or to compare the efficiencies of several different investments [58]. Two ways to calculate ROI, without consider the weighted average cost (WAC) of capital (Equation (1)) and after discounted WAC (Equation (2)).
The environmental analysis considered the amount of water conservation during a period between an order issuance for closing gates, up to the actual moment of completing this operation. Considering outflow through the gate and knowing the period between order issuance and proper execution of it, it is possible to calculate wasted volume of water. An automatic system, based on AI, is able to perform closing and opening gate operation autonomously and immediately, avoiding water waste. Another benefit from the environmental perspective was working trips reduction, less fuel consumption and related emissions. The total environmental gains were estimated from water losses volume and a smaller number of working orders issuance. The method suggested by Ritthoff et al. [59] considers the use of material intensity factors chart (MIF, Material Intensity Factor). This method is useful to evaluate environmental changes caused by extraction and uses of natural resources in four elements: abiotic, biotic, water, and air [60][61][62][63][64]. The ecosystem consists of biotic and abiotic elements; biotic elements are living organisms and abiotic are non-living ones [65]. Plants and heterotroph matter are examples of biotic organisms. Abiotic material, such as water, air, minerals and others influence biotic organisms [65]. The Intensity Factors of drinking water and truck transport are shown in Table 1. The Material Intensity Factor (MIF) analysis associates the mass balance (M) with the intensity factor (IF) of a substance to calculate the environmental impact at the ecosystem [62]. MIF calculation is shown in Equation (3).
The next step is find the Material Intensity per Compartment (MIC) that consists in the sum of MIFs in the compartment. The calculation of MIC abiotic is shown in the Equation (4). MIC for others compartments follow the same procedure.
MIC abiotic = (MIF drinking water + MIF truck transport ) abiotic (4) The sum of four MICs resulted the Mass Intensity Total (MIT), as described in Equation (5).
MIT = (MIC abiotic + MIC biotic + MIC water + MIC air ) The social perspective analysis was performed adopting a qualitative approach, using a literature research and related publications. Due to a complex momentum from multiple factors that permeate the way societies organize themselves, it is very difficult to quantify social gains, various conflicting indirect and multiple effects exist. Therefore, this study approaches a qualitative evaluation on these aspects, disregarding elaborate measurements indexes, which would escape from the main scope of this paper.

System before Artificial Intelligence Implementation
The reduction of work force, by laying off employees and retirement processes, required some adjustments on operational processes. After 20 dismissals, the remaining five operators would be asked to perform the maneuvers demanded by the system. The workers would have to travel to maneuvers locations when requested, long distances reaching 120 km, which generated extra costs and delays on operations. Another issue was the payment of extra shifts to operators, who would be on standby to perform maneuvers to which their presence was required on site. This structure generates further overtime costs and extension of working hours. Figure 3 shows the geographic locations of the Water Production System. Sustainability 2020, 12, x FOR PEER REVIEW 8 of 19

Required System after Artificial Intelligence Implementation
Measurement systems are fundamental tools to produce and supply water, especially when related to operational control on tunnels and dams. These systems adjust the supplying network through measurements and control of main processes parameters, like water level, outflow and pressure. Only through these data it is possible to know, diagnose and take actions accordingly, considering several operational situations concerning a water supply system. AI design implementation for dam operations at mentioned Sanitation Company, starts with creation of an Operational Control Center. It was done at a raw water pumping station in order to allow crews to observe operations within their working area under orders from hierarchy levels. Reservoirs online data allowed demonstrating the whole process control on every SPA operational unity, assuring major agility from crews, covering operational and management levels. It is designed to assure continuous loading of hydraulics and electrical parameters, enabling hydric balance preparation, as well as a full SPA diagnostic, based on actual system performance.
The Project includes provisions to buy and install new electric panels to replace the old ones, to supply and install integrated sensors to the internal company network, as well as materials and equipment: installation materials (cables, conduits, optical fibers, etc.) and equipment to install the Station Control Panels at the Companies units; controls instrumentation and sensors to control and operate valves/gates to discharging systems on dams downstream; six control panels for valves (PCV) to replace old equipment on dams; six electromechanical actuators with local and remote control and their proper installation on dams valves/gates; level, pressure and outflow gauges; positioning sensors for gates and valves; material and manpower for installation; atmospheric pressure discharges protection system technical suitability; civil and electric installation; and instrumentation for new features. The

Required System after Artificial Intelligence Implementation
Measurement systems are fundamental tools to produce and supply water, especially when related to operational control on tunnels and dams. These systems adjust the supplying network through measurements and control of main processes parameters, like water level, outflow and pressure. Only through these data it is possible to know, diagnose and take actions accordingly, considering several operational situations concerning a water supply system. AI design implementation for dam operations at mentioned Sanitation Company, starts with creation of an Operational Control Center. It was done at a raw water pumping station in order to allow crews to observe operations within their working area under orders from hierarchy levels. Reservoirs online data allowed demonstrating the whole process control on every SPA operational unity, assuring major agility from crews, covering operational and management levels. It is designed to assure continuous loading of hydraulics and electrical parameters, enabling hydric balance preparation, as well as a full SPA diagnostic, based on actual system performance.
The Project includes provisions to buy and install new electric panels to replace the old ones, to supply and install integrated sensors to the internal company network, as well as materials and equipment: installation materials (cables, conduits, optical fibers, etc.) and equipment to install the Station Control Panels at the Companies units; controls instrumentation and sensors to control and operate valves/gates to discharging systems on dams downstream; six control panels for valves (PCV) to replace old equipment on dams; six electromechanical actuators with local and remote control and their proper installation on dams valves/gates; level, pressure and outflow gauges; positioning sensors for gates and valves; material and manpower for installation; atmospheric pressure discharges protection system technical suitability; civil and electric installation; and instrumentation for new features. Sensors data will be sent to a gateway and will be processed, receive the signal and send it by cellular phone signal to a corporate ethernet network and a Company server.
The system supports total remote functionality, supervision and autonomous control to this system, offering selectable modes: manual (equipment being remotely operated without Logic Control), automatic mode (equipment works in closed loop using outflow variables), or local mode (manual operational mode, without any automation).
In addition to estimated and reached main results by this project in terms of economic, environmental and social benefits, there are other features, like developing a database containing alert issuance events, records of performed maneuvers, points of failures, energy shortage and tunnel outflow charts (on a daily, monthly and annual basis). In addition, it facilitates the whole storage of operational system strategy.
Paiva Castro is the last dam in the system, it is in the lowest position related to other installations part of this water system, vital to São Paulo Metropolitan area supply water. The supplying system requires a defined water volume to be pumped by Raw Water Pumping Station, and due to his significance, it was selected for initiating the studies to implement an AI program.
In the rainy season, from the beginning of November until the end of April, the reservoir must be maintained at a lower level, to allow a high volume of water inflow. Oppositely, during dry season, which goes from May to October, the reservoir must be set to a higher level. Table 2 shows programed levels for every period of the year. A Datalogger remote device was installed to control and storage data; It is an electronic board containing a programmable processor and works like a data logger exhibiting the following functions: programmable micro-controlled electronic board; managing a remote unit; digital electric signals acquisition from levelling sensors; internal memory space to data storage and program files; screen and pushbuttons to read and load functions and information; communication interfaces with a computer and transmission modem; data output via memory card.
A remote board/datalogger was installed with a reservoir level reading device and a level measuring ultrasound device with a 4/20 mA analogic output. When these data are loaded in PLC, a message is sent informing that when maximum reservoir level is reached, a command should be issued to close inflow gate, and when minimum level is reached the gate must be open. These operational commands define a viable opportunity for every period of the year, stablished according to Table 1.
To demonstrate that utilization of Artificial Intelligence (AI) is feasible to manage a gate control system, a simulation using variables was developed by a consulting company, which has same flow on the level of Paiva Castro dam. Values supplied by the AI without testing are not reliable, thus it is necessary to simulate the environment where the system will be installed to verify if the model will behave according to expectation, maintaining dams water level, according to usage and replacement.
The simulation was loaded with data from years 2000 up to 2019, having 1215 entries of maneuvers performed by company employees. Data of each entry had date, month, reservoir Atibainha level, tunnel 5 outflow level, which connects Atibainha reservoir with Paiva Castro reservoir, gate opening in meters, volume of rain per month and Paiva Castro reservoir level. In addition, the simulation was loaded with data related to evaporation, fluvial inflow, and downstream losses. Figure 4 below describes a list of data, demonstrating which variables increase reservoir level and which ones lower it. After the data loading on the system, the simulation uses 85% of entries (1035) to teach the model and 15% to its validation. Consequently, the simulation could learn the ideal gate opening, considering an absolute deviation of 3 cm. Figure 5 demonstrates the list of values for real gate opening and gate opening values, according to a model achieved through simulation. It means that gate opening values produced by AI should be the same, or very close to the actual opening, which should happen when the same recorded values are loaded in the simulation. AI model matches with actual values, as seen on Figure 5.  Figure 6 shows the simulation of Paiva Castro reservoir levels stable with data from the last four years. The simulation indicates that AI can manage the reservoir level and stabilize it accurately, which means an Artificial Intelligence system could be used for controlling gates of dams. After the data loading on the system, the simulation uses 85% of entries (1035) to teach the model and 15% to its validation. Consequently, the simulation could learn the ideal gate opening, considering an absolute deviation of 3 cm. Figure 5 demonstrates the list of values for real gate opening and gate opening values, according to a model achieved through simulation. It means that gate opening values produced by AI should be the same, or very close to the actual opening, which should happen when the same recorded values are loaded in the simulation. AI model matches with actual values, as seen on Figure 5.  After the data loading on the system, the simulation uses 85% of entries (1035) to teach the model and 15% to its validation. Consequently, the simulation could learn the ideal gate opening, considering an absolute deviation of 3 cm. Figure 5 demonstrates the list of values for real gate opening and gate opening values, according to a model achieved through simulation. It means that gate opening values produced by AI should be the same, or very close to the actual opening, which should happen when the same recorded values are loaded in the simulation. AI model matches with actual values, as seen on Figure 5.  Figure 6 shows the simulation of Paiva Castro reservoir levels stable with data from the last four years. The simulation indicates that AI can manage the reservoir level and stabilize it accurately, which means an Artificial Intelligence system could be used for controlling gates of dams.  Figure 6 shows the simulation of Paiva Castro reservoir levels stable with data from the last four years. The simulation indicates that AI can manage the reservoir level and stabilize it accurately, which means an Artificial Intelligence system could be used for controlling gates of dams. On the other hand, Figure 7 shows the historical levels of Paiva Castro dam from January 2000 to July 2019, indicating the actual level of the reservoir extrapolates maximum and minimum limits on some occasions. It suggests that if the AI system had been installed then, the response would be quicker and more effective, avoiding such abnormalities. The data set used on testing based on a set of situations recorded on the historical data of Paiva Castro reservoir, and all suitable events show the modeling tool fully achieved the expected results on this study.

Economic Evaluation
The Project cost was evaluated with consulting companies with AI expertise. It was considered, apart from required elements from the system to operate gates, (sensors and actuators), all lighting services, installation and structural reorganization, and existing electric panels replacement, resulting in US$ 171,140.00.
Before the implementation of this project, gate maneuvers and valves handling were executed manually, and trips by car to execute required operations would reach 120 km one-way in distance per maneuver, with annual average of 160 maneuvers. The travel distance takes into account the roundtrip 240 km times 160 maneuvers per year. It results the total of 38,400 km per year. Although the system after AI implementation does not require travels for maneuvers, the company keeps 80 roundtrips per year in order to perform safety inspections. Then, the reduction after AI On the other hand, Figure 7 shows the historical levels of Paiva Castro dam from January 2000 to July 2019, indicating the actual level of the reservoir extrapolates maximum and minimum limits on some occasions. It suggests that if the AI system had been installed then, the response would be quicker and more effective, avoiding such abnormalities. On the other hand, Figure 7 shows the historical levels of Paiva Castro dam from January 2000 to July 2019, indicating the actual level of the reservoir extrapolates maximum and minimum limits on some occasions. It suggests that if the AI system had been installed then, the response would be quicker and more effective, avoiding such abnormalities. The data set used on testing based on a set of situations recorded on the historical data of Paiva Castro reservoir, and all suitable events show the modeling tool fully achieved the expected results on this study.

Economic Evaluation
The Project cost was evaluated with consulting companies with AI expertise. It was considered, apart from required elements from the system to operate gates, (sensors and actuators), all lighting services, installation and structural reorganization, and existing electric panels replacement, resulting in US$ 171,140.00.
Before the implementation of this project, gate maneuvers and valves handling were executed manually, and trips by car to execute required operations would reach 120 km one-way in distance per maneuver, with annual average of 160 maneuvers. The travel distance takes into account the roundtrip 240 km times 160 maneuvers per year. It results the total of 38,400 km per year. Although the system after AI implementation does not require travels for maneuvers, the company keeps 80 roundtrips per year in order to perform safety inspections. Then, the reduction after AI The data set used on testing based on a set of situations recorded on the historical data of Paiva Castro reservoir, and all suitable events show the modeling tool fully achieved the expected results on this study.

Economic Evaluation
The Project cost was evaluated with consulting companies with AI expertise. It was considered, apart from required elements from the system to operate gates, (sensors and actuators), all lighting services, installation and structural reorganization, and existing electric panels replacement, resulting in US$ 171,140.00.
Before the implementation of this project, gate maneuvers and valves handling were executed manually, and trips by car to execute required operations would reach 120 km one-way in distance per maneuver, with annual average of 160 maneuvers. The travel distance takes into account the roundtrip 240 km times 160 maneuvers per year. It results the total of 38,400 km per year. Although the system after AI implementation does not require travels for maneuvers, the company keeps 80 roundtrips per year in order to perform safety inspections. Then, the reduction after AI implementation is 19,200 km per year. This would generate costs to cover crew transportation (like fuel consumption), as well as travel and operating time in each installation. Table 3 shows annual economic gains after project implementation. In addition, other significant gains are: increase on gate control of outflow speed, since performance will be completed in real time (online); manpower optimization, as operators do not have to leave their work place to perform maneuvers; time wasted on travels and reduction or elimination of risks of traffic accidents; overtime reduction once maneuver activities could be programed to happen at any time, without extending workers shift; electronic storage of technical operational system knowledge, contributing to a better company management. Furthermore, there is the total investment (forecasted in US$ 171,140.00), and benefits generated annually (forecasted in US$ 92,930.00), which are demonstrated in Table 3. Highlights that the investment took into account resources for improving the workers qualification at using AI. This qualification does not change wage. Moreover, there is no lay-off employees due to the company shifts the reduced workforce to other operational unit.
Further information was necessary in order to evaluate the financial feasibility of the project to allow assembly of a projected cash flow. The operational system cost was defined, with a conservative budget estimate. These figures reach up to 10% over total investment, which means around US$ 17,100.00 per year. Such amount refers to operational costs and new components maintenance costs that were added to project implementation. On top of that, project components have been estimated for a ten-year lifetime and investment depreciation is considered on a linear sequence during this period, reaching an annual value of US$ 8540.00.
The feasibility financial analysis used the discounted cash flow method by calculating the parameters under normal conditions for evaluation on venture feasibility studies. Indicators used were: Internal Return Rate (IRR); Net Present Value (NPV); Discounted Payback Period and Return on Investment rate (ROI). To project discounted cash flow, Weighted Average Cost of Capital for Sanitation Company was used, considered at 7.5% per year. As this Weighted Average Cost (WAC) is considered an actual rate, cash flow will be calculated on a constant value base, without readjustment due to inflation, which will not lead to an analysis distortion. Table 4 presents the project cash flow.
The Net Present Value (NPV) for project installation is over US$ 227,250.00, proving the economic feasibility of this project. The Internal Return Rate is 32.80%, much higher than Weighted Average Cost (WAC) from Sanitation Company. Related to this study, Discounted Payback Period will happen during the fourth year after initiating system operation. Return on Investment (ROI) period is 3.5 years, considering 248.65% as a single version and 132.79% taking into account Discounted Cash Flow (Actual Return). The results are shown in Table 5.

Environmental Evaluation
Dams are reservoirs of water that allow keeping the water outflow constant to ensure water supply to cities, mainly in the dry season. Downstream controls by means of AI have better responsiveness, maintaining outflow on a regular and steady level, which results in reduction of water consumption.
Water production systems need around 160 downstream maneuvers per year. The average downstream outflow (river flow direction) is 6000 L of water per second. Whether downstream reduction maneuvers were required, this task took two and a half hours to be completed, since operators should travel a distance of 120 km for closing all water stations. After AI implementation, this type of maneuver is performed immediately. For instance, if maneuvers require a gate to be closed to reduce outflow in 50%, it will save 3000 L of water per second. When operation time is reduced by 2.5 h (9000 s) the system saves 27 million L in each maneuver (9000 s/maneuver × 3000 L/s). Considering an average of 160 maneuvers per year, it represents 4.32 billion L of water on technical reserve per year. This annual amount is enough to supply water to 73,000 people (considering an average daily consumption of 162 L/person). This figure has special relevance during dry season, when the company frequently reduces the water pressure on system to avoid interruption on the water supply.
Still in this sense it is possible evaluate other gains; lowering gas emissions, since crews do not have to travel 19,200 km per year, calculating the same 160 annual maneuvers/year. On top of that, fuel savings reaching a total amount of US$ 6330.00 as presented in Table 3. According to [53] every vehicle using internal combustion engines release a lot of toxic elements to the atmosphere, that when inhaled by humans could cause several negative effects to health, affecting mainly elderly and young individuals. When the engine of cars burn fuel, they release carbon dioxide in atmosphere, contributing to the greenhouse effect and global warming. In this sense, this project contributes to lower gas emission to the atmosphere, avoiding trips to perform dam maneuvers. The environmental gains founded by means of MIT calculation are shown in Table 6.

Social Evaluation
Every water production system contributes to increase human life quality. According to the World Health Organization, the recommended water consumption is 110 L/inhabitant/day, considering a minimum volume of 100 L/inhabitant/day to maintain a proper level of hygiene and health. In Brazil, the average consumption is 162.6 L of water daily, which instigates search for new sources of water that are usually harder to reach. Besides, the AI implementation improved the management for contingency plans (floods) and the safety reliability of dams. It includes significant gains about social aspects for population located downstream. Still on that sense, every water system reservoir has a contingency flood plan, which is applicable during the rainy season in order to store maximum water capacity and maintain river courses. This process contributes to avoid flooding cities and villages near dams. Then, water level is maintained in the lowest level through gates operations, in order to be feasible to absorb great volumes of water coming from upstream rivers, which had their outflows increased by heavy rains. This Intelligent Operational Project provides faster responsiveness in the operation, avoiding emergency situations. A contingency plan works in automatically, controlling the gate position to control the water level.
Internal gain was also observed in the company. At every water production system, there are several operational procedures in real time that are transmitted by workers over the time. With this project, all these procedures are stored inside a computerized system, assuring a higher retention for operational knowledge system, building an electronic database for technical operational knowledge. It contributed to increase the knowhow on the system to work safely near communities.
An example of uses to this autonomous system could bring more social benefits, is its agility and quickness at flood events, where contingency plans has to be activated. In 2016 there was a storm that triggered floods contingency plan. Due to heavy rains on that occasion, on 11th March 2016, Paiva Castro reservoir volume increased from 45% to 97% in less them 24 h, forcing gates to be opened to prevent risk of overflow over the higher edge of the dam, or even collapse. Due to this operation, dam outflow to Juqueri River reached 50m 3 /s, compared to a normal outflow of only 1 m 3 /s. Franco da Rocha city was affected, where some streets were flooded and at least 35 people were removed from their homes. This operation had an impact on several surrounding communities as well. With the use of an automatic system with faster response, torrential rainfall effects could be minimized by a gradual opening of the gates, including the fact that operation could be started earlier, instead of a sudden gate opening when the situation became critical.
With gate automation using AI, opening and closing operations became independent and totally driven by technical requirements, more transparent, and without any possibility of subjectivities. The adoption of this technology increases controlling operational limits reliability, reducing overflow risks of dams, mitigating unfortunate incidents as one that happened in Franco da Rocha city in 2016.

Discussion
The investments on industry 4.0 technologies presented in this study increased the operational efficiency and the level of sustainability, provided by a real time automatic monitoring and operational costs reduction. The AI implementation improved the agility of reservoir water level management, avoiding trip expenses by operational crew, besides to maintain water volume on optimal levels, avoiding waste of water. Moreover, the results demonstrated that an integrated management of dam control systems reduced impacts on environmental and social factors.
The account of economic gains highlighted the cost saving by the use of an autonomous system that allows to reduce trips expenses and labors costs. Fuel cost reduction is also evident with trips number reduction to perform maneuvers. Moreover, the gates actuation is performed in real time, optimizing manpower, by centralizing operators on their proper workplace, and ceasing the need to travel between locations. Another economic evidence is the reduction on overtime made by operational crews, once they do not need to extend their working shifts anymore. The aforementioned result corresponds with Mao et al. [22] research which identified a multiplication of imprecise data and proposed an efficient processing algorithm PT-Top K biphasic, capable of select monitoring data for dam safety, reducing transmission costs by 87.5%. It was a reaction time gain up to 54.5% faster in this transmission. Magrini et al. [12] introduced a safety-monitoring model for dams on hydroelectric power plants, transmitting communication data through intelligent electronic devices. This model uses IoT as a low-cost tool to solve hardware platform integration [12]. Therefore, this paper moves forward, establishing that Artificial Intelligence, enabling technology for Industry 4.0, showed relevant economic gains with projected return of investment, and represents possibilities on economic advantages to Sanitation Companies and Water Production, due to lowering operational costs, increasing agility and assuring fuel savings with less trips to perform maneuvers operations. In this direction, this article supports in practice and theory, by analyzing Industry 4.0 elements, offering an economic feasibility.
On top of that, this study demonstrates that results from implementation of an autonomous system control enables environmental gains through the reduction of water consumption and pollutants gases emission. Agility on answer and operation of a hydrologic system is fundamental for the safety of the user and health of populations surrounding the water system. The implementation of such technology increases reliability on system operation assuring a better balance between water reclamation and demand supply. Water savings due to real time maneuvers allows enough water storage to serve a city with 73,000 inhabitants per year. These figures are consistent to Easwaramoorthy [38] research results which discussed that dams level control can be reached by increasing and lowering the amount of stored water, through IoT, instead of a conventional mode control, and it is able to replace physical control. This paper moves towards environmental gains, reducing gas emissions to the atmosphere released by fuel vehicles in previously necessary gate maneuvers made in person. Another gain considered, representing a huge relevance, was water savings with maneuvers being performed in real time. It shows the importance of using technology for environmental gains. In such case, this article shows that the matters discussed is confirmed, in practice and theory, by showing and quantifying environmental gains due to implementation of an Industry 4.0 technology.
The social gain by controlling river floods downstream to the reservoir where the system was implemented in Paiva Castro dam. The autonomous and effective controlling of implemented system, including online monitoring with fast responses, assure that reservoir water will be at appropriate level all the time, avoiding that thousands of people experience flooding negatives effects. This performance assures that the system will follow, technically, the contingency plans, displaying transparency to official agencies. This paper cooperates with research carried out by Jia et al. [17] where a decision model was developed, in real time, dam operations to mitigate floods, having as a result an optimal solution. This model was applied at Shiguan River in China, where there are two reservoirs and three flood control checkpoints. The model showed a performance in reducing inflow peaks in every operational scenario. This result also supports another research paper carried out by Saha et al. [15], where dam gates automation was developed using Programmable Logical Controls (PLCs) with emphasis on population safety at downstream locations, offering a proposal for using a specific PLC. Human presence downstream of dams was considered, fulfilling needs of irrigation and electric power generation. This research introduces advances in qualitative social gains due to floods mitigation at downstream communities, through expedite maneuvers execution, being performed within technical criteria including Artificial Intelligence usage. This matter improves reliability and transparency on dam management, helping floods contingency plans. At this time, this article cooperates with practice and theory, by considering social aspects mitigation, as a result of technologies implementation of the Industry 4.0.

Conclusions
This study reached its main objective to account the economic, environmental and social gains by means of Artificial Intelligence implementation, as a path to implement Industry 4.0 concepts at dam operations. The economic advantages meant total savings of US$ 51,000.00 per year and return on investment within three and a half years. The environmental accounting demonstrated the reduction of water consumption of 5.7 million tons per year. Moreover, less emission of gas due to vehicle travels reduction saved 19,200 km on trips per year, which meant that less 45 tons of pollutant gases on atmosphere per year. The social benefits were the higher security on system operation during floods periods at dams. The contingency plan for such period was implemented according to used technology, assuring its technical execution, controlling and maintaining the river course, avoiding floods on urban areas and reservoirs downstream communities.
The theoretical contribution for the science relies on the first study that evaluated the economic, environmental and social gains by means of AI implementation in dam operations. This evaluation aimed at stimulating actions to increase the level of sustainability in dam operations. This suggests opportunities for future studies into the evaluation of others Industry 4.0 Enabling Technologies, such as cloud computing and Big Data to improve dam management systems. Furthermore, extending the social evaluation through the quantitative approach by analyzing the damage caused by the floods and the impact on the population is also a recommendation for future researches.
The contribution of this study towards organizational practices is related to promoting the adoption of AI in water supply systems. The positive results shown in this case could influence managers to seek for new helpful technologies at reducing hidden wastes in operational processes. In addition, this study brings social impact by increasing the system reliability, which mitigates risk of accidents that impact people.
The focus on AI implementation in a single dam was the limitation of this study due to the complexity of the water production system in one of the extensive water companies in the world. The approach on a single location of the system was important to allow examination of isolate effects as well as quantify gains, given that the dam in question is part of a great and complex system.