# Application of Machine Learning Models in Optimizing Wastewater Treatment Processes: A Review
## 2 Wastewater Treatment Processes in an Industrial Wastewater Treatment Plant
### Stages of the Wastewater Treatment Process
In the mechanical treatment subsystem, the wastewater undergoes gravitational separation, fat flotation, and sedimentation processes. In addition, flotation processes (such as dissolved air flotation, which are often used in conjunction with fat separators and decanters) are employed to separate fats, TSS, and oils. The effectiveness of this method depends on particle size, density, and the chemicals added (coagulants and flocculants) to achieve particle aggregation [20]. By using grills and screens, large bodies and suspended solids are removed. Subsequently, oils, greases, and other substances lighter than water are removed from the treated water using separators. Sand separators and decanters are used for separating suspended solids. The obtained treated water flow rate (at the mechanical stage output) is applied to the treatment processes related to the second subsystem (chemical treatment), such as pH neutralization, precipitation, coagulation, flocculation, oxidation, and reduction. Additionally, at this stage chemical precipitation of wastewater occurs (removing heavy metals, sulfides, nitrates, phosphates, etc.) through the use of specific chemical reagents, including aluminum sulfate (Al\({}_{2}\)(SO\({}_{4}\))\({}_{3}\)), ferric chloride (FeCl\({}_{3}\)), and hydroxides (OH\({}^{-}\)). This step is followed by coagulation, which involves mixing the wastewater with coagulants, and then flocculation, the second stage of coagulation, during which particles are aggregated into larger flocs [6]. The reagents (neutralization agents, coagulants, and flocculants) are prepared and dosed in the mixing-reaction tank using dosing pumps. The mixing-reaction tank, where the chemical stage processes take place, consists of two compartments: the basin where the wastewater to be treated is mixed with the chemical reagents, and the reaction basin where the chemical reactions corresponding to the chemical processes occur. The output of the mixing-reaction tank becomes the input for the flotation decanter, where sedimentation and flocculation of particles and sludge occur [20]. The chemically treated water enters the aeration basin corresponding to the biological subsystem. In this basin, the necessary nutrients are dosed using blowers to support the development of microorganisms and provide the required oxygen for the degradation of organic matter. Figure 1: WWTP block diagram. Bacteria need organic matter (to feed) and oxygen (to breathe) to rapidly multiply (creating more biomass), and to clean the wastewater. The bacteria are more active when they receive more oxygen (pumped into the wastewater aeration process); thus, the pollutants from wastewater are removed faster. The bacterial communities (that form the activated sludge) are consuming BOD and COD [6]. In the final decenter, the suspensions resulting from the biological treatment are retained, and the sludge is recirculated to the aeration basin. The treated water that is discharged into the plant effluent and the excess sludge represent the outputs of the biological step.