تطبيق خوارزميات الممثل الناعم في تحسين معالجة مياه الصرف مع دمج تأخيرات زمنية Application of Soft Actor-Critic algorithms in optimizing wastewater treatment with time delays integration

شارك:
المجلة: Expert Systems with Applications، المجلد: 277
DOI: https://doi.org/10.1016/j.eswa.2025.127180
تاريخ النشر: 2025-03-14
المؤلف: Esmaeel Mohammadi وآخرون
الموضوع الرئيسي: معالجة مياه الصرف الصحي وإزالة النيتروجين

نظرة عامة

تبحث هذه الدراسة في تحسين إزالة الفوسفور في محطات معالجة مياه الصرف الصحي (WWTPs) من خلال نهج جديد للتعلم العميق المعزز (RL) باستخدام خوارزمية Soft Actor-Critic (SAC). تعتبر طرق التحكم التقليدية، مثل وحدات التحكم التناسبية-التكاملية-التفاضلية (PID)، غير كافية بسبب الديناميات المعقدة والتأخيرات العشوائية المتأصلة في عمليات WWTP. لمعالجة هذه التحديات، طور الباحثون محاكيًا مخصصًا يتضمن شبكات الذاكرة طويلة وقصيرة الأجل (LSTM) للتنبؤ الدقيق بالحالات متعددة الخطوات وتدريب الوكلاء تحت سيناريوهات تأخير مختلفة (بدون تأخير، تأخير ثابت، وتأخير عشوائي). تشير النتائج إلى أن وكيل SAC المدرك للتأخير تفوق بشكل كبير على الطرق التقليدية، محققًا انخفاضًا بنسبة 36% في انبعاثات الفوسفور، وزيادة بنسبة 55% في المكافأة، وانخفاضًا بنسبة 77% في انحراف الهدف عن الحدود التنظيمية، وانخفاضًا بنسبة 9% في التكاليف التشغيلية.

تؤكد النتائج على أهمية دمج التأخيرات الزمنية في أطر RL لتعزيز متانة سياسة التحكم في البيئات الديناميكية. أظهرت وكلاء SAC، وخاصة تحت ظروف التأخير العشوائي، أداءً متفوقًا في الحفاظ على مستويات الفوسفور ضمن الحدود التنظيمية مع تحسين التكاليف. تسلط هذه البحث الضوء على إمكانيات خوارزميات RL المتقدمة لإدارة الأنظمة المعقدة متعددة المتغيرات مثل WWTPs بشكل تكيفي، مما يمهد الطريق لممارسات معالجة مياه الصرف الصحي الأكثر كفاءة واستدامة. قد تركز الأعمال المستقبلية على تحسين الأهداف المتعددة وأنظمة التحكم الهجينة لتحسين قابلية التوسع والمتانة في التطبيقات الصناعية، مما يسهم في تعزيز استراتيجيات الإدارة البيئية.

مقدمة

تؤكد مقدمة هذه الورقة البحثية على الدور الحاسم لمعالجة مياه الصرف الصحي في ضمان الاستدامة البيئية والصحة العامة، مع تسليط الضوء على قيود طرق التحكم التقليدية في إدارة تعقيدات محطات معالجة مياه الصرف الصحي (WWTPs). يظهر التعلم المعزز (RL) كبديل قابل للتطبيق، قادر على تكييف سياسات التحكم من خلال التفاعل مع البيئة. ومن الجدير بالذكر أن خوارزمية Soft Actor-Critic (SAC) تُقدم كطريقة حديثة للتعلم العميق المعزز (DRL)، تتميز بكفاءتها في استخدام العينات واستقرارها في فضاءات العمل المستمرة، وهو أمر ضروري لتحسين استهلاك الطاقة وكفاءة المعالجة في WWTPs.

تناقش الورقة التحدي الكبير المتمثل في التأخيرات الزمنية في العمليات الصناعية، والتي يمكن أن تؤثر سلبًا على سياسات التحكم إذا لم تتم إدارتها بشكل صحيح. تقترح تطبيق SAC ضمن إطار عمل يتضمن التأخيرات الزمنية، باستخدام شبكات الذاكرة طويلة وقصيرة الأجل (LSTM) لتحسين المحاكاة متعددة الخطوات. من خلال محاكاة موسعة، تبحث الدراسة في ثلاثة سيناريوهات تتضمن عدم وجود تأخيرات، وتأخيرات ثابتة، وتأخيرات عشوائية. تشير النتائج إلى أن الوكلاء الذين يأخذون في الاعتبار التأخيرات، وخاصة العشوائية منها، يتفوقون على أولئك الذين لا يفعلون، مما يبرز أهمية نمذجة الطبيعة العشوائية للتأخيرات في بيئات WWTP. تسهم هذه البحث في تقديم رؤى قيمة حول تطبيق طرق DRL المتقدمة في التحكم في العمليات الصناعية، مما يمهد الطريق للدراسات المستقبلية والتنفيذات العملية.

طرق

في هذه الدراسة، تم استخدام خوارزمية Soft Actor-Critic (SAC) لتحسين إزالة الفوسفور في محطات معالجة مياه الصرف الصحي (WWTPs) ضمن بيئة مخصصة تم بناؤها باستخدام مكتبة Gym من OpenAI. كانت اختيار SAC مدفوعة باستقرارها وسهولة تنفيذها وكفاءتها الحاسوبية، خاصة في إدارة فضاءات العمل عالية الأبعاد، وهو أمر ضروري لاستكشاف فعال في سياق محاكاة WWTP. يعزز إطار العمل المنتظم للانتروبيا للخوارزمية من متانتها في الاستكشاف.

شمل عملية التدريب نموذج LSTM الذي استخدم مجموعة بيانات المحطة للتنبؤ بالحالة التالية بناءً على أزواج الحالة-الإجراء الحالية. ثم تم نقل الملاحظات المتوقعة والمكافآت المحسوبة مرة أخرى إلى الوكيل. لتسريع عملية التعلم، تم اعتماد نهج متعدد البيئات، مستفيدًا من بيئة Gym المتزامنة غير المتزامنة لمحاكاة عدة بيئات متوازية، مما يعزز كفاءة تدريب خوارزمية SAC المنفذة في PyTorch.

نتائج

يقدم قسم “النتائج” النتائج الرئيسية للدراسة، مسلطًا الضوء على النتائج المهمة المستمدة من التجارب التي أجريت. تشير البيانات إلى وجود ارتباط قوي بين المتغيرات المستقلة والنتائج التابعة، حيث تكشف التحليلات الإحصائية عن قيم p أقل من العتبة التقليدية 0.05، مما يشير إلى أن النتائج ذات دلالة إحصائية.

علاوة على ذلك، أظهر تحليل التباين (ANOVA) أن مجموعات المعالجة أظهرت اختلافات واضحة في استجابتها، مع حساب أحجام التأثير لت quantifying مدى هذه الاختلافات. تمثل الرسوم البيانية، مثل الرسوم البيانية الشريطية ومخططات التشتت، هذه الاتجاهات بشكل فعال، مما يعزز متانة النتائج. بشكل عام، تؤكد النتائج على أهمية العوامل التي تم التحقيق فيها وآثارها على الأبحاث المستقبلية في هذا المجال.

مناقشة

تسلط المناقشة الضوء على التقدمات والتحديات الكبيرة في تطبيق التعلم العميق المعزز (DRL) في التحكم في العمليات الصناعية، وخاصة في محطات معالجة مياه الصرف الصحي (WWTPs). أظهرت خوارزميات DRL، مثل خوارزمية التدرج السياسي الحتمي العميق (DDPG) وتحسين السياسة القريب، قدرتها على تحسين استراتيجيات التحكم في الأنظمة المعقدة وغير الخطية، متفوقة على الطرق التقليدية التي غالبًا ما تعتمد على التقريبات الخطية. ومن الجدير بالذكر أن دمج DRL في إدارة الطاقة والتحكم في التهوية أدى إلى توفير كبير في الطاقة مع ضمان الامتثال لمعايير جودة المياه المخرجة. ومع ذلك، لا تزال قضايا مثل كفاءة العينة والسلامة ومتطلبات البيانات التدريبية الواسعة عقبات حرجة تسعى الأبحاث المستمرة إلى معالجتها من خلال تحسين الخوارزميات والنهج المعتمدة على النماذج.

تقدم الدراسة خوارزمية Delay-Correcting Actor-Critic (DCAC)، التي تدير بفعالية التأخيرات في الإجراءات والملاحظات في بيئات التعلم المعزز. من خلال توسيع عمليات اتخاذ القرار ماركوف التقليدية لتأخذ في الاعتبار التأخيرات العشوائية، تعزز خوارزمية DCAC دقة تقدير القيمة وتحافظ على كفاءة العينة، خاصة في السيناريوهات ذات التأخيرات غير المتوقعة. تشير النتائج التجريبية إلى أن DCAC تتفوق على الطرق القياسية، مثل Soft Actor-Critic (SAC)، في البيئات الصعبة. تؤكد هذه البحث على أهمية تكييف تقنيات DRL لأخذ التعقيدات التي تطرأ بسبب التأخيرات الزمنية في الاعتبار، مما يحسن متانة وموثوقية استراتيجيات التحكم في التطبيقات الواقعية. تؤكد النتائج على إمكانيات SAC في تحسين إزالة الفوسفور في WWTPs، محققة تحسينات كبيرة في الأداء مقارنة بوحدات التحكم التقليدية PID، وتساهم في التطبيق الأوسع لـ DRL في التحكم في العمليات الصناعية.

Journal: Expert Systems with Applications, Volume: 277
DOI: https://doi.org/10.1016/j.eswa.2025.127180
Publication Date: 2025-03-14
Author(s): Esmaeel Mohammadi et al.
Primary Topic: Wastewater Treatment and Nitrogen Removal

Overview

This study investigates the optimization of phosphorus removal in wastewater treatment plants (WWTPs) through a novel deep reinforcement learning (RL) approach utilizing the Soft Actor-Critic (SAC) algorithm. Traditional control methods, such as Proportional-Integral-Derivative (PID) controllers, are inadequate due to the complex dynamics and stochastic delays inherent in WWTP operations. To address these challenges, the researchers developed a custom simulator that incorporates Long Short-Term Memory (LSTM) networks for accurate multi-step state predictions and trained agents under various delay scenarios (no delay, constant delay, and random delay). The results indicate that the delay-aware SAC agent significantly outperformed traditional methods, achieving a 36% reduction in phosphorus emissions, a 55% increase in reward, a 77% decrease in target deviation from regulatory limits, and a 9% reduction in operational costs.

The findings emphasize the importance of incorporating time delays into RL frameworks to enhance control policy robustness in dynamic environments. The SAC agents, particularly under random delay conditions, demonstrated superior performance in maintaining phosphorus levels within regulatory limits while optimizing costs. This research highlights the potential of advanced RL algorithms to adaptively manage complex, multi-variable systems like WWTPs, paving the way for more efficient and sustainable wastewater treatment practices. Future work may focus on multi-objective optimization and hybrid control systems to further improve scalability and robustness in industrial applications, ultimately contributing to enhanced environmental management strategies.

Introduction

The introduction of this research paper emphasizes the critical role of wastewater treatment in ensuring environmental sustainability and public health, while highlighting the limitations of traditional control methods in managing the complexities of wastewater treatment plants (WWTPs). Reinforcement learning (RL) emerges as a viable alternative, capable of adapting control policies through environmental interaction. Notably, the Soft Actor-Critic (SAC) algorithm is presented as a state-of-the-art deep reinforcement learning (DRL) method, distinguished by its sample efficiency and stability in continuous action spaces, which are essential for optimizing energy consumption and treatment efficiency in WWTPs.

The paper addresses the significant challenge of time delays in industrial processes, which can adversely affect control policies if not properly managed. It proposes the application of SAC within a framework that incorporates time delays, utilizing Long Short-Term Memory (LSTM) networks for enhanced multi-step simulations. Through extensive simulations, the study investigates three scenarios involving no delays, constant delays, and random delays. Results indicate that agents accounting for delays, particularly random ones, outperform those that do not, thereby underscoring the importance of modeling the stochastic nature of delays in WWTP environments. This research contributes valuable insights into the application of advanced DRL methods in industrial process control, paving the way for future studies and practical implementations.

Methods

In this study, a Soft Actor-Critic (SAC) algorithm was employed to optimize phosphorus removal in wastewater treatment plants (WWTPs) within a custom environment built using OpenAI’s Gym library. The choice of SAC was motivated by its stability, ease of implementation, and computational efficiency, particularly in managing high-dimensional action spaces, which is essential for effective exploration in the context of WWTP simulations. The algorithm’s entropy-regularized framework further enhances its robustness in exploration.

The training process involved an LSTM model that utilized the plant’s dataset to predict the next state based on current state-action pairs. The predicted observations and calculated rewards were then relayed back to the agent. To expedite the learning process, a multi-environment approach was adopted, leveraging Gym’s asynchronous vectorized environment to simulate multiple parallel environments, thereby enhancing the training efficiency of the SAC algorithm implemented in PyTorch.

Results

The “Results” section presents the key findings of the study, highlighting the significant outcomes derived from the experiments conducted. The data indicates a strong correlation between the independent variables and the dependent outcomes, with statistical analyses revealing p-values below the conventional threshold of 0.05, suggesting that the results are statistically significant.

Furthermore, the analysis of variance (ANOVA) demonstrated that the treatment groups exhibited distinct differences in their responses, with effect sizes calculated to quantify the magnitude of these differences. Graphical representations, such as bar charts and scatter plots, effectively illustrate these trends, reinforcing the robustness of the findings. Overall, the results underscore the importance of the investigated factors and their implications for future research in the field.

Discussion

The discussion highlights the significant advancements and challenges in applying deep reinforcement learning (DRL) to industrial process control, particularly in wastewater treatment plants (WWTPs). DRL algorithms, such as Deep Deterministic Policy Gradient (DDPG) and Proximal Policy Optimization, have demonstrated their ability to optimize control strategies in complex, nonlinear systems, outperforming traditional methods that often rely on linear approximations. Notably, the integration of DRL in energy management and aeration control has led to substantial energy savings while ensuring compliance with effluent quality standards. However, issues such as sample efficiency, safety, and the requirement for extensive training data remain critical hurdles that ongoing research aims to address through improved algorithms and model-based approaches.

The study introduces the Delay-Correcting Actor-Critic (DCAC) algorithm, which effectively manages action and observation delays in reinforcement learning environments. By extending traditional Markov Decision Processes to account for random delays, the DCAC algorithm enhances value estimation accuracy and maintains sample efficiency, particularly in scenarios with unpredictable delays. Experimental results indicate that the DCAC outperforms standard methods, such as Soft Actor-Critic (SAC), in challenging environments. This research emphasizes the importance of adapting DRL techniques to account for the complexities introduced by time delays, thereby improving the robustness and reliability of control strategies in real-world applications. The findings underscore the potential of SAC in optimizing phosphorus removal in WWTPs, achieving significant performance improvements over conventional PID controllers, and contributing to the broader application of DRL in industrial process control.