Artificial intelligence-based spontaneous power generation water treatment plant power consumption intelligent distribution method

By constructing an equivalent power conversion model for virtual energy storage in the regulating pool, the coordinated control of photovoltaic power generation, energy storage, and the regulating pool was optimized. This solved the problems of fluctuation in photovoltaic power generation and low energy storage efficiency in sewage treatment plants, achieving reasonable allocation and stable operation of electricity and reducing the cost of purchasing electricity from the grid.

CN122246798APending Publication Date: 2026-06-19PENYAO ENVIRONMENTAL PROTECTION

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PENYAO ENVIRONMENTAL PROTECTION
Filing Date
2026-03-23
Publication Date
2026-06-19

Smart Images

  • Figure CN122246798A_ABST
    Figure CN122246798A_ABST
Patent Text Reader

Abstract

This invention relates to the field of intelligent distribution technology, specifically to an intelligent power consumption allocation method for self-generated water treatment plants based on artificial intelligence. The method includes constructing a virtual energy storage equivalent power conversion model for the regulating tank, establishing a mapping relationship between liquid level and equivalent power; predicting photovoltaic power generation based on historical meteorological and power generation data, and planning target liquid level, treatment flow rate, and energy storage charging and discharging strategies for each time period in conjunction with time-of-use pricing; dynamically correcting subsequent operating parameters based on the deviation between actual power generation and predicted values; and adjusting the liquid level according to the adjusted treatment flow rate in conjunction with the influent pump frequency and the effluent gate opening, thereby achieving optimized power consumption allocation and stable operation while ensuring that the effluent water quality meets standards.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent allocation technology, specifically to an intelligent allocation method for power consumption in a self-generating water treatment plant based on artificial intelligence. Background Technology

[0002] Wastewater treatment plants are major energy consumers in urban infrastructure, and their need for energy conservation and consumption reduction is becoming increasingly urgent. To reduce energy consumption and operating costs, more and more wastewater treatment plants are starting to configure distributed photovoltaic power generation systems and energy storage systems.

[0003] In existing self-generated water treatment plants, photovoltaic power generation systems primarily operate on a self-consumption, surplus power grid connection model, while energy storage systems utilize a simple peak-valley arbitrage strategy for charge and discharge control. The operation and control of the wastewater treatment process system are mainly based on influent water quality and effluent standards. Existing energy-saving measures are limited to scheduling the start-up and shutdown periods of single flexible load equipment such as sludge dewatering machines and ultraviolet disinfection equipment; that is, achieving limited power transfer by controlling whether specific equipment operates during a certain period. However, this model of independent system operation and localized scheduling of single components has significant technical shortcomings.

[0004] First, photovoltaic (PV) power generation is significantly intermittent and fluctuating due to factors such as weather and sunlight, while wastewater treatment processes require continuous and stable operation. Current technologies lack effective coordination mechanisms to address the impact of PV power fluctuations on process stability. Second, wastewater treatment plant regulating tanks have significant water storage and buffering capacity, allowing for the adjustment of wastewater storage and treatment sequences within a certain timeframe. However, current technologies do not integrate this buffering capacity with electricity time allocation, failing to achieve energy time-shifting functionality. Third, the power grid implements time-of-use pricing policies, resulting in significant peak-valley price differences. However, current technologies often involve continuous, constant operation of process equipment 24 hours a day, failing to dynamically adjust load distribution based on electricity price periods, leading to high grid purchase costs. Furthermore, existing energy storage control strategies are primarily based on electricity price information and are not deeply coupled with the actual needs of wastewater treatment processes and the real-time status of PV power generation, leaving room for improvement in the utilization efficiency of energy storage systems.

[0005] Therefore, how to coordinate and control photovoltaic power generation, energy storage charging and discharging, regulating tank water storage and process equipment power, and achieve reasonable distribution of electrical energy in the time dimension and among equipment, while ensuring that the effluent water quality meets the standards, is an urgent problem to be solved in this technical field.

[0006] To address this, an intelligent power consumption allocation method for self-generating water treatment plants based on artificial intelligence is proposed. Summary of the Invention

[0007] The purpose of this invention is to provide an intelligent power consumption allocation method for self-generating water treatment plants based on artificial intelligence. By constructing an equivalent power conversion model of virtual energy storage in the regulating tank, the liquid level in the regulating tank and the state of charge of the energy storage system are used as the feasible regulation domain, time-of-use electricity price information and photovoltaic power generation are used as the scheduling guide, and the predicted power demand of process equipment in each time period is used as the constraint condition. The energy storage charging and discharging strategy and the regulating tank water storage strategy are coordinated in a unified manner, so as to achieve optimized power consumption allocation and stable operation under the premise of always ensuring that the effluent water quality meets the standards.

[0008] To achieve the above objectives, the present invention provides the following technical solution: An AI-based intelligent power consumption allocation method for self-generating water treatment plants includes: Establish a virtual energy storage equivalent power conversion model for the regulating tank, measure the current liquid level of the regulating tank and calculate the water storage volume, and obtain the equivalent power based on the power consumption per unit water volume and the water storage volume. Based on historical data, the photovoltaic power generation capacity for each time period is predicted. Combined with time-of-use electricity price information, the target liquid level and target processing flow rate for each time period are planned. The processing flow rate and liquid level are planned. At the same time, the charging and discharging power and charging and discharging sequence are planned based on the target liquid level and target processing flow rate. The actual power generation of the photovoltaic system is collected and compared with the photovoltaic power generation to obtain the deviation rate. Combined with the current liquid level and the adjusted processing flow rate, the processing flow rate and liquid level for subsequent periods are adjusted. The water level is adjusted by controlling the frequency of the inlet pump and the opening of the outlet gate according to the adjusted processing flow rate.

[0009] Preferably, the virtual energy storage equivalent power conversion model includes: collecting cross-sectional area data and tank height data of the regulating tank; measuring the current liquid level of the regulating tank through a liquid level sensor; calculating the water storage volume based on the cross-sectional area data and the current liquid level; reading wastewater treatment power consumption data and corresponding wastewater treatment volume data from historical operation records, performing statistical analysis, and calculating the power consumption per unit volume of water treated; obtaining the equivalent power based on the water storage volume and the power consumption per unit volume of water treated; establishing the correspondence between liquid level and equivalent power to form a virtual energy storage equivalent power conversion model.

[0010] Preferably, predicting photovoltaic power generation for each time period based on historical data includes: collecting historical power generation data, historical irradiance data, and historical temperature data, aligning them according to timestamps, and extracting time feature data and photovoltaic operation feature data; constructing a mapping model between feature data and power generation based on time feature data and photovoltaic operation feature data; collecting current meteorological radar data, satellite cloud image data, and real-time monitoring data from micro-meteorological stations and inputting them into the mapping model, and outputting the predicted photovoltaic power generation for each time period in the future.

[0011] Preferably, the planning of the treatment flow rate and liquid level includes: acquiring time-of-use electricity price data, dividing the day into peak, normal, and valley periods, and acquiring the predicted photovoltaic power generation for each period; calculating the difference between the photovoltaic power generation and the electricity demand for wastewater treatment for each period; acquiring the maximum allowable liquid level and maximum allowable storage time data of the equalization tank; setting a higher target liquid level and reducing the treatment flow rate during valley periods; setting a lower target liquid level and increasing the treatment flow rate during peak periods; setting a higher treatment flow rate during periods with higher predicted photovoltaic power generation; checking whether the target liquid level for each period exceeds the maximum allowable liquid level and whether the storage time exceeds the maximum allowable storage time; adjusting the target liquid level and treatment flow rate that exceed the limits, and generating target liquid level data and target treatment flow rate data for each period that meet the constraints.

[0012] Preferably, the planning of charging and discharging power and charging and discharging sequence includes: acquiring the rated power data, rated capacity data, charging efficiency data, discharging efficiency data, and current state of charge data of the energy storage system; calculating the power demand for wastewater treatment in each time period based on the target processing flow data for each time period; obtaining the power difference between the predicted photovoltaic power generation power and the power demand for wastewater treatment in each time period; marking the time period as a charging period when the power difference is positive and as a discharging period when the power difference is negative; reading the time-of-use electricity price data for each time period; increasing the charging power during off-peak hours and increasing the discharging power during peak hours; reading the current liquid level data, increasing the discharging power of the energy storage system when the liquid level is below a preset liquid level threshold and increasing the charging power of the energy storage system when the liquid level is above a preset liquid level threshold; limiting the range of values ​​for charging power and discharging power based on the upper limit data and lower limit data of state of charge; and generating charging power data, discharging power data, and charging and discharging time data for each time period.

[0013] Preferably, adjusting the processing flow rate and liquid level for subsequent time periods includes: collecting the actual power generation, comparing it with the predicted photovoltaic power generation, and calculating the deviation rate; setting a deviation rate threshold, and when the deviation rate exceeds the threshold, collecting the current liquid level data of the regulating tank and calculating the liquid level deviation between the current liquid level and the target liquid level; setting a future time window, and reading the original processing flow rate data and the original target liquid level data for each time period within the time window; when the actual power generation is greater than the predicted photovoltaic power generation, increasing the processing flow rate data for each time period within the time window and decreasing the target liquid level data for each time period within the time window; when the actual power generation is less than the predicted photovoltaic power generation, decreasing the processing flow rate data for each time period within the time window and increasing the target liquid level data for each time period within the time window; when the current liquid level is greater than the target liquid level, increasing the processing flow rate data for each time period within the time window; when the current liquid level is less than the target liquid level, decreasing the processing flow rate data for each time period within the time window; and outputting the adjusted processing flow rate data and the adjusted target liquid level data for each time period.

[0014] Preferably, controlling the influent pump frequency and the outlet gate opening to regulate the liquid level includes: reading the adjusted treatment flow rate data and the target liquid level data of the regulating tank; collecting the current frequency data of the influent pump, the current opening data of the outlet gate, and the current liquid level data of the regulating tank; calculating the target frequency of the influent pump based on the adjusted treatment flow rate data and the frequency-flow relationship data of the influent pump; calculating the liquid level deviation between the current liquid level and the target liquid level, determining that the liquid level needs to be lowered when the liquid level deviation is positive, and determining that the liquid level needs to be raised when the liquid level deviation is negative; when the liquid level needs to be lowered, increasing the outlet gate opening data and decreasing the target frequency of the influent pump; when the liquid level needs to be raised, decreasing the outlet gate opening data and increasing the target frequency of the influent pump. The system sets the target frequency for the inlet pump, calculates the difference between the inlet and outlet flow rates, and checks whether this difference exceeds the upper limit of the equalization tank's volume change rate. If the difference exceeds the upper limit, it adjusts the target frequency of the inlet pump and the opening of the outlet gate. It then sets the upper and lower limits for the inlet pump frequency and the outlet gate opening. The system checks whether the target frequency and outlet gate opening are within the set range. If they exceed the set range, it restricts the target frequency and outlet gate opening to within the set range. Finally, it calculates the inlet pump frequency control command and the outlet gate opening control command, and outputs these commands.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention establishes a virtual energy storage equivalent power conversion model for the regulating pool, linking liquid level, water volume, and power consumption per unit volume of water treated. This achieves an equivalent mapping between "water volume" and "power consumption," enabling the regulating pool to possess regulation capabilities similar to an energy storage system. This solution quantifies water regulation behavior into calculable equivalent power and coordinates it with photovoltaic power generation and energy storage systems for optimization. It achieves cross-time period power consumption shifting and energy redistribution, thereby increasing the proportion of photovoltaic self-generation consumption, reducing peak-hour power purchases, and improving overall energy utilization efficiency and economy.

[0016] 2. This invention not only constructs a photovoltaic power prediction model based on historical data, meteorological radar data, and satellite cloud imagery, but also dynamically corrects the flow rate and liquid level targets for subsequent periods by collecting actual power generation data in real time and calculating the deviation rate when the deviation exceeds the limit, forming a closed-loop regulation mechanism of "prediction-execution-correction". This solution can effectively cope with the uncertainties caused by photovoltaic power output fluctuations and sudden meteorological changes, reduce energy imbalances or abnormal liquid levels caused by prediction errors, and improve system operation stability and control accuracy.

[0017] 3. This invention compares the actual photovoltaic power generation in real time with the predicted power to calculate the deviation rate. When the deviation rate exceeds a threshold, a dynamic adjustment mechanism is triggered to reschedule the treatment flow rate and target liquid level within the future time window. Simultaneously, based on the deviation between the current liquid level in the regulating tank and the target liquid level, the frequency of the influent pump and the opening of the effluent gate are controlled in a coordinated manner, forming a closed-loop regulation system from the energy side to the process side. This method can promptly correct the operating strategy when photovoltaic power generation fluctuates or prediction errors occur, ensuring a dynamic match between the wastewater treatment load and available power, significantly improving the system's adaptability to renewable energy fluctuations and operational stability. Attached Figure Description

[0018] Figure 1 A schematic diagram of the process for the intelligent power consumption allocation method for self-generating water treatment plants based on artificial intelligence, provided by the present invention; Figure 2 This is a schematic diagram of the logical flow of virtual and real energy storage collaborative scheduling provided by the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.

[0020] Example 1: This embodiment provides an AI-based intelligent power consumption allocation method for self-generating water treatment plants, applicable to wastewater treatment plants equipped with photovoltaic power generation systems, energy storage systems, and equalization tanks. The water treatment plant employs a traditional activated sludge process, with main treatment equipment including influent pumps, aeration blowers, sludge return pumps, and effluent gates.

[0021] Please see Figure 1 This invention provides an intelligent power consumption allocation method for self-generated water treatment plants based on artificial intelligence. The technical solution is as follows: A virtual energy storage equivalent power conversion model for the regulating tank is established; the current liquid level of the regulating tank is measured and the water storage volume is calculated; the equivalent power is obtained based on the power consumption per unit volume of water treatment and the water storage volume; the photovoltaic power generation power for each time period is predicted based on historical data; the target liquid level and target treatment flow rate for each time period are planned in conjunction with time-of-use electricity price information; the treatment flow rate and liquid level are planned; simultaneously, the charging and discharging power and charging and discharging sequence are planned based on the target liquid level and target treatment flow rate; the actual photovoltaic power generation power is collected and compared with the photovoltaic power generation power to obtain the deviation rate; combined with the treatment flow rate adjusted after the current liquid level adjustment, the treatment flow rate and liquid level for subsequent time periods are adjusted; the liquid level is adjusted by controlling the inlet pump frequency and the outlet gate opening based on the adjusted treatment flow rate.

[0022] Furthermore, the virtual energy storage equivalent power conversion model includes: collecting cross-sectional area data and tank height data of the regulating tank; measuring the current liquid level of the regulating tank through a liquid level sensor; calculating the water storage volume based on the cross-sectional area data and the current liquid level; reading wastewater treatment power consumption data and corresponding wastewater treatment volume data from historical operation records, performing statistical analysis, and calculating the power consumption per unit volume of water treated; obtaining the equivalent power based on the water storage volume and the power consumption per unit volume of water treated; establishing the correspondence between liquid level and equivalent power to form the virtual energy storage equivalent power conversion model.

[0023] Specifically, by measuring the length, width, and design depth of the equalization tank, the cross-sectional area and height of the equalization tank are calculated.

[0024] The current liquid level in the regulating tank is measured by a liquid level sensor installed on the inner wall of the regulating tank. The liquid level sensor is an ultrasonic liquid level meter. The liquid level data is collected according to the set sampling interval and transmitted to the central control system. In this embodiment, the sampling interval is five minutes.

[0025] The water storage volume is calculated based on the cross-sectional area data and the current liquid level. Specifically, the cross-sectional area is multiplied by the current liquid level to obtain the current water storage volume of the regulating tank. The water storage volume data is updated in real time when the liquid level changes.

[0026] Retrieves wastewater treatment power consumption data and corresponding wastewater treatment volume data from historical operation records. These historical operation records are stored in a database and contain operation data for the past three months. Each record includes date and time, total power consumption, power consumption for each piece of equipment, and treated volume. The wastewater treatment power consumption data includes the cumulative value of power consumption for various components such as the aeration system, sludge return, and auxiliary equipment.

[0027] Statistical analysis was performed on historical power consumption and water volume data to calculate the power consumption per unit of water volume treated. The total daily power consumption was divided by the corresponding treated water volume to obtain the power consumption per unit of water volume treated. A weighted average was calculated using data from the past three months, with more recent data given higher weights, to obtain a stable parameter for the power consumption per unit of water volume treated.

[0028] Multiplying the water volume by the power consumption per unit volume of water processed yields the equivalent energy. The equivalent energy represents the total electrical energy required to immediately process all the water in the regulating tank. This equivalent energy is a virtual energy indicator used to quantify the energy storage status of the regulating tank and does not represent the actual stored electrical energy.

[0029] A table relating liquid level to equivalent energy capacity was established, forming a virtual energy storage equivalent energy capacity conversion model. This table uses liquid level as the x-axis and equivalent energy capacity as the y-axis; the equivalent energy capacity increases linearly when the liquid level rises and decreases linearly when the liquid level falls. This model transforms the hydraulic buffering capacity of the regulating tank into quantifiable virtual energy storage parameters, facilitating subsequent optimized scheduling.

[0030] Furthermore, predicting photovoltaic power generation for each time period based on historical data includes: collecting historical power generation data, historical irradiance data, and historical temperature data, and aligning them according to timestamps; extracting time feature data, including hourly data, date data, seasonal data, and weather type data; extracting photovoltaic operation feature data, including historical power generation data, irradiance change rate data, and temperature coefficient data for the same period; using the time feature data and photovoltaic operation feature data as inputs to construct a mapping model between feature data and power generation; collecting current weather radar data, satellite cloud image data, and real-time monitoring data from micro-weather stations; inputting the current weather radar data, satellite cloud image data, and real-time monitoring data from micro-weather stations into the mapping model, and outputting the predicted photovoltaic power generation for each future time period; repeatedly collecting real-time monitoring data at set time intervals, updating the parameters of the mapping model, and outputting the updated predicted photovoltaic power generation.

[0031] Specifically, historical power generation data of the photovoltaic array, historical irradiance data from the weather station, and historical temperature data were collected. The historical power generation data came from the photovoltaic inverter's monitoring system, recording the actual hourly power generation of the photovoltaic array. The historical irradiance and temperature data came from the weather station installed in the factory area, recording the hourly changes in solar irradiance and ambient temperature. The data collection spanned the past year.

[0032] Historical power generation data, historical irradiance data, and historical temperature data are aligned according to timestamps. The timestamp formats of each data source are checked, and different formats are converted to a standard time format to ensure that data at the same time can be correctly matched. For time points with missing values, linear interpolation is used to fill in the missing data.

[0033] Extract time-related data, including hourly data, date data, seasonal data, and weather type data. Hourly data represents specific times of day, date data represents specific dates of year, seasonal data is divided into the four seasons of spring, summer, autumn, and winter, and weather type data is categorized based on meteorological records into sunny, cloudy, overcast, and rainy days.

[0034] Extract photovoltaic (PV) operation characteristic data, including historical power generation data for the same period, irradiance variation rate data, and temperature coefficient data. Historical power generation data refers to the statistical value of power generation during the same hour and season in history. Irradiance variation rate data is obtained by calculating the ratio of the difference in irradiance between adjacent moments to the time interval, reflecting the trend of irradiance change. Temperature coefficient data is calculated based on the temperature characteristic parameters of the PV modules and the actual temperature.

[0035] Using time-specific and photovoltaic (PV) operation data as inputs, a mapping model between the feature data and power generation is constructed. This mapping model employs a multi-layer neural network structure, including an input layer, three hidden layers, and an output layer. The number of nodes in the input layer matches the number of input features; in this embodiment, there are fifteen nodes, corresponding to fifteen feature parameters. The first hidden layer contains thirty-two nodes, the second hidden layer contains sixteen nodes, and the third hidden layer contains eight nodes. The output layer contains twenty-four nodes, corresponding to the predicted power generation for the next twenty-four hours. Each hidden layer uses a modified linear unit (MRU) as its activation function, while the output layer uses a linear activation function. The model is trained using historical data, and the weight parameters in the network are continuously adjusted to minimize the error between the predicted and actual values.

[0036] It collects current weather radar data, satellite cloud image data, and real-time monitoring data from micro-weather stations. Weather radar data provides information on cloud echo intensity and movement speed, satellite cloud image data provides information on cloud cover distribution within the region, and real-time monitoring data from micro-weather stations includes parameters such as current irradiance, temperature, humidity, and wind speed.

[0037] The mapping model inputs current meteorological radar data, satellite cloud imagery data, and real-time monitoring data from micro-meteorological stations to output predicted photovoltaic power generation for each future time period. Based on current meteorological information and historical patterns, the mapping model predicts the photovoltaic power generation for each hour within the next 24 hours. The prediction results are output in time-series data format, including the predicted power values ​​for each time period.

[0038] Real-time monitoring data is repeatedly collected at set time intervals to update the parameters of the mapping model and output updated photovoltaic power generation predictions. Real-time data is re-collected every fifteen minutes, and the latest measured power generation is compared with the predicted value to calculate the prediction error. Based on the prediction error, the model parameters are adjusted online, and incremental learning is used to update some network weights to improve prediction accuracy. The updated model then outputs new photovoltaic power generation predictions for future time periods.

[0039] Furthermore, the planning of treatment flow rate and liquid level includes: acquiring time-of-use electricity price data, dividing the day into peak, normal, and valley periods; acquiring the predicted photovoltaic power generation for each period; calculating the difference between photovoltaic power generation and wastewater treatment electricity demand for each period; acquiring the maximum allowable liquid level and maximum allowable storage time data of the equalization tank; setting a higher target liquid level and reducing the treatment flow rate during valley periods; setting a lower target liquid level and increasing the treatment flow rate during peak periods; setting a higher treatment flow rate during periods with higher predicted photovoltaic power generation; checking whether the target liquid level for each period exceeds the maximum allowable liquid level and whether the storage time exceeds the maximum allowable storage time; adjusting the target liquid level and treatment flow rate that exceed the limits to generate target liquid level data and target treatment flow rate data for each period that meet the constraints.

[0040] Specifically, time-of-use (TOU) electricity price data is obtained, dividing the day into peak, normal, and off-peak periods. The TOU data is obtained from the power grid company and includes the electricity price standards for each period. In this embodiment, a 24-hour day is divided into four periods: peak, mid-peak, normal, and off-peak.

[0041] The photovoltaic power generation forecast values ​​for each time period are obtained, and the photovoltaic power generation forecast values ​​for the next 24 hours are organized by time period to obtain the predicted power generation data for each time period.

[0042] Calculate the difference between photovoltaic (PV) power generation and wastewater treatment electricity demand for each time period. First, estimate the wastewater treatment electricity demand for each time period, based on historical average load and projected inflow. Then, compare the projected PV power generation for each time period with the electricity demand and calculate the difference. A positive difference indicates surplus PV power generation; a negative difference indicates insufficient PV power generation, requiring the purchase of electricity from the grid or discharge from the energy storage system.

[0043] Obtain the maximum allowable liquid level and maximum allowable water storage time data of the equalization tank. The maximum allowable liquid level is determined by the design parameters of the equalization tank, typically 90% of the design tank depth, to allow for a safety margin. The maximum allowable water storage time is determined according to the wastewater treatment process requirements; in this embodiment, it is set to twelve hours. Exceeding this time may cause anaerobic acidification of the wastewater, generating malodorous gases and affecting subsequent treatment effects.

[0044] By setting a higher target liquid level during off-peak hours and reducing the treatment flow rate, more wastewater can be stored in the equalization tank due to lower electricity prices during off-peak hours. This stored wastewater can then be used during peak hours, avoiding the need to treat large quantities of wastewater during periods of high electricity prices. Specifically, during off-peak hours, the target liquid level is set to a higher value, while the frequency of the influent pump and the opening of the effluent gate are reduced to decrease the treatment flow rate.

[0045] By setting a lower target liquid level during peak hours and increasing the treatment flow rate, and by storing wastewater in advance during off-peak hours when electricity prices are higher, the treatment capacity can be increased during peak hours to quickly lower the liquid level in the equalization tank, thus achieving energy shifting in wastewater treatment. Specifically, during peak hours, the target liquid level is set to a lower value, the frequency of the influent pump and the opening of the effluent gate are increased, and the treatment flow rate is increased.

[0046] Set a higher processing flow rate during periods of high predicted photovoltaic power generation. When photovoltaic power generation is abundant, prioritize the consumption of photovoltaic energy to reduce the purchase of electricity from the grid. During periods of high predicted photovoltaic power generation, increase the processing flow rate, aeration intensity, and sludge return flow to maximize the utilization of photovoltaic power generation and improve the photovoltaic self-consumption rate.

[0047] Check whether the target liquid level for each time period exceeds the maximum allowable liquid level, and check whether the water storage time exceeds the maximum allowable water storage time. Iterate through the target liquid level data for each time period and check whether it exceeds the maximum allowable liquid level one by one. At the same time, calculate the cumulative water storage time of sewage in the equalization tank and check whether it exceeds the twelve-hour limit.

[0048] During the planning process, it is also necessary to ensure water balance constraints. Based on historical influent patterns and current influent flow rates, the total influent volume for the next 24 hours is predicted. The sum of the treatment flow rates for each time period must equal the predicted total influent volume to ensure that the level in the equalization tank returns to a reasonable level by the end of the day. When optimized scheduling results in an imbalance between the total treatment capacity and the total influent volume, the treatment flow rates for each time period are adjusted proportionally to achieve water balance.

[0049] Adjust the target liquid level and treatment flow rate that exceed the limits to generate target liquid level and target treatment flow rate data for each time period that meet the constraints. For time periods exceeding the maximum allowable liquid level, lower the target liquid level for that period and increase the treatment flow rate accordingly. For cases where the water storage time exceeds the limit, increase the treatment flow rate in the period before the timeout to accelerate the liquid level drop and ensure that wastewater does not remain in the equalization tank for too long. After adjustments, the target liquid level and target treatment flow rate data for each time period are generated, which meet both the electricity price optimization objective and the process safety constraints.

[0050] Furthermore, the planned charging and discharging power and charging and discharging sequence are referenced. Figure 2This includes: acquiring rated power data, rated capacity data, charging efficiency data, discharging efficiency data, and current state of charge data of the energy storage system; calculating the power demand for wastewater treatment in each time period based on the target processing flow data for each time period; comparing the predicted photovoltaic power generation power for each time period with the power demand for wastewater treatment, and calculating the power difference for each time period; marking the time period as a charging period when the power difference is positive, and marking the time period as a discharging period when the power difference is negative; reading the time-of-use electricity price data for each time period; increasing the charging power during off-peak hours and increasing the discharging power during peak hours; reading the current liquid level data, increasing the discharging power of the energy storage system when the liquid level is below the preset liquid level threshold, and increasing the charging power of the energy storage system when the liquid level is above the preset liquid level threshold; limiting the range of charging power and discharging power values ​​based on the upper limit and lower limit of the state of charge data; and generating charging power data, discharging power data, and charging / discharging time data for each time period.

[0051] Specifically, the system acquires the rated power data, rated capacity data, charging efficiency data, discharging efficiency data, and current state of charge (SOC) data of the energy storage system. The rated power data represents the maximum charging and discharging power of the energy storage system, while the rated capacity data represents the total amount of electricity the system can store. The charging and discharging efficiency data reflect the energy loss during the charging and discharging process. The current SOC data represents the percentage of the energy storage system's rated capacity currently available, obtained through real-time monitoring by the battery management system.

[0052] The power demand for wastewater treatment in each time period is calculated based on the target treatment flow rate data for each time period. The target treatment flow rate for each time period is then substituted into the wastewater treatment power calculation model. This model calculates the power demand of each treatment device based on parameters such as treatment flow rate, aeration demand, and sludge return flow rate, and the total power demand for each time period is obtained by summing them up.

[0053] The predicted photovoltaic power generation for each time period is compared with the power demand for wastewater treatment, and the power difference for each time period is calculated. For each time period, the power difference for that time period is obtained by subtracting the power demand for wastewater treatment from the predicted photovoltaic power generation.

[0054] A positive power difference indicates a charging period, while a negative power difference indicates a discharging period. A positive power difference means that the photovoltaic power generation exceeds the electricity demand, and the surplus energy can be used to charge the energy storage system. A negative power difference means that the photovoltaic power generation is less than the electricity demand, requiring the energy storage system to discharge to supplement the power gap, or the system to purchase electricity from the grid.

[0055] Read time-of-use (TOU) electricity price data for each time period. Based on the TOU data, extract the corresponding electricity price level for each time period. Increase charging power during off-peak hours and increase discharging power during peak hours. During off-peak hours, even if photovoltaic power generation is insufficient, prioritize using low-priced grid electricity to charge the energy storage system, preparing for discharging during subsequent peak hours. During peak hours, prioritize discharging the energy storage system to reduce the purchase of high-priced electricity from the grid. Through this peak-valley arbitrage strategy, reduce the overall electricity purchase cost.

[0056] The system reads the current liquid level data and increases the discharge power of the energy storage system when the liquid level is below a preset threshold, and increases the charging power when the liquid level is above the preset threshold. This strategy achieves coordinated scheduling of virtual energy storage and battery energy storage. Virtual energy storage affects the temporal distribution of electricity demand for wastewater treatment by adjusting the liquid level and processing flow rate, thereby indirectly regulating the timing of the system's power consumption. Battery energy storage directly compensates for the power difference between photovoltaic power generation and electricity demand through charging and discharging. When the liquid level in the regulating tank is low, the adjustable capacity of the regulating tank is limited, and the adjustment capability of virtual energy storage is weakened. In this case, increasing the discharge power of battery energy storage allows for a rapid response to fluctuations in electricity demand. When the liquid level in the regulating tank is high, the regulating tank has a large adjustable capacity, and the adjustment capability of virtual energy storage is strong. It can adjust electricity demand by increasing or decreasing the processing flow rate. In this case, virtual energy storage is prioritized for energy time shifting, reducing the frequent charging and discharging of battery energy storage, extending battery life, and reserving adjustment margin for battery energy storage, enabling rapid response even during sudden changes in photovoltaic power.

[0057] Based on the upper and lower limits of the state of charge (SOC), the range of charging and discharging power is limited. The upper limit of SOC is typically set at 90% of the rated capacity, and the lower limit at 20% of the rated capacity, to avoid overcharging or over-discharging damage to the battery. When the SOC approaches the upper limit, the charging power is reduced; when the SOC approaches the lower limit, the discharging power is reduced.

[0058] The system generates charging power data, discharging power data, and charging / discharging time data for each time period. Taking into account power differences, time-of-use pricing, liquid level status, and state of charge constraints, the system optimizes the calculation of charging and discharging power for each time period. The charging / discharging time data indicates the operating mode of the energy storage system at each time period—whether it is charging, discharging, or in standby mode. This charging / discharging scheme works in conjunction with the flow rate and liquid level planning schemes to minimize power consumption costs.

[0059] Further, adjusting the processing flow rate and liquid level for subsequent periods includes: collecting the actual power generation of the photovoltaic array; comparing the actual power generation with the predicted photovoltaic power generation and calculating the deviation rate; setting a deviation rate threshold and determining whether the deviation rate exceeds the threshold; when the deviation rate exceeds the threshold, collecting the current liquid level data of the regulating tank; calculating the liquid level deviation between the current liquid level and the target liquid level; setting a future time window and reading the original processing flow rate data and the original target liquid level data for each period within the time window; when the actual power generation is greater than the predicted photovoltaic power generation, increasing the processing flow rate data for each period within the time window and decreasing the target liquid level data for each period within the time window; when the actual power generation is less than the predicted photovoltaic power generation, decreasing the processing flow rate data for each period within the time window and increasing the target liquid level data for each period within the time window; when the current liquid level is greater than the target liquid level, increasing the processing flow rate data for each period within the time window; when the current liquid level is less than the target liquid level, decreasing the processing flow rate data for each period within the time window; and outputting the adjusted processing flow rate data and the adjusted target liquid level data for each period.

[0060] Specifically, the actual power generation of the photovoltaic array is collected. The actual power generation data of the photovoltaic array at the current moment is read in real time through the monitoring interface of the photovoltaic inverter.

[0061] The actual power generation is compared with the predicted photovoltaic power generation to calculate the deviation rate. The deviation rate is calculated by dividing the difference between the actual power generation and the predicted value by the predicted value, and it reflects the accuracy of the prediction.

[0062] A deviation rate threshold is set to determine whether the deviation rate exceeds the threshold. In this embodiment, the deviation rate threshold is set to 10%. When the absolute value of the deviation rate exceeds 10%, the prediction result is considered to have a significant deviation, and an adjustment mechanism needs to be activated.

[0063] When the deviation rate exceeds the deviation rate threshold, the current liquid level data of the equalization tank is collected. The real-time liquid level of the equalization tank is read through the liquid level sensor.

[0064] Calculate the level deviation between the current liquid level and the target liquid level. Compare the current liquid level with the planned target liquid level for the current time period, and calculate the difference between the two to obtain the level deviation.

[0065] A future time window is set, and the original processing flow rate data and original target liquid level data for each time period within this time window are read. In this embodiment, the time window is set to the next four hours, and the time window contains several time periods. The original processing flow rate and original target liquid level for these time periods are read based on the planning results.

[0066] When the actual power generation exceeds the predicted photovoltaic power generation, the processing flow rate data for each period within the time window should be increased, while the target liquid level data for each period within the time window should be decreased. Since the actual photovoltaic power generation exceeds expectations, the surplus photovoltaic energy should be fully utilized to increase wastewater treatment capacity. By increasing the processing flow rate, the electricity load is increased, thereby improving the photovoltaic self-consumption rate. Simultaneously, the target liquid level is lowered to release the buffer capacity of the regulating tank, reserving adjustment space for possible subsequent decreases in photovoltaic output.

[0067] When the actual power generation is less than the predicted photovoltaic power generation, the processing flow rate data for each period within the time window should be reduced, while the target liquid level data for each period within the time window should be increased. Since the actual photovoltaic power generation is lower than expected, electricity demand should be reduced, and the amount of electricity purchased from the grid should be decreased. This is achieved by reducing the processing flow rate and decreasing the electricity load. Simultaneously, the target liquid level should be increased, and some wastewater should be stored in the equalization tank for later treatment, utilizing the virtual energy storage capacity of the equalization tank to address the insufficient photovoltaic power generation.

[0068] When the current liquid level is higher than the target liquid level, increase the processing flow rate data for each time period within the time window. A current liquid level higher than the target liquid level indicates that the equalization tank is overfilled, requiring faster processing to lower the liquid level. By increasing the processing flow rate in subsequent time periods, the liquid level is lowered more quickly, returning to the target value.

[0069] When the current liquid level is lower than the target liquid level, the processing flow rate data for each time period within the time window is reduced. A current liquid level below the target liquid level indicates insufficient water storage in the equalization tank, requiring a slowdown in the processing rate to promote a rise in the liquid level. By reducing the processing flow rate in subsequent time periods, the rate of liquid level decline is slowed or the liquid level is encouraged to rise, allowing the liquid level to return to the target value.

[0070] The system outputs adjusted processing flow rate data and adjusted target liquid level data for each time period. Following the above adjustment logic, updated processing flow rate and target liquid level data for future time periods are generated, replacing the original planning scheme.

[0071] The above data collection and adjustment steps are repeated according to the set time cycle. A rolling optimization is performed every fifteen minutes to collect the latest actual power generation and liquid level data, update the scheduling plan for the future time window, and form a closed-loop feedback dynamic adjustment mechanism.

[0072] Furthermore, controlling the influent pump frequency and the outlet gate opening to regulate the liquid level includes: reading the adjusted treatment flow rate data and the target liquid level data of the regulating tank; collecting the current frequency data of the influent pump, the current opening data of the outlet gate, and the current liquid level data of the regulating tank; calculating the target frequency of the influent pump based on the adjusted treatment flow rate data and the frequency-flow relationship data of the influent pump; calculating the liquid level deviation between the current liquid level and the target liquid level; determining that the liquid level needs to be lowered when the liquid level deviation is positive, and determining that the liquid level needs to be raised when the liquid level deviation is negative; when the liquid level needs to be lowered, increasing the outlet gate opening data and decreasing the target frequency of the influent pump; when the liquid level needs to be raised, decreasing the outlet gate opening data and increasing the target frequency of the influent pump. Set the target frequency for the large inlet pump; calculate the difference between the inlet and outlet flow rates and check if this difference exceeds the upper limit of the equalization tank volume change rate; when the difference exceeds the upper limit of the volume change rate, adjust the target frequency of the inlet pump and the opening of the outlet gate; set the upper and lower limits of the inlet pump frequency and the outlet gate opening; check if the target frequency and outlet gate opening data are within the set range; when they exceed the set range, limit the target frequency and outlet gate opening data within the set range; calculate the inlet pump frequency control command and the outlet gate opening control command; output the inlet pump frequency control command and the outlet gate opening control command. Read the adjusted processing flow rate data and the target liquid level data in the equalization tank. Based on the adjusted processing flow rate and target liquid level data, read the values ​​for the current time period.

[0073] The system collects current frequency data of the influent pump, current opening data of the outlet gate, and current liquid level data of the regulating tank. The current frequency data of the influent pump is obtained from the feedback signal of the frequency converter, the current opening data of the outlet gate is obtained from the gate position sensor, and the current liquid level data of the regulating tank is obtained from the liquid level sensor.

[0074] Based on the adjusted processing flow rate data and the frequency-flow rate relationship data of the inlet pump, the target frequency of the inlet pump is calculated. The frequency-flow rate relationship data of the inlet pump records the outflow rate at different frequencies; this relationship is obtained through pump performance curves or actual testing. Based on the target processing flow rate, the corresponding target frequency of the inlet pump is obtained by consulting the frequency-flow rate relationship data table.

[0075] Calculate the level deviation between the current liquid level and the target liquid level. Subtract the target liquid level from the current liquid level to obtain the level deviation value. A positive deviation value indicates that the current liquid level is higher than the target liquid level, and a negative deviation value indicates that the current liquid level is lower than the target liquid level.

[0076] A positive liquid level deviation indicates a need to lower the liquid level, while a negative liquid level deviation indicates a need to raise the liquid level. The direction of liquid level adjustment is determined based on the sign of the liquid level deviation.

[0077] When a decrease in liquid level is required, increase the opening of the outlet gate and decrease the target frequency of the inlet pump. Increasing the outlet gate opening increases the outflow rate and accelerates the drainage speed of the regulating tank. Simultaneously, decreasing the target frequency of the inlet pump reduces the inflow rate and slows down the inflow speed into the regulating tank. By increasing the outflow rate and decreasing the inflow rate, a rapid decrease in liquid level is achieved.

[0078] When a higher liquid level is needed, decrease the outlet gate opening and increase the inlet pump target frequency. Decreasing the outlet gate opening reduces the outflow rate and slows the drainage from the regulating tank. Simultaneously, increasing the inlet pump target frequency increases the inlet flow rate and accelerates the inflow into the regulating tank. By decreasing the outflow rate and increasing the inlet flow rate, a rapid rise in liquid level is achieved.

[0079] Calculate the difference between the influent flow rate and the effluent flow rate, and check whether this difference exceeds the upper limit of the equalization tank's volume change rate. Calculate the influent flow rate based on the influent pump frequency and the effluent flow rate based on the effluent gate opening; subtract the two to obtain the flow rate difference. This flow rate difference reflects the rate of change of the liquid level in the equalization tank. Check whether this difference exceeds the upper limit of the equalization tank's volume change rate, which is a constraint set to prevent excessively rapid changes in liquid level from causing process instability.

[0080] When the difference exceeds the upper limit of the volume change rate, adjust the target frequency of the inlet pump and the opening of the outlet gate. If the flow difference exceeds the upper limit, proportionally reduce the adjustment range of the inlet pump frequency and the outlet gate opening to keep the flow difference within the allowable range.

[0081] Set the upper and lower limits for the inlet pump frequency, and set the upper and lower limits for the outlet gate opening. The upper limit for the inlet pump frequency is the maximum allowable frequency of the frequency converter, usually the rated frequency. The lower limit for the inlet pump frequency is the minimum frequency required to ensure stable pump operation, usually 30% of the rated frequency. The upper limit for the outlet gate opening is the fully open position of the gate, and the lower limit is the minimum opening of the gate, usually not fully closed to avoid blockage.

[0082] Check whether the target frequency of the inlet pump and the opening degree of the outlet gate are within the set range. Compare the calculated target frequency of the inlet pump with the upper and lower frequency limits, and compare the opening degree of the outlet gate with the upper and lower opening limits.

[0083] When the set range is exceeded, the target frequency of the inlet pump and the opening degree of the outlet gate are limited to the set range. If the target frequency of the inlet pump exceeds the upper limit, it is set to the upper limit; if it is below the lower limit, it is set to the lower limit. The same limitation is applied to the opening degree data of the outlet gate.

[0084] The control commands for the inlet pump frequency and the outlet gate opening are calculated. Based on the final determined target frequency of the inlet pump and the outlet gate opening data, combined with the current frequency and current opening, a proportional-integral-derivative (PID) control algorithm is used to calculate the control commands. This algorithm includes three calculation stages: the proportional stage directly calculates the control quantity based on the current deviation, with a larger deviation resulting in a larger control quantity; the integral stage accumulates historical deviations to eliminate steady-state errors; and the derivative stage calculates the control quantity based on the rate of change of the deviation to suppress rapid changes in the deviation and improve system stability. The calculation results of the three stages are multiplied by the corresponding proportional, integral, and derivative coefficients, respectively, and then summed to obtain the final control output. In this embodiment, the proportional, integral, and derivative coefficients for the inlet pump frequency control are determined through process debugging, while the parameters for the outlet gate opening control are set separately.

[0085] The system outputs frequency control commands for the inlet pump and opening control commands for the outlet gate. The calculated control commands are output to the inlet pump frequency converter and the outlet gate actuator. The frequency converter adjusts the operating frequency of the inlet pump according to the frequency control command, and the actuator adjusts the opening of the outlet gate according to the opening control command.

[0086] The above data acquisition and calculation steps are repeated according to the set control cycle. At regular intervals, the process of liquid level acquisition, deviation calculation, control command calculation and output is repeated to form a continuous closed-loop control, so that the liquid level steadily tracks the target liquid level change, while ensuring that the processing flow rate meets the process requirements.

[0087] Through the coordinated execution of the above steps, this invention achieves unified scheduling and optimization of photovoltaic power generation, energy storage charging and discharging, virtual energy storage in the regulating tank, and wastewater treatment processes. This method, while ensuring that the effluent quality meets standards, fully utilizes photovoltaic power generation, rationally allocates battery energy storage, dynamically adjusts the regulating tank level and treatment flow rate, and optimizes the dissolved oxygen setpoint, significantly reducing grid power purchases and total system power consumption, thereby lowering operating costs.

[0088] Example 2: This embodiment, based on Embodiment 1, further provides a rapid response mechanism for energy storage based on photovoltaic power fluctuation and a device start-up and shutdown sequence control scheme based on demand-based electricity pricing optimization. This embodiment also performs the steps of Embodiment 1, including establishing a virtual energy storage equivalent power conversion model for the regulating tank, predicting photovoltaic power generation, planning processing flow rate and liquid level, planning charging and discharging power and timing, adjusting processing flow rate and liquid level in subsequent periods, and controlling the inlet pump frequency and outlet gate opening to regulate the liquid level.

[0089] The energy storage system operates according to the pre-planned charging and discharging power and timing, a method suitable for situations where photovoltaic power fluctuations are stable. However, when the weather changes abruptly, such as rapid cloud movement causing sudden changes in sunlight, photovoltaic power generation can rise or fall sharply in a short period. Operating according to the original charging and discharging plan may not be able to respond promptly to power fluctuations, leading to significant fluctuations in grid power purchases or the inability to promptly absorb surplus photovoltaic power. Therefore, this embodiment incorporates a rapid response mechanism for energy storage based on photovoltaic power fluctuation rates.

[0090] Rapid response of energy storage based on photovoltaic power fluctuation rate: Collect actual photovoltaic power generation data at multiple consecutive time points; calculate the change in photovoltaic power generation between adjacent time points; divide the change in photovoltaic power generation by the time interval to obtain the photovoltaic power change rate; set a threshold for the photovoltaic power change rate; determine whether the absolute value of the photovoltaic power change rate exceeds the threshold; when the absolute value of the photovoltaic power change rate exceeds the threshold, activate the rapid response mode of the energy storage system; in rapid response mode, when the photovoltaic power change rate is negative, control the energy storage system to discharge at the maximum allowable discharge power to compensate for the power gap caused by the decrease in photovoltaic power; in rapid response mode, when the photovoltaic power change rate is positive, control the energy storage system to charge at the maximum allowable charging power to absorb the power surplus caused by the increase in photovoltaic power; monitor the photovoltaic power change rate, and when the absolute value of the photovoltaic power change rate is lower than the threshold, exit the rapid response mode and resume operation according to the planned charging and discharging power and charging and discharging sequence.

[0091] Specifically, the actual power generation data of the photovoltaic array is collected at multiple consecutive time points. In this embodiment, the actual power generation of the photovoltaic array is collected every ten seconds to form continuous power time-series data. The power generation of each string of the photovoltaic array is read and summarized in real time through the communication interface of the photovoltaic inverter.

[0092] Calculate the change in photovoltaic power generation between adjacent time points. Subtract the power generation from the power generation at the previous time point to obtain the change in power. A positive change in power indicates an increase in photovoltaic power generation, while a negative change indicates a decrease in photovoltaic power generation.

[0093] Dividing the change in photovoltaic power generation by the time interval yields the rate of change in photovoltaic power. Since the sampling interval is ten seconds, dividing the power change by ten seconds gives the rate of change in power per second. The unit of the rate of change in photovoltaic power is kilowatts per second, reflecting the speed at which photovoltaic power generation changes.

[0094] A photovoltaic power change rate threshold is set. Based on the system's capacity and the energy storage system's response capability, a photovoltaic power change rate threshold is set. In this embodiment, considering the photovoltaic installed capacity and the maximum charge / discharge power of the energy storage system, the photovoltaic power change rate threshold is equal to the photovoltaic installed capacity multiplied by 5% and then divided by a one-second time interval. When the photovoltaic power change rate exceeds this threshold, it is considered a drastic fluctuation, requiring the activation of a rapid response mechanism.

[0095] Determine if the absolute value of the photovoltaic power change rate exceeds a threshold. Take the absolute value of the calculated photovoltaic power change rate and compare it to the set threshold. Regardless of whether the power increases or decreases sharply, a rapid response is required if the rate of change exceeds the threshold.

[0096] When the absolute value of the photovoltaic power change rate exceeds the photovoltaic power change rate threshold, the energy storage system's fast response mode is activated. The fast response mode is an emergency control mode with higher priority than the day-ahead planned charge / discharge sequence. In fast response mode, the control objective of the energy storage system is to compensate for photovoltaic power fluctuations as quickly as possible and stabilize grid-connected power. When fast response mode is activated, the charge / discharge scheme planned in step four of Example 1 is suspended, and fast response control is executed instead.

[0097] In fast response mode, when the photovoltaic power change rate is negative, it indicates that the photovoltaic power generation is rapidly decreasing, and the system faces a power gap. At this time, the energy storage system is controlled to discharge at its maximum permissible discharge power to compensate for the power gap caused by the decrease in photovoltaic power. The maximum permissible discharge power is determined by the rated power of the energy storage system and its current state of charge, ensuring that the energy storage system outputs electrical energy at its maximum capacity within a safe range. Through the rapid discharge of the energy storage system, electrical energy can be replenished instantly when photovoltaic power decreases, preventing wastewater treatment equipment from shutting down due to insufficient power or requiring large-scale power purchases from the grid.

[0098] In fast response mode, a positive rate of change in photovoltaic (PV) power indicates a rapid increase in PV power generation and a power surplus in the system. At this time, the energy storage system is controlled to charge at its maximum permissible charging power to absorb the power surplus caused by the rise in PV power. The maximum permissible charging power is also determined by the rated power of the energy storage system and its current state of charge. Through rapid charging of the energy storage system, surplus energy can be absorbed instantaneously during periods of rising PV power, improving PV self-consumption rate and mitigating grid fluctuations.

[0099] The system monitors the photovoltaic (PV) power change rate. When the absolute value of the PV power change rate falls below the PV power change rate threshold, it exits the fast response mode and resumes operation according to the planned charging and discharging power and timing. Continuous monitoring of the PV power change rate ensures that the system automatically exits the fast response mode and returns to normal optimized scheduling once the fluctuation subsides. During the fast response mode, the state of charge (SOC) of the energy storage system changes rapidly due to maximum power charging and discharging. Therefore, after exiting the fast response mode, it is necessary to reassess the SOC and adjust the charging and discharging plans for subsequent periods accordingly to ensure that the SOC does not exceed safe limits. This design ensures that the fast response mode is only activated briefly when necessary, avoiding excessive damage to the energy storage system caused by frequent maximum power charging and discharging.

[0100] Through the aforementioned rapid response mechanism for photovoltaic power fluctuations, this embodiment can cope with sudden changes in photovoltaic power on a second-level time scale, ensuring the continuity and stability of electricity consumption for wastewater treatment processes, while maximizing the absorption of photovoltaic power and reducing fluctuations in grid interaction power.

[0101] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for intelligent allocation of power consumption in a self-generating water treatment plant based on artificial intelligence, characterized in that: include: Establish a virtual energy storage equivalent power conversion model for the regulating tank, measure the current liquid level of the regulating tank and calculate the water storage volume, and obtain the equivalent power based on the power consumption per unit water volume and the water storage volume. Based on historical data, the photovoltaic power generation capacity for each time period is predicted. Combined with time-of-use electricity price information, the target liquid level and target processing flow rate for each time period are planned. The processing flow rate and liquid level are planned. At the same time, the charging and discharging power and charging and discharging sequence are planned according to the target liquid level and target processing flow rate. The actual power generation of the photovoltaic system is collected and compared with the photovoltaic power generation to obtain the deviation rate. Combined with the current liquid level and the adjusted processing flow rate, the processing flow rate and liquid level for subsequent periods are adjusted. The water level is adjusted by controlling the frequency of the inlet pump and the opening of the outlet gate according to the adjusted processing flow rate.

2. The intelligent power consumption allocation method for self-generating water treatment plants based on artificial intelligence according to claim 1, characterized in that, The virtual energy storage equivalent power conversion model includes: collecting cross-sectional area data and tank height data of the regulating tank; measuring the current liquid level of the regulating tank through a liquid level sensor; calculating the water storage volume based on the cross-sectional area data and the current liquid level; reading wastewater treatment power consumption data and corresponding wastewater treatment volume data from historical operation records, performing statistical analysis, and calculating the power consumption per unit volume of water treated; obtaining the equivalent power based on the water storage volume and the power consumption per unit volume of water treated; establishing the correspondence between liquid level and equivalent power to form the virtual energy storage equivalent power conversion model.

3. The intelligent power consumption allocation method for self-generating water treatment plants based on artificial intelligence according to claim 1, characterized in that, Predicting photovoltaic power generation for different time periods based on historical data includes: collecting historical power generation data, historical irradiance data, and historical temperature data, aligning them according to timestamps, and extracting time feature data and photovoltaic operation feature data; constructing a mapping model between feature data and power generation based on time feature data and photovoltaic operation feature data; collecting current weather radar data, satellite cloud image data, and real-time monitoring data from micro-weather stations and inputting them into the mapping model to output predicted photovoltaic power generation values ​​for different time periods in the future.

4. The intelligent power consumption allocation method for self-generating water treatment plants based on artificial intelligence according to claim 1, characterized in that, The planning of treatment flow rate and liquid level includes: obtaining time-of-use electricity price data, dividing the day into peak, normal, and valley periods, and obtaining the predicted photovoltaic power generation for each period; calculating the difference between photovoltaic power generation and wastewater treatment electricity demand for each period; obtaining the maximum allowable liquid level and maximum allowable storage time data of the equalization tank; setting a higher target liquid level and reducing the treatment flow rate during valley periods; setting a lower target liquid level and increasing the treatment flow rate during peak periods; setting a higher treatment flow rate during periods with higher predicted photovoltaic power generation; checking whether the target liquid level and storage time for each period exceed the maximum allowable liquid level and storage time; adjusting the target liquid level and treatment flow rate that exceed the limits, and generating target liquid level and target treatment flow rate data for each period that meet the constraints.

5. The intelligent power consumption allocation method for self-generating water treatment plants based on artificial intelligence according to claim 1, characterized in that, The planning of charging and discharging power and timing includes: acquiring rated power data, rated capacity data, charging efficiency data, discharging efficiency data, and current state of charge data of the energy storage system; calculating the power demand for wastewater treatment in each time period based on the target processing flow data for each time period; obtaining the power difference between the predicted photovoltaic power generation power and the power demand for wastewater treatment in each time period; marking the time period as a charging period when the power difference is positive and as a discharging period when the power difference is negative; reading the time-of-use electricity price data for each time period; increasing charging power during off-peak hours and increasing discharging power during peak hours; reading the current liquid level data, increasing the discharging power of the energy storage system when the liquid level is below the preset liquid level threshold and increasing the charging power of the energy storage system when the liquid level is above the preset liquid level threshold; limiting the range of charging and discharging power values ​​based on the upper limit and lower limit of the state of charge data; and generating charging power data, discharging power data, and charging / discharging time data for each time period.

6. The intelligent power consumption allocation method for self-generating water treatment plants based on artificial intelligence according to claim 1, characterized in that, Adjusting the processing flow rate and liquid level for subsequent periods includes: collecting the actual power generation and comparing it with the predicted photovoltaic power generation to calculate the deviation rate; setting a deviation rate threshold, and when the deviation rate exceeds the threshold, collecting the current liquid level data of the regulating tank and calculating the liquid level deviation between the current liquid level and the target liquid level; setting a future time window and reading the original processing flow rate data and the original target liquid level data for each period within the time window; when the actual power generation is greater than the predicted photovoltaic power generation, increasing the processing flow rate data and decreasing the target liquid level data for each period within the time window; when the actual power generation is less than the predicted photovoltaic power generation, decreasing the processing flow rate data and increasing the target liquid level data for each period within the time window; when the current liquid level is greater than the target liquid level, increasing the processing flow rate data for each period within the time window; when the current liquid level is less than the target liquid level, decreasing the processing flow rate data for each period within the time window; and outputting the adjusted processing flow rate data and the adjusted target liquid level data for each period.

7. The intelligent power consumption allocation method for self-generating water treatment plants based on artificial intelligence according to claim 1, characterized in that, Controlling the influent pump frequency and outlet gate opening to regulate the liquid level includes: reading the adjusted treatment flow rate data and the target liquid level data of the regulating tank; collecting the current frequency data of the influent pump, the current opening data of the outlet gate, and the current liquid level data of the regulating tank; calculating the target frequency of the influent pump based on the adjusted treatment flow rate data and the frequency-flow relationship data of the influent pump; calculating the liquid level deviation between the current liquid level and the target liquid level, determining that the liquid level needs to be lowered when the liquid level deviation is positive, and determining that the liquid level needs to be raised when the liquid level deviation is negative; when the liquid level needs to be lowered, increasing the outlet gate opening and decreasing the target frequency of the influent pump; when the liquid level needs to be raised, decreasing the outlet gate opening and increasing the influent pump frequency. The system calculates the difference between the influent and effluent flow rates at the target pump frequency, and checks whether this difference exceeds the upper limit of the equalization tank volume change rate. If the difference exceeds the upper limit, the system adjusts the target frequency of the influent pump and the opening of the effluent gate. It then sets the upper and lower limits for the influent pump frequency and the effluent gate opening. The system checks whether the target frequency and effluent gate opening are within the set range. If they exceed the set range, the system restricts the target frequency and effluent gate opening to within the set range. Finally, the system calculates the influent pump frequency control command and the effluent gate opening control command, and outputs these commands.