An optimal arrangement method for sensors for urban wind farm environmental monitoring
The urban wind farm sensor layout is optimized through CFD, mrDMD, QRpivot, SDF and PSO-RF algorithms, which solves the problems of high sensor costs and unreasonable location, and achieves efficient and economical wind farm monitoring to meet engineering needs.
Patent Information
- Application Number
- CN202310575330.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-22
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2043-05-22
AI Technical Summary
In urban wind farm monitoring, the high cost of wind speed sensors makes it difficult for sensor layout solutions to obtain as much wind farm information as possible in as small as possible, and due to urban buildings, the sensor location often does not meet the actual needs of the project.
The combination of computational fluid dynamics simulation (CFD), multi-resolution dynamic mode decomposition (mrDMD), QRpivot algorithm, spatial distance post-processing (SDF) and random forest optimization particle swarm algorithm (PSO-RF) is used to optimize sensor layout, obtain wind field data through CFD simulation, mrDMD decomposes the modal library, QRpivot selects the optimal location, SDF is limited to the building perimeter, PSO-RF comprehensively considers various wind direction angles, and finally determines the global optimal layout plan.
Taking into account urban obstacles and wind directions, an efficient, economical and engineering-friendly sensor arrangement solution is provided, reducing costs and improving the robustness of information acquisition.
Smart Images

Figure CN116628903B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of urban environmental monitoring, and in particular to an optimal arrangement method for urban wind farm environmental monitoring sensors, which is based on modal decomposition and machine learning methods. Background Art
[0002] The urban ecological environment is a special artificial ecological environment established by humans on the basis of transforming and adapting to the natural environment. Its automatic purification ability for environmental pollution is far inferior to that of the natural ecological environment. With the intensification of urbanization, the influx of population has brought unprecedented development to various industries, but it has also brought huge impacts to the urban ecological environment. It is important to conduct dynamic monitoring and trend forecasting on it.
[0003] Due to the numerous buildings in cities, urban wind fields are extremely complex, accompanied by wind-related issues such as the urban heat island effect, pollutant dispersion, extreme wind disasters, wind energy harvesting, and pedestrian comfort. Therefore, effective data monitoring of urban wind fields is crucial. However, the high cost of wind speed sensors makes their placement a critical bridge between economic and efficiency. Acquiring the most wind field information with the fewest sensors possible is a pressing and necessary requirement for numerous wind engineering research and engineering projects. Summary of the Invention
[0004] The purpose of the present invention is to overcome the shortcomings of existing technologies, adapt to actual needs, and provide an optimal urban wind farm environment monitoring sensor layout scheme based on modal decomposition and machine learning methods.
[0005] The present invention is achieved through the following technical solutions:
[0006] An optimal placement method for sensors for monitoring the urban wind farm environment is proposed. This method uses five components: computational fluid dynamics (CFD), multi-resolution dynamic mode decomposition (mrDMD), the QRpivot algorithm, signed distance function (SDF) post-processing, and a particle swarm optimization based on random forest (PSO-RF). The algorithms work in the following order: CFD, mrDMD, QRpivot, SDF, and PSO-RF.
[0007] First, CFD technology is used to simulate the wind field in the target study area to obtain spatiotemporal data at various wind attack angles in the area. Data post-processing is then performed to obtain SDF data and mask data to provide support for subsequent steps. Then, the mrDMD algorithm is used to perform modal decomposition on the data at each wind direction angle to obtain a wide-band modal library of the flow field at each wind direction angle in the study area. Based on the spatiotemporal characteristics of the data represented by the modal library, the QRpivot algorithm is combined to analyze the ability of each point in the space to represent the flow field characteristics under a single wind direction angle, thereby selecting the optimal sensor layout location under a single wind direction angle. On this basis, SDF technology is introduced to limit the sensor layout location to within 4 meters around the building (the universal width of sidewalks and green belts), avoiding the selected locations in abnormal locations such as traffic arteries, thereby meeting actual engineering needs. Finally, the PSO-RF algorithm is introduced to comprehensively consider the optimal locations under various wind directions to find the globally optimal sensor layout solution for all wind directions.
[0008] The functions and basic principles of each algorithm of the present invention are as follows:
[0009] Computational fluid dynamics (CFD) simulation technology can simulate wind field data at a specified wind direction angle for a given study area based on a known geometric model and in accordance with the National Atmospheric Boundary Layer Design Code. The simulated data is processed using a Python program to generate mask data and SDF data. The mask data is used to represent building locations.
[0010] Multi-resolution Dynamic Mode Decomposition (mrDMD) can analyze spatiotemporal data, acquiring modes across a wide frequency range, from low to high frequencies. This effectively captures data features and builds a data feature modal library. mrDMD is independent of any given dynamic system representation and is often used to analyze multivariate time series and predict short-term future states.
[0011] Based on the wide-band modal library provided by the mrDMD method, QRpivot examines all modes at each spatial point and assesses their importance based on the modal frequencies they contain. Specifically, spatial points with higher-frequency modes contain more information about flow field variations and are therefore more representative of the flow field's characteristics.
[0012] Spatial distance post-processing (signed distance function, SDF) is defined as the shortest distance between any point in an unobstructed space and the nearest obstacle. Based on the results of this technique, it is possible to clearly infer whether the sensor placement meets the actual project requirements, namely, whether it is within a 4-meter radius around the building (sidewalks and green belts).
[0013] The Particle Swarm Optimization based-RandomForest (PSO-RF) algorithm is a combined machine learning method that uses the particle swarm algorithm to automatically optimize and adjust the hyperparameters of the random forest, thereby achieving the optimal fit of the random forest. Specifically, the input of the random forest algorithm is the wind speed time history data for the optimal sensor position under all wind attack angles selected by the first three algorithms, and the output is the sum of the time-varying characteristics of each mode analyzed by the mrDMD algorithm. The particle swarm algorithm is responsible for optimizing the hyperparameters of the random forest to achieve the best fit for the input and output data. At this point, the random forest algorithm has learned the connection between the data of each sensor and the data of the entire field at the time-varying level. Based on this, the random forest algorithm can comprehensively sort the sensors and select the globally optimal sensor layout scheme for all wind direction angle conditions.
[0014] Specifically, the following steps are included:
[0015] Step 1: Extract a building model that can be numerically simulated in the target study area, then import the model to perform CFD wind field simulation to obtain the time-space data at various wind attack angles in the area. Based on this time-space data, the spatial wind field data at any time step can be obtained, and this data is preprocessed to generate the SDF data and mask data needed later.
[0016] Step 2: Apply the mrDMD method to the CFD data and establish an iterative process by recursively filtering the low-frequency DMD modes until sufficient multi-resolution decomposition is achieved. This process is used to extract data features, as shown in formula (1):
[0017]
[0018] In the announcement (1), and denote the mode and eigenvalue of the DMD at the i-th level of decomposition, represents the initial value of each mode in level i, k i (k1,k2,k3…k n ) is the number of low-frequency modes retained at each level.
[0019] Based on the analysis results of mrDMD, the QRpivot algorithm is used to find the spatial location that best represents the data characteristics in a computationally efficient manner, that is, the optimal sensor location. The specific implementation can refer to formula (2). The rows in have the highest L2 norm, which represents the location with the maximum wind field frequency and therefore the greatest variability, that is, the spatial location that best represents the data characteristics, C T , Q and R represent the column permutation matrix C decomposed from the m×n matrix A T , the upper triangular matrix R and the unitary matrix Q based on the column pivoting of the simplified matrix QR, that is, AC T =QR.
[0020]
[0021] However, the sensor locations obtained in this step are often dense, and the sensor locations are often located in unreasonable places at the engineering level, such as the center of the road.
[0022] Step 3. To solve the above problem, SDF technology is used to represent the building geometry, providing general information about different building shapes and distances between buildings. Based on the distance information, it can help determine the true scale sensor position and limit the sensor to a reasonable placement area in engineering to meet actual construction requirements. The specific implementation can refer to formulas (3) and (4). In formula (3), Z represents the zero level set, which is used to describe the building geometry boundary in the area, and f(i,j) represents the level set function, that is, when f(i,j) = 0, (i,j) is on the boundary of the building geometry; when f(i,j) > 0, (i,j) is outside the building geometry; when f(i,j) < 0, (i,j) is inside the building geometry. In formula (4), D(i,j) represents the shortest distance between a given point (i,j) and its nearest building boundary Z.
[0023] Z={(i,j)∈R 2 :f(i,j)=0} (3)
[0024]
[0025] Step 4. Since mrDMD consumes a lot of computer memory, it is impossible to use mrDMD to directly process the data of all wind direction angles. Therefore, the PSO-RF method is introduced to perform a comprehensive analysis of the working conditions of all wind direction angles to generate a global optimal sensor layout strategy while saving computing resources. The PSO algorithm is used to adjust the hyperparameters of the random forest model through iteration, including the maximum number of weak learners, the minimum number of samples for dividing nodes, and the minimum number of samples at the nodes. The iterative process can be referred to Formula (5). In Formula (5), c1 and c2 represent learning factors, is the inertia factor, and pbesti and gbest i are the values of the best individual particle position and the best position of the entire population in the i-th dimension, rand1 and rand2 represent random numbers in (0, 1), and v i and x i are the speed and position of the particle value in the i-th dimension respectively.
[0026] v i+1 =ω×v i +c1×rand1×(pbest i -x i )+c2×rand2×(gbest i -x i ) (5)
[0027] The RF algorithm is an ensemble algorithm that trains multiple weak learners, such as decision tree regressors, simultaneously and generates the final result by averaging the outputs of all weak learners. It is always better than a single learner in terms of prediction accuracy and can avoid overfitting problems. The importance ranking function (6) based on random forest in this invention is as follows: First, input the trained model m, the data set D∈R N×J , where N is the number of samples and J is the number of features; then calculate the reference score s (such as the R2 of the regression variable) of the model m on the dataset D; then for each feature j (that is, the column data in D), first randomly shuffle the column j of the dataset D to generate a named The corrupted version of the dataset is then used to calculate the model m on the corrupted data. Score s k,j ;Finally calculate the feature f j The importance of j , defined as:
[0028]
[0029] The optimal sensor location obtained using this solution not only takes into account the layout of obstacles in the city, meeting the actual engineering needs, but also takes into account all possible wind attack angles, meeting the robustness required to deal with various situations, and proposes a very effective urban wind farm sensor layout solution.
[0030] The beneficial effect of the present invention is that it comprehensively considers the actual distribution of obstacles in the city and the various wind directions and wind fields that may appear in the city, and proposes an optimal layout plan for urban wind field sensors with strong robustness and universality. It can greatly reduce the cost of engineering layout while ensuring efficient information acquisition, and meet the research and monitoring needs of various parties. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0032] In order to deepen the understanding of the present invention, the present invention will be further described in detail below with reference to the examples. The examples are only used to explain the present invention and do not limit the scope of protection of the present invention.
[0033] Example: Figure 1 As shown in the figure, a method for optimal placement of sensors for urban wind farm environmental monitoring is proposed, which uses five parts: computational fluid dynamics (CFD), multi-resolution dynamic mode decomposition (mrDMD), QRpivot algorithm, signed distance function (SDF) post-processing technology, and particle swarm optimization based-random forest (PSO-RF). The working order of each algorithm is: CFD, mrDMD, QRpivot, SDF, PSO-RF, so as to select the best sensor placement location in actual engineering.
[0034] Step 1: Extract the building model that can be numerically simulated in the target study area, then import the model to perform CFD wind field simulation, and obtain the time-space data of the area at each wind attack angle. Based on this time-space data, the spatial wind field data of any time step can be obtained, and the data is preprocessed to generate the SDF data and mask data needed later, such as Figure 1 As shown in the first section.
[0035] Step 2: Using CFD data, apply the mrDMD method to establish an iterative process by recursively filtering the low-frequency DMD modes until sufficient multi-resolution decomposition is achieved. This process is used to extract data features. The specific implementation can be referred to formula (1). In formula (1): and denote the mode and eigenvalue of the DMD at the i-th level of decomposition, represents the initial value of each mode in level i, k i (k1,k2,k3…k n ) is the number of low-frequency modes retained at each level.
[0036]
[0037] Based on the analysis results of mrDMD, the QR pivot algorithm is used to find the spatial position that best represents the data characteristics in a computationally efficient manner, that is, the optimal sensor position. The specific implementation can refer to formula (2), where The row in has the highest L2 norm, which represents the location with the maximum wind field frequency and therefore the maximum variability, that is, the spatial location that best represents the data characteristics. CT, Q, and R represent the column permutation matrix CT, the upper triangular matrix R, and the unitary matrix Q based on the column pivoting of the simplified matrix QR, respectively, which are decomposed into m×n matrix A. T =QR.
[0038]
[0039] However, the sensor locations obtained in this step are often dense and often located in unreasonable places at the engineering level, such as the center of the road. Figure 1 As shown in the second section.
[0040] Step three, to solve the above problem, use SDF technology to represent the building geometry, provide common information of different building shapes and distances between buildings, and the distance between the two can help determine the true scale of the sensor position, and limit the sensor to a reasonable placement area in engineering to meet actual construction needs. The specific implementation can refer to formulas (3) and (4). In formula (3), Z represents the zero level set, which is used to describe the building geometry boundary in the area, and f(i,j) represents the level set function, that is, when f(i,j) = 0, (i,j) is on the boundary of the building geometry; when f(i,j) > 0, (i,j) is outside the building geometry; when f(i,j) < 0, (i,j) is within the building geometry. In formula (4), D(i,j) represents the shortest distance between a given point (i,j) and its nearest building boundary Z. As Figure 1 As shown in the third section.
[0041] Z={(i,j)∈R 2 :f(i,j)=0} (3)
[0042]
[0043] Step 4. Since mrDMD consumes a lot of computer memory, it is impossible to use mrDMD to directly process the data of all wind direction angles. Therefore, the PSO-RF method is introduced to perform a comprehensive analysis of the working conditions of all wind direction angles to generate a global optimal sensor layout strategy while saving computing resources. The PSO algorithm is used to adjust the hyperparameters of the random forest model through iteration, including the maximum number of weak learners, the minimum number of samples for dividing nodes, and the minimum number of samples at nodes. The iterative process can be referred to Formula (5). In Formula (5), c1 and c2 represent learning factors, is the inertia factor, and pbest i and gbest i are the values of the best individual particle position and the best position of the entire population in the i-th dimension, rand1 and rand2 represent random numbers in (0, 1), and v i and x i are the speed and position of the particle value in the i-th dimension respectively.
[0044] v i+1 =ω×v i +c1×rand1×(pbest i -x i )+c2×rand2×(gbest i -x i ) (5)
[0045] The RF algorithm is an ensemble algorithm that trains multiple weak learners, such as decision tree regressors, simultaneously and generates the final result by averaging the outputs of all weak learners. It is always better than a single learner in terms of prediction accuracy and can avoid overfitting problems. The importance ranking function (6) based on random forest in this invention is as follows: First, input the trained model m, the data set D∈R N×J , where N is the number of samples and J is the number of features; then calculate the reference score s (such as the R2 of the regression variable) of the model m on the dataset D; then for each feature j (that is, the column data in D), first randomly shuffle the column j of the dataset D to generate a named The corrupted version of the dataset is then used to calculate the model m on the corrupted data. Score s k,j ;Finally calculate the feature f j The importance of j , defined as:
[0046]
[0047] like Figure 1 As shown in the fourth section.
[0048] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the foregoing embodiments. The foregoing embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for optimal placement of sensors for urban wind farm environment monitoring, characterized in that: The following steps are involved: Step 1: Use CFD technology to simulate the wind field in the target study area, obtain the spatiotemporal data at various wind attack angles in the area, and perform data post-processing to obtain SDF data and mask data to provide support for subsequent steps; Step 2: Use the mrDMD algorithm to perform modal decomposition on the data at each wind direction angle, and obtain a wide-band modal library of the flow field at each wind direction angle in the study area. Based on the temporal and spatial characteristics of the data represented by the modal library, the QRpivot algorithm is combined to analyze the ability of each point in the space to represent the flow field characteristics under a single wind direction angle, thereby selecting the optimal sensor layout location under a single wind direction angle. Step 3: Introduce SDF technology to limit the placement of sensors within a reasonable range around the building, avoiding abnormal locations and thus meeting actual engineering needs; Step 4: Introduce the PSO-RF algorithm to comprehensively consider the optimal position under each wind direction angle and find the global optimal sensor layout scheme for each wind direction angle; The specific process of step 2 is: using CFD data to apply the mrDMD method, an iterative process is established by recursively filtering the DMD mode at low frequencies until no higher frequency modes can be decomposed, and the data features are extracted in this process, as shown in formula (1): In formula (1), and denote the mode and eigenvalue of the DMD at the i-th level of decomposition, represents the initial value of each mode in level i, k i (k1,k2,k3 k n ) is the number of low-frequency modes retained at each level; Based on the analysis results of mrDMD, the QRpivot algorithm is used to find the spatial location that best represents the data characteristics in a computationally efficient manner, that is, the optimal sensor location. The specific implementation can refer to formula (2), where The row in has the highest L2 norm, which represents the location with the highest wind modal frequency and therefore the greatest variability, that is, the spatial location that best represents the data characteristics, C T , Q and R represent the column permutation matrix C decomposed from the m×n matrix A T , the upper triangular matrix R and the unitary matrix Q based on the column pivoting of the simplified matrix QR, that is, AC T =QR, 2. The optimal arrangement method of urban wind farm environment monitoring sensors according to claim 1 is characterized in that: The specific process of step one is as follows: extract a building model that can be numerically simulated in the target study area, then import the model to perform CFD wind field simulation, obtain the time-space data of the area at various wind attack angles, obtain the spatial wind field data at any time step based on this time-space data, and preprocess this data to generate the SDF data and mask data needed later.
3. The optimal arrangement method of urban wind farm environment monitoring sensors according to claim 2 is characterized in that: The specific process of step three is as follows: using SDF technology to represent the building geometry, providing general information of different building shapes and distances between buildings, and using the distance information to help determine the true scale sensor position, limiting the sensor to a reasonable placement area in engineering to meet actual construction requirements. The specific implementation can refer to formulas (3) and (4). In formula (3), Z represents the zero level set, which is used to describe the building geometry boundary in the area, and f(i, j) represents the level set function, that is, when f(i, j) = 0, (i, j) is on the boundary of the building geometry; when f(i, j) > 0, (i, j) is outside the building geometry. When f(i, j) < 0, (i, j) is within the building geometry, and D(i, j) in Equation (4) represents the shortest distance between a given point (i, j) and its nearest building boundary Z: Z={(i,j)∈R 2 :f(i,j)=0} (3) 4. The optimal arrangement method of urban wind farm environment monitoring sensors according to claim 3 is characterized in that: The specific process of step 4 is as follows: the PSO-RF method is introduced to perform a comprehensive analysis of the working conditions of all wind direction angles to generate a globally optimal sensor layout strategy while saving computing resources. The PSO algorithm adjusts the hyperparameters of the random forest model through iteration, including the maximum number of weak learners, the minimum number of samples for dividing nodes, and the minimum number of samples at nodes. The iterative process can refer to formula (5). In formula (5), c1 and c2 represent learning factors, is the inertia factor, and pbest i and gbest i are the values of the best individual particle position and the best position of the entire population in the i-th dimension, rand1 and rand2 represent random numbers in (0, 1), and v i and x i are the speed and position of the particle value in the i-th dimension: v i+1 = ω×v i +c1×rand1×(pbest i -x i )+c2×rand2×(gbest i -x i ) (5)。 5. The optimal arrangement method of urban wind farm environment monitoring sensors according to claim 4 is characterized in that: In step 4, the importance ranking function (6) based on random forest is as follows: First, input the trained model m, the data set D∈R N×J , where N is the number of samples and J is the number of features; then calculate the reference score s of model m on dataset D; then for each feature j, first randomly shuffle the column j of dataset D to generate a matrix called D k,j The corrupted version of the dataset is then used to calculate the model m on the corrupted data D k,j Score s k,j ;Finally calculate the feature f j The importance of j , defined as: