Climate change self-adaptive elastic urban rainwater garden layout optimization method and system
By collecting data in real time in the rain garden and combining the weighted LSTM model with the physical model, a three-color matrix is constructed for closed-loop feedback. This solves the shortcomings of the traditional rain garden drainage system in flow prediction and pipe diameter adjustment, and achieves more efficient and reliable drainage control.
Patent Information
- Application Number
- CN202510822690.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-06-19
AI Technical Summary
Traditional rain garden drainage control schemes lack the ability to capture the nonlinear laws of time series correlation and multivariable coupling when predicting flow, and the pipe diameter adjustment strategy cannot dynamically calibrate model errors, making it difficult to balance functional implementation and system reliability.
Ultrasonic liquid level sensors and electromagnetic flowmeters are used to collect data in real time, and the LSTM model is combined to predict flow. The physical model and LSTM weighting are used to construct a three-color matrix for closed-loop feedback to achieve pipe diameter adjustment and equipment maintenance.
It improves the robustness of flow prediction and the dynamic adaptability of the system, enhances the drainage resilience of urban rain gardens under extreme climate conditions, dynamically calibrates model parameters and quantifies equipment losses, and solves the error accumulation problem of traditional solutions.
Smart Images

Figure CN120706256A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sponge city drainage optimization, and specifically to a method and system for optimizing the layout of elastic urban rain gardens that are adaptive to climate change. Background Art
[0002] With the acceleration of urbanization, urban rain gardens, as core components of sponge cities, face multiple challenges in their drainage systems, including frequent extreme rainfall and aging pipe network equipment. Traditional rain garden drainage control solutions currently have the following drawbacks: Existing solutions for flow prediction are mostly based on pure physical models. While these models are supported by fluid mechanics theory, they lack the ability to capture nonlinear patterns such as time series correlation and multivariate coupling. Relying solely on data-driven models lacks physical interpretability and is prone to outputting outliers that violate the law of flow conservation. Traditional pipe diameter adjustment strategies are mostly based on fixed thresholds or historical experience, which cannot dynamically calibrate model errors. Furthermore, they do not quantify drainage efficiency and equipment loss indicators, making it difficult to balance functional implementation and system reliability. Therefore, there is an urgent need for a flexible urban rain garden layout optimization method and system that is adaptive to climate change. Summary of the Invention
[0003] In response to the shortcomings of the existing technology, the present invention provides a method and system for optimizing the layout of resilient urban rain gardens that are adaptive to climate change, which solves the problems of poor dynamic adaptability, single model, and lack of closed-loop feedback in traditional solutions.
[0004] To achieve the above objectives, the present invention is implemented through the following technical solutions: A method for optimizing the layout of a resilient urban rain garden that is adaptive to climate change, comprising: Step 1: Install an ultrasonic level sensor at the bottom of the rain garden, and simultaneously connect it to an electromagnetic flowmeter and a weather radar to collect real-time water level, real-time flow data, rainfall intensity, and accumulated rainfall. Step 2: Build a physical model to calculate the theoretical flow and the safe flow constraint interval. Substitute the real-time water level, rainfall intensity, and accumulated rainfall into the LSTM for training, output the predicted flow, and adaptively weight the theoretical flow and the predicted flow to obtain the weighted flow value. Step 3: Based on the weighted flow value, the pipe diameter adjustment amount ΔD is calculated by matching the preset flow threshold value with the rules and performing deviation correction. Step 4: Construct a three-color matrix based on the three-dimensional indicators of prediction accuracy, drainage efficiency, and equipment loss, and implement different feedback strategies according to the three-color matrix.
[0005] As a further solution of the present invention, the Manning formula is selected to calculate the theoretical flow rate of the open channel flow, and the Darcy-Weisbach formula or the Bernoulli equation is selected to obtain the theoretical flow rate of the pressure flow.
[0006] As a further solution of the present invention, the specific steps of training the LSTM traffic prediction model are: Get historical data of three types of sensors; Filter outliers and repair missing values in historical data, and perform normalization using the min-max method; Arrange the data in chronological order to form a four-dimensional dataset containing [water level, rainfall intensity, cumulative rainfall, flow]; For each time point, the water level, rainfall intensity, and cumulative rainfall of the previous 60 / f time steps are extracted and used as the input sequence of the LSTM, and the flow value at the next time point is used as the output, where f is the sampling frequency of the three types of sensors; Divide the dataset chronologically, 70% for training, 20% for validation, and 10% for testing; The mean square error MSE is used as the loss function; Set the basic parameters of the LSTM model and train it to obtain a trained LSTM model; The real-time water level, rainfall intensity, and cumulative rainfall are input into the trained LSTM model to obtain the predicted value, and the predicted flow is calculated according to the formula Qlstm = normalized value × (historical maximum flow - historical minimum flow) + historical minimum flow.
[0007] As a further solution of the present invention, setting the basic parameters of the LSTM model specifically includes: The number of LSTM layers is 2, the number of neurons in the first layer is 64, the number of neurons in the second layer is 32, the dropout rate is 0.2, the optimizer is Adam, the learning rate is 0.001, the batch size is 32, and the number of training rounds is 100.
[0008] As a further solution of the present invention, Qphys, Qlstm∈[0,Qmax], Qmax is calculated according to the formula Qmax=vsafe×A. If Qphys, Qlstm∉[Qmin,Qmax], it is forcibly corrected to the safe flow value, where vsafe is the safe flow rate and A is the water cross-sectional area at full flow.
[0009] As a further solution of the present invention, the weighted flow value is calculated according to the formula Qfinal=q×Qlstm+(1-q)×Qphys, where q is an adaptive adjustment factor.
[0010] As a further embodiment of the present invention, according to the formula Calculate the adaptive adjustment factor, where h0 is the center point of the water level, k is the steepness parameter, and hmin is the lowest effective water level.
[0011] As a further solution of the present invention, the specific steps for calculating the pipe diameter adjustment amount △D are as follows: Substitute Qfinal into the formula Q = (v×π×D^2) / 4 to calculate the minimum pipe diameter Dmin, where v is the flow velocity; If Qfinal <= 0.8×Qcurrent_max, set the pipe diameter adjustment amount △D to remain unchanged, where Qcurrent_max is the maximum allowable flow rate of the current pipe diameter; If 0.8×Qcurrent_max < Qfinal < 1.2×Qcurrent_max, set the pipe diameter adjustment amount △D to -50mm; [[ID=ll]]If Qfinal >= 1.2×Qcurrent_max, set the pipe diameter adjustment amount △D to 200mm; Calculate the deviation according to the formula Qbis = Qfinal - Qreal, where Qreal is the real-time flow rate; When Qbis > 0.2×Qcurrent_max, the pipe diameter adjustment amount △D increases by 20%; When Qbis < -0.2×Qcurrent_max, the pipe diameter adjustment amount △D decreases by 15%.
[0012] As a further solution of the present invention, the specific steps for implementing different feedback strategies according to the three-color matrix are as follows: If Error is displayed in red or yellow, extract the latest 50 groups of data with excessive errors and incrementally train the LSTM model; If Efficiency is displayed in red or yellow, when Efficiency < Effmin, an additional 10% safety margin is added to the pipe diameter adjustment amount; when Efficiency > Effmax, 15% is deducted from the pipe diameter adjustment amount in the next cycle, where Effmin and Effmax are the corresponding thresholds of Efficiency; If n is displayed in red or yellow, when the cumulative actions reach NN times, the valve lubrication program is automatically triggered to inject oil through the built-in grease pump, where NN is the cumulative action threshold.
[0013] An elastic urban rain garden layout optimization system for adapting to climate change includes: A data acquisition module, which sets an ultrasonic liquid level sensor, an electromagnetic flowmeter, and a meteorological radar at the bottom of the rain garden to collect the water level height, real-time flow rate data, rainfall intensity, and cumulative rainfall in real time; The weighted flow module builds a physical model to calculate the theoretical flow and the safe flow constraint interval. The real-time water level, rainfall intensity, and accumulated rainfall are substituted into the LSTM for training, and the predicted flow is output. The theoretical flow and the predicted flow are then adaptively weighted to obtain the weighted flow value. The pipe diameter adjustment module calculates the pipe diameter adjustment amount △D based on the weighted flow value, through matching rules with the preset flow threshold and deviation correction; The closed-loop feedback module constructs a three-color matrix based on the three-dimensional indicators of prediction accuracy, drainage efficiency, and equipment loss, and executes different feedback strategies according to the three-color matrix.
[0014] The present invention provides a method and system for optimizing the layout of resilient urban rain gardens that are adaptive to climate change, which has the following advantages over the prior art: (1) The present invention constructs theoretical traffic through a physical model and combines the data-driven capability of LSTM to learn complex time series laws, achieving dual optimization of mechanism constraints and data correction. This mechanism makes up for the defect of a single model in not being able to capture nonlinear relationships and improves the robustness of traffic prediction. (2) The present invention acquires multi-dimensional environmental parameters in real time through the data acquisition module, the weighted flow module outputs a control benchmark that takes into account both physical laws and real-time data, and the pipe diameter adjustment module achieves precise control through threshold matching and deviation correction, enabling the system to dynamically adjust the pipe diameter and enhance the resilience of urban rainwater gardens to extreme climates; (3) The present invention constructs a three-color matrix evaluation system that includes prediction accuracy, drainage efficiency, and equipment loss. This mechanism can dynamically calibrate model parameters, correct adjustment strategies, and quantify equipment loss, effectively solving the error accumulation problem of traditional open-loop systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 Flow chart of the steps of the present invention; Figure 2 This is the system principle frame of the present invention. DETAILED DESCRIPTION
[0016] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0017] like Figure 1 The present invention provides a method for optimizing the layout of a resilient urban rain garden that is adaptive to climate change, comprising: Step 1: Install an ultrasonic level sensor at the bottom of the rain garden and simultaneously connect it to an electromagnetic flowmeter and a weather radar to collect real-time water level, real-time flow data, rainfall intensity, and accumulated rainfall. Water level is a direct indicator of drainage system load. Rising water levels may indicate pipe congestion or increased upstream water flow. Furthermore, it is strongly correlated with flow rate. According to the principles of fluid mechanics, water level height affects the flow capacity of pipes. Flow rate is the core monitoring indicator of the drainage system, which directly reflects the operating status and drainage efficiency of the system; Rainfall is the main external driver of drainage system flow, with rainfall intensity and duration directly affecting runoff; Cumulative rainfall reflects the surface runoff potential. For example, when there is heavy rainfall in the early stage, the additional rainfall is more likely to form surface runoff. Step 2: Build a physical model to calculate the theoretical flow and determine the safe flow constraint range. Substitute the real-time water level, rainfall intensity, and accumulated rainfall into the LSTM for training and output the predicted flow. Finally, adaptively weight the theoretical flow and the predicted flow so that the model prediction results are constrained by physical laws, thus achieving intelligent prediction under the constraints of physical laws. Before calculating the theoretical flow rate through the physical model, it is necessary to determine whether the drainage system of the urban rain garden is open channel flow or pressure flow. The physical model selected for each type is also different: Open channel flow has a free liquid surface and is mainly driven by gravity. It is significantly affected by bottom slope, roughness, and cross-sectional shape. For example, in natural rivers and irrigation channels, the uniform flow rate Qphys of open channel can be directly calculated according to the Manning formula. In pressurized flow, the fluid fills the entire flow section, leaving no free surface. The flow is driven by pressure differential and is significantly affected by pipe diameter, wall roughness, and resistance along the flow path. For example, in piped water and pressurized culverts, the theoretical flow rate Qphys can be calculated using the Darcy-Weisbach formula or the Bernoulli equation. The value range of Qphys is as follows: The minimum flow rate Qmin=0 corresponds to the situation of no water flow; Maximum flow rate Qmax = vsafe × A, where vsafe is the safe flow rate, which can be 5 m / s for pipelines and 3 m / s for open channels to avoid scour risks; A is the cross-sectional area of water flow at full flow, such as the pipe diameter D, the full flow area A=(π×D^2) / 4; The value range of Qphys must be between [Qmin, Qmax]. If it exceeds the range, the boundary value is used. Because physical models are limited by static parameters and idealized assumptions, they cannot capture dynamic changes and nonlinear relationships in real time. LSTM, on the other hand, can learn complex patterns through data-driven learning, adapt to real-time dynamics, and detect anomalies. Combining the two, through mechanism constraints and data correction, it overcomes the shortcomings of a single method and improves the robustness of flow prediction. It is suitable for dynamic and accurate prediction of complex drainage scenarios such as urban rain gardens. The specific steps for training the LSTM traffic prediction model are: Obtain historical data collected by the above sensors. The input features are real-time water level, rainfall intensity, and accumulated rainfall. The output is real-time flow. Preprocess the raw data, mainly including outlier filtering and missing value repair: Outlier filtering removes obviously unreasonable data, especially focusing on negative water levels and rainfall intensities exceeding historical extremes. For example, the water level must be between 0 and the sensor's maximum range, and rainfall intensity is limited to 0-200 mm / hour. Missing value repair: For data less than 30 minutes, it is recorded as a short-term missing value, and linear interpolation is performed using the data of the previous and next time points to improve interpolation efficiency; For data longer than 30 minutes, it is recorded as long-term missing and filled with historical data from the same period, such as extracting the average water level of the same working day and the same period in the past three months; The three types of sensor data (i.e., water level, rainfall, and flow) are unified to the same sampling frequency of f minutes / time to ensure that the timestamps are fully aligned; Arrange the data in chronological order to form a four-dimensional dataset containing [water level, rainfall intensity, cumulative rainfall, and flow]. The time span needs to cover at least 3 months and include different rainfall scenarios, such as light rain, heavy rain, and no rain. For each time point, the water level, rainfall intensity, and cumulative rainfall of the first 60 / f time steps (i.e., 1 hour) are extracted and used as the input sequence of the LSTM to ensure that the delayed effect of rainfall on flow is effectively captured. For example, flow begins to rise 30 minutes after rain. Normalize the original data through min-max processing to avoid dimension effects; The specific parameter values of the LSTM model are: The LSTM layer has two layers. The first layer captures long-term trends, such as the cumulative impact of continuous rainfall on traffic flow, and the second layer extracts short-term mutations, such as the immediate effect of a sudden change in rainfall intensity. The hierarchical structure enhances feature abstraction capabilities. The number of neurons in the first layer is 64, and the number of neurons in the second layer is 32. The first layer uses more neurons to process the complex temporal patterns of three-dimensional features, and the second layer reduces parameters to prevent overfitting. The dropout rate is 0.2, which suppresses overfitting and improves the generalization ability of the model through random inactivation, especially when there are many neurons; The optimizer is Adam, which has a fast convergence speed and is suitable for the non-stationary characteristics of time series data; The learning rate is 0.001. A medium initial learning rate is set to balance the convergence speed and stability, avoiding oscillation caused by too high learning rate or slow convergence caused by too low learning rate; The batch size is 32, which takes into account both memory efficiency and gradient estimation stability and is suitable for medium and small-scale datasets; The number of training epochs is 100. A sufficient number of epochs are set to make the model converge; The dataset is divided chronologically. 70% is used for training (learning historical patterns), 20% is used for validation (adjusting model parameters), and 10% is used for testing (evaluating generalization ability); The mean squared error (MSE) is used as the loss function to minimize the squared difference between the predicted flow and the actual flow. By using MSE, the overall accuracy of flow prediction is focused, avoiding the excessive influence of individual outliers; The sequence of [water level, rainfall intensity, cumulative rainfall] for the previous 60 / f time steps before the current moment is input, and the model outputs the flow prediction value Qlstm for the next moment; The predicted value is de-normalized to restore it to the actual flow unit. Specifically, it can be calculated by the formula Qlstm = normalized value × (maximum historical flow - minimum historical flow) + minimum historical flow; Combined with the physical constraints of the pipeline, if Qlstm ∉ [Qmin, Qmax], it is forced to be corrected to the safe flow value to avoid generating unreasonable extreme predictions; The weighted flow value is calculated according to the formula Qfinal = q × Qlstm + (1 - q) × Qphys; q is calculated according to the formula and is calculated as such; where h0 is the center point of the water level, such as the warning water level or the historical average water level, which determines the inflection point of weight switching; k is the steepness parameter, which is a fixed parameter greater than 0 and controls the sensitivity of q to the change of water level. The larger k is, the steeper the curve; hmin is the lowest effective water level. When the water level is lower than this value, q is forced to be 0; By analyzing q in detail above, it can be concluded that: If h << h0, q ≈ 0, which is suitable for low water level scenarios. The physical model is more reliable due to the stable water flow pattern, and q approaches 0 to avoid overfitting of LSTM with small data volume; If h = h0, q = 0.5, and the weights of both are equal; If h >> h0, q = 1, which is suitable for high water level scenarios. The water flow may be affected by complex factors, and LSTM can capture non-linear characteristics by learning historical data. q approaches 1 to improve the prediction robustness; The function expression is a Sigmoid curve. Its smoothness avoids sudden changes in weights and conforms to the continuous change law of model credibility in the scenario of gradual water level changes. For example, when the water level is close to the warning level, i.e., h≈h0, q is slowly adjusted near 0.5, taking into account the advantages of both models. The weighted flow value Qfinal calculated by combining Qphys and Qlstm as described above needs to be based on the same timestamp. The same timestamp is the basis for aligning the physical model and the LSTM prediction results in space and time, ensuring that both are calculated based on the same input conditions, enabling the mechanism constraints and data correction to take effect in the same space-time dimension, and avoiding correction deviations caused by time misalignment.
[0018] Step 3: Based on the weighted flow value Qfinal, calculate the pipe diameter adjustment amount △D through matching with a preset flow threshold rule and deviation correction to achieve simplified adjustment control of the pipe diameter; The relationship between flow and pipe diameter satisfies Q=(v×π×D^2) / 4, where v is the flow velocity; Substitute Qfinal into the above formula to calculate the minimum pipe diameter Dmin; According to historical data and safety margins, divide into 3 adjustment intervals, with the current pipe diameter Dcurrent as the benchmark: If Qfinal<=0.8×Qcurrent_max, the pipe diameter adjustment amount △D remains unchanged, where Qcurrent_max is the maximum allowable flow of the current pipe diameter; The current pipe diameter can already meet the flow demand, and the flow velocity will not be too low, avoiding fluid retention, sedimentation or microbial growth, especially when transporting liquids; Frequent adjustment of the pipe diameter will increase the wear of mechanical components, such as valves and diameter-changing devices. Maintaining the current situation can reduce maintenance costs and extend the equipment life; If Qfinal is underestimated, the safety margin of the current pipe diameter can still cover the actual flow fluctuations, avoiding system failures caused by sudden insufficient flow; If 0.8×Qcurrent_max<Qfinal<1.2×Qcurrent_max, set the pipe diameter adjustment amount △D to -50mm; When the flow exceeds 0.8×Qcurrent_max but does not reach the high level, reducing the pipe diameter can increase the flow velocity, making it close to the flow velocity range for efficient system operation; Reducing the pipe diameter in advance can avoid triggering emergency adjustments when the subsequent flow approaches 1.2×Qcurrent_max and reduce the risk of pressure exceeding the limit; If Qfinal>=1.2×Qcurrent_max, set the pipe diameter adjustment amount to 200mm; The maximum flow capacity of the current pipe diameter is no longer able to meet demand. Failure to expand the diameter will cause the flow rate to exceed the safety limit, leading to the following risks: increased pipe wear, such as high-speed fluid eroding the pipe wall; a surge in pressure loss, which may cause pump / compressor overload; If the current pipe diameter is close to Dmin, it is necessary to expand the diameter to make Dnew>=sqrt((4×Qfinal) / π×vmin) to ensure that the flow rate does not fall below the threshold to prevent sedimentation. Expanding the pipe diameter not only meets the weighted flow rate but also reserves buffer space for sudden flow fluctuations, avoiding system shutdowns caused by insufficient pipe diameter. Here, sqrt() is the square root function, and vmin is the minimum safe flow rate. The above safety margin means that a 10% safety space must be reserved for the adjustment amount; The deviation is calculated using the formula Qbis = Qfinal - Qreal. If the deviation is greater than 0, it indicates that the weighted flow rate is higher than the real-time flow rate, indicating that the flow rate may increase in the future and the diameter can be expanded in advance. If the deviation is less than 0, the diameter expansion can be delayed or reduced, where Qreal is the real-time flow rate. The specific measures to use deviation to correct the pipe diameter adjustment amount are: When Qbis>0.2×Qcurrent_max, the pipe diameter adjustment amount increases by 20%; If the deviation is positive and exceeds 20% of the maximum flow rate of the current pipe diameter, it means that the weighted flow rate far exceeds the carrying capacity of the current pipe diameter. In this case, if the pipe diameter is expanded according to the conventional adjustment amount, it may cause pipe wear, pressure surge, or loss of fluid stability. Increasing the adjustment amount by 20% can shorten the adjustment cycle and quickly improve the flow capacity of the pipe diameter; 20% is an empirical proportional coefficient, which ensures that the response speed meets safety requirements while avoiding over-adjustment; When Qbis<-0.2×Qcurrent_max, the pipe diameter adjustment amount is reduced by 15%; If the negative deviation exceeds 20% of the maximum flow rate of the current pipe diameter, it indicates that the weighted flow rate is significantly lower than the normal operating range of the current pipe diameter. If the pipe diameter is reduced according to the conventional adjustment amount, fluid retention and sedimentation may occur. At the same time, frequent reduction operations increase the wear of valves and reducers, reducing equipment reliability. Reducing the adjustment amount by 15% can avoid excessive reduction of the pipe diameter and maintain the flow rate within the safe range of v>=vmin. At the same time, reducing the adjustment range can reduce the frequency of mechanical action and extend the life of the equipment. Calculate the final pipe diameter adjustment amount according to the formula △D=(threshold interval adjustment amount + real-time deviation correction amount), and ensure that △D is within the feasible range of the equipment; For example, the current pipe diameter is DN300, Qcurrent_max = 0.7, the weighted flow rate Qfinal = 1.0 (1.2 times), triggering the emergency mode. The initial pipe diameter adjustment amount is +200 mm, the real-time flow rate Qreal = 0.6, and the deviation = 0.4 > 0.2 x 0.7. After correction, the pipe diameter adjustment amount is +240 mm.
[0019] Step 4: Construct a three-color matrix based on the three-dimensional indicators of prediction accuracy, drainage efficiency, and equipment loss, and execute different feedback strategies according to the three-color matrix; Collect the actual flow rate Qreal, weighted flow rate Qfinal, pipe diameter adjustment amount △D, and valve action times n within the collection period T; Calculate the prediction error according to the formula Error = abs(Qreal - Qfinal) / Qfinal; Traditional open-loop systems rely on fixed parameters or historical experience to adjust the pipe diameter and do not dynamically calibrate the prediction model. If the deviation between the predicted flow rate and the actual flow rate continues to accumulate, it will lead to the disconnection between the adjustment strategy and the real demand; According to the formula Efficiency = actual drainage volume / predicted required drainage volume;
[0019] 步骤4、基于预测精度、排水效率、设备损耗三维指标构建三色矩阵,根据三色矩阵分别执行不同的反馈策略; 采集周期T内的实际流量Qreal、加权流量Qfinal、管径调节量△D、阀门动作次数n; 根据公式Error=abs(Qreal-Qfinal) / Qfinal计算出预测误差; 传统开环系统依赖固定参数或历史经验调节管径,未动态校准预测模型,若预测流量与实际流量偏差持续累积,会导致调节策略与真实需求脱节; 根据公式Efficiency=实际排水量 / 预测需排水量; 排水系统的核心功能是在安全约束下实现流量高效输送,若管径调节后仍存在排水滞后或流速超限,表明调节策略失效; 传统系统未量化调节动作对设备的影响,可能因频繁变径加速设备老化; 对每个维度的状态进行定义: If Error <= Errmin, it indicates that the standard is met and is displayed in green; if Errmin < Error <= Errmax, it indicates that early warning is needed and is displayed in yellow; if Error > Errmax, it indicates that a failure has occurred and is displayed in red; If Efficiency <= Effmin, it indicates that the standard is met and is displayed in green; if Effmin < Efficiency <= Effmax, it indicates that early warning is needed and is displayed in yellow; if Efficiency > Effmax, it indicates that a failure has occurred and is displayed in red; If n <= Nmin, it indicates that the standard is met and is displayed in green; if Nmin < n <= Nmax, it indicates that early warning is needed and is displayed in yellow; if n > Nmax, it indicates that a failure has occurred and is displayed in red; Among them, Errmin, Errmax, Effmin, Effmax, Nmin, and Nmax are the two thresholds for each dimension and all need to be adjusted according to the actual situation; Combine the three-dimensional states into a three-color matrix of red, yellow, and green, with a total of 27 combinations. Pay attention to the combinations containing red and yellow colors; The specific steps for implementing different feedback strategies according to the three-color matrix are as follows: If Error is displayed in red or yellow, locate it in the above LSTM prediction model and execute the following strategy: Extract the latest 50 groups of data with excessive errors and incrementally train the LSTM model; If Efficiency is displayed in red or yellow, locate it in the above pipe diameter adjustment section and execute the following strategy: If Efficiency < Effmin, it indicates insufficient drainage, and a 10% safety margin is added to the pipe diameter adjustment; If Efficiency > Effmax, it indicates excessive drainage, and 15% is deducted from the pipe diameter adjustment in the next cycle. For example, if the original adjustment is +200mm, it is corrected to +170mm; If n is displayed in red or yellow, locate it at the abnormal valve action frequency and execute the following strategy: When the cumulative action reaches NN times, the valve lubrication program is automatically triggered, and oil is injected through the built-in grease pump, which can extend the valve life. Here, NN is the cumulative action threshold; For example, when T is 10 minutes, Qreal, Qfinal, △D, and n are obtained in real time, and the status lights of the corresponding dimensions are lit to form a visual three-color matrix, specifically [yellow, yellow, green]. According to the feedback strategy, it is located in two parts: fine-tuning of the LSTM model and correction of the pipe diameter adjustment. Trigger: Incrementally train the LSTM model with the latest 20 groups of error data; temporarily increase the safety margin coefficient from 0.9 to 0.93, allowing the upper limit of the allowable flow to increase by 3%; send a model training instruction to step 2 and a correction coefficient of the adjustment amount to step 3; after execution, the adjustment log can also be recorded for subsequent anomaly tracing.
[0020] Such as Figure 2 , the present invention provides an optimized system for the layout of resilient urban rain gardens adaptable to climate change, including: A data acquisition module, which sets ultrasonic liquid level sensors, electromagnetic flowmeters, and meteorological radars at the bottom of the rain garden to collect the water level height, real-time flow data, rainfall intensity, and cumulative rainfall in real time; A weighted flow module, which constructs a physical model to calculate the theoretical flow and the safety flow constraint interval, substitutes the real-time water level height, rainfall intensity, and cumulative rainfall into the LSTM for training, outputs the predicted flow, and adaptively weights the theoretical flow and the predicted flow to obtain the weighted flow value; A pipe diameter adjustment module, which calculates the pipe diameter adjustment amount △D based on the weighted flow value through matching rules with preset flow thresholds and deviation correction; The closed-loop feedback module constructs a three-color matrix based on the three-dimensional indicators of prediction accuracy, drainage efficiency, and equipment loss, and executes different feedback strategies according to the three-color matrix.
[0021] Some of the data in the above formulas are dimensionless and numerically calculated. Meanwhile, the contents not described in detail in this specification belong to the prior art known to those skilled in the art.
[0022] The above embodiments are only used to illustrate the technical method of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A method for optimizing the layout of resilient urban rain gardens that is adaptive to climate change, characterized by: include: Step 1: Install an ultrasonic level sensor at the bottom of the rain garden, and simultaneously connect it to an electromagnetic flowmeter and a weather radar to collect real-time water level, real-time flow data, rainfall intensity, and accumulated rainfall. Step 2: Build a physical model to calculate the theoretical flow and the safe flow constraint interval. Substitute the real-time water level, rainfall intensity, and accumulated rainfall into the LSTM for training, output the predicted flow, and adaptively weight the theoretical flow and the predicted flow to obtain the weighted flow value. Step 3: Based on the weighted flow value, the pipe diameter adjustment amount ΔD is calculated by matching the preset flow threshold value with the rules and performing deviation correction. Step 4: Construct a three-color matrix based on the three-dimensional indicators of prediction accuracy, drainage efficiency, and equipment loss, and implement different feedback strategies according to the three-color matrix.
2. The method for optimizing the layout of resilient urban rain gardens that are adaptive to climate change according to claim 1, characterized in that: Select the Manning formula to calculate the theoretical flow rate for open channel flow, and select the Darcy-Weisbach formula or Bernoulli equation to obtain the theoretical flow rate for pressure flow.
3. The method for optimizing the layout of resilient urban rain gardens that are adaptive to climate change according to claim 1, characterized in that: The specific steps for training the LSTM traffic prediction model are: Get historical data of three types of sensors; Filter outliers and repair missing values in historical data, and perform normalization using the min-max method; Arrange the data in chronological order to form a four-dimensional dataset containing [water level, rainfall intensity, cumulative rainfall, flow]; For each time point, the water level, rainfall intensity, and cumulative rainfall of the previous 60 / f time steps are extracted and used as the input sequence of the LSTM, and the flow value at the next time point is used as the output, where f is the sampling frequency of the three types of sensors; Divide the dataset chronologically, 70% for training, 20% for validation, and 10% for testing; The mean square error MSE is used as the loss function; Set the basic parameters of the LSTM model and train it to obtain a trained LSTM model; The real-time water level, rainfall intensity, and cumulative rainfall are input into the trained LSTM model to obtain the predicted value, and the predicted flow is calculated according to the formula Qlstm = normalized value × (historical maximum flow - historical minimum flow) + historical minimum flow.
4. The method for optimizing the layout of resilient urban rain gardens that are adaptive to climate change according to claim 3, characterized in that: Setting the basic parameters of the LSTM model specifically includes: The number of LSTM layers is 2, the number of neurons in the first layer is 64, the number of neurons in the second layer is 32, the dropout rate is 0.2, the optimizer is Adam, the learning rate is 0.001, the batch size is 32, and the number of training rounds is 100.
5. The method for optimizing the layout of resilient urban rain gardens that are adaptive to climate change according to claim 1, characterized in that: Qphys, Qlstm∈[0,Qmax], Qmax is calculated according to the formula Qmax=vsafe×A. If Qphys, Qlstm∉[Qmin,Qmax], it is forced to be corrected to the safe flow value, where vsafe is the safe flow rate and A is the water cross-sectional area at full flow.
6. The method for optimizing the layout of resilient urban rain gardens that are adaptive to climate change according to claim 1, characterized in that: The weighted flow value is calculated according to the formula Qfinal=q×Qlstm+(1-q)×Qphys, where q is the adaptive adjustment factor.
7. The method for optimizing the layout of resilient urban rain gardens that are adaptive to climate change according to claim 6, characterized in that: According to the formula The adaptive adjustment factor is calculated, where h0 is the center point of the water level, k is the steepness parameter, and hmin is the minimum effective water level.
8. The method for optimizing the layout of resilient urban rain gardens that are adaptive to climate change according to claim 1, characterized in that: The specific steps for calculating the pipe diameter adjustment △D are: Substitute Qfinal into the formula Q=(v×π×D^2) / 4 to calculate the minimum pipe diameter Dmin, where v is the flow velocity; If Qfinal <= 0.8 × Qcurrent_max, set the pipe diameter adjustment △D to remain unchanged, where Qcurrent_max is the maximum allowable flow rate of the current pipe diameter; If 0.8×Qcurrent_max If Qfinal>=1.2×Qcurrent_max, set the pipe diameter adjustment △D to 200mm; The deviation is calculated according to the formula Qbis=Qfinal-Qreal, where Qreal is the real-time traffic; When Qbis>0.2×Qcurrent_max, the pipe diameter adjustment amount △D increases by 20%; When Qbis<-0.2×Qcurrent_max, the pipe diameter adjustment amount △D decreases by 15%.
9. The method for optimizing the layout of resilient urban rain gardens that are adaptive to climate change according to claim 1, characterized in that: The specific steps for implementing different feedback strategies according to the three-color matrix are: If the Error is displayed in red or yellow, extract the latest 50 sets of data with exceeded errors and incrementally train the LSTM model; If Efficiency is displayed in red or yellow, If n is displayed in red or yellow, when the cumulative action reaches NN times, the valve lubrication program is automatically triggered and oil is injected through the built-in grease pump, where NN is the cumulative action threshold.
10. A climate-adaptive and resilient urban rain garden layout optimization system, configured to execute the climate-adaptive and resilient urban rain garden layout optimization method according to any one of claims 1 to 9, characterized in that: include: The data acquisition module installs ultrasonic liquid level sensors, electromagnetic flow meters and weather radar at the bottom of the rain garden to collect water level height, real-time flow data, rainfall intensity and accumulated rainfall in real time; The weighted flow module builds a physical model to calculate the theoretical flow and the safe flow constraint interval. The real-time water level, rainfall intensity, and accumulated rainfall are substituted into the LSTM for training, and the predicted flow is output. The theoretical flow and the predicted flow are then adaptively weighted to obtain the weighted flow value. The pipe diameter adjustment module calculates the pipe diameter adjustment amount △D based on the weighted flow value, through matching rules with the preset flow threshold and deviation correction; The closed-loop feedback module constructs a three-color matrix based on the three-dimensional indicators of prediction accuracy, drainage efficiency, and equipment loss, and executes different feedback strategies according to the three-color matrix.
Citation Information
Patent Citations
Urban rainstorm intensity calculation method and system based on spatial-temporal distribution characteristics, equipment and storage medium
CN113821939A
Full pipe operation early warning analysis method for sewage pipe network
CN119168322A
High-density urban ponding evolution and early warning method based on digital twinning
CN119849713A
Urban intelligent drainage management system based on big data analysis
CN119886589A
Cited By
Smart city monitoring and simulation deduction method based on digital twinborn model
CN121093648A