A sewage treatment process flow fault diagnosis expert system and application thereof

By constructing a mathematical model and expert system based on the activated sludge mechanism, and combining it with a knowledge base and database representing production rules, intelligent fault diagnosis of wastewater treatment plants was realized, solving the problem of fault diagnosis in the operation and management of wastewater treatment plants in small towns, and improving effluent quality and work efficiency.

CN119151273BActive Publication Date: 2025-11-25KUNMING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410704982.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2025-11-25
Estimated Expiration
2044-06-03

AI Technical Summary

Technical Problem

Existing technologies cannot effectively integrate the knowledge of domain experts and the experience of operators, resulting in a lack of effective fault diagnosis methods for the operation and management of sewage treatment plants in small towns, which affects the stable operation of sewage treatment plants and the quality of effluent.

Method used

A baseline mathematical model based on the mechanism of activated sludge is constructed. Combined with expert system technology, a knowledge base and database for production rule representation are established. Combined with an internal inference engine and human-computer interaction interface, a wastewater treatment process fault diagnosis expert system is formed to realize intelligent control and fault diagnosis of wastewater treatment plants.

Benefits of technology

It has improved the level of intelligent control in wastewater treatment plants and the work efficiency of staff, ensured that the effluent quality is stable and meets standards, reduced operating costs, and provided optimization and renovation solutions for other wastewater treatment plants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119151273B_ABST
    Figure CN119151273B_ABST
Patent Text Reader

Abstract

The application discloses a sewage treatment process fault diagnosis expert system and application thereof, and constructs the system by the following steps: S1, establishing a benchmark mathematical model based on activated sludge mechanism on a simulation platform; S2, introducing expert system technology, combining the mathematical model based on mechanism to establish the overall structure design of the fault diagnosis expert system of the activated sludge method sewage treatment process; S3, establishing a knowledge base for representing knowledge by production rules; S4, establishing a database; S5, establishing an internal inference engine; and S6, establishing a man-machine interactive interface. The fault diagnosis expert system constructed by the application can be applied in sewage treatment intelligent control, can improve the control level of the sewage treatment system, improve the sewage treatment efficiency and the stability of effluent water quality, reduce operation cost and resource consumption; meanwhile, the application can also provide technical reference and optimization and reconstruction scheme for other sewage treatment plants, and has important practical value and popularization and application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wastewater treatment expert system design technology, specifically to a wastewater treatment process fault diagnosis expert system and its application. Background Technology

[0002] Currently, solutions to routine operational problems in wastewater treatment plants are difficult to find in books, leading operators to rely primarily on years of accumulated experience for plant management. However, this experience requires extensive practical experience and broad knowledge, thus limiting its reach to only a few. Applying fault diagnosis technology to the operation and management of wastewater treatment plants, combining the knowledge of field experts with the long-term experience of operators, would be significant in addressing the current shortage of operation and management personnel in my country (especially in some small-town wastewater treatment plants).

[0003] With the development of artificial intelligence (AI) technology, especially the application of knowledge engineering, expert systems, and artificial neural networks in fault diagnosis, diagnostic methods based on system mathematical models and signal detection and processing are gradually being replaced by AI-based diagnostic methods. Fault diagnosis technology has entered a stage of intelligent diagnosis technology that integrates knowledge processing, modeling, signal processing, and knowledge processing. In this stage, the knowledge of domain experts will be fully valued, and research on diagnostic problems will focus on simulating the reasoning process of experts and their ability to apply various diagnostic knowledge. Achieving the integration of dialectical logic and mathematical logic, the unification of symbolic processing and numerical processing, the unification of reasoning and algorithmic processes, and the interaction between knowledge bases and databases at the knowledge level are inevitable trends in the development of intelligent diagnostic systems.

[0004] Therefore, this paper proposes an expert system for diagnosing faults in wastewater treatment processes and its application. Summary of the Invention

[0005] The purpose of this invention is to provide a wastewater treatment process fault diagnosis expert system that can ensure the stable operation of wastewater treatment plant processes, ensure stable effluent quality, improve the intelligent control level of wastewater treatment systems and the working ability and efficiency of staff, provide a new direction for the optimization and transformation of wastewater treatment plants, and provide new technologies for the rich development of expert systems.

[0006] To achieve the above-mentioned technical effects, the present invention is implemented through the following technical solution: a wastewater treatment process fault diagnosis expert system, characterized in that constructing the system includes the following steps:

[0007] S1. Establish a benchmark mathematical model based on the activated sludge mechanism on the simulation platform;

[0008] S2. Introduce expert system technology and combine it with mechanism-based mathematical models to establish the overall structure design of an expert system for fault diagnosis of activated sludge wastewater treatment process.

[0009] S3. Establish a knowledge base representing knowledge using production rules. This knowledge base consists of factual knowledge and heuristic knowledge, and is a collection of expert knowledge for a specific domain or problem. It is used to store fault diagnosis knowledge for the activated sludge wastewater treatment process, including theoretical knowledge and heuristic knowledge. The diagnostic knowledge is represented using production rule notation and converted into a form conforming to the CLIPS language specification, encoded and stored in the fuzzy knowledge base. This method is simple, clear, easy to understand, easy to retrieve, and easy to reason about. The rules are independent of each other, which facilitates the establishment, expansion and management of the knowledge base. Moreover, database technology is used for knowledge storage, which is convenient for users to view and edit.

[0010] S4. Establish a database: Collect the original symptom information of the fault phenomenon, the intermediate information generated during the diagnosis process, the optimal parameters obtained by the mathematical model simulation based on the mechanism, and the influent and effluent water quality data collected by the sewage treatment plant, and build a database; so that the database can provide the necessary data for the reasoning and interpretation of the expert system during the processing.

[0011] S5. Establish the internal inference engine: Input the internal inference engine into Visual Basic to achieve mixed programming of Visual Basic and the internal inference engine. The inference engine is a set of programs used to control and coordinate the methods and strategies of the entire expert system. Based on the user's data input, it uses knowledge in the knowledge base, follows certain reasoning strategies, solves the current problem, interprets the user's request, and finally draws a conclusion.

[0012] S6. Establish the Human-Computer Interface: Configure the interface in the Visual Basic 6.0 environment. The human-computer interface is used for information exchange between the expert system and the outside world. It is an important way for users and experts to use and maintain the expert system. A user-friendly interface makes information input and operation simple and system maintenance easy.

[0013] Furthermore, in S1, the modeling principle of the benchmark mathematical model is as follows:

[0014]

[0015] In the formula, Vr A Qc is the amount of material consumed in the reaction tank per unit time; Qc0 is the amount of material flowing in; Qc e Vdc is the amount of material flowing out. A / dt represents the amount of material accumulated in the reaction tank per unit time.

[0016] Furthermore, in S3, the acquisition of knowledge in the knowledge base representing knowledge through production rules is specifically achieved through three approaches:

[0017] S3.1. The method of manual acquisition is adopted, and factual knowledge is obtained by the collection personnel through a large number of books, documents, manuals and other materials on the activated sludge wastewater treatment process.

[0018] S3.2 Through repeated exchanges between the data collection personnel and domain experts and wastewater treatment plant operators, specific cases of typical failures are analyzed to obtain the insightful knowledge accumulated by domain experts in long-term practical operation. Then, the acquired knowledge is analyzed, summarized, and organized, and domain experts provide suggestions for modification and improvement until a relatively accurate and complete set of domain knowledge is formed.

[0019] S3.3 Extract the optimal control parameters from the water quality data collected by the wastewater treatment plant and the mathematical model calculated by the wastewater treatment plant system, and automatically obtain and save them by downloading them into the system.

[0020] Furthermore, in S5, the internal inference engine uses CLIPS; all rules for the input data during inference are converted into a form that conforms to the CLIPS language specification.

[0021] Furthermore, in S6, the human-machine interface adopts a modular design, including four modules: symptom acquisition, fault diagnosis, knowledge base management, and system help; the modular software design method realizes the separation of the knowledge base and the inference engine, which facilitates the expansion of the system's functions.

[0022] Furthermore, the specific processes for the four modules—symptom acquisition, fault diagnosis, knowledge base management, and system help—are as follows:

[0023] Symptom Acquisition Module: Based on abnormal situations in the activated sludge wastewater treatment process, symptom facts are acquired from both fault phenomena and operating parameters.

[0024] Fault diagnosis module: First, the acquired operating parameter values ​​are imported, represented in a fuzzy manner, and CLIIPS is started to perform uncertain inference, search for matching rules, and determine the direction of parameter adjustment; then, the extreme value range of the operating parameters is input, the severity of the fault is set, fuzzy inference technology is used to obtain the adjustment value of the parameters, and the credibility of the conclusion is calculated; after the diagnosis is completed, the diagnosis results are displayed to the user or in the form of a report, and can be saved and printed.

[0025] Knowledge Base Management Module: The knowledge base management module is an interface between knowledge engineers or users and the knowledge base. Its main functions include: knowledge storage, knowledge retrieval, knowledge addition, knowledge deletion, and knowledge modification. It can also perform necessary syntax checks on the input knowledge to avoid errors during the input process.

[0026] System Help: Provides context-sensitive help for user questions during use, enabling users to better utilize the system.

[0027] Furthermore, the knowledge base in the knowledge base management module is built on Microsoft Access, fully leveraging the advantages of simple database entry and clear entries. Meanwhile, Visual Basic provides powerful data access object tools, enabling easy linking to database files, accessing data, and performing operations and management on the database. Therefore, when managing the knowledge base, users do not need to directly access the database; they can edit the database directly through the editing windows of each functional module, overcoming the inconvenience of frequently switching between the database and the knowledge base. When users edit the knowledge base, they only modify the clipboard file, without affecting the CLIPS inference engine, achieving separation between the knowledge base and the inference engine and ensuring the transparency of the expert system.

[0028] Another objective of this invention is to provide an application of a wastewater treatment process fault diagnosis expert system, characterized in that the wastewater treatment process fault diagnosis expert system is applied to intelligent control of wastewater treatment.

[0029] The beneficial effects of this invention are:

[0030] This invention, by establishing a mathematical model, can simulate the reactions at each stage of a wastewater treatment plant, predict the effluent quality, and provide control parameters for the operation of the wastewater treatment plant. By establishing an expert system, it can integrate the domain knowledge of wastewater treatment plant experts, the experience of professional technicians, and the knowledge of mathematical model calculation data analysis to analyze the causes of failures in wastewater treatment plants and propose solutions.

[0031] This invention combines an expert system with a mathematical model to form a diagnostic expert system, enabling the system to be predictive and real-time. The expert system analyzes data on abnormal water quality conditions for the mathematical model and processes the abnormal data before feeding it back to the mathematical model. The mathematical model provides data support to the expert system, enriching its knowledge base. The combination of the two can proactively address abnormal operating conditions in wastewater treatment plants, ensuring stable operation and precisely improving the effluent quality. The knowledge base and inference engine of the expert system are transparent, and regular use by staff can enhance their work capabilities. The user-friendly human-computer interface improves staff efficiency, reduces operating costs and resource consumption, and enhances wastewater treatment efficiency and effluent quality stability. It also provides a safe and secure working environment for staff. Furthermore, this invention can provide technical reference and optimization solutions for other wastewater treatment plants, possessing significant practical value and promising prospects for widespread application. Attached Figure Description

[0032] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a schematic diagram of the overall construction process of the wastewater treatment process fault diagnosis expert system of the present invention;

[0034] Figure 2 This is a diagram illustrating the construction of the mathematical model control system for a wastewater treatment plant according to the present invention.

[0035] Figure 3 This is a schematic diagram of the expert system implementation of the present invention;

[0036] Figure 4 This is a diagram showing the interactive interface of the expert system of this invention. Detailed Implementation

[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0038] Example 1

[0039] The following steps are included in constructing a dedicated system for diagnosing faults in wastewater treatment processes:

[0040] (1) Establish a mechanism-based mathematical model;

[0041] (2) Collect water quality data from the wastewater treatment plant and input the data into the mathematical model for calculation to obtain the initial control parameter values;

[0042] (3) Randomize the initial control parameter values ​​to generate a sample set;

[0043] (4) Input the sample set into the virtual simulation platform for simulation calculation and comparison to obtain control parameters with low effluent quality and low energy consumption;

[0044] (5) Input the control parameters into the expert system database.

[0045] The baseline mathematical model based on the activated sludge mechanism (ASM1) in this embodiment includes 13 components: inert dissolved organic matter SI, readily degradable dissolved substrate SS, inert non-dissolved substrate XI, slowly degradable non-dissolved substrate XS, heterotrophic microorganisms XBH, autotrophic microorganisms XBA, microbial metabolic residues XP, dissolved oxygen SO, nitrate nitrogen SNO, ammonia nitrogen SNH, dissolved organic nitrogen SND, non-dissolved organic nitrogen XND, and alkalinity SALK.

[0046] The baseline mathematical model based on the activated sludge mechanism (ASM1) in this embodiment includes the construction of a virtual platform, which comprises eight basic reaction processes:

[0047] ① Aerobic growth of heterotrophic bacteria;

[0048] ② Anaerobic growth of heterotrophic bacteria;

[0049] ③ Aerobic growth of autotrophic bacteria;

[0050] ④ The decline of heterotrophic bacteria;

[0051] ⑤ Decline in autotrophic bacteria;

[0052] ⑥ Ammoniation process;

[0053] ⑦ Slow degradation of non-soluble organic matter through hydrolysis;

[0054] ⑧. Hydrolysis of biodegradable organic nitrogen.

[0055] Assuming that organic nitrogen is uniformly distributed in slowly degrading organic matter, the hydrolysis rate of non-dissolved organic nitrogen is proportional to the hydrolysis rate of slowly degrading organic matter.

[0056] It also includes 19 parameters: heterotrophic bacteria yield coefficient YH, autotrophic bacteria yield coefficient YA, nitrogen content ratio in microbial cells iXB, inert particle ratio in microorganisms fP, nitrogen content ratio in microbial products iXP, oxygen half-saturation coefficient KO,H for heterotrophic bacteria, oxygen half-saturation coefficient KO,A for autotrophic bacteria, nitrate nitrogen half-saturation coefficient KNO for heterotrophic bacteria, ammonia half-saturation coefficient KNH for autotrophic bacteria, heterotrophic bacteria half-saturation coefficient KS, half-saturation coefficient for slow biodegradation substrate hydrolysis KX, and maximum specific growth rate μ for autotrophic bacteria. A Maximum specific growth rate μ of heterotrophic bacteria H The decay coefficient of autotrophic bacteria is bA, the decay coefficient of heterotrophic bacteria is bH, the correction factor for heterotrophic bacteria growth under hypoxic conditions is ηg, the hydrolysis correction factor under hypoxic conditions is ηh, the maximum specific ammonification rate is ka, and the maximum specific hydrolysis rate is kh.

[0057] The baseline mathematical model based on the activated sludge mechanism (ASM1) in this embodiment includes sensitivity analysis. This invention uses conventional sensitivity analysis (S...i,j This is used to correct the model parameters.

[0058]

[0059] In the formula, S i,j y is the sensitivity coefficient. i For effluent water quality indicators, x j Configure system parameters.

[0060] When the sensitivity coefficient S i,j <0.25 indicates that the parameter has no significant impact on the model output; when 0.25≤S i,j <1 indicates that the parameter has an impact on the model output; 1≤S i,j <2 indicates that this parameter has a significant impact on the model output; S i,j A value ≥2 indicates that the parameter has a significant impact on the model output. Adjust the values ​​of all stoichiometric and kinetic parameters in the model by 10%, and calculate the sensitivity of each parameter to the output effluent indicators.

[0061] Sensitivity analysis was used to calibrate the model under steady-state simulation conditions. Based on relevant domestic and international literature and case studies, the stoichiometric parameters of the model were not adjusted. After calibration, the simulated effluent quality was basically consistent with the actual effluent quality, with minimal error. Dynamic analysis of the model showed that the simulated effluent indicators were similar to the measured effluent indicators, and their trends were generally consistent. In the steady-state simulation of this wastewater treatment plant, the relative error between the simulated and measured values ​​was less than 5%; in the dynamic simulation, the relative error between the simulated and measured values ​​was less than 10%. The simulated effluent and actual effluent indicators showed good fit.

[0062] The specific implementation of this invention primarily employs Simulink simulation, supplemented by C language programming. After completion of the C language programming, it is then converted into S-functions used internally by MATLAB software to achieve the purpose of a virtual wastewater treatment plant.

[0063] Example 2

[0064] The following steps are included in constructing a dedicated system for diagnosing faults in wastewater treatment processes:

[0065] (1) Introducing expert system technology and combining it with a mechanism-based mathematical model to establish the overall structural design of an expert system for fault diagnosis of activated sludge wastewater treatment process. This system adopts a modular software design method, separating the knowledge base from the inference engine to facilitate the expansion of system functions.

[0066] (2) Establish a knowledge base for production rule representation of knowledge.

[0067] (3) Establish a database to store the original symptom information obtained from the fault phenomenon, the intermediate information generated during the diagnosis process, and the optimal parameters obtained by the mathematical model simulation based on the mechanism, so as to provide the necessary data for the reasoning and interpretation of the expert system.

[0068] (4) Create an internal inference engine (CLIPS) and input the internal inference engine into Visual Basic to achieve mixed programming of Visual Basic and CLIPS.

[0069] (5) Establish the human-computer interaction interface. Set up the interface in the Visual Basic 6.0 environment. The human-computer interface is used for information exchange between the expert system and the outside world.

[0070] In this embodiment, the construction of the expert system platform includes the overall structural design of the expert system. The structure of the expert system is like a container, which contains the components of the expert system and determines the interrelationship and working mode of the various functional modules within the expert system.

[0071] In this embodiment, the construction of the expert system platform includes the establishment of an expert system knowledge base. The establishment of the knowledge base mainly consists of two parts: knowledge acquisition and knowledge representation. The knowledge base is the core of the expert system; it comprises factual knowledge and heuristic knowledge, and is a collection of expert knowledge for a specific domain or problem. The acquisition process involves extracting and summarizing knowledge (including concepts, facts, relationships, and methods) used to solve problems in a specific domain from expert minds or external knowledge sources (literature, books, and materials), and converting it into a specific knowledge representation form for inclusion in the expert system's knowledge base. This invention uses three knowledge acquisition methods: non-automatic, automatic, and neural network-based.

[0072] The knowledge acquisition of this invention mainly includes two parts: fault information and operating parameters of the activated sludge wastewater treatment process.

[0073] (I) Fault Analysis of Activated Sludge Wastewater Treatment Process

[0074] The activated sludge process is not easily adapted to sudden changes in water quality, quantity, and environment. Therefore, many abnormal situations may occur during operation, leading to deterioration of effluent quality, sludge loss, and reduced treatment efficiency. The main abnormal phenomena that may occur during operation are as follows:

[0075] 1) Sludge bulking

[0076] a. Fault symptoms: The sludge expands in volume, becomes loose in structure, is not easy to settle, and often floats to the surface and flows out with the effluent; the clarified liquid in the secondary sedimentation tank is sparse and its color also changes.

[0077] b. Cause of the malfunction:

[0078] ① Lack of nutrients; ② Insufficient dissolved oxygen; ③ Insufficient sludge load; ④ Insufficient pH value; ⑤ Insufficient water temperature; ⑥ Insufficient sludge age; ⑦ Putrefactive wastewater.

[0079] c. Solutions:

[0080] ① Adding chemicals: Adding coagulants such as iron salts and aluminum salts improves the compactness of the sludge and increases its specific gravity; adding inert substances such as asbestos powder, diatomaceous earth, and clay reduces the sludge density.

[0081] The index; adding bleaching powder or liquid chlorine (at 0.3% to 0.6% of the dry sludge) can inhibit the growth of filamentous bacteria. This method can only be used as a temporary emergency measure, because long-term addition of chemicals not only increases operating costs but also alters the microbial growth environment, leading to a decrease in treatment effectiveness.

[0082] ② Improve the growth environment for microorganisms: Add nitrifying sludge or N, P and other components to supplement the lack of nutrients and maintain the BOD:N:P ratio at about 100:5:1; increase the aeration rate or reduce the influent flow rate to reduce the oxygen demand and ensure that the dissolved oxygen concentration in the aeration tank is not lower than 2 mg / L; add lime, soda ash, yellow mud and other substances to adjust the pH value to not lower than 6.0; set up a high-load contact zone (i.e., selector) at the front of the aeration tank to control low-load expansion; add packing material or enhance aeration in the aeration tank to control high-load expansion; take four measures to prevent wastewater corrosion: pre-aeration (to release odor), chemical oxidation (adding chlorine, hydrogen peroxide or potassium permanganate), and chemical precipitation (adding ferric chloride).

[0083] 2) Sludge disintegration

[0084] a. Problem: The treated water is turbid, the sludge flocs are becoming finer, and the treatment effect is deteriorating.

[0085] b. Cause of the malfunction:

[0086] ① Problems during operation, such as excessive aeration disrupting the balance of biological nutrients in activated sludge, reducing the number and activity of microorganisms, decreasing adsorption capacity, shrinking flocs, and some becoming feather-like sludge that is difficult to settle, resulting in turbid water quality; ② The presence of toxic substances in the wastewater inhibits or damages microorganisms, reduces or completely stops the purification function, thereby causing the sludge to lose its activity.

[0087] c. Solutions:

[0088] ① For problems encountered during operation, adjustments should be made by checking the wastewater volume, sludge return volume, air volume, sludge discharge status, and SV, MLSS, DO, and N. ② For toxic substances in wastewater, the source needs to be identified and corresponding countermeasures should be taken, such as stopping water intake, increasing dilution water, reducing the concentration of toxic substances, reducing sludge discharge, and increasing the sludge return ratio.

[0089] 3) Sludge decomposition

[0090] a. Fault phenomenon: The sludge that has been stagnant in the dead corner of the secondary sedimentation tank for a long time decomposes and turns black, producing a foul odor, and large pieces float to the surface.

[0091] b. Cause of the malfunction:

[0092] ① There are many dead zones in the secondary sedimentation tank or the sludge discharge channel is blocked; ② The aeration time is too long.

[0093] c. Solutions:

[0094] ① Install scum removal equipment to prevent sludge from overflowing; ② Eliminate dead zones in the sedimentation tank; ③ Increase the slope of the tank bottom or improve the sludge scraping equipment to prevent sludge from remaining at the bottom of the tank; ④ Shorten the aeration time.

[0095] 4) Sludge floats to the surface

[0096] a. Fault phenomenon: Sludge in the secondary sedimentation tank floats to the surface in clumps.

[0097] b. Cause of the malfunction:

[0098] ① Influent water quality: A large amount of fat and oil flows into the sewage; pH value that is too high or too low will affect the absorption of nutrients by microorganisms; alkalinity that is too high will cause microbial cells to dehydrate and die or rupture and die; temperature that is too high will cause most of the microorganisms in the activated sludge to die; toxic substrates will cause the microorganisms in the activated sludge to be impacted and destroyed.

[0099] ② Process operation: Excessive aeration in the aeration tank causes excessive agitation of the sludge, generating a large number of small bubbles that are adsorbed onto the flocs; the sludge age in the aeration tank is too long, resulting in a high nitrification process and denitrification at the bottom of the secondary sedimentation tank; excessive sludge return flow leads to incomplete gas-liquid separation.

[0100] ③ Excessive proliferation of filamentous bacteria in activated sludge: caused by surfactants, lipid compounds, and mechanical stress; or by excessive addition of filamentous bacteria inhibitors.

[0101] c. Solutions:

[0102] ① Control the air supply within the limits required for mixing; ② Increase the sludge return flow or remove excess sludge in a timely manner; ③ Reduce the sludge concentration in the mixed liquor, shorten the sludge age, and reduce dissolved oxygen to prevent it from reaching the nitrification stage; ④ Install an automatic pH adjustment system consisting of a pH meter and an automatic pH adjustment valve at the inlet of the aeration tank to control the pH value of the influent to the aeration tank within the required range.

[0103] 5) Bubble problem

[0104] a. Fault phenomenon: Foam is generated in the aeration tank.

[0105] b. Cause of the malfunction:

[0106] ① The wastewater contains a large amount of synthetic detergents or other foaming substances; ② When the temperature is around 20℃, the number of Nocardia bacteria (microorganisms that often appear when foaming problems occur) increases; ③ When the sludge load is high, Nocardia bacteria are absolutely dominant among filamentous bacteria; ④ Excessive substrate concentration causes Nocardia bacteria to multiply in large quantities.

[0107] c. Solutions:

[0108] ① Segmented water injection; ② Spraying the surface of the aeration tank with tap water or treated effluent; ③ Adding defoaming agent (such as machine oil, kerosene, etc., at a dosage of about 0.5 to 1.5 mg / L); ④ Mechanical defoaming with a blower.

[0109] The operating parameters of the activated sludge wastewater treatment process, obtained through direct online detection by sensors and laboratory analysis, serve as a direct basis for determining the cause and specific location of process failures and providing corresponding solutions.

[0110] (II) The main evaluation indicators for activated sludge wastewater treatment systems include:

[0111] 1) Organic pollution indicators

[0112] a. Biochemical Oxygen Demand (BOD)

[0113] The amount of dissolved oxygen consumed by microorganisms to oxidize organic matter into inorganic matter at a water temperature of 20℃ is called biochemical oxygen demand.

[0114] b. Chemical Oxygen Demand (COD)

[0115] The amount of oxygen consumed by strong oxidants to oxidize organic matter into CO2 and H2O under acidic conditions is called chemical oxygen demand (COD).

[0116] 2) Indicators of microbial physiological activity

[0117] a. Nutrients (BOD:N:P)

[0118] The microorganisms involved in activated sludge treatment need to continuously absorb the nutrients necessary for their life processes from the surrounding wastewater, including carbon sources, nitrogen sources, inorganic salts, and certain growth factors. Generally, the BOD:N:P ratio should be maintained at approximately 100:5:1.

[0119] b. Dissolved Oxygen (DO)

[0120] The microbial community involved in wastewater activated sludge treatment is mainly composed of aerobic bacteria. Insufficient or excessive dissolved oxygen will adversely affect the physiological activities of these microorganisms. The dissolved oxygen concentration in the aeration tank should generally be maintained at a level not lower than 2 mg / L.

[0121] c. pH value

[0122] The physiological activities of microorganisms are closely related to the pH of the environment. Microorganisms can only carry out normal biological activities under suitable pH conditions. In an aeration tank, the optimal pH range is between 6.5 and 8.5.

[0123] d. Water temperature

[0124] Suitable temperatures can promote and enhance the physiological activities of microorganisms; unsuitable temperatures will weaken or even destroy these activities, leading to changes in their morphology and physiological characteristics, and may even cause their death. Generally, the temperature for activated sludge treatment is controlled between 15℃ and 35℃.

[0125] e. Toxic substances

[0126] Toxic substances refer to certain inorganic substances (such as heavy metal ions) and organic substances (such as phenols and cyanides) that have an inhibitory effect on the physiological activities of microorganisms.

[0127] 3) Activated sludge microbial biomass index

[0128] a. Mixed Liquor Suspended Solids (MLSS)

[0129] Mixed liquor suspended solids concentration, also known as mixed liquor sludge concentration, represents the total weight of activated sludge solids contained in a unit volume of mixed liquor in an aeration tank. Generally, MLSS < 3.5 g / L indicates a high risk of sludge bulking.

[0130] b. Mixed Liquor Volatile Suspended Solids (MLVSS): The mixed liquor volatile suspended solids concentration is the concentration of organic solids in the mixed liquor activated sludge. This indicator is more accurate than MLSS.

[0131] 4) Activated sludge settling performance indicators

[0132] a. Sludge Settling Velocity (SV)

[0133] Sludge settling ratio (SV) refers to the percentage of the volume of precipitated sludge formed after the mixed liquor has been left to stand in a graduated cylinder for 30 minutes, relative to the original volume of the mixed liquor. SV detection can help identify abnormal phenomena such as sludge bulking in a timely manner.

[0134] b. Sludge Volume Index (SVI)

[0135] The sludge volume index (SVI) refers to the volume of settled sludge formed per gram of dry sludge after 30 minutes of settling in the mixed liquor at the aeration tank outlet. SVI can be used to determine whether or not sludge bulking has occurred, and it has important guiding significance for operational control. Generally speaking, if SVI > 150 mLg, sludge bulking is likely to occur.

[0136] c. Sludge Age

[0137] Sludge age, also known as biological solids mean retention time, is the average residence time of activated sludge in the aeration tank. Increasing the sludge age can easily lead to an increase in the SVI value, which in turn can cause sludge bulking.

[0138] d. BOD - Sludge Load (Ns)

[0139] BOD-sludge loading refers to the amount of organic matter that a unit weight (kg) of activated sludge in an aeration tank can accept and degrade to a predetermined level within a unit time (1 day). BOD-sludge loading is an important factor affecting the degradation of organic pollutants and the growth of activated sludge. When N is between 0.5 and 1.5 kg BOD / (kg MLSS·d), sludge bulking is likely to occur.

[0140] 5) Microbial microscopy

[0141] Microscopic examination of microorganisms in activated sludge is performed using a microscope. Protozoa and metazoa (collectively referred to as microorganisms) are relatively larger than bacteria, making them easier to observe, identify, and count under a microscope. They are also more sensitive to changes in external environmental conditions and can be used as indicator organisms to diagnose the state and performance of activated sludge.

[0142] (III) Knowledge Representation:

[0143] Based on the analysis of several commonly used knowledge representation methods and their main advantages and disadvantages, and considering the characteristics of diagnostic knowledge in the activated sludge wastewater treatment process, this system adopts the production rule representation method for knowledge representation; it has the following advantages:

[0144] (1) Simple and intuitive expression. The simple representation of rules, "IF...THEN", makes it easy for knowledge engineers to explain the structure of knowledge to domain experts.

[0145] (2) Facilitates reasoning. The process of reasoning using production rules is to match facts with the antecedents of the rules. If the antecedent of a rule matches the current fact, then the rule is satisfied. Therefore, using production rules to express knowledge makes reasoning more efficient and the algorithm simpler.

[0146] (3) Easy to explain to users. By listing the rules in the reasoning process, users can naturally understand how the initial factual conditions are transformed into the final diagnostic results.

[0147] (iv) Production rule knowledge representation

[0148] Fault trees are natural language representations of diagnostic knowledge, while knowledge in a knowledge base should be expressed in a form that computers can store. There is a one-to-one correspondence between fault trees and production rule representations in terms of knowledge description, so fault trees can be easily converted into "If-Then" rule forms.

[0149] In this embodiment, the construction of the expert system platform includes the establishment of an expert system database. The database is used to store facts, data, initial states, various intermediate states of the reasoning process, and objectives related to the problem in the relevant field. It reflects the main states and characteristics of the problem that the system needs to handle and is the object of system operation. The database is mainly used for the establishment of a database of influent and effluent water quality data of sewage treatment plants and control parameters calculated by mathematical models.

[0150] In this embodiment, the construction of the expert system platform includes the establishment of the expert system inference engine. The inference engine is a set of programs used to control and coordinate the entire expert system. Based on the user's input data, it uses the knowledge in the knowledge base, follows certain reasoning strategies, solves the current problem, interprets the user's request, and finally draws a conclusion.

[0151] This invention uses CLIPS as its internal inference engine; therefore, all rules must be converted into a form conforming to the CLIPS language specification. The general format of a rule is as follows:

[0152] (defrule <rule-name> [ <comment> ]

[0153] [ <declaration> ]

[0154] <conditional-element> *

[0155] =>

[0156] <actions>*)

[0157] Rules must be defined using the `defrule` function. <rule-name>This is the rule name, which can use any legal word in CLIIPS, but the rule name must be unique. If the entered rule name is the same as an existing rule, then the new rule will replace the old rule. <comment>Used to describe the purpose of the rules or other information that the programmer wants; <declaration>Features used to explain rules.

[0158] <conditional-element>The left-hand side of the rule consists of multiple or zero patterns, each consisting of one or more constraints, the purpose of which is to match fields in a custom template fact.

[0159] In the case of zero mode, the system automatically adds a special mode (initiate-fact). <actions>It is the right-hand side of the rule, which triggers the action to be executed by the rule when the condition pattern is met.

[0160] The entire rule must be enclosed in parentheses, and each pattern and action within the rule must also be enclosed in parentheses.

[0161] According to the CLIPS rule format, part of the code for the sludge bulking rule is as follows:

[0162] (defrule method 1; If sludge bulking occurs, the rules for eliminating the fault from the perspective of operating parameters are:)

[0163] parameter <- (nitrogen low);

[0164] =>

[0165] (retract parameter);

[0166] (print out t"The nitrogen need to be added."crlf));

[0167] (defrule method2 parameter<-(phosphorus low);

[0168] =>

[0169] (retract parameter)

[0170] (printout t"The phosphorus need to be added."crlf));

[0171] (defrule method3 parameter<-(pH low);

[0172] =>

[0173] (printout t"The temperature need to be increased."crlf));

[0174] (defrule method4 parameter<-(temperature high);

[0175] (retract parameter)

[0176] (printout t"The temperature need to be decreased."crlf));

[0177] (defrule method5 parameter<-(DO low);

[0178] =>

[0179] (retract parameter)

[0180] (printout t"Increase aeration value or decrease inlet volume."crlf));

[0181] (defrule method6 parameter<-(Ns high);

[0182] =>

[0183] (retract parameter)

[0184] (printout t"Increase MLSS."crlf));

[0185] In the rules described above, the expressions of empirical knowledge are mostly imprecise. For example, the descriptions of operating parameters such as N, P, DO, pH, T, and Ns do not use actual measured values ​​but instead use "high" and "low". Therefore, reasoning using such rules cannot yield precise results; it can only roughly indicate the cause of the fault and the direction for adjusting the operating parameters. To obtain the optimized values ​​for adjusting the parameters, fuzzy knowledge and fuzzy reasoning techniques are required.

[0186] Because fault conditions in the activated sludge wastewater treatment process are difficult to grasp, and the "inverted tree" fault tree requires the diagnostic process to traverse the rule base, this system adopts a top-down, breadth-first forward reasoning control strategy.

[0187] The human interface uses CLIPS embedded in Visual Basic to achieve hybrid programming. The basic steps are as follows:

[0188] ① Install and register the CLIPS ActiveX Control.OCX in Visual Basic, then insert the CLIPS control into the VB interface, and VB can then use all the functions and properties of the control;

[0189] ② Add several global variables to the CLIPS source code to record information during the inference engine's operation. This mainly involves using the CLIPS Bind command to constrain the variable addresses and pass the variable values.

[0190] ③ Add a command button in VB to start the CLIIPS program. The code is as follows:

[0191] Private Sub ClipsStart_Click()

[0192] Dim retval

[0193] retval=Shell(App.Path&"e: / es / CLIPS win.exe"vbHide)

[0194] ClipsStart_Enabled = False

[0195] End Sub

[0196] ④ The input of the question and the output of the answer are completed by sharing the I / O buffer.

[0197] CLIPS input and output are ultimately routed to stdout and stdin. Leveraging this feature of CLIPS, CLIPS input and output can be redirected. The code to redirect CLIPS's stdout and stdin streams to the buffer files output.dat and input.dat respectively is as follows:

[0198] freopen("input.dat", "w+", stdin): / / creates an input buffer and redirects stdin; freopen("output.dat", "w+", stdout): / / creates an output buffer and redirects stdout;

[0199] ⑤ Use the CLIPS control's Router (path buffer) to monitor and record CLIPS's operation, and display the results in the output window using the wdialog variable. The code is as follows:

[0200] Dim MyLJH As CLIPSLJH / / Define the output path buffer

[0201] Set MyLJH = New CLIPSLJH

[0202] MyLJH.Name = "wdialog"

[0203] MyLJH.eatCRLF = True / / Initialize the path buffer

[0204] MyLJH.Movefirst

[0205] Do OutPut.AddItem(MyLJH.Value)

[0206] MyLJH.MoveNext

[0207] Loop Until MyLJH.EOF = True / / Output the result of the path buffer to the VB interface

[0208] ⑥ After the inference is complete, use the CLIPS command function (exit) to exit the CLIPS process.

[0209] In this embodiment, the construction of the expert system platform includes the design of the expert system's human-computer interface. The human-computer interface translates the input information from experts or users into a form acceptable to the system, and then hands this information over to the corresponding modules for processing. On the other hand, it transforms the information output by the system to experts or users into a representation that is easy for humans to understand.

[0210] The human-machine interface of this invention adopts a modular design, mainly including four modules: symptom acquisition, fault diagnosis, knowledge base management, and system help.

[0211] After completing the design and development of the entire expert system, in order to verify the correctness and effectiveness of the system's diagnosis and whether it can achieve the expected results, some fault symptoms can be set up to conduct simulation tests on the system.

[0212] ① Run this system, and click the "Symptom Acquisition" button on the main interface to enter the symptom acquisition interface and complete the acquisition of symptom information.

[0213] ② Click the "Fault Diagnosis" button on the main interface to enter the fault diagnosis interface; perform fault diagnosis. The specific operation steps are as follows:

[0214] 1) Click the "Import Current Data Values" button to import the acquired parameter values; 2) Click the "Fuzzyize" button to fuzzify the parameter values; 3) Click the "Import Maximum and Minimum Values" button and enter the extreme values ​​of the parameters to be adjusted; 4) Select the type of fault severity and click "Start CLIIPS" to enter the inference interface; 5) Click the "Start Inference" button to perform fuzzy inference and obtain the parameter adjustment values ​​and diagnostic results; 6) Click the "Diagnostic Report" button to generate a report of the diagnostic results; 7) Click "View Inference Log" to display the CLIIPS inference process; 8) Click "Exit" to complete the diagnosis; At this point, the diagnostic results have achieved the expected goals, ensuring the accuracy and effectiveness of the system diagnosis.

[0215] The specific implementation of this invention is to use CLIPS and Visual Basic hybrid programming, supplemented by a wastewater treatment plant data collection system, to achieve the goal of building a wastewater treatment plant expert system.< / actions> < / declaration> < / comment> < / actions> < / conditional-element> < / declaration> < / comment> < / rule-name>

Claims

1. A wastewater treatment process fault diagnosis expert system, characterized in that, Building this system involves the following steps: S1. Establish a benchmark mathematical model based on the activated sludge mechanism on the simulation platform; S2. Introduce expert system technology and combine it with mechanism-based mathematical models to establish the overall structure design of an expert system for fault diagnosis of activated sludge wastewater treatment process. S3. Establish a knowledge base for production rule representation of knowledge. It consists of factual knowledge and heuristic knowledge. It is a collection of expert knowledge in a domain or for a specific problem. It is used to store fault diagnosis knowledge of the activated sludge wastewater treatment process, including theoretical knowledge and heuristic knowledge. The diagnostic knowledge is represented by production rule representation and converted into a form that conforms to CLIPS language specifications. It is then encoded and stored in the fuzzy knowledge base. S4. Establish a database: Collect the original symptom information of the fault phenomenon, the intermediate information generated during the diagnosis process, the optimal parameters obtained by the mathematical model simulation based on the mechanism, and the influent and effluent water quality data collected by the sewage treatment plant to build a database. S5. Create the internal inference engine: Input the internal inference engine into Visual Basic to achieve mixed programming of Visual Basic and internal inference engine; S6. Create a human-computer interaction interface: Set up the interface in the Visual Basic 6.0 environment; In S1, the modeling principle of the benchmark mathematical model is as follows: In the formula, Vr A Qc is the amount of material consumed in the reaction tank per unit time; Qc0 is the amount of material flowing in; Qc e Vdc is the amount of material flowing out. A / dt represents the amount of material accumulated in the reaction tank per unit time.

2. The wastewater treatment process fault diagnosis expert system according to claim 1, characterized in that, In S3, the acquisition of knowledge in the knowledge base representing knowledge through production rules is achieved through three specific approaches: S3.

1. The method of manual acquisition is adopted, and factual knowledge is obtained by the collection personnel through a large number of books, documents, manuals and other materials on the activated sludge wastewater treatment process. S3.2 Through repeated exchanges between the data collection personnel and domain experts and wastewater treatment plant operators, specific cases of typical failures are analyzed to obtain the insightful knowledge accumulated by domain experts in long-term practical operation. Then, the acquired knowledge is analyzed, summarized, and organized, and domain experts provide suggestions for modification and improvement until a relatively accurate and complete set of domain knowledge is formed. S3.3 Extract the optimal control parameters from the water quality data collected by the wastewater treatment plant and the mathematical model calculated by the wastewater treatment plant system, and automatically obtain and save them by downloading them into the system.

3. The wastewater treatment process fault diagnosis expert system according to claim 1, characterized in that, In S5, the internal inference engine uses CLIPS; all rules for the input data during inference are converted into a form that conforms to the CLIPS language specification.

4. The wastewater treatment process fault diagnosis expert system according to claim 1, characterized in that, In S6, the human-computer interaction interface adopts a modular design method, which realizes the separation of the knowledge base and the inference engine, making it convenient to expand the system's functions.

5. The wastewater treatment process fault diagnosis expert system according to claim 4, characterized in that, The specific workflows for the four modules—symptom acquisition, fault diagnosis, knowledge base management, and system help—are as follows: Symptom Acquisition Module: Based on abnormal situations in the activated sludge wastewater treatment process, acquire symptom facts from both fault phenomena and operating parameters. Fault diagnosis module: First, the acquired operating parameter values ​​are imported, represented in a fuzzy manner, and CLIIPS is started to perform uncertain inference, search for matching rules, and determine the direction of parameter adjustment; then, the extreme value range of the operating parameters is input, the severity of the fault is set, fuzzy inference technology is used to obtain the parameter adjustment value, and the credibility of the conclusion is calculated; after the diagnosis is completed, the diagnosis results are displayed to the user or in the form of a report, and can be saved and printed. Knowledge Base Management Module: The knowledge base management module is an interface between knowledge engineers or users and the knowledge base. Its main functions include: knowledge storage, knowledge retrieval, knowledge addition, knowledge deletion, and knowledge modification. It can also perform necessary syntax checks on the input knowledge to avoid errors during the input process. System Help: Provides context-sensitive help for user questions during use, enabling users to better utilize the system.

6. The wastewater treatment process fault diagnosis expert system according to claim 5, characterized in that, The knowledge base in the knowledge base management module is built on Microsoft Access, fully leveraging the advantages of simple database entry and clear entries. Meanwhile, Visual Basic provides powerful data access object tools, enabling easy linking to database files, accessing data, and performing operations and management on the database. Therefore, when managing the knowledge base, users do not need to directly access the database; they can edit the database directly through the editing windows of each functional module, overcoming the inconvenience of frequently switching between the database and the knowledge base. When users edit the knowledge base, they only modify the clipboard file, without affecting the CLIPS inference engine, achieving separation between the knowledge base and the inference engine and ensuring the transparency of the expert system.

7. The application of a wastewater treatment process fault diagnosis expert system according to any one of claims 1-6 in intelligent control of wastewater treatment.

Citation Information

Patent Citations

  • Sludge bulking control expert system for diagnosis based on filamentous bacteria population structure

    CN102063062A

  • Communication method for configuration software and monitoring large screen based on dynamic data exchange mechanism

    CN112350944A