System and method for accounting for gas emission fluxes in a scenario of composting in a reactor with intermittent aeration

By constructing a gas emission flux calculation system for intermittent aeration reactor composting scenarios, and employing the trapezoidal integral method and anomaly data correction technology, the system solves the problems of low efficiency and poor accuracy in gas emission flux calculation for composting reactors in existing technologies. It achieves automated and standardized flux calculation and detailed report generation, supporting composting process optimization.

CN122290752APending Publication Date: 2026-06-26AGRO ENVIRONMENTAL PROTECTION INST OF MIN OF AGRI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
AGRO ENVIRONMENTAL PROTECTION INST OF MIN OF AGRI
Filing Date
2026-05-28
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing methods for calculating gas emission flux in composting reactors are inefficient, have large errors, cannot achieve automated and standardized processing, cannot accurately identify continuous and effective monitoring periods, do not correct abnormal data, and have a single output format, making it difficult to support composting process optimization.

Method used

Design a gas emission flux accounting system for an intermittent aeration reactor composting scenario. The system includes a pipeline controller module, a data loading and preprocessing module, a unit conversion module, a flux calculation module for the aeration and aeration stop stages, and a result output module. The system uses the trapezoidal integral method to calculate the flux, automatically identifies continuous effective time periods and corrects abnormal data, and generates standardized reports.

Benefits of technology

It enables automated and standardized processing of gas emission flux, improves accounting efficiency and accuracy, reduces the burden on operators, provides detailed statistical reports, and facilitates the optimization of composting processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122290752A_ABST
    Figure CN122290752A_ABST
Patent Text Reader

Abstract

This invention relates to a gas emission flux calculation system and method for intermittent aeration reactor composting scenarios, belonging to the field of gas monitoring technology in composting processes. The system includes a pipeline controller, data loading and preprocessing, unit conversion, flux calculation during the aeration phase, flux calculation during the aeration stop phase, and result output modules. Driven by a configuration file, the system automatically completes multi-stage monitoring data loading, net concentration calculation, anomaly correction, continuous effective time period identification, unit conversion, instantaneous flux calculation, trapezoidal integral flux calculation, and standardized report generation. This invention solves the problems of low efficiency, large errors, inability to distinguish process stages, and inability to automatically identify effective data in existing technologies, significantly improving the automation level and accuracy of gas emission flux calculation in composting reactors. It is applicable to emission monitoring and process optimization for various gases and reactor types.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of gas emission monitoring technology in composting processes, and in particular to a gas emission flux calculation system and method for intermittent aeration reactor composting scenarios. Background Technology

[0002] The composting process generates characteristic gases such as methane and carbon dioxide. Accurate calculation of their emission flux is crucial for optimizing composting processes and controlling pollutant emissions. Currently, gas emission monitoring in composting reactors often employs segmented data collection, monitoring separately during the aeration and shutdown phases. This requires calculating emission flux using an integral method based on data such as gas concentration and aeration / extraction rates, and strictly distinguishing between continuous effective monitoring periods to exclude invalid monitoring data.

[0003] However, existing gas flux calculations for composting reactors mostly rely on manual calculations or simple script processing methods. Monitoring data is manually organized, net concentration is calculated, units are converted, and integral calculations are completed using Excel. Some simple calculation programs can only process data for a single stage, do not consider the process differences between the aeration and shutdown stages, and cannot accurately identify continuous effective monitoring periods.

[0004] Specifically, the existing technology has the following drawbacks: 1. Manual calculation is inefficient and prone to errors. It requires manual processing of multi-stage concentration data, unit conversion, and integral flux calculation. The process is cumbersome and prone to calculation errors. It also cannot quickly process large batches of time-series monitoring data. 2. The existing accounting program does not implement differentiated processing for the ventilation / cessation of ventilation stages, and does not develop specific accounting logic for the different flow parameters and effective label periods of the two stages, which can easily lead to inaccurate flux accounting results; 3. It cannot accurately identify continuous and effective monitoring periods. Invalid label segments in the monitoring data (such as ventilation phase T=0, ventilation stop phase TR=0) are not automatically filtered, requiring manual data screening, which increases the burden on operators. 4. Lack of standardized accounting processes: data preprocessing, unit conversion, throughput calculation, and result summarization are independent of each other, and there is no unified process controller, making it difficult to achieve automated and standardized data processing. 5. There is no reasonable correction mechanism for abnormal concentration data (such as net concentration ≤ 0). Directly using the raw data for calculation will lead to deviation in the flux results. Furthermore, the validity of the total daily monitoring duration is not verified, making it impossible to detect abnormal data collection issues. 6. The output format of the calculation results is monotonous, and standardized daily flux and total flux statistical reports are not generated, which is not conducive to the subsequent analysis and optimization of composting process parameters. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and propose a gas emission flux calculation system and method for intermittent aeration reactor composting scenarios. This system can achieve automated preprocessing of data during the aeration and shutdown phases, differentiated flux calculation, and standardized result output. It can accurately identify continuous and effective monitoring periods, correct abnormal concentration data, verify the effectiveness of monitoring duration, significantly improve the efficiency and accuracy of flux calculation, and reduce the burden on operators.

[0006] The technical problem solved by this invention is achieved through the following technical solution: A gas emission flux calculation system for intermittent aeration reactor composting scenario includes a pipeline controller module, a data loading and preprocessing module, a unit conversion module, a flux calculation module for the aeration phase, a flux calculation module for the aeration stop phase, and a result output module. The pipeline controller module is connected to the data loading and preprocessing module, the ventilation stage flux calculation module, the shutdown ventilation stage flux calculation module, and the result output module, respectively. The data loading and preprocessing module is connected to the unit conversion module. The unit conversion module is connected to the ventilation stage flux calculation module and the shutdown ventilation stage flux calculation module, respectively. The ventilation stage flux calculation module and the shutdown ventilation stage flux calculation module are both connected to the result output module. The pipeline controller module, as the core scheduling unit, loads and parses the JSON configuration file, and calls the other modules in a preset order to realize the automated flow and processing of data. The data loading and preprocessing module loads monitoring data from the ventilation phase and the shutdown phase, calculates the net concentration, identifies the continuous effective monitoring period, and assigns a unique group ID. The unit conversion module is used to convert gas concentration units from ppm to mg / m³. 3 ; The ventilation phase flux calculation module calculates the emission flux during the ventilation phase based on the ventilation rate and using the trapezoidal integral method. The flux calculation module for the shutdown ventilation phase uses the trapezoidal integral method based on the pumping rate to calculate the emission flux during the shutdown ventilation phase. The results output module merges the results of the two-stage calculations and generates a standardized report.

[0007] A method for calculating gas emission flux in an intermittent aeration reactor composting scenario includes the following steps: Step 1: The pipeline controller module loads the JSON configuration file, initializes the system environment, and validates the input file; Step 2: The data loading and preprocessing module loads the monitoring data, calculates the net concentration, identifies continuous valid monitoring periods, and corrects abnormal net concentrations; Step 3: The unit conversion module converts the gas concentration from ppm to mg / m³.3 ; Step 4: The ventilation stage flux calculation module calculates the emission flux during the ventilation stage based on the ventilation rate using the trapezoidal integral method. Step 5: The flow rate calculation module for the cessation of ventilation calculates the emission flow rate during the cessation of ventilation stage based on the pumping rate using the trapezoidal integral method. Step 6: The results output module merges the results from the two stages and generates a standardized report.

[0008] Furthermore, the specific implementation method of step 1 is as follows: the pipeline controller module reads the JSON configuration file, loads the project parameters, initializes the log system, creates the inputs, intermediate, outputs, and logs directory structures, and verifies whether the monitoring data files for the ventilation and shutdown phases exist in the specified directory. The project parameters include gas name, molecular weight, and Q. p Q c And integration methods.

[0009] Furthermore, the specific implementation method of step 2 is as follows: the data loading and preprocessing module reads the monitoring data during the ventilation phase and the ventilation cessation phase, respectively, and standardizes the column names, which include time and measured concentration C. m Background concentration C b Using the T / TR tag, the time column is parsed into time-series data in DD-MM-YYYYHH:MM:SS format, and the net gas concentration is calculated. C j =C m -C b For C j For abnormal data with a value ≤0, the average of the four most recent valid data points within the same day is used for replacement and correction. A continuous valid monitoring period identification algorithm is used to assign a unique group ID to each continuous period, filter invalid label segments, and output preprocessed CSV format data.

[0010] Furthermore, the specific implementation method of the continuous effective monitoring period identification algorithm is as follows: sort the ventilation stage data by time, where the ventilation stage T=Y and the ventilation stop stage TR=N; traverse the labels in column T; when the label is Y, mark it as a continuous effective period and assign an incrementing group ID to the period; when the label is 0, terminate the current continuous period and set the group ID to 0; only retain valid data with group ID ≠ 0. Sort the data for the ventilation cessation phase by time, iterate through the TR column labels, and when the label is N, mark it as a continuous valid time period and assign an incrementing group ID; when the label is 0, terminate the current continuous time period and set the group ID to 0; only retain valid data with group ID ≠ 0.

[0011] Furthermore, the specific implementation method of step 3 is as follows: the unit conversion module receives the preprocessed data, calculates the conversion factor based on the gas molecular weight and standard molar volume of 22.414 L / mol (the gas molar volume at the corresponding temperature can also be flexibly adjusted according to the actual working conditions), and converts C... m C b C j Convert the unit from ppm to mg / m³ 3 Generate C j (mg / m 3 The column retains the original grouping information and outputs the converted CSV data.

[0012] Furthermore, the specific implementation method of step 4 is as follows: the aeration stage flux calculation module reads the unit-converted aeration stage data, based on the bottom aeration rate Q of the compost reactor. p Calculate the instantaneous flux: The trapezoidal integral method was used to integrate the instantaneous flux for each continuous effective time period; where emission amount = ∫FR(t)dt. The emission flux and monitoring duration for each time period and each day were calculated, and the total daily duration was verified to not exceed 1440 minutes. The calculation results were saved in pickle format.

[0013] Furthermore, the specific implementation method of step 5 is as follows: the flux calculation module for the ventilation stop phase reads the unit-converted ventilation stop phase data, based on the analyzer's pumping rate Q. c Calculate the instantaneous flux: The trapezoidal integral method was used to complete the flux integration for a continuous effective period, calculate the emission flux and monitoring duration for each period and each day, verify the validity of the daily duration, and save the calculation results in pickle format.

[0014] Moreover, the specific implementation method of step 6 is as follows: the result output module loads the flux calculation results of the two stages, merges them to generate a daily flux statistics report and a total flux statistics report; generates a flux accounting summary report, clarifies the accounting rules, calculation formulas, data statistics information, and abnormal data handling, outputs all result files to the specified directory, and records the running information of the entire accounting process in the log system.

[0015] Furthermore, the specific implementation method for completing flux integration over a continuous effective time period using the trapezoidal integral method is as follows: E=∑i=1n0.5×(FR(ti)+FR(ti-1))×Δti Where E is the emission flux during that period, FR(ti) is the instantaneous flux at the i-th data point, and Δti is the time interval between the i-th data point and the (i-1)-th data point.

[0016] The advantages and positive effects of this invention are: 1. High degree of automation, significantly improving accounting efficiency: It realizes full-process automation from data loading, preprocessing, unit conversion to throughput calculation and result output, replacing manual Excel calculation and simple script processing. It can quickly process large batches of time series monitoring data, reduce the workload of operators, and avoid calculation errors caused by manual operation.

[0017] 2. Multi-stage differentiated processing to improve accounting accuracy: Different flow parameters (Q) are configured to address the process differences between the aeration and shutdown stages of the composting reactor. p / Q c We will develop effective label identification rules and formulate exclusive flux accounting logic to meet the monitoring needs of actual composting processes and solve the problem of result distortion caused by the single accounting logic of existing technologies.

[0018] 3. Accurately identify continuous valid time periods and filter invalid data: The dedicated algorithm automatically identifies continuous valid monitoring time periods during the ventilation phase (T=Y) and the cessation of ventilation phase (TR=N), assigns a unique group ID to each time period, and automatically filters invalid label data, eliminating the need for manual screening and ensuring the validity of the calculated data.

[0019] 4. Reasonable correction of abnormal data to reduce result bias: For abnormal data with net concentration ≤ 0, the average of the four most recent valid data is used for replacement and correction to avoid the deviation of flux results caused by the direct participation of abnormal data in the calculation, thereby improving the reliability of the accounting results.

[0020] 5. Standardized processes and outputs facilitate process analysis: A standardized flux accounting process is established, project parameters and file paths are uniformly managed through configuration files, and standardized daily flux and total flux statistical reports and detailed summary reports are generated. The accounting rules, calculation formulas and data statistics are clearly defined, providing clear and standardized data support for composting process parameter optimization and pollutant emission control.

[0021] 6. Process monitoring and validity verification to ensure data quality: Set up a log system to record the running status and key information of the entire accounting process to facilitate troubleshooting; verify the validity of the total daily monitoring time (≤1440 minutes) to promptly identify abnormal issues in the data collection process and ensure the quality of monitoring data and accounting results.

[0022] 7. High flexibility and wide adaptability: It adopts a JSON configuration file driven mode, which can flexibly modify parameters such as gas name, molecular weight, flow rate parameters, data file path, integration method, etc., without modifying the core code. It can adapt to the emission flux calculation needs of different composting reactors and different characteristic gases (such as CH4 and CO2), and has a wide range of application scenarios. Attached Figure Description

[0023] Figure 1 This is a structural diagram of the system of the present invention; Figure 2 This is a flowchart of the accounting method of the present invention; Figure 3 This is a flowchart illustrating the algorithm for identifying continuous and effective monitoring periods according to the present invention. Figure 4 This is a curve showing the maturity of aerobic composting of pig manure according to the present invention. Detailed Implementation

[0024] The present invention will be further described in detail below with reference to the accompanying drawings.

[0025] A gas emission flux accounting system for intermittent aeration reactor composting scenarios, such as Figure 1 As shown, it includes a pipeline controller module, a data loading and preprocessing module, a unit conversion module, a ventilation phase flux calculation module, a shutdown ventilation phase flux calculation module, and a result output module.

[0026] The pipeline controller module is connected to the data loading and preprocessing module, the ventilation stage flux calculation module, the shutdown ventilation stage flux calculation module, and the result output module. The data loading and preprocessing module is connected to the unit conversion module. The unit conversion module is connected to the ventilation stage flux calculation module and the shutdown ventilation stage flux calculation module. Both the ventilation stage flux calculation module and the shutdown ventilation stage flux calculation module are connected to the result output module.

[0027] The aforementioned module is the core control module (PipelineController), which loads and parses the JSON configuration file, initializes the log system, creates the directory structure required for data processing, verifies the validity of the input data files, dynamically loads other functional modules, executes the processing logic of each module in a preset order, monitors the running status of the entire accounting process, and generates process running logs and the final accounting report.

[0028] The JSON configuration file includes project configuration (gas name, molecular weight, flow rate parameters, data processing rules), data file path, module execution order, directory structure, and other information. It supports flexible modification of parameters and file paths to adapt to the gas monitoring and accounting needs of different composting reactors.

[0029] The data loading and preprocessing module (Data_loader) works in conjunction with the pipeline controller module. It receives the input file path passed to it, loads gas monitoring data (supporting xlsx and csv formats) for the ventilation and shutdown phases, standardizes data column names, parses the time-series monitoring time, calculates the net gas concentration (measured concentration - background concentration), corrects abnormal data with net concentration ≤ 0, accurately identifies and filters continuous valid monitoring periods (T=Y for ventilation phase and TR=N for shutdown phase), assigns a unique group ID to each continuous valid period, and outputs the preprocessed standardized data file.

[0030] The unit conversion module (Unit_converter) works in conjunction with the data loading and preprocessing module. It receives the preprocessed data output by the data loading and preprocessing module and converts the gas concentration unit from ppm to mg / m³ based on the gas molecular weight and molar volume under standard conditions. 3 (Conversion formula: mg / m³) 3 =ppm×molecular weight / 22.414), respectively complete the unit conversion of data during ventilation and ventilation cessation, retain the original concentration data and grouping information, and output the unit-converted dataset.

[0031] The aeration stage flux calculation module (Flux_calculator_vent) works in conjunction with the unit conversion module, receiving the converted aeration stage data from its output, and calculating the flux based on the bottom aeration rate (Q) of the composting reactor. p According to the formula FR(t)=Q p ×C j mg / m 3 Instantaneous flux (mg / min) was calculated by integrating the instantaneous flux over a continuous effective period using the trapezoidal integral method to obtain the emission flux for each period and each day. The daily monitoring duration was verified to be no more than 1440 minutes. The ventilation stage flux calculation results (including group statistics and daily statistics) were output.

[0032] The flux calculation module (Flux_calculator_novent) for the ventilation stop phase works in conjunction with the unit conversion module, receiving the converted data for the ventilation stop phase from its output, and calculating the flux based on the analyzer's pumping rate (Q). c According to the formula FR(t)=Q c ×C j mg / m 3 Instantaneous flux (mg / min) was calculated, and the flux integration was completed for a continuous effective period using the trapezoidal integral method. The effectiveness of the daily monitoring duration was verified, and the flux calculation results for the cessation of ventilation were output (including group statistics and daily statistics).

[0033] The Result_exporter module works in conjunction with the flux calculation modules for the ventilation and shutdown phases to merge the flux calculation results from the two phases, generate standardized daily flux statistics reports and total flux statistics reports, calculate the total emission flux and the proportion of each phase, generate a detailed flux calculation summary report, and clarify the calculation rules, calculation formulas, data statistics information and output file list.

[0034] A method for calculating gas emission flux in an intermittent aeration reactor composting scenario, such as... Figure 2 As shown, it includes the following steps: Step 1: The pipeline controller module loads the JSON configuration file, initializes the system environment, and validates the input file.

[0035] The pipeline controller module reads the JSON configuration file, loads project parameters, initializes the logging system, creates the inputs, intermediate, outputs, and logs directory structures, and verifies that the monitoring data files for the ventilation and shutdown phases exist in the specified directories. Project parameters include gas name, molecular weight, and Q. p Q c And integration methods.

[0036] Step 2: The data loading and preprocessing module loads the monitoring data, calculates the net concentration, identifies continuous valid monitoring periods, and corrects abnormal net concentrations.

[0037] Unified preprocessing was performed on the raw monitoring data of multiple gases and multiple stages. First, the raw data were unified into a time series format, and the concentration data of NH3, CH4, N2O, and CO2 during the ventilation and shutdown stages were extracted. Calculate the net concentration of each characteristic gas to eliminate background gas interference. For C j Abnormal data ≤ 0 (possibly due to instrument drift or environmental interference) are corrected using the mean of nearby valid data. Based on valid status tags for ventilation and cessation, continuous valid monitoring periods are identified, invalid data are removed, and a valid data sequence is provided for subsequent flux calculation.

[0038] like Figure 3 As shown, the specific implementation method of the continuous effective monitoring period identification algorithm is as follows: sort the ventilation stage data by time, where ventilation stage T=Y and ventilation stop stage TR=N, traverse the labels in column T, when the label is Y, mark it as a continuous effective period and assign an incrementing group ID to the period; when the label is 0, terminate the current continuous period and set the group ID to 0; only retain the valid data with group ID ≠ 0.

[0039] Sort the data for the ventilation cessation phase by time, iterate through the TR column labels, and when the label is N, mark it as a continuous valid time period and assign an incrementing group ID; when the label is 0, terminate the current continuous time period and set the group ID to 0; only retain valid data with group ID ≠ 0.

[0040] Step 3: The unit conversion module converts the gas concentration from ppm to mg / m³. 3 .

[0041] Monitoring data is in ppm and needs to be converted to mass concentration (mg / m³) under standard conditions (0℃, 101.325kPa). 3 The conversion formula is: Where ρ is the characteristic gas mass concentration (mg / m³) 3 M represents the molar mass of the characteristic gas (g / mol, NH3: 17.03, CH4: 16.04, N2O: 44.01, CO2: 44.00); 22.414 represents the molar volume of the gas under standard conditions (L / mol). The unit conversion module receives the preprocessed data and, based on the gas molecular weight (e.g., CH4 is 16.04 g / mol) and the standard molar volume of 22.414 L / mol, calculates the conversion factor (16.04 / 22.414) and converts the C... m C b C j Convert the unit from ppm to mg / m³ 3 Generate C j (mg / m 3 The column retains the original grouping information and outputs the converted CSV data.

[0042] Step 4: The ventilation stage flux calculation module calculates the emission flux during the ventilation stage based on the ventilation rate using the trapezoidal integral method.

[0043] In the livestock and poultry farming industry, aerobic composting using silo reactors is the primary method for treating solid manure in large-scale farms. Intermittent aeration, in particular, is widely used due to its economic efficiency, production rationality, and high efficiency, enabling rapid conversion of manure into organic fertilizer, thus achieving resource utilization and increased revenue for enterprises. However, the intermittent aeration characteristic of this mode poses challenges to flux calculations using conventional chamber methods. For flux calculation methods based on gas exchange, the gas exchange between the system and the external environment cannot be monitored during the aeration-stop phase, making it difficult to achieve complete gas emission flux monitoring. For monitoring odor and greenhouse gas emissions during aerobic composting of pig manure, obtaining accurate emission fluxes is crucial for assessing the impact of the production process on air quality. In practical applications, embedding quantitative concentration models into relevant hardware to output precise gas concentrations is a vital prerequisite for subsequent accurate gas emission flux calculations by combining production parameters or atmospheric environmental conditions. Therefore, steps 4 and 5, based on the continuous real-time gas emission concentration collected during the experiment, combined with the equipment parameters of the monitoring system (such as aeration rate, extraction rate, and intermittent time) and parameters such as the weight and reflective area of ​​the compost material, used the self-developed intermittent aeration flux calculation system for the compost reactor to calculate the gas flux of ammonia, methane, nitrous oxide and carbon dioxide generated during the composting process throughout the entire cycle and at all times.

[0044] In this experiment, the total weight of the compost material was 27 kg. The reactor was cylindrical with an effective volume of 100 L and a top cross-sectional area of ​​0.145 m². 2 The reflective area of ​​the compost pile is used as the composting surface area, and the composting cycle lasts 20 days. Gas emission flux is calculated from the start of composting until maturity, meaning only the gas emission flux from the start of composting to maturity is calculated. The maturity index is the seed germination index (GI), and its trend is as follows: Figure 4 As shown in Table 1, the seed germination index was 105.6% on the 13th day of composting, exceeding the 80% maturity criterion. Therefore, the compost was deemed to have reached maturity on the 13th day, and the emission fluxes of ammonia, methane, nitrous oxide, and carbon dioxide during those 13 days were calculated accordingly.

[0045] Table 1. Time variation of compost maturity Tab. 1 Temporal Variation of Compost Maturity

[0046] This study, based on the law of conservation of mass and combined with the process characteristics of intermittent aerobic composting of pig manure involving alternating "aeration-stop" operation, constructs a mass balance system for characteristic gases within the gas collection hood to accurately calculate the emission fluxes of ammonia (NH3), methane (CH4), nitrous oxide (N2O), and carbon dioxide (CO2). The validity of the calculation method relies on the following core process assumptions: Uniform mixing assumption: The gas collection hood is a closed space. During the aeration phase, continuous aeration at the bottom of the reactor creates disturbance. It can be assumed that the characteristic gases inside the hood are fully mixed, and the concentration monitored by the online analyzer can represent the actual concentration inside the gas collection hood. Fa = Fc + Fe = Fp + FR Where Fa is the total target gas emission, Fc is the target gas emission flux extracted by the analyzer, Fe is the target gas emission flux at the exhaust port, Fp is the target gas emission flux introduced into the system when the bottom of the fermenter is ventilated, and FR is the actual target gas emission flux generated by the material inside the fermenter.

[0047] Steady-state volumetric flow assumption: At the minute-level computational scale, the aeration rate of the compost reactor and the extraction rate of the analyzer remain constant, and the volumetric flow rates entering and exiting the gas collection hood satisfy steady-state equilibrium, providing a premise for the linear derivation of the flux formula: Q p =Q c +Q e Among them, Q c Q is the analyzer's pumping rate. e This represents the gas flow rate at the exhaust port.

[0048] The aeration stage flux calculation module reads the aeration stage data after unit conversion, based on the bottom aeration rate Q of the compost reactor. p (0.03m) 3 / min), calculate the instantaneous flux: The trapezoidal integral method was used to integrate the instantaneous flux for each continuous effective time period; where emission = ∫FR(t)dt. The emission flux and monitoring duration for each time period and day were calculated, verifying that the total daily duration did not exceed 1440 minutes. The calculation results were saved in pickle format. m It measures concentration, C b It is the background concentration, C j It is the net concentration.

[0049] Step 5: The flux calculation module for the cessation of ventilation uses the trapezoidal integral method based on the pumping rate to calculate the emission flux during the cessation of ventilation.

[0050] During the aeration stoppage phase, the reactor has no bottom aeration, and the self-generated gas rate of the compost material is much lower than the analyzer's extraction rate. A negative pressure forms inside the gas collection hood, and the background air... s The rate of infiltration, and its flux calculation principle, are consistent with the dynamic chamber method. Based on the law of conservation of mass, the analyzer's extraction flux is composed of the gas production flux of the compost material and the background air infiltration flux. The actual gas production rate during the aeration shutdown phase can be derived as follows: The trapezoidal integral method was used to complete the flux integration for a continuous effective period, calculate the emission flux and monitoring duration for each period and each day, verify the validity of the daily duration, and save the calculation results in pickle format.

[0051] It is recommended to adjust the ventilation interval to a ventilation time / ventilation stop time = 1, and the time of a complete interval cycle should be ≥ 60 min. For example, ventilation for 30 min and ventilation stop for 30 min. When increasing the duration of ventilation, it is recommended to appropriately reduce the ventilation rate (minimum ventilation rate 1.1 YL / min).

[0052] Without turning the compost pile, the aeration rate setting method for the entire cycle is as follows: First, weigh and estimate the total wet weight Y kg of the compost pile material (a mixture of animal manure, plant residues, etc.). Then, the aeration rate is 1.5 Y L / min. This aeration rate remains constant until the compost is fully decomposed. The extraction rate setting method for the aeration stop stage is as follows: The initial extraction rate is 0.9 Y L / min. At this time, as the composting process progresses, the temperature will gradually rise to above 55 degrees Celsius, and the high-temperature period will last for 3-5 days. After that, the pile temperature will drop. When the pile temperature drops to the ambient temperature, adjust the extraction rate to 0.5 Y L / min until the compost is fully decomposed.

[0053] Under turning conditions, the full-cycle aeration rate is set as follows: First, estimate the total wet weight (Y kg) of the compost pile material (a mixture of animal manure, plant residues, etc.). The aeration rate is then 1.5 Y L / min, and this rate remains constant until the compost is fully decomposed. The extraction rate during the aeration cessation phase is set as follows: Initially, the extraction rate is 0.9 Y L / min. As composting progresses, the temperature will gradually rise above 55 degrees Celsius, and this high-temperature period will last for 3-5 days. Afterward, the pile temperature will decrease. When the pile temperature drops to ambient temperature and remains stable for more than 2 hours without a significant temperature rise (the criterion for no significant rise is a temperature increase of less than 10 degrees Celsius within 2 hours), the extraction rate is adjusted to 0.5 Y L / min until the compost is fully decomposed. Aeration Rate L / min ensures sufficient oxygen supply to maintain aerobic microbial activity and degradation efficiency while avoiding excessive ventilation that could lead to rapid moisture loss and material drying and inactivation; while the extraction rate is from Down to The dynamic adjustment adapts to the changing gas production rate of materials at different stages of composting (heating period, high temperature period, cooling and maturation period), enabling the gas extraction rate to be based on the analyzer during the aeration shutdown phase. The flux calculation is closer to actual emissions. The importance of this rate setting is reflected in several aspects: First, it is a key control parameter for the successful stabilization and harmlessness of organic matter in aerobic composting, directly affecting the composting cycle, maturity, and product quality; Second, it directly determines the core flow coefficient of the instantaneous flux calculation formula during the aeration stage. Improper setting will lead to a systematic deviation of the emission flux calculation results from the true value, thereby affecting the accuracy of the odor and greenhouse gas emission inventory; Third, a reasonable combination of aeration and extraction rates can effectively reduce the calculation errors caused by factors such as negative pressure infiltration, airflow short-circuiting, and the system's own gas production volume, improving the robustness of the calculation model based on the law of conservation of mass; Fourth, adopting a method based on material weight... The proportional setting method gives the system good process adaptability and versatility, and it can be quickly migrated to composting reactors of different sizes and materials without modifying the core code to meet the needs of various application scenarios.

[0054] Comparing the formulas for the ventilation stage, the core difference between the calculations in steps 4 and 5 lies in the flow rate parameter: the ventilation stage uses the reactor ventilation rate Q. p During the ventilation cessation phase, the air extraction rate Q of the analyzer is used. c This design precisely matches the gas collection and emission patterns at different stages of intermittent aerated composting.

[0055] Step 6: The results output module merges the results from the two stages and generates a standardized report.

[0056] The results output module loads the flux calculation results from both stages, merges them to generate a daily flux statistics report (including date, flux during ventilation stage, flux during shutdown stage, total daily flux, total monitoring duration, etc.) and a total flux statistics report (including total flux, percentage, total number of data points, total monitoring duration, etc. for each stage); generates a flux accounting summary report, which clarifies the accounting rules, calculation formulas, data statistics, and abnormal data handling, outputs all result files to a specified directory, and records the entire accounting process's running information in the log system.

[0057] The specific implementation method for completing flux integration over a continuous effective time period using the trapezoidal integral method is as follows: E=∑i=1n0.5×(FR(ti)+FR(ti-1))×Δti Where E is the emission flux during that period, FR(ti) is the instantaneous flux at the i-th data point, Δti is the time interval between the i-th and (i-1)-th data points, and i is the nth data point.

[0058] Based on the above-mentioned gas emission flux calculation system and method for intermittent aeration reactor composting scenario, the effectiveness of the present invention is verified by constructing a corresponding gas emission flux calculation system for composting reactors.

[0059] The gas emission flux calculation system for composting reactors of this invention is developed based on Python 3.11, supports operating systems such as Windows and Linux, and depends on Python libraries such as pandas, numpy, and pickle. The hardware operating environment of the system is a desktop computer or industrial control computer with an Intel Core i5 or higher processor, 16GB or more of memory, and 512GB or more of hard disk space. The software development environment is PyCharm 2023 Professional Edition and VSCode, and project dependencies are managed by setuptools 68.2.0.

[0060] This embodiment provides a detailed description of the invention in conjunction with the calculation of methane gas emission flux from a composting reactor: System Deployment and Configuration: Deploy the system code to the runtime environment. Place the monitoring data files "methane emission during ventilation phase.xlsx" and "methane emission during shutdown phase.xlsx" in the inputs directory. Modify the pipeline_config.json configuration file and set the following parameters: gas name CH4, molecular weight 16.04 g / mol, ventilation rate Q. p =0.03m 3 / min, pumping rate Q c =0.015m 3 / min, the integration method is trapezoidal integration, and the time format is DD-MM-YYYYHH:MM:SS.

[0061] System startup: Open Windows PowerShell as an administrator, switch to the system code root directory, and execute the command pythonPipelineController.pypipeline_config.json to start the pipe controller module.

[0062] Configuration loading and initialization: The pipeline controller module loads pipeline_config.json, initializes the logging system, creates the inputs, intermediate, outputs, and logs directories, verifies the existence of the two monitoring data files in the inputs directory, and proceeds to the next step after successful verification.

[0063] Data loading and preprocessing: The Data_loader module reads Excel data from two stages, with standardized column names of time and C. m Cb Parse the time column (T, TR) into DD-MM-YYYYHH:MM:SS format and calculate C. j =C m -C b ; for 28 of them C j Abnormal data with a value ≤0 are replaced with the average of the four most recent valid data points within the same day. Six consecutive Y-periods during the ventilation phase and five consecutive N-periods during the cessation of ventilation phase are identified. Each period is assigned a group ID, and invalid data is filtered out. The ventilation_processed.csv and no_ventilation_processed.csv files are then output to the intermediate directory.

[0064] Unit conversion: The Unit_converter module reads the preprocessed data, calculates the conversion factor 16.04 / 22.414≈0.6556, and converts C... m C b C j Convert from ppm to mg / m 3 Generate C j (mg / m 3 The column outputs ventilation_converted.csv and no_ventilation_converted.csv to the intermediate directory.

[0065] Flux calculation: The Flux_calculator_vent module is based on Q p =0.03m 3 The instantaneous flux during the ventilation phase was calculated at / min, and the flux was integrated over six consecutive time periods using the trapezoidal integration method. This verified that the daily monitoring duration was ≤1440 minutes. The ventilation_flux.pkl file was output to the intermediate directory. The Flux_calculator_novent module is based on Qc=0.015m. 3 The system calculates the instantaneous flux during the cessation of ventilation at a rate of / min, performs integral calculations over five consecutive time intervals, and outputs no_ventilation_flux.pkl to the intermediate directory.

[0066] Output: The Result_exporter module loads the pickle result files from both stages, merges them to generate daily_flux.csv (daily flux statistics) and total_flux.csv (total flux statistics), where the total methane emission flux is XX mg, the proportion during the ventilation stage is XX%, and the proportion during the shutdown stage is XX%. A summary report, flux_summary_report.txt, is generated, recording accounting rules, calculation formulas, data statistics, anomaly handling, and other information. All result files are output to the outputs directory, and log files are output to the logs directory.

[0067] The flux calculation method proposed in this study is designed based on the process characteristics of intermittent aerated aerobic composting of pig manure. This method is grounded in the law of mass conservation, derives the calculation formula based on process assumptions, and achieves automated calculation through an engineering process. To address the gas emission pattern of alternating "aeration-stop" operation, differentiated flow parameters are set in stages. This method reflects the gas exchange characteristics at different stages. In the data preprocessing stage, a triple mechanism is employed: anomaly data correction, effective time period filtering, and monitoring duration verification, to improve the reliability of the calculated data. This method simultaneously calculates the values ​​of four gases: NH3, CH4, N2O, and CO2. Furthermore, the configuration file-driven approach allows for flexible adjustment of flow and gas parameters, facilitating adaptation to different composting reactors and process conditions.

[0068] It should be emphasized that the embodiments described in this invention are illustrative rather than limiting. Therefore, this invention includes, but is not limited to, the embodiments described in the specific implementation. Any other implementations derived by those skilled in the art based on the technical solutions of this invention are also within the scope of protection of this invention.

Claims

1. A gas emission flux calculation system for intermittent aeration reactor composting scenarios, characterized in that: It includes a pipeline controller module, a data loading and preprocessing module, a unit conversion module, a ventilation phase flux calculation module, a shutdown ventilation phase flux calculation module, and a result output module; The pipeline controller module is connected to the data loading and preprocessing module, the ventilation stage flux calculation module, the shutdown ventilation stage flux calculation module, and the result output module, respectively. The data loading and preprocessing module is connected to the unit conversion module. The unit conversion module is connected to the ventilation stage flux calculation module and the shutdown ventilation stage flux calculation module, respectively. The ventilation stage flux calculation module and the shutdown ventilation stage flux calculation module are both connected to the result output module. The pipeline controller module, as the core scheduling unit, loads and parses the JSON configuration file, and calls the other modules in a preset order to realize the automated flow and processing of data. The data loading and preprocessing module loads monitoring data from the ventilation phase and the shutdown phase, calculates the net concentration, identifies the continuous effective monitoring period, and assigns a unique group ID. The unit conversion module is used to convert gas concentration units from ppm to mg / m³. 3 ; The ventilation phase flux calculation module calculates the emission flux during the ventilation phase based on the ventilation rate and using the trapezoidal integral method. The flux calculation module for the shutdown ventilation phase uses the trapezoidal integral method based on the pumping rate to calculate the emission flux during the shutdown ventilation phase. The results output module merges the results of the two-stage calculations and generates a standardized report.

2. A method for calculating the gas emission flux of an intermittent aeration reactor composting system as described in claim 1, characterized in that: Includes the following steps: Step 1: The pipeline controller module loads the JSON configuration file, loads project parameters, initializes the system environment, and validates the input file; Step 2: The data loading and preprocessing module loads the monitoring data, calculates the net concentration, identifies continuous valid monitoring periods, and corrects abnormal net concentrations; Step 3: The unit conversion module converts the gas concentration from ppm to mg / m³. 3 ; Step 4: The ventilation stage flux calculation module calculates the emission flux during the ventilation stage based on the ventilation rate using the trapezoidal integral method. Step 5: The flow rate calculation module for the cessation of ventilation calculates the emission flow rate during the cessation of ventilation stage based on the pumping rate using the trapezoidal integral method. Step 6: The results output module merges the results from the two stages and generates a standardized report.

3. The calculation method for the gas emission flux calculation system in the intermittent aeration reactor composting scenario according to claim 2, characterized in that: The specific implementation method of step 1 is as follows: The pipeline controller module reads the JSON configuration file, loads the project parameters, initializes the log system, creates the inputs, intermediate, outputs, and logs directory structures, and verifies whether the monitoring data files of the ventilation and shutdown phases exist in the specified directory. The project parameters include gas name, molecular weight, and ventilation rate Q. p Analyzer pumping rate Q c And integration methods.

4. The calculation method for the gas emission flux calculation system in the intermittent aeration reactor composting scenario according to claim 2, characterized in that: The specific implementation method of step 2 is as follows: the data loading and preprocessing module reads the monitoring data during the ventilation phase and the ventilation cessation phase, respectively, and standardizes the column names, which include time and measured concentration C. m Background concentration C b Using the T / TR tag, the time column is parsed into time-series data in DD-MM-YYYYHH:MM:SS format, and the net gas concentration is calculated. C j =C m -C b ; For C j For abnormal data with a value ≤0, the average of the four most recent valid data points within the same day is used for replacement and correction. A continuous valid monitoring period identification algorithm is used to assign a unique group ID to each continuous period, filter invalid label segments, and output preprocessed CSV format data.

5. The calculation method for the gas emission flux calculation system in the intermittent aeration reactor composting scenario according to claim 4, characterized in that: The specific implementation method of the continuous effective monitoring period identification algorithm is as follows: sort the ventilation stage data by time, where the ventilation stage T=Y and the cessation of ventilation stage TR=N; traverse the labels in column T; when the label is Y, mark it as a continuous effective period and assign an incrementing group ID to the period. When the tag is 0, the current continuous time period is terminated and the group ID is set to 0; only valid data with group ID ≠ 0 are retained; Sort the data for the cessation of ventilation by time, iterate through the TR column labels, and mark the label as N as a continuous valid time period and assign an incrementing group ID; When the tag is 0, the current continuous time period is terminated, and the group ID is set to 0; Only retain valid data with group ID ≠ 0.

6. The accounting method of the intermittent aeration type reactor composting scenario gas emission flux accounting system according to claim 4, characterized by: The specific implementation method of step 3 is as follows: the unit conversion module receives the preprocessed data, calculates the conversion factor based on the gas molecular weight and standard molar volume of 22.414 L / mol, and converts the measured concentration C in step 2 into the unit conversion factor. m Background concentration C b Net concentration C j Convert the unit from ppm to mg / m³ 3 Generate C j (mg / m 3 The column retains the original grouping information and outputs the converted CSV data.

7. The calculation method for the gas emission flux calculation system in the intermittent aeration reactor composting scenario according to claim 2, characterized in that: The specific implementation method of step 4 is as follows: the aeration stage flux calculation module reads the unit-converted aeration stage data, based on the bottom aeration rate Q of the composting reactor. p Calculate instantaneous flux : ; Q p =Q c +Q e ; Among them, Q p For ventilation rate, C m Q represents the measured concentration. e Q is the gas flow rate at the exhaust port. c C represents the analyzer's pumping rate. j C represents the net concentration of the gas. b To determine the background concentration of the target gas in the environment surrounding the fermenter, the trapezoidal integral method is used to integrate the instantaneous flux for each continuous effective time period; where emission rate = ∫FRdt. The emission flux and monitoring duration for each time period and each day are calculated, and the total daily duration is verified to not exceed 1440 minutes. The calculation results are saved in pickle format.

8. The calculation method for the gas emission flux calculation system in the intermittent aeration reactor composting scenario according to claim 2, characterized in that: The specific implementation method of step 5 is as follows: the flux calculation module for the ventilation stop phase reads the unit-converted ventilation stop phase data, and calculates the flux based on the analyzer's pumping rate Q. c Calculate instantaneous flux : ; Among them, Q c C represents the analyzer's pumping rate. m For the measured concentration, C b C represents the background concentration of the target gas in the environment surrounding the fermenter. j To determine the net gas concentration, the trapezoidal integral method was used to integrate the flux over a continuous effective period. The emission flux and monitoring duration for each period and each day were calculated, and the validity of the daily duration was verified. The calculation results were saved in pickle format.

9. The accounting method of the intermittent aeration type reactor composting scenario gas emission flux accounting system according to claim 2, characterized by: The specific implementation method of step 6 is as follows: the result output module loads the flux calculation results of the two stages, merges them to generate a daily flux statistics report and a total flux statistics report; generates a flux accounting summary report, which clarifies the accounting rules, calculation formulas, data statistics information, and abnormal data handling, outputs all result files to the specified directory, and records the running information of the entire accounting process in the log system.

10. The gas emission flux calculation system and method for intermittent aeration reactor composting scenario according to claim 7 or 8, characterized in that: The specific implementation method for completing flux integration over a continuous effective time period using the trapezoidal integral method is as follows: E=∑i=1n0.5×(FR(ti)+FR(ti-1))×Δti; Where E is the emission flux during that period, FR(ti) is the instantaneous flux at the i-th data point, Δti is the time interval between the i-th and (i-1)-th data points, and i is the nth data point.