A method and system for optimizing the layout of resilient urban rain gardens that adapt to climate change
An adaptive flow prediction system combining physical and LSTM models addresses the shortcomings of traditional rain garden drainage control schemes in flow prediction and pipe diameter adjustment, achieving dynamic adaptation to extreme climates and improving system reliability, thereby enhancing the drainage capacity of urban rain gardens.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2026-03-13
AI Technical Summary
Traditional rain garden drainage control schemes lack the ability to capture the nonlinear laws of time-series correlation and multivariate coupling when predicting flow, have poor dynamic adaptability, and fail to quantify drainage efficiency and equipment wear indicators, making it difficult to balance functional implementation and system reliability.
By installing ultrasonic level sensors and electromagnetic flow meters at the bottom of the rain garden, and combining real-time data acquisition from weather radar, an adaptive flow prediction system combining a physical model and an LSTM model is constructed. The theoretical flow rate is calculated using the Manning formula and the Darcy-Weisbach formula, and the predicted flow rate is weighted by combining the LSTM. Based on the three-dimensional index matrix, a feedback strategy is executed to achieve pipe diameter adjustment and closed-loop control.
It improves the robustness of flow forecasting and the dynamic adaptability of the system, enhances the resilience of urban rain gardens under extreme climates, dynamically calibrates model parameters, reduces error accumulation, and improves the reliability and equipment lifespan of drainage systems.
Smart Images

Figure CN120706256B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of sponge city drainage optimization technology, specifically to a method and system for optimizing the layout of resilient urban rain gardens that adapt to climate change. Background Technology
[0002] With the acceleration of urbanization, urban rain gardens, as a core component of sponge cities, face multiple challenges in their drainage systems, including frequent extreme rainfall and aging pipe network equipment. Existing technologies and traditional rain garden drainage control schemes mainly suffer from the following shortcomings:
[0003] Existing solutions for flow prediction are mostly based on pure physical models. Although they are supported by fluid dynamics theory, they are not good at capturing nonlinear laws such as time-series correlation and multivariate coupling. On the other hand, relying solely on data-driven models lacks physical interpretability and is prone to outputting outliers that violate the law of flow conservation.
[0004] Traditional pipe diameter adjustment strategies are mostly based on fixed thresholds or historical experience, which cannot dynamically calibrate model errors. At the same time, they do not quantify drainage efficiency and equipment wear indicators, making it difficult to balance functional implementation and system reliability.
[0005] Therefore, there is an urgent need for a flexible urban rain garden layout optimization method and system that adapts to climate change. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention provides a method and system for optimizing the layout of flexible urban rain gardens that adapts to climate change, solving the problems of poor dynamic adaptability, single model, and lack of closed-loop feedback in traditional solutions.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a method for optimizing the layout of resilient urban rain gardens that adapts to climate change, comprising:
[0008] Step 1: Install an ultrasonic level sensor at the bottom of the rain garden, and connect it to an electromagnetic flow meter and a weather radar to collect water level height, real-time flow data, rainfall intensity, and cumulative rainfall in real time.
[0009] Step 2: Construct a physical model to calculate the theoretical flow rate and the safe flow rate constraint range. Substitute the real-time water level, rainfall intensity, and cumulative rainfall into the LSTM for training, output the predicted flow rate, and adaptively weight the theoretical flow rate and the predicted flow rate to obtain the weighted flow rate value.
[0010] Step 3: Based on the weighted flow rate value, calculate the pipe diameter adjustment amount ΔD by matching it with the preset flow rate threshold and correcting for deviations;
[0011] Step 4: Construct a three-color matrix based on three-dimensional indicators of prediction accuracy, drainage efficiency, and equipment loss, and execute different feedback strategies according to the three-color matrix.
[0012] As a further aspect of the present invention, the Manning formula is selected to calculate the theoretical flow rate of open channel flow, and the Darcy-Weisbach formula or Bernoulli equation is selected to obtain the theoretical flow rate of pressure flow.
[0013] As a further aspect of the present invention, the specific steps for training the LSTM traffic prediction model are as follows:
[0014] Acquire historical data from three types of sensors;
[0015] Historical data is filtered for outliers and repaired for missing values, and then normalized using the min-max method.
[0016] The data is arranged in chronological order to form a four-dimensional dataset containing [water level, rainfall intensity, cumulative rainfall, and flow rate].
[0017] 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 rate value of the next time point is used as the output, where f is the sampling frequency of the three types of sensors;
[0018] The dataset was divided chronologically, with 70% used for training, 20% for validation, and 10% for testing.
[0019] Mean squared error (MSE) is used as the loss function;
[0020] Set the basic parameters of the LSTM model and train it to obtain a trained LSTM model.
[0021] Real-time water level, rainfall intensity, and cumulative rainfall are input into the trained LSTM model to obtain predicted values. The predicted flow rate is then calculated using the formula Qlstm = normalized value × (historical maximum flow rate - historical minimum flow rate) + historical minimum flow rate.
[0022] As a further aspect of the present invention, setting the basic parameters of the LSTM model specifically includes:
[0023] The LSTM has 2 layers, with 64 neurons in the first layer and 32 neurons in the second layer. 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 epochs is 100.
[0024] As a further solution of the present invention, Qphys, Qlstm ∈ [0, Qmax], and 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 velocity and A is the cross-sectional area of the full flow.
[0025] 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 the adaptive adjustment factor.
[0026] As a further solution of the present invention, 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 lowest effective water level.
[0027] As a further solution of the present invention, the specific steps for calculating the pipe diameter adjustment amount △D are as follows:
[0028] Substitute Qfinal into the formula Q = (v × π × D^2) / 4 to calculate the minimum pipe diameter Dmin, where v is the flow velocity;
[0029] If Qfinal <= 0.8 × Qcurrent_max, set the pipe diameter adjustment amount △D to remain unchanged, where Qcurrent_max is the maximum allowable flow of the current pipe diameter;
[0030] If 0.8 × Qcurrent_max < Qfinal < 1.2 × Qcurrent_max, set the pipe diameter adjustment amount △D to -50 mm;
[0031] If Qfinal >= 1.2 × Qcurrent_max, set the pipe diameter adjustment amount △D to 200 mm;
[0032] Calculate the deviation according to the formula Qbis = Qfinal - Qreal, where Qreal is the real-time flow;
[0033] When Qbis > 0.2 × Qcurrent_max, the pipe diameter adjustment amount △D increases by 20%;
[0034] When Qbis < -0.2 × Qcurrent_max, the pipe diameter adjustment amount △D decreases by 15%.
[0035] 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:
[0036] If Error is displayed in red or yellow, extract the latest 50 groups of data with excessive errors and incrementally train the LSTM model;
[0037] If Efficiency shows 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. Effmin and Effmax are the corresponding thresholds of Efficiency.
[0038] If n shows red or yellow, when the cumulative operation reaches NN times, the valve lubrication program is automatically triggered to inject oil through the built-in grease pump, where NN is the cumulative operation threshold.
[0039] An elastic urban rain garden layout optimization system for adapting to climate change includes:
[0040] A data acquisition module that sets ultrasonic 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.
[0041] A weighted flow module that 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.
[0042] A pipe diameter adjustment module that calculates the pipe diameter adjustment amount △D based on the weighted flow value through matching with the preset flow threshold matching rule and deviation correction.
[0043] A closed-loop feedback module that constructs a three-color matrix based on three-dimensional indexes of prediction accuracy, drainage efficiency, and equipment loss, and executes different feedback strategies according to the three-color matrix.
[0044] The present invention provides an elastic urban rain garden layout optimization method and system for adapting to climate change, which has the following beneficial effects compared with the prior art:
[0045] (1) The present invention constructs the theoretical flow through a physical model, combines the data-driven ability of LSTM to learn complex time series laws, realizes the double optimization of mechanism constraint and data correction, and this mechanism compensates for the defect that a single model is insufficient in capturing non-linear relationships and improves the robustness of flow prediction.
[0046] (2) The present invention obtains multi-dimensional environmental parameters in real time through the data acquisition module, the weighted flow module outputs a control benchmark that takes into account physical laws and real-time data, and the pipe diameter adjustment module realizes precise control through threshold matching and deviation correction, enabling the system to dynamically adjust the pipe diameter and enhancing the resilience of urban rain gardens to extreme climates.
[0047] (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. Attached Figure Description
[0048] Figure 1 This is a flowchart of the steps of the present invention;
[0049] Figure 2 This is the system principle block diagram of the present invention. Detailed Implementation
[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] like Figure 1 This invention provides a method for optimizing the layout of resilient urban rain gardens that adapts to climate change, comprising:
[0052] Step 1: Install an ultrasonic level sensor at the bottom of the rain garden, and connect it to an electromagnetic flow meter and a weather radar to collect real-time water level, real-time flow data, rainfall intensity, and cumulative rainfall.
[0053] Water level is a direct indicator of the load on the drainage system. A rise in water level may indicate pipe blockage or an increase in upstream water flow. In addition, it is strongly correlated with flow rate. According to the principles of fluid mechanics, water level affects the flow capacity of the pipe.
[0054] Flow rate is the core monitoring indicator of a drainage system, directly reflecting the system's operating status and drainage efficiency;
[0055] Rainfall is the main external driving factor for drainage system flow, and rainfall intensity and duration directly affect runoff.
[0056] Cumulative rainfall reflects the potential for surface runoff. For example, if there has been a lot of rain in the previous period, new rainfall is more likely to form surface runoff.
[0057] Step 2: Construct a physical model to calculate the theoretical flow and determine the safe flow constraint range. Substitute the real-time water level, rainfall intensity, and cumulative rainfall into the LSTM for training, output the predicted flow, and finally adaptively weight the theoretical flow and the predicted flow to make the model prediction results subject to physical laws, thereby achieving intelligent prediction under the constraints of physical laws.
[0058] Before calculating the theoretical flow rate using a 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 to be selected will differ depending on the type of flow.
[0059] 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 morphology. For example, in natural rivers and irrigation canals, the uniform flow rate Qphys of open channels can be directly calculated using the Manning formula.
[0060] In pressurized flow, the fluid fills the entire flow cross-section, with no free liquid surface. The flow is driven by the pressure difference and is significantly affected by pipe diameter, pipe wall roughness, and friction resistance. For example, in pipeline water transport and pressurized culverts, the theoretical flow rate Qphys can be obtained according to the Darcy-Weisbach formula or Bernoulli equation.
[0061] The specific value range for Qphys is as follows:
[0062] Minimum flow rate Qmin=0, corresponding to the case of no water flow;
[0063] The maximum flow rate Qmax = vsafe × A, where vsafe is the safe flow velocity, which can be taken as 5 m / s for pipelines and 3 m / s for open channels to avoid the risk of scouring.
[0064] A is the cross-sectional area of the water flow when the pipe is fully open. For example, if the pipe diameter is D, the full flow area A = (π × D^2) / 4.
[0065] The value of Qphys must be between [Qmin, Qmax], and if it exceeds the range, the boundary value will be used;
[0066] 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 laws through data-driven learning, adapt to real-time dynamics and anomaly detection. By combining the two, and through mechanism constraints and data correction, the shortcomings of a single method can be made up for, and the robustness of flow prediction can be improved. It is suitable for dynamic and accurate prediction in complex drainage scenarios such as urban rain gardens.
[0067] The specific steps for training an LSTM traffic prediction model are as follows:
[0068] The system acquires historical data collected by the aforementioned sensors, with input features including real-time water level, rainfall intensity, and cumulative rainfall, and output being real-time flow rate.
[0069] Preprocessing of the raw data mainly includes outlier filtering and missing value repair:
[0070] Outlier filtering removes obviously unreasonable data, with particular attention to negative water levels and rainfall intensity exceeding historical extremes. For example, water levels must be between 0 and the sensor's maximum range, and rainfall intensity must be limited to 0-200 mm / hour.
[0071] For missing value repair, values less than 30 minutes are recorded as short-term missing values, and linear interpolation is performed using data from the preceding and following time points to improve interpolation efficiency.
[0072] For data longer than 30 minutes, it is recorded as a long-term missing data and filled with historical data from the same period, such as extracting the average water level of the same working day and the same time period in the past 3 months.
[0073] Unify the three types of sensor data (i.e., water level, rainfall, and flow rate) to the same sampling frequency f minutes / time, ensuring that the timestamps are completely aligned;
[0074] Arrange the data in chronological order to form a four-dimensional dataset containing [water level, rainfall intensity, cumulative rainfall, and flow rate]. The time span should cover at least 3 months and include different rainfall scenarios, such as light rain, heavy rain, and no rain.
[0075] For each time point, extract the water level, rainfall intensity, and cumulative rainfall for the previous 60 / f time steps (i.e., 1 hour) and use them as the input sequence for LSTM to ensure effective capture of the delay effect from rainfall to flow, such as the flow starting to rise 30 minutes after the rain.
[0076] The original data is normalized by using min-max processing to avoid the influence of units;
[0077] The specific parameter values for the LSTM model are:
[0078] The LSTM has two layers. The first layer captures long-term trends, such as the cumulative impact of continuous rainfall on flow, while the second layer extracts short-term mutations, such as the immediate effect of sudden changes in rainfall intensity. The hierarchical structure enhances the ability to abstract features.
[0079] The first layer has 64 neurons and the second layer has 32 neurons. The first layer uses more neurons to process complex temporal patterns of three-dimensional features, while the second layer reduces the number of parameters to prevent overfitting.
[0080] The dropout rate is 0.2, which suppresses overfitting and improves the model's generalization ability, especially when there are many neurons, by randomly deactivating them.
[0081] The optimizer is Adam, which has a fast convergence speed and is suitable for the non-stationary characteristics of time series data.
[0082] The learning rate is 0.001, setting a moderate initial learning rate to balance convergence speed and stability, avoiding oscillations caused by an excessively high learning rate or slow convergence caused by an excessively low learning rate;
[0083] With a batch size of 32, it balances memory efficiency and gradient estimation stability, making it suitable for small to medium-sized datasets.
[0084] The number of training rounds is 100. Set enough rounds to make the model converge;
[0085] Divide the dataset in chronological order. 70% is used for training (learning historical patterns), 20% for validation (adjusting model parameters), and 10% for testing (evaluating generalization ability);
[0086] Use the mean squared error (MSE) as the loss function to minimize the squared difference between the predicted flow and the actual flow. Focus on the overall accuracy of flow prediction through MSE and avoid the excessive influence of individual outliers;
[0087] Input the [water level, rainfall intensity, cumulative rainfall] sequence of the previous 60 / f time steps at the current moment, and the model outputs the flow prediction value Qlstm for the next moment;
[0088] Denormalize the predicted value to restore it to the actual flow unit. Specifically, it can be done through the formula Qlstm = normalized value × (maximum historical flow - minimum historical flow) + minimum historical flow;
[0089] Combine the physical constraints of the pipeline. If Qlstm ∉ [Qmin, Qmax], then force it to be corrected to the safe flow value to avoid generating unreasonable extreme predictions;
[0090] Calculate the weighted flow value according to the formula Qfinal = q × Qlstm + (1 - q) × Qphys;
[0091] q is calculated according to the formula Calculate and obtain;
[0092] Among them, 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;
[0093] k is the steepness parameter, a fixed parameter greater than 0, which controls the sensitivity of q to the change of water level. The larger k is, the steeper the curve;
[0094] hmin is the lowest effective water level. When the water level is lower than this value, force q = 0;
[0095] Analyze q in detail, and it can be obtained that:
[0096] If h << h0, q ≈ 0, which is suitable for low water level scenarios. The physical model is more reliable due to stable water flow patterns, q approaches 0, and avoids overfitting of LSTM in small data volumes;
[0097] If h = h0, q = 0.5, and the weights of both are equal;
[0098] If h >> h0, q = 1, which is suitable for high water level scenarios. Water flow may be affected by complex factors. LSTM can capture nonlinear features by learning historical data. q approaches 1, which improves the prediction robustness.
[0099] 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 change. For example, when the water level is close to the warning level, i.e., when h≈h0, q is slowly adjusted around 0.5, taking into account the advantages of both models.
[0100] The weighted flow value Qfinal calculated by combining Qphys and Qlstm must be based on the same timestamp;
[0101] Using the same timestamp is the basis for achieving spatiotemporal alignment between the physical model and the LSTM prediction results. It ensures that both are calculated based on the same input conditions, so that the mechanistic constraints and data corrections take effect in the same spatiotemporal dimension, avoiding correction deviations caused by time misalignment.
[0102] Step 3: Based on the weighted flow rate value Qfinal, calculate the pipe diameter adjustment amount ΔD by matching it with the preset flow rate threshold and correcting for deviations, thereby achieving simplified adjustment and control of the pipe diameter;
[0103] The relationship between flow rate and pipe diameter satisfies Q=(v×π×D^2) / 4, where v is the flow velocity;
[0104] Substitute Qfinal into the above formula to calculate the minimum pipe diameter Dmin;
[0105] Based on historical data and safety margins, three adjustment ranges are defined, with the current pipe diameter Dcurrent as the benchmark:
[0106] If Qfinal <= 0.8 × Qcurrent_max, the pipe diameter adjustment ΔD remains unchanged, where Qcurrent_max is the maximum allowable flow rate of the current pipe diameter;
[0107] The current pipe diameter can meet the flow requirements and the flow rate will not be too low, avoiding fluid stagnation, sedimentation or microbial growth, especially when transporting liquids;
[0108] Frequent pipe diameter adjustments can increase wear on mechanical components, such as valves and reducers. Maintaining the current state can reduce maintenance costs and extend equipment life.
[0109] 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.
[0110] If 0.8×Qcurrent_max < Qfinal < 1.2×Qcurrent_max, set the pipe diameter adjustment amount △D to -50mm;
[0111] When the flow rate exceeds 0.8×Qcurrent_max but has not reached the high level, reducing the pipe diameter can increase the flow velocity, making it close to the flow velocity range for efficient system operation;
[0112] Reducing the pipe diameter in advance can avoid triggering emergency adjustment when the subsequent flow rate approaches 1.2×Qcurrent_max, reducing the risk of pressure exceeding the limit;
[0113] If Qfinal >= 1.2×Qcurrent_max, set the pipe diameter adjustment amount to 200mm;
[0114] The maximum carrying flow rate of the current pipe diameter can no longer meet the demand. Failure to expand the diameter will cause the flow velocity to exceed the safety limit, resulting in the following risks: increased pipe wear, such as high-speed fluid scouring the pipe wall; a sharp increase in pressure loss, which may cause the pump / compressor to overload;
[0115] If the current pipe diameter is already close to Dmin, it is necessary to expand the diameter so that Dnew >= sqrt((4×Qfinal) / π×vmin) to ensure that the flow velocity is not lower than the threshold to prevent sedimentation. Expanding the pipe diameter not only meets the weighted flow rate but also reserves a buffer space for sudden flow fluctuations, avoiding system shutdown due to insufficient pipe diameter. Here, sqrt() is the square root function, and vmin is the minimum safe flow velocity;
[0116] The above safety margin means that a 10% safety space needs to be reserved for the adjustment amount;
[0117] Calculate the deviation according to the formula Qbis = Qfinal - Qreal. If the deviation > 0, it indicates that the weighted flow rate is higher than the real-time flow rate, suggesting that there may be a flow increase in the future, and the diameter can be expanded in advance; if the deviation < 0, the diameter expansion can be delayed or the expansion amplitude can be reduced, where Qreal is the real-time flow rate;
[0118] The specific measures to correct the pipe diameter adjustment amount using the deviation are as follows:
[0119] When Qbis > 0.2×Qcurrent_max, the pipe diameter adjustment amount increases by 20%;
[0120] The deviation is positive and exceeds 20% of the maximum flow rate of the current pipe diameter, indicating that the weighted flow rate far exceeds the carrying capacity of the current pipe diameter. At this time, if the diameter is expanded according to the conventional adjustment amount, it may cause pipe wear, pressure surge or fluid stability damage;
[0121] Increasing the adjustment amount by 20% can shorten the adjustment cycle and quickly improve the flow capacity of the pipe diameter;
[0122] 20% is an empirical proportional coefficient, which ensures that the response speed meets safety requirements while avoiding over-adjustment;
[0123] When Qbis < -0.2 × Qcurrent_max, the pipe diameter adjustment amount decreases by 15%;
[0124] A negative deviation exceeding 20% of the maximum flow rate of the current pipe diameter 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 by the normal adjustment amount, it may cause fluid stagnation and sedimentation. At the same time, frequent reduction of the pipe diameter increases the wear of valves / diameter change components and reduces equipment reliability.
[0125] Reducing the adjustment by 15% can prevent the pipe diameter from shrinking excessively 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 equipment life.
[0126] The final pipe diameter adjustment is calculated according to the formula △D=(threshold range adjustment amount + real-time deviation correction amount), and △D is ensured to be within the feasible range of the equipment.
[0127] For example, with a current pipe diameter of DN300, Qcurrent_max=0.7, and weighted flow rate Qfinal=1.0 (1.2 times), the emergency mode is triggered. The initial pipe diameter adjustment is +200mm, the real-time flow rate Qreal=0.6, the deviation=0.4>0.2x0.7, and the corrected pipe diameter adjustment is +240mm.
[0128] 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;
[0129] The data collection period T includes the actual flow rate Qreal, the weighted flow rate Qfinal, the pipe diameter adjustment ΔD, and the number of valve actions n.
[0130] The prediction error is calculated using the formula Error=abs(Qreal-Qfinal) / Qfinal;
[0131] Traditional open-loop systems rely on fixed parameters or historical experience to adjust the pipe diameter without dynamically calibrating the prediction model. If the deviation between the predicted flow rate and the actual flow rate continues to accumulate, it will lead to a disconnect between the adjustment strategy and the actual demand.
[0132] According to the formula: Efficiency = Actual drainage volume / Predicted drainage volume;
[0133] The core function of a drainage system is to achieve efficient flow delivery under safety constraints. If drainage lag or flow velocity exceeding limits still exists after pipe diameter adjustment, it indicates that the adjustment strategy has failed.
[0134] Traditional systems do not quantify the impact of adjustment actions on equipment, which may accelerate equipment aging due to frequent diameter changes;
[0135] Define the status for each dimension:
[0136] If Error <= Errmin, it indicates compliance 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 a failure and is displayed in red;
[0137] If Efficiency <= Effmin, it indicates compliance 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 a failure and is displayed in red;
[0138] If n <= Nmin, it indicates compliance 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 a failure and is displayed in red;
[0139] Among them, Errmin, Errmax, Effmin, Effmax, Nmin, and Nmax are two thresholds for each dimension, and all need to be adjusted according to the actual status;
[0140] Combine the three - dimension status into a red, yellow, and green color matrix, with a total of 27 combinations. Pay special attention to the combinations containing red and yellow;
[0141] The specific steps to execute different feedback strategies according to the color matrix are as follows:
[0142] If Error is displayed in red or yellow, locate it in the above LSTM prediction model and execute the following strategy:
[0143] Extract the latest 50 groups of data with excessive errors and incrementally train the LSTM model;
[0144] If Efficiency is displayed in red or yellow, locate it in the above part of the pipe diameter adjustment amount and execute the following strategy:
[0145] If Efficiency < Effmin, it indicates insufficient drainage, and an additional 10% safety margin is added to the pipe diameter adjustment amount;
[0146] If Efficiency > Effmax, it indicates excessive drainage, and 15% is deducted from the pipe diameter adjustment amount in the next cycle. For example, if the original adjustment amount is +200mm, it is corrected to +170mm;
[0147] If n is displayed in red or yellow, it indicates an abnormal valve operating frequency, and the following strategy should be executed:
[0148] If the cumulative number of actions reaches NN, the valve lubrication program will be automatically triggered, and oil will be injected through the built-in grease pump to extend the valve life. Here, NN is the cumulative action threshold.
[0149] For example, when T is 10 minutes, Qreal, Qfinal, ΔD, and n are acquired in real time, and the status lights of the corresponding dimensions are lit to form a visual three-color matrix, specifically [yellow, yellow, green]. Based on the feedback strategy, the two parts of LSTM model fine-tuning and pipe diameter adjustment correction are located, triggering: incremental training of the LSTM model on the most recent 20 sets of error data; temporary increase of the safety margin coefficient from 0.9 to 0.93, allowing a 3% increase in the upper limit of flow; sending the model training instruction to step 2 and the adjustment correction coefficient to step 3; after execution, the adjustment log can also be recorded for subsequent anomaly tracing.
[0150] like Figure 2 This invention provides a flexible urban rain garden layout optimization system that adapts to climate change, comprising:
[0151] The data acquisition module is equipped with an ultrasonic level sensor, an electromagnetic flow meter, and a weather radar at the bottom of the rain garden to collect real-time water level, real-time flow data, rainfall intensity, and cumulative rainfall.
[0152] The weighted flow module constructs a physical model to calculate the theoretical flow and safe flow constraint range. It inputs real-time water level, 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.
[0153] The pipe diameter adjustment module calculates the pipe diameter adjustment amount ΔD based on the weighted flow rate value, through matching rules with the preset flow rate threshold and deviation correction.
[0154] The closed-loop feedback module constructs a three-color matrix based on three-dimensional indicators of prediction accuracy, drainage efficiency, and equipment loss, and executes different feedback strategies according to the three-color matrix.
[0155] Some of the data in the above formulas are numerical calculations with dimensions removed, and the contents not described in detail in this specification are all prior art known to those skilled in the art.
[0156] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. A method for optimizing the layout of resilient urban rain gardens that adapt to climate change, characterized in that, Comprise: Step 1, set ultrasonic liquid level sensor at the bottom of the rain garden, synchronously access electromagnetic flowmeter and weather radar, real-time collect water level height, real-time flow data, rainfall intensity, cumulative rainfall; Step 2, construct the physical model calculation theoretical flow and safety flow constraint interval, put the real-time water level, rainfall intensity, cumulative 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, the specific operation is: according to the formula Qfinal=q×Qlstm+(1-q)×Qphys, calculate the weighted flow value, according to the formula Calculate the adaptive adjustment factor, wherein Qlstm is the flow prediction value, Qphys is the theoretical flow, h is the real-time water level, h0 is the water level center point, k is the steepness parameter, hmin is the minimum effective water level; Step 3, based on the weighted flow value, through the preset flow threshold value matching rule and deviation correction, the pipe diameter adjustment amount delta D is calculated, the specific operation is: Put Qfinal into the formula Q=(v x pi x D^2) / 4 to calculate the minimum pipe diameter Dmin, wherein v is the flow rate; if Qfinal<=0.8*Qcurrent_max, set the pipe diameter adjustment amount delta D to remain unchanged, wherein Qcurrent_max is the maximum allowable flow of the current pipe diameter; if 0.8*Qcurrent_max<Qfinal<1.2*Qcurrent_max, set the pipe diameter adjustment amount delta D to-50mm; if Qfinal>=1.2*Qcurrent_max, set the pipe diameter adjustment amount delta D to 200mm, wherein D is the pipe diameter of the pipeline; According to the formula Qbis=Qfinal-Qreal, the deviation is calculated, wherein Qreal is the real-time flow; When Qbis>0.2*Qcurrent_max, the pipe diameter adjustment amount delta D increases by 20%; when Qbis<-0.2*Qcurrent_max, the pipe diameter adjustment amount delta D decreases by 15%; Step 4, construct a three-color matrix based on the three-dimensional indexes of prediction accuracy, drainage efficiency and equipment loss, and execute different feedback strategies according to the three-color matrix.
2. The adaptive climate change resilient urban rain garden layout optimization method of claim 1, wherein, The theoretical flow of open channel flow is calculated by selecting Manning formula, and the theoretical flow of pressure flow is calculated by selecting Darcy-Weisbach formula or Bernoulli equation.
3. The adaptive climate change resilient urban rain garden layout optimization method of claim 1, wherein, The specific steps of training the LSTM flow prediction model are: Obtain the historical data of three types of sensors; Filter outliers and repair missing values of historical data, and normalize the data by min-max method; Arrange the data in chronological order to form a four-dimensional data set containing [water level, rainfall intensity, cumulative rainfall, flow]; For each time point, extract the water level, rainfall intensity and cumulative rainfall of the previous 60 / f time steps as the input sequence of LSTM, and the flow value of the next time point as the output, wherein f is the sampling frequency of the three types of sensors; Divide the data set in chronological order, 70% for training, 20% for validation and 10% for testing; Use mean square error (MSE) as the loss function; Set the basic parameters of the LSTM model and train it to get the trained LSTM model; Input real-time water level, rainfall intensity and cumulative rainfall into the trained LSTM model to get the predicted value, and calculate the predicted flow according to the formula Qlstm=normalized value*(historical flow maximum-historical flow minimum)+historical flow minimum.
4. The adaptive climate change resilient urban rain garden layout optimization method of claim 3, wherein, The specific setting of the basic parameters of the LSTM model includes: The LSTM layer is 2, the first layer of neurons is 64, the second layer of neurons 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 training rounds are 100.
5. The adaptive climate change resilient urban rain garden layout optimization method of claim 1, wherein, Qphys, Qlstm∈[0, Qmax], Qmax is calculated according to the formula Qmax=vsafe×A, if Qphys, Qlstm∉[Qmin, Qmax], then it is forced to be corrected to the safe flow value, wherein vsafe is the safe flow rate, and A is the water area when the flow is full.
6. The adaptive climate change resilient urban rain garden layout optimization method of claim 1, wherein, The specific steps of executing different feedback strategies according to the three-color matrix are: If Error shows red or yellow, extract the latest 50 groups of data whose error exceeds the standard, and incrementally train the LSTM model; If Efficiency shows red or yellow, when Efficiency<Effmin, add 10% safety margin to the pipe diameter adjustment amount; when Efficiency>Effmax, deduct 15% from the pipe diameter adjustment amount in the next cycle, and Effmin and Effmax are the threshold values corresponding to Efficiency; If n shows 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 oil pump, wherein NN is the cumulative action threshold.
7. A resilient urban rain garden layout optimization system for adapting to climate change, for performing the resilient urban rain garden layout optimization method for adapting to climate change according to any one of claims 1 to 6, characterized in that, It includes: The data acquisition module sets ultrasonic liquid level sensors, electromagnetic flowmeters and weather radars at the bottom of the rain garden to collect real-time water level height, real-time flow data, rainfall intensity and cumulative rainfall; The weighted flow module constructs a physical model to calculate the theoretical flow and 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 performs adaptive weighting on the theoretical flow and the predicted flow 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 the preset flow threshold matching rule and deviation correction; The closed-loop feedback module constructs a three-color matrix based on the prediction accuracy, drainage efficiency and equipment loss three-dimensional index, and executes different feedback strategies according to the three-color matrix.
Citation Information
Patent Citations
Urban intelligent drainage management system based on big data analysis
CN119886589A