Livestock breeding manure regeneration treatment method based on feeding carbon-nitrogen balance
By collecting data to predict loads and aligning them by timestamps, a joint uncertainty interval is constructed. A rolling time-domain controller is used to adjust parameters such as carbon sources, which solves the problem of carbon and nitrogen load fluctuations in livestock and poultry manure treatment systems and achieves stable operation of effluent quality and equipment safety.
Patent Information
- Application Number
- CN202611519197.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-29
- Publication Date
- 2026-11-13
AI Technical Summary
Existing livestock and poultry manure treatment systems are unable to adjust carbon and nitrogen loads in real time according to changes in feed formulas, resulting in insufficient or excessive carbon sources, which affects treatment efficiency and energy consumption. Furthermore, they lack a buffer mechanism for sensor failure.
By collecting data on feeding formula, feed intake, and manure flow, the load is predicted and aligned by timestamps to construct a joint uncertainty interval. A rolling time domain controller is used to coordinate the adjustment of carbon source, internal recirculation, aeration, and sludge discharge to achieve real-time adjustment of biochemical treatment parameters. Conservative boundaries and homogenization tanks are used as buffers when sensors fail.
It achieves coverage of load fluctuations caused by changes in feeding, reduces the risk of insufficient or excessive carbon sources, ensures effluent quality and equipment safety, and improves the system's ability to operate continuously under abnormal data conditions.
Smart Images

Figure CN123082452A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of biochemical treatment of livestock and poultry manure and control of reclaimed water reuse, and particularly to a method for reclaiming and treating livestock and poultry manure based on feeding carbon and nitrogen balance. Background Technology
[0002] Livestock and poultry manure typically contains biodegradable organic carbon, ammonia nitrogen, and total nitrogen, requiring homogenization, biochemical denitrification, solid-liquid separation, filtration or membrane treatment, and disinfection before reuse. Existing biological systems mostly control aeration, reflux, and carbon source addition based on fixed influent water quality or a single online concentration.
[0003] Because protein content, energy levels, and fiber ratios vary with feeding formulations and breeding batches, the organic carbon and nitrogen loads in manure exhibit lag and fluctuation. Insufficient carbon sources lead to inadequate denitrification, while excessive carbon sources result in increased effluent chemical oxygen demand and may cause sludge bulking and additional aeration energy consumption. Furthermore, relying solely on single-point water quality feedback makes it difficult to distinguish between load changes and sensor errors.
[0004] Existing methods lack a mechanism to coordinate the adjustment of feed formulation load with real-time water quality of the same batch by timestamp, and also lack rolling control and sensor failure buffering to simultaneously constrain effluent reuse indicators, sludge settling status and equipment change rate under worst load conditions.
[0005] Therefore, there is a need for a livestock and poultry manure recycling method that can coordinately adjust treatment parameters based on the feed carbon-nitrogen balance and the real-time status of manure. Summary of the Invention
[0006] One objective of this invention is to propose a method for the regeneration and treatment of livestock and poultry manure based on feed carbon and nitrogen balance. This method addresses the lag-induced fluctuations in manure carbon and nitrogen loads caused by changes in feed formulations by establishing a closed loop between predicted loads, real-time status, and treatment control. The method first collects feed formulation, feed intake, livestock numbers, manure flow rate, and water temperature, and then calculates predicted loads of bCOD, NH4-N, and TN with time lag. Next, it aligns the water quality, process, and flow data of the homogenization tank inlet, anoxic section, aerobic section, and effluent by timestamp, and performs state smoothing and estimation error calculations to form a biochemical state and a joint uncertainty interval. The influent boundary of a rolling time-domain controller is constructed using the joint uncertainty interval, and the carbon source, internal recirculation, aeration, and sludge discharge control sequences are collaboratively solved under reuse indicators and equipment safety constraints. After solid-liquid separation, membrane separation or filtration, and disinfection, the load conversion parameters, carbon demand interval, and uncertainty boundary are updated based on reuse water indicators and unit energy consumption. When data becomes invalid, a conservative boundary and homogenization tank buffer are switched.
[0007] This invention provides a method for the regeneration and treatment of livestock and poultry manure based on feed carbon-nitrogen balance, comprising: S1, collecting livestock and poultry feed formula, feed intake, stock size, manure flow rate, and water temperature; calculating the predicted loads of biodegradable organic carbon (bCOD), ammonia nitrogen (NH4-N), and total nitrogen (TN) with time lag based on the feed formula, feed intake, and stock size, forming a predicted load sequence; S2, integrating water quality, process, and flow rate data from the inlet, anoxic section, aerobic section, and effluent of the homogenization tank, aligning them with the predicted load sequence according to timestamps, performing state smoothing and estimation error calculations, and forming biochemical state results and joint uncertainties. S3. Determine the carbon demand interval based on the biochemical state results and the joint uncertainty interval, and use the joint uncertainty interval as the boundary input of the biochemical treatment influent to the rolling time domain controller. Solve the control sequence under the effluent reuse index and equipment safety constraints. S4. Coordinately adjust the biochemical treatment control quantity according to the control sequence, and regenerate the treated water to obtain reclaimed water and operating data. S5. Update the converted parameters of the predicted load sequence, the carbon demand interval, and the joint uncertainty interval according to the water quality index and unit energy consumption of the reclaimed water, and use the updated results for the next control cycle.
[0008] Optionally, S1 includes: The crude protein, fermentable carbohydrates, and fiber components in the feed formula are multiplied by the feed intake and the number of animals in stock, respectively. The daily load is obtained by combining the degradation coefficients corresponding to the manure flow rate and water temperature. The daily load is then expanded into a time series by the excretion lag time recorded by batch, and the predicted loads of bCOD, NH4-N, and TN and their batch identifiers are output.
[0009] Optionally, S2 includes: The chemical oxygen demand, total organic carbon, NH4-N, NO3-N, TN, DO, ORP, pH, MLSS, SVI and flow rate at each measuring point are corrected by timestamp, outlier removal and sliding window smoothing. The smoothing results are input into the state estimator to obtain the biochemical state vectors of the anoxic and aerobic sections and the estimation error of each state component. Furthermore, the generation of the joint uncertainty interval includes: pairing the predicted bCOD load and the measured bCOD of the same batch, or the measured bCOD obtained by converting the measured chemical oxygen demand or total organic carbon according to the mapping relationship determined by the calibration sample, as well as the measured NH4-N and TN, with the corresponding predicted load according to the timestamp, calculating the residual between the predicted value and the measured value, taking the residual quantile under the preset coverage probability as the upper and lower bounds of the bCOD, NH4-N and TN residuals respectively, and performing correlation merging on the upper and lower bounds to form the joint uncertainty interval.
[0010] Optionally, S3 includes: The worst-case influent scenario for the controller is constructed using the upper and lower bounds of the carbon demand range. In each prediction time domain, the effects of carbon source addition, internal recirculation, aeration, and sludge discharge on effluent TN, chemical oxygen demand, and SVI are calculated simultaneously. Upper limits for the rate of change of control variables and equipment start-up and shutdown constraints are set, and the control sequence that meets the reuse threshold and has the lowest unit energy consumption is selected.
[0011] Optionally, S4 includes: Synergistic regulation includes: when the ORP in the anoxic zone is lower than the set denitrification window, priority should be given to increasing the carbon source addition or anoxic internal recirculation; when the DO in the aerobic zone is lower than the set nitrification window, the aeration rate should be adjusted; when the SVI continuously exceeds the set sludge settling window, the increase of carbon source should be limited and the sludge discharge rate should be increased. Each adjustment is constrained by the upper limit of the rate of change of the control quantity; Furthermore, the solid-liquid separation is performed by centrifugation or pressure filtration, the membrane separation is performed by ultrafiltration or microfiltration, and the disinfection is performed by ultraviolet light or hypochlorite disinfection. In membrane separation mode, ultrafiltration or microfiltration operating parameters are selected based on membrane pressure difference. In filtration mode, filtration operating parameters are selected based on filter pressure loss or effluent turbidity. The mode switching event is written into the operating data to participate in the energy consumption feedback of the next control cycle.
[0012] Optionally, S5 includes: The feedback vector is constructed using the TN, chemical oxygen demand, turbidity, and microbial indicators after disinfection of the reclaimed water, as well as the unit energy consumption. Based on the feedback vector, the load conversion parameters, the coverage probability of the residual quantile, and the weight of the rolling time domain controller are recursively corrected, and the parameter versions before and after correction are saved. Furthermore, the determination of sensor data failure or failure to pass consistency verification includes at least one of the following: missing data detected within the continuous sampling window, range exceeding the limit, rate of change exceeding the physical limit of the device, or the difference between the same measuring point and adjacent measuring points exceeding the verification threshold. After determination, the most recent valid parameter version is frozen, and the historical quantile boundary of the joint uncertainty interval is used as the conservative boundary. Furthermore, when switching to the conservative boundary, the liquid level in the homogenizing tank is controlled within the preset buffer range, extending the residence time of the feces in the homogenizing tank, and the upper limit of the change rate of external carbon source, aeration, internal recirculation and sludge discharge is tightened to the preset ratio of the normal control cycle until the data consistency test within the continuous sampling window is restored and passed.
[0013] The beneficial effects of this invention are: 1. Align the feed formula's converted load with the real-time water quality of the same batch by timestamp and form a joint uncertainty interval, so that the controller can cover the lag load fluctuations caused by feed changes and reduce the risk of insufficient or excessive carbon source.
[0014] 2. Using the joint uncertainty interval as the influent boundary for rolling time-domain control, while simultaneously constraining the effluent nitrogen and carbon indices, sludge settling status, and equipment change rate, the system achieves coordinated regulation of carbon source, recirculation, aeration, and sludge discharge.
[0015] 3. Update the converted parameters and interval boundaries by using feedback from recycled water quality and unit energy consumption, and adopt conservative boundaries and homogenization pool buffer when sensors fail to improve the system's continuous operation capability under abnormal data conditions. Attached Figure Description
[0016] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of the livestock and poultry manure recycling treatment method based on feeding carbon and nitrogen balance according to the present invention.
[0017] Figure 2 This is a flowchart of the S3 rolling time-domain control solution of the present invention. Detailed Implementation
[0018] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0019] refer to Figure 1 A method for regenerating and treating livestock and poultry manure based on feed carbon-nitrogen balance includes: S1, collecting livestock and poultry feed formula, feed intake, stock size, manure flow rate and water temperature, and calculating the predicted loads of biodegradable organic carbon (bCOD), ammonia nitrogen (NH4-N) and total nitrogen (TN) with time lag based on the feed formula, feed intake and stock size to form a predicted load sequence; S2, integrating the water quality, process and flow data of the inlet, anoxic section, aerobic section and effluent of the homogenization tank, aligning them with the predicted load sequence according to the timestamp, performing state smoothing and estimation error calculation to form biochemical state results and joint uncertainty intervals; S3. Determine the carbon demand interval based on the biochemical state results and the joint uncertainty interval. Use the joint uncertainty interval as the boundary input to the rolling time-domain controller for biochemical treatment influent. Solve the control sequence under the constraints of effluent reuse index and equipment safety. S4. Coordinately adjust the biochemical treatment control quantity according to the control sequence and regenerate the treated water to obtain reclaimed water and operating data. S5. Update the converted parameters, carbon demand interval, and joint uncertainty interval of the predicted load sequence based on the water quality index and unit energy consumption of the reclaimed water. Use the updated results for the next control cycle.
[0020] In this specific embodiment, S1 includes: This specific implementation method is based on a pig farm with four breeding sheds, a homogenization tank, two-stage anoxic and aerobic biochemical tanks and a reclaimed water unit. The data acquisition server reads data from the feeding management system and the inlet flow meter in 15-minute control cycles to establish feeding batch records. The record fields include batch identifier, breeding shed identifier, feeding start time, crude protein mass fraction, fermentable carbohydrate mass fraction, fiber mass fraction, daily feed intake per head, number of pigs, manure flow rate and homogenization tank inlet water temperature. The mass fraction is calculated on a dry basis of feed, and water and minerals other than the three components are not included in the carbon and nitrogen conversion in this step. For natural days Feeding batches, server according to , and Calculate the daily input mass of the three nutrient components, among which... Indicates the first Daily crude protein input mass, in kg / d Indicates the first Daily input of fermentable carbohydrates, in kg / d. Indicates the first Daily fiber input mass, in kg / d Indicates the first Daily effective inventory, in heads. Indicates the first Daily dry matter intake per head, expressed in kg / (head·d). , and The following figures represent the dry basis mass fractions of crude protein, fermentable carbohydrates, and fiber for the corresponding batch, respectively, all dimensionless numbers ranging from 0 to 1, and are date-specific. Determined by the natural day timestamp of the feeding management system; Temperature conversion module The excretion and biodegradability conversion factors of each component were adjusted, among which... Indicates load components Dimensionless conversion factor at measured water temperature This represents the dimensionless reference coefficient calibrated by material balance calculations over 30 consecutive days at 20 degrees Celsius for the same load component. Indicates load components The corresponding temperature correction factor is calibrated and limited to 1.01 to 1.08. Indicates the first The daily average inlet water temperature of the average quality tank, in degrees Celsius. The temperature difference value in the index is obtained by dividing the difference between this water temperature and 20 degrees Celsius by 1 degree Celsius; therefore, the index is dimensionless. (Load component index) Take in sequence , and Corresponding to bCOD, NH4-N, and TN; the server will then The corresponding temperature conversion factors are respectively bound to the three coefficients for fermentable carbohydrates, fiber, and crude protein to bCOD, and so on. The corresponding coefficient is bound to the crude protein to NH4-N coefficient, and the coefficient is then... The corresponding coefficient is bound to the crude protein to TN coefficient. The load conversion module only reads the above-bound temperature correction coefficient. When the temperature exceeds the calibration range of 10 to 35 degrees Celsius, the value is taken according to the nearest boundary temperature and an out-of-bounds flag is written. Load conversion module according to , and The daily-scale load was obtained, among which , and The numbers represent the order of the numbers. Predicted daily bCOD, NH4-N, and TN mass loads, all in kg / d. , and The coefficients, in order, represent the dimensionless coefficients for the conversion of fermentable carbohydrates, fiber, and crude protein into bCOD. and The dimensionless coefficients representing the conversion of crude protein to NH4-N and TN are respectively read from the load conversion parameter table indexed by aquaculture species, age range, and water temperature range. The parameter table is obtained by weighing the same batch of feed, testing the 24-hour mixed sample of manure and sewage, and integrating the flow rate results using bounded least squares fitting, and is saved with the effective date and version number. To ensure that mass load and online concentration are on the same data carrier, the server is configured according to... Calculate the daily average predicted concentration, where Indicates the first Daily load components The predicted concentration, in mg / L. This represents the daily predicted mass load of the same component, in kg / d. Indicates the first Daily cumulative flow of fecal waste, in m³ 3 / d, with a coefficient of 1000 representing kg / m 3 The conversion factor for converting to mg / L is used. When the effective coverage of the flow meter is less than 90% on a given day, the conversion parameters for that day are not updated. Instead, the median flow rate of the same breeding house over the last seven effective days is used to generate a concentration record with a missing measurement mark. The excretion delay module reads each feeding batch. The feeding time and excretion lag time, as determined by the same-dorm tracer test, were calculated according to... The total batch mass is allocated to 15-minute time slots, among which Indicates load components In the time slot The predicted mass load, in kg / h. Indicates from batch The predicted total batch mass, expressed in kg, is calculated by allocating the daily-scale load of that batch according to its proportion of the total dry matter mass fed that day. Indicates batch In the time slot For load components The allocation weights are in units of 1 / h. The weights of all effective time slots are integraled with respect to the hour as 1. Therefore, the quality load of each time slot is strictly recovered with respect to the hour integral to the total predicted quality of the batch. Batch index. From feeding batch records, time slot index The weights are generated by a unified control clock and are based on a discrete kernel centered on the batch discharge lag time and fitted by the residuals of the same historical batch. When there are no batch lag records, the median of the lag times of the four most recent batches in the same breeding house is used. The server writes the batch identifier, aquaculture house identifier, predicted bCOD load and concentration, predicted NH4-N load and concentration, predicted TN load and concentration, water temperature, flow rate, converted parameter version, hysteresis kernel version, and data quality flag for each time slot into the predicted load sequence table. A unique index is established according to the start time of the time slot. When adjacent batches overlap in the same time slot, the load is summed and the contribution details of each batch are retained. This predicted load sequence, along with the batch identifier, is output to S2 for alignment with the measured data at the inlet of the homogenization tank and each biochemical treatment section.
[0021] In this specific embodiment, S2 includes: The state fusion server uses the predicted load sequence output by S1 as the main time axis, and reads records from the inlet, anoxic zone, aerobic zone, and effluent measuring points of the equalization tank every 15 minutes. Record fields include measuring point identifier, sampling time, chemical oxygen demand (COD), total organic carbon (TOC), NH4-N, NO3-N, TN, DO, ORP, pH, MLSS, SVI, and flow rate. The units for concentration are mg / L, DO is mg / L, ORP is mV, pH is dimensionless, MLSS is mg / L, SVI is mL / g, and flow rate is m³ / s. 3 / h, the online instrument timestamp is corrected based on the time synchronization pulse sent by the control server every hour, and the deviation from the main time axis after correction does not exceed 30s; The preprocessing module sets the effective range and physical change rate upper limit for each measuring point, determined by the instrument range, blank sample, and laboratory parallel sample. It first removes records of range out-of-bounds, maintenance status, and change rate out-of-bounds. Then, it takes the median of the effective values of the same index in the same time slot. If the missing value is no more than two consecutive time slots, it uses linear interpolation of adjacent effective values. If the missing value is more than two consecutive time slots, it retains the missing value and submits the state component to the state estimator for prediction. All reasons for removal, original values, and alternative values are written into the data quality table. For indicators that have undergone preprocessing Smooth module Generate sliding smoothing values, where Indicators In the time slot The smoothed value with the same unit as the indicator. Indicators In the time slot The corrected measured value with the same unit as the index. This represents the smoothing value of the previous time slot. Indicators The dimensionless smoothing coefficient, calibrated to minimize the mean square error of the most recent 30-day laboratory parallel samples, is between 0.2 and 0.6. (Index index) Coverage includes chemical oxygen demand, total organic carbon, NH4-N, NO3-N, TN, DO, ORP, pH, MLSS, SVI, and flow rate, with time slot index. Consistent with S1; The state estimator employs a discrete extended Kalman structure, according to... and Update biochemical status, among which Indicates time slot The nine-dimensional predicted state vector before the update. This represents the nine-dimensional state vector updated in the previous time slot. Indicates time slot The updated nine-dimensional state vector has three fixed components in the following order: available carbon (mg COD / L) in the anoxic zone, NO3-N (mgN / L) in the anoxic zone, ORP (mV) in the anoxic zone, MLSS (mgN / L) in the anoxic zone, NH4-N (mgN / L) in the aerobic zone, DO (mg / L) in the aerobic zone, MLSS (mg / L) in the aerobic zone, SVI (mL / g) in the aerobic zone, and the homogenization tank level (%). The homogenization tank level component is recorded and read from the same time slot level gauge. When a level record is missing, it is predicted by the state transition function and a missing flag is retained. This indicates the following parameters in sequence: carbon source addition flow rate (L / h), internal reflux ratio (%), and aeration volume (m³). 3 / h and sludge discharge m 3 The four-dimensional control vector composed of / h This represents a three-dimensional influent load vector composed of bCOD kgCOD / h, NH4-N kgN / h, and TN kgN / h predicted sequentially by S1. This represents the state transition function established based on material balance and first-order nitrification-denitrification kinetics. Its input dimensions are nine, four, and three, respectively, and its output is a nine-dimensional vector with the same order and units as the state vector. This represents the effective smoothed measurement vector for this time slot, sorted by measurement point identifier and index. The unit of each component adopts the index unit corresponding to the first segment of S2. This indicates that the nine-dimensional state is mapped to... Measurement functions with the same dimension, order, and component-by-component units, This represents the Kalman gain matrix of the nine rows multiplied by the effective measurement component sequence of this time slot, where the nth row is the Kalman gain matrix. Line 1 The unit of column element is the first. The unit of the state component divided by the first Each measurement component unit is used to update the increment to match the corresponding state component unit. estimator with Calculate the estimation error for each effective state component, where Indicators In the time slot The estimated residuals and units and indicators same, This represents the measurement function defined in the previous state update segment. Corresponding measuring point identifiers and indicators The output component, whose output unit is the same as that of the same index. same, This indicates the index defined in the segment containing the S2 smoothing formula. In the time slot Smoothing value, This indicates that the previous state update segment is a predicted state vector with a fixed nine-component order and a defined unit. The server combines the updated state value, estimated residual, error covariance diagonal term, data quality flag, and parameter version into a biochemical state result, and writes them into the hypoxic segment state table and the aerobic segment state table respectively. The combined interval module pairs the predicted loads of the same batch with the measured loads at the inlet of the homogenizing tank according to timestamps. If no online bCOD meter is installed at the inlet, it will be set to... Calculated actual bCOD, of which Indicates time slot Measured bCOD concentration, unit: mg / L and These represent the measured chemical oxygen demand (COD) and total organic carbon (TOC) concentrations in the same time slot, respectively, both in mg / L. and This represents the dimensionless mapping coefficient obtained by fitting at least 12 sets of parallel calibration samples of five-day biochemical oxygen demand, chemical oxygen demand, and total organic carbon per week. This represents the mapping intercept, in mg / L. The mapping parameters are indexed by water temperature range and aquaculture batch type. If only one online indicator is valid, the corresponding univariate calibration formula and its independent version number are used. Server load components according to Calculate the paired residuals, where Indicates time slot Loading components The concentration residual, in mg / L. This indicates the actual measured concentration within the same batch, in mg / L. This indicates the predicted concentration of S1 in the same batch, in mg / L, and is the loading component index. Given bCOD, NH4-N, and TN, the server reads the coverage probability of the current parameter version from S5. ,in This indicates the dimensionless joint coverage probability used in this time slot, with an initial value of 0.95 and limited to 0.90 to 0.995. The server, in the most recent 30 days and at least 200 valid paired samples, averages the uncovered probability (obtained by subtracting the current coverage probability) to the upper and lower tails, obtaining the corresponding lower and upper quantiles as the upper and lower bounds of each residual. If there are fewer than 200 valid paired samples, the previous parameter version is frozen and the effective residual quantiles of the same type of livestock shed in the most recent 90 days are used. If there are still fewer than 30 samples, the quantiles of the same field in the most recent 90 days are used and a sample insufficiency flag is added. If the most recent 30 days, the most... If there are no valid residual samples from the same batch and type of breeding shed in the past 90 days, or from the entire farm in the past 90 days, then undefined quantiles or covariances are not calculated. Instead, pre-calibrated and version-numbered engineering conservative boundaries, three-dimensional correlation matrices, and lower limits of residual standard deviations are called. Boundary records are marked as low-confidence sources for initialization and directly passed to S3. If the initialization parameter package does not exist or the version verification fails, a low-confidence initialization status code is output, S3 is paused, the influent flow is limited according to the remaining volume of the homogenization tank, and the homogenization tank buffer or emergency storage is enabled. At the same time, a manual calibration alarm is issued. After obtaining no less than 30 valid windows, the process is switched to recursive quantiles. To preserve the correlation of the three types of load residuals, the server groups each sample containing all three types of residuals into a vector. ,calculate And only retain those that meet the requirements. The joint samples are used to obtain the upper and lower quantile boundaries of each dimension, where Indicates time slot The dimensionless squared Mahalanobis distance of the residual vector This represents a column vector consisting of the residuals of bCOD, NH4-N, and TN, with all three components in mg / L. This represents the transpose of the column vector. This represents the residual covariance matrix calculated from the same 30-day paired sample, with elements in units of (mg / L)². This represents the inverse of the covariance matrix, with elements in units of (L / mg)². This represents the probability of the three-dimensional chi-square distribution covering the current area. The corresponding dimensionless threshold is used when the covariance matrix is not invertible. After reconstruction, substitute the original Mahalanobis distance formula, where This represents a diagonal matrix composed of the standard deviations of the three types of residuals from the most recent effective window, with the units of the diagonal elements being mg / L. This represents the most recently valid version of the three-dimensional dimensionless correlation matrix, after reconstruction. The unit of elements remains (mg / L)². When any of the residual standard deviations is 0, the mg / L value corresponding to the detection limit of the same group of instruments is used as the lower limit of that diagonal term, and the boundaries of each dimension after reconstruction are expanded by 10%. When the effective joint sample number of the three types of residuals is zero, Mahalanobis distance screening is skipped, and the above-mentioned versioned engineering conservative correlation matrix and standard deviation lower limit are directly used. If the matrix is unavailable, the low confidence initialization state is maintained and the output of undefined joint intervals is prohibited. The joint interval module superimposes the predicted concentrations of the current time slot onto the relevant merged residual lower and upper bounds to form a joint uncertainty interval record for bCOD, NH4-N, and TN. The record includes batch identifier, time slot, upper and lower bounds of the three types of loads, lower bound of flow rate, upper bound of flow rate, estimated or calibrated source of flow rate boundary, correlation matrix version, coverage probability, sample size, and anomaly expansion flag. The lower and upper bounds of flow rate are obtained from the effective flow rate samples of the same aquaculture shed in the most recent 30 days according to the lower and upper quantiles of the current coverage probability. When the samples are insufficient, the above-mentioned 90-day or whole-field conservative quantiles are used, and the results of biochemical status in the anoxic and aerobic sections are output to S3 together with the results of biochemical status in the anoxic and aerobic sections for carbon demand interval calculation and rolling time domain controller to construct an influent scenario with flow rate boundary. When there are no effective flow rate samples in the same aquaculture shed or the whole farm, the upper and lower bounds of flow rate adopt the versioned engineering conservative upper and lower bounds in the same parameter package as the above residual boundary and mark the initialization source. When the parameter package is missing, no flow rate boundary is generated, and flow restriction, homogenization tank buffering or emergency storage is performed and manual calibration is awaited. Empty boundaries are not sent to S3.
[0022] In this specific embodiment, S3 includes: The rolling control server reads the biochemical state results and joint uncertainty interval of S2, multiplies the upper and lower bounds of the concentration by the flow rate in the same time slot, and performs the conversion between mg / L and kg / h to obtain the set of joint feasible mass load scenarios under relevant constraints. Press again Calculate additional carbon demand on a scenario-by-scenario basis, among which Indicates time slot A set of joint feasible scenarios including bCOD, NH4-N, TN, and flow quality load fields. Indicates time slot Scene The required COD mass of the external carbon source, in kgCOD / h. This represents the calibration coefficient of bCOD required to remove one unit of TN, expressed in kgCOD / kgN, fitted by nitrogen balance calculations over a continuous 30-day anoxic period and limited to 3.5 to 6.0. Representing a scene TN influent mass load, in kgN / h. Representing a scene bCOD influent mass load, in kgCOD / h, scenario index Traversing a collection Each joint scenario that satisfies the S2 correlation matrix constraint, This means that the result within the parentheses is less than 0, and is therefore set to 0. Controller Press Adjust the carbon requirements for each scenario, and according to and Forming a carbon demand range, in which Indicates time slot Scene The carbon demand, revised based on feedback, is expressed in kgCOD / h. This indicates the time slots provided by the previous effective parameter version of S5. The dimensionless carbon demand range correction factor has an initial value of 1 and a range of 0.80 to 1.20. This represents the uncorrected carbon demand obtained from the previous formula, in kgCOD / h. and They represent time slots respectively. Lower and upper bounds for carbon demand, both in kgCOD / h. Following the previous definition, and These represent the minimum and maximum values after calculating each of the joint feasible scenarios, respectively. Therefore, the combination of high TN and low bCOD will not be mechanically paired and canceled out by the full upper or lower bounds. The controller uses a 30-minute control step and an 8-step prediction time domain. The state vector includes available carbon, NO3-N, ORP, and MLSS in the anoxic zone, NH4-N, DO, MLSS, and SVI in the aerobic zone, as well as the level in the homogenizing tank. The control vector includes the external carbon source flow rate, the internal recirculation ratio in the anoxic zone, the aeration rate, and the sludge discharge flow rate. The disturbance vector includes bCOD, NH4-N, TN influent load, and influent flow rate in the joint uncertainty interval. All state, control, and disturbance fields retain physical units and are divided by the nominal value of the same unit in the parameter table before solving to form dimensionless solution variables. Each 30-minute control step reads the S2 results of two consecutive 15-minute time slots. The concentration and state components are weighted averaged according to the flow rate of the corresponding time slot, and the flow rate and mass load are summed by integrating over the two time slots. The level in the homogenizing tank is taken as the value of the latter time slot. The control command remains unchanged in the two 15-minute time slots, thus forming a state, disturbance, and feedback record that corresponds one-to-one with the prediction step. Within each scene, the controller presses... Recursively predict the state, where Indicates the prediction time domain number Step Scene The dimensionless state vector, This represents the state vector for the next prediction step. This represents the dimensionless state transition matrix obtained by linearizing the material balance model from the most recent effective control cycle at the current state. A dimensionless control matrix representing the influence of carbon source, internal recirculation, aeration, and sludge discharge on the state. Indicates the first Step-dimensional control vector, This represents the 9x3 dimensionless inflow disturbance influence matrix obtained by linearizing the 3D inflow disturbance from the 9-dimensional state at the current operating point. Its source version is consistent with the state transition matrix of the same prediction step. Indicates the first Step Scene The dimensionless inflow boundary vector, prediction step index From 0 to 7, the model matrix is re-identified every 6 hours using the S2 state residuals, and the most recent valid version is used when the verification error exceeds 15%. The effluent prediction module calculates the effluent TN, COD, and SVI based on the state prediction results. It sets effluent TN not exceeding 15 mg / L, COD not exceeding 50 mg / L, and SVI not exceeding 150 mL / g as the reuse and settling constraints for this specific implementation. Equipment safety constraints include a carbon source metering pump flow rate of 0 to 120 L / h, an internal reflux ratio of 100% to 300%, and an air volume of 0 to 1800 m³ / h. 3 / h, sludge discharge flow rate 0 to 20m³ 3 / h, homogenization tank level 20% to 80%, each constraint value is stored in a control constraint table with unit, equipment identification, calibration date and version number; Control variable change rate constraint Settings, where Indicates control quantity In the The physical quantity values of the prediction step, and the units vary with the control quantity type, namely L / h, %, and m. 3 / h and m 3 / h, This represents the physical quantity value of the previous prediction step for the same control variable. Indicates control quantity The maximum allowable change every 30 minutes, with units consistent with the corresponding control variable, and the control variable index. Corresponding sequentially to external carbon source, internal reflux, aeration, and sludge discharge, in this specific embodiment, the upper limits of the four normal change rates are set at 15 L / h, 30 percentage points, and 180 m, respectively. 3 / h and 3m 3 / h, after the pump and fan start and stop, at least two control steps must be run continuously and at least one control step must be stopped continuously; The controller uses the same control sequence for both the jointly feasible scenario and the worst-case scenario reserved according to the unfavorable direction of each constraint, according to... Calculate the dimensionless target value, where This represents the dimensionless comprehensive objective value to be minimized. , and Representing the scene respectively No. The non-negative dimensionless excess amount is obtained by dividing the effluent total nitrogen (TN), chemical oxygen demand (COD), and solid oxygen content (SVI) by their respective upper limits. Indicates the first The dimensionless energy consumption is obtained by dividing the predicted power consumption of aeration, reflux, sludge discharge, and carbon source transport by the nominal power consumption of a single step. This represents the sum of the absolute values of the four control changes divided by their respective upper limits of change. , , , and The weights represent the objective function weights, all of which are dimensionless numbers between 0 and 1. The initial values are set to 0.30, 0.20, 0.15, 0.25 and 0.10 respectively, with a total sum of 1. The weight version is updated from S5. Energy consumption prediction is based on the measured power curve of the equipment, according to The single-step power consumption is obtained, where Indicates the first The device power consumption for the prediction step is expressed in kWh. Indicates equipment The average active power, measured in kW, is obtained from the power curve under the corresponding control command. Indicates the prediction step duration, which is 0.5h in this specific implementation, device index. The system covers carbon source metering pumps, internal reflux pumps, blowers, and sludge pumps. The power curves are fitted by actual measurements at five load levels during the equipment commissioning phase and indexed by equipment number. When no corresponding level is found, linear interpolation between two adjacent levels is used. The power consumption of the single-step equipment is divided by the nominal power consumption of the same step and used as the dimensionless energy consumption input of the aforementioned objective function. The solver employs mixed-integer quadratic programming with integer start-stop variables. For each candidate control sequence, it simultaneously verifies the reuse indicators, equipment range, rate of change, shortest start-stop time, and homogenizing tank level constraints for all retained scenarios. It first eliminates sequences that do not meet the hard constraints for any scenario, then selects the sequence with the smallest objective value from the remaining sequences. If objective values are the same, it selects the sequence with the lowest total control change and the sequence with the lowest initial power consumption. If no feasible sequence is found within the 60-second solution time limit, it first uses the current equipment availability status, actual feedback, and homogenizing tank level. The margin and upper limit of the rate of change are checked against the previous effective first-step control vector. If the check passes, the vector is maintained and the influent flow is limited. If the check fails or the previous effective vector does not exist, the faulty carbon source metering pump, internal reflux pump, blower, or sludge pump is isolated according to the equipment availability status. Safety control values are then generated item by item from the set of actuators that have not been isolated and have feedback: The available carbon source pump will not increase the carbon source; the available internal reflux pump will execute a 150% reflux ratio; the available blower will execute 60% of the rated aeration rate; and the available sludge pump will execute 5m³ / h. 3 / h sludge discharge rate; the faulty actuator still retains the corresponding field in the pending execution vector, writes the safety hold value of the previous valid feedback or the safety bottom value calibrated by the equipment to this field and sets it to a disabled status code and a prohibition flag, S4 maintains the four-field structure to read this status code and does not send it to the faulty equipment; when there is a lack of the execution capability required to maintain the safety of the mixed liquor, directly stop the water intake, enable emergency storage and maintain the available bottom aeration or circulation, and record the isolated equipment, alternative actuator, unexecuted control item, actual safety value, status code and manual review alarm; The control server writes the eight steps of the selected sequence, including external carbon source, internal reflux, aeration and sludge discharge setpoints, upper and lower bound scenario predicted effluent indicators, predicted power consumption, constraint margin, solution status, model version, weight version and effective time, into the control sequence table. Only the first step control vector is sent to S4 for execution. The remaining steps are solved again after reading the new S2 status in the next 30-minute control cycle. The boundary construction module uses the joint uncertainty interval records output by S2 as the inflow boundary data source. For each prediction step, it generates a joint scenario set constrained by the correlation matrix. The scenario record includes batch identifier, effective time, bCOD upper and lower bounds, NH4-N upper and lower bounds, TN upper and lower bounds, flow upper and lower bounds, correlation matrix version, and boundary source. If any field is missing, it calls the historical conservative scenario record with the same fields provided by S5. If the boundary source is historically conservative and the fields are complete, it is accepted directly without backtracking. The controller only performs rolling prediction for scenarios with complete sources and consistent batch identifiers. After the solution is completed, the verifier substitutes each candidate control sequence into the state transition and effluent mapping of all retained scenarios. If any scenario violates the constraint, i.e., effluent TN, chemical oxygen demand, SVI, equipment range, rate of change or start-up / shutdown constraint, the specific violation field is recorded and deleted from the candidate set. If all candidate sequences are deleted, the previous valid first step vector is reviewed in the aforementioned order. If the review fails, the safety control vector, influent flow restriction, emergency storage and manual alarm are executed until a feasible sequence is generated in the next cycle. The deletion and safety handling results are written into the control sequence table for S4 and S5 to track. In this specific embodiment, the state vector field of the rolling time domain controller is fixed as available carbon, NO3-N, ORP, MLSS in the anoxic zone, NH4-N, DO, MLSS, SVI in the aerobic zone, and the level of the homogenizing tank. The control vector field is fixed as the external carbon source flow rate, the internal return ratio in the anoxic zone, the aeration rate, and the sludge discharge flow rate. The prediction period is 30 minutes and the prediction steps are 8. The objective function includes terms such as reclaimed water quality exceeding limits, sludge settling exceeding limits, equipment unit energy consumption, and changes in control quantities. When any prediction scenario violates the hard constraints, candidate sequence deletion is performed. When all candidates are deleted, the previous step vector or safety control branch verified by the current state is executed. The first step control vector and constraint margin output by the solver are used as the execution input of S4.
[0023] In this specific embodiment, S4 includes: The execution controller reads the first step control vector of the current cycle from the S3 control sequence table and executes it accordingly. Generate field instructions, among which Indicates control quantity During the control cycle The issued instruction value, This represents the corresponding optimal value obtained by S3. This represents the actual value fed back from the field in the previous control cycle. This represents the maximum allowable change in the same control variable per cycle in the S3 control constraint table. The units for all three values vary depending on the control variable type: L / h, %, and m. 3 / h and m 3 / h, This indicates that the optimal value is restricted to the same unit upper and lower bounds determined by the latter two parameters; control quantity index. Corresponding to external carbon source, internal recirculation, aeration, and sludge discharge, control cycle index Generated by a unified control clock; the execution controller first checks the device status code of four fixed fields; when a field is disabled, it retains the corresponding safety hold value and prohibits sending to the faulty actuator, records the unexecuted control item and the alternative actuator, and still passes it to the running data packet in a four-field structure; The anoxic control logic uses the 5-minute median value of online ORP and the estimated NO3-N in S2 as feedback. In this specific implementation, the denitrification window is set to -120mV to -50mV. When ORP is below -120mV and NO3-N is above 8mg / L, the carbon source command is increased by one allowable increment within the upper limit of S3 carbon demand. After the carbon source pump reaches the upper limit, the internal reflux ratio is increased by one allowable increment. When ORP is within the window, the S3 command is executed. When ORP is above -50mV and NO3-N is below 3mg / L, the carbon source is no longer increased and the internal reflux command is maintained. All corrections are still processed by the aforementioned command limit relationship. The aerobic section control logic uses the 5-minute median value of DO and the estimated state value of NH4-N as feedback. In this specific implementation, the nitrification DO window is set to 1.5 mg / L to 2.5 mg / L. When DO is lower than 1.5 mg / L or NH4-N is higher than 5 mg / L, the air volume is increased by an allowable increment. When DO is higher than 2.5 mg / L and NH4-N is lower than 1 mg / L, the air volume is decreased by an allowable increment. The sedimentation controller uses three consecutive 15-minute time slots to judge SVI. When SVI exceeds 150 mL / g for three consecutive time slots, the increase of carbon source is restricted and the sludge discharge is increased by an allowable increment until SVI is lower than 130 mL / g for three consecutive time slots, then the original S3 control sequence is restored. Before issuing commands on-site, the unified arbitrator merges the local corrections proposed by the anoxic section, aerobic section, and sedimentation controller. The priorities are as follows: equipment safety and hard constraints on the level of the homogenizing tank, SVI sedimentation protection, nitrification DO and NH4-N adjustment, and denitrification ORP and NO3-N adjustment. If both carbon source increase and carbon source restriction occur simultaneously in the same cycle, sedimentation protection is executed and carbon source increase is prohibited. The merged four commands are re-verified through equipment range, rate of change, minimum start-up and shutdown time, level, and all retained S3 scenarios. Only after the verification is passed will the first step command of S3 be replaced. If the verification fails, the verified first step command of S3 will be retained. If the command is unavailable due to equipment failure, the S3 safety control branch will be executed and the arbitration priority, conflict items, and output status codes will be recorded. If any field has a disabled status code, the arbitrator will not change its safety retention value and will not issue commands to the faulty equipment. It will only perform amplitude limiting and verification on the available fields. The command will be transmitted only after the four fields are structurally complete. The mixed liquor after anoxic and aerobic treatment first enters the solid-liquid separation unit. In this specific implementation, a horizontal screw centrifuge is used in normal mode. The separated concentrated sludge first enters the sludge return tank. The controller sets the retention amount according to the S3 sludge discharge command and the MLSS and SVI status of the aerobic section. The sludge corresponding to the retention amount is returned to the inlet of the anoxic section or the inlet of the aerobic section according to the availability of the return pump to maintain biomass. Only the remaining sludge exceeding the retention amount is sent to the composting unit. When the feed MLSS exceeds 12000mg / L or the centrifuge maintenance mark is valid, the system switches to a plate and frame filter press. In centrifugation mode, the differential speed is adjusted according to the feed flow rate and the target solid phase moisture content. In filter press mode, the feeding ends when the feed pressure reaches 0.6MPa or the filtrate flow rate is 20% lower than the initial value for 10 consecutive minutes. The filtrate enters the intermediate water tank. The sludge return flow rate, retention amount, external remaining amount, mode, feed rate, solid output, running time and power consumption are all written into the operation record. The effluent from the intermediate water tank enters the membrane separation or filtration branch according to the regeneration mode table, and the membrane branch follows... Calculate the membrane pressure difference, where Indicates control cycle The membrane pressure difference, in kPa. Indicates the inlet water pressure of the membrane module. Indicates the concentrate side pressure of the membrane module. This indicates the pressure on the permeate side of the membrane module. All three pressure values are in kPa. The membrane branch is determined according to a mutually exclusive order: if the membrane pressure difference is higher than 120 kPa for two consecutive cycles, permeate production is stopped and backwashing is performed; otherwise, if the membrane pressure difference is higher than 80 kPa, the feed water turbidity is higher than 10 NTU, or the target turbidity of the recycled water is lower than 1 NTU, then the ultrafiltration parameter with a molecular weight cutoff of 100 kDa is selected; only when none of the above conditions are met is the microfiltration parameter with a pore size of 0.1 micrometers selected; if the membrane branch is under maintenance or backwashing is not completed, it will not enter this determination chain and will be handled by the filtration branch. The filtration branch uses a quartz sand filter and the versioned turbidity penalty parameters and backwash trigger threshold issued by S5. The controller reads the pressure difference between the filter inlet and outlet and the turbidity of the effluent. When the pressure drop is not higher than 35 kPa and the turbidity is not higher than 3 NTU, the design filtration rate is maintained at 8 m / h. When the pressure drop exceeds 35 kPa or the turbidity exceeds 3 NTU, the filtration rate is reduced to 5 m / h and the standby filter is started. When the pressure drop reaches the backwash trigger threshold of the current version, the current filter is isolated and backwashed. When the threshold is invalid, a minimum value of 50 kPa is used. Each switch between filtration mode and membrane mode records the mode before and after the switch, trigger index, threshold version, start and end time, water volume processed, and additional power consumption. The separated water enters the disinfection unit. In this specific implementation, ultraviolet disinfection is used when the turbidity is not higher than 1 NTU, and the ultraviolet dose is set to 40 mJ / cm2. When the ultraviolet intensity is lower than 80% of the calibration value or the turbidity is higher than 1 NTU, the system switches to sodium hypochlorite disinfection, with the effective chlorine dosage set to 6 mg / L and a contact time of 30 min. After disinfection, TN, chemical oxygen demand, turbidity, and fecal coliform indicators are collected and accepted according to the versioned reuse judgment table: the two items of TN not higher than 15 mg / L and chemical oxygen demand not higher than 50 mg / L follow the S3 water quality constraints, and the two items of turbidity not higher than 1 NTU and fecal coliform not higher than 100 CFU / L follow the S4 disinfection and regeneration treatment thresholds. If any item fails to reach the corresponding threshold, the permeate water is returned to the intermediate water tank and is not included in the regeneration water production, but the batch, water quality, treated water volume, data quality, control sequence, and original energy consumption value are still saved as unqualified return sample and written into the S5 operation data package. Running data processor Calculate unit energy consumption, where Indicates control cycle Energy consumption per unit of regeneration treatment, in kWh / m³ 3 , Indicates equipment During the control cycle The average active power, in kW. This indicates the actual operating time of the corresponding device during that period, in hours (h). This indicates the volume of qualified recycled water for that cycle, in cubic meters (m³). 3 Device Index The equipment covers biological aeration, reflux, carbon source transport, sludge discharge, solid-liquid separation, membrane or filtration and disinfection. When the qualified water volume is 0, the division method is not performed and the unit energy consumption is recorded as invalid and written as the reason for zero water production. The execution controller sends qualified reclaimed water into the on-site flushing water tank and combines the control commands for each cycle, actual feedback, ORP and DO window status, SVI continuous count, mode of each regeneration unit, mode switching event, water volume, reclaimed water quality, equipment power, unit energy consumption, alarm and threshold version into an operation data packet, and outputs it to S5 along with the reclaimed water batch identifier for feedback correction. The regeneration branch selector compiles candidate branch records based on the current intermediate water tank water quality, membrane pressure difference, filter pressure loss, and equipment availability. It first deletes branches under maintenance or those where backwashing was incomplete in the previous cycle. Then, it filters based on whether the effluent turbidity constraint can be met, predicted unit energy consumption, and remaining treatment capacity. Membrane branch selection uses the same set of thresholds and priorities as the aforementioned decision chain: branches under maintenance or those where backwashing was incomplete are deleted first; if the membrane pressure difference is higher than 120 kPa for two consecutive cycles, only backwashing is retained, and no membrane permeate is generated; otherwise, if the membrane pressure difference is higher than 80 kPa, the influent turbidity is higher than 10 NTU, or the reuse target turbidity is lower than 1 NTU, only ultrafiltration is retained; microfiltration is retained only when none of these conditions are met; if all membrane branches are unavailable, the filtration rate is sorted according to the filter pressure loss and turbidity simultaneously met, and the first feasible rate is selected. If no feasible branch exists, the intermediate water is recirculated, and the reason for the branch's infeasibility is written into the operating data. After the biochemical regulation and regeneration branch selection are completed, the execution controller verifies whether the actual feedback of external carbon source, aeration, internal recirculation and sludge discharge are all within the upper limit of the change rate of S3. If any feedback exceeds the limit, the next cycle increment of the control quantity is frozen and an equipment verification flag is issued. Only when all feedback is qualified is the batch of regenerated water in this cycle confirmed to be valid. The confirmation result and the mode switching event are transmitted to S5 to participate in the energy consumption feedback of the next control cycle. The same batch identifier is associated with the influent load, control sequence, regeneration unit operating time and qualified water production, so that the feed carbon and nitrogen balance conversion result can be traced back to the actual energy consumption of regenerated water along the operation data chain.
[0024] In this specific embodiment, S5 includes: The feedback correction server associates the S4 running data packet with the S1 predicted load, S2 joint uncertainty interval, and S3 control sequence according to the batch identifier of the recycled water, and constructs a feedback vector. The vector fields include effluent TN, chemical oxygen demand, turbidity, fecal coliform count after disinfection, SVI recorded in S4, unit energy consumption, qualified water production, unqualified return water volume, actual values of each control quantity, number of mode switching, and data quality flag. In this specific implementation, the feedback evaluation window is 24 hours continuously. Water quality deviation and control weight updates use qualified reuse samples and unqualified return samples that have passed the data consistency test. Unit energy consumption calculation and qualified production statistics are limited to the control period when the qualified water production is greater than 0. The evaluation module categorizes quality indicators and energy consumption separately. Normalization, in which Indicates feedback window Medium indicators The dimensionless normalized value, This indicates the window indicator. The measured values were weighted according to the corresponding treated water volume, with units varying with the index as mg / L, NTU, CFU / L, mL / g, and kWh / m³. 3, This refers to the evaluation benchmark for the same indicator, and the unit is the same as... Consistent with the previous standards, the S3 reuse threshold was used for TN and COD, the S3 sedimentation constraint was used for SVI, the S4 regeneration treatment threshold was used for turbidity and fecal coliforms, and the median of the most recent 30 effective windows was used for energy consumption per unit. This indicates that the ratio will be limited to 0 to 2, index. The values cover total nitrogen (TN), chemical oxygen demand (COD), turbidity, fecal coliforms, solid volume index (SVI), and energy consumption per unit of energy. The larger the value, the more unfavorable the deviation from the baseline. The load parameter updater re-pairs the measured inlet bCOD, NH4-N, and TN of each batch with the input amounts of S1 nutrient components, according to... Recursive correction and conversion parameters, where Indicates feedback window The three-dimensional dimensionless conversion coefficient vector after completion. This represents the three-dimensional dimensionless coefficient vector in the same order before correction. Updates are performed separately for the three targets bCOD, NH4-N, and TN. The three components of the bCOD target correspond to the conversion coefficients of fermentable carbohydrates, fiber, and crude protein to bCOD in S1, respectively. The first two components of the NH4-N and TN targets are fixed at 0, and the third component corresponds to the conversion coefficients of crude protein to NH4-N and TN, respectively. This represents the dimensionless learning rate selected from the verification errors of the most recent 30 valid windows, and set to 0.02 in this specific implementation. This represents a three-dimensional dimensionless input vector obtained by dividing the input masses of crude protein, fermentable carbohydrates, and fiber by their respective nominal masses and then rearranging them in the order of the target components mentioned above. This represents the dimensionless target value obtained by dividing the current measured target load by the corresponding nominal load. This represents the transpose of the input vector. and These represent the dimensionless lower and upper bound vectors corresponding to the fixed three components of the current target, respectively. Their values are read from the S1 load conversion parameter table according to the aquaculture species, age, water temperature range, and parameter version. This indicates that updates exceeding the limit are truncated and recorded. The interval updater counts whether the three types of measured loads simultaneously fall into the S2 joint uncertainty interval in each feedback window, according to... Corrected residual quantile coverage probability, where This indicates the coverage probability used in the next window. Indicates the current coverage probability. This represents the coverage probability update gain, which is set to 0.10 in this specific implementation. This represents the target joint coverage rate and is set to 0.95. This represents the measured joint coverage of the most recent 30 valid feedback windows; all four values are dimensionless numbers ranging from 0 to 1. This means that the update value will be limited to 0.90 to 0.995. When the measured coverage is lower than the target, the coverage probability will be increased and the range will be expanded. When the coverage is higher than the target, the coverage probability will be reduced but not lower than 0.90. The control weight updater establishes a step-by-step feedback mapping. The TN normalized value is used to update the TN weight of S3, the chemical oxygen demand (COD) normalized value is used to update the COD weight of S3, the SVI normalized value is used to update the sedimentation weight of S3, and the unit energy consumption normalized value is used to update the energy consumption weight of S3. The number of times the actual change rate of the four control variables exceeds the limit is divided by the total number of control executions within the feedback window and limited to 0 to 2, and then used to update the control change weight of S3. The five weights of S3 are updated one by one according to a deterministic update rule: when the normalized feedback value corresponding to the weight is greater than 1, the current weight is increased by 0.02; when it is less than 0.8 and three consecutive feedback windows are established, the current weight is decreased by 0.01; otherwise, the current weight is maintained. It remains unchanged even when any corresponding feedback is invalid. Each weight is first limited to 0 to 1 and then normalized to 1 according to the sum of the five items and the new version is saved. The turbidity normalized value is used to update the turbidity penalty parameter and backwash trigger threshold of S4: when the turbidity normalized value is greater than 1, the turbidity penalty parameter is set to none. The dimensional value increases by no more than 0.02 each time, and the backwash trigger pressure threshold decreases by no more than 2 kPa each time, and is limited to the equipment calibration range of 0 to 1 and 35 to 50 kPa respectively; when the turbidity normalization value is below 0.8 and three consecutive feedback windows are established, the penalty parameter decreases by no more than 0.01 each time, and the backwash threshold increases by no more than 2 kPa each time; the fecal coliform normalization value is used to update the S4 disinfection parameters: when it exceeds 1, if the UV branch is currently used, the UV dose increases by no more than 5 mJ / cm2 each time, and if the sodium hypochlorite branch is currently used, the effective chlorine dosage increases by no more than 0.5 mg / L each time; when it is below 0.8 and three consecutive feedback windows are established, the decreases are no more than 2 mJ / cm2 or 0.2 mg / L respectively, and both the UV dose and effective chlorine dosage are limited to the equipment calibration range; the above parameters are saved in independent versions, the S4 branch directly reads the turbidity penalty parameter and backwash threshold, and the disinfection unit directly reads the UV dose or effective chlorine dosage; Carbon demand range updater The correction factor used in the recursive correction S3 is, where Indicates feedback window The dimensionless carbon demand range correction factor that will take effect in the next cycle after the end of the cycle. This represents the dimensionless correction coefficient in the current valid version, with an initial value of 1. This represents the dimensionless update gain, and in this specific implementation, it is set to 0.05. Indicates feedback window The internal TN normalized value is the dimensionless mean weighted by the treated water volume. This represents the dimensionless mean of the normalized chemical oxygen demand (COD) value for the same window, weighted by the volume of water treated. This means that the updated results will be limited to 0.80 to 1.20. When the deviation of TN increases, the correction coefficient will be increased, while when the deviation of chemical oxygen demand increases, the correction coefficient will be decreased. If there are fewer than eight control periods of valid samples or the consistency test fails, the current coefficient will be kept unchanged. The data consistency monitor uses eight consecutive 15-minute sampling time slots as windows to detect missing flags, upper and lower limits of the measurement range, rate of change between adjacent time slots, and the difference between adjacent measurement points of the same process index for each sensor. If any time slot has missing data, or the value exceeds the equipment's measurement range, or the rate of change exceeds the physical upper limit in the equipment manual, or the difference between adjacent measurement points of the same index exceeds the verification threshold determined by the 99th percentile of 30 days of valid data, then the window is judged as failing. The judgment record includes sensor identifier, trigger condition, original value, threshold, timestamp, and affected state components. When the consistency window fails, the server freezes the most recent valid parameter version, does not perform the aforementioned recursive update, and constructs a complete conservative scenario record from the valid joint intervals of the same aquaculture batch type and water temperature range over the past 90 days. The record fields include, in order, batch type, aquaculture house identifier, current batch identifier mapping key, valid time, lower boundary and upper boundary of the 0.01 historical quantile of bCOD, lower boundary and upper boundary of the 0.01 historical quantile of NH4-N and TN respectively, lower boundary and upper boundary of the 0.01 historical quantile of flow rate, version of the most recent valid correlation matrix, number of samples, and historical conservative source flag. S3 uses the lower boundary of bCOD and the upper boundary of TN in the unfavorable direction of carbon demand and retains the corresponding scenario in the unfavorable direction of other hard constraints. When there are fewer than 30 windows, the server uses the most recent 90 days of records with the same field. The server binds the conservative record to the current batch identifier being processed by the batch type, aquaculture house identifier, and current batch identifier mapping key, and then sends the complete conservative scenario containing the batch identifier, flow boundary, and other fields to S3 without triggering another rollback. If there are no valid joint intervals or flow records for the same batch type and water temperature range in the most recent 90 days, the server uses the versioned engineering initialization method consistent with S2 to initialize the conservative scenario, marks the low confidence initialization source, and binds it to the current batch identifier. If the initialization scenario also does not exist, the server sends a low confidence status code to S3 without sending an empty scenario, maintains flow limiting and buffering or emergency storage in the homogenization tank, suspends parameter recursion and reuse release, and issues a manual calibration alarm until the specified number of valid windows are formed. In conservative mode, the level controller maintains the level in the homogenizing tank within a buffer range of 45% to 70%. By reducing the frequency of the influent pump, the nominal residence time is extended from 6 hours to no less than 8 hours. The upper limits of the change rates of external carbon source, aeration, internal recirculation, and sludge discharge are uniformly tightened to 50% of the upper limit corresponding to the normal control cycle. If the level reaches 70%, the influent is stopped and the influent pump is reduced to the safe lower limit. The homogenizing tank buffer or emergency storage is activated. The four control quantities of S3 are kept within the conservative scenario constraints and the reuse index is not relaxed. The conservative mode is exited after two consecutive eight-time slot windows have no missing, out-of-bounds, out-of-bounds change rate, or out-of-bounds difference between adjacent measuring points. After exiting conservative mode, the server first restores the most recently effective parameter version that was frozen. In the following four control cycles, the upper limit of the rate of change is increased from 50% of the normal value to 100% in increments of 12.5 percentage points per cycle. Then, the recursive correction of the new feedback window is enabled. Finally, the effective load conversion parameters, carbon demand interval correction coefficient, joint uncertainty interval coverage probability, correlation matrix version, S3 controller weight, S4 turbidity penalty and disinfection dose parameters, data quality status and version identifier are written into the closed-loop parameter library. The load conversion parameters are sent to S1, the coverage probability and correlation matrix are sent to S2, the carbon demand interval correction coefficient and controller weight are sent to S3, and the turbidity penalty and disinfection dose parameters are sent to S4 as the sub-parameter inputs for the next control cycle.
[0025] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
[0026] In this invention, the carbon and nitrogen balance information on the feeding side is converted into a load boundary that can be used for biochemical treatment. Real-time water quality performs residual correction on this boundary, and the rolling controller then transmits the boundary to the carbon source, reflux, aeration, and sludge discharge actuators, so that the reclaimed water quality and operating energy consumption form a traceable feedback relationship.
[0027] This invention replaces the adjustment method that relies solely on single-point concentration with batch timestamp alignment, residual quantile intervals, and worst-case load robust control. It also incorporates conservative switching and homogenization pool buffering in case of sensor failure, thus maintaining the feasibility of the processing when the load is uncertain or the data is incomplete.
Claims
1. A method for the recycling and treatment of livestock and poultry manure based on feeding carbon and nitrogen balance, characterized in that, include: S1. Collect livestock and poultry feed formula, feed intake, stock size, manure flow rate and water temperature. Based on the feed formula, feed intake and stock size, calculate the predicted loads of biodegradable organic carbon (bCOD), ammonia nitrogen (NH4-N) and total nitrogen (TN) with time lag, and form a predicted load sequence. S2. The water quality, process and flow data of the inlet, anoxic section, aerobic section and effluent of the homogenizing tank are integrated and aligned with the predicted load sequence according to the timestamp, and state smoothing and estimation error calculation are performed to form the biochemical state results and joint uncertainty interval. The joint interval module pairs the predicted load of the same batch with the measured load at the inlet of the homogenizing tank according to the timestamp, calculates the residual between the predicted value and the measured value, and takes the residual quantile under the preset coverage probability as the upper and lower bounds of the residuals of bCOD, NH4-N and TN, and performs correlation merging on the upper and lower bounds; the joint interval module superimposes the predicted concentration of this time slot with the lower and upper bounds of the residuals after correlation merging, forming a joint uncertainty interval record of bCOD, NH4-N and TN; S3. Determine the carbon demand range based on the biochemical state results and the joint uncertainty range; The rolling control server reads the biochemical state results and joint uncertainty interval of S2, multiplies the upper and lower bounds of the concentration by the flow rate in the same time slot, and performs the conversion between mg / L and kg / h to obtain the set of joint feasible mass load scenarios under relevant constraints. Press again Calculate additional carbon demand on a scenario-by-scenario basis, among which Indicates time slot A set of joint feasible scenarios including bCOD, NH4-N, TN, and flow quality load fields. Indicates time slot Scene The required COD mass of the external carbon source, in kgCOD / h. This represents the calibration coefficient of bCOD required to remove one unit of TN, expressed in kgCOD / kgN, fitted by nitrogen balance calculations over a continuous 30-day anoxic period and limited to 3.5 to 6.
0. Representing a scene TN influent mass load, in kgN / h. Representing a scene bCOD influent mass load, in kgCOD / h, scenario index Traversing a collection Each joint scenario that satisfies the S2 correlation matrix constraint, This means that the result within the parentheses is less than 0, and is therefore set to 0. Controller Press Adjust the carbon requirements for each scenario, and according to and Forming a carbon demand range, in which Indicates time slot Scene The carbon demand, revised based on feedback, is expressed in kgCOD / h. This indicates the time slots provided by the previous effective parameter version of S5. The dimensionless carbon demand range correction factor has an initial value of 1 and a range of 0.80 to 1.
20. This represents the uncorrected carbon demand obtained from the previous formula, in kgCOD / h. and They represent time slots respectively. Lower and upper bounds for carbon demand, both in kgCOD / h. Following the previous definition, and These represent the minimum and maximum values after calculating each of the joint feasible scenarios, respectively. Therefore, the combination of high TN and low bCOD will not be mechanically paired and canceled out by the full upper or lower bounds. A rolling time-domain controller with the joint uncertainty interval as the boundary input of the biochemical treatment influent is used to solve the control sequence under the constraints of effluent reuse index and equipment safety. S4. Based on the control sequence, coordinate the adjustment of the biochemical treatment control quantity and regenerate the treated water to obtain reclaimed water and operation data; S5. Update the converted parameters, carbon demand range, and joint uncertainty range of the predicted load sequence based on the water quality indicators and unit energy consumption of the recycled water, and use the updated results for the next control cycle.
2. The method according to claim 1, characterized in that, S1 includes: The crude protein, fermentable carbohydrates, and fiber components in the feed formula are multiplied by the feed intake and the number of animals in stock, respectively. The daily load is obtained by combining the degradation coefficients corresponding to the manure flow rate and water temperature. The daily load is then expanded into a time series by the excretion lag time recorded by batch, and the predicted loads of bCOD, NH4-N, and TN and their batch identifiers are output.
3. The method according to claim 1, characterized in that, S2 includes: The chemical oxygen demand, total organic carbon, NH4-N, NO3-N, TN, DO, ORP, pH, MLSS, SVI and flow rate at each measuring point are corrected by timestamp, outlier removal and sliding window smoothing. The smoothing results are input into the state estimator to obtain the biochemical state vectors of the anoxic and aerobic sections and the estimation error of each state component.
4. The method according to claim 3, characterized in that, The generation of the joint uncertainty interval includes: pairing the predicted bCOD load and the measured bCOD of the same batch, or the measured bCOD obtained by converting the measured chemical oxygen demand or total organic carbon according to the mapping relationship determined by the calibration sample, as well as the measured NH4-N and TN, with the corresponding predicted load according to the timestamp, calculating the residual between the predicted value and the measured value, taking the residual quantile under the preset coverage probability as the upper and lower bounds of the bCOD, NH4-N and TN residuals respectively, and performing correlation merging on the upper and lower bounds to form the joint uncertainty interval.
5. The method according to claim 1, characterized in that, S3 includes: constructing the worst influent scenario for the controller based on the upper and lower bounds of the carbon demand range; simultaneously calculating the impact of carbon source addition, internal recirculation, aeration, and sludge discharge on effluent TN, chemical oxygen demand, and SVI in each prediction time domain; setting the upper limit of the control variable change rate and equipment start-up and shutdown constraints; and selecting the control sequence that meets the reuse threshold and has the lowest unit energy consumption.
6. The method according to claim 5, characterized in that, The coordinated adjustment in step S4 includes: when the ORP in the anoxic zone is lower than the set denitrification window, priority is given to increasing the carbon source addition or anoxic internal recirculation; when the DO in the aerobic zone is lower than the set nitrification window, the aeration rate is adjusted; when the SVI continuously exceeds the set sludge settling window, the increase of carbon source is restricted and the sludge discharge rate is increased; each adjustment is constrained by the upper limit of the change rate of the control quantity.
7. The method according to claim 4, characterized in that, S5 includes: using the TN, chemical oxygen demand, turbidity, and microbial indicators after disinfection of the reclaimed water, as well as the unit energy consumption, to form a feedback vector; recursively correcting the load conversion parameters, the coverage probability of the residual quantile, and the weights of the rolling time domain controller based on the feedback vector; and saving the parameter versions before and after correction.
8. The method according to claim 7, characterized in that, The determination of sensor data failure or failure to pass the consistency test includes at least one of the following: missing detection data within the continuous sampling window, range exceeding the limit, rate of change exceeding the physical limit of the equipment, or the difference between the same measuring point and adjacent measuring points exceeding the verification threshold; after determination, the most recent valid parameter version is frozen, and the historical quantile boundary of the joint uncertainty interval is used as the conservative boundary.
9. The method according to claim 8, characterized in that, When switching to the conservative boundary, the liquid level in the homogenization tank is controlled within the preset buffer range, the residence time of the feces in the homogenization tank is extended, and the upper limit of the change rate of external carbon source, aeration, internal recirculation and sludge discharge is tightened to the preset ratio of the normal control cycle until the data consistency test within the continuous sampling window is restored and passed.
10. The method according to claim 6, characterized in that, S4 includes: Solid-liquid separation is achieved by centrifugation or pressure filtration, membrane separation is achieved by ultrafiltration or microfiltration, and disinfection is achieved by ultraviolet light or hypochlorite disinfection. In membrane separation mode, ultrafiltration or microfiltration operating parameters are selected based on membrane pressure difference. In filtration mode, filtration operating parameters are selected based on filter pressure loss or effluent turbidity. The mode switching event is written into the operating data to participate in the energy consumption feedback of the next control cycle.
