Method for solving electromagnetic reconstruction problem of impedance non-uniform cavity based on UNet-ViT neural network
Through the electromagnetic reconstruction method based on UNet-ViT neural network, the problem of low accuracy of impedance inhomogeneous cavity inversion is solved, and high-precision cavity information restoration is achieved, which is better than traditional models.
Patent Information
- Application Number
- CN202411639314.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-11-15
AI Technical Summary
In the prior art, in the electromagnetic reconstruction problem of impedance non-uniform cavity, the inversion accuracy is low, and it is difficult to accurately restore the information of the cavity.
Using a method based on UNet-ViT neural network, the impedance non-uniform cavity is electromagnetically reconstructed. By initializing the parameters of the cavity detection area, using super formulas to introduce cavity media interfaces of different shapes, generate input data matrix and output data matrix, and train the UNet-ViT network through Adam optimization algorithm to update the model parameters to improve inversion accuracy.
It greatly improves the accuracy of inversion, has high reconstruction accuracy, can accurately restore the information of the cavity, and performs better than MLP, CNN and UNet models.
Smart Images

Figure CN119783431A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electromagnetic reconstruction technology, and in particular to a method for solving the electromagnetic reconstruction problem of an impedance non-uniform cavity based on a UNet-ViT neural network. Background Art
[0002] UNet-ViT, which can integrate different local information and contextual information to improve applicability. UNet-ViT is a hybrid structure composed of convolution, transposed convolution operators and Vision Transformer (ViT) to learn global contextual features. The network follows the structure of encoder-information extraction-decoder. The encoder is composed of convolution operators to extract hidden local features. The information extraction contains k ViT-e blocks, each of which is composed of ViT and two linear maps, and is used to extract hidden contextual features from the input feature map. The decoder is composed of convolution and transposed convolution, which is an upsampling process used to integrate the local-context features obtained by CNN-MultiHeadAttention-MLP and obtain the target resolution image through feature mapping. In addition, multiple skip connections are added to the UNet-ViT network to introduce additional information pathways, allowing information to flow more directly through the network and prevent information from being lost in deep networks. Most of the previous studies focused on the same medium interface of a single cavity, while the super formula was used to generate different shapes as the shape of the medium inside the cavity, and non-uniform interfaces of different shapes were studied. As Figure 5 As shown in the figure, a large amount of training data is generated by the PG finite element interface method using Matlab software, and the effect of the UNet-ViT model is much better than that of the MLP\CNN\UNET. Summary of the invention
[0003] The purpose of the present invention is to provide a method for the electromagnetic reconstruction problem of an impedance non-uniform cavity based on a UNet-ViT neural network, which greatly improves the accuracy of inversion, has high reconstruction accuracy, and can accurately restore the information of the cavity.
[0004] To achieve the above object, the present invention provides a method for electromagnetic reconstruction of an impedance non-uniform cavity based on a UNet-ViT neural network, comprising the following steps:
[0005] Initialize the parameters of the cavity detection area;
[0006] Use super formula to introduce cavity-medium interfaces of different shapes;
[0007] Different scattering field values are obtained by changing the interface parameters inside the cavity, and different RCS values are obtained by further processing the obtained scattering field values;
[0008] Different RCS values constitute the input data matrix Where W i Represents the input matrix width, H i Represents the height of the input matrix;
[0009] By dividing the BOX area into W o ×H o The output data matrix is generated by taking the dielectric constant value of each grid center point W o Represents the width of the output matrix, H o Represents the height of the output matrix;
[0010] Divide the input data matrix and the output data matrix into a training set, a test set, and a prediction set for training the neural network model, adjusting and selecting the model's hyperparameters during the training process, and evaluating the model's performance and generalization ability;
[0011] Establish UNet-ViT neural network model;
[0012] Based on the Adam optimization algorithm, the UNet-ViT network is trained using the training set data to update the parameters of the UNet-ViT neural network model;
[0013] Use the loss value of each time to establish a loss curve, and terminate the iteration when the loss curve tends to be flat;
[0014] Use the trained UNet-ViT model to invert the prediction set data; set evaluation indicators to evaluate the inversion results and output a visualization model of the cavity.
[0015] Preferably, the parameters of the cavity detection area include the virtual frame size of the cavity detection area, the size of the cavity Ω, the relative magnetic permeability μ r .
[0016] Preferably, the cavity internal interface parameters include shape, incident wave irradiation angle θ, relative dielectric constant ε r and the impedance coefficient ρ.
[0017] Preferably, based on the Adam optimization algorithm, the UNet-ViT network is trained using the training set data to update the parameters of the UNet-ViT neural network model, including
[0018] The initial learning rate is set, the MSE loss function is used, and the Adam optimization algorithm is used to update the UNet-ViT neural network model parameters;
[0019] The model obtained according to the model parameters obtained each time uses the test set data to input into this model to predict the test set data, and the MSE loss function is used to calculate the loss value of the predicted test set data and the original output data matrix of the test set, and the model is evaluated by this loss value;
[0020] Using MSE loss function
[0021]
[0022] Where N = h o w o is the number of pixels, Y ij is the true value of the data point, is the predicted value of the data point.
[0023] Preferably, the evaluation indicators include mean absolute percentage error MAPE, structural similarity index SSIM and peak signal-to-noise ratio PSNR, and the calculation formulas are:
[0024]
[0025] Among them, y i represents the true value, Represents the predicted value, and n represents the total number of sample points.
[0026]
[0027] Among them, α>0, β>0, γ>0, α, β, γ are non-negative, representing the proportion of different features in the SSIM measurement. Usually when calculating SSIM, α=β=γ=1 is taken, which means that the influence of brightness, contrast and structure is equal. When calculating SSIM, we also use the default. l(x,y) represents brightness comparison, c(x,y) represents contrast comparison, s(x,y) is structure comparison, μ x and μ y Represent the average values of x and y, σ x and σ y Represent the standard deviation of x and y respectively, σ xy is the covariance of x and y, and c1, c2, c3 are constants to avoid division by zero errors.
[0028]
[0029] Among them, MAX I It represents the maximum pixel value of the image, and MSE is the mean square error, which is also the loss function used.
[0030] Therefore, the present invention adopts the above-mentioned method based on UNet-ViT neural network to solve the electromagnetic reconstruction problem of impedance non-uniform cavity, which greatly improves the accuracy of inversion, has high reconstruction accuracy, and can accurately restore the information of the cavity. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A two-dimensional open cavity scattering model filled with an inhomogeneous medium embedded in an impedance ground plane;
[0032] Figure 2 The overall structure of UNet-ViT is Encoder-Decoder;
[0033] Figure 3 Introduction to training data;
[0034] Figure 4 This is the input-output UNet-ViT neural network flow chart;
[0035] Figure 5 is the shape of the medium interface inside the cavity generated based on the superformula;
[0036] Figure 6 The original images and inversion results of some samples in the test set under different shapes (determined by the super formula) and different dielectric backgrounds; Figure 6 (a) is a real image of different shapes and background media; Figure 6 (b) is the inversion result of the MLP model; Figure 6 (c) is the inversion result of the CNN model; Figure 6 (d) is the inversion result of the UNet model; Figure 6 (e) is the inversion result of the UNet-ViT model;
[0037] Figure 7 MAPE, SSIM, PSNR for MLP, CNN, UNet, and UNet-ViT models; Figure 7 (a) is the MAPE of MLP, CNN, UNet, and UNet-ViT models; Figure 7 (b) SSIM of MLP, CNN, UNet, and UNet-ViT models; Figure 7 (c) PSNR of MLP, CNN, UNet, and UNet-ViT models;
[0038] Figure 8 This is an example diagram of a double S-bend cavity and the shape of the medium inside it;
[0039] Fig. 9 The prediction results of different models; Fig. 9 (a) is the real image; Fig. 9(b) is the inversion result of MLP model; Fig. 9 (c) is the inversion result of the CNN model; Fig. 9 (d) is the inversion result of the UNet model; Fig. 9 (e) is the inversion result of the UNet-ViT model;
[0040] Fig.10 Radar charts of MAPE, SSIM, and PSNR indicators of different models on the prediction set data; Fig.10 (a) is a radar chart of MAPE of different models on the prediction set data; Fig.10 (b) is a radar chart of SSIM of different models on the prediction set data; Fig.10 (c) is a radar chart of PSNR of different models on the prediction set data. DETAILED DESCRIPTION
[0041] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.
[0042] Unless otherwise defined, technical or scientific terms used in the present invention shall have the common meanings understood by one having ordinary skills in the field to which the present invention belongs.
[0043] The simulation data set was generated by the PG finite element interface method using Matlab software on a multi-core large cache server. The neural network was trained using Python language, based on the pytorch environment of NVIDIA GeForce RTX3090.
[0044] The present invention provides a method for solving the electromagnetic reconstruction problem of an impedance non-uniform cavity based on a UNet-ViT neural network, comprising the following steps:
[0045] Step 1: Initialize the parameters of the cavity detection area: the virtual box size of the cavity detection area, the size of the cavity Ω, and the relative magnetic permeability μ r ;
[0046] Step 2: Construct input data matrix and output data matrix, such as Figure 3 Shown, including
[0047] Use super formula to introduce cavity-medium interfaces of different shapes;
[0048] By changing the internal interface parameters of the cavity (shape, angle of incident wave irradiation θ, relative dielectric constant ε r and impedance coefficient ρ) to obtain different scattered field values, and further process the obtained scattered field values to obtain different RCS values, where the RCS value is a number;
[0049] Different RCS values constitute the input data matrix Where W i Represents the input matrix width, H i Represents the height of the input matrix;
[0050] By dividing the BOX area into W o ×H o The output data matrix is generated by taking the dielectric constant value of each grid center point W o Represents the width of the output matrix, H o Represents the height of the output matrix;
[0051] Step 3: Divide the input data matrix and the output data matrix into a training set, a test set, and a prediction set according to a certain ratio, which are used to train the neural network model, adjust and select the hyperparameters of the model during the training process, and evaluate the model performance and generalization ability;
[0052] Step 4: Establish UNet-ViT neural network;
[0053] like Figure 2 As shown in the figure, UNet-ViT is an Encoder-Decoder structure, which is connected to the Infromation Extraction in the middle to extract specific information. The Encoder consists of convolutional layers, and the Decoder consists of convolutional and transposed convolutional layers, which effectively extract the features of the data and maintain the spatial structure information of the data. In addition, the Infromation Extraction is composed of many ViT-e blocks, and ViT-e learns contextual information through ViT and linear mapping.
[0054] Step 5: Based on the Adam optimization algorithm, use the training set data to train the UNet-ViT network and update the parameters of the model; as shown in the figure
[0055] In the process of training the neural network, the initial learning rate is set to 0.0001, the MSE loss function (Formula 1) is used, and the Adam optimization algorithm is used to update the model parameters. After training for 200 epochs, the final model parameters are saved.
[0056] The model obtained according to the model parameters obtained each time uses the test set data to input into this model to predict the test set data, and the MSE loss function is used to calculate the loss value of the predicted test set data and the original output data matrix of the test set, and the model is evaluated by this loss value;
[0057] Using MSE loss function
[0058]
[0059] Where N = h o w o is the number of pixels, Y ij is the true value of the data point, is the predicted value of the data point.
[0060] Use the loss value of each time to establish a loss curve. When the loss curve tends to be flat, terminate the iteration. According to the empirical value, terminate after 200 iterations.
[0061] Use the trained UNet-ViT model to invert the prediction set data, set evaluation indicators to evaluate the inversion results, and output the visualization model of the cavity.
[0062] Mean absolute percentage error (MAPE), structural similarity index (SSIM), and peak signal-to-noise ratio (PSNR).
[0063] MAPE is an indicator for evaluating prediction accuracy, which calculates the average of the absolute percentage errors between the actual value and the predicted value. SSIM is the structural similarity index, which is used to evaluate image quality. It takes into account brightness, contrast, and structural information. The value ranges from -1 to 1, with 1 indicating complete similarity. PSNR is used to measure the quality of image reconstruction or compression. The higher the value, the better the quality. The calculation formulas are:
[0064]
[0065] Among them, y i represents the true value, Represents the predicted value, and n represents the total number of sample points.
[0066]
[0067] Among them, α>0, β>0, γ>0, α, β, γ are non-negative, representing the proportion of different features in the SSIM measurement. Usually when calculating SSIM, α=β=γ=1 is taken, which means that the influence of brightness, contrast and structure is equal. When calculating SSIM, we also use the default. l(x,y) represents brightness comparison, c(x,y) represents contrast comparison, s(x,y) is structure comparison, μ x and μ y Represent the average values of x and y, σ x and σ y Represent the standard deviation of x and y respectively, σ xy is the covariance of x and y, and c1, c2, c3 are constants to avoid division by zero errors.
[0068]
[0069] Among them, MAXI It represents the maximum pixel value of the image, and MSE is the mean square error, which is also the loss function used.
[0070] Embodiment 1
[0071] Simple cavity with multiple shapes and single dielectric interface
[0072] The backscattering of inhomogeneous dielectric cavities of different shapes filled with absorbing materials is studied. Figure 1 A schematic diagram of the cavity model is shown. To represent the upper half-space plane, use Ω∈R 2 To represent a two-dimensional non-uniform cavity embedded in an impedance ground plane, the cavity Ω is divided into two parts Ω (1) and Ω (2) , used to fill different media. Γ represents the cavity aperture, θ is the incident angle, Γ c B is the impedance ground plane, and S is the cavity wall (coated with absorbing material). r It is a virtual semicircle used to assist in constructing artificial boundary conditions. (E i ,H i ) represents the incident wave of the cavity, (E s ,H s ) is the scattered field. The cavity wall S and the impedance ground plane Γ c The electromagnetic field must satisfy the impedance boundary condition (IBC). Ω (1) The relative permittivity and relative magnetic permeability of the interior. Ω (2) The relative permittivity and relative magnetic permeability of the interior.
[0073] First, define the virtual box size of the cavity detection area as 1.2m*0.6m, the size of the cavity Ω as 1m*0.5m, and the magnetic permeability μ r The value of is 1. By changing the shape of the inhomogeneous medium interface inside the cavity, the angle of the incident wave θ, the relative dielectric constant ε r and impedance coefficient ρ to obtain different scattered field values, thereby generating a large number of samples. The incident angle is 0-90 degrees, Ω (1) The relative dielectric constant of the interior is between 4 and 5, Ω (2) The relative dielectric constant in the region is set between 1 and 2, and the impedance coefficient is set between 0.02 and 1.36. Figure 5 The different shapes generated by the super formula are shown. In this embodiment, due to limited computing resources, 30 shapes are selected as Ω (1)The medium interface. Each shape can generate 100 sets of samples by changing the values of three variables, and the total number of samples in the example is 3000. The data set is divided into a training set, a validation set, and a test set, which are used to train the neural network model, adjust and select the hyperparameters of the model during the training process, and evaluate the model performance and generalization ability. This example uses the super formula to introduce multiple shapes and perform inversion based on the data generated by a single medium interface with multiple shapes.
[0074] In this embodiment, three other neural network models are used for electromagnetic inversion. They are MLP, CNN and UNet. The advantages of convolution in image processing are demonstrated. Compared with MLP, CNN performs better in feature extraction. UNet can more effectively retain and utilize image details due to its skip connections and deeper network structure. Finally, UNet-ViT combines the structural advantages of UNet and the long-range dependency modeling capabilities of ViT to achieve the best results and further improve the accuracy and robustness of electromagnetic inversion.
[0075] Figure 6 The inversion results of different models using different shapes inside the rounded rectangular cavity are shown. Figure 6 (a) Figure 6 (b) Figure 6 (c) Figure 6 (d) Figure 6 (e) Represents the original image, MLP inversion result, CNN inversion result, UNet inversion result and UNet-ViT inversion result respectively.
[0076] It can be seen that the image reconstructed by the MLP method is very blurry. It can only vaguely see the existence of a medium interface inside the cavity, but its specific shape cannot be predicted, and the information of the background medium cannot be accurately predicted. There is a lot of noise. Compared with MLP, the effect of the CNN method is significantly improved. For the internal interface, the approximate shape can be reflected, but there are serious artifacts at the edge of the interface, and CNN cannot accurately predict the information of the cavity medium. Although the accuracy of the UNet model at the edge of the internal interface is low. However, compared with MLP and CNN, it can not only show the main shape of the medium interface, but also significantly enhance the prediction effect of the cavity medium information. Regardless of complex shapes or simple shapes, the UNet-ViT model overcomes the problem of low accuracy of the internal interface edge and can accurately predict the shape of the original image. In addition, the prediction accuracy of the cavity medium information is also high, and the imaging quality has been significantly improved.
[0077] The average values of MAPE, SSIM, and PSNR test sets of different prediction models are as follows: Figure 7As shown in the figure. The UNet-ViT model has the lowest mean absolute percentage error (MAPE), indicating that the prediction model has high accuracy. The UNet-ViT model has the highest structural similarity index (SSIM), which is 0.933, indicating that the predicted image is very similar to the original image in terms of structure, brightness, and contrast. The UNet-ViT model also has the highest peak signal-to-noise ratio (PSNR), indicating that the image quality is good and the distortion is relatively small. It can be concluded that the UNet-ViT model is better than other models in the reconstruction of multi-shape single dielectric cavity.
[0078] Embodiment 2
[0079] Complex cavities with multiple shapes and multiple media interfaces
[0080] The results of Example 1 show that the UNet-ViT model performs well in reconstructing the interface shapes of different media in simple cavities. In order to verify the applicability of the model in complex cavities, this example uses the complex double S-bend structure in the air intake of a stealth fighter as the research object. In addition, many fighters use a bulge-type air intake, so a variety of shapes are introduced into the cavity to simulate the bulge. Figure 8 The schematic diagram of the structure of the double S-bend cavity is shown.
[0081] Fig. 9 The prediction results of different models are shown. It can be seen that the reconstruction effect of the MLP model is very fuzzy. It can only identify the cavity as non-uniform, but cannot accurately predict the shape of the non-uniform medium interface and the information of the background medium. In contrast, the CNN model performs well in reconstructing the shape of the cavity and the non-uniform medium, but there are serious artifacts near the interface, and the overall image is dimmer than the original image, and all information cannot be fully and accurately extracted. The effect of the UNet model has been significantly improved compared with MLP and CNN, but there are still many artifacts near the interface. The UNetViT model overcomes this defect and significantly improves the accuracy of the inversion.
[0082] exist Fig.10 In the results, the UNet-ViT model has the lowest value for the MAPE index, which is close to 0 and is only 0.013, indicating that the UNet-ViT model has a smaller error and higher prediction accuracy. For the SSIM index, the MLP model has the lowest value, indicating that the model has the worst prediction effect, while the UNet-ViT model has the highest value, reaching 0.933. At the same time, the UNet-ViT model also performs best in the PSNR index, reaching 32dB, indicating that its image quality is good. Fig.10 The superiority of the UNet-ViT model in the reconstruction of complex cavities with multiple shapes and multiple media was further verified.
[0083] Whether it is for the reconstruction of a simple cavity containing multiple shapes of a single medium interface or for the reconstruction of a complex cavity containing multiple shapes of multiple medium interfaces, the results show that the proposed UNet-ViT model outperforms the MLP, CNN and UNet models in performance, has higher reconstruction accuracy, and can accurately restore the cavity information.
[0084] Therefore, the present invention adopts the above-mentioned method based on UNet-ViT neural network to solve the electromagnetic inverse scattering problem of impedance non-uniform cavity, which greatly improves the inversion accuracy, has high reconstruction accuracy, and can accurately restore the information of the cavity.
[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A method for electromagnetic reconstruction of impedance non-uniform cavity based on UNet-ViT neural network, characterized in that: The following steps are involved: Initialize the parameters of the cavity detection area; Use super formula to introduce cavity-medium interfaces of different shapes; Different scattering field values are obtained by changing the interface parameters inside the cavity, and different RCS values are obtained by further processing the obtained scattering field values; Different RCS values constitute the input data matrix Where W i Represents the input matrix width, H i Represents the height of the input matrix; By dividing the BOX area into W o ×H o The output data matrix is generated by taking the dielectric constant value of each grid center point W o Represents the width of the output matrix, H o Represents the height of the output matrix; Divide the input data matrix and the output data matrix into a training set, a test set, and a prediction set for training the neural network model, adjusting and selecting the model's hyperparameters during the training process, and evaluating the model's performance and generalization ability; Establish UNet-ViT neural network model; Based on the Adam optimization algorithm, the UNet-ViT network is trained using the training set data to update the parameters of the UNet-ViT neural network model; Use the loss value of each time to establish a loss curve, and terminate the iteration when the loss curve tends to be flat; Use the trained UNet-ViT model to invert the prediction set data; Evaluation indicators are set to evaluate the inversion results and the cavity visualization model is output.
2. The method for electromagnetic reconstruction of impedance non-uniform cavity based on UNet-ViT neural network according to claim 1 is characterized in that: The parameters of the cavity detection area include the virtual frame size of the cavity detection area, the size of the cavity Ω, and the relative magnetic permeability μ r .
3. The method for electromagnetic reconstruction of impedance non-uniform cavity based on UNet-ViT neural network according to claim 1 is characterized in that: The internal interface parameters of the cavity include shape, angle of incident wave θ, relative dielectric constant ε r and the impedance coefficient ρ.
4. The method for electromagnetic reconstruction of impedance non-uniform cavity based on UNet-ViT neural network according to claim 1 is characterized in that: Based on the Adam optimization algorithm, the UNet-ViT network is trained using the training set data to update the parameters of the UNet-ViT neural network model, including The initial learning rate is set, the MSE loss function is used, and the Adam optimization algorithm is used to update the UNet-ViT neural network model parameters; The model obtained according to the model parameters obtained each time uses the test set data to input into this model to predict the test set data, and the MSE loss function is used to calculate the loss value of the predicted test set data and the original output data matrix of the test set, and the model is evaluated by this loss value; Using MSE loss function Where N = h o w o is the number of pixels, Y ij is the true value of the data point, is the predicted value of the data point.
5. The method for electromagnetic reconstruction of impedance non-uniform cavity based on UNet-ViT neural network according to claim 1 is characterized in that: The evaluation indicators include mean absolute percentage error MAPE, structural similarity index SSIM and peak signal-to-noise ratio PSNR, which are: Among them, y i represents the true value, represents the predicted value, and n represents the total number of sample points; Among them, α>0, β>0, γ>0, α, β, γ are non-negative, representing the proportion of different features in the SSIM measurement, l(x, y) represents brightness comparison, c(x, y) represents contrast comparison, s(x, y) represents structure comparison, μ x and μ y Represent the average values of x and y, σ x and σ y Represent the standard deviation of x and y respectively, σ xy is the covariance of x and y, and c1, c2, c3 are constants to avoid division by zero errors; Among them, MAX I It represents the maximum pixel value of the image, and MSE is the mean square error, which is also the loss function used.
Citation Information
Patent Citations
Rapid imaging method for solving highly nonlinear inverse scattering problem based on deep learning
CN114255293A
Sub-surface imaging of dielectric structures and voids via narrowband electromagnetic resonance scattering
US20190113647A1