ANDROID APPLICATION FOR THE INFORMATION OF THE WASTEWATER pH NEUTRALIZATION PROCESS HUMAN OPERATOR

The wastewater pH neutralization process from a wastewater treatment plant is one of the most important processes from a plant chemical step, having a strong nonlinearity and also a dynamic behavior. The multiple emergency situations that can occur in the pH neutralization process operating affects the biological processes with undesirable consequences on the plant emissary. So, the real-time information of a plant human operator regarding the problems that occur in the pH neutralization process is absolutely necessary for the optimal treatment process operating and problems prevention. The paper presents an Android application for real-time information of the wastewater pH human operator, application that uses React Native v.0.64 technology, PHP and MySQL languages. The developed application has a number of component modules (the authentication module, the process monitoring module and the module for real-time information (warning) of the process human operator), modules that works both on Android and iOS devices. The main advantage of the application is that it provides in real-time a detailed warning report for the process human operator, report that can be access by the operator on his Android device and used later in similar situations in order to take the best decisions. A set of simulation results related to the developed application is also presented, for different process disturbances.


INTRODUCTION
The wastewater treatment processes from industrial plants are very complex, dynamic and nonlinear. A process that has a strong nonlinearity and that has a high influence on the other chemical processes from a wastewater treatment plant (WWTP) and also on those from a plant biological step is the wastewater pH neutralization process.
The technology behind the treatment processes, especially the pH neutralization process, is continuously improved for new quality standards (Technical Normative for Water Protection, NTPA-001/2002 and NTPA-002/2002) and new requirements to minimize energy consumption and also to increase the operating efficiency: state-of-the-art hardware and programming development techniques, the ensuring of a low consumption of pH neutralizing reactants, the process adaptation with minimal costs. An important aspect is the "know-how" of the process human operator who must own the necessary tools (knowledge, information, data, software programs and hardware equipment's) for real time process monitoring. Also, the operator uses his "know-how" in the process of making the best decisions and actions regarding the pH neutralization disturbances (such as the variations in the reactant concentration and flow, etc.), in establishing the acid or alkaline reactant flow necessary for pH neutralising, in solving the failure of reactant pumps or the damages in the automatic reactant dosing system. The real-time information of the process human operator is essential for the optimal process operating, while making the best decisions regarding the occurred problems with benefits on reducing the operating costs. So, the process human operator must have available, at any time, a set of tools, applications or systems to be constantly up to date with the events which take place during the process operating.
At national level, concerns in the development of systems for real-time information of the wastewater treatment processes human operator have increased in recent years, in the desire to find that tools that can assist the operator in the decision making process. Thus, a series of systems, applications have been developed, but most of these systems intended for the monitoring of treatment processes are of SCADA (Supervisory Control and Data Acquisition) type systems and PLCs, being used internationally and also adapted to the requirements and realities at the national level. Using the SCADA systems the human operator can access the process data stored in data bases, measurements in several formats (digital, analogue), can visualise the alarms automatically generated by the system, can access the activity reports daily generated containing the installation operating parameters and the reports containing the treated water parameters at their discharge into the plant emissary, the diary of previous events (alarms lists) and the actions that have been taken, the periodic activity reports and also it can modify the PID (Proportional-Integrator-Derivative) control loop, etc [2,16].
At international level, the research in this field is very varied. A number of applications (some of them using artificial intelligence techniques), systems (BIOEXPERT [8], ISCWAP [17], GESCONDA [4], SCADA [2,16], etc.) have been developed for real-time information of the wastewater treatment processes human operator, systems implemented in different WWTP's. The best solutions are looked for the development of an application or system capable of ensuring the real-time information of the plant human operator for the permanent improvement of his "know-how".
In this paper it is presented an Android application, named InfoHOp that has a number of functions, of which the most important is that of informing the human operator about the emergency situations occurred in the wastewater pH neutralising process. A very important aspect is that the application is secure (has an authentication module through which only the authorization operators with username and password can view the issued alerts), is non-stop functional and has several alarm (visual and audible) facilities.
The paper has the following structure:  A description of the wastewater pH neutralization process from a WWTP chemical step;  The presentation of the developed Android application (InfoHOp) for real-time information of the wastewater pH neutralization process human operator.

THE WASTEWATER pH NEUTRALIZATION PROCESS
From all the chemical treatment processes, the most important in terms of the influence on the other processes -especially on those from the chemical and biological stage -is the process of pH neutralizing (the process of bringing the pH to the neutral value). It is known for its dynamic behaviour and strong nonlinearity ( [1], [6], [7], [9], [10], [12], [14], [15]) given by the shape of the static characteristics (curves of titration) from literature, some of which being presented below ( Fig. 1) [6]. So, to bring a pH = 2 (strong acid) to a neutral pH, approximately 3.6 [litters/min.] of strong base neutralization solution (NaOH, Ca(OH)2 of 10% concentration) should be used at 1000 [liters/min.] of used solution, and to bring a pH = 6 (weak acid) to neutral pH, 3.6x10 -4 [liters/min.] neutralization solution with a concentration of 10% strong base at 1000 [liters/min.] solution must be used to achieve pH = 7 ( Fig. 1.a) [6,9].
Regarding the pH neutralization process, it can be observed that [6,9]:  if the input pH changes in the range [2…6] units, the necessary reactive flow varies into a ratio of 10000: 1 (3.6/3.6x10 -4 );  because the strong nonlinearity of the process static characteristics, the accuracy of the reactive dosage depends directly on the inlet pH of the solution; also, the amplification of the process is extremely high for input pH = 2 or 12 units and becomes less severe when the pH approaches the equivalence point (pH=7).
Also, the titration curves of a strong acid (H2SO4) with a base (strong base) (Ca(OH)2) in solutions of different concentrations, are those presented in Fig. 2 [6,7]. In Fig. 3 are presented the curves representing the pH variation when titrating an acid (strong acid) with a base [10]. Figure 2. Titration curves of a strong acid with a base [6,7]. Figure 3. Titration curves of an acid with a base [7].
As can be seen in Fig. 2, the pH variation around the equivalence point (∆pH = 7) when titrating strong acids (H2SO4) with bases (strong bases) (Ca(OH)2) is very large and also symmetrical [12]. Analysing the titration curves from Fig. 2, can be deduced five characteristics regarding the shape of the titration curve of a strong acid with a base (strong base) [7]:  a symmetry of the curve around pH = 7 (equivalence point);  a sudden change in pH around the equivalence point, so a strong pH variation around equivalence point;  a pH dependence only on the concentration of the titrated acid on the first part of the curve (up to equivalence) and a pH dependence only on the titrated base concentration on the second part of the curve (after equivalence);  a decreasing in the concentration of the titrating strong acid solution leads to a decrease in the pH variation around the equivalence;  the size of the pH variation around the equivalence influences the accuracy with which the equivalence point is determined.
Analysing Fig. 3 the following aspects can be deduced [10]:  when neutralizing a strong acid with a strong base, the equivalence point coincides with the neutral point (pH = 7); on both sides of the equivalence point, the pH varies very fast between pH = 3.5 and 10.5 (curve I);  when a weak acid is neutralized with a strong base: the equivalence point coincides with pH = 8.89 units; the pH rises very slowly about 7.5 units, then suddenly about 10.5 (curve II); also, the titration curve II overlaps at pH strictly higher than the equivalence concentration with curve I, but differs from it at lower pH;  when neutralizing a strong acid with a weak base, the titration curve III overlaps at pH strictly lower than the equivalence concentration with curve I, but differs from it at higher pH;  when neutralizing a weak base with a weak acid, the pH varies slightly, between 4 and 8 units; the titration curve consists of the left branch of curve II and the right branch of curve III.
The slope of the titration curve is very steep around the equivalence point, because for a small fraction of titrant added, the pH changes by almost 8 units. The shape of the titration curve is influenced by the concentration of the acid and the base. As the concentration decreases, so does the size of the pH slope (the equivalence point is always at pH = 7). Titration of a base (strong or weak) with a strong acid is similar to titration of a strong or weak acid, the only difference being that the pH changes in the opposite direction [12]. So, there is a strong pH variation near the equivalence point, a variation influenced by the titrant nature and concentration, being highlighted the fact that a reduction of the reactant concentration leads to a reduction of the pH variation around the equivalence point [9,10]. Because wastewater usually comes from several plants, it can be acidic or basic, which is why two neutralizing agents are needed, both basic (NaOH, Ca(OH)2) and acidic (H2SO4). In case of neutralization of a strong acid with a base (strong base), the increase of pH is very sudden at a small variation of the reagent, reason for which it is difficult to achieve a stable control with a linear controller [1,5]. The pH has a strong variation even when a small amount of strong acid or strong base is added, the process being very sensitive around equivalence point and the process nonlinearity of neutralizing a strong acid with a strong base is more pronounced than in the case of neutralizing a weak acid with a strong base [11].
The titration curves from literature highlights the strong nonlinear character of the neutralization process (pH strong variation around the equivalence point), which reveals the process complexity, whose block diagram (together with the transducer and the associated execution elements) in the author's vision is presented in Fig. 4.

THE InfoHOp ANDROID APPLICATION
For designing the Android application InfoHOp, dedicated to real-time human operator information regarding the emergency situations which take place in the pH neutralization process operating from a WWTP, were used the technologies from several branches of software engineering, such as: React Native (framework for JavaScript language, used to connect with native Android items), PHP (Hypertext Pre-processor) programming language necessary for the application server side component and also MySQL (My Structured Query Language) for the application associated data base.
React Native v.0.64 is an open-source mobile application framework, being crossplatform (iOS and Android), reason why the developed application can be compiled on both Android and iOS devices, and also using the web browsers. The versatility given by this feature offers the advantage of a much easier portability of the presented application on a variety of devices without changing the source code. So, React Native it is used to develop applications for Android, Android TV, iOS, Mac OS, tv OS, Web, Windows and UWP, allowing to the developers to use the React framework with the native platform [19].
The main functions of the proposed Android application (InfoHOp) are:  the warning function: is the most important function of the application, through which the human operator is informed (through sound and visual warnings) about the disturbances (the failure of reagent dosing pumps, variations in the concentrations and flow of acidic (H2SO4) or alkaline (Ca(OH)2) reactants; variations in wastewater flow, etc.) occurred during the pH neutralization process operating;  the monitoring function: shows in real time the state of the process equipment's (the state of the reagent dosing pumps and stirrer) and also the process inputs (pH value, Ca(OH)2 and H2SO4 flows) and outputs (pH value at the process output, after neutralization);  the authentication function: a security method through which only authorized personnel (the neutralization process human operator) can access the application interface and implicitly the displayed data; the authentication ( Fig. 5) is validated based on a username and password associated with it; the authentication data is kept only during the use of the application, if the user closes the application the data will be deleted, in this way the data security is ensured;  the generating and saving of a PDF file (available, at any time, to the neutralization process human operator on his Android device), file that contains the data referred to the perturbations that occurred during the wastewater pH neutralization process operating (Fig. 5); the obtained data will be used by the human operator in making future decisions necessary under similar operating conditions.
The proposed application has two modules, respectively the Web module and the Android module. The Web module and the application database (which contains the available data from a studied industrial WWTP [11]) are hosted on a web server for better communication and debugging. The Android module is connected to the application from the web server, queries the database through an API (Application Programming Interface), the data exchange being performed through a JSON file (JavaScript Object Notation).
The authentication module (Fig. 5) is the first component of the application with which the human operator interacts, being composed of a graphical interface containing the input fields for authentication data entry and a function to process and validate (by comparing them with predetermined authentication data) the entry data. The module for monitoring the pH neutralization process is only visible if the authentication has been validated. It consists of a graphical interface where the monitored equipment's and parameters are displayed (the pH value, the status (on-green; off-red) of reactant dosing pumps, the mixing and reaction chamber status) (Fig. 6) and also a function that takes the data from the application database and displays it for each graphical element mentioned above. The module for warning the human operator in case of a pH neutralization process disturbance (the failure of reagent dosing pumps, variations in the concentrations and flow of acidic (H2SO4) or alkaline (Ca(OH)2) reactants; variations in wastewater flow, etc.) consists of a graphical interface similar to that of the monitoring module where are displayed the equipment's malfunctions and the monitored parameters values, a function for generating the audible warning and a graphical interface where the states of the process equipment's and parameters are detailed in a simplified form.
So, in Fig. 6 is presented a case of failure at the alkaline reactant pump, the failure being signalled through the red colour button and by audible warning. If a malfunction occurs, the "show warning report" button appears, in this way the human operator has access to more detailed information regarding the disturbance that occurred in the pH neutralizing process operating. In the same figure is presented the case where no disturbance has occurred, both dosing pumps being in perfect working order (signalled through green colour), as a result the "show warning report" the button is not visible.
In table 1 is presented a selection of the simulations (Fig. 7, Fig. 8 and Fig. 9) achieved with the developed application (InfoHOp), for different process disturbance's.    In the first simulation presented in Table 1 and Fig. 7, is considered a disturbance (the alkaline reactant flow variation) occurred in the process mixing-reaction chamber, disturbance (alkaline solution pump failure, alkaline reactant overflow) signalled by the application to the human operator. The alkaline reactant dosing pump inserts 3.9 [liters/ min.] for a pH value equal to 2 units, the optimal dose to bring a pH=2 units to the imposed set point (SP) being 3.6 [liters /min] [6].
In the second simulation (Table 1 and Fig. 8) is observed another process disturbance that occurred into the mixing-reaction chamber, respectively the technical failure of the stirrer, disturbance signalled by the application by changing the stirrer state from "on" to "off".
In the third simulation (Table 1 and Fig. 9) is considered as disturbance the H2SO4 dosage pump failure (to bring an alkaline pH=8 units to a neutral one, it is necessary the dosage of an acid reactant, namely sulphuric acid) so the pH can can't be brought to the imposed SP. Also, is observed another process disturbance that occurred into the mixing-reaction chamber, respectively the technical failure of the stirrer, disturbance signalled by the application by changing the stirrer state from "on" to "off".
In each case, as it can be observed in Fig. 7, Fig. 8 and Fig. 9, the application supplies to the human operator of the pH neutralization process a very useful report (which can be accessed and most important it can be downloaded on the human operator Android device) with the disturbances that occurred during the process operating, reports very useful in taking the best decisions in preventing the similar process operating problems which may occur in the future.

CONCLUSION
The paper proposes an Android application for real-time information of the wastewater pH neutralization process human operator, named InfoHOp, which can be a useful tool in making the best decision regarding the problems that may arise in the wastewater pH neutralization process operating from an industrial WWTP. Using such type of applications process disturbances and installation failure can be prevented, with positive effects on process operating costs.
The application uses a set of programming technologies such as React Native v.0.64, PHP and MySQL. Also, the developed application modules (the authentication module, the process monitoring module and the module for real-time information /warning of the wastewater pH neutralization process human operator) work both on Android and iOS devices, benefiting from the advantages of Android type applications, such as portability, real-time monitoring, real-time warnings, real-time results and real-time corrective and preventive actions, the access of real time values of wastewater quality [3,18].
From technical and economical point of view, the proposed Android application for realtime information of the process human operator does not require many hardware resources to be used.
Also, the proposed Android application for human operator information is scalable and easy to use. In terms of user experience, the application graphical interface is simple, intuitive and easy to use.
From the point of view of functionality, the main advantage of the application is its portability and accessibility. The application can be installed on any device with Android operating system with a version newer than 4.4. Through a configured VPN, the application can be accessed from outside the wastewater treatment plant in cases of extreme need.
The proposed application can be improved by adding new features such as:  the generating and downloading of complete reports for the WWTP human operator containing the data related to the evolution over time of other parameters (total suspended matter, extractable, biological oxygen consumption, chemical oxygen consumption, chlorides, etc.) at the WWTP chemical input and output; also, to the developed application can be added a module for the monitoring of the WWTP biological processes (natural biological treatment, aerobic treatment with activated sludge, aerobic purification with biological film and anaerobic treatment process) [13];  the adding of a facility that allows the emergency shutdown of monitored process technical equipment when a perturbation has occurred or when an equipment has failed; also, the adding of a module to prevent a disturbance (considered or not) as quickly as possible.
The authors main contributions made are:  the development of a server-side application using PHP language which has the role of extracting the data related to the neutralization process from a MySql database, processing them and displaying them as JSON objects;  the development of an Android type application for real time information of the process human operator regarding the failure situations (disturbances) occurred during the operating of the wastewater pH neutralization process.