A method for turbulent flow super-resolution based on a Transformer deep learning architecture

By employing a turbulence super-resolution method based on the Transformer deep learning architecture, and utilizing multi-head self-attention mechanism and residual operation, the problem of limited accuracy in turbulence field reconstruction in traditional methods is solved, achieving efficient and accurate turbulence field super-resolution reconstruction.

CN116468602BActive Publication Date: 2026-07-21GUANGXI NORMAL UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGXI NORMAL UNIV
Filing Date
2023-03-14
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing super-resolution methods for turbulent fields suffer from jagged artifacts and loss of detail. Traditional methods have limited reconstruction accuracy, especially for highly nonlinear turbulent fields.

Method used

A turbulence super-resolution method based on the Transformer deep learning architecture is adopted. By combining feature extraction blocks, encoder blocks, decoder blocks and upsampling blocks, and utilizing multi-head self-attention mechanism and residual operation, high-quality and high-resolution turbulence field images are generated.

Benefits of technology

It achieves efficient and accurate super-resolution reconstruction of turbulent fields, with higher reconstruction accuracy and lower computational cost compared to traditional methods and CNN-based methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116468602B_ABST
    Figure CN116468602B_ABST
Patent Text Reader

Abstract

The application discloses a turbulent flow super-resolution method based on a Transformer deep learning architecture, and comprises the following steps: 1) collecting training data for training a model and turbulent flow field data of a specific application scenario; 2) pre-processing the data; 3) training a turbulent flow super-resolution model SRTT based on the Transformer deep learning architecture by using LR data of step 2); 4) performing super-resolution reconstruction on low-resolution data in the application scenario obtained in step 2) by using the SRTT model trained in step 3), to generate a high-resolution flow field image. The method can enable the network to selectively focus on different parts of an input image when generating the image, and identify important features in the data, so that high-resolution reconstruction of a turbulent flow field is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of deep learning and fluid mechanics, specifically a turbulence super-resolution method based on the Transformer deep learning architecture. Background Technology

[0002] Turbulence is a common research subject in fluid mechanics. For example, in aerospace and energy fields, high-resolution turbulent field data can be used for research and development in aircraft design, combustion simulation, and other areas. Due to the complex nonlinear and multi-scale characteristics of turbulence, directly obtaining high-resolution turbulent fields in practical applications is very complex, often requiring super-resolution reconstruction. Previous research mainly employed interpolation methods, which primarily involve linear or polynomial interpolation between existing data points, or smoothing using Gaussian smoothing or other filtering methods to improve image resolution and clarity. However, these methods have some problems; for example, interpolation methods are prone to producing jagged artifacts, and smoothing methods can lose image details. For highly nonlinear turbulent field data, these methods do not perform ideally. In recent years, with the rapid development of deep learning technology, deep learning-based turbulent field reconstruction methods have gradually become a research hotspot. Currently, the main methods are based on convolutional neural networks (CNNs). CNN-based methods mainly achieve high-resolution image reconstruction through multi-layer convolution and deconvolution operations. These methods primarily employ convolution operations to extract features and use upsampling and deconvolution operations for image reconstruction, resulting in high computational efficiency. However, these methods have some limitations, such as limited accuracy in reconstructing turbulent fields. Summary of the Invention

[0003] The purpose of this invention is to address the shortcomings of existing technologies by providing a turbulence super-resolution method based on the Transformer deep learning architecture. This method enables the network to selectively focus on different parts of the input image when generating the output image, identifying important features in the data, thereby achieving high-resolution reconstruction of the turbulent field.

[0004] The technical solution to achieve the objective of this invention is as follows:

[0005] A turbulence super-resolution method based on the Transformer deep learning architecture includes the following steps:

[0006] 1) Collect training data for model training and turbulent flow field data for specific application scenarios;

[0007] 2) Preprocess the data. First, use a box filter to process the training data, then use Bicubic interpolation to obtain low-resolution training data. Finally, normalize the obtained low-resolution training data and the turbulent flow field data of the specific application scenario by maximum absolute value to obtain the training input LR data and the low-resolution input data of the specific application scenario.

[0008] 3) Use the LR data from step 2) to train a turbulence super-resolution model (Super-Resolution Transformer for Turbulence, or SRTT for short) based on the Transformer deep learning architecture. The model includes feature extraction blocks, encoder blocks, decoder blocks, and upsampling blocks:

[0009] Feature extraction block:

[0010] The feature extraction block uses three convolutional layers to extract basic feature information of turbulence. The low-resolution LR data obtained in step 2) has three channels. The feature extraction block first generates a feature map of size C×H×W from the LR data, where C represents the channel of the feature map, and H and W represent the height and width, respectively. Then, the feature map is flattened into a form similar to word vectors in the field of natural language processing and input into the encoder block.

[0011] Encoder block:

[0012] The encoder block consists of an MSA (Multi-Head Self-Attention) module and a feedforward layer. The feedforward layer contains two fully connected layers and two canonical layers. The encoder block adds learnable positional encodings to the feature map generated from the feature extraction block to preserve the positional information of the LR data. The input and output sizes of the encoder block are the same.

[0013] Decoder block:

[0014] The decoder block consists of two MSA modules, one feedforward layer, and two norm layers. The input of the decoder block is the output of the encoder block. Neither MSA module has a mask because the generated result does not need to be looped like in natural language processing tasks. The decoder block uses residual operations to enhance gradient stability. The input and output sizes of the decoder block are also the same.

[0015] Upsampling block:

[0016] The output of the decoder block is reshaped into a C×H×W feature map before entering the upsampling block. In the upsampling block, convolutional layers and pixelShuffle layers work together to achieve upsampling. The convolutional layers generate feature maps with higher dimensional information, and the pixelShuffle layers use periodic operators to achieve upsampling. The last convolutional layer generates a super-resolution result of size 3×rH×rW, where r is the magnification factor. The feature extraction block extracts the basic feature information of the turbulent field, the encoder block decomposes the input image into a series of local feature vectors, the decoder recombines these feature vectors into a feature map containing super-resolution information, and the upsampling block converts the feature map into a high-resolution turbulent field.

[0017] The basic structure of the MSA module used in the encoder and decoder is scaled dot product attention. Calculating scaled dot product attention involves the following steps:

[0018] (1) Input data X is fed by three different trainable matrices W Q W K and W V Convert them into query matrix Q, key matrix K, and value matrix V respectively:

[0019] Q = XW Q K = XW K V = XW V (1),

[0020] (2) The attention score matrix A is calculated from the query matrix Q and the key matrix K:

[0021]

[0022] Where d k It is the feature dimension of the K matrix. The attention score matrix A represents the attention weights from different flow rates, which is obtained by calculating the similarity between the query and the key.

[0023] (3) Based on the attention score matrix A and the value matrix V, the output O of the scaled dot product attention is:

[0024] O = AV(3),

[0025] The MSA consists of several parallel scaled dot product attention mechanisms, and each head in the MSA has a separate trainable matrix W. Q W K and W VIt can generate multiple different sets of Q, K, and V matrices, and each set of different Q, K, and V matrices is independently computed to obtain the attention result. Finally, the output of each head in MSA is concatenated in the feature dimension and multiplied by a trainable matrix W to obtain the final output. The self-attention mechanism used by MSA allows the Transformer-based network to selectively focus on different regions of the input image when generating images. Therefore, the Transformer-based network can capture the relationship between different parts of a low-resolution image, identify important features in the image, and then generate a high-quality, high-resolution image that retains these important features.

[0026] The SRTT model uses mean squared error as the loss function, which is written as:

[0027]

[0028] Where y i It is the actual value. These are the values ​​predicted by SRTT. The activation function and optimization algorithm used in the SRTT model are ReLU and Adam, respectively.

[0029] 4) Using the SRTT model trained in step 3), perform super-resolution reconstruction on the low-resolution input data of the specific application scenario obtained in step 2) to generate a high-resolution flow field image.

[0030] This technical solution utilizes low-resolution flow field data to achieve super-resolution operations, thereby obtaining high-resolution turbulent flow fields. Compared to the extensive computations or expensive equipment required for obtaining high-resolution turbulent flow fields using computational fluid dynamics or experimental fluid dynamics methods, this method offers higher efficiency and lower cost. Furthermore, compared to traditional numerical super-resolution methods or methods based on traditional CNN networks, this method achieves higher accuracy. Attached Figure Description

[0031] Figure 1 The network structure diagram is shown in the example.

[0032] Figure 2 This is a structural diagram of the encoder block (left) and decoder block (right) in the embodiment;

[0033] Figure 3 This is a schematic diagram of the MSA module in the embodiment;

[0034] Figure 4 The results of the three super-resolution methods (Bicubic, SCNN, and SRTT) and DNS data in the examples are shown in y. + =77.89, a comparison chart at a magnification of 4;

[0035] Figure 5The results of the three super-resolution methods (Bicubic, SCNN, and SRTT) and DNS data in the examples are shown in y. + =77.89, a comparison image at a magnification of 8;

[0036] Figure 6 The diagram shows a comparison of velocity vectors and vorticity of the results of three super-resolution methods (Bicubic, SCNN, and SRTT) and DNS data at magnifications of 4 and 8 in the embodiments.

[0037] Figure 7 The results of the three super-resolution methods (Bicubic, SCNN, and SRTT) and the Reynolds stress of the DNS data normalized by friction velocity are shown in the examples, with a magnification of 4 as a function of y. + A comparison chart of the changes. Detailed Implementation

[0038] The present invention will be further described below with reference to the accompanying drawings and embodiments, but this is not intended to limit the scope of the invention.

[0039] Example:

[0040] Reference Figure 1 A turbulence super-resolution method based on the Transformer deep learning architecture includes the following steps:

[0041] 1) Collect training data for model training and turbulent flow field data for specific application scenarios;

[0042] 2) Preprocess the data. First, use a box filter to process the training data. Then, use Bicubic interpolation (Shocher A, Cohen N, Irani M. “zero-shot” super-resolution using deep internal learning[C] / / “zero-shot” super-resolution using deep internal learning. Proceedings of the IEEE conference on computer vision and pattern recognition. 3118-3126.) to obtain low-resolution training data. Finally, normalize the obtained low-resolution training data and the turbulent flow field data of the specific application scenario by maximum absolute value to obtain the training input LR data and the low-resolution data of the specific application scenario.

[0043] 3) Use the LR data from step 2) to train the turbulence super-resolution model SRTT based on the Transformer deep learning architecture. The model includes a feature extraction block, an encoder block, a decoder block, and an upsampling block:

[0044] Feature extraction block:

[0045] The feature extraction block uses three convolutional layers to extract basic feature information of turbulence. The low-resolution LR data obtained in step 2) has three channels. The feature extraction block first generates a feature map of size C×H×W from the LR data, where C represents the channel of the feature map, and H and W represent the height and width, respectively. Then, the feature map is flattened into a form similar to word vectors in the field of natural language processing and input into the encoder block.

[0046] Encoder block:

[0047] encoder block structure as follows Figure 2 As shown on the left, it consists of an MSA module and a feedforward layer. The feedforward layer contains two fully connected layers and two canonical layers. The encoder block adds learnable positional codes to the feature map generated from the feature extraction block to preserve the positional information of the LR data. The input and output sizes of the encoder block are the same.

[0048] Decoder block:

[0049] Decoder block structure as follows Figure 2 As shown on the right, it consists of two MSA modules, one feedforward layer and two norm layers. The input of the decoder block is the output of the encoder block. Neither MSA module has a mask because the generated result does not need to be looped like in natural language processing tasks. The decoder block uses residual operations to enhance gradient stability. The input and output sizes of the decoder block are also the same.

[0050] Upsampling block:

[0051] The output of the decoder block is reshaped into a C×H×W feature map before entering the upsampling block. In the upsampling block, convolutional layers and pixelShuffle layers work together to achieve upsampling. The convolutional layers generate feature maps with higher dimensional information, and the pixelShuffle layers use periodic operators to achieve upsampling. The last convolutional layer generates a super-resolution result of size 3×rH×rW, where r is a magnification factor. The feature extraction block extracts the basic feature information of the turbulent field. The encoder block decomposes the input image into a series of local feature vectors. The decoder recombines these feature vectors into a feature map containing super-resolution information. The upsampling block converts the feature map into a high-resolution turbulent field.

[0052] The basic structure of the MSA module used in encoders and decoders is as follows: Figure 3As shown, its basic component is scaled dot product attention, and the calculation of scaled dot product attention involves the following steps:

[0053] (1) Input data X is fed by three different trainable matrices W Q W K and W V Convert them into query matrix Q, key matrix K, and value matrix V respectively:

[0054] Q = XW Q K = XW K V = XW V (1),

[0055] (2) The attention score matrix A is calculated from the query matrix Q and the key matrix K:

[0056]

[0057] Where d k It is the feature dimension of the K matrix. The attention score matrix A represents the attention weights from different flow rates, which is obtained by calculating the similarity between the query and the key.

[0058] (3) Based on the attention score matrix A and the value matrix V, the output O of the scaled dot product attention is:

[0059] O = AV(3),

[0060] The MSA consists of several parallel scaled dot product attention mechanisms, and each head in the MSA has a separate trainable matrix W. Q W K and W V It can generate multiple different sets of Q, K, and V matrices, and each set of different Q, K, and V matrices is independently computed to obtain the attention result. Finally, the output of each head in MSA is concatenated in the feature dimension and multiplied by a trainable matrix W to obtain the final output. The self-attention mechanism used by MSA allows the Transformer-based network to selectively focus on different regions of the input image when generating images. Therefore, the Transformer-based network can capture the relationship between different parts of a low-resolution image, identify important features in the image, and then generate a high-quality, high-resolution image that retains these important features.

[0061] The SRTT model uses mean squared error as the loss function, written as:

[0062]

[0063] Where y i It is the actual value. These are the values ​​predicted by SRTT. The activation function and optimization algorithm used in the SRTT model are ReLU and Adam, respectively.

[0064] 4) Using the SRTT model trained in step 3), perform super-resolution reconstruction on the low-resolution data of the specific application scenario obtained in step 2) to generate a high-resolution flow field image.

[0065] This example uses turbulent channel flow as the dataset. The turbulent channel flow data is obtained from direct numerical simulation (DNS) with periodic boundary conditions. No-slip boundary conditions (y / h = ±1, where h is half the channel height) are applied at the top and bottom walls. The wall normal velocity vorticity formula is used to solve the following incompressible Navier-Stokes equations:

[0066]

[0067]

[0068] The simulation was performed on a domain of size 8πh×2h×3πh with 2048×512×1536 grid points, at a frictional velocity Reynolds number Re. τ =9.9935×102, the speed super-resolution result obtained using the trained model is as follows Figure 4 and 5 As shown, SRTT achieved the best results at both magnification levels, while the results from Bicubic were too smooth compared to those from deep learning methods. Among the two deep learning methods, SRTT outperformed SCNN in reconstructing the u, v, and w velocity components of small-scale structures, especially the v component. At a magnification of 8, Bicubic was almost unable to reconstruct the flow field, and the SCNN results lost the small-scale structure of the velocity field. Figure 6 The results of three super-resolution methods (Bicubic, SCNN, and SRTT) and DNS data are shown in the velocity vector and vorticity comparison diagrams at magnifications of 4 and 8. It can be seen that at a magnification of 4, all methods reconstruct the basic outline of the vorticity field, but only SRTT accurately reconstructs the vorticity values ​​close to zero in the flow field, and the super-resolution result obtained by SRTT is closer to the DNS data. At a magnification of 8, only SRTT reconstructs the vorticity field, although its performance is slightly degraded, and some small-scale vortices cannot be reconstructed. This may be due to the loss of a large amount of high-frequency information from the low-resolution input. The Reynolds stress of the flow field can be expressed by the formula:

[0069] Calculated, where u τThis represents velocity fluctuations, where i = 1, 2, and 3 represent the three directions of the channel flow: flow direction, wall normal, and spanwise, respectively. The results from three super-resolution methods—Bicubic, SCNN, and SRTT—and the Reynolds stress normalized to friction velocity in the DNS data are shown below. Figure 7 As shown, all Reynolds stress components of the low-resolution input are lower than those of the DNS data, and Bicubic cannot recover the information lost in the low-resolution input. The results of SCNN are basically consistent with those of the DNS data, but its performance in y... + There is some deviation at the lower peaks. SRTT can reconstruct all y + The Reynolds stress is obtained, which is something other methods cannot achieve. The results demonstrate that even with complex flow field configurations, high-resolution flow fields can be reconstructed in SRTT.

[0070] In summary, the proposed method can achieve super-resolution operations using low-resolution flow field data to obtain high-resolution turbulent flow fields. Compared to the large amount of computation or expensive equipment required to obtain high-resolution turbulent flow fields using computational fluid dynamics or experimental fluid dynamics methods, this method is more efficient and lower in cost. Furthermore, compared to traditional numerical super-resolution methods (such as Bicubic, Keys R. Cubic convolution interpolation for digital image processing[J]. IEEE transactions on acoustics, speech, and signal processing, 1981, 29(6): 1153-1160.) or methods based on traditional CNN networks (such as SCNN, Liu B, Tang J, Huang H, et al. Deep learning methods for super-resolution reconstruction of turbulent flows[J]. Physics of Fluids, 2020, 32(2): 025105.), this method achieves higher accuracy.

Claims

1. A turbulence super-resolution method based on the Transformer deep learning architecture, characterized in that, Includes the following steps: 1) Collect training data for model training and turbulent flow field data for specific application scenarios; 2) Preprocess the data. First, use a box filter to process the training data, then use Bicubic interpolation to obtain low-resolution training data. Finally, normalize the obtained low-resolution training data and the turbulent flow field data of the specific application scenario by maximum absolute value to obtain the training input LR data and the low-resolution data of the specific application scenario. 3) Use the LR data from step 2) to train the turbulence super-resolution model SRTT based on the Transformer deep learning architecture. The model includes a feature extraction block, an encoder block, a decoder block, and an upsampling block: Feature extraction block: The feature extraction block uses three convolutional layers to extract basic feature information of turbulence. The low-resolution LR data obtained in step 2) has three channels. The feature extraction block first generates a feature map of size C×H×W from the LR data, where C represents the channel of the feature map, and H and W represent the height and width, respectively. Then, the feature map is flattened into a form similar to word vectors in the field of natural language processing and input into the encoder block. Encoder block: The encoder block consists of an MSA module and a feedforward layer. The feedforward layer contains two fully connected layers and two canonical layers. The encoder block adds learnable positional codes to the feature map generated from the feature extraction block to preserve the positional information of the LR data. The input and output sizes of the encoder block are the same. Decoder block: The decoder block consists of two MSA modules, one feedforward layer, and two norm layers. The input of the decoder block is the output of the encoder block. Neither MSA module has a mask because the generated result does not need to be looped like in natural language processing tasks. The decoder block uses residual operations to enhance gradient stability. The input and output sizes of the decoder block are also the same. Upsampling block: The output of the decoder block is reshaped into a C×H×W feature map before entering the upsampling block. In the upsampling block, the convolutional layer and the PixelShuffle layer work together to achieve upsampling. The convolutional layer generates a feature map with higher dimensional information, the PixelShuffle layer uses a periodic operator to achieve upsampling, and the last convolutional layer generates a super-resolution result of size 3×rH×rW, where r is the magnification factor. The basic structure of the MSA module used in the encoder and decoder is scaled dot product attention. Calculating scaled dot product attention involves the following steps: (1) Input data X is fed by three different trainable matrices W Q W K and W V Convert them into query matrix Q, key matrix K, and value matrix V respectively: Q=XW Q ,K=XW K ,V=XW V (1), (2) The attention score matrix A is calculated from the query matrix Q and the key matrix K: Where d k It is the feature dimension of the K matrix. The attention score matrix A represents the attention weights from different flow rates, which is obtained by calculating the similarity between the query and the key. (3) Based on the attention score matrix A and the value matrix V, the output O of the scaled dot product attention is: O = AV(3), The MSA consists of several parallel scaled dot product attention mechanisms, and each head in the MSA has a separate trainable matrix W. Q W K and W V It can generate multiple sets of different Q, K, and V matrices, and each set of different Q, K, and V matrices independently calculates the attention result. Finally, the outputs of each head in MSA are concatenated along the feature dimension and multiplied by a trainable matrix W to obtain the final output. The self-attention mechanism used by MSA allows the Transformer-based network to selectively focus on different regions of the input image when generating images. Therefore, the Transformer-based network can capture the relationships between different parts of a low-resolution image, identify important features in the image, and then generate a high-quality, high-resolution image that retains these important features. The SRTT model uses mean squared error as the loss function, which is written as: Where y i It is the actual value. These are the values ​​predicted by SRTT. The activation function and optimization algorithm used in the SRTT model are ReLU and Adam, respectively. 4) Using the SRTT model trained in step 3), perform super-resolution reconstruction on the low-resolution data of the specific application scenario obtained in step 2) to obtain high-resolution flow field images.