Abstract
Ion-exchange-based wastewater treatment processes exhibit nonlinear and time-varying dynamics, making the control of total dissolved solids (TDS) and water hardness a complex task. Conventional Proportional–Integral–Derivative (PID) controllers often show limited performance under such conditions due to fixed tuning parameters and linear assumptions. To address these limitations, this study presents a comparative evaluation of traditional and intelligent control strategies for regulating TDS and water hardness through influent flow control. A classical PID controller is compared with fuzzy logic and Adaptive neuro-fuzzy inference system (ANFIS) controllers using a unified MATLAB/Simulink simulation framework. The control performance is evaluated based on dynamic response characteristics, including rise time, settling time, and overshoot. For TDS control, the PID controller exhibits a rise time of 15.9 s and a settling time of 50.9 s, while the fuzzy logic controller improves the response with a rise time of 13.6 s and settling time of 44.1 s. The ANFIS controller achieves the fastest response, with a rise time of 8.31 s and a settling time of 27.1 s. Similar trends are observed for water hardness control, where the PID controller shows a rise time of 17.0 s and settling time of 55.8 s, the fuzzy logic controller reduces these values to 12.3 s and 40.4 s, respectively, and the ANFIS controller further improves performance with a rise time of 9.23 s and settling time of 30.3 s. The overshoot values for all controllers remain comparable, within the range of approximately 4.4–5.0%. The results clearly demonstrate that intelligent control strategies, particularly ANFIS, provide significantly faster convergence and improved dynamic performance compared to conventional PID control. The reduced settling time implies lower control effort and decreased energy consumption, highlighting the potential of intelligent controllers for efficient and reliable industrial wastewater treatment applications.
1. Introduction
Increasing freshwater scarcity and growing industrial activity have intensified the demand for efficient and reliable wastewater treatment technologies [1,2]. Industrial wastewater often contains high concentrations of dissolved salts and hardness-forming ions, which pose significant challenges to both environmental safety and water reuse [3,4]. Among various treatment methods, ion-exchange resin-based technologies are widely used because they can selectively remove dissolved ions and produce high-quality water suitable for industrial reuse. However, their performance strongly depends on operating conditions, especially the influent flow rate, which affects mass transfer, resin saturation, and regeneration [2,4].
Wastewater treatment processes based on ion-exchange resins exhibit nonlinear, time-varying, and multivariable behavior. Variations in influent composition, fluctuations in flow rate, and gradual resin exhaustion introduce uncertainty and dynamic complexity into the system [5,6]. In such conditions, maintaining target levels of total dissolved solids (TDS) and water hardness becomes a challenging control problem. Traditional control approaches, typically based on proportional–integral–derivative (PID) regulators, rely on linear assumptions and fixed tuning parameters [7,8]. Although PID controllers are widely used in industrial practice due to their simplicity, they often struggle to provide satisfactory performance under nonlinear and uncertain operating conditions, especially when rapid changes in influent quality occur [9,10].
In recent years, intelligent control techniques have emerged as effective tools for managing complex wastewater treatment processes. Fuzzy logic control uses rule-based reasoning to incorporate expert knowledge and handle uncertainty without requiring explicit mathematical models [11]. Adaptive neuro-fuzzy inference systems (ANFIS) further enhance this approach by combining neural network learning with fuzzy reasoning, providing adaptive and robust control under uncertain conditions [12]. These intelligent approaches are particularly suitable for ion-exchange wastewater treatment, where the relationship between influent flow rate, water hardness, and TDS is highly nonlinear and strongly coupled [10,11].
Despite the growing number of studies applying intelligent control methods to wastewater treatment, a systematic comparison between intelligent and traditional control strategies for ion-exchange processes remains limited. In particular, the control of water hardness and TDS through influent flow regulation has not been sufficiently investigated under a unified framework that evaluates classical PID control alongside fuzzy logic and ANFIS-based controllers. Such a comparison is essential for understanding the advantages and limitations of each control strategy and for identifying appropriate solutions for industrial-scale applications [12,13].
This study addresses this gap by investigating and comparing intelligent and traditional control systems for an ion-exchange wastewater treatment process. The control objective focuses on regulating water hardness and total dissolved solids by manipulating the influent flow rate using different control strategies. Classical PID control is evaluated alongside fuzzy logic and adaptive neuro-fuzzy control approaches within the same process structure. By formulating a unified control framework, this work aims to highlight the conceptual differences between traditional and intelligent control methods and to demonstrate their applicability to complex, nonlinear wastewater treatment processes [14].
2. Materials and Methods
2.1. Process Description and Control Objective
The study considers an ion-exchange-based industrial wastewater treatment process aimed at controlling water hardness and total dissolved solids (TDS). In ion-exchange systems, treatment efficiency is highly dependent on the influent flow rate, which determines the contact time between wastewater and ion-exchange resins. Variations in flow rate directly affect ion removal performance and resin saturation dynamics [15].
Figure 1 presents a block-level information model of the ion-exchange wastewater treatment process. The valve opening degree (SerV), which directly determines the influent flow rate, is considered as the single manipulated input. Changes in the influent flow rate affect the contact time between wastewater and ion-exchange resin, resulting in simultaneous variations in total dissolved solids (TDS) and water hardness (Q). Therefore, the process is represented as a single-input, multiple-output (SIMO) system with inherent coupling between the outputs [16].
Figure 1.
Block-level information model of the ion-exchange wastewater treatment process showing the influence of valve opening degree (influent flow rate) on total dissolved solids (TDS) and water hardness.
Based on the proposed information model, the ion-exchange wastewater treatment process can be approximated as a multivariable dynamic system. Considering the input–output relationships and time-delay effects, the process is modeled using a simplified SIMO transfer function as follows:
In this model, the transfer function gains represent the sensitivity of TDS and water hardness to changes in influent flow rate, while the time constants describe the dominant dynamic behavior of the ion-exchange process. The exponential terms account for transport delay and resin response lag inherent in the filtration and ion-exchange mechanisms. This simplified dynamic representation provides a practical basis for controller synthesis and comparative performance analysis.
For the purpose of dynamic modeling and control performance evaluation, the following assumptions are adopted. In this study, an ion-exchange resin-based wastewater treatment unit has been developed, in which the resin removes dissolved ions until reaching a certain saturation level after treating a finite volume of wastewater. Once saturation occurs, the ion-exchange resin can be regenerated using a dedicated chemical regeneration solution, restoring its ion-exchange capacity. It is assumed that the resin regeneration process is performed offline between operational cycles and does not affect the short-term control dynamics. According to operational data, the ion-exchange resin can undergo up to approximately 1000 regeneration cycles without significant degradation of performance. Therefore, during each simulation run, the resin capacity is considered constant, while variations in influent wastewater composition, including fluctuations in TDS and water hardness, are assumed to occur within a predefined operating range and are treated as external disturbances rather than explicitly modeled states [17].
For this reason, the influent flow rate was selected as the manipulated variable and regulated through a servo valve. Water hardness (Q) and TDS were defined as the main controlled variables and measured in real time. The control objective is to maintain these parameters within desired limits by adjusting the influent flow rate using intelligent control strategies implemented in the R2014 MATLAB environment.
2.2. Fuzzy Logic Control Model Development
The fuzzy logic control (FLC) model was developed using the R2014 MATLAB Fuzzy Logic Toolbox based on a Takagi–Sugeno inference structure. The controller employs two input variables, water hardness (Q) and total dissolved solids (TDS) and one output variable, defined as the opening degree of the servo valve regulating the influent flow rate [16].
The fuzzy controller structure consists of fuzzification, rule-based inference, and defuzzification stages. The overall architecture of the fuzzy inference system implemented in R2014 MATLAB is illustrated in Figure 2, which shows the interaction between input variables, the rule base, and the output control signal.
Figure 2.
Structure of the fuzzy logic control system for wastewater treatment process.
To represent process nonlinearity and uncertainty, linguistic variables were assigned to the input and output parameters. Water hardness (Q) and total dissolved solids (TDS) were each described (Table 1) using five linguistic terms, while the servo valve opening degree was represented using seven linguistic terms. Triangular membership functions were adopted for all variables.
Table 1.
Linguistic variables and membership function ranges.
The selected linguistic terms allow for smooth transitions between operating regions and enable robust control across the full operating range of the wastewater treatment process.
Based on experimental observations and expert knowledge, a rule base consisting of 25 IF–THEN rules were formulated (see Table 2). These rules define the qualitative relationship between water hardness, TDS, and the required adjustment of the influent flow rate through the servo valve.
Table 2.
Fuzzy rule base for wastewater treatment control.
The Takagi–Sugeno inference mechanism was applied to compute the control action. This approach ensures smooth and continuous control output suitable for real-time implementation. The nonlinear relationship between input variables and the servo valve opening degree is illustrated by the control surface shown in Figure 3.
Figure 3.
Control surface of the fuzzy logic controller showing the relationship between water hardness, TDS, and servo valve opening degree.
2.3. ANFIS Control Model Development
For the adaptive neuro-fuzzy inference system (ANFIS) model, experimental data were collected from a laboratory-scale ion-exchange wastewater treatment unit developed for this study. The dataset consisted of 200 experimental samples obtained under varying operating conditions, including different influent flow rates and wastewater compositions. Each data sample included measured values of water hardness (Q), total dissolved solids (TDS), and the corresponding optimal servo valve opening degree [14].
The experimental dataset used for ANFIS training inherently contains measurement noise and sensor uncertainty associated with laboratory-scale instrumentation and process variability. No artificial noise was explicitly added to the data during training. This approach ensures that the ANFIS model learns from realistic operating conditions and maintains robustness when applied to practical wastewater treatment processes.
The ANFIS model was implemented in R2014 MATLAB using the Fuzzy Logic Toolbox with two input variables (Q and TDS) and one output variable (servo valve opening degree). Two rule initialization approaches were investigated: Grid Partitioning and Subtractive Clustering. In both cases, model training was performed using a hybrid learning algorithm combining least squares estimation and backpropagation.
To evaluate learning behavior and convergence, the model was trained using different numbers of epochs (100, 200, and 300). Training error decreased progressively with increasing epochs, indicating stable convergence of the model parameters. The Subtractive Clustering-based ANFIS provided a more compact and adaptive rule structure compared to Grid Partitioning [14].
The training performance of the Subtractive Clustering-based ANFIS model is illustrated in Figure 4, where predicted servo valve opening values closely follow experimental measurements across the operating range. This confirms the model’s ability to capture the nonlinear relationship between water hardness, TDS, and influent flow regulation [18].
Figure 4.
Training performance of the ANFIS model based on subtractive clustering for influent flow control.
The ANFIS-based controller provides a data-driven and adaptive control framework capable of modeling the nonlinear behavior of the ion-exchange wastewater treatment process. Its ability to learn directly from experimental data makes it well-suited for real-time control under variable and uncertain operating conditions.
3. Result and Discussion
3.1. Comparative Simulation Framework
To evaluate the effectiveness of intelligent control strategies, the developed fuzzy logic controller and ANFIS-based controller were integrated into a unified R2014 MATLAB/Simulink simulation framework alongside a conventional PID controller. All three controllers were implemented within the same closed-loop structure and applied to the identical ion-exchange wastewater treatment process. Water hardness (Q) and total dissolved solids (TDS) were selected as the controlled variables, while the influent flow rate regulated by a servo valve served as the manipulated variable.
Figure 5 illustrates the unified control structure used for comparison, where the PID, fuzzy logic, and ANFIS controllers operate on the same process model under identical input and disturbance conditions. This configuration ensures a fair and consistent evaluation of dynamic response, stability, and control performance.
Figure 5.
Unified Simulink structure for PID, fuzzy logic, and ANFIS control of the wastewater treatment process.
Although the ion-exchange wastewater treatment process exhibits coupling between total dissolved solids and water hardness, the PID controllers were tuned independently for each output variable. Separate sets of PID parameters were obtained for TDS and water hardness to reflect their distinct dynamic responses. This independent tuning approach was adopted to ensure stable closed-loop behavior and to provide a consistent baseline for comparison with fuzzy logic and ANFIS-based controllers.
Although the ion-exchange wastewater treatment process exhibits coupling between total dissolved solids and water hardness, sensitivity analysis indicates that the influent flow rate is the dominant manipulated variable affecting both outputs. Variations in valve opening degree lead to significant and simultaneous changes in TDS and water hardness, justifying the use of a single-loop control structure in this comparative study. Given the scope of an article, a qualitative sensitivity-based justification is adopted, while intelligent controllers are shown to effectively compensate for interaction effects.
3.2. Dynamic Response Analysis for TDS Control
The dynamic behavior of total dissolved solids (TDS) under PID, fuzzy logic, and ANFIS control strategies was evaluated using MATLAB/Simulink under identical operating conditions. The transient responses obtained for a step change in reference TDS value are illustrated in Figure 6.
Figure 6.
Transient response of total dissolved solids (TDS) under PID, fuzzy logic, and ANFIS control strategies.
The classical PID controller (Kp = 1.01, Ki = 0.11, Kd = 0) exhibits relatively slow system dynamics. The PID controller parameters were tuned using a trial-and-error approach in the MATLAB/Simulink environment. The tuning procedure aimed to achieve stable closed-loop behavior with acceptable rise time, settling time, and overshoot under nominal operating conditions. This tuning strategy was adopted to establish a consistent baseline for performance comparison with fuzzy logic and ANFIS-based controllers. The rise time is 15.9 s, and the settling time reaches 50.9 s, indicating sluggish convergence to the desired operating point. Although the overshoot remains moderate at 4.4%, noticeable oscillations occur during the transient phase, reflecting the limited ability of PID control to handle nonlinear process dynamics.
The fuzzy logic controller improves the system response by reducing oscillations and accelerating convergence. The rise time decreases to 13.6 s, while the settling time is shortened to 44.1 s. The overshoot slightly increases to 4.7%, but the overall response is smoother and more stable compared to the PID controller, demonstrating the benefit of nonlinear rule-based inference. The ANFIS controller provides the most favorable dynamic performance. The rise time is significantly reduced to 8.31 s, and the settling time decreases to 27.1 s, which is nearly half that of the PID controller. The overshoot remains within an acceptable range at 4.8%. The rapid convergence and smooth response indicate that the ANFIS controller effectively captures the nonlinear relationship between TDS and influent flow rate (see Table 3).
Table 3.
Quantitative comparison of control strategies for TDS regulation.
These results confirm that intelligent control strategies significantly enhance TDS regulation performance, with the ANFIS controller achieving the fastest and most stable response.
3.3. Dynamic Response Analysis for Water Hardness Control
The transient responses of water hardness (Q) under PID, fuzzy logic, and ANFIS control are shown in Figure 7, obtained under the same simulation framework and step input conditions.
Figure 7.
Transient response of water hardness (Q) under PID, fuzzy logic, and ANFIS control strategies.
For water hardness control, the PID controller (Kp = 0.87, Ki = 0.09, Kd = 0) again shows the slowest response. The rise time is 17 s, and the settling time extends to 55.8 s, accompanied by the highest overshoot of 5.01%. This behavior highlights the limitations of linear PID control in managing nonlinear ion-exchange dynamics.
The fuzzy logic controller significantly improves system behavior, reducing the rise time to 12.3 s and the settling time to 40.4 s. The overshoot is slightly reduced to 4.98%, and the response becomes smoother with fewer oscillations, demonstrating enhanced robustness.
The ANFIS controller achieves the best performance in water hardness regulation. The rise time is reduced to 9.23 s, and the settling time decreases to 30.3 s, while the overshoot is minimized to 4.95%. The adaptive learning capability of ANFIS enables rapid and stable convergence even under nonlinear and time-varying conditions (see Table 4).
Table 4.
Quantitative comparison of control strategies for Q regulation.
It should be explicitly noted that the ion-exchange wastewater treatment process is inherently coupled. Both total dissolved solids (TDS) and water hardness are affected simultaneously by changes in the influent flow rate through the valve opening degree. As a result, control actions aimed at improving one output may indirectly influence the other, leading to interaction effects. Such coupling poses challenges for conventional single-variable control strategies, particularly classical PID control. In contrast, intelligent controllers, especially ANFIS, demonstrate improved capability in handling these interaction effects due to their nonlinear inference structure and adaptive learning mechanisms.
In practical operation, the ion-exchange wastewater treatment process is subject to various disturbances, including sudden changes in influent TDS and water hardness, gradual resin degradation over repeated operating cycles, and parameter drift caused by aging of equipment and sensors. Such disturbances can significantly affect process dynamics and control performance. The simulation results indicate that intelligent controllers, particularly the ANFIS-based controller, exhibit enhanced disturbance rejection capability by rapidly adapting to changes in process behavior, whereas conventional PID control tends to respond more slowly under disturbed conditions.
4. Conclusions
This study presented a comparative analysis of conventional and intelligent control strategies applied to an ion-exchange wastewater treatment process, with a focus on regulating total dissolved solids (TDS) and water hardness through influent flow control. A classical PID controller was evaluated alongside fuzzy logic and adaptive neuro-fuzzy inference system (ANFIS) controllers within a unified MATLAB/Simulink simulation framework. The results demonstrate that intelligent control approaches provide superior dynamic performance compared to conventional PID control under nonlinear and time-varying process conditions. While the fuzzy logic controller improves stability and response speed relative to PID control, the ANFIS-based controller achieves the best overall performance among the investigated methods. Its adaptive learning capability enables faster convergence, shorter settling times, and robust operation while maintaining overshoot levels comparable to those of the other controllers. The observed reduction in transient duration and smoother control action indicate a potential for lower actuator activity and reduced energy consumption in continuous industrial wastewater treatment applications. Overall, the findings suggest that ANFIS represents a highly promising control strategy for ion-exchange wastewater treatment systems and a strong candidate for future real-time industrial implementation and further development of energy-efficient intelligent water treatment technologies.
Author Contributions
Conceptualization, A.N. and K.U.; methodology, S.R. and J.E.; formal analysis, A.K. and A.R.; investigation, J.E., Z.T. and K.U.; resources, A.R.; data curation, Z.T.; writing—original draft preparation, B.K. and J.E.; writing—review and editing, A.N., J.E. and K.U.; visualization, S.R. and A.K.; supervision, A.N. and B.K. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The data presented in this study are available on request from the corresponding author.
Conflicts of Interest
The authors declare no conflicts of interest.
Abbreviations
| ANFIS | Adaptive neuro-fuzzy inference system |
| TDS | Total dissolved solids |
| PID | Proportional–Integral–Differential |
References
- Ahmed, F.E.; Khalil, A.; Hilal, N. Emerging Desalination Technologies: Current Status, Challenges and Future Trends. Desalination 2021, 517, 115183. [Google Scholar] [CrossRef] [Scilit]
- Ayaz, M.; Namazi, M.A.; Din, M.A.U.; Ershath, M.I.M.; Mansour, A.; Aggoune, E.-H.M. Sustainable Seawater Desalination: Current Status, Environmental Implications and Future Expectations. Desalination 2022, 540, 116022. [Google Scholar] [CrossRef] [Scilit]
- Almasoudi, S.; Jamoussi, B. Desalination Technologies and Their Environmental Impacts: A Review. Sustain. Chem. One World 2024, 1, 100002. [Google Scholar] [CrossRef] [Scilit]
- Kansara, N.; Bhati, L.; Narang, M.; Vaishnavi, R. Wastewater Treatment by Ion Exchange Method: A Review of Past and Recent Researches. Crit. Rev. 2016, 12, 143–150. [Google Scholar]
- Xu, X.; Tan, H.; Wang, Z.; Wang, C.; Pan, L.; Kaneti, Y.V.; Yang, T.; Yamauchi, Y. Extraordinary Capacitive Deionization Performance of Highly-Ordered Mesoporous Carbon Nano-Polyhedra for Brackish Water Desalination. Environ. Sci. Nano 2019, 6, 981–989. [Google Scholar] [CrossRef] [Scilit]
- Gerba, C.P.; Betancourt, W.Q.; Kitajima, M.; Rock, C.M. Reducing Uncertainty in Estimating Virus Reduction by Advanced Water Treatment Processes. Water Res. 2018, 133, 282–288. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Nanayakkara, T.; Sahin, F.; Jamshidi, M. Intelligent Control Systems with an Introduction to System of Systems Engineering; CRC Press: Boca Raton, FL, USA, 2018; ISBN 978-1-315-21864-9. [Google Scholar]
- Yelagandula, S.; Ginuga, P.R. Control of a Waste Water Treatment Plant Using Fuzzy Logic Controller. J. Inst. Eng. Ser. E 2022, 103, 167–177. [Google Scholar] [CrossRef] [Scilit]
- Díaz-Rodríguez, I.D.; Han, S.; Bhattacharyya, S.P. Analytical Design of PID Controllers; Springer International Publishing: Cham, Switzerland, 2019; ISBN 978-3-030-18227-4. [Google Scholar]
- Bai, Y.; Wang, D. Fundamentals of Fuzzy Logic Control—Fuzzy Sets, Fuzzy Rules and Defuzzifications. In Advanced Fuzzy Logic Technologies in Industrial Applications; Bai, Y., Zhuang, H., Wang, D., Eds.; Advances in Industrial Control; Springer: London, UK, 2006; pp. 17–36. ISBN 978-1-84628-468-7. [Google Scholar]
- Mashhadi, S.; Yadollahi, H.; Mashhad, A. Design and Manufacture of TDS Measurement and Control System for Water Purification in Reverse Osmosis by PID Fuzzy Logic Controller with the Ability to Compensate Effects of Temperature on Measurement. Turk. J. Electr. Eng. Comput. Sci. 2016, 24, 2589–2608. [Google Scholar] [CrossRef] [Scilit]
- Moayedi, H.; Raftari, M.; Sharifi, A.; Jusoh, W.A.W.; Rashid, A.S.A. Optimization of ANFIS with GA and PSO Estimating α Ratio in Driven Piles. Eng. Comput. 2019, 36, 227–238. [Google Scholar] [CrossRef] [Scilit]
- Wu, S.; Maskaly, J. Study on the Effect of Total Dissolved Solids (TDS) on the Performance of an SBR for COD and Nutrients Removal. J. Environ. Sci. Health Part A 2017, 53, 146–153. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Eshbobaev, J.; Norkobilov, A.; Usmanov, K.; Turakulov, Z.; Kamolov, A.; Rejabov, S.; Farkhadova, S.; Eshbobaev, J.; Norkobilov, A.; Usmanov, K.; et al. An Optimized ANFIS Model for Predicting Water Hardness and TDS in Ion-Exchange Wastewater Treatment Systems. Eng. Proc. 2026, 117, 18. [Google Scholar] [CrossRef] [Scilit]
- Jithendra, T.; Basha, S.S. Analyzing Groundwater Level with Hybrid ANN and ANFIS Using Metaheuristic Optimization. Earth Sci. Inform. 2023, 16, 3323–3353. [Google Scholar] [CrossRef] [Scilit]
- Eshbobaev, J.; Norkobilov, A.; Usmanov, K.; Khamidov, B.; Kodirov, O.; Avezov, T. Control of Wastewater Treatment Processes Using a Fuzzy Logic Approach. Eng. Proc. 2024, 67, 39. [Google Scholar] [CrossRef] [Scilit]
- Eshbobaev, J.; Norkobilov, A.; Turakulov, Z.; Khamidov, B.; Kodirov, O. Field Trial of Solar-Powered Ion-Exchange Resin for the Industrial Wastewater Treatment Process. Eng. Proc. 2023, 37, 47. [Google Scholar] [CrossRef] [Scilit]
- Dastorani, M.T.; Moghadamnia, A.; Piri, J.; Rico-Ramirez, M. Application of ANN and ANFIS Models for Reconstructing Missing Flow Data. Environ. Monit. Assess. 2010, 166, 421–434. [Google Scholar] [CrossRef] [Scilit] [PubMed]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.






