Upflow anaerobic sludge blanket reactor alkalinity prediction method, device, equipment and medium
By constructing an alkalinity generation mechanism model and training neural network model, the alkalinity of upflow anaerobic sludge bed reactor is accurately predicted, which solves the problem of inaccurate alkalinity prediction in the existing technology, and realizes dynamic regulation of reactor alkalinity and cost reduction.
Patent Information
- Application Number
- CN202510111897.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-01-22
AI Technical Summary
The prior art is difficult to accurately predict the alkalinity in upflow anaerobic sludge bed reactors, which makes it difficult to control the amount of exogenous alkalis, which increases treatment costs and salinity accumulation.
By conducting detection and control variable tests on acidic wastewater samples in wastewater, an alkalinity generation mechanism model was constructed, and data was obtained using a preset monitoring system and alkalinity titration system, and a neural network model based on self-attention mechanism was trained to predict the alkalinity inside the reactor.
A more accurate prediction of the alkalinity of upflow anaerobic sludge bed reactor is achieved, the minimum dosing amount of exogenous alkali is controlled, the operating stability of the reactor is improved, and the salt accumulation and treatment cost is reduced.
Smart Images

Figure CN119993309A_ABST
Abstract
Description
Technical Field
[0001] The 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 bed reactor. Background Art
[0002] As the environmental challenges posed by traditional plastics become increasingly severe, coal-based biodegradable plastics such as polybutylene adipate terephthalate have become alternatives, but the acidic organic wastewater generated during its production contains high concentrations of organic matter and a variety of pollutants, and direct discharge will have adverse effects on the environment. This type of wastewater has a low pH value and high chemical oxygen demand, and a large amount of alkaline substances are required to adjust the pH to neutral before treatment, which increases the treatment cost and salinity accumulation, which conflicts with the strict pH requirements of anaerobic digestion.
[0003] At present, 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, existing studies use 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 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 eigenvalues are not representative enough.
[0004] As can be seen from the above, how to more accurately predict the alkalinity in the upflow anaerobic sludge blanket reactor 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 purpose of the present invention is 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 to 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] The acidic wastewater samples in the wastewater are tested to obtain various characteristic data, and the mechanism test of alkalinity generation during anaerobic digestion of various substances in the acidic wastewater samples is conducted by controlling the variable method and the characteristic data, and the test data obtained by the mechanism test is used to construct an alkalinity generation mechanism model;
[0008] The gas parameters and the liquid phase parameters in the upflow anaerobic sludge blanket reactor are respectively monitored 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 acid and alkalinity conditions;
[0009] 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 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;
[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 results, it is determined whether additional alkali is needed in the current 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 by using a hash reagent, a digestion instrument, and a spectrophotometer to obtain the total chemical oxygen demand, and the acidic wastewater sample is tested by using a Nessler reagent spectrophotometry and an ammonium molybdate spectrophotometry to obtain the ammonia nitrogen content and the total nitrogen content;
[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 carried out by controlling the 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] Using the controlled variable method, each substance in the acidic wastewater sample is subjected to anaerobically digestion under different preset alkalinity conditions, and each substance after anaerobic digestion is tested to obtain each post-reaction data;
[0018] By comparing the characteristic data and the post-reaction data, the corresponding relationship between the degradation rate, methane generation and alkalinity generation of each substance in the anaerobic digestion process is obtained;
[0019] The alkalinity generation coefficient is obtained by using the corresponding relationship, and an alkalinity mechanism model for determining the anaerobic alkalinity generation of each substance in the acidic wastewater is constructed by 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 the first monitoring data and the second monitoring data, and then the alkalinity in the acidic wastewater sample is monitored by the preset alkalinity titration system to obtain the 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 acid and alkalinity conditions, including:
[0021] A gas phase online monitoring system for monitoring various gas parameters is constructed by 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 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 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] A preset alkalinity titration system is constructed 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 by using the preset alkalinity titration system and a preset program development environment;
[0024] The influent alkalinity of the upflow anaerobic sludge blanket reactor is adjusted to obtain a first alkali dosage corresponding to the upflow anaerobic sludge blanket reactor under different acidic conditions, and then the alkalinity production of each substance at a unit COD concentration in the upflow anaerobic sludge blanket reactor is used to obtain a 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 and 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 adding 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, and 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 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] Based on the neural network model of the self-attention mechanism, an initial alkalinity prediction model with an input layer, an encoder layer, a decoder layer and an output layer is constructed, and the encoder parameter configuration, the decoder parameter configuration and the loss function configuration of the initial alkalinity prediction model are performed accordingly;
[0031] Among them, 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 current upflow anaerobic sludge blanket reactor and the corresponding additional alkali amount are determined based on the obtained prediction result, including:
[0033] 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;
[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 the 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 building module is used to detect acidic wastewater samples in wastewater to obtain various characteristic data, conduct a mechanism test on alkalinity generation during anaerobic digestion of various substances in the acidic wastewater samples by controlling the variable method and the characteristic data, and build an alkalinity generation mechanism model using the test data obtained from the mechanism test;
[0038] A monitoring data acquisition module, for monitoring each gas parameter and each liquid phase parameter in the upflow anaerobic sludge blanket reactor by means of a first preset monitoring system and a second preset monitoring system, respectively, to obtain first monitoring data and second monitoring data, and then using a preset alkalinity titration system to monitor the alkalinity in the acidic wastewater sample to obtain alkalinity titration data, and determining alkali addition data based on the operating state of the upflow anaerobic sludge blanket reactor under different preset acid and alkalinity conditions;
[0039] A prediction model training module, for training an initial alkalinity prediction model using a data set consisting of the first monitoring data and 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 of 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 current upflow anaerobic sludge blanket reactor and the corresponding additional alkali amount based on the obtained prediction results.
[0041] In a third aspect, the present application provides an electronic device, including:
[0042] Memory, used to store computer programs;
[0043] The processor is used to execute the computer program to implement the above-mentioned alkalinity prediction method for the 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 through the control 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 various liquid phase parameters in an 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 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 alkalinity conditions, the alkalinity generation mechanism model is constructed. The method comprises the steps of: determining alkali addition data according to the operating status under the conditions of the first monitoring data and the second monitoring data, determining alkali addition data according to the operating status under the conditions of the first monitoring data and the second monitoring data, and training an initial alkalinity prediction model 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 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 addition amount 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, and then uses the first preset monitoring system and the second preset monitoring system to monitor the gas parameters and liquid phase parameters in the upflow anaerobic sludge bed reactor respectively, and at the same time combines the alkalinity titration data obtained by using the preset alkalinity titration system and the alkali addition data obtained by setting different preset acid-base conditions to form a data set, and uses the data set and the alkalinity generation mechanism model to train the initial alkalinity prediction model to obtain a target alkalinity prediction model. In this way, the alkalinity inside the upflow anaerobic sludge bed reactor is predicted using the target alkalinity prediction model, and the prediction results obtained can be used to timely determine whether additional alkali is needed in the current upflow anaerobic sludge bed reactor and the corresponding additional alkali 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 drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0048] Figure 1 A flow chart of a method for predicting alkalinity of an upflow anaerobic sludge blanket reactor disclosed in the present application;
[0049] Figure 2 This is a schematic diagram of the structure of an alkalinity prediction device for an upflow anaerobic sludge blanket reactor disclosed in the present application;
[0050] Figure 3 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0052] At present, the prediction and control of the alkalinity of an upflow anaerobic sludge blanket reactor mainly rely on experience and trial and error, which is not only inefficient but also difficult to guarantee accuracy, even though some studies have used deep learning models to predict the time series of methane production 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 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 dosage, 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, the embodiment of the present invention discloses a method for predicting alkalinity of an upflow anaerobic sludge blanket reactor, comprising:
[0054] Step S11, detecting the acidic wastewater sample in the wastewater to obtain various characteristic data, conducting a mechanism test on the alkalinity generation during the anaerobic digestion of various substances in the acidic wastewater sample by controlling the variable method and the characteristic data, and constructing 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 a number of acidic wastewater samples, and then a thunder magnetic pH meter is used to obtain the pH value of the acidic wastewater sample, the total chemical oxygen demand of the acidic wastewater sample is obtained by a hash reagent, a digestion instrument, and a spectrophotometer, the ammonia nitrogen content and the total nitrogen content of the acidic wastewater sample are obtained by Nessler's reagent spectrophotometry and ammonium molybdate spectrophotometry, respectively, the type and content of volatile fatty acids are obtained by a gas chromatograph, the alkalinity value at the water inlet is obtained by a preset titration method that meets standard conditions, and the pH value, the total chemical oxygen demand, the ammonia nitrogen content, the total nitrogen content, the type and content of volatile fatty acids, and the inlet and outlet water alkalinity values are sorted and analyzed to obtain various characteristic data.
[0056] Specifically, the method of 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 thunder magnetic 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 of the 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 by the control variable method, and each post-reaction data of the acidic wastewater sample before and after the anaerobic reaction is measured, and the methane production of the acidic wastewater sample during the anaerobic reaction is detected. Each of the characteristic data is used as pre-reaction data, and a comparison result is obtained by comparing the pre-reaction data with the post-reaction data to obtain a corresponding relationship between the degradation rate, methane production and alkalinity production of each substance in the anaerobic digestion process, and the alkalinity generation coefficient is obtained by using the corresponding relationship, so as to construct an alkalinity mechanism model for determining the anaerobic alkalinity production of each substance in the acidic wastewater based on the alkalinity generation coefficient.
[0058] Specifically, the alkalinity generation mechanism test of each substance in the acidic wastewater sample during anaerobic digestion is carried out by using the control variable method and each characteristic data, and the alkalinity generation mechanism model is constructed by using the test data obtained from the mechanism test, including: 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, the corresponding relationship between the degradation rate, methane generation and alkalinity generation of each substance in the anaerobic digestion process is obtained; using the corresponding relationship to obtain the alkalinity generation coefficient, and constructing the alkalinity mechanism model for determining the anaerobic alkalinity of each substance in the acidic wastewater through the alkalinity generation coefficient.
[0059] It can be understood that, by 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, and 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 there is a substance X1 with a COD equivalent concentration in the acidic wastewater sample, it is consumed after anaerobic digestion, and its degradation rate is k1. In this process, y1 moles of methane will be accumulated, and z1 moles of alkalinity will be generated accordingly. The alkalinity is recorded as m1 and expressed as m1=(y1, z1). The degradation rate , n is the cod concentration. Similarly, for substance X2, the degradation rate of a 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 for determining the anaerobic alkalinity of each substance in the acidic wastewater is constructed. 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 by itself during the anaerobic digestion process can be calculated. The calculation formula is as follows:
[0062] ;
[0063] Wherein, M represents the predicted total amount of alkalinity and methane that the acidic wastewater sample can produce, a and b are the concentrations of specific substances in the wastewater, m1 and m2 are the alkalinity coefficients produced by anaerobic digestion of the corresponding substances, and v is the volume of the wastewater. After obtaining the total alkalinity, the amount of additional alkalinity that needs to be added during the anaerobic digestion process can be determined.
[0064] Step S12, respectively monitoring the gas parameters and the liquid phase parameters in the upflow anaerobic sludge blanket reactor by the first preset monitoring system and the second preset monitoring system to obtain the first monitoring data and the second monitoring data, and then using the preset alkalinity titration system to monitor the alkalinity in the acidic wastewater sample to obtain the alkalinity titration data, and determining the alkali addition data based on the operating state 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 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 the first monitoring data; a conductivity sensor, a pH sensor and a redox 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 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 the 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 the alkalinity titration data of the acidic wastewater sample per unit volume; adjusting the inlet alkalinity of the upflow anaerobic sludge blanket reactor to obtain the 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 the 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 the first monitoring data and the second monitoring data, and then the alkalinity in the acidic wastewater sample is monitored by the preset alkalinity titration system to obtain the 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 flowmeter 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 by 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 A reduction potential sensor is used to construct a liquid phase online monitoring system, so as to use the liquid phase online monitoring system to monitor the conductivity, pH value and redox potential of the acidic wastewater sample in the upflow anaerobic sludge blanket reactor to obtain second monitoring data; a preset alkalinity titration system is constructed based on the pH sensor, the precision metering pump and the control computer, so as to use the preset alkalinity titration system and the preset program development environment to obtain the alkalinity titration data of the acidic wastewater sample per unit volume; the inlet alkalinity of the upflow anaerobic sludge blanket reactor is adjusted to obtain the first alkali dosage corresponding to the upflow anaerobic sludge blanket reactor under different acidic conditions, 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 by 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 sequentially connected on the gas path to construct a gas phase online monitoring system, so as to detect the methane, hydrogen and carbon dioxide generated by the acidic wastewater sample in the upflow anaerobic sludge blanket reactor based on the gas phase online monitoring system to obtain the first monitoring data; a conductivity sensor, a pH sensor and a redox 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 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 the 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 of 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 receive real-time data on the computer terminal. 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 methane sensors, carbon dioxide sensors, hydrogen sensors and gas flow meters and other principles, which are not specifically limited here.
[0075] In this embodiment, the alkalinity in the acidic wastewater sample is monitored using a preset alkalinity titration system to obtain alkalinity titration data. In a 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, and programming is performed using LabVIEW (i.e., a program development environment) software. The various components of the titration system are controlled through a serial communication protocol to realize the acquisition of pH values, the switch control of the sampling pump and the discharge pump, the switch of the precision metering pump, and the precise control of the injection water volume by programming. The time interval can be set to one hour, the sampling pump is automatically turned on, and 20 ml of effluent water sample is extracted from the upflow anaerobic sludge blanket reactor into a preset acid-base titration vessel. The pH electrode determines and records the initial pH value of the water sample, and the precision metering pump begins to extract 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 converts the volume of hydrochloric acid consumed according to the specifications; during the titration process, the magnetic stirrer keeps stirring to ensure uniform reaction. When the pH value drops to 3.8, it is considered to have reached the titration endpoint, at which time the bicarbonate alkalinity is completely consumed. The alkalinity of the acidic wastewater sample per unit volume is obtained by the volume and concentration of hydrochloric acid consumed and the LabVIEW program to obtain alkalinity titration data; the preset acid-base titration vessel includes an upper water inlet, a lower drain, a pH electrode, and a magnetic stirrer.
[0076] It is understandable 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 detected respectively to obtain alkali dosage data. In a specific embodiment, the reactor experiment 1 is to set the influent pH to 7.5-8, set the initial hydraulic retention time and the reflux ratio to flow through the upflow anaerobic sludge blanket reactor through the feed pipe for treatment, and reduce the alkalinity of the influent in a step-by-step manner with the influent pH reduced by 0.5 as a unit, and observe 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 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 reduction of alkalinity, and compared it with the alkalinity dosage required for influent under neutral conditions to obtain the first alkali dosage corresponding to different acidic conditions. In order to further explore the minimum value of 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 reflow 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 influenting the characteristic components singly 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 the steady-state operation of the system, and obtaining the second alkali dosage, and obtaining the alkali dosage data using the first alkali dosage and the second alkali dosage. 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 influents alone 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 the alkalinity generation mechanism model to train the initial alkalinity prediction 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 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 abnormal values 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 the test set to evaluate and test the trained alkalinity prediction model to obtain a target alkalinity prediction model.
[0081] It is understandable that the 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 the processed data. In a specific embodiment, the pandas library of Python 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. For the case of continuous missing values or missing key data, choose to directly delete the data of the day to ensure that the integrity of the data does not affect the subsequent analysis. For a small number of missing values, interpolation (adjacent value filling) is used to fill in order 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, correction or deletion is selected according to the cause of the outliers and combined with the basic principles and characteristics of anaerobic digestion. The preset statistical method is the 3σ principle, also known as the normal distribution, σ represents the standard deviation, and μ represents the mean. According to the characteristics of normal distribution, the probability that the values in the original data are distributed in (μ-σ, μ+σ) is 0.6826, the probability that the values are distributed in (μ-2σ, μ+2σ) is 0.9544, and the probability that the values are distributed in (μ-3σ, μ+3σ) is 0.9974. Therefore, it can be considered that the values in the original data are almost all concentrated in (μ-3σ, μ+3σ), and the values outside this range are abnormal values. The mean is the average value of the original data, and the mean calculation formula is: μ=Σx / n; where Σx represents the sum of all the original data, and n represents the number of the original data; the standard deviation of the original 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. Since the characteristic values of the upflow anaerobic sludge blanket reactor fluctuate slightly in the short term and fluctuate within a certain range, which conforms to the normal distribution, zero mean normalization (standardization) is usually selected, that is, the data is converted into 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 and combined 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 constructs an initial alkalinity prediction model with an input layer, an encoder layer, a decoder layer and an output layer, and then performs encoder parameter configuration, decoder parameter configuration and loss function configuration. Specifically, the construction process of 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 the neural network model of 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; 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, and the long-term dependencies in the time series are captured through the multi-head self-attention mechanism, and the feedforward neural network is used for nonlinear transformation; the encoder parameters are as follows: the number of layers is set to 6, and the number of hidden units is 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, and the activation function uses 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 stacked with multiple decoder blocks, 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 additional alkali addition and effluent alkalinity through the output layer. The output of the decoder layer is mapped to the target alkalinity value using a fully connected layer, 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 a specific embodiment, the parameters of the segmented attention mechanism are as follows: the segment length is set to 128, the dot product attention mechanism is used, and the encoder-decoder architecture is used to capture cross-scale dependencies. Then the learning rate of the training parameters is set to 0.0001, and the learning rate decay strategy (such as cosine decay) is considered; the batch size is set to 64 for trial according to the hardware resources and the size of the data set; the number of iterations can be adjusted according to the performance of the validation set. The performance of the model can be evaluated using evaluation indicators such as mean square error (MSE) and root mean square error (RMSE). By comparing the performance of different model configurations (such as the number of encoder layers, the number of decoder layers, and the number of attention heads) on the validation set, the optimal model configuration is selected. Cross-validation technology is used to avoid model overfitting. The generalization ability of the model is verified on the test set, and the model is further optimized and adjusted according to 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 prediction result, whether additional alkali is needed in the current 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 is needed in the upflow anaerobic sludge blanket reactor and the corresponding additional alkali amount.
[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 the upflow anaerobic sludge blanket reactor currently needs additional alkali addition and the corresponding additional alkali addition 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, judging whether the upflow anaerobic sludge blanket reactor is in a normal state; if the upflow anaerobic sludge blanket reactor is in an abnormal state, judging whether the upflow anaerobic sludge blanket reactor needs additional alkali addition based on the current alkalinity value, and obtaining the corresponding additional alkali addition amount through the judgment result.
[0095] It is understandable that the parameters to be detected (such as conductivity, pH value, redox unit, methane, carbon dioxide, hydrogen yield, etc.) detected in real time by the first preset monitoring system and the second preset monitoring system are input into the target alkalinity prediction model to obtain the output prediction result of whether additional alkali is needed in the current upflow anaerobic sludge blanket reactor and the corresponding additional alkali amount; the performance of the target alkalinity prediction model is regularly evaluated based on the prediction result, and retrained or updated with new data to ensure that the target alkalinity prediction model is always kept in the best state and adapts to changes in the wastewater treatment process. At the same time, it is also necessary to pay attention to the stability and reliability of the target alkalinity prediction model in practical applications, and adjust and optimize it in a timely manner.
[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, and then uses the first preset monitoring system and the second preset monitoring system to monitor the gas parameters and liquid phase parameters in the upflow anaerobic sludge bed reactor respectively, and at the same time combines the alkalinity titration data obtained by using the preset alkalinity titration system and the alkali addition data obtained by setting different preset acid-base conditions to form a data set, and uses the data set and the alkalinity generation mechanism model to train the initial alkalinity prediction model to obtain a target alkalinity prediction model. In this way, the alkalinity inside the upflow anaerobic sludge bed reactor is predicted using the target alkalinity prediction model, and the prediction results obtained can be used to timely determine whether additional alkali is needed in the current upflow anaerobic sludge bed reactor and the corresponding additional alkali 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] The mechanism model building module 11 is used to detect the acidic wastewater sample in the wastewater to obtain various characteristic data, conduct a mechanism test of alkalinity generation during anaerobic digestion of various substances in the acidic wastewater sample by controlling the variable method and the characteristic data, and build an alkalinity generation mechanism model using the test data obtained by the mechanism test;
[0099] A monitoring data acquisition module 12 is used to monitor various gas parameters and various 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 acid and alkalinity conditions;
[0100] A prediction model training module 13 is used to train an initial alkalinity prediction model using a data set consisting of the first monitoring data and the second monitoring data, the alkalinity titration data and the alkali addition data, and 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 of 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 results.
[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, and then uses the first preset monitoring system and the second preset monitoring system to monitor the gas parameters and liquid phase parameters in the upflow anaerobic sludge bed reactor respectively, and at the same time combines the alkalinity titration data obtained by using the preset alkalinity titration system and the alkali addition data obtained by setting different preset acid-base conditions to form a data set, and uses the data set and the alkalinity generation mechanism model to train the initial alkalinity prediction model to obtain a target alkalinity prediction model. In this way, the alkalinity inside the upflow anaerobic sludge bed reactor is predicted using the target alkalinity prediction model, and the prediction results obtained can be used to timely determine whether additional alkali is needed in the current upflow anaerobic sludge bed reactor and the corresponding additional alkali 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 implementations, the mechanism model building module 11 may specifically include:
[0104] A wastewater extraction unit is used to extract the acquired 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, used to detect the acidic wastewater sample by using a hash reagent, a digestion instrument, and a spectrophotometer to obtain a total chemical oxygen demand, and to detect the acidic wastewater sample by using a Nessler reagent spectrophotometry and an ammonium molybdate spectrophotometry to obtain ammonia nitrogen content and a total nitrogen content;
[0106] An alkalinity value acquisition unit is used to detect the acidic wastewater sample by gas chromatograph and preset titration method respectively to obtain the volatile fatty acid content and the alkalinity value of inlet and outlet water;
[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 implementations, the mechanism model building module 11 may specifically include:
[0109] A substance detection unit, used for performing anaerobically digestion on each substance in the acidic wastewater sample under different preset alkalinity conditions by using a controlled variable method, and detecting each substance after anaerobic digestion to obtain each post-reaction data;
[0110] A data comparison unit, used to obtain the corresponding relationship between the degradation rate, methane generation and alkalinity generation of each substance in 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 is used to construct a gas phase online monitoring system for monitoring various gas parameters by 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 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 first monitoring data;
[0114] A second monitoring data acquisition unit is used to construct a liquid phase online monitoring system 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 by using the liquid phase online monitoring system to obtain second monitoring data;
[0115] A titration data acquisition unit, used 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 by using the preset alkalinity titration system and a preset program development environment;
[0116] The alkali dosage data acquisition unit is used 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 substance 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 and the second monitoring data, the alkalinity titration data, and the alkali addition data, and to preprocess the raw data to obtain processed data; the preprocessing includes checking and processing missing data and abnormal data in the raw data;
[0119] A feature adding unit, used for performing a time feature adding operation on the processed data to obtain added data, and performing 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 use the validation set and the test set to evaluate and test the trained alkalinity prediction model respectively to obtain a target alkalinity prediction model.
[0121] In some specific implementations, the prediction model training module 13 may specifically include:
[0122] The model building unit is used to build 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, for integrating a target alkalinity prediction model into a preset monitoring system, so as 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, used for judging whether the upflow anaerobic sludge blanket reactor is in a normal state based on the current alkalinity value;
[0126] The additional alkali addition acquisition 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 through the judgment result.
[0127] Furthermore, the present application also discloses an electronic device. Figure 3It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment, and the content in the figure cannot be regarded 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. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the alkalinity prediction method of the 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 working 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, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present 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, and 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 storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, 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, which can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the alkalinity prediction method of the upflow anaerobic sludge blanket reactor executed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks.
[0131] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the alkalinity prediction method of the upflow anaerobic sludge blanket reactor disclosed above is implemented. The specific steps of the method can be referred to the corresponding contents disclosed in the above embodiments, and will not be repeated here.
[0132] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[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 composition and steps of each example have been generally described in the above description according to function. 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 to be beyond the scope of this application.
[0134] The steps of the method or algorithm 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 a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, 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 article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0136] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article 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 general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method 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: The acidic wastewater samples in the wastewater are tested to obtain various characteristic data, and the mechanism test of alkalinity generation during anaerobic digestion of various substances in the acidic wastewater samples is conducted by controlling the variable method and the characteristic data, and the test data obtained by the mechanism test is used to construct an alkalinity generation mechanism model; The gas parameters and the liquid phase parameters in the upflow anaerobic sludge blanket reactor are respectively monitored 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 acid and alkalinity conditions; 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 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; 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 results, it is determined whether additional alkali is needed in the current upflow anaerobic sludge blanket reactor and the corresponding additional alkali amount.
2. The method for predicting alkalinity of an upflow anaerobic sludge blanket reactor according to claim 1, characterized in that: 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 by using a hash reagent, a digestion instrument, and a spectrophotometer to obtain the total chemical oxygen demand, and the acidic wastewater sample is tested by using a Nessler reagent spectrophotometry and an ammonium molybdate spectrophotometry to obtain the ammonia nitrogen content and the total nitrogen content; 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 2, characterized in that: The alkalinity generation mechanism test during the anaerobic digestion of each substance in the acidic wastewater sample is carried out by 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: Using the controlled variable method, each substance in the acidic wastewater sample is subjected to anaerobically digestion under different preset alkalinity conditions, and each substance after anaerobic digestion is tested to obtain each post-reaction data; By comparing the characteristic data and the post-reaction data, the corresponding relationship between the degradation rate, methane generation and alkalinity generation of each substance in the anaerobic digestion process is obtained; The alkalinity generation coefficient is obtained by using the corresponding relationship, and an alkalinity mechanism model for determining the anaerobic alkalinity generation of each substance in the acidic wastewater is constructed by using the alkalinity generation coefficient.
4. The method for predicting alkalinity of an upflow anaerobic sludge blanket reactor according to claim 1, characterized in that: 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 the first monitoring data and the second monitoring data, and then the alkalinity in the acidic wastewater sample is monitored by the preset alkalinity titration system to obtain the 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 acid and alkalinity conditions, including: A gas phase online monitoring system for monitoring various gas parameters is constructed by 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 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 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; A preset alkalinity titration system is constructed 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 by using the preset alkalinity titration system and a preset program development environment; The influent alkalinity of the upflow anaerobic sludge blanket reactor is adjusted to obtain a first alkali dosage corresponding to the upflow anaerobic sludge blanket reactor under different acidic conditions, and then the alkalinity production of each substance at a unit COD concentration in the upflow anaerobic sludge blanket reactor is used to obtain a 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.
5. The method for predicting alkalinity of an upflow anaerobic sludge blanket reactor according to claim 1, characterized in that: The method uses the data set consisting of the first monitoring data and the second monitoring data, the alkalinity titration data and the alkali addition data, and trains the initial alkalinity prediction model in combination with the alkalinity generation mechanism model to obtain a target alkalinity prediction model, including: Obtaining raw data using the first monitoring data and 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 adding 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, and 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 evaluated and tested using the validation set and the test set, respectively, to obtain a target alkalinity prediction model.
6. The method for predicting alkalinity of an upflow anaerobic sludge blanket reactor according to claim 1, characterized in that: The construction process of the initial alkalinity prediction model includes: Based on the neural network model of the self-attention mechanism, an initial alkalinity prediction model with an input layer, an encoder layer, a decoder layer and an output layer is constructed, and the encoder parameter configuration, the decoder parameter configuration and the loss function configuration of the initial alkalinity prediction model are performed accordingly; Among them, 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.
7. The method for predicting alkalinity of an upflow anaerobic sludge blanket reactor according to any one of claims 1 to 6, characterized in that: The method predicts 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 determines 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 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; 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 the corresponding additional alkali addition amount is obtained according to the determination result.
8. An alkalinity prediction device for an upflow anaerobic sludge blanket reactor, characterized in that: include: A mechanism model building module is used to detect acidic wastewater samples in wastewater to obtain various characteristic data, conduct a mechanism test on alkalinity generation during anaerobic digestion of various substances in the acidic wastewater samples by controlling the variable method and the characteristic data, and build an alkalinity generation mechanism model using the test data obtained from the mechanism test; A monitoring data acquisition module, for monitoring each gas parameter and each liquid phase parameter in the upflow anaerobic sludge blanket reactor by means of a first preset monitoring system and a second preset monitoring system, respectively, to obtain first monitoring data and second monitoring data, and then using a preset alkalinity titration system to monitor the alkalinity in the acidic wastewater sample to obtain alkalinity titration data, and determining alkali addition data based on the operating state of the upflow anaerobic sludge blanket reactor under different preset acid and alkalinity conditions; A prediction model training module, for training an initial alkalinity prediction model using a data set consisting of the first monitoring data and 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 of a self-attention mechanism; 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 current upflow anaerobic sludge blanket reactor and the corresponding additional alkali amount based on the obtained prediction results.
9. 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 as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the alkalinity prediction method for an upflow anaerobic sludge blanket reactor according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and system for measuring volatile fatty acid in wastewater based on LSTM
CN114460255A
Wastewater treatment monitoring method and system based on automatic optimization algorithm and deep learning
CN114944203A
Method and device for predicting acid-base neutralization of wastewater reaction tank
CN115422833A
Sewage treatment dosage prediction method and system based on LSTM-Attention
CN117235595A
Carbon source delivery model based on LSTM neural network prediction fuzzy control
CN117311151A
Cited By
Biogas anaerobic fermentation dynamic control system based on multi-parameter self-adaption
CN121610343A