An environment performance prediction method and device based on pix2pix
By using pix2pix generative adversarial networks for environmental performance prediction, the problem of low simulation efficiency in complex urban environments is solved, and fast and accurate environmental performance evaluation is achieved, supporting the optimization of urban block design.
Patent Information
- Application Number
- CN202211089225.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-07
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2042-09-07
AI Technical Summary
Traditional environmental performance simulation is inefficient and computationally complex in complex urban environments, making it difficult to achieve fast and accurate design optimization.
A pix2pix generative adversarial network is used for environmental performance prediction. Through automatic parameterized modeling, dimensionality reduction encoder and color normalization, training set samples are generated using the Rhino/Grasshopper platform, and a pix2pix generative adversarial network is constructed for environmental performance prediction.
It enables rapid and accurate prediction of urban street environment performance, avoids long-term grid division and simulation, improves design efficiency and accuracy, and supports sustainable urban environmental design.
Smart Images

Figure CN116307015B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of numerical prediction of building environmental performance, and particularly relates to an environmental performance prediction method and device based on pix2pix. BACKGROUND
[0002] In the traditional design process, environmental performance evaluation is the last step before the completion of the design, which is used to determine whether the design scheme meets the standard. Researches on the early stage of design have been widely carried out. On the one hand, in order to improve the interactivity of performance evaluation in the design process, some researchers have established data and visual interfaces between numerical simulation software and three-dimensional modeling platforms. Ladybug tools have established multiple versions on the basis of mainstream three-dimensional modeling platforms, and provide software interfaces for environmental performance simulation engines such as Radiance, EnergyPlus and OpenFOAM. On the other hand, just as urban and architectural design is a complex process in which many components interact, urban environment also has various coupling of performance indicators. Therefore, the process of optimizing environmental performance is very unpredictable. In addition, due to the limitation of the knowledge background of architects, the design decision based on subjective trial and error is inefficient. Therefore, inefficient performance simulation is an important obstacle to performance-based design in the current complex environment.
[0003] With the implementation of green building standards, almost all design schemes must be evaluated and tested for performance. The traditional environmental performance simulation method is greatly improved in optimization performance and efficiency after external optimization algorithm tools such as MATLAB and Isigh and optimization algorithm plug-ins such as genetic algorithm and simulated annealing algorithm are integrated. However, when facing the increase in the size of a geometric body, the complexity of wind environment simulation, average radiant temperature calculation and urban energy modeling increases dramatically, which leads to the nonlinear growth of the need for computer processing capacity. Therefore, inefficient performance simulation is still an important obstacle to performance-driven design of urban blocks at present. For the current increasingly complex urban environment, more efficient environmental numerical simulation methods are needed.
[0004] Generative adversarial networks (GANs) have played a crucial role in computer vision. Some researchers use GANs to discover two-dimensional flow; in the field of meteorology, GANs have been used to generate high-resolution spatial and temporal weather forecasts; in the field of building environment, pix2pix as a conditional GAN has attracted a lot of attention. It is based on image-to-image translation, which converts input images pixel by pixel to output images. Existing research has used pix2pix to predict the indoor space illumination distribution, learn the wind field distribution around the building, etc., although the current accuracy needs to be improved, but the possibility of using pix2pix for environmental performance evaluation has been proved, it is necessary to further study and improve and optimize its prediction accuracy and prediction efficiency. SUMMARY
[0005] The purpose of the present application is to provide a pix2pix-based environmental performance prediction method and device, which uses pix2pix to replace multiple environmental performance simulation processes, avoids long-term grid division and simulation, and realizes fast prediction and accurate evaluation of the environmental performance of the geometric model.
[0006] The purpose of the present application can be achieved by the following technical solutions:
[0007] A pix2pix-based environmental performance prediction method, comprising the following steps:
[0008] Automatically parameterized modeling of urban blocks to generate three-dimensional simulation geometric models of urban blocks;
[0009] Performing environmental performance simulation to generate environmental performance datasets, including pedestrian height wind datasets, UTCI datasets and annual cumulative solar radiation datasets;
[0010] Processing the three-dimensional simulation geometric models and the environmental performance datasets based on a dimensionality reduction encoder to obtain training set samples for different environmental performance prediction objects;
[0011] Color standardization processing of the training set samples;
[0012] Constructing a pix2pix generative adversarial network, which includes a generator based on U-net and a discriminator based on a convolutional PatchGAN classifier;
[0013] Based on the TensorFlow deep learning framework, training the pix2pix generative adversarial network using the training set;
[0014] The environment performance is predicted based on the pix2pix generative adversarial network after training, and the environment performance includes pedestrian height wind, UTCI and annual cumulative solar radiation.
[0015] The predicted environment performance is color standardized to obtain a prediction result.
[0016] The automatic parameterization modeling is completed by using a Rhino / Grasshopper platform and a plug-in.
[0017] The pedestrian height wind dataset is generated by calling OpenFOAM through a Butterfly plug-in, numerical simulation of pedestrian height wind is performed by setting simulation parameters, and the simulation parameters include wind tunnel parameters, boundary size conditions, reference height, environment roughness and model surface definition.
[0018] The UTCI dataset is calculated by using Ladybug, and the calculation formula is:
[0019] UTCI = T amb +f(T amb ,T MRT ,U wind ,p vapour )
[0020] Wherein, T amb is the environment temperature, T MRT is the average radiation temperature, U wind is the wind speed, and p vapour is the vapor pressure.
[0021] The annual cumulative solar radiation dataset is obtained by creating a sky model by using Ladybug and simulating by using an interest plane grid at a preconfigured distance.
[0022] The dimension reduction encoder performs the following steps to generate a training set sample:
[0023] The environment performance dataset is preprocessed to obtain an environment performance RGB image with a preconfigured size;
[0024] The three-dimensional simulation geometric model is dimensionally reduced, the height dimension information of the three-dimensional model is converted into pixels of different colors, and a two-dimensional geometric model is obtained;
[0025] The two-dimensional geometric model is respectively superimposed with different environment performance RGB images, and is image coded with the two-dimensional geometric model, to obtain a training set sample for different environment performance prediction objects.
[0026] The generator is composed of an encoder and a decoder, wherein the data processing layer of each block in the encoder is composed of a convolutional layer, a batch normalization layer and a Leaky ReLU layer, the data processing layer of the first three blocks in the decoder is composed of a transposed convolutional layer, a batch normalization layer, a Dropout layer and a ReLU layer, and the data processing layer of the remaining blocks is composed of a transposed convolutional layer, a batch normalization layer and a ReLU layer, and a skip connection is arranged between the encoder and the decoder.
[0027] The data processing layer of each block in the discriminator except the first block is composed of a convolutional layer, a batch normalization layer and a Leaky ReLU layer, which is used to distinguish the authenticity of the image, and when the input of the discriminator is the initial input image and the target image, it is classified as true; when the input of the discriminator is the initial input image and the image output by the generator, it is classified as false.
[0028] The color normalization processing is: based on a two-dimensional geometric model and the pixel colors in the environmental performance RGB image, a standard library is established, for each pixel in the to-be-processed image, the pixel color is compared with each pixel color in the standard library, the square root of the sum of squares of the difference values of the three channel values of RGB is calculated to obtain the color error, the RGB value in the standard library corresponding to the minimum color error is determined, and the RGB value is assigned to the corresponding pixel in the to-be-processed image.
[0029] A pix2pix-based environmental performance prediction device, comprising a memory, a processor, and a program stored in the memory, wherein the processor executes the program to realize the method as described above.
[0030] Compared with the prior art, the present application has the following beneficial effects:
[0031] (1) The present application uses pix2pix generative adversarial network to replace the simulation process of pedestrian height wind, thermal comfort, cumulative solar radiation and other environmental performances, avoids long-term grid division and simulation, and realizes fast prediction and accurate evaluation of the environmental performance of the geometric model.
[0032] (2) The present application effectively solves the problems of long time consumption and low efficiency of environmental performance simulation in complex urban environment, provides good support for design work under complex conditions such as urban block performance driven design, and helps to establish a sustainable future urban environment.
[0033] (3) The present application automatically parameterizes the urban block, generates a large number of simulation prototypes as training set samples by using Rhino / Grasshopper platform and plug-ins, improves the speed and breadth of data set generation, and thus improves the speed and applicability of environmental performance prediction.
[0034] (4) The application designs a dimension reduction encoder for reducing a geometric model from three dimensions to two dimensions, superimposing with an environmental performance dataset, and image encoding, so that the training set data can be applied to pix2pix for training.
[0035] (5) The application designs a color standardization algorithm to standardize the RGB values of all pixels to offset the accuracy loss of image data in the conversion process, and the corresponding environmental performance value of each pixel can be directly read from the RGB of the pixel, so that the environmental performance prediction from image to image can be established, and enough information is reserved for environmental performance prediction. BRIEF DESCRIPTION OF DRAWINGS
[0036] Figure 1 The flowchart of the method of the application is shown in the figure.
[0037] Figure 2 The schematic diagram of automatic parameterization modeling is shown in the figure.
[0038] Figure 3 The schematic diagram of pedestrian height wind value simulation is shown in the figure.
[0039] Figure 4 The results of wind tunnel data verification and grid sensitivity analysis are shown in the figure, wherein (a) is a schematic diagram of three sizes of structure grid, (b) is a comparison of the speed ratio of the monitoring points of the wind tunnel experiment and CFD, (c) is a comparison of the speed ratio of the monitoring points of the coarse grid and the basic grid, and (d) is a comparison of the speed ratio of the monitoring points of the basic grid and the fine grid.
[0040] Figure 5 The process diagram of generating pedestrian height wind training set samples by dimension reduction encoder is shown in the figure.
[0041] Figure 6 The pix2pix generative adversarial network architecture of the application is shown in the figure.
[0042] Figure 7 The schematic diagram of the pix2pix generative adversarial network is shown in the figure.
[0043] Figure 8 The schematic diagram of the environmental performance value prediction result in an embodiment is shown in the figure. DETAILED DESCRIPTION
[0044] The application will be described in detail below in combination with the drawings and specific embodiments. The embodiments are implemented on the premise of the technical solution of the application, and detailed implementation modes and specific operation processes are given, but the protection scope of the application is not limited to the following embodiments.
[0045] A pix2pix-based environmental performance prediction method, as shown in Figure 1 includes the following steps:
[0046] 1) automatically parametrically modeling urban blocks to generate three-dimensional simulation geometry models of urban blocks;
[0047] The automatic parametric modeling is completed using a Rhino / Grasshopper platform and plug-ins.
[0048] A three-dimensional simulation geometry model of a parametric urban block with 10 parameters is designed in this embodiment to ensure the diversity of the geometry shape, guarantee the generalization ability of the pix2pix GAN (i.e. the adaptability of loading different geometry models) and the diversity of the multi-objective optimization generated results. The parameters include: 1) the width of the sidewalk, 2) the width of the setback of the building, 3) the number of openings of the building, 4) the width of the opening, 5) the position of the opening, 6) the width of the building, 7) the number of layers of the building, 8) the position of the interior building opening, 9) the height of the interior building, and 10) the direction of the interior building. The boundary of the site is limited to 200m x 200m, and the maximum height of the building group is set to 60m, with 4m per floor. Two basic geometry prototypes are established in this embodiment to expand the diversity of the geometry. Finally, a total of 400 prototypes are obtained.
[0049] This embodiment refers to the form of European urban blocks to model a closed parametric block, as shown in Figure 2 .
[0050] 2) performing environmental performance simulation to generate an environmental performance dataset, which includes a pedestrian height wind dataset, a UTCI (universal thermal climate index) dataset, and an annual cumulative solar radiation dataset;
[0051] ①Pedestrian height wind dataset
[0052] The pedestrian height wind dataset is generated by calling OpenFOAM using the Butterfly plug-in, and numerical simulation of pedestrian height wind is performed by setting simulation parameters, as shown in Figure 3 . The simulation parameters include wind tunnel parameters, boundary size conditions, reference height, environmental roughness, and model surface definition.
[0053] This embodiment generates a hexahedral unstructured mesh with an expansion ratio of 1.1 between two consecutive meshes. The minimum mesh thickness around the building is 0.1M. A monitoring surface is set at a height of 1.5m from the ground, and the mesh size of the monitoring surface is 2m, as shown in Figure 3 (c). The simulation is based on the three-dimensional steady Reynolds-averaged Navier-Stokes (RANS) equation, and a standard K-e turbulence model is used. The stopping condition is that the residual is less than 10-4.
[0054] This embodiment compares and verifies the influence of three different mesh size divisions on the calculation accuracy and calculation efficiency, as shown inFigure 4
[0055] This example first uses wind tunnel experimental data for verification, and obtains a structure as shown in Figure 4 (b). Then, three structured grids are constructed for grid sensitivity analysis, as shown in Figure 4 (a). The minimum grid size of the coarse grid is 0.01 meters, containing 1876160 units, the minimum size of the base grid is 0.005 meters, containing 4172190 units, and the minimum size of the fine grid is 0.0025 meters, containing 5574240 units. As in the wind tunnel experimental setup, we simulate the case of east wind (E). The wind speed ratio is defined by the three-dimensional wind speed U of the monitoring point divided by the reference wind speed U0. We linearly fit the calculation results of the monitoring points of different grid sizes. The comparison of different grid sizes is shown in Figure 4 (c) and (d), where the difference between the coarse grid and the base grid is large, while the difference between the fine grid and the base grid is small. This shows that the base grid is a good compromise between calculation accuracy and calculation cost. Therefore, in this example, the grid setting of the parametric block model is expanded to 1: 100 based on the minimum size of the base grid.
[0056] ②UTCI data set
[0057] The UTCI data set is calculated by Ladybug, and the calculation formula is:
[0058] UTCI = T amb +f(T amb ,T MRT ,U wind ,p vapour )
[0059] Where T amb is the ambient temperature, T MRT is the average radiation temperature, U wind is the wind speed, and p vapour is the vapor pressure.
[0060] In this example, the meteorological data required for simulation (EPW file and statistical file) comes from the EnergyPlus database. The height of the monitoring surface is set to 1.5 meters, and the grid setting of the monitoring surface is 2 meters.
[0061] ③Annual cumulative solar radiation data set
[0062] The annual cumulative solar radiation data set is simulated by creating a sky model using Ladybug and a grid of interest plane at a preconfigured distance. In this example, the distance is set to 2 meters.
[0063] 3) The three-dimensional simulation geometry model and the environmental performance dataset are processed based on a dimension reduction encoder to obtain training set samples for different environmental performance prediction objects;
[0064] The dimension reduction encoder performs the following steps to generate the training set samples:
[0065] The environmental performance dataset is preprocessed to obtain an environmental performance RGB image with a size of 100*100 pixels;
[0066] The three-dimensional simulation geometry model is processed by dimension reduction to convert the height dimension information of the three-dimensional model into pixels of different colors, thereby obtaining a two-dimensional geometry model;
[0067] The two-dimensional geometry model is superimposed with different environmental performance RGB images, and the two-dimensional geometry model is image-organized to obtain training set samples for different environmental performance prediction objects.
[0068] Taking the generation of pedestrian height wind training set samples as an example, the execution process of the dimension reduction encoder is as shown in Figure 5
[0069] 4) The training set samples are subjected to color standardization processing;
[0070] The color standardization processing is as follows: a standard library is established based on the pixel colors in the two-dimensional geometry model and the environmental performance RGB image, for each pixel in the image to be processed, the pixel is compared with each pixel color in the standard library, the square root of the sum of the square differences of the RGB three-channel values is calculated to obtain a color error, the RGB value in the standard library corresponding to the minimum color error is determined, and the RGB value is assigned to the corresponding pixel in the image to be processed.
[0071] The pseudo code of the color standardization algorithm is as follows:
[0072] Algorithm name: dataset image color standardization based on OpenCV
[0073]
[0074] 5) A pix2pix generative adversarial network is constructed, and the architecture thereof is as shown in Figure 6 The pix2pix generative adversarial network includes a generator based on a U-net and a discriminator based on a convolutional PatchGAN classifier.
[0075] The principle diagram of the pix2pix generative adversarial network is as shown in Figure 7
[0076] The generator is composed of an encoder and a decoder, wherein the data processing layer of each block in the encoder is composed of a convolution layer, a batch normalization layer and a Leaky ReLU layer, the data processing layer of the first three blocks in the decoder is composed of a transposed convolution layer, a batch normalization layer, a Dropout layer and a ReLU layer, and the data processing layer of the remaining blocks is composed of a transposed convolution layer, a batch normalization layer and a ReLU layer, and a skip connection is arranged between the encoder and the decoder.
[0077] The data processing layer of each block in the discriminator except the first block is composed of a convolution layer, a batch normalization layer and a Leaky ReLU layer, for discriminating the authenticity of the image, when the input of the discriminator is the initial input image and the target image, it is classified as true; when the input of the discriminator is the initial input image and the image output by the generator, it is classified as false.
[0078] In this embodiment, the time of one training is about 10-15 hours. The formula for calculating the total generator loss is:
[0079] Total Generator Loss=GAN_loss+LAMBDA×L1_loss
[0080] Wherein, LAMBDA=100, GAN_loss is the loss function of GAN, L1_loss is the error function obtained by taking the absolute value of the difference between the target value and the model output (estimated value). In pix2pix, L1_loss penalizes the distance between the true value output (y) matching the condition and the generator output (G(x,z)) that may not match.
[0081] 6) Based on the TensorFlow deep learning framework, the training set is used to train the pix2pix generative adversarial network respectively;
[0082] The trained pix2pix generative adversarial network, dimension reduction encoder and color normalization algorithm are configured to the Rhino / Grasshopper platform through the CPython plug-in, so as to realize the prediction of environmental performance.
[0083] 7) Based on the trained pix2pix generative adversarial network, the environmental performance including pedestrian height wind, UTCI and annual cumulative solar radiation is predicted;
[0084] 8) The predicted environmental performance is color normalized to obtain the prediction result, as shown in Figure 8 .
[0085] The preferred embodiments of the present application have been described above in detail. It should be understood that modifications and variations to the preferred embodiments could be made by those skilled in the art in light of the teachings above without departing from the spirit of the present application. It is therefore to be understood that what is desired to be protected by letters patent is defined by the scope of the claims below and that on the basis of the teachings of the present application, obvious modifications and equivalents can be adopted by those skilled in the art in their possession of the teachings of the present application without departing from the spirit and scope of the application.
Claims
1. A pix2pix-based environment performance prediction method, characterized in that, The method comprises the following steps: automatically parameterizing modeling of a city block to generate a three-dimensional simulation geometry model of the city block; performing environmental performance simulation to generate an environmental performance dataset, the environmental performance dataset comprising a pedestrian height wind dataset, a UTCI dataset, and an annual cumulative solar radiation dataset; processing the three-dimensional simulation geometry model and the environmental performance dataset based on a dimension reduction encoder to obtain training set samples for different environmental performance prediction objects; performing color standardization processing on the training set samples; constructing a pix2pix generative adversarial network, the pix2pix generative adversarial network comprising a generator based on a U-net and a discriminator based on a convolutional PatchGAN classifier; training the pix2pix generative adversarial network based on a TensorFlow deep learning framework using the training set; predicting environmental performance based on the trained pix2pix generative adversarial network, the environmental performance comprising pedestrian height wind, UTCI, and annual cumulative solar radiation; performing color standardization processing on the predicted environmental performance to obtain a prediction result; The dimension reduction encoder performs the following steps to generate the training set samples: preprocessing the environmental performance dataset to obtain environmental performance RGB images of a preconfigured size; performing dimension reduction processing on the three-dimensional simulation geometry model to convert height dimension information of the three-dimensional model into pixels of different colors to obtain a two-dimensional geometry model; performing image superposition of the two-dimensional geometry model with different environmental performance RGB images and image grouping of the two-dimensional geometry model to obtain training set samples for different environmental performance prediction objects; The color standardization processing comprises the following steps: establishing a standard library based on pixel colors in the two-dimensional geometry model and the environmental performance RGB images, comparing each pixel in a to-be-processed image with each pixel color in the standard library, calculating the square root of the sum of squares of differences in RGB channel values to obtain a color error, determining the RGB value in the standard library corresponding to the minimum color error, and assigning the RGB value to the corresponding pixel in the to-be-processed image.
2. The pix2pix-based environment performance prediction method of claim 1, wherein, The automatic parameterization modeling is completed using a Rhino / Grasshopper platform and plug-ins.
3. The pix2pix-based environment performance prediction method of claim 1, wherein, The pedestrian height wind dataset is generated using a Butterfly plug-in to call OpenFOAM, numerical simulation of pedestrian height wind is performed by setting simulation parameters, and the simulation parameters comprise wind tunnel parameters, boundary size conditions, reference height, environmental roughness, and model surface definition.
4. The pix2pix-based environment performance prediction method of claim 1, wherein, The UTCI dataset is calculated using Ladybug, and the calculation formula is: UTCI = T amb + f(T amb , T MRT , U wind , p vapour ) where T amb is the ambient temperature, T MRT is the mean radiant temperature, U wind is the wind speed, p vapour is the vapor pressure.
5. The pix2pix-based environment performance prediction method of claim 1, wherein, The annual cumulative solar radiation dataset is obtained by creating a sky model using Ladybug and performing simulation using an interest plane mesh at a preconfigured distance.
6. The pix2pix-based environment performance prediction method of claim 1, wherein, The generator is composed of an encoder and a decoder, wherein the data processing layer of each block in the encoder is composed of a convolutional layer, a batch normalization layer and a Leaky ReLU layer, the data processing layer of the first three blocks in the decoder is composed of a transposed convolutional layer, a batch normalization layer, a Dropout layer and a ReLU layer, and the data processing layer of the remaining blocks is composed of a transposed convolutional layer, a batch normalization layer and a ReLU layer, and a skip connection is arranged between the encoder and the decoder.
7. The pix2pix-based environment performance prediction method of claim 1, wherein, The data processing layer of each block in the discriminator except the first block is composed of a convolutional layer, a batch normalization layer and a Leaky ReLU layer, which is used to determine the authenticity of the image, and when the input of the discriminator is the initial input image and the target image, it is classified as true; When the input of the discriminator is the initial input image and the image output by the generator, it is classified as false.
8. A pix2pix-based environment performance prediction apparatus, comprising a memory, a processor, and a program stored in the memory, wherein, The processor implements the method of any one of claims 1-7 when executing the program.
Citation Information
Patent Citations
Conditional generative adversarial network-based monocular image depth estimation method
CN108564611A
Single classifier-based electric image environment influence recognition method
CN108764298A