Method for preparing water-soluble organic fertilizer by using methane-oxidizing bacteria fermentation supernatant
By optimizing fermentation parameters using LSTM-genetic algorithm, treating wastewater using BP neural network, and optimizing the formula using NSGA-II algorithm, the problems of low utilization rate of fermentation supernatant of methanogenic bacteria and non-recovery of process wastewater resources were solved, achieving efficient and stable production of water-soluble organic fertilizer.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHAANXI DELIANGYUAN BIOTECHNOLOGY CO LTD
- Filing Date
- 2025-10-14
- Publication Date
- 2026-05-08
AI Technical Summary
In existing technologies, the utilization rate of supernatant from methanogenic bacteria fermentation is low, process wastewater resources are not fully recovered, fermentation process parameter control relies on experience, resulting in large quality fluctuations, and organic fertilizer formulas lack intelligent optimization, making it difficult to balance fertility, cost and stability.
The fermentation parameters were optimized using an LSTM-genetic algorithm, the process wastewater was treated using a BP neural network, and the formula was optimized using an NSGA-II algorithm to form a closed-loop control system. This enabled the synergistic resource utilization of the supernatant from the methanogenic bacteria fermentation and the wastewater, resulting in the preparation of high-quality water-soluble organic fertilizer.
It improves resource utilization, ensures stable organic matter and nutrient content in organic fertilizer, reduces pollutant emissions, and achieves intelligent production and economic optimization.
Smart Images

Figure CN121226077B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the interdisciplinary field of agricultural biotechnology and environmental engineering, and in particular to a method for preparing water-soluble organic fertilizer using fermentation supernatant from methanogenic bacteria. Background Technology
[0002] Water-soluble organic fertilizers are widely used in modern agriculture due to their easy absorption by crops and environmental friendliness. Traditional preparation methods mostly rely on the decomposition of animal and plant waste or chemical synthesis, which have problems such as unstable raw material sources, low nutrient content, and significant pollution during the production process.
[0003] The supernatant from methanogenic bacteria fermentation is rich in natural organic matter such as organic acids and amino acids, making it a high-quality raw material for preparing organic fertilizers. However, its current utilization is mostly limited to direct dilution and application, without co-processing with wastewater for resource recovery. Furthermore, the control of fermentation process parameters relies on experience, leading to significant fluctuations in the quality of the supernatant. Simultaneously, the wastewater generated during fermentation and preparation (such as rinsing water and condensate) contains small amounts of usable nutrients. Traditional treatment methods focus only on achieving discharge standards, neglecting resource recovery and resulting in waste. In addition, organic fertilizer formulations are often determined through manual trial mixing, making it difficult to balance fertility, cost, and stability, and lacking intelligent optimization methods.
[0004] Therefore, there is an urgent need for a water-soluble organic fertilizer preparation technology that can efficiently utilize the supernatant from methanogenic bacteria fermentation, synergistically treat wastewater, and optimize the entire process through intelligent algorithms, so as to improve resource utilization and product quality. Summary of the Invention
[0005] This invention provides a method for preparing water-soluble organic fertilizer using the fermentation supernatant of methanogenic bacteria. Using the fermentation supernatant as the core raw material, combined with treated process wastewater, the method employs a multi-algorithm collaborative optimization process to prepare the water-soluble organic fertilizer. The specific process includes:
[0006] The fermentation parameters of methanogenic bacteria were optimized using the LSTM-genetic algorithm to stabilize the organic matter and nutrient content in the fermentation supernatant.
[0007] Wastewater is treated using a BP neural network and fuzzy PID synergistic process, which retains auxiliary nutrients while meeting standards, resulting in qualified effluent.
[0008] The ratio of supernatant, wastewater effluent, and supplements (humic acid, urea, etc.) is optimized using the NSGA-II multi-objective algorithm to balance fertility, cost, and stability.
[0009] Through processes such as mixing, homogenization, and sterilization, high-quality water-soluble organic fertilizer is finally obtained.
[0010] The entire process is intelligently controlled through closed-loop data feedback, which not only improves the resource utilization level of fermentation products and wastewater, but also ensures the quality and economic efficiency of organic fertilizer, forming an integrated intelligent production system of "microbial fermentation - wastewater treatment - fertilizer preparation".
[0011] To achieve the above objectives, the present invention adopts the following technical solution:
[0012] A method for preparing water-soluble organic fertilizer using fermentation supernatant from methanogenic bacteria includes:
[0013] S1. An aerobic fermentation system of methanogenic bacteria was constructed. The cell concentration and organic matter content of the supernatant during fermentation were predicted by LSTM neural network. The hyperparameters of LSTM were optimized by genetic algorithm. The fermentation temperature, stirring speed and CH4 / O2 aeration ratio were controlled in real time. The fermentation supernatant was separated after fermentation.
[0014] S2. Collect the process wastewater generated during fermentation, homogenize it, optimize the coagulant dosage using a BP neural network, and then adjust the dissolved oxygen and residence time in the biological treatment stage using a fuzzy PID controller to obtain the treated wastewater effluent.
[0015] S3. The fermentation supernatant from step S1 and the wastewater effluent from step S2 are mixed in proportion, and humic acid solution, urea and potassium dihydrogen phosphate are added as supplements. The mixing ratio and the amount of supplements are optimized by NSGA-II algorithm. After homogenization, sterilization and filtration, water-soluble organic fertilizer is obtained.
[0016] In step S3, the optimization results of the NSGA-II algorithm are fed back to step S1 to adjust the weights of organic matter prediction in the LSTM neural network, forming a closed-loop regulation.
[0017] In this specification, in step S1, the input parameters of the LSTM neural network include fermentation temperature, stirring speed, CH4 / O2 aeration ratio, fermentation broth pH value and dissolved oxygen concentration, and the output parameters are the cell concentration and supernatant organic matter content for the next 4 hours. The genetic algorithm optimizes the learning rate and the number of hidden layer nodes of the LSTM by minimizing the prediction error.
[0018] In this specification, the trigger condition for real-time control in step S1 is: when the rate of increase of organic matter in the supernatant predicted by LSTM is less than 1%·h. -1 At that time, the CH4 / O2 ventilation ratio and stirring speed are adjusted according to the growth rate difference, and the adjustment coefficient is obtained by fitting historical data through a genetic algorithm.
[0019] In this specification, in step S2, the input of the BP neural network is the COD value of the homogenized wastewater, and the output is the optimal dosage of coagulant PAC. The model is trained by minimizing the deviation between the COD value of the coagulated wastewater and the target value to ensure that the COD after coagulation is ≤300mg / L.
[0020] In this manual, in step S2, the inputs to the fuzzy PID controller are the COD and ammonia nitrogen values at the inlet of the biological treatment tank. The dissolved oxygen setpoint and residence time are determined by a preset fuzzy rule table. Then, the opening degree of the aeration valve and the flow rate of the effluent valve are adjusted by the PID algorithm to make the treated wastewater COD ≤ 100 mg / L and ammonia nitrogen ≤ 15 mg / L.
[0021] In this specification, in step S3, the optimization objectives of the NSGA-II algorithm include maximizing the organic matter content of the mixed liquid, maximizing the total N+P2O5+K2O content, minimizing the pH deviation, and minimizing the cost. The constraint condition is that the heavy metal content in the mixed liquid meets the standards for water-soluble organic fertilizer.
[0022] In this instruction manual, in step S3, the source of the supplement is: humic acid solution is prepared by extraction from weathered coal, urea is agricultural grade granular urea, and potassium dihydrogen phosphate is industrial grade crystal, and the purity of all three is ≥98%.
[0023] In this specification, the specific process of closed-loop control in step S3 is as follows: when the volume ratio of fermentation supernatant to wastewater effluent output by the NSGA-II algorithm is greater than the historical average, the weight of organic matter prediction in the LSTM neural network is increased, so that the genetic algorithm prioritizes increasing the organic matter content of the fermentation supernatant during optimization.
[0024] In this instruction manual, in step S1, the culture medium of the fermentation system includes NH4NO3, MgSO4·7H2O, KH2PO4 and FeSO4·7H2O, the pH is adjusted to 6.5~7.5, the fermentation temperature is controlled at 28~32℃, and the cycle is 5~7 days.
[0025] In this instruction manual, in step S3, the homogenization process uses a high-pressure homogenizer with a working pressure of 20~30MPa, the sterilization method is pasteurization, and the conditions are 70℃ for 20 minutes. The filtration uses a 5μm filter membrane.
[0026] In this instruction manual, the bacterial precipitate obtained by centrifugation after the aerobic fermentation of methanogenic bacteria in step S1 is collected (the supernatant from the previous separation is used to prepare organic fertilizer, and the bacterial precipitate is a byproduct of this step). The bacterial precipitate is first washed with sterile water 2-3 times to remove residual culture medium impurities. Then, it is treated by spray drying (inlet air temperature 180-200℃, outlet air temperature 80-90℃) or vacuum freeze drying (vacuum degree 0.1-1Pa, temperature -40--50℃) to reduce the water content of the bacterial cells to below 8%. Finally, it is pulverized (particle size controlled at 100-200 mesh) to obtain a single-cell protein product (aerobic methanogenic bacteria SCP).
[0027] In summary, the present invention has at least the following beneficial effects:
[0028] Efficient resource utilization: The supernatant from the fermentation of methane-oxidizing bacteria and process wastewater are synergistically converted into organic fertilizer, realizing a closed loop of "waste-resource", reducing pollutant emissions and improving raw material utilization.
[0029] Product quality improvement: Through multi-algorithm collaborative optimization of fermentation parameters and formula, the organic matter and nutrient content of organic fertilizer are kept stable, pH value is highly adaptable, heavy metal content meets standards, and fertilization effect is better.
[0030] Intelligent production: Integrating algorithms such as LSTM-genetic algorithm, BP-fuzzy PID, and NSGA-II, it realizes intelligent control of the entire process of fermentation, wastewater treatment, and formula design, reducing manual intervention and operational errors.
[0031] Economic optimization: Wastewater resource utilization reduces raw material costs, intelligent formula optimization reduces supplement consumption, while stabilizing production efficiency and improving overall economic benefits. Attached Figure Description
[0032] Figure 1 This is a schematic diagram of the method for preparing water-soluble organic fertilizer using the fermentation supernatant of methanogenic bacteria involved in this invention.
[0033] Figure 2 This is a schematic diagram of the methanogenic bacteria fermentation (LSTM-genetic algorithm co-optimization) process involved in this invention.
[0034] Figure 3 This is a schematic diagram of the process wastewater treatment (BP-fuzzy PID collaborative control) process involved in this invention.
[0035] Figure 4 This is a schematic diagram of the process for optimizing the water-soluble organic fertilizer formula (NSGA-II algorithm) involved in this invention. Detailed Implementation
[0036] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0037] like Figure 1 As shown, this embodiment provides a method for preparing water-soluble organic fertilizer using the fermentation supernatant of methanogenic bacteria, including:
[0038] S1. An aerobic fermentation system of methanogenic bacteria was constructed. The cell concentration and organic matter content of the supernatant during fermentation were predicted by LSTM neural network. The hyperparameters of LSTM were optimized by genetic algorithm. The fermentation temperature, stirring speed and CH4 / O2 aeration ratio were controlled in real time. The fermentation supernatant was separated after fermentation.
[0039] S2. Collect the process wastewater generated during fermentation, homogenize it, optimize the coagulant dosage using a BP neural network, and then adjust the dissolved oxygen and residence time in the biological treatment stage using a fuzzy PID controller to obtain the treated wastewater effluent.
[0040] S3. The fermentation supernatant from step S1 and the wastewater effluent from step S2 are mixed in proportion, and humic acid solution, urea and potassium dihydrogen phosphate are added as supplements. The mixing ratio and the amount of supplements are optimized by NSGA-II algorithm. After homogenization, sterilization and filtration, water-soluble organic fertilizer is obtained.
[0041] In step S3, the optimization results of the NSGA-II algorithm are fed back to step S1 to adjust the weights of organic matter prediction in the LSTM neural network, forming a closed-loop regulation.
[0042] The technical concept of this invention is as follows:
[0043] Step S1: LSTM-Genetic Algorithm Co-optimization of Fermentation Parameters and Supernatant Preparation
[0044] In the process of producing supernatant using methanogenic bacteria fermentation, the dynamic regulation of fermentation parameters directly affects the metabolic efficiency of the bacteria and the accumulation of effective components (such as organic acids and small organic molecules) in the supernatant. To achieve efficient fermentation, this step uses an LSTM neural network to predict key fermentation indicators and combines this with a genetic algorithm to optimize model parameters, forming a closed-loop system of "prediction-optimization-regulation." The specific process (Methanogenic Bacterial Fermentation (LSTM-Genetic Algorithm Co-optimization) process is as follows) is shown in the figure below. Figure 2 As shown below:
[0045] 1.1 Fermentation System Construction and Data Acquisition
[0046] First, an aerobic fermentation system was constructed: a 500L stainless steel fermenter was selected, with the tank body made of 316L material to withstand acid and alkali corrosion. A temperature sensor (accuracy ±0.1℃), a pH composite electrode (measurement range 0~14, response time <5 seconds), and a dissolved oxygen fluorescence probe (measurement range 0~20mg / L, resolution 0.01mg / L) were installed on the top of the tank. The air vent on the top of the tank was connected to two mass flow controllers (control accuracy ±1%FS) through pipes, and CH4 treated by wet desulfurization (H2S content ≤5ppm after desulfurization, purity ≥99%) and O2 prepared by cryogenic air separation (purity ≥99.5%) were introduced respectively.
[0047] The culture medium was prepared according to the following precise formula: NH4NO3 1.0 g / L (providing nitrogen source), MgSO4·7H2O 0.2 g / L (providing magnesium ions), KH2PO4 0.5 g / L (providing phosphorus source and buffering capacity), and FeSO4·7H2O 0.01 g / L (providing iron). The pH was slowly adjusted to 7.0 ± 0.1 with 1 mol / L HCl or NaOH. After dispensing, the medium was sterilized in a 121℃ autoclave for 20 minutes. After cooling to 30℃, methanogenic bacteria (Methylosinus trichosporium OB3b, laboratory-preserved strain, initial inoculum size controlled at OD) were inoculated. 600 =0.1, ensuring the bacteria are in the early logarithmic growth phase.
[0048] During the fermentation process, the following data are collected in real time by the onboard PLC system:
[0049] Input parameters (recorded automatically every 10 minutes): Fermentation temperature (Control the temperature at 28~32℃), stirring speed (200~300rpm, six-bladed disc impeller), CH4 / O2 aeration ratio (Volume ratio 1:2~1:3), pH value of fermentation broth (6.0~8.0), dissolved oxygen concentration (2-5 mg / L);
[0050] Output parameters (manual sampling and offline detection every 4 hours): bacterial cell concentration (Measured using a UV spectrophotometer at 600 nm; the culture medium was filtered through a 0.22 μm filter membrane to remove impurities before measurement.) Organic matter content of fermentation supernatant. (Determined by potassium dichromate oxidation-external heating method, unit: %, each sample was measured in triplicate and the average value was taken).
[0051] Continuously run 100 batches of fermentation experiments (each batch for 5-7 days) to build a historical database containing 5,000 sets of input-output data. The data format is uniformly CSV file, containing timestamps, parameter values and testing personnel information, for subsequent model training.
[0052] 1.2 Construction and Training of LSTM Prediction Model
[0053] LSTM (Long Short-Term Memory) networks are specifically designed to predict fermentation indicators for the next four hours due to their strong ability to fit time-series data. The model structure is built using the Keras framework in Python, and is defined as follows:
[0054] Input layer: Receives a 5-dimensional vector These correspond to the five key fermentation parameters at time t;
[0055] Hidden layer: Set up 2 layers of LSTM units, with the number of nodes in each layer being [number missing]. (Hyperparameters to be optimized), using the ReLU activation function to solve the gradient vanishing problem;
[0056] Output layer: Outputs a 2D vector through a fully connected layer. This corresponds to the bacterial concentration and organic matter content over the next 4 hours.
[0057] The model expression is:
[0058] ;
[0059] in For hyperparameter set ( For learning rate, (Number of hidden layer nodes).
[0060] The training process strictly follows the machine learning workflow: historical data is randomly divided into training and validation sets in a 7:3 ratio, and the Adam optimizer (first moment estimates the exponential decay rate β1=0.9, second moment estimates the exponential decay rate β2=0.999) is used to minimize the loss function. (M is the number of samples). The validation set error is calculated every 10 iterations. After 500 iterations, the validation set prediction error is ensured to be ≤5%. Otherwise, the amount of training data needs to be increased or the network structure needs to be adjusted.
[0061] 1.3 Genetic Algorithm Optimization of LSTM Hyperparameters
[0062] To further improve the prediction accuracy of the LSTM model, a genetic algorithm is used to adjust the hyperparameters. Perform global optimization. The specific steps are as follows:
[0063] 1. Population initialization: Randomly generate 50 groups of hyperparameter individuals, where the learning rate is... The value range is [0.0001, 0.01] (generated with a logarithmic uniform distribution), and the number of hidden layer nodes... The value range is [32, 128] (integers, generated in a uniform distribution);
[0064] 2. Fitness calculation: For each group Substitute the data into the LSTM model, train it using the training set, and then calculate the loss function on the validation set. The fitness function is defined as follows: (A larger value indicates better model performance);
[0065] 3. Genetic manipulation:
[0066] Selection: Use the roulette wheel method to select 20 parent individuals based on their fitness percentage (individuals with higher fitness have a greater probability of being selected).
[0067] Crossover: Perform a single-point crossover on the selected parent with a probability of 0.8 (e.g., and Cross generation , (When crossing, take the nearest integer).
[0068] Mutation: Gaussian mutation is performed on the cross-offspring with a probability of 0.1. , (When mutating, adjust randomly within ±5).
[0069] 4. Iteration Termination: Repeat the evolutionary process for 30 generations until the optimal individual... If there is no significant improvement after 5 consecutive generations (rate of change < 1%), stop the iteration and output the optimal hyperparameters. (For example, obtained through actual optimization) =0.001$, =64).
[0070] 1.4 Real-time parameter control and supernatant preparation
[0071] During fermentation, the industrial control software automatically executes an optimization and control logic every hour:
[0072] 1. The sensor collects current parameters in real time. After data preprocessing (outlier removal, standardization), the data is input into the system. The optimized LSTM model can predict the next 4 hours. ;
[0073] 2. Calculate the organic matter growth rate based on the prediction results:
[0074] ;(unit:%· )
[0075] 3. Set threshold ,like Immediately trigger the parameter adjustment mechanism:
[0076] ;
[0077] in =0.05 (ventilation ratio adjustment coefficient) =20 (speed adjustment coefficient) was obtained by fitting historical control data using a genetic algorithm. The adjusted ventilation ratio and speed must be maintained within the initial set range. ∈[1:2,1:3], ∈[200,300]), ensure It rebounded above the threshold within 1 hour;
[0078] 4. Fermentation cycle ends (5-7 days, when...) The growth rate has been less than 0.5% per hour for 12 consecutive hours. -1 After the fermentation process is considered complete, the fermentation broth is pumped into a centrifuge and centrifuged at 4000 rpm for 15 minutes (centrifugation radius 15 cm). The supernatant is collected through a pipeline into a sterile storage tank, which is the fermentation supernatant (marked as LS).
[0079] Subsequently, a comprehensive analysis of LS indicators was conducted: organic matter content. (Potassium dichromate method), N content (Kjeldahl nitrogen determination method), P content (molybdenum antimony colorimetric method), K content (flame photometry method), pH value (Measured with a precision pH meter) and heavy metal content (For example, As, Cd, Pb, etc., ICP-MS is used for determination). All indicators must meet the requirements for raw materials in GB / T 17419-2018 standard. After the test report is archived, LS will be used as the core raw material for subsequent steps.
[0080] Step S2: Preparation of wastewater and qualified effluent through BP-fuzzy PID co-treatment
[0081] The process wastewater generated during fermentation (mainly including fermenter rinsing water, culture medium preparation wastewater, equipment condensate, etc.) contains small amounts of residual organic matter and inorganic salts. Direct discharge not only wastes resources but may also pollute the environment. This step optimizes the coagulant dosage through a BP neural network and combines it with fuzzy PID control of biological treatment parameters to achieve efficient wastewater purification while retaining the maximum amount of usable nutrients. The specific process (process wastewater treatment (BP-fuzzy PID collaborative control) process is as follows) is shown in the figure. Figure 3 As shown below:
[0082] 2.1 Wastewater Collection and Homogenization Treatment
[0083] A dedicated wastewater collection network is installed in the fermentation workshop, and all process wastewater is discharged into a 10m deep ditch. 3 The homogenization tank (constructed of reinforced concrete with anti-corrosion treatment on the inner wall) is equipped with a submersible mixer (1.5kW power, 100~150rpm) and an online COD analyzer (model HACHCODmaxII, detection range 0~1000mg / L, accuracy ±5%). The analyzer probe is automatically cleaned every 5 minutes to ensure data accuracy.
[0084] The core purpose of homogenization is to eliminate fluctuations in wastewater composition and ensure stable operation of subsequent treatment units: when the online COD analyzer shows a COD value fluctuation exceeding ±50 mg / L, the control system automatically increases the stirring speed to 150 rpm; when the fluctuation is ≤ ±20 mg / L, the base speed of 100 rpm is maintained. The homogenized wastewater is labeled as follows: Its initial COD value needs to be recorded. (Typically in the range of 50–500 mg / L) and pH value (6~9), and pumped into the coagulation reaction tank through pipeline.
[0085] 2.2 BP Neural Network Optimization of Coagulant Dosage
[0086] The core of the coagulation and sedimentation stage is to remove suspended solids and some dissolved organic matter from wastewater by adding polyaluminum chloride (PAC, effective content 30%). A backpropagation (BP) neural network was used to establish... The precise mapping relationship with the optimal PAC dosage is as follows:
[0087] 1. Dataset Construction: Conduct 500 sets of static coagulation experiments in advance, with each experiment performed in a 1L beaker: taking different... Homogenized wastewater (50–500 mg / L, in 50 mg / L gradients) was treated with different concentrations of PAC (20–150 mg / L, in 10 mg / L gradients). The mixture was rapidly stirred (300 rpm) for 1 minute, then slowly stirred (50 rpm) for 10 minutes. After standing for 30 minutes, the COD value of the supernatant was measured. The minimum PAC dosage required to achieve a COD removal rate ≥60% after sedimentation was selected as the optimal dosage. To form a complete dataset ;
[0088] 2. Model Structure: A 3-layer backpropagation (BP) neural network (1 input - 10 hidden layers - 1 output) is used. The input layer neurons receive... The signal is generated by using the tanh activation function in the hidden layer, and the output layer is the predicted dosage. Model expression:
[0089] ;
[0090] Where W is the weight matrix (input-hidden layer) Hidden-output layer b is the bias vector (hidden layer bias) Output layer bias );
[0091] 3. Training Optimization: Training was performed using the MATLAB Neural Network Toolbox, employing mean squared error loss. W and b are updated via backpropagation using the Levenberg-Marquardt algorithm. After 2000 iterations, when Training stops when the time is right, and the final model can be fitted to (Example results; actual results may vary depending on the data.)
[0092] 4. Practical Application: Install a metering dosing pump (accuracy ±2%, flow range 0~50L / h) on the outlet pipeline of the homogenizing tank. Based on online... Real-time computing The system automatically adds PAC solution (10% concentration). The coagulation reaction tank is equipped with a three-stage stirring system (fast stirring 300 rpm × 1 min → medium stirring 150 rpm × 5 min → slow stirring 50 rpm × 10 min). After the reaction, the wastewater enters a sedimentation tank and remains for 1.5 hours. The supernatant is labeled as follows: It is necessary to test it. Only then can we proceed to the next stage. If the target is not met, the BP model will be fed back to recalculate the dosage.
[0093] 2.3 Fuzzy PID Control of Biological Processing
[0094] The biological treatment tank is 20m. 3 Plug flow reactor (effective volume 18m³) 3 The activated sludge from a municipal wastewater treatment plant (after acclimatization, MLSS=3000mg / L, MLVSS / MLSS=0.7) was inoculated. Residual organic matter and ammonia nitrogen in the wastewater were removed through aeration and hydraulic retention time control. A fuzzy PID controller was used to achieve multi-parameter collaborative optimization control.
[0095] 1. Input variable definition and fuzzification:
[0096] The COD (mg / L) at the inlet of the biological pool is divided into two fuzzy subsets: "low" (≤200) and "high" (>200).
[0097] The ammonia nitrogen at the inlet of the biological pool (mg / L, detected online using Nessler's reagent colorimetric method) is divided into two fuzzy subsets: "low" (≤30) and "high" (>30).
[0098] 2. Fuzzy rule table:
[0099]
[0100] 3. PID control algorithm implementation:
[0101] Dissolved oxygen control: based on Compared with the measured value of the online dissolved oxygen meter deviation The opening degree of the aeration valve is adjusted by a PID controller. (%)
[0102] ;
[0103] Where the proportionality coefficient =0.5, integral coefficient =0.1, differential coefficient =0.05, all were adjusted using the Ziegler-Nichols method to ensure dissolved oxygen control accuracy of ±0.2 mg / L;
[0104] Dwell time control: according to Adjust the flow rate of the outlet valve (m) 3 / h), the calculation formula is:
[0105] ;( (Effective volume of biological pond)
[0106] For example when hour, The flow rate is precisely controlled by a variable frequency pump;
[0107] 4. Effluent Testing and Compliance Determination: Wastewater after biological treatment is labeled as wastewater treatment effluent ( Key indicators are sampled and tested every hour: (Potassium dichromate method) (Nessler's reagent method) (pH meter) The water can only be considered qualified after three consecutive tests that meet the standard.
[0108] At the same time, it is necessary to measure Auxiliary nutrient indicators: N content (Kjeldahl method), P content (Molybdenum-antimony colorimetric method), K content (Flame photometry) and heavy metals (ICP-MS) test data, together with LS indicators, serve as the basic parameters for S3 formulation optimization. Unqualified wastewater is returned to the homogenization tank for reprocessing.
[0109] Step S3: NSGA-II algorithm optimizes water-soluble organic fertilizer formulation and preparation
[0110] The fermentation supernatant of S1 and the wastewater effluent from S2 were mixed in an optimized ratio, and necessary nutrients were added based on nutrient testing results. The optimal formula was determined using the NSGA-II multi-objective optimization algorithm to minimize costs and stabilize properties while ensuring the fertility of the organic fertilizer. The specific process (optimization of water-soluble organic fertilizer formula (NSGA-II algorithm) process is as follows) is as follows. Figure 4 As shown below:
[0111] 3.1 Raw material parameter integration and supplement preparation
[0112] First, a raw material parameter database is established, and the system integrates the test results of S1 and S2:
[0113] Fermentation supernatant (LS): Record the organic matter content in detail. (%), N content (%), P content (%), K content (%), pH value Heavy metal content (mg / kg, including As, Cd, Cr, Pb, Hg, etc.), unit cost (RMB / L, including fermentation energy consumption, strain cultivation, equipment depreciation, etc.);
[0114] Wastewater treatment effluent ( ): Corresponding record (%) (%) (%) (%) , (mg / kg), unit cost (RMB / L, including costs for wastewater treatment chemicals, electricity, sludge disposal, etc.)
[0115] Prepare supplements based on raw material parameter gaps (all selected from food-grade purity, ≥98%):
[0116] Humic acid solution (HA): Prepared using humic acid extracted from weathered coal, concentration 10 g / L, detection indicators: =50% , , =0.5%, =5.0、 ,cost =8 yuan / L;
[0117] Urea ( Agricultural-grade granular urea, testing indicators: =46% =7.0、 ,cost =2.5 yuan / kg;
[0118] Potassium dihydrogen phosphate (KP): Industrial grade crystals, testing indicators: =52% (based on P2O5) =34% (based on K2O) =4.5、 ,cost =15 yuan / kg.
[0119] All supplements must be stored separately in a dry, well-ventilated warehouse, and key indicators must be tested again before use to ensure consistency with records.
[0120] 3.2 Construction of NSGA-II Multi-Objective Optimization Model
[0121] The decision variables are clearly defined as the formula ratio and the amount of supplement added, and the following vector is defined:
[0122] ;
[0123] The volume ratio of fermentation supernatant to wastewater treatment effluent (3≤α≤5, i.e., LS to α) The mixing ratio is );
[0124] : The volume ratio of humic acid solution to the total mixture (0≤β≤0.1, that is, β liters of humic acid solution are added per liter of mixture).
[0125] Urea addition amount (kg / L mixed solution, 0≤γ≤0.05, control the amount of N element supplementation);
[0126] Potassium dihydrogen phosphate addition amount (kg / L mixed solution, 0≤δ≤0.03, control the amount of P and K elements supplemented).
[0127] Four objective functions (weights normalized to a sum of 1) are set to comprehensively optimize the performance of organic fertilizer:
[0128] 1. Maximize organic matter (weight 0.4): Ensure the soil-improving capacity of organic fertilizer. Calculation formula:
[0129] ;
[0130] Urea and potassium dihydrogen phosphate do not contain organic matter, so they are not included in the calculation;
[0131] 2. Maximize Total Nutrients (Weight 0.3): Enhance the fertility of organic fertilizer. Total nutrients refer to the sum of N, P2O5, and K2O content.
[0132] ;
[0133] 0.46 is the conversion factor for N in urea, and 0.52 and 0.34 are the conversion factors for P2O5 and K2O in potassium dihydrogen phosphate, respectively.
[0134] 3. Minimize pH deviation (weight 0.2): Ensure the suitability of organic fertilizer (accommodating the pH requirements of most crops), with a target pH set at 7.
[0135] ;
[0136] The required deviation is ≤0.5;
[0137] 4. Cost minimization (weight 0.1): Controlling production economics, calculation formula:
[0138] ;
[0139] Strict constraints are set (complying with GB / T 17419-2018 standard for water-soluble organic fertilizers):
[0140] ;
[0141] in The limits for each heavy metal are (As≤10mg / kg, Cd≤3mg / kg, Cr≤50mg / kg, Pb≤50mg / kg, Hg≤5mg / kg).
[0142] 3.3 NSGA-II Algorithm Optimization Process and Closed-Loop Feedback
[0143] 1. Algorithm execution steps:
[0144] Population initialization: Generate 100 random solutions using real number encoding. This ensures that each decision variable is within the constraints.
[0145] Non-dominated ranking: Each individual is ranked according to the four objective function values and assigned a non-dominated level (the lower the level, the better).
[0146] Crowding density calculation: Within the same level, calculate the density (crowding density) of solutions around an individual. The larger the value, the sparser the solutions in that area. Individuals with high crowding density are retained to maintain diversity.
[0147] Selection operation: Use binary tournament selection method to select high-quality individuals from the parent generation;
[0148] Crossover and mutation: Simulate binary crossover (crossover probability 0.9, distribution exponent 20) and multinomial mutation (mutation probability 0.1, distribution exponent 20) on selected individuals to generate offspring population;
[0149] Population Update: Merge parent and offspring generations, select 100 optimal individuals based on non-dominance level and crowding, iterate for 100 generations, output Pareto optimal solution set, and select the final formula based on production needs (e.g., prioritizing fertility). (For example, actual optimization results) =4、 =0.05、 =0.02、 =0.01).
[0150] 2. Closed-loop feedback control mechanism to S1:
[0151] If the optimal formula is (Historical average proportion) indicates the current fermentation supernatant The content is insufficient, so it needs to be fed back to the LSTM model of S1 for weight adjustment: The predicted weights from Updated to:
[0152] ;
[0153] For example when When =4.5, =0.5 + 0.1 × 0.5 = 0.55, which makes the genetic algorithm focus more on improving LSTM hyperparameters when optimizing them. The prediction accuracy, and thus through S1 and The formula is adjusted to dynamically optimize fermentation parameters (such as appropriately increasing the CH4 ratio), promoting the synthesis of more organic matter by the cells, thus forming a virtuous cycle of "formula requirements → fermentation optimization".
[0154] 3.4 Organic Fertilizer Preparation and Refining Process
[0155] According to the optimal formula Perform the following preparation process:
[0156] 1. Raw material mixing: LS, ... By volume ratio Pump into a 100L stainless steel mixing tank (with heating jacket), and simultaneously press... Add humic acid solution (HA) in the specified proportion, turn on the stirrer (200 rpm) and mix for 30 minutes. During this time, control the temperature at 30°C using a jacket to ensure that all components are evenly dispersed.
[0157] 2. Precise nutrient replenishment: Based on and To calculate the amount of urea and potassium dihydrogen phosphate to be added, first use a small amount of solid urea and potassium dihydrogen phosphate... Dissolve (20% concentration), then slowly add to the mixture using a peristaltic pump, and continue stirring for 20 minutes. During this period, take a sample every 5 minutes to check the pH value. If it deviates from the target range, adjust it with 1 mol / L citric acid or KOH.
[0158] 3. Homogenization and sterilization: The mixture is pumped into a high-pressure homogenizer (working pressure 25MPa, homogenizer valve gap 0.1mm) to break up the droplets by shear force (particle size controlled at 1~5μm) to improve product stability; then it enters the pasteurization system (70℃, 20 minutes) to kill bacteria and spores (total microbial count after sterilization ≤100cfu / g).
[0159] 4. Filtration and Packaging: The sterilized liquid is filtered through a 5μm polypropylene filter membrane to remove trace impurities. Finally, it is dispensed into 20L light-proof plastic drums (pre-sterilized inside) by an automatic filling machine. The drum openings are sealed and labeled. The label information includes: product name "water-soluble organic fertilizer", organic matter content, total nutrient content, pH value, heavy metal content, dilution ratio (500~1000 times for spraying), shelf life (12 months), production batch number and date.
[0160] Finished products are subject to random sampling and testing (5 barrels per batch). Only products that pass all tests can be put into storage. Test reports are archived together with production records to ensure product quality traceability.
[0161] Through the close integration and algorithmic collaboration of the above three steps, not only is the efficient utilization of the supernatant from methanogenic bacteria fermentation and process wastewater achieved, but the intelligent optimization algorithm also ensures the quality stability and economic efficiency of water-soluble organic fertilizer, providing a high-quality fertilizer option for green agricultural planting.
[0162] I. Experimental Preparation
[0163] (a) Experimental materials
[0164] 1. Strains: Methylosinus trichosporium OB3b, provided by the Microbial Culture Collection Center, was used for fermentation after activation culture.
[0165] 2. Culture medium: Prepare according to the formula, containing 1.0 g / L NH4NO3, 0.2 g / L MgSO4·7H2O, 0.5 g / L KH2PO4, and 0.01 g / L FeSO4·7H2O. Adjust the pH to 7.0 ± 0.1 with 1 mol / L HCl or NaOH and sterilize at 121℃ for 20 minutes before use.
[0166] 3. Process wastewater: Collect fermenter rinse water and equipment condensate, with initial COD of 280-350 mg / L, ammonia nitrogen of 25-35 mg / L, and pH of 6.8-7.5.
[0167] 4. Supplements: Humic acid solution (concentration 10g / L, organic matter content 50%), agricultural grade urea (N content 46%), industrial grade potassium dihydrogen phosphate (P2O5 content 52%, K2O content 34%), all with a purity ≥98%.
[0168] (II) Experimental Equipment
[0169] 1. Fermentation system: 500L stainless steel fermenter (with temperature, pH, dissolved oxygen sensors and mass flow controller), centrifuge (4000rpm).
[0170] 2. Wastewater treatment system: 10m 3 Homogenization tank (with agitator and online COD analyzer), coagulation reaction tank, 20m 3 Biological treatment tank (with aeration device and dissolved oxygen meter).
[0171] 3. Preparation and testing equipment: 100L mixing tank, high-pressure homogenizer (20~30MPa), pasteurization device, 5μm filter membrane; ultraviolet spectrophotometer (for measuring bacterial concentration), potassium dichromate method detector (for measuring organic matter and COD), Kjeldahl nitrogen analyzer (for measuring nitrogen), molybdenum antimony colorimeter (for measuring phosphorus), flame photometer (for measuring potassium), ICP-MS (for measuring heavy metals), pH meter.
[0172] 4. Algorithm running equipment: Industrial control computer (installed with Keras and MATLAB neural network toolboxes for running LSTM, BP, and NSGA-II algorithms) and PLC control system (connecting sensors and actuators to achieve real-time control).
[0173] II. Experimental Procedure and Data Recording
[0174] (I) Fermentation optimization experiment (verifying the effectiveness of LSTM-genetic algorithm)
[0175] 1. Experimental Design
[0176] Two comparison groups were set up: the control group (traditional empirical control): fermentation was carried out according to fixed parameters (temperature 30℃, stirring speed 250rpm, CH4 / O2 aeration ratio 1:2.5); the experimental group (LSTM-genetic algorithm control): the procedure was executed according to step S1, and the parameters were adjusted in real time by using LSTM to predict indicators and the genetic algorithm to optimize hyperparameters (learning rate 0.001, number of hidden layer nodes 64). Each group was repeated 3 times, and each batch fermented for 7 days.
[0177] 2. Experimental Procedure
[0178] Experimental group: Before fermentation, a historical database of 5000 sets was constructed to train an LSTM model. During fermentation, temperature, rotation speed, aeration ratio, pH, and dissolved oxygen data were collected every hour. These data were input into the model to predict the organic matter content and cell concentration after 4 hours. When the predicted organic matter growth rate was <1%·h -1 At that time, the ventilation ratio (±0.1) and rotation speed (±20 rpm) are adjusted according to the algorithm.
[0179] Control group: The parameters were kept constant throughout the process, and were manually adjusted only when the pH deviated from 6.0 to 8.0.
[0180] 3. Experimental Data
[0181]
[0182] (II) Wastewater treatment experiment (verifying the effect of BP-fuzzy PID)
[0183] 1. Experimental Design
[0184] Two comparative groups were set up: Control group (manual dosing + fixed parameters): PAC (80 mg / L) was manually added based on experience; biological treatment maintained a fixed DO concentration of 3 mg / L and a retention time of 9 h. Experimental group (BP-fuzzy PID): Step S2 of the protocol was followed; the BP neural network optimized the PAC dosage, and the fuzzy PID adjusted the DO and retention time. Each group treated 10 batches of wastewater (10 m³ / batch). 3 ).
[0185] 2. Experimental Procedure
[0186] Experimental group: After homogenization, the COD of the wastewater is input into the BP model in real time, and the PAC dosage is output (e.g., when COD=300mg / L, the dosage is 60mg / L); for biological treatment, the DO and residence time are determined by fuzzy rules based on the inlet COD (≤200mg / L is "low", >200mg / L is "high") and ammonia nitrogen (≤30mg / L is "low", >30mg / L is "high"), and then the aeration valve and effluent valve are adjusted by PID.
[0187] Control group: PAC dosage and biological treatment parameters were kept constant throughout the process, and the treatment was repeated only when the effluent COD was >100mg / L.
[0188] 3. Experimental Data
[0189]
[0190] (III) Formulation optimization experiment (verifying the effect of NSGA-II)
[0191] 1. Experimental Design
[0192] Two comparison groups were set up: the control group (artificially prepared): mixed according to experience (supernatant: wastewater = 3:1, humic acid 0.08, urea 0.04 kg / L, potassium dihydrogen phosphate 0.02 kg / L); the experimental group (NSGA-II optimized): executed according to step S3 of the protocol, optimizing the formula with the goals of maximizing organic matter, maximizing nutrients, minimizing pH deviation, and minimizing cost. Five batches of organic fertilizer were prepared for each group.
[0193] 2. Experimental Procedure
[0194] Experimental group: Input supernatant (organic matter 35.2%, N 2.1%, P 0.8%, K 0.6%), wastewater effluent (organic matter 2.5%, N 0.3%, P 0.1%, K 0.2%) and supplement parameters. NSGA-II iterates for 100 generations to output the optimal formula (supernatant: wastewater = 4:1, humic acid 0.05, urea 0.02 kg / L, potassium dihydrogen phosphate 0.01 kg / L). Mix, homogenize and sterilize according to the formula.
[0195] Control group: Mixed in a fixed ratio, and the pH was artificially adjusted to around 7.0.
[0196] 3. Experimental Data
[0197]
[0198] (iv) Closed-loop control verification experiment (verifying the feedback effect of S3→S1)
[0199] 1. Experimental Design
[0200] Two comparison groups were set up: Open-loop group: only S1-S3 were executed, with no feedback from NSGA-II to S1; Closed-loop group: after optimizing the formula in S3 according to the plan, if the volume ratio of supernatant to wastewater was >4 (historical average), the organic matter prediction weight in LSTM was adjusted (increased from 0.5 to 0.55), and the S1 fermentation parameters were optimized again. Each group ran for 5 production cycles (each cycle was 15 days: 7 days of fermentation + 3 days of wastewater treatment + 5 days of preparation).
[0201] 2. Experimental Procedure
[0202] Closed-loop group: In the third cycle, the output volume ratio of NSGA-II is 4.5 (>4), which is fed back to S1. The LSTM weight is adjusted to 0.55. When optimizing the genetic algorithm, organic matter is prioritized. The aeration ratio during fermentation is adjusted from 1:2.5 to 1:2.7, and the rotation speed is adjusted from 250rpm to 260rpm.
[0203] Open-loop group: The LSTM weight is fixed at 0.5 throughout the process, and the fermentation parameters remain unchanged.
[0204] 3. Experimental Data
[0205]
[0206] (v) Final product performance testing (verifying the actual application effect)
[0207] 1. Testing Standards
[0208] Referring to GB / T17419-2018 Water-soluble Fertilizers, the key indicators and field application effects of the organic fertilizer prepared in the experimental group were tested (tomato was selected as the test crop, and a water control group and an experimental group with organic fertilizer were set up, with 3 plots in each group, covering an area of 20m²). 2 The fertilization method is to dilute the fertilizer 800 times and spray it once a week for a total of 6 times.
[0209] 2. Test data
[0210]
[0211] III. Experimental Conclusions
[0212] 1. Fermentation optimization effect: LSTM-genetic algorithm can significantly improve the organic matter content and cell concentration of methanogenic bacteria fermentation supernatant, reduce parameter fluctuations, and provide high-quality core raw materials for organic fertilizer.
[0213] 2. Wastewater treatment effect: BP-fuzzy PID can accurately optimize the dosage of coagulant, stabilize biological treatment parameters, improve wastewater purification efficiency and retain nutrients, and realize wastewater resource utilization.
[0214] 3. Formula optimization effect: The NSGA-II algorithm can balance the fertility, stability and cost of organic fertilizers. The product indicators are better than those of manual trial mixing and meet national standards.
[0215] 4. Closed-loop control effect: The feedback mechanism from S3 to S1 can dynamically adjust fermentation parameters, further improve the quality of supernatant and product qualification rate, and reduce the frequency of formula adjustment.
[0216] 5. Practical application results: The final product is not only hygienic and safe with heavy metal compliance, but also significantly improves crop yield and quality, verifying the technical practicality and superiority of the solution.
[0217] In some embodiments, in the core step (step S1) of methanogenic bacteria fermentation to prepare supernatant, fermentation temperature, stirring speed, and CH4 / O2 aeration ratio are the three key parameters affecting the organic matter content of the supernatant. These three parameters do not act independently but have a complex nonlinear coupling relationship (for example, increased temperature may promote organic matter synthesis at low stirring speeds but inhibit cell metabolism at high stirring speeds). Traditional single algorithms (such as LSTM, which is only good at time-series dynamic prediction, and genetic algorithms, which are only good at parameter optimization) cannot simultaneously take into account both "static nonlinear fitting" and "dynamic time-series regulation," resulting in low efficiency in fermentation parameter optimization and large fluctuations in supernatant quality.
[0218] Based on this, this solution introduces quadratic response surface fitting (hereinafter referred to as "surface fitting") technology, the core objective of which can be broken down into three aspects:
[0219] 1. Overcoming the shortcomings of single algorithms: Utilizing the strong fitting ability of surface fitting to static nonlinear relationships, a mapping model between "temperature-rotation speed-ventilation ratio" and organic matter content is quickly established, solving the problems of slow convergence and easy overfitting of LSTM in small sample scenarios;
[0220] 2. Constructing an algorithmic collaborative system: Deeply integrating surface fitting with genetic algorithms and LSTM—the genetic algorithm optimizes the coefficients of surface fitting to improve fitting accuracy, while surface fitting provides LSTM with "prior knowledge" (such as parameter importance ranking and initial weights) to accelerate LSTM training, ultimately forming a collaborative closed loop of "static fitting - parameter optimization - dynamic prediction";
[0221] 3. Ensure overall process stability: By accurately locking the parameter range for high organic matter output through surface fitting, and then combining it with real-time control of LSTM, the fluctuation of fermentation parameters is reduced. This lays the foundation for stabilizing nutrient input in subsequent wastewater treatment (step S2) and fixing raw material parameters in formula optimization (step S3), avoiding the problem of sudden changes in S2 treatment load and frequent adjustments to S3 formula due to fluctuations in raw material quality in S1.
[0222] II. Construction and Interaction Process of the "Surface Fitting-Genetic Algorithm-LSTM" Fusion System
[0223] (a) Definition
[0224] T: Fermentation temperature (a core environmental parameter reflecting the metabolic activity of the microorganisms) 28~32℃; n: Stirring speed (affects substrate mass transfer efficiency, such as the dissolution rate of CH4 and O2) 200~300rpm; R: CH4 / O2 aeration ratio (the ratio of carbon source to oxygen source supply, which directly affects the carbon metabolism pathway of the microorganisms) 1:2~1:3 (numerically converted to 0.33~0.5); OM: Organic matter content of fermentation supernatant (a core indicator for measuring the quality of the supernatant, containing organic acids, small molecule peptides, etc.) 25%~40%; Organic matter content predicted by the surface fitting model (static prediction result, reflecting the theoretical output of the parameter combination); : Experimentally measured organic matter content (determined using the potassium dichromate oxidation-external heating method, serving as the benchmark for evaluating model accuracy); The sum of squared residuals of the surface fitting model (to evaluate the fitting accuracy; the smaller the value, the closer the model is to the measured value) ≥ 0; The set of surface fitting coefficients to be optimized by the genetic algorithm (including...) to (A total of 10 optimization variables) : Input vector of the surface fitting model (3-dimensional, including three core parameters: temperature, rotational speed, and ventilation ratio) [T,n,R]; The input vector of the LSTM model (5-dimensional, with pH and dissolved oxygen added to the surface fitting input to reflect the entire fermentation environment) [T,n,R,pH,DO]; Organic matter content predicted by the LSTM model (dynamic time-series prediction results, reflecting the output trend in the next 4 hours). The weighting coefficients of the surface fitting results to the LSTM (dynamically adjusted to balance the accuracy ratio of static fitting and dynamic prediction) are 0.1~0.5. : The fusion prediction results of surface fitting and LSTM (ultimately used as the basis for triggering fermentation parameter adjustments).
[0225] (II) Construction and training of surface fitting model (static nonlinear relationship modeling)
[0226] 1. Model Structure Design: Basis for Selecting the Quadratic Response Surface
[0227] Considering that the influence of "temperature-speed-aeration ratio" on organic matter content involves "main effects (independent influence of a single parameter), secondary effects (both excessively high or low parameters inhibit output), and interaction effects (e.g., high temperature requires high speed to improve mass transfer efficiency)," traditional linear models cannot capture these complex relationships. Therefore, a quadratic response surface model is chosen, whose expression is:
[0228] ;
[0229] This is a constant term (the theoretical organic matter content without parameter input, which is practically meaningless and only used for fitting). , , The coefficient of the linear term (a positive coefficient indicates that an increase in the parameter promotes the synthesis of organic matter, while a negative coefficient has the opposite effect); , , This is the coefficient of the quadratic term (usually negative, reflecting the "diminishing marginal returns" of the parameter, meaning that further increases beyond the optimal value will inhibit output). , , The coefficients are the interaction terms (positive coefficients indicate that the two parameters promote each other, while negative coefficients indicate that they antagonize each other).
[0230] 2. Training Data Acquisition: Implementation Details of the Box-Behnken Experimental Design
[0231] To efficiently cover the full range of parameters and reduce the amount of experimentation (avoiding boundary point redundancy in orthogonal experiments), a Box-Behnken experimental design (BBD) was adopted, with 3 factors (T, n, R) at 3 levels, totaling 15 experimental groups (including 3 center-point replicates for verifying experimental repeatability). The specific implementation steps are as follows:
[0232] 1. Parameter level encoding: The actual values of the three parameters are converted into encoded values (-1, 0, +1) to facilitate subsequent model fitting. The encoding rules are shown in Table 1.
[0233] 2. Experimental Procedure: Each experiment uses a 500L fermenter. Parameters are set according to the coded values. Methanogenic bacteria are inoculated (initial OD). 600 =0.1) After fermentation for 7 days, samples were taken at the same time each day (e.g., 9:00 AM), and the supernatant was separated by centrifugation and then measured. The average value over 7 days is taken as the final output of this experimental group.
[0234] 3. Data validity verification: The center point experiment (T=30℃, n=250rpm, R=0.4) was repeated 3 times. If 3 times... If the relative standard deviation (RSD) is ≤5%, the data is considered valid; otherwise, the experiment should be repeated.
[0235] Table 1. Parameter levels and coding in the experimental design for surface fitting
[0236]
[0237] 3. Initial coefficient calculation: The specific calculation process of the least squares method
[0238] 15 groups of valid experiments (Actual values of T, n, R) and Substituting the quadratic response surface model, a system of linear equations is constructed. With the objective of minimizing the sum of squared residuals, the initial coefficients are solved using MATLAB's "regress" function. The specific steps are as follows:
[0239] 1. Construct a design matrix A 15x10 matrix, where each row corresponds to one set of experiments and each column corresponds to one term in the model (constant term, T, n, R, ...). , , (Tn, TR, nR), for example, the row vector of the design matrix for the first group of experiments (T=28, n=200, R=0.33) is:
[0240] [1,28,200,0.33, , , [28×200,28×0.33,200×0.33];
[0241] 2. Construct the response vector A 15-row, 1-column vector, with each row corresponding to one set of experiments. ;
[0242] 3. Solving for coefficients : Call the "regress" function, input and Output initial coefficients and residual sum of squares .
[0243] The initial coefficients (example) are calculated as follows: =-120.5, =5.2, =0.3, =80.1, =-0.08, =-0.0005, =-100.2, =-0.002, =-1.2, =-0.1, at this time =8.6 (The residual is large, indicating that the initial model fitting accuracy is insufficient and further optimization is needed).
[0244] (III) Optimizing surface fitting coefficients using genetic algorithm (Interaction 1: Genetic algorithm → Surface fitting, improving static fitting accuracy)
[0245] 1. Optimize the design of the objective and fitness function
[0246] The core objective of genetic algorithms is to minimize the sum of squared residuals of surface fitting. However, since genetic algorithms typically search for "maximizing fitness," the fitness function is defined as the reciprocal of the sum of squared residuals, i.e.:
[0247] ;
[0248] In the formula: The optimization variables (set of surface fitting coefficients) for the genetic algorithm; The surface fitting prediction value for the i-th group of experiments; The measured value is for the i-th group of experiments; The larger the value, the better the consistency between the surface fitting model and the measured data.
[0249] 2. Detailed Operation Procedure of Genetic Algorithm
[0250] To ensure the optimization process is efficient and avoids getting trapped in local optima, the following genetic algorithm parameters and operation steps are designed:
[0251] 1. Population initialization: Generate 50 individuals (each individual corresponds to one set of surface fitting coefficients). The range of coefficient values is determined based on the initial coefficients and the physical meaning of the parameters (e.g., ...). The coefficient for the first-order term of temperature is initially set to 5.2, with a range of 4 to 6 to ensure that the effect of temperature increase on organic matter synthesis conforms to biological laws. The specific range is shown in Table 2.
[0252] 2. Fitness calculation: For each individual, 15 experimental groups were used... Substitute into the surface fitting model and calculate Then calculate according to the above formula. ;
[0253] 3. Selection operation: The roulette wheel method is used – the fitness percentage of each individual is used as the probability of being selected, and the 20 individuals with the highest fitness are selected as parents (to ensure the transmission of superior genes).
[0254] 4. Crossover operation: Single-point crossover, with a crossover probability set to 0.8 (to balance genetic diversity and convergence speed) – Randomly select two parents, and randomly choose a crossover point in the coefficient sequence (e.g., the 3rd coefficient). After swapping the coefficients at the intersection points, two offspring are generated (e.g., parent 1's coefficients). =80.1 and parent generation 2 =85.2 After crossover, offspring 1 =85.2, offspring 2 =80.1);
[0255] 5. Mutation operation: Gaussian mutation, with a mutation probability set to 0.1 (to avoid premature population convergence) – for each coefficient of each offspring, add a Gaussian distribution with a probability of 0.1. random value ( To vary the asynchronous length, set according to the coefficient range, such as... of =0.1, of =0.005);
[0256] 6. Iteration Termination Criterion: After 30 iterations, if the rate of change in the fitness of the optimal individual is <1% for 5 consecutive generations (i.e., ... If k is the current iteration number, then stop iterating and output the optimal coefficient. .
[0257] Table 2. Optimization range of the genetic algorithm for surface fitting coefficients
[0258]
[0259] 3. Optimization Results and Accuracy Verification (including specific calculation examples)
[0260] After 30 iterations, the optimal coefficients were obtained. (Example): =-118.2, =5.3, =0.32, =82.5, =-0.085, =-0.00052, =-105.3, =-0.0022, =-1.25, =-0.11.
[0261] To verify the optimization effect, the fifth group of experiments (center point, T=30℃, n=250rpm, R=0.4) was selected for calculation:
[0262] 1. Substitute the optimized coefficients for calculation :
[0263] =-118.2+5.3×30+0.32×250+82.5×0.4-0.085× -0.00052× -105.3× -0.0022×30×250-1.25×30×0.4-0.11×250×0.4
[0264] =-118.2+159+80+33-0.085×900-0.00052×62500-105.3×0.16-0.0022×7500-1.25×12-0.11×100
[0265] =(-118.2)+159+80+33-76.5-32.5-16.848-16.5-15-11
[0266] =35.95%;
[0267] 2. The results of this group of experiments =36.1%, the residual is only |35.95-36.1|=0.15%;
[0268] 3. Calculate the optimized sum of squared residuals. (The remaining 14 sets of residuals are summed), and the final result is... =2.1, compared to the initial value =8.6 decreased by 75.6%, and the fitting accuracy was significantly improved.
[0269] (iv) Surface fitting assists LSTM model training (Interaction 2: Surface fitting → LSTM, accelerating dynamic model convergence)
[0270] While LSTM models excel at handling time-series data, initial weight randomization can lead to slow training convergence and insufficient learning of the nonlinear relationship between temperature, rotational speed, and ventilation ratio. Providing LSTM with "prior knowledge" through surface fitting optimization effectively addresses these two issues. The specific interaction process is as follows:
[0271] 1. Assigning initial weights to the LSTM input layer (parameter importance based on surface fitting)
[0272] LSTM input vector =[T,n,R,pH,DO] contains 5 parameters, where T,n,R are consistent with the input of the surface fitting. Based on the coefficients after surface fitting optimization, the "sensitivity" of each parameter to the OM (i.e., the change in OM when the parameter changes by 1 unit) is calculated, and the sensitivity is converted into the initial weights of the LSTM input layer to the hidden layer to ensure that the weights reflect the actual importance of the parameter.
[0273] With initial weights of temperature T For example, in calculation:
[0274] 1. Calculate parameter sensitivity: The sensitivity of a parameter is the partial derivative of the model with respect to that parameter (reflecting the strength of the effect of parameter changes on the OM). Calculate the partial derivative of T with respect to the surface fitting model:
[0275] ;
[0276] Take the mean of T =30℃ (the center point of the experimental design), substituted into the optimized... =5.3、 =-0.085, therefore:
[0277] =5.3+2×(-0.085)×30=5.3-5.1=0.2;
[0278] Similarly, the sensitivity of calculating rotational speed n ( =250rpm):
[0279] = +2 n=0.32+2×(-0.00052)×250=0.32-0.26=0.06;
[0280] Sensitivity to calculating ventilation ratio R ( =0.4):
[0281] = +2 R=82.5+2×(-105.3)×0.4=82.5-84.24=-1.74;
[0282] The negative sign indicates that once the ventilation ratio exceeds 0.4, further increases will inhibit OM synthesis. The sensitivity is taken as the absolute value of 1.74 for weighting calculation.
[0283] 2. Weight Normalization: The sensitivity of the three parameters is normalized to the range of 0 to 1, and used as the initial weights for the corresponding parameters in the LSTM input layer.
[0284] , , ;
[0285] For pH and DO (parameters not included in the surface fitting), the initial weights are set to the standard deviation proportions of historical data. =0.2、 =0.3.
[0286] In this way, the initial weights of LSTM are no longer random, but are set based on the physical meaning of experimental data, thus avoiding "blind exploration" in the early stages of training.
[0287] 2. Expanding the LSTM training samples (using static data fitted to surfaces)
[0288] LSTM training typically requires a large amount of time-series data (e.g., 5000 sets), but the initial data volume may be insufficient in actual production. The 15 sets of static experimental data from surface fitting are expanded into time-series samples using the following method:
[0289] 1. Fitting for each set of surfaces Supplement the mean values of pH and DO (pH=7.0, DO=3.5mg / L, based on the historical mean of 100 batches of fermentation) to form 15 groups. ;
[0290] 2. For each group Add timestamps (e.g., Group 1 corresponds to day 1 of fermentation, Group 2 corresponds to day 2 of fermentation, ..., Group 15 corresponds to day 15 of fermentation) to simulate time-series data;
[0291] 3. These 15 expanded samples were merged with the original 5000 sets of historical time series data to form 5015 sets of training samples, thereby improving the LSTM's ability to learn the nonlinear relationship between "temperature-speed-ventilation ratio".
[0292] 3. Weighted fusion of prediction results (dynamically adjusting weights to balance accuracy)
[0293] LSTM is not used directly in real-time prediction. Instead, it integrates surface fitting. , forming the final The formula is:
[0294] ;
[0295] Weight Dynamic adjustment rules (updated hourly):
[0296] 1. Calculate the prediction error between the surface fitting and LSTM within the first hour: , ;
[0297] 2. If < (Surface fitting has higher accuracy), then (Maximum value not exceeding 0.5, avoid over-reliance on static fitting);
[0298] 3. If (LSTM has higher accuracy), then (Minimum value not lower than 0.1, retaining the reference value of static fitting).
[0299] 4. If If the weight remains unchanged, then the weight remains unchanged.
[0300] For example, at a certain moment =0.15%, =0.2%, then The value was adjusted from the initial 0.3 to 0.35. =0.35×35.95+0.65×35.8=35.85%, and With an error of only 0.05% and a margin of 35.8%, the accuracy is significantly higher than that of a single model.
[0301] (v) LSTM feedback adjusts the input range of surface fitting (interaction 3: LSTM → surface fitting, optimize the accuracy of high value intervals)
[0302] Although the initial experimental range for surface fitting (T=28~32℃, n=200~300rpm, R=0.33~0.5) covers the entire parameter domain, the experimental points in the "high organic matter yield range" (e.g., T=29.5~30.5℃, n=240~260rpm, R=0.38~0.42) are relatively few, and there is still room for improvement in fitting accuracy. LSTM can locate this high-value range through dynamic prediction and provide feedback to adjust the experimental design of surface fitting. The specific process is as follows:
[0303] 1. High-value interval positioning: LSTM predicts the next 4 hours every hour. If the forecast is made for 4 consecutive hours If the organic matter content is ≥37% (high organic matter threshold), then extract for these 4 hours. The range of values for T, n, and R is determined as the "high-value range". For example, if the T value for 4 consecutive hours is 29.6~30.4℃, n is 242~258rpm, and R is 0.39~0.41, then the high-value range is T=29.5~30.5℃, n=240~260rpm, and R=0.38~0.42.
[0304] 2. Adjustment of the experimental range for surface fitting: The original 3 levels (-1, 0, +1) of surface fitting are adjusted to 3 levels within the high-value range. For example, T is adjusted to 29.5℃ (-1), 30℃ (0), 30.5℃ (+1), n is adjusted to 240rpm (-1), 250rpm (0), 260rpm (+1), and R is adjusted to 0.38 (-1), 0.4 (0), 0.42 (+1). Nine new experimental groups are added (covering all parameter combinations in the high-value range).
[0305] 3. Training the new surface fitting model: The 9 newly added experimental data sets were merged with the original 15 data sets, resulting in a total of 24 data sets. The process of "solving initial coefficients using the least squares method → optimizing coefficients using a genetic algorithm" was repeated to obtain an optimized surface fitting model for the high-value interval (denoted as...). );
[0306] 4. Fusion Prediction Update: In subsequent LSTM predictions, if... If it falls within the high-value range, then use Replace the original To achieve fusion, the formula is adjusted as follows:
[0307] ;
[0308] Through this feedback mechanism, the fitting accuracy of surface fitting in the high-value range is further improved. =1.2, compared with the original =2.1 (a 42.9% reduction), providing a more accurate static reference for LSTM.
[0309] III. Validation Experiment of the Fusion Effect of "Surface Fitting-Genetic Algorithm-LSTM"
[0310] To verify the superiority of the fusion system, a control experiment was designed to evaluate it from three dimensions: model training efficiency, fermentation supernatant quality, and parameter stability.
[0311] (I) Experimental Design and Operational Details
[0312] 1. Experimental groups (3 batches of fermentation per group, 7 days per batch, to ensure reproducibility)
[0313] Control group: Traditional empirical control - fixed fermentation parameters (T=30℃, n=250rpm, R=1:2.5), with manual adjustment only when the pH deviates from 6.0 to 8.0 (using 1mol / L HCl or NaOH).
[0314] LSTM + Genetic Algorithm Group: This group uses only the original LSTM (without surface fitting assistance) + genetic algorithm. The initial weights of the LSTM are randomized, and the training samples consist of 5000 historical data sets. The genetic algorithm only optimizes the hyperparameters of the LSTM (learning rate). Number of hidden layer nodes );
[0315] Fusion Group: The "Surface Fitting-Genetic Algorithm-LSTM" fusion system of this scheme - performs surface fitting modeling, genetic algorithm optimization, LSTM-assisted training and feedback adjustment according to the above steps.
[0316] 2. Data Acquisition and Detection Methods
[0317] Model training data: Record the number of convergence iterations, training time (time from data input to model convergence) and initial prediction error (OM error of the first prediction after training) for each LSTM group.
[0318] Fermentation supernatant quality: Samples were taken daily, and after centrifugation, OM (potassium dichromate method) and cell concentration OD were determined. 600 (Ultraviolet spectrophotometer), take the average value of 7 days;
[0319] Parameter stability: The actual values of T, n, and R are recorded every 10 minutes, and the parameter fluctuation range (maximum value - minimum value) and the organic matter growth rate stability rate (organic matter growth rate is between 0.8% and 1.2% per hour) are calculated over 7 days. -1 (The proportion of the fermentation period to the total fermentation period).
[0320] (II) Experimental Results and Analysis (including specific data and comparisons)
[0321] 1. Comparison of model training efficiency (reflecting the acceleration effect of the fusion system on LSTM)
[0322]
[0323] Analysis: The fusion group provides initial weights and expanded samples through surface fitting, so that the LSTM does not need to start exploring from random weights, reducing the number of convergence iterations by 36% and the training time by nearly 40%; at the same time, the initial prediction error is reduced by 45.1%, indicating that the initial model accuracy of the fusion system is significantly higher.
[0324] 2. Comparison of fermentation supernatant quality (reflecting the effect of the fusion system on improving output)
[0325]
[0326] Analysis: The organic matter content of the fusion group reached 37.8%, which was 32.6% higher than that of the control group and 7.4% higher than that of the LSTM+genetic algorithm group. This is because the surface fitting accurately locked the high-value parameter range, and the LSTM adjusted in real time on this basis to avoid the problem of parameters deviating from the optimal value. At the same time, the bacterial concentration and the daily increase in organic matter increased synchronously, indicating that the fusion system not only improved the bacterial metabolic efficiency, but also promoted the synthesis and secretion of organic matter.
[0327] 3. Comparison of fermentation parameter stability (reflecting the control effect of the fusion system on the process)
[0328]
[0329] Analysis: The temperature fluctuation of the fusion group was only 0.3℃, the rotation speed fluctuation was only 5rpm, and the aeration ratio fluctuation was only 0.01. This is because the static fitting results provided by the surface fitting serve as the "reference benchmark" for LSTM, making the regulation of LSTM more targeted and avoiding over-adjustment. The organic matter growth rate stabilized at 97.5%, which means that almost the entire fermentation process was in a state of high-efficiency production, laying the foundation for the stable operation of subsequent S2 and S3.
[0330] (III) Real-time application example of fusion prediction (day 3 of fermentation of the second batch)
[0331] To more intuitively demonstrate the practical application effect of the fusion system, the process of fusion prediction and parameter adjustment is explained in detail, taking the real-time control of the second batch of fermentation on the third day as an example:
[0332] 1. Real-time data acquisition: At 9:00 AM, the sensor collected data... =[T=30.2℃, n=255rpm, R=0.42, pH=7.1, DO=3.6mg / L], actual measurement =38.0%;
[0333] 2. Surface Fitting Prediction: Substituting T=30.2℃, n=255rpm, and R=0.42 into the optimized high-value interval surface fitting model, the results are calculated. =38.2%;
[0334] 3. LSTM prediction: Input a trained LSTM model to predict the next 4 hours =37.9%;
[0335] 4. Weighting adjustment: The first hour (8-9 AM) =0.15%, =0.2%, therefore Adjusted from 0.3 to 0.35;
[0336] 5. Fusion prediction calculation:
[0337] =0.35×38.2+(1-0.35)×37.9=13.37+24.635=38.005% With an error of only 0.005% and a precision of 38.0%, the accuracy is extremely high.
[0338] 6. Parameter Adjustment Decision: Fusion Prediction of Organic Matter Growth Rate =(38.005-37.5) / 1=0.505% / h (OM=37.5% in the first hour), which is lower than the threshold of 1%·h. -1 Trigger parameter adjustment:
[0339] Adjustment coefficients based on the fit of the genetic algorithm =0.05、 =20, calculate the adjustment amount:
[0340] =0.05×(1-0.505)=0.02475 (that is, the ventilation ratio is adjusted from 0.42 to 0.42+0.02475≈0.445, corresponding to an actual ventilation ratio of 1:2.25);
[0341] =20×(1-0.505)=9.9 (that is, the speed is adjusted from 255rpm to 255+9.9≈265rpm);
[0342] 7. Results after adjustment: Actual test results after 1 hour (10 AM). =38.5%, meaning the OM in the previous hour was 37.5%, and the adjusted OM in the next hour was 38.5%, representing the growth rate. =(38.5-37.5) / 1=1.0% / h, reaching the threshold, the adjustment is effective.
[0343] This example demonstrates that the fusion system has extremely high prediction accuracy, and parameter adjustments can quickly restore the organic matter growth rate to the optimal range, reflecting the synergistic advantages of "static fitting-dynamic prediction-real-time control".
[0344] IV. Core Contributions and Seamless Logic of Surface Fitting Optimization
[0345] (I) Core contributions of surface fitting optimization (from both technical and application dimensions)
[0346] 1. Technical Dimension: Solving the Challenge of Algorithm Collaboration and Improving Model Performance
[0347] Addressing the pain points of LSTM training: By assigning initial weights and expanding the sample size, the convergence speed of LSTM is improved by 36%, the initial prediction error is reduced by 45.1%, and overfitting in small sample scenarios is avoided.
[0348] Improving static fitting accuracy: After optimization of the genetic algorithm, the sum of squared residuals of surface fitting was reduced by 75.6%, and the fitting accuracy of high-value intervals was further improved by 42.9%, providing accurate reference for dynamic regulation;
[0349] Constructing an adaptive closed loop: LSTM feedback adjusts the surface fitting range, enabling the model accuracy to continuously improve with the production process, forming an adaptive system of "fitting-prediction-optimization-refitting".
[0350] 2. Application Dimension: Ensuring end-to-end stability and reducing production costs.
[0351] Stable raw material quality: The fusion system reduces the fluctuation of organic matter content in fermentation supernatant from ±2.3% to ±0.9%, providing stable nutrient input for the BP-fuzzy PID control of S2 wastewater treatment (avoiding frequent adjustments to PAC dosage due to fluctuations in influent COD in S2); Reduced formula adjustments: Due to stable raw material parameters, the NSGA-II algorithm in S3 reduces the frequency of formula adjustments from 2.5 times / cycle to 1.2 times / cycle, lowering labor and raw material costs; Improved product qualification rate: The final organic matter content compliance rate of water-soluble organic fertilizer increases from 88% to 99%, and all heavy metal contents comply with GB / T17419-2018 standards, significantly enhancing product quality stability.
[0352] (II) Full-process algorithm integration and connection logic (data flow and control flow from S1 to S3)
[0353] 1. S1 interior: surface fitting Genetic Algorithm LSTM closed loop
[0354] Data flow: Experimental data for surface fitting → Genetic algorithm optimization coefficients → Surface fitting output →LSTM Fusion Prediction→LSTM Output → Trigger parameter adjustment → Experimental data under new parameters → Feedback to adjust the surface fitting range;
[0355] Control flow: Genetic algorithms dominate "coefficient optimization", surface fitting dominates "static mapping", and LSTM dominates "dynamic prediction". The three work together to achieve precise control of fermentation parameters.
[0356] 2. S1→S2: Stabilize raw materials → Simplify wastewater treatment
[0357] The fermentation supernatant output by S1 has stable quality (OM fluctuation ±0.9%), and the COD of the process wastewater fluctuates less due to stable fermentation parameters (from ±50mg / L to ±20mg / L); the BP neural network of S2 does not require frequent adjustment of PAC dosage (dosage fluctuation from ±10mg / L to ±3mg / L), the dissolved oxygen control accuracy of fuzzy PID is improved from ±0.5mg / L to ±0.2mg / L, and the wastewater treatment compliance rate is improved from 82% to 98%.
[0358] 3. S2→S3: Stable water output → Optimized formula
[0359] The wastewater output from S2 has stable nutrients (N / P / K fluctuation ±0.1%), which, together with the fermentation supernatant from S1, serves as the raw material for S3. Due to the fixed raw material parameters, the number of optimization iterations for the NSGA-II algorithm in S3 is reduced from 100 to 80, the formula cost is reduced from 2.5 yuan / L to 2.2 yuan / L, and the organic matter content of the product is increased from 34.5% to 37.8%.
[0360] 4. S3→S1: Recipe Feedback → Adjust Fermentation
[0361] If the ratio of fermentation supernatant to wastewater volume output by the NSGA-II algorithm in S3 is greater than 4 (historical average), it indicates that the OM in S1 is insufficient, and feedback is sent to S1 for adjustment. (Increased from 0.35 to 0.4), making LSTM more focused on OM prediction, and then improving OM content through parameter adjustment to form a closed loop in the whole process.
[0362] V. Conclusion: This scheme introduces quadratic response surface fitting and deeply integrates it with genetic algorithms and LSTM to construct a synergistic system of "static nonlinear fitting - intelligent parameter optimization - dynamic temporal control". Experimental verification shows that this integrated system can reduce LSTM training time by 38.8%, increase the organic matter content of fermentation supernatant by 32.6%, and reduce parameter fluctuation range by more than 75%, while ensuring the stability of subsequent wastewater treatment and formula optimization. From a technical perspective, this system overcomes the shortcomings of single algorithms and achieves complementary advantages between algorithms; from an application perspective, this system reduces production energy consumption and costs, improves product quality and pass rate, and provides reliable technical support for the industrial application of preparing water-soluble organic fertilizer from methanogenic bacteria fermentation supernatant.
Claims
1. A method for preparing water-soluble organic fertilizer using fermentation supernatant from methanogenic bacteria, characterized in that, include: S1. An aerobic fermentation system of methanogenic bacteria was constructed. The cell concentration and organic matter content of the supernatant during fermentation were predicted by LSTM neural network. The hyperparameters of LSTM were optimized by genetic algorithm. The fermentation temperature, stirring speed and CH4 / O2 aeration ratio were controlled in real time. The fermentation supernatant was separated after fermentation. S2. Collect the process wastewater generated during fermentation, homogenize it, optimize the coagulant dosage using a BP neural network, and then adjust the dissolved oxygen and residence time in the biological treatment stage using a fuzzy PID controller to obtain the treated wastewater effluent. S3. The fermentation supernatant from step S1 and the wastewater effluent from step S2 are mixed in proportion, and humic acid solution, urea and potassium dihydrogen phosphate are added as supplements. The mixing ratio and the amount of supplements are optimized by NSGA-II algorithm. After homogenization, sterilization and filtration, water-soluble organic fertilizer is obtained. In step S3, the optimization results of the NSGA-II algorithm are fed back to step S1 to adjust the weight of organic matter prediction in the LSTM neural network, forming a closed-loop control. The specific process of the closed-loop control is as follows: when the volume ratio of fermentation supernatant to wastewater effluent output by the NSGA-II algorithm is greater than the historical average, the weight of organic matter prediction in the LSTM neural network is increased, so that the genetic algorithm prioritizes increasing the organic matter content of the fermentation supernatant during optimization.
2. The method for preparing water-soluble organic fertilizer using the fermentation supernatant of methanogenic bacteria according to claim 1, characterized in that, In step S1, the input parameters of the LSTM neural network include fermentation temperature, stirring speed, CH4 / O2 aeration ratio, fermentation broth pH and dissolved oxygen concentration. The output parameters are the cell concentration and supernatant organic matter content for the next 4 hours. The genetic algorithm optimizes the learning rate and the number of hidden layer nodes of the LSTM by minimizing the prediction error.
3. The method for preparing water-soluble organic fertilizer using the fermentation supernatant of methanogenic bacteria according to claim 1, characterized in that, In step S1, the trigger condition for real-time control is: when the LSTM-predicted increase in organic matter growth rate in the supernatant is less than 1%·h. -1 At that time, the CH4 / O2 ventilation ratio and stirring speed are adjusted according to the growth rate difference, and the adjustment coefficient is obtained by fitting historical data through a genetic algorithm.
4. The method for preparing water-soluble organic fertilizer using the fermentation supernatant of methanogenic bacteria according to claim 1, characterized in that, In step S2, the input of the BP neural network is the COD value of the homogenized wastewater, and the output is the optimal dosage of coagulant PAC. The model is trained by minimizing the deviation between the COD value of the coagulated wastewater and the target value to ensure that the COD after coagulation is ≤300mg / L.
5. The method for preparing water-soluble organic fertilizer using the fermentation supernatant of methanogenic bacteria according to claim 1, characterized in that, In step S2, the inputs to the fuzzy PID controller are the COD and ammonia nitrogen values at the inlet of the biological treatment tank. The dissolved oxygen setpoint and residence time are determined by a preset fuzzy rule table. Then, the opening degree of the aeration valve and the flow rate of the effluent valve are adjusted by the PID algorithm to make the treated wastewater COD ≤ 100 mg / L and ammonia nitrogen ≤ 15 mg / L.
6. The method for preparing water-soluble organic fertilizer using the fermentation supernatant of methanogenic bacteria according to claim 1, characterized in that, In step S3, the optimization objectives of the NSGA-II algorithm include maximizing the organic matter content of the mixed liquor, maximizing the total N+P2O5+K2O content, minimizing the pH deviation, and minimizing the cost. The constraint is that the heavy metal content in the mixed liquor meets the standards for water-soluble organic fertilizer.
7. The method for preparing water-soluble organic fertilizer using the fermentation supernatant of methanogenic bacteria according to claim 1, characterized in that, In step S3, the sources of the supplements are: humic acid solution is prepared by extraction from weathered coal, urea is agricultural grade granular urea, and potassium dihydrogen phosphate is industrial grade crystal, and the purity of all three is ≥98%.
8. The method for preparing water-soluble organic fertilizer using the fermentation supernatant of methanogenic bacteria according to claim 1, characterized in that, In step S1, the culture medium of the fermentation system includes NH4NO3, MgSO4·7H2O, KH2PO4 and FeSO4·7H2O, the pH is adjusted to 6.5~7.5, the fermentation temperature is controlled at 28~32℃, and the cycle is 5~7 days.
9. The method for preparing water-soluble organic fertilizer using the fermentation supernatant of methanogenic bacteria according to claim 1, characterized in that, In step S3, the homogenization process uses a high-pressure homogenizer with a working pressure of 20~30MPa, the sterilization method is pasteurization, and the conditions are 70℃ for 20 minutes. The filtration uses a 5μm filter membrane.
Citation Information
Patent Citations
Large-scale pig breeding wastewater purification treatment system
CN121044745A
Low-carbon modular artificial wetland system and carbon sink synergistic purification method thereof
CN121405245A