A velocity field measurement method based on PINN neural network
Patent Information
- Application Number
- CN202211641312.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2042-12-20
AI Technical Summary
[0014]本发明提供了一种基于PINN神经网络的速度场测量方法,以解决现有技术流场的速度场测量方法中,进行数据可视化时,流场图像的分辨率低,同时计算效率低的问题
[0029]本发明和现有技术相比具有如下有益效果:本发明将PINN神经网络模型应用到速度场测量中,生成的模型基于真实流场参数的学习,具有可推广性。在图像处理方面,一般的图像处理技术通常采用数学的离散插值法,其结果在物理层面上的合理性有待商榷,而PINN模型中将偏微分方程作为物理约束,在显著提高了流场分辨率的,同时还能够保证模型结果在物理层面的可解释性。
Smart Images

Figure CN116127834B_ABST
Abstract
Description
Technical Field
[0001] This invention pertains to the velocity measurement of flow fields in fluid mechanics, specifically relating to a velocity field measurement method based on a PINN neural network. Background Technology
[0002] Currently, velocity measurement in flow fields mainly employs techniques such as particle tracer velocimetry (PIV), particle tracking velocimetry (PTV), and optical flow methods.
[0003] PIV and PTV techniques are essentially image analysis techniques: they capture images of tracer particles (or equivalent tracer particle bubbles) added to a flow field through multiple exposures. The difference is that PIV technology is suitable for situations where the concentration of tracer particles in the flow field is high, resulting in high imaging density; while PTV technology is used for situations where the particle concentration is extremely low, and the particles follow the flow almost as individual particles, resulting in lower imaging density.
[0004] For a tracer particle in a two-dimensional flow field, its displacements in the two-dimensional direction are x(t) and y(t), respectively. Then, the instantaneous velocity of the flow field at the location of the tracer particle at time t is as follows:
[0005]
[0006] In studies, a relatively small exposure time Δt is typically set, and the instantaneous average velocity is used to represent the instantaneous velocity. However, due to the small size and large number of particles, it is difficult to distinguish the same particle from two images using conventional methods. Therefore, image analysis theory is needed to determine the correspondence between images.
[0007] In image processing, the image is first divided into several inspection windows, and then processed using image cross-correlation. Cross-correlation is a statistical method that calculates the displacement data of particles in the image by cross-correlation of the light intensity at different times. For example... Figure 1 As shown, after time Δt, the particle undergoes displacement, which is represented in the image as a shift in light intensity information. By cross-correlation calculation of the light intensities before and after the shift, the cross-correlation function reaches its maximum value when the displacement parameter is exactly (Δx, Δy), thus identifying it as the same particle and obtaining the flow field velocity information.
[0008] The above method has certain requirements regarding the particle concentration in the flow field: too high a concentration will cause particle overlap and spotting; too low a concentration will reduce the cross-correlation amplitude of the image. Typically, the particle concentration in the flow field is 10-1 per cubic meter. 10 ~10 11 Therefore, when the flow field is too large, it is more difficult to capture the flow details, and the accuracy of the flow field information will be reduced.
[0009] Optical flow, on the other hand, does not require the introduction of tracer particles into the flow field; it obtains velocity information simply by comparing the changes in grayscale values between two images. Its approach is similar to PIV (Picture-Induced Volume) analysis, which considers the motion of tracer particles, while optical flow considers the motion of image pixels. By calculating the instantaneous changes in the grayscale patterns of pixels, it derives the true motion information.
[0010] However, experiments show that the accuracy of the aforementioned methods (i.e., PIV, PTV, optical flow, etc.) in reconstructing flow field information is less than satisfactory. Furthermore, obtaining high-precision flow field information and improving flow field resolution through experimental methods requires a significant investment of resources.
[0011] The concept of flow field resolution originates from the problem of flow field visualization in numerical simulations, i.e., the level of detail in the flow field image. The discreteness of the data has a significant impact on the flow field resolution.
[0012] From a mathematical perspective, a continuous function can characterize the relationship between a physical quantity in a flow field and its spatial and temporal coordinates. In numerical simulations of flow fields, the continuous function is approximated by a series of discrete values formed by several grid points, thus describing the flow field. Therefore, the density of the grid determines the degree of data discretization; and the degree of data discretization determines the approximation of the function, ultimately affecting the visualization and thus the resolution of the flow field. Figure 2 As shown, the mesh density has a significant impact on the flow field resolution: the denser the mesh, the higher the flow field resolution. However, at the same time, the denser the mesh, the lower the computational efficiency.
[0013] It is easy to see that PIV technology and flow field numerical simulation have certain similarities: PIV technology uses a series of tracer particles as discrete points to describe the flow field; flow field numerical simulation describes the flow field by setting grid points as discrete points. Due to the limited number of measurement points in the experiment, the data measured by PIV is relatively discrete, resulting in a low resolution flow field image when visualized. Summary of the Invention
[0014] This invention provides a velocity field measurement method based on PINN neural network to solve the problems of low resolution and low computational efficiency of flow field images when performing data visualization in existing flow field velocity field measurement methods.
[0015] This invention discloses a velocity field measurement method based on a PINN neural network, the method comprising the following steps:
[0016] S1. Perform particle image velocimetry on the two-dimensional flow field to obtain m×n dimensional data matrices U and V containing flow velocity information; where m is the number of sampling points, n is the number of exposures, and U and V are time-series combinations of physical data from m spatial points at different exposure times.
[0017] S2. Perform data preprocessing on the data matrix generated in step S1 to form the total dataset, and then perform random sampling to establish the training set, test set and validation set;
[0018] S3. Construct a PINN neural network model, substitute the data from the training set into the PINN neural network model for training, and after multiple rounds of iterative updates, obtain the PINN neural network model of the velocity field with respect to space and time;
[0019] S4. By inputting the spatiotemporal coordinates of the two-dimensional flow field into the PINN neural network model of the velocity field with respect to space and time, the velocity field information corresponding to the spatiotemporal coordinates can be predicted, thereby obtaining super-resolution velocity field information.
[0020] Furthermore, in step S3, when building the PINN neural network model, partial differential equation terms are added to the error function of the PINN neural network model as physical constraints, so that the model results satisfy the physical interpretation.
[0021] Furthermore, the partial differential equation terms include several partial derivative terms. The numerical values of each term are solved by programming. By adding physical constraints and iterating multiple times, the numerical relationships of each partial derivative term are made to satisfy the equality relationship of the governing equation, thereby improving the interpretability of the model results at the physical level.
[0022] Furthermore, the training process of the PINN neural network model is as follows: The data from the training set is substituted into the PINN neural network model; the PINN neural network model is initialized to generate relevant weights and corresponding output values; the error function between the output value and the true value is calculated, wherein the error function consists of a statistical function and a control equation. The statistical function is used to measure the error between the output value and the corresponding true value in the training set, and the control equation is used to ensure the interpretability of the output value at the physical level; the result of the error function is optimized by gradient descent; the optimized correction value is forward propagated to the hidden layer according to the chain rule to correct the weights; after multiple iterations and weight updates, the PINN neural network model of the velocity field with respect to space and time is output, completing the training of the model.
[0023] Furthermore, the governing equations include the continuity equation and the momentum equation. During the training process of the PINN neural network model, the calculation process of the momentum equation in the x-direction in any iteration is as follows:
[0024]
[0025]
[0026] In the formula, X is the input value, including the spatiotemporal coordinates of the sampling point; ω and B are the weights and biases of the current iteration, respectively; u and v are the output values of the current iteration, i.e., the predicted velocities in the x and y directions, satisfying u = ωX + B; ρ = C1 is the density; μ = C2 is the viscosity, both constants; and p is the pressure. The values of each component of the momentum equation corresponding to the output value of the current iteration can be calculated using a programming method. The momentum equation can then be transformed from a partial differential equation into a constant equation, namely C1(a+bu+cv)+d-C2e, which we can call Loss. momentum-x This refers to the error value; ideally, the error value should be 0, meaning the momentum equation is fully satisfied. However, in reality, an error exists. This error is addressed by taking the gradient of the error function, i.e., grad(Loss). momentum-x Then, perform gradient descent optimization, update the weights and biases to ω' and B', and perform a new round of iteration to update the output of u.
[0027] Furthermore, the method further includes: normalizing the data in the training set, the test set, and the validation set in step S2 to reduce the data range in each set.
[0028] Furthermore, the training set comprises more than 50% of the total dataset, so that the training set can reflect the characteristics of the total dataset.
[0029] Compared with existing technologies, this invention has the following advantages: This invention applies the PINN neural network model to velocity field measurement, and the generated model is based on the learning of real flow field parameters, thus possessing generalizability. In image processing, general image processing techniques typically employ mathematical discrete interpolation methods, the physical validity of which is questionable. In contrast, the PINN model uses partial differential equations as physical constraints, significantly improving flow field resolution while ensuring the interpretability of the model results at the physical level. Attached Figure Description
[0030] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.
[0031] Figure 1 This is a schematic diagram of the cross-correlation method;
[0032] Figure 2 This is a schematic diagram illustrating the effect of grid density on flow field resolution.
[0033] Figure 3 This is a schematic diagram of the PINN model;
[0034] Figure 4 This is a flowchart of particle image velocimetry in an embodiment of the present invention;
[0035] Figure 5 This is a schematic diagram of the data matrix in an embodiment of the present invention;
[0036] Figure 6 This is a flowchart illustrating the training process of the PINN neural network model in this embodiment of the invention.
[0037] Figure 7 This refers to the super-resolution velocity field information obtained by the velocity field measurement method based on the PINN neural network in this embodiment of the invention. Detailed Implementation
[0038] 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.
[0039] Super-resolution technology is essentially an image processing technique that can reconstruct low-resolution images at high resolution, increasing pixel density and providing more detailed information, which complements experimental methods. A series of interpolation algorithms have been proposed for low-resolution image processing. However, because interpolation algorithms rely on the small neighborhood information of the interpolation points, the reconstructed images are often blurry when the sample data is highly discrete.
[0040] Some scholars have introduced deep learning frameworks and applied super-resolution reconstruction to flow field reconstruction. However, for the visualization of flow fields, simply using mathematical methods to improve image resolution yields questionable results: because statistical methods such as interpolation and probability calculations are typically used to reduce data dispersion, the generated data may not satisfy physical interpretations. Therefore, combining the processing results of super-resolution technology with physical interpretations has become a challenge.
[0041] Furthermore, while the results of flow field numerical simulations satisfy the physical interpretation, they are not essentially measurements of the actual flow field. Instead, they are deductions of flow problems based on fluid mechanics theory by solving numerical solutions to a system of partial differential equations. In many cases, flow field numerical simulations yield theoretical values and cannot completely replace experimental methods. Theoretically, PIV measurements also satisfy the relationships of a system of partial differential equations.
[0042] The PINN model fully utilizes the prior information of the physical constraint equations that generate the data and adds them as regularization constraints to its error function. Therefore, the PINN model can reconstruct the regional flow with relatively high accuracy using a small amount of flow field sampling data. Due to its equation constraint feature, the PINN model exhibits some very significant characteristics regarding the impact of data noise intensity, training data size, and time sampling interval on the reconstruction accuracy.
[0043] The specific process of PINN is as follows: Figure 3 As shown, its essence is to add physical equations as constraints to the error function term based on a multi-layer neural network model, thereby constraining the evolution direction of the model during forward propagation. The ideal linear relationship between input data X and output data Y can be obtained through the neural network model, i.e., Y = wX + b. However, due to computational limitations, there is a certain error between the predicted data Y′ and the output data Y. By defining an error function to measure the error between the predicted data Y′ and the output data Y, within a given number of iterations, when the error function reaches its minimum value, the error between the predicted data Y′ and the output data Y is considered to be minimal. At this point, the linear relationship Y′ = w′X + b′ obtained by the neural network model can be used as a substitute for the ideal linear relationship.
[0044] Therefore, based on PIV measurement results, this invention employs a method of solving numerical solutions to a system of partial differential equations in fluid mechanics to reduce the dispersion of the data, thereby improving the resolution of the flow field. This ensures both the accuracy of the flow field data and the physical interpretability of the super-resolution reconstruction results.
[0045] This invention discloses a velocity field measurement method based on a PINN neural network, the method comprising the following steps:
[0046] S1. Perform particle image velocimetry (PIV) on the two-dimensional flow field to obtain m×n dimensional data matrices U and V containing flow velocity information; where m is the number of sampling points, n is the number of exposures, and U and V are time-series combinations of physical data from m spatial points at different exposure times.
[0047] The process of particle image velocimetry is as follows: Figure 4As shown, the data obtained after particle image velocimetry is processed by noise reduction and image cross-correlation to obtain flow field velocity information, and then a data matrix is generated consisting of spatial coordinates (x, y), time coordinate t, velocity information (U, V) and pressure information p.
[0048] like Figure 5 As shown, the spatial coordinates (x, y) are an m×2 dimensional matrix, representing the spatial coordinates of m sampling points; t = [0, Δt, 2Δt, ..., (n-1)Δt] represents the exposure time. U and V are time-series combinations of the physical data of m spatial points at different exposure times: such as U ij Represents spatial coordinates (x i y i The corresponding sampling point is at t j The velocity in the x-direction at time t.
[0049] S2. The data matrix generated in step S1 is preprocessed to form the total dataset. Then, random sampling is performed to establish training, testing, and validation sets. Preprocessing includes data cleaning and noise reduction processes to purify the source data and reduce acquisition errors in particle image velocimetry experiments.
[0050] The training set is used to generate and train the model, the test set is used to verify the model's accuracy, and the validation set is used to help adjust a series of model parameters. Typically, the training set accounts for more than 50% of the total dataset, so it is necessary to fully sample the total dataset to ensure that the training set can reflect the characteristics of the total dataset.
[0051] Since a large data range can negatively impact model performance, data in the training, test, and validation sets are normalized to reduce the data range within each set. For example, for a set G, if its maximum and minimum values are g... max g min Then for any element g i The normalized result is
[0052] S3. Construct a PINN neural network model. Input the training set data into the PINN neural network model for training. After multiple rounds of iterative updates, obtain the PINN neural network model of the velocity field in terms of space and time. The training process is as follows: Figure 6 As shown.
[0053] Building the PINN neural network model involves setting parameters such as the number of hidden layers, the number of neurons, the learning rate, and the optimization method. It also involves adding partial differential equation terms to the error function of the PINN neural network model as physical constraints to reduce the dispersion of the data.
[0054] The partial differential equation terms include several terms composed of partial derivatives, such as... The numerical values of each term can be solved through programming. By adding physical constraints and iterating multiple times, the numerical relationships of each partial derivative term can be made to satisfy the equality relationships of the governing equations such as the continuity equation and the momentum equation, thereby improving the interpretability of the model results at the physical level.
[0055] The training process of the PINN neural network model is as follows: The data from the training set is input into the PINN neural network model, which is then initialized to generate relevant weights and corresponding output values. An error function is calculated between the output value and the true value. This error function consists of a statistical function and a governing equation. The statistical function measures the error between the output value and the corresponding true value in the training set, while the governing equation ensures the interpretability of the output value at the physical level. The result of the error function is then optimized using gradient descent. The optimized correction value is forward-propagated to the hidden layer according to the chain rule to adjust the weights. After multiple iterations and weight updates, the output velocity field of the PINN neural network model with respect to space and time is generated, completing the training of the model.
[0056] In this embodiment, the governing equations include the continuity equation and the momentum equation. During the training process of the PINN neural network model, the calculation process of the momentum equation in the x-direction in any iteration is as follows:
[0057]
[0058]
[0059] In the formula, X is the input value, including the spatiotemporal coordinates of the sampling point; ω and B are the weights and biases of the current iteration, respectively; u and v are the output values of the current iteration, i.e., the predicted velocities in the x and y directions, satisfying u = ωX + B; ρ = C1 is the density; μ = C2 is the viscosity, both constants; and p is the pressure. The values of each component of the momentum equation corresponding to the output value of the current iteration can be calculated using a programming method. The momentum equation can then be transformed from a partial differential equation into a constant equation, namely C1(a+bu+cv)+d-C2e, which we can call Loss. momentum-x This refers to the error value; ideally, the error value should be 0, meaning the momentum equation is fully satisfied. However, in reality, an error exists. This error is addressed by taking the gradient of the error function, i.e., grad(Loss). momentum-x Then, perform gradient descent optimization, update the weights and biases to ω' and B', and perform a new round of iteration to update the output of u.
[0060] The calculations in other directions are the same as described above. After multiple iterations, the output velocity field is represented by a PINN neural network model in terms of space and time.
[0061] S4. For the PINN neural network model of the velocity field with respect to space and time, by inputting the spatiotemporal coordinates of the two-dimensional flow field, which consist of time and space, the model can predict the velocity field information corresponding to the spatiotemporal coordinates, thus obtaining super-resolution velocity field information. Furthermore, the model can handle denser spatiotemporal coordinates, thereby reducing the data dispersion and improving the resolution of the flow field.
[0062] In this invention, by improving the PINN neural network model and adding a partial differential equation composed of continuity and momentum to the error function for physical constraints, super-resolution velocity field information is obtained while improving computational efficiency. Moreover, the super-resolution reconstruction results are physically interpretable.
[0063] Figure 7 This demonstrates the acquisition of super-resolution velocity field information based on the PINN neural network model. Figure A shows the original flow field obtained using PIV technology. After processing by the PINN model, the details of the obtained flow field can be clearly seen in Figure B.
[0064] The above embodiments are merely exemplary embodiments of this application and are not intended to limit this application. The scope of protection of this application is defined by the claims. Those skilled in the art can make various modifications or equivalent substitutions to this application within its substance and scope of protection, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of this application.
Claims
1. A velocity field measurement method based on PINN neural network, characterized in that, The method includes the following steps: S1. Perform particle image velocimetry on the two-dimensional flow field to obtain information containing the flow velocity. 3D data matrix , ;in The number of sampling points. For the number of exposures, , Different exposure times A time-series combination of physical data from a spatial point; S2. Perform data preprocessing on the data matrix generated in step S1 to form the total dataset, and then perform random sampling to establish the training set, test set and validation set; S3. Construct a PINN neural network model and add partial differential equation terms to the error function of the PINN neural network model as physical constraints to ensure that the model results satisfy physical interpretability. The partial differential equation terms include several partial derivative terms. The numerical values of each term are solved by programming. By adding physical constraints and iterating multiple times, the numerical relationships of each partial derivative term are made to satisfy the equality relationship of the governing equation, so as to improve the interpretability of the model results at the physical level. The data from the training set is substituted into the PINN neural network model for training. After multiple rounds of iterative updates, a PINN neural network model of the velocity field with respect to space and time is obtained. S4. By inputting the spatiotemporal coordinates of the two-dimensional flow field into the PINN neural network model of the velocity field with respect to space and time, the velocity field information corresponding to the spatiotemporal coordinates can be predicted, thereby obtaining super-resolution velocity field information.
2. The velocity field measurement method based on PINN neural network according to claim 1, characterized in that, The training process of the PINN neural network model is as follows: The data from the training set is substituted into the PINN neural network model, which is then initialized to generate relevant weights and corresponding output values. An error function is calculated between the output value and the true value. This error function consists of a statistical function and a governing equation. The statistical function measures the error between the output value and the corresponding true value in the training set, while the governing equation ensures the interpretability of the output value at the physical level. The result of the error function is then optimized using gradient descent. The optimized correction value is forward-propagated to the hidden layer according to the chain rule to correct the weights. After multiple iterations and weight updates, the output velocity field of the PINN neural network model with respect to space and time is generated, completing the training of the model.
3. The velocity field measurement method based on PINN neural network according to claim 2, characterized in that, The governing equations include the continuity equation and the momentum equation. During the training of the PINN neural network model, the calculation process of the momentum equation in the x-direction in any iteration is as follows: ; In the formula, The input value contains the spatiotemporal coordinates of the sampling points. , These are the weights and biases for this iteration, respectively. , The output value of this iteration, i.e., the predicted velocities in the x and y directions in this iteration, satisfies... ; For density, Here, is the viscosity, and all are constants. For pressure; using programming methods, the values of each component of the momentum equation corresponding to the output value of this round can be calculated, that is... , , , , Then the momentum equation can be transformed from a partial differential equation into a constant equation, i.e. , to make him This refers to the error value; ideally, the error value should be 0, meaning the momentum equation is fully satisfied. However, in reality, an error exists. By taking the gradient of the error function, we can obtain the error value. Gradient descent optimization is performed, and the weights and biases are updated forward. , To carry out a new round of iterations and updates The output of .
4. The velocity field measurement method based on PINN neural network according to claim 1, characterized in that, The method further includes: normalizing the data in the training set, the test set, and the validation set in step S2 to reduce the data range in each set.
5. The velocity field measurement method based on PINN neural network according to claim 1, characterized in that, The training set comprises more than 50% of the total dataset, so that the training set can reflect the characteristics of the total dataset.
Citation Information
Patent Citations
Particle image speed measuring method based on convolutional neural network
CN109669049A
Flow field information acquisition method and device, model training method and device and electronic equipment
CN114282448A