An upflow anaerobic sludge blanket reactor alkalinity prediction method, device, equipment and medium
By detecting characteristic data and constructing mechanism models for acidic wastewater samples, combining gas and liquid phase online monitoring systems, and using a self-attention neural network model to predict alkalinity, the accuracy and efficiency issues of alkalinity control in upflow anaerobic sludge blanket reactors were solved, the stability of the reactor was improved, and the cost was reduced.
Patent Information
- Application Number
- CN202510111897.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-01-22
AI Technical Summary
In the existing technology, the prediction and control of alkalinity in upflow anaerobic sludge blanket reactors mainly rely on experience and trial and error, which is inefficient and difficult to guarantee accuracy. In addition, the deep learning model fails to deeply analyze the internal environment of the reactor, does not consider the long-term impact of water-inhibiting substances, and the characteristic values of the time series data used are not representative enough.
By detecting characteristic data of acidic wastewater samples, a model of alkalinity generation mechanism was constructed. The data was obtained by combining the gas and liquid phase online monitoring systems. The alkalinity was predicted using a neural network model with a self-attention mechanism. The alkalinity was dynamically regulated to control the minimum dosage of exogenous alkali.
The accurate prediction of alkalinity of upflow anaerobic sludge blanket reactor was achieved, which improved the operation stability of the reactor, reduced salt accumulation and lowered the treatment cost.
Smart Images

Figure CN119993309B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wastewater treatment, and in particular to an alkalinity prediction method, device, equipment and medium for an upflow anaerobic sludge blanket reactor. Background Art
[0002] As the environmental challenges posed by traditional plastics grow, coal-based biodegradable plastics, such as polybutylene adipate terephthalate (PBAT), are emerging as alternatives. However, the acidic organic wastewater generated during its production contains high concentrations of organic matter and various pollutants, and direct discharge can have adverse environmental impacts. This wastewater has a low pH and high chemical oxygen demand, requiring large amounts of alkaline substances to adjust the pH to neutral before treatment. This increases treatment costs and leads to salinity accumulation, which conflicts with the strict pH requirements of anaerobic digestion.
[0003] Currently, the prediction and control of alkalinity in upflow anaerobic sludge blanket reactors primarily relies on experience and trial-and-error methods, which are inefficient and difficult to guarantee accuracy. Furthermore, existing research has utilized deep learning models such as LSTM (Long Short-Term Memory) or CNN (Convolutional Neural Network) to predict methane production time series and evaluate reactor performance. However, these studies focus on analyzing final results rather than in-depth analysis of the reactor's internal environment. Furthermore, the prediction models fail to consider the long-term effects of influent inhibitors. The time series data used is often point-based rather than continuous, resulting in insufficiently representative eigenvalues.
[0004] As can be seen from the above, how to more accurately predict the alkalinity in the upflow anaerobic sludge blanket reactor in order to control the minimum dosage of exogenous alkali is a problem that needs to be solved urgently. Summary of the Invention
[0005] In view of this, the present invention aims to provide a method, device, equipment, and medium for predicting alkalinity in an upflow anaerobic sludge blanket reactor, which can more accurately predict the alkalinity in the upflow anaerobic sludge blanket reactor and control the minimum dosage of exogenous alkali. The specific scheme is as follows:
[0006] In a first aspect, the present application provides a method for predicting alkalinity of an upflow anaerobic sludge blanket reactor, comprising:
[0007] Acidic wastewater samples in the wastewater are tested to obtain characteristic data, a mechanism test of alkalinity generation during anaerobic digestion of various substances in the acidic wastewater samples is conducted using a control variable method and the characteristic data, and an alkalinity generation mechanism model is constructed using the test data obtained from the mechanism test;
[0008] The gas parameters and liquid phase parameters in the upflow anaerobic sludge blanket reactor are monitored by a first preset monitoring system and a second preset monitoring system, respectively, to obtain first monitoring data and second monitoring data; the alkalinity in the acidic wastewater sample is then monitored by a preset alkalinity titration system to obtain alkalinity titration data; and alkali dosage data is determined based on the operating state of the upflow anaerobic sludge blanket reactor under different preset acidity and alkalinity conditions;
[0009] Using a data set consisting of the first monitoring data, the second monitoring data, the alkalinity titration data, and the alkali addition data, and combining it with the alkalinity generation mechanism model, an initial alkalinity prediction model is trained to obtain a target alkalinity prediction model; the initial alkalinity prediction model is an alkalinity prediction model constructed based on a neural network model with a self-attention mechanism;
[0010] Based on the parameters to be detected and using the target alkalinity prediction model, the internal alkalinity of the upflow anaerobic sludge blanket reactor is predicted, and based on the obtained prediction result, it is determined whether additional alkali needs to be added to the upflow anaerobic sludge blanket reactor and the corresponding additional alkali amount.
[0011] Optionally, the acidic wastewater sample in the wastewater is tested to obtain various characteristic data, including:
[0012] Extracting the obtained wastewater to obtain an acidic wastewater sample, and testing the acidic wastewater sample using a thundermagnetic pH meter to obtain a pH value;
[0013] The acidic wastewater sample is tested using a hash reagent, a digester, and a spectrophotometer to obtain a total chemical oxygen demand, and the acidic wastewater sample is tested using Nessler's reagent spectrophotometry and ammonium molybdate spectrophotometry to obtain ammonia nitrogen content and total nitrogen content, respectively;
[0014] The acidic wastewater sample is tested by gas chromatography and a preset titration method to obtain the volatile fatty acid content and the alkalinity value of the inlet and outlet water;
[0015] The characteristic data are obtained by using the pH value, the total chemical oxygen demand, the ammonia nitrogen content, the total nitrogen content, the volatile fatty acid content, and the inlet and outlet water alkalinity values.
[0016] Optionally, the alkalinity generation mechanism test during the anaerobic digestion of each substance in the acidic wastewater sample is conducted using the control variable method and each characteristic data, and the alkalinity generation mechanism model is constructed using the test data obtained from the mechanism test, including:
[0017] Anaerobic digestion is performed on the substances in the acidic wastewater sample under different preset alkalinity conditions using a controlled variable method, and the substances after anaerobic digestion are tested to obtain post-reaction data;
[0018] By comparing the characteristic data and the post-reaction data, the corresponding relationship between the degradation rate, methane production and alkalinity production of each substance during the anaerobic digestion process is obtained;
[0019] The corresponding relationship is used to obtain an alkalinity generation coefficient, and an alkalinity mechanism model for determining the anaerobic alkalinity generation of each substance in the acidic wastewater is constructed using the alkalinity generation coefficient.
[0020] Optionally, the gas parameters and liquid phase parameters in the upflow anaerobic sludge blanket reactor are monitored by the first preset monitoring system and the second preset monitoring system respectively to obtain first monitoring data and second monitoring data, and then the alkalinity in the acidic wastewater sample is monitored by the preset alkalinity titration system to obtain alkalinity titration data, and the alkali addition data is determined based on the operating state of the upflow anaerobic sludge blanket reactor under different preset acidity and alkalinity conditions, including:
[0021] A gas phase online monitoring system for monitoring various gas parameters is constructed using a methane sensor, a carbon dioxide sensor, a hydrogen sensor, and a gas flow meter connected in sequence on a gas path, so as to monitor methane, hydrogen, and carbon dioxide generated by the acidic wastewater sample in the upflow anaerobic sludge blanket reactor through the gas phase online monitoring system to obtain first monitoring data;
[0022] A liquid phase online monitoring system is constructed by embedding a conductivity sensor, a pH sensor, and an oxidation-reduction potential sensor at the lower end of the reflux port of the upflow anaerobic sludge blanket reactor, so as to monitor the conductivity, pH value, and oxidation-reduction potential of the acidic wastewater sample in the upflow anaerobic sludge blanket reactor using the liquid phase online monitoring system to obtain second monitoring data;
[0023] Constructing a preset alkalinity titration system based on a pH sensor, a precision metering pump, and a control computer, so as to obtain alkalinity titration data of the acidic wastewater sample per unit volume using the preset alkalinity titration system and a preset program development environment;
[0024] By adjusting the inlet alkalinity of the upflow anaerobic sludge blanket reactor, a first alkali dosage corresponding to the upflow anaerobic sludge blanket reactor under different acidic conditions is obtained, and then the alkalinity generation amount of each substance under unit COD concentration in the upflow anaerobic sludge blanket reactor is used to obtain the second alkali dosage required for the normal operation of the upflow anaerobic sludge blanket reactor, and the first alkali dosage and the second alkali dosage are used to obtain alkali dosage data.
[0025] Optionally, the data set consisting of the first monitoring data and the second monitoring data, the alkalinity titration data, and the alkali addition data is used to train an initial alkalinity prediction model in combination with the alkalinity generation mechanism model to obtain a target alkalinity prediction model, including:
[0026] Obtaining raw data using the first monitoring data, the second monitoring data, the alkalinity titration data, and the alkali addition data, and preprocessing the raw data to obtain processed data; the preprocessing includes checking and processing missing data and abnormal data in the raw data;
[0027] Performing a time feature addition operation on the processed data to obtain added data, and performing normalization processing on the added data to obtain a data set;
[0028] The data set is divided based on a preset division ratio to obtain corresponding training sets, validation sets, and test sets. The training set is then used in combination with the alkalinity generation mechanism model to train the initial alkalinity prediction model to obtain a trained alkalinity prediction model. The trained alkalinity prediction model is evaluated and tested using the validation set and the test set, respectively, to obtain a target alkalinity prediction model.
[0029] Optionally, the process of constructing the initial alkalinity prediction model includes:
[0030] Constructing an initial alkalinity prediction model with an input layer, an encoder layer, a decoder layer, and an output layer based on a neural network model of a self-attention mechanism, and performing corresponding encoder parameter configuration, decoder parameter configuration, and loss function configuration on the initial alkalinity prediction model;
[0031] The encoder layer is an encoder layer obtained by stacking several encoders and includes a self-attention mechanism and a feedforward neural network; the decoder layer is a decoder layer obtained by stacking several decoders.
[0032] Optionally, the internal alkalinity of the upflow anaerobic sludge blanket reactor is predicted based on the parameter to be detected and using the target alkalinity prediction model, and whether additional alkali needs to be added to the upflow anaerobic sludge blanket reactor and the corresponding additional alkali amount are determined based on the obtained prediction result, including:
[0033] Integrating a target alkalinity prediction model into a preset monitoring system to predict the internal alkalinity of the upflow anaerobic sludge blanket reactor based on the parameters to be detected by the preset monitoring system to obtain a current alkalinity value inside the upflow anaerobic sludge blanket reactor; the preset monitoring system includes the first preset monitoring system and the second preset monitoring system;
[0034] determining whether the upflow anaerobic sludge blanket reactor is in a normal state based on the current alkalinity value;
[0035] If the upflow anaerobic sludge blanket reactor is in an abnormal state, whether additional alkali needs to be added to the upflow anaerobic sludge blanket reactor is determined based on the current alkalinity value, and a corresponding additional alkali addition amount is obtained according to the determination result.
[0036] In a second aspect, the present application provides an alkalinity prediction device for an upflow anaerobic sludge blanket reactor, comprising:
[0037] a mechanism model construction module for detecting acidic wastewater samples in wastewater to obtain various characteristic data, conducting a mechanism test on alkalinity generation during anaerobic digestion of various substances in the acidic wastewater samples using a control variable method and the characteristic data, and constructing an alkalinity generation mechanism model using the test data obtained from the mechanism test;
[0038] a monitoring data acquisition module, configured to monitor various gas parameters and various liquid phase parameters in the upflow anaerobic sludge blanket reactor using a first preset monitoring system and a second preset monitoring system, respectively, to obtain first monitoring data and second monitoring data; then, using a preset alkalinity titration system, monitor the alkalinity in the acidic wastewater sample to obtain alkalinity titration data; and determine alkali dosage data based on the operating state of the upflow anaerobic sludge blanket reactor under different preset acidity and alkalinity conditions;
[0039] a prediction model training module, configured to train an initial alkalinity prediction model using a data set consisting of the first monitoring data, the second monitoring data, the alkalinity titration data, and the alkali addition data, in combination with the alkalinity generation mechanism model, to obtain a target alkalinity prediction model; the initial alkalinity prediction model is an alkalinity prediction model constructed using a neural network model based on a self-attention mechanism;
[0040] The alkalinity prediction module is used to predict the internal alkalinity of the upflow anaerobic sludge blanket reactor based on the parameters to be detected and using the target alkalinity prediction model, and determine whether additional alkali is needed in the upflow anaerobic sludge blanket reactor and the corresponding additional alkali amount based on the obtained prediction result.
[0041] In a third aspect, the present application provides an electronic device, comprising:
[0042] Memory, used to store computer programs;
[0043] The processor is configured to execute the computer program to implement the aforementioned alkalinity prediction method for an upflow anaerobic sludge blanket reactor.
[0044] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned alkalinity prediction method for an upflow anaerobic sludge blanket reactor.
[0045] The present application detects acidic wastewater samples in wastewater to obtain various characteristic data, conducts a mechanism test on the alkalinity generation during the anaerobic digestion of various substances in the acidic wastewater samples by controlling the variable method and the characteristic data, and constructs an alkalinity generation mechanism model using the test data obtained from the mechanism test; monitors various gas parameters and liquid phase parameters in the upflow anaerobic sludge blanket reactor respectively by a first preset monitoring system and a second preset monitoring system to obtain first monitoring data and second monitoring data, and then uses a preset alkalinity titration system to monitor the alkalinity in the acidic wastewater sample to obtain alkalinity titration data, and based on the upflow anaerobic sludge blanket reactor at different preset acid and alkaline conditions, the alkalinity titration data is obtained. The method comprises the following steps: determining alkali dosage data based on the operating status under the conditions of the first monitoring data, the second monitoring data, the alkalinity titration data and the alkali dosage data; training an initial alkalinity prediction model using a data set consisting of the first monitoring data, the second monitoring data, the alkalinity titration data and the alkali dosage data, and combining the alkalinity generation mechanism model to obtain a target alkalinity prediction model; the initial alkalinity prediction model is an alkalinity prediction model constructed by a neural network model based on a self-attention mechanism; predicting the internal alkalinity of the upflow anaerobic sludge blanket reactor based on the parameters to be detected and using the target alkalinity prediction model, and determining whether additional alkali is needed in the current upflow anaerobic sludge blanket reactor and the corresponding additional alkali dosage based on the obtained prediction result.
[0046] As can be seen from the above, the present application first detects characteristic data of the acidic wastewater sample and uses the control variable method to conduct a mechanism test to construct an alkalinity generation mechanism model. Then, the gas parameters and liquid phase parameters in the upflow anaerobic sludge blanket reactor are monitored respectively by a first preset monitoring system and a second preset monitoring system. At the same time, the alkalinity titration data obtained by using the preset alkalinity titration system and the alkali addition data obtained by setting different preset acid and alkalinity conditions are combined to form a data set. The initial alkalinity prediction model is trained using the data set and combined with the alkalinity generation mechanism model to obtain a target alkalinity prediction model. In this way, the alkalinity inside the upflow anaerobic sludge blanket reactor is predicted using the target alkalinity prediction model. The prediction results obtained can be used to timely determine whether additional alkali is needed in the current upflow anaerobic sludge blanket reactor and the corresponding additional alkali addition amount, thereby controlling the minimum dosage of exogenous alkali and realizing dynamic regulation of the reactor alkalinity, which not only improves the operating stability of the reactor, but also effectively reduces the accumulation of salt and reduces the treatment cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0048] Figure 1 This is a flow chart of a method for predicting alkalinity in an upflow anaerobic sludge blanket reactor disclosed in this application;
[0049] Figure 2 This is a schematic structural diagram of an alkalinity prediction device for an upflow anaerobic sludge blanket reactor disclosed in this application;
[0050] Figure 3 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0051] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0052] At present, the prediction and control of the alkalinity of upflow anaerobic sludge blanket reactors mainly rely on experience and trial and error, which is not only inefficient but also difficult to guarantee accuracy. Even some studies have used deep learning models to predict methane production time series to judge the performance of the reactor. However, these studies focus on the analysis of the final results, without in-depth analysis of the internal environment of the reactor, and the prediction model does not consider the long-term impact of water inlet inhibitors. The time series data used are mostly point data rather than continuous data, and the characteristic values are not representative enough. To this end, the present application provides a method for predicting the alkalinity of an upflow anaerobic sludge blanket reactor, which uses a target alkalinity prediction model to predict the alkalinity inside the upflow anaerobic sludge blanket reactor. The obtained prediction results can be used to timely determine whether additional alkali is needed in the current upflow anaerobic sludge blanket reactor and the corresponding additional alkali addition amount, thereby controlling the minimum dosage of exogenous alkali and realizing dynamic regulation of the reactor alkalinity, which not only improves the operating stability of the reactor, but also effectively reduces the accumulation of salt and reduces the treatment cost.
[0053] See also Figure 1 As shown, an embodiment of the present invention discloses a method for predicting alkalinity of an upflow anaerobic sludge blanket reactor, comprising:
[0054] Step S11: Detect the acidic wastewater sample in the wastewater to obtain various characteristic data, conduct a mechanism test on the alkalinity generation during the anaerobic digestion of various substances in the acidic wastewater sample using the control variable method and the characteristic data, and construct an alkalinity generation mechanism model using the test data obtained from the mechanism test.
[0055] In this embodiment, wastewater is obtained from a wastewater source, and the wastewater is subjected to pretreatment operations such as filtration and precipitation. The treated wastewater is sampled to obtain several acidic wastewater samples, and then the pH value of the acidic wastewater sample is obtained using a thunder magnetic pH meter. The total chemical oxygen demand of the acidic wastewater sample is obtained using a hash reagent, a digester, and a spectrophotometer. The ammonia nitrogen content and the total nitrogen content of the acidic wastewater sample are respectively obtained using Nessler's reagent spectrophotometry and ammonium molybdate spectrophotometry. The type and content of volatile fatty acids are obtained using a gas chromatograph. The alkalinity value at the water inlet is obtained using a preset titration method that meets standard conditions. The pH value, the total chemical oxygen demand, the ammonia nitrogen content, the total nitrogen content, the type and content of the volatile fatty acids, and the inlet and outlet water alkalinity values are sorted and analyzed to obtain various characteristic data.
[0056] Specifically, the method for detecting the acidic wastewater sample in the wastewater to obtain various characteristic data includes: extracting the obtained wastewater to obtain an acidic wastewater sample, and detecting the acidic wastewater sample using a thundermagnetic pH meter to obtain a pH value; detecting the acidic wastewater sample using a hash reagent, a digester, and a spectrophotometer to obtain a total chemical oxygen demand, and detecting the acidic wastewater sample using Nessler's reagent spectrophotometry and ammonium molybdate spectrophotometry to obtain ammonia nitrogen content and total nitrogen content; detecting the acidic wastewater sample using a gas chromatograph and a preset titration method to obtain volatile fatty acid content and inlet and outlet water alkalinity values; and obtaining various characteristic data using the pH value, the total chemical oxygen demand, the ammonia nitrogen content, the total nitrogen content, the volatile fatty acid content, and the inlet and outlet water alkalinity values. It is worth mentioning that the wastewater contains a large amount of organic matter and has a low pH value. As long as the above-mentioned pH value, total chemical oxygen demand, ammonia nitrogen content, total nitrogen content, type of volatile fatty acids, and inlet and outlet water alkalinity values can be obtained, it can be used as a method for measuring the various characteristic data in the acidic wastewater sample, and no specific limitation is made here.
[0057] In this embodiment, after obtaining each characteristic data, each substance in the acidic wastewater sample is cultured separately under different alkalinity conditions at the same COD (chemical oxygen demand) equivalent and the same sludge concentration using the controlled variable method. The post-reaction data of the acidic wastewater sample before and after the anaerobic reaction are measured, and the methane production of the acidic wastewater sample during the anaerobic reaction is detected. The characteristic data is used as pre-reaction data. A comparison result is obtained by comparing the pre-reaction data with the post-reaction data to obtain a correspondence between the degradation rate, methane production, and alkalinity production of each substance during the anaerobic digestion process. The correspondence is used to obtain an alkalinity generation coefficient, and an alkalinity mechanism model for determining the anaerobic alkalinity production of each substance in the acidic wastewater is constructed based on the alkalinity generation coefficient.
[0058] Specifically, the alkalinity generation mechanism test of each substance in the acidic wastewater sample during the anaerobic digestion process using the control variable method and each characteristic data, and constructing an alkalinity generation mechanism model using the test data obtained from the mechanism test, includes: using the control variable method to perform anaerobically digestion on each substance in the acidic wastewater sample under different preset alkalinity conditions, and detecting each substance after anaerobic digestion to obtain each post-reaction data; by comparing each characteristic data and each post-reaction data, obtaining a corresponding relationship between the degradation rate, methane generation, and alkalinity generation of each substance during the anaerobic digestion process; using the corresponding relationship to obtain an alkalinity generation coefficient, and constructing an alkalinity mechanism model for determining the anaerobic alkalinity generation of each substance in the acidic wastewater using the alkalinity generation coefficient.
[0059] It can be understood that, by using the controlled variable method, each substance in the acidic wastewater sample is anaerobically digested under the same COD equivalent, the same sludge concentration and different alkalinity conditions, and each substance after the anaerobic digestion is detected to obtain post-reaction data. By comparing the characteristic data before the reaction with the post-reaction data after the reaction, the degradation rate (k1, k2, ..., kn) of each substance (X1, X2, ..., Xn) during the anaerobic digestion process is calculated, and the methane generation (y1, y2, ..., yn) and alkalinity generation (z1, z2, ..., zn) of each substance during the degradation process are determined; based on the degradation rate, the methane generation and the alkalinity generation, the alkalinity (m1, m2, ..., mn) of each substance is calculated to obtain the alkalinity generation coefficient mi=(yi, zi).
[0060] In a specific embodiment, if a substance X1 with a COD equivalent concentration is present in the acidic wastewater sample and is consumed after anaerobic digestion, its degradation rate is k1. During this process, y1 moles of methane are cumulatively generated, and z1 moles of alkalinity are correspondingly generated. The alkalinity is recorded as m1 and expressed as m1=(y1, z1). , n is the cod concentration. Similarly, for substance X2, the degradation rate of one COD equivalent concentration after anaerobic digestion is k2. While generating y2 moles of methane, z2 moles of alkalinity are generated, recorded as m2, expressed as m2=(y2, z2), thus obtaining the alkalinity generation coefficient mi=(yi, zi).
[0061] Furthermore, based on the alkalinity generation coefficient, an alkalinity mechanism model is constructed to determine the anaerobic alkalinity produced by each substance in the acidic wastewater. According to the concentration of each substance in the acidic wastewater sample and the corresponding wastewater volume v, the total alkalinity that the acidic wastewater sample can generate during the anaerobic digestion process can be calculated. The calculation formula is as follows:
[0062] ;
[0063] Where M represents the predicted total alkalinity and methane generated by the acidic wastewater sample itself, a and b represent the concentrations of specific substances in the wastewater, m1 and m2 represent the alkalinity coefficients generated by anaerobic digestion of the corresponding substances, and v represents the wastewater volume. Once the total alkalinity is determined, the amount of additional alkali required during anaerobic digestion can be determined.
[0064] Step S12: monitor the gas parameters and liquid phase parameters in the upflow anaerobic sludge blanket reactor respectively by the first preset monitoring system and the second preset monitoring system to obtain first monitoring data and second monitoring data, and then use the preset alkalinity titration system to monitor the alkalinity in the acidic wastewater sample to obtain alkalinity titration data, and determine the alkali addition data based on the operating status of the upflow anaerobic sludge blanket reactor under different preset acidity and alkalinity conditions.
[0065] In this embodiment, a methane sensor, a carbon dioxide sensor, a hydrogen sensor, and a gas flow meter are sequentially connected on the gas path to construct a gas phase online monitoring system, and the methane, hydrogen, and carbon dioxide generated by the acidic wastewater sample in the upflow anaerobic sludge blanket reactor are detected based on the gas phase online monitoring system to obtain first monitoring data; a conductivity sensor, a pH sensor, and an oxidation-reduction potential sensor are embedded at the lower end of the UASB reactor (i.e., the upflow anaerobic sludge blanket reactor) to construct a liquid phase online monitoring system, and the conductivity, pH value, and oxidation-reduction potential of the acidic wastewater sample in the upflow anaerobic sludge blanket reactor are monitored by the liquid phase online monitoring system to obtain second monitoring data. measuring data; constructing a preset alkalinity titration system based on a pH sensor, a precision metering pump and a control computer, and using the preset alkalinity titration system and a preset program development environment to obtain alkalinity titration data of the acidic wastewater sample per unit volume; adjusting the inlet alkalinity of the upflow anaerobic sludge blanket reactor to obtain a first alkali dosage corresponding to the upflow anaerobic sludge blanket reactor under extreme conditions, and then using the alkalinity production of each of the substances at a unit COD concentration in the upflow anaerobic sludge blanket reactor to obtain a second alkali dosage required for the normal operation of the upflow anaerobic sludge blanket reactor, and using the first alkali dosage and the second alkali dosage to obtain alkali dosage data.
[0066] Specifically, the gas parameters and liquid phase parameters in the upflow anaerobic sludge blanket reactor are monitored respectively by the first preset monitoring system and the second preset monitoring system to obtain first monitoring data and second monitoring data, and then the alkalinity in the acidic wastewater sample is monitored by the preset alkalinity titration system to obtain alkalinity titration data, and the alkali addition data is determined based on the operating state of the upflow anaerobic sludge blanket reactor under different preset acidic and alkaline conditions, including: using a methane sensor, a carbon dioxide sensor, a hydrogen sensor and a gas flow meter connected in sequence on the gas path to construct a gas phase online monitoring system for monitoring various gas parameters, so as to monitor the methane, hydrogen and carbon dioxide generated by the acidic wastewater sample in the upflow anaerobic sludge blanket reactor through the gas phase online monitoring system to obtain the first monitoring data; using a conductivity sensor, a pH sensor and an oxidation state sensor embedded at the lower end of the reflux port of the upflow anaerobic sludge blanket reactor to monitor the methane, hydrogen and carbon dioxide generated by the acidic wastewater sample in the upflow anaerobic sludge blanket reactor to obtain the first monitoring data. A liquid phase online monitoring system is constructed using a reduction potential sensor, and the conductivity, pH value, and redox potential of the acidic wastewater sample in the upflow anaerobic sludge blanket reactor are monitored by the liquid phase online monitoring system to obtain second monitoring data; a preset alkalinity titration system is constructed based on the pH sensor, a precision metering pump, and a control computer, and the alkalinity titration data of the acidic wastewater sample per unit volume are obtained by using the preset alkalinity titration system and a preset program development environment; the first alkali dosage corresponding to the upflow anaerobic sludge blanket reactor under different acidic conditions is obtained by adjusting the inlet alkalinity of the upflow anaerobic sludge blanket reactor, and then the alkalinity generation amount of each substance under unit COD concentration in the upflow anaerobic sludge blanket reactor is used to obtain the second alkali dosage required for the normal operation of the upflow anaerobic sludge blanket reactor, and the alkali dosage data are obtained using the first alkali dosage and the second alkali dosage.
[0067] It can be understood that the acidic wastewater sample is continuously introduced into the UASB reactor through the feed pipe. When passing through the activated sludge layer, the organic matter in the acidic wastewater sample is digested and decomposed by anaerobic methanogens, and the generated gas rises through the three-phase separator and enters the gas path from the top. Therefore, a methane sensor, a carbon dioxide sensor, a hydrogen sensor and a gas flow meter are connected in sequence on the gas path to construct a gas phase online monitoring system, and the methane, hydrogen and carbon dioxide generated by the acidic wastewater sample in the upflow anaerobic sludge blanket reactor are detected based on the gas phase online monitoring system to obtain first monitoring data; a conductivity sensor, a pH sensor and an oxidation-reduction potential sensor are embedded at the lower end of the UASB reactor to construct a liquid phase online monitoring system, and the conductivity, pH value and oxidation-reduction potential of the acidic wastewater sample in the upflow anaerobic sludge blanket reactor are monitored by the liquid phase online monitoring system to obtain second monitoring data.
[0068] In a specific embodiment, the methane sensor and the carbon dioxide sensor use non-dispersive infrared technology. After the infrared radiation emitted by the infrared light source is absorbed by the gas parameters in the acidic wastewater sample at a certain concentration, the spectral intensity proportional to the gas concentration will change. The change in spectral intensity can be used to invert the concentration of each gas parameter. The methane concentration is recorded as , the carbon dioxide concentration is recorded as The hydrogen sensor uses the electrochemical principle. Each gas parameter undergoes a corresponding redox reaction on the working electrode to generate current. The induced current is proportional to the concentration of each gas parameter, thereby determining the hydrogen concentration. The gas flow meter uses thermal mass flow measurement to measure the instantaneous gas flow in the gas path. The methane sensor, the carbon dioxide sensor, the hydrogen sensor, and the gas flow meter use a serial communication protocol to periodically send instructions to the computer terminal to receive real-time data. The gas flow calculation formula is as follows:
[0069] ;
[0070] Where Q is the cumulative gas production; q is the gas flow rate; is the sampling time interval of each sensor. Multiply the corresponding gas flow rate in the same time interval by the methane concentration ,carbon dioxide concentration, hydrogen concentration , the cumulative production of methane, hydrogen, and carbon dioxide in the time period is obtained, and the calculation formula is as follows:
[0071] ;
[0072] ;
[0073] ;
[0074] The cumulative production of methane, hydrogen and carbon dioxide generated by the acidic wastewater sample in the upflow anaerobic sludge blanket reactor can be calculated using a methane sensor, a carbon dioxide sensor, a hydrogen sensor and a gas flow meter and other principles, which are not specifically limited here.
[0075] In this embodiment, a preset alkalinity titration system is used to monitor the alkalinity in the acidic wastewater sample and obtain alkalinity titration data. In one specific embodiment, an alkalinity and pH online measurement system (i.e., a preset alkalinity titration system) is constructed based on a pH sensor, a precision metering pump, a control computer, and a preset acid-base titration vessel. This system is programmed using LabVIEW (a program development environment), and the various components of the titration system are controlled via a serial communication protocol. This programming enables the acquisition of pH values, the on / off control of the sampling pump and displacement pump, the on / off control of the precision metering pump, and the precise control of the injection water volume. The sampling pump can be automatically activated at a one-hour interval, and a 20-ml effluent sample is drawn from the upflow anaerobic sludge blanket reactor into the preset acid-base titration vessel. A pH electrode measures and records the initial pH value of the water sample, and the precision metering pump begins to draw a hydrochloric acid solution of a preset concentration and gradually injects it into the preset acid-base titration vessel. The LabVIEW program records the number of steps of the precision metering pump and calculates the volume of hydrochloric acid consumed based on the specifications. During the titration, a magnetic stirrer maintains stirring to ensure a uniform reaction. When the pH drops to 3.8, the titration endpoint is considered reached, at which point the bicarbonate alkalinity is completely consumed. The alkalinity per unit volume of the acidic wastewater sample is calculated using the consumed volume and concentration of hydrochloric acid and the LabVIEW program to obtain alkalinity titration data. The preset acid-base titration vessel includes an upper water inlet, a lower outlet, a pH electrode, and a magnetic stirrer.
[0076] It is understood that in this embodiment, two reactor experiments can be established to explore the anaerobic digestion process of the upflow anaerobic sludge blanket reactor from neutral to acidic conditions and under actual operating conditions, and the corresponding alkalinity dosage under the two conditions is respectively detected to obtain alkali dosage data. In one specific embodiment, reactor experiment 1 is to set the influent pH to 7.5-8, set the initial hydraulic retention time and reflux ratio, and flow the influent through the upflow anaerobic sludge blanket reactor for treatment through the feed pipe. The alkalinity of the influent is reduced in steps of 0.5 per unit of influent pH reduction. The continuous characteristic data (methane yield, pH, conductivity, redox potential, etc.) and discontinuous characteristic data (COD degradation rate, volatile fatty acids, internal alkalinity, alkali dosage, etc.) of the upflow anaerobic sludge blanket reactor are observed to explore the limit state of normal operation of the upflow anaerobic sludge blanket reactor under acidic conditions. The experiment recorded the alkalinity dosage during the step-by-step alkalinity reduction process and compared it with the alkalinity dosage required for influent under neutral conditions to obtain the corresponding first alkali dosage under different acidic conditions. To further explore the minimum alkalinity dosage required for the normal operation of the upflow anaerobic sludge blanket reactor under acidic conditions, the experiment also adjusted the operating conditions of the upflow anaerobic sludge blanket reactor, such as increasing the recirculation ratio and introducing exogenous substances such as activated carbon and iron powder.
[0077] Furthermore, the second reactor experiment utilizes characteristic components in the acidic wastewater sample, such as tetrahydrofuran, cyclopentanone, n-butanol, acetic acid, ethanol, propionic acid, butyric acid, and 1,4-butanediol, to simulate the anaerobic digestion process under actual operating conditions. By introducing the characteristic components into the water individually and in groups, monitoring the continuous characteristic data and the discontinuous characteristic data, analyzing the alkalinity generated by each substance during anaerobic digestion at a unit COD concentration, calculating the amount of additional alkali required to maintain steady-state operation of the system, and obtaining the second alkali dosage, and using the first alkali dosage and the second alkali dosage to obtain alkali dosage data. In addition, the second hard gas experiment also records the total alkalinity that can be generated by each component during the anaerobic digestion process when it is introduced into the water individually or in combination, and compares this actual data with the theoretical value obtained by the established calculation method to achieve cross-validation to ensure the accuracy and reliability of the data.
[0078] Step S13: Using the data set consisting of the first monitoring data and the second monitoring data, the alkalinity titration data, and the alkali addition data, and combining it with the alkalinity generation mechanism model, an initial alkalinity prediction model is trained to obtain a target alkalinity prediction model; the initial alkalinity prediction model is an alkalinity prediction model constructed based on a neural network model of a self-attention mechanism.
[0079] In this embodiment, the obtained first monitoring data and the second monitoring data, the alkalinity titration data and the alkali addition data are used to construct original data, and the missing values and outliers in the original data are processed to obtain processed data, a time feature addition operation is performed on the processed data, and then the added data is standardized or normalized to obtain a data set, the data set is divided based on a preset division ratio to obtain a training set, a validation set and a test set, the constructed initial alkalinity prediction model is trained using the training set and in combination with the alkalinity generation mechanism model to obtain a trained alkalinity prediction model, the trained alkalinity prediction model is evaluated and tested using the validation set and the test set respectively to obtain a target alkalinity prediction model.
[0080] Specifically, the data set consisting of the first monitoring data, the second monitoring data, the alkalinity titration data and the alkali addition data is used, and the initial alkalinity prediction model is trained in combination with the alkalinity generation mechanism model to obtain a target alkalinity prediction model, including: obtaining original data using the first monitoring data, the second monitoring data, the alkalinity titration data and the alkali addition data, and preprocessing the original data to obtain processed data; the preprocessing includes checking and processing missing data and abnormal data in the original data; adding time features to the processed data to obtain added data, and normalizing the added data to obtain a data set; dividing the data set based on a preset division ratio to obtain corresponding training sets, validation sets and test sets, and then using the training set and combining the alkalinity generation mechanism model to train the initial alkalinity prediction model to obtain a trained alkalinity prediction model, and using the validation set and test set to evaluate and test the trained alkalinity prediction model to obtain a target alkalinity prediction model.
[0081] It is understandable that raw data is constructed based on the first monitoring data and the second monitoring data, the alkalinity titration data, and the alkali addition data, and the raw data is preprocessed to obtain processed data. In a specific embodiment, Python's pandas library can be used to import the data in the table into the program by reading the table file command: pd.read_excel('your_data.xlsx'). Due to sensor failure, data transmission interruption and other reasons, there are missing values and outliers in the raw data. In the case of a large number of consecutive missing values or missing key data, the data of the day is directly deleted to ensure that the integrity of the data does not affect subsequent analysis. For a small number of missing values, interpolation (nearby value filling) is used to fill in to maintain the continuity of the data as much as possible. The outliers in the raw data are identified using a preset statistical method. For the identified outliers, they are corrected or deleted according to the cause of the outliers and combined with the basic principles and feature selection of anaerobic digestion. The preset statistical method is the 3σ principle, also known as the normal distribution, where σ represents the standard deviation and μ represents the mean. According to the characteristics of the normal distribution, the probability that the value in the raw data is distributed in (μ-σ, μ+σ) is 0.6826, the probability that the value is distributed in (μ-2σ, μ+2σ) is 0.9544, and the probability that the value is distributed in (μ-3σ, μ+3σ) is 0.9974. Therefore, it can be considered that the values in the raw data are almost all concentrated in (μ-3σ, μ+3σ), and the values outside this range are outliers. The mean is the average value of the raw data, and the mean calculation formula is: μ=Σx / n; where Σx represents the sum of all raw data, and n represents the number of raw data; the standard deviation of the raw data is: Therefore, for a data point x in the original data, if |x-μ|>3σ, the data point x is considered an outlier. The code for identifying and processing outliers using the pandas library is as follows:
[0082] for column in data.columns:
[0083] data=data[(data[column]>=mean[column]-3*std[column])&(data[column]<=mean[column]+3*std[column])];
[0084] Among them, mean is the mean and std is the standard deviation.
[0085] Furthermore, after obtaining the processed data, time-related features such as date, time, and time difference are added to the processed data, and the added data are normalized to obtain a data set. Because the characteristic values of an upflow anaerobic sludge blanket reactor fluctuate slightly in the short term and fluctuate within a certain range, conforming to a normal distribution, zero-mean normalization (standardization) is typically selected, i.e., converting the data to a normal distribution with a mean of 0 and a standard deviation of 1. The formula is as follows:
[0086] ;
[0087] in, is the original data, is the mean of the original data, is the standard deviation of the original data, It is a data set obtained after standardization. In a specific embodiment, the data set is divided into a training set, a validation set, and a test set according to a ratio of 70%:15%:15%, and the preset division ratio can also be adjusted accordingly according to the specific situation. Then, the initial alkalinity prediction model is trained using the training set in combination with the alkalinity generation mechanism model to obtain a trained alkalinity prediction model, and the trained alkalinity prediction model is verified and tested using the validation set and the test set respectively to obtain a target alkalinity prediction model.
[0088] In this embodiment, a neural network model based on the self-attention mechanism is used to construct an initial alkalinity prediction model having an input layer, an encoder layer, a decoder layer, and an output layer, and then the encoder parameters, decoder parameters, and loss function are configured. Specifically, the process of constructing the initial alkalinity prediction model includes: constructing an initial alkalinity prediction model having an input layer, an encoder layer, a decoder layer, and an output layer based on the self-attention mechanism, and performing corresponding encoder parameter configuration, decoder parameter configuration, and loss function configuration on the initial alkalinity prediction model; wherein the encoder layer is an encoder layer including a self-attention mechanism and a feedforward neural network obtained by stacking several encoders; and the decoder layer is a decoder layer obtained by stacking several decoders.
[0089] Among them, the input layer is used to receive all relevant feature data for alkalinity prediction, including features such as carbon dioxide, methane, hydrogen production, conductivity, pH, influent COD, and time-related features; the encoding layer is composed of multiple encoder blocks stacked together, each encoder block contains a multi-head self-attention mechanism and a feedforward neural network, which captures long-term dependencies in time series through the multi-head self-attention mechanism and uses the feedforward neural network for nonlinear transformation; the encoder parameters are as follows: the number of layers is set to 6, the number of hidden units is set to 1024; the number of heads of the multi-head attention mechanism is set to 8, and the dimension is 128; the inner layer dimension of the feedforward neural network is set to 4096, the activation function adopts ReLU (Rectified Linear Unit, i.e., linear rectification function), and residual connections are added between each layer.
[0090] It is understandable that the decoder layer is composed of a plurality of decoder blocks stacked together, and each decoder block inserts an interactive attention mechanism between the multi-head self-attention mechanism and the feedforward neural network to capture the dependency between the input sequence and the output sequence. The parameters of the decoder are consistent with those of the encoder, and the output of the decoder layer is converted into the additional amount of alkali added and the alkalinity of the effluent water through the output layer. A fully connected layer is used to map the output of the decoder layer to the target alkalinity value, and a regression loss function is added for training. On the basis of the above, a segmented attention mechanism is introduced, that is, the time series data is segmented according to a certain length, and a dot product attention mechanism is introduced in each segment to capture local feature dependencies.
[0091] In one specific embodiment, the parameters of the segmented attention mechanism are as follows: the segment length is set to 128, a dot-product attention mechanism is used, and an encoder-decoder architecture is used to capture cross-scale dependencies. The learning rate of the training parameters is then set to 0.0001, and a learning rate decay strategy (such as cosine decay) is considered. The batch size is set to 64 for trial use based on hardware resources and dataset size. The number of iterations can be adjusted based on validation set performance. Model performance can be evaluated using metrics such as mean square error (MSE) and root mean square error (RMSE). The optimal model configuration is selected by comparing the performance of different model configurations (such as the number of encoder layers, decoder layers, and attention heads) on the validation set. Cross-validation techniques are used to prevent model overfitting. The model's generalization ability is verified on the test set, and the model is further optimized and adjusted based on actual needs.
[0092] Step S14: Based on the parameters to be detected and using the target alkalinity prediction model, the internal alkalinity of the upflow anaerobic sludge blanket reactor is predicted, and based on the obtained prediction result, whether additional alkali needs to be added to the upflow anaerobic sludge blanket reactor and the corresponding additional alkali amount are determined.
[0093] In this embodiment, the target alkalinity prediction model is embedded in the control software of the wastewater treatment system. Based on the parameters to be detected of the first preset monitoring system and the second preset monitoring system, the internal alkalinity of the upflow anaerobic sludge blanket reactor is predicted using the target alkalinity prediction model to obtain the current alkalinity value inside the upflow anaerobic sludge blanket reactor. Based on the current alkalinity value, it is determined whether additional alkali needs to be added to the upflow anaerobic sludge blanket reactor and the corresponding amount of additional alkali.
[0094] Specifically, the internal alkalinity of the upflow anaerobic sludge blanket reactor is predicted based on the parameters to be detected and using the target alkalinity prediction model, and whether additional alkali needs to be added to the upflow anaerobic sludge blanket reactor and the corresponding additional alkali amount are determined based on the obtained prediction results, including: integrating the target alkalinity prediction model into a preset monitoring system to predict the internal alkalinity of the upflow anaerobic sludge blanket reactor based on the parameters to be detected of the preset monitoring system to obtain the current alkalinity value inside the upflow anaerobic sludge blanket reactor; the preset monitoring system includes the first preset monitoring system and the second preset monitoring system; based on the current alkalinity value, it is judged whether the upflow anaerobic sludge blanket reactor is in a normal state; if the upflow anaerobic sludge blanket reactor is in an abnormal state, based on the current alkalinity value, it is judged whether additional alkali needs to be added to the upflow anaerobic sludge blanket reactor, and the corresponding additional alkali amount is obtained through the judgment result.
[0095] It is understood that the parameters to be monitored (such as conductivity, pH, redox units, methane, carbon dioxide, hydrogen yield, etc.) detected in real time by the first and second preset monitoring systems are input into the target alkalinity prediction model to obtain an output prediction result indicating whether additional alkali is currently required in the upflow anaerobic sludge blanket reactor and the corresponding additional alkali dosage. Based on the prediction results, the performance of the target alkalinity prediction model is regularly evaluated and retrained or updated with new data to ensure that the target alkalinity prediction model remains in optimal condition and adapts to changes in the wastewater treatment process. At the same time, attention should also be paid to the stability and reliability of the target alkalinity prediction model in practical applications, and timely adjustments and optimizations should be made.
[0096] As can be seen from the above, the present application first detects characteristic data of the acidic wastewater sample and uses the control variable method to conduct a mechanism test to construct an alkalinity generation mechanism model. Then, the gas parameters and liquid phase parameters in the upflow anaerobic sludge blanket reactor are monitored respectively by a first preset monitoring system and a second preset monitoring system. At the same time, the alkalinity titration data obtained by using the preset alkalinity titration system and the alkali addition data obtained by setting different preset acid and alkalinity conditions are combined to form a data set. The initial alkalinity prediction model is trained using the data set and combined with the alkalinity generation mechanism model to obtain a target alkalinity prediction model. In this way, the alkalinity inside the upflow anaerobic sludge blanket reactor is predicted using the target alkalinity prediction model. The prediction results obtained can be used to timely determine whether additional alkali is needed in the current upflow anaerobic sludge blanket reactor and the corresponding additional alkali addition amount, thereby controlling the minimum dosage of exogenous alkali and realizing dynamic regulation of the reactor alkalinity, which not only improves the operating stability of the reactor, but also effectively reduces the accumulation of salt and reduces the treatment cost.
[0097] Accordingly, see Figure 2 As shown, the present application also provides an alkalinity prediction device for an upflow anaerobic sludge blanket reactor, comprising:
[0098] a mechanism model building module 11 for detecting acidic wastewater samples in wastewater to obtain characteristic data, conducting a mechanism test on alkalinity generation during anaerobic digestion of various substances in the acidic wastewater samples using a control variable method and the characteristic data, and building an alkalinity generation mechanism model using the test data obtained from the mechanism test;
[0099] a monitoring data acquisition module 12 for monitoring various gas parameters and various liquid phase parameters in the upflow anaerobic sludge blanket reactor using a first preset monitoring system and a second preset monitoring system, respectively, to obtain first monitoring data and second monitoring data; then, using a preset alkalinity titration system, monitoring the alkalinity in the acidic wastewater sample to obtain alkalinity titration data; and determining alkali dosage data based on the operating state of the upflow anaerobic sludge blanket reactor under different preset acidity and alkalinity conditions;
[0100] a prediction model training module 13 for training an initial alkalinity prediction model using a dataset consisting of the first monitoring data, the second monitoring data, the alkalinity titration data, and the alkali addition data in combination with the alkalinity generation mechanism model to obtain a target alkalinity prediction model; the initial alkalinity prediction model is an alkalinity prediction model constructed based on a neural network model with a self-attention mechanism;
[0101] The alkalinity prediction module 14 is used to predict the internal alkalinity of the upflow anaerobic sludge blanket reactor based on the parameters to be detected and using the target alkalinity prediction model, and determine whether additional alkali is needed in the current upflow anaerobic sludge blanket reactor and the corresponding additional alkali amount based on the obtained prediction result.
[0102] As can be seen from the above, the present application first detects characteristic data of the acidic wastewater sample and uses the control variable method to conduct a mechanism test to construct an alkalinity generation mechanism model. Then, the gas parameters and liquid phase parameters in the upflow anaerobic sludge blanket reactor are monitored respectively by a first preset monitoring system and a second preset monitoring system. At the same time, the alkalinity titration data obtained by using the preset alkalinity titration system and the alkali addition data obtained by setting different preset acid and alkalinity conditions are combined to form a data set. The initial alkalinity prediction model is trained using the data set and combined with the alkalinity generation mechanism model to obtain a target alkalinity prediction model. In this way, the alkalinity inside the upflow anaerobic sludge blanket reactor is predicted using the target alkalinity prediction model. The prediction results obtained can be used to timely determine whether additional alkali is needed in the current upflow anaerobic sludge blanket reactor and the corresponding additional alkali addition amount, thereby controlling the minimum dosage of exogenous alkali and realizing dynamic regulation of the reactor alkalinity, which not only improves the operating stability of the reactor, but also effectively reduces the accumulation of salt and reduces the treatment cost.
[0103] In some specific embodiments, the mechanism model building module 11 may specifically include:
[0104] The wastewater extraction unit is used to extract the obtained wastewater to obtain an acidic wastewater sample, and detect the acidic wastewater sample using a thundermagnetic pH meter to obtain a pH value;
[0105] a water sample detection unit, configured to detect the acidic wastewater sample using a hash reagent, a digester, and a spectrophotometer to obtain a total chemical oxygen demand, and to detect the acidic wastewater sample using Nessler's reagent spectrophotometry and ammonium molybdate spectrophotometry to obtain ammonia nitrogen content and total nitrogen content, respectively;
[0106] an alkalinity value acquisition unit, configured to detect the acidic wastewater sample by a gas chromatograph and a preset titration method, respectively, to obtain the volatile fatty acid content and the inlet and outlet water alkalinity values;
[0107] The characteristic data determination unit is used to obtain various characteristic data using the pH value, the total chemical oxygen demand, the ammonia nitrogen content, the total nitrogen content, the volatile fatty acid content, and the inlet and outlet water alkalinity values.
[0108] In some specific embodiments, the mechanism model building module 11 may specifically include:
[0109] a substance detection unit, configured to perform anaerobically digestion on each substance in the acidic wastewater sample under different preset alkalinity conditions using a controlled variable method, and to detect each substance after anaerobic digestion to obtain post-reaction data;
[0110] A data comparison unit, configured to obtain a corresponding relationship between the degradation rate, methane production, and alkalinity production of each substance during the anaerobic digestion process by comparing each characteristic data with each post-reaction data;
[0111] The coefficient determination unit is used to obtain the alkalinity generation coefficient by using the corresponding relationship, and to construct an alkalinity mechanism model for determining the anaerobic alkalinity generation of each substance in the acidic wastewater through the alkalinity generation coefficient.
[0112] In some specific implementations, the monitoring data acquisition module 12 may specifically include:
[0113] a first monitoring data acquisition unit, configured to construct a gas phase online monitoring system for monitoring various gas parameters using a methane sensor, a carbon dioxide sensor, a hydrogen sensor, and a gas flow meter sequentially connected on a gas path, so as to monitor methane, hydrogen, and carbon dioxide generated by the acidic wastewater sample in the upflow anaerobic sludge blanket reactor through the gas phase online monitoring system to obtain first monitoring data;
[0114] a second monitoring data acquisition unit, configured to construct a liquid phase online monitoring system by embedding a conductivity sensor, a pH sensor, and an oxidation-reduction potential sensor at a lower end of a reflux port of the upflow anaerobic sludge blanket reactor, so as to monitor the conductivity, pH value, and oxidation-reduction potential of the acidic wastewater sample in the upflow anaerobic sludge blanket reactor using the liquid phase online monitoring system to obtain second monitoring data;
[0115] a titration data acquisition unit, configured to construct a preset alkalinity titration system based on a pH sensor, a precision metering pump, and a control computer, so as to obtain alkalinity titration data of the acidic wastewater sample per unit volume using the preset alkalinity titration system and a preset program development environment;
[0116] an alkali dosage data acquisition unit, configured to adjust the influent alkalinity of the upflow anaerobic sludge blanket reactor to obtain a first alkali dosage corresponding to the upflow anaerobic sludge blanket reactor under different acidic conditions, and then use the alkalinity production of each of the substances under unit COD concentration in the upflow anaerobic sludge blanket reactor to obtain a second alkali dosage required for the normal operation of the upflow anaerobic sludge blanket reactor, and use the first alkali dosage and the second alkali dosage to obtain alkali dosage data.
[0117] In some specific implementations, the prediction model training module 13 may specifically include:
[0118] a data preprocessing unit, configured to obtain raw data using the first monitoring data, the second monitoring data, the alkalinity titration data, and the alkali addition data, and preprocess the raw data to obtain processed data; the preprocessing comprising checking and processing missing data and abnormal data in the raw data;
[0119] a feature adding unit, configured to perform a time feature adding operation on the processed data to obtain added data, and perform normalization processing on the added data to obtain a data set;
[0120] A model training unit is used to divide the data set based on a preset division ratio to obtain corresponding training sets, validation sets and test sets, and then use the training set and the alkalinity generation mechanism model to train the initial alkalinity prediction model to obtain a trained alkalinity prediction model, and respectively use the validation set and the test set to evaluate and test the trained alkalinity prediction model to obtain a target alkalinity prediction model.
[0121] In some specific implementations, the prediction model training module 13 may specifically include:
[0122] The model construction unit is used to construct an initial alkalinity prediction model with an input layer, an encoder layer, a decoder layer and an output layer based on a neural network model of a self-attention mechanism, and perform corresponding encoder parameter configuration, decoder parameter configuration and loss function configuration on the initial alkalinity prediction model.
[0123] In some specific embodiments, the alkalinity prediction module 14 may specifically include:
[0124] an alkalinity prediction completion unit, configured to integrate a target alkalinity prediction model into a preset monitoring system to predict the internal alkalinity of the upflow anaerobic sludge blanket reactor based on the parameters to be detected of the preset monitoring system, so as to obtain a current alkalinity value inside the upflow anaerobic sludge blanket reactor; the preset monitoring system includes the first preset monitoring system and the second preset monitoring system;
[0125] a reactor state judgment unit, configured to judge whether the upflow anaerobic sludge blanket reactor is in a normal state based on the current alkalinity value;
[0126] The additional alkali addition obtaining unit is used to determine whether additional alkali needs to be added to the upflow anaerobic sludge blanket reactor based on the current alkalinity value if the upflow anaerobic sludge blanket reactor is in an abnormal state, and obtain the corresponding additional alkali addition amount according to the judgment result.
[0127] Furthermore, the embodiment of the present application also discloses an electronic device, Figure 3This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be considered as any limitation on the scope of use of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the alkalinity prediction method for an upflow anaerobic sludge blanket reactor disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0128] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0129] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0130] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, and can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of implementing the alkalinity prediction method for an upflow anaerobic sludge blanket reactor executed by the electronic device 20 as disclosed in any of the aforementioned embodiments, the computer program 222 may further include computer programs capable of implementing other specific tasks.
[0131] Furthermore, this application discloses a computer-readable storage medium for storing a computer program. When executed by a processor, the computer program implements the aforementioned method for predicting alkalinity in an upflow anaerobic sludge blanket reactor. The specific steps of this method can be found in the aforementioned embodiments and are not further detailed here.
[0132] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.
[0133] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0134] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0135] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0136] The above is a detailed introduction to the technical solution provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for predicting alkalinity of an upflow anaerobic sludge blanket reactor, characterized in that: include: Acidic wastewater samples in the wastewater are tested to obtain various characteristic data, and a mechanism test of alkalinity generation during anaerobic digestion of various substances in the acidic wastewater samples is conducted using a controlled variable method and the characteristic data, and an alkalinity generation mechanism model is constructed using the experimental data obtained from the mechanism test; the characteristic data are data obtained using pH value, total chemical oxygen demand, ammonia nitrogen content, total nitrogen content, volatile fatty acid content, and inlet and outlet water alkalinity values; The gas parameters and liquid phase parameters in the upflow anaerobic sludge blanket reactor are monitored respectively by a first preset monitoring system and a second preset monitoring system to obtain first monitoring data and second monitoring data, and then the alkalinity in the acidic wastewater sample is monitored by a preset alkalinity titration system to obtain alkalinity titration data, and the alkali addition data is determined based on the operating state of the upflow anaerobic sludge blanket reactor under different preset acidic and alkaline conditions; the first monitoring data includes methane, hydrogen, and carbon dioxide generated by the acidic wastewater sample in the upflow anaerobic sludge blanket reactor; the second monitoring data includes conductivity, pH value, and redox potential of the acidic wastewater sample in the upflow anaerobic sludge blanket reactor; Using a data set consisting of the first monitoring data, the second monitoring data, the alkalinity titration data, and the alkali addition data, and combining it with the alkalinity generation mechanism model, an initial alkalinity prediction model is trained to obtain a target alkalinity prediction model; the initial alkalinity prediction model is an alkalinity prediction model constructed based on a neural network model with a self-attention mechanism; Based on the parameters to be detected and using the target alkalinity prediction model, predicting the internal alkalinity of the upflow anaerobic sludge blanket reactor, and determining whether additional alkali is currently required in the upflow anaerobic sludge blanket reactor and the corresponding additional alkali amount based on the obtained prediction result; The parameters to be detected are parameters determined based on the first preset monitoring system and the second preset monitoring system; The process of constructing the alkalinity generation mechanism model includes: using the control variable method to perform anaerobically digestion on each substance in the acidic wastewater sample under different preset alkalinity conditions, and detecting each substance after anaerobic digestion to obtain each post-reaction data; by comparing each characteristic data and each post-reaction data, obtaining the corresponding relationship between the degradation rate, methane generation and alkalinity generation of each substance during the anaerobic digestion process; using the corresponding relationship to obtain the alkalinity generation coefficient, and constructing the alkalinity mechanism model for determining the anaerobic alkalinity generation of each substance in the acidic wastewater through the alkalinity generation coefficient.
2. The method for predicting alkalinity of an upflow anaerobic sludge blanket reactor according to claim 1, wherein: The acidic wastewater sample in the wastewater is tested to obtain various characteristic data, including: Extracting the obtained wastewater to obtain an acidic wastewater sample, and testing the acidic wastewater sample using a thundermagnetic pH meter to obtain a pH value; The acidic wastewater sample is tested using a hash reagent, a digester, and a spectrophotometer to obtain a total chemical oxygen demand, and the acidic wastewater sample is tested using Nessler's reagent spectrophotometry and ammonium molybdate spectrophotometry to obtain ammonia nitrogen content and total nitrogen content, respectively; The acidic wastewater sample is tested by gas chromatography and a preset titration method to obtain the volatile fatty acid content and the alkalinity value of the inlet and outlet water; The characteristic data are obtained by using the pH value, the total chemical oxygen demand, the ammonia nitrogen content, the total nitrogen content, the volatile fatty acid content, and the inlet and outlet water alkalinity values.
3. The method for predicting alkalinity of an upflow anaerobic sludge blanket reactor according to claim 1, wherein: The first preset monitoring system and the second preset monitoring system are used to monitor the gas parameters and the liquid phase parameters in the upflow anaerobic sludge blanket reactor respectively to obtain first monitoring data and second monitoring data, and then the alkalinity in the acidic wastewater sample is monitored by a preset alkalinity titration system to obtain alkalinity titration data, and the alkali addition data is determined based on the operating state of the upflow anaerobic sludge blanket reactor under different preset acidity and alkalinity conditions, including: A gas phase online monitoring system for monitoring various gas parameters is constructed using a methane sensor, a carbon dioxide sensor, a hydrogen sensor, and a gas flow meter connected in sequence on a gas path, so as to monitor methane, hydrogen, and carbon dioxide generated by the acidic wastewater sample in the upflow anaerobic sludge blanket reactor through the gas phase online monitoring system to obtain first monitoring data; A liquid phase online monitoring system is constructed by embedding a conductivity sensor, a pH sensor, and an oxidation-reduction potential sensor at the lower end of the reflux port of the upflow anaerobic sludge blanket reactor, so as to monitor the conductivity, pH value, and oxidation-reduction potential of the acidic wastewater sample in the upflow anaerobic sludge blanket reactor using the liquid phase online monitoring system to obtain second monitoring data; Constructing a preset alkalinity titration system based on a pH sensor, a precision metering pump, and a control computer, so as to obtain alkalinity titration data of the acidic wastewater sample per unit volume using the preset alkalinity titration system and a preset program development environment; By adjusting the inlet alkalinity of the upflow anaerobic sludge blanket reactor, a first alkali dosage corresponding to the upflow anaerobic sludge blanket reactor under different acidic conditions is obtained, and then the alkalinity generation amount of each substance under unit COD concentration in the upflow anaerobic sludge blanket reactor is used to obtain the second alkali dosage required for the normal operation of the upflow anaerobic sludge blanket reactor, and the first alkali dosage and the second alkali dosage are used to obtain alkali dosage data.
4. The method for predicting alkalinity of an upflow anaerobic sludge blanket reactor according to claim 1, wherein: The method of using a data set consisting of the first monitoring data, the second monitoring data, the alkalinity titration data, and the alkali addition data, and training an initial alkalinity prediction model in combination with the alkalinity generation mechanism model to obtain a target alkalinity prediction model includes: Obtaining raw data using the first monitoring data, the second monitoring data, the alkalinity titration data, and the alkali addition data, and preprocessing the raw data to obtain processed data; the preprocessing includes checking and processing missing data and abnormal data in the raw data; Performing a time feature addition operation on the processed data to obtain added data, and performing normalization processing on the added data to obtain a data set; The data set is divided based on a preset division ratio to obtain corresponding training sets, validation sets, and test sets. The training set is then used in combination with the alkalinity generation mechanism model to train the initial alkalinity prediction model to obtain a trained alkalinity prediction model. The trained alkalinity prediction model is evaluated and tested using the validation set and the test set, respectively, to obtain a target alkalinity prediction model.
5. The method for predicting alkalinity of an upflow anaerobic sludge blanket reactor according to claim 1, wherein: The process of constructing the initial alkalinity prediction model includes: Constructing an initial alkalinity prediction model with an input layer, an encoder layer, a decoder layer, and an output layer based on a neural network model of a self-attention mechanism, and performing corresponding encoder parameter configuration, decoder parameter configuration, and loss function configuration on the initial alkalinity prediction model; The encoder layer is an encoder layer obtained by stacking several encoders and includes a self-attention mechanism and a feedforward neural network; the decoder layer is a decoder layer obtained by stacking several decoders.
6. The method for predicting alkalinity of an upflow anaerobic sludge blanket reactor according to any one of claims 1 to 5, characterized in that: The method includes predicting the internal alkalinity of the upflow anaerobic sludge blanket reactor based on the parameter to be detected and using the target alkalinity prediction model, and determining whether additional alkali needs to be added to the upflow anaerobic sludge blanket reactor and the corresponding additional alkali amount based on the obtained prediction result, including: Integrating a target alkalinity prediction model into a preset monitoring system to predict the internal alkalinity of the upflow anaerobic sludge blanket reactor based on the parameters to be detected by the preset monitoring system to obtain a current alkalinity value inside the upflow anaerobic sludge blanket reactor; the preset monitoring system includes the first preset monitoring system and the second preset monitoring system; determining whether the upflow anaerobic sludge blanket reactor is in a normal state based on the current alkalinity value; If the upflow anaerobic sludge blanket reactor is in an abnormal state, whether additional alkali needs to be added to the upflow anaerobic sludge blanket reactor is determined based on the current alkalinity value, and a corresponding additional alkali addition amount is obtained according to the determination result.
7. An alkalinity prediction device for an upflow anaerobic sludge blanket reactor, characterized in that: include: a mechanism model construction module for detecting acidic wastewater samples in wastewater to obtain various characteristic data, conducting a mechanism test on alkalinity generation during anaerobic digestion of various substances in the acidic wastewater samples using a control variable method and the characteristic data, and constructing an alkalinity generation mechanism model using the test data obtained from the mechanism test; the characteristic data are data obtained using pH value, total chemical oxygen demand, ammonia nitrogen content, total nitrogen content, volatile fatty acid content, and inlet and outlet water alkalinity values; A monitoring data acquisition module is used to monitor various gas parameters and liquid phase parameters in the upflow anaerobic sludge blanket reactor through a first preset monitoring system and a second preset monitoring system, respectively, to obtain first monitoring data and second monitoring data, and then use a preset alkalinity titration system to monitor the alkalinity in the acidic wastewater sample to obtain alkalinity titration data, and determine alkali addition data based on the operating state of the upflow anaerobic sludge blanket reactor under different preset acidity and alkalinity conditions; the first monitoring data includes methane, hydrogen, and carbon dioxide generated by the acidic wastewater sample in the upflow anaerobic sludge blanket reactor; the second monitoring data includes conductivity, pH value, and redox potential of the acidic wastewater sample in the upflow anaerobic sludge blanket reactor; a prediction model training module, configured to train an initial alkalinity prediction model using a data set consisting of the first monitoring data, the second monitoring data, the alkalinity titration data, and the alkali addition data, in combination with the alkalinity generation mechanism model, to obtain a target alkalinity prediction model; the initial alkalinity prediction model is an alkalinity prediction model constructed using a neural network model based on a self-attention mechanism; an alkalinity prediction module for predicting the internal alkalinity of the upflow anaerobic sludge blanket reactor based on the parameters to be detected and using the target alkalinity prediction model, and determining whether additional alkali is currently required in the upflow anaerobic sludge blanket reactor and the corresponding additional alkali dosage based on the obtained prediction result; The parameters to be detected are parameters determined based on the first preset monitoring system and the second preset monitoring system; The process of constructing the alkalinity generation mechanism model includes: using the control variable method to perform anaerobically digestion on each substance in the acidic wastewater sample under different preset alkalinity conditions, and detecting each substance after anaerobic digestion to obtain each post-reaction data; by comparing each characteristic data and each post-reaction data, obtaining the corresponding relationship between the degradation rate, methane generation and alkalinity generation of each substance during the anaerobic digestion process; using the corresponding relationship to obtain the alkalinity generation coefficient, and constructing the alkalinity mechanism model for determining the anaerobic alkalinity generation of each substance in the acidic wastewater through the alkalinity generation coefficient.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the alkalinity prediction method of an upflow anaerobic sludge blanket reactor according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that Used to store a computer program, wherein when the computer program is executed by a processor, it implements the alkalinity prediction method of an upflow anaerobic sludge blanket reactor according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method and system for measuring volatile fatty acid in wastewater based on LSTM
CN114460255A
Anaerobic digestion system acid inhibition early warning method, device, equipment and storage medium
CN118824400A