Method for electromagnetic reconstruction of impedance non-uniform cavities based on the UNet-ViT neural network
Through the electromagnetic reconstruction method of UNet-ViT neural network, the problem of insufficient reconstruction accuracy of impedance non-uniform cavity is solved, and high-precision cavity information restoration is achieved, which is suitable for multi-shaped and multi-media interface scenarios.
Patent Information
- Application Number
- CN202411639314.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2044-11-15
AI Technical Summary
The existing electromagnetic reconstruction methods are difficult to effectively deal with impedance non-uniform cavity, especially in the case of multi-shaped and multi-media interfaces, and the reconstruction accuracy is insufficient and the information of the cavity cannot be accurately restored.
The electromagnetic reconstruction method based on UNet-ViT neural network is adopted, and the input and output data matrix is constructed by initializing the cavity detection area parameters, the training test prediction set is divided, and the UNet-ViT network is trained using the Adam optimization algorithm, combined with the loss curve to optimize the model parameters, and finally the visual model of the cavity is output.
The accuracy and reconstruction accuracy of electromagnetic reconstruction are significantly improved, and the information of the cavity can be accurately reduced, especially in multi-shaped single medium and multi-shaped multi-media cavity.
Smart Images

Figure CN119783431B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electromagnetic reconstruction, and particularly to a method for electromagnetic reconstruction of impedance non-uniform cavities based on the UNet-ViT neural network. Background Technique
[0002] UNet-ViT can integrate different local information and context information to improve applicability. UNet-ViT is a hybrid structure composed of convolutional, transposed convolutional operators and Vision Transformer (ViT) to learn global context features. The network follows the encoder-information extraction-decoder structure. The encoder is composed of convolutional operators to extract hidden local features. Information extraction contains k ViT-e blocks, each ViT-e block consists of ViT and two linear mappings, and is used to extract hidden context features from the input feature map. The decoder is composed of convolution and transposed convolution, which is an upsampling process to integrate and process the local-context features obtained by CNN-MultiHeadAttention-MLP, and obtain the target resolution image through the feature map. In addition, multiple skip connections are added to the UNet-ViT network to introduce additional information channels, allowing information to flow through the network more directly and preventing information loss in the deep network. Most of the previous studies were focused on the same medium interface of a single cavity, while using superformulas to generate different shapes as the shapes of the internal media of the cavity, and studying non-uniform interfaces of different shapes at the same time. As Figure 5 shown, 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 MLP\CNN\UNET. Summary of the Invention
[0003] The purpose of the present invention is to provide a method for electromagnetic reconstruction of impedance non-uniform cavities based on the UNet-ViT neural network, which greatly improves the accuracy of inversion, has a high reconstruction accuracy, and can accurately restore the information of the cavity.
[0004] To achieve the above purpose, the present invention provides a method for electromagnetic reconstruction of impedance non-uniform cavities based on the UNet-ViT neural network, including the following steps:
[0005] Initialize the parameters of the cavity detection area;
[0006] Use superformulas to introduce different-shaped cavity medium interfaces;
[0007] Obtain different scattering field values by changing the internal interface parameters of the cavity, and further process the obtained scattering field values to obtain different RCS values;
[0008] Different RCS values form the input data matrix Among them, W i represents the width of the input matrix, and H i represents the height of the input matrix;
[0009] By dividing the BOX area into a grid of W o ×H o and taking the dielectric constant value at the center point of each grid to generate the output data matrix W o represents the width of the output matrix, and 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, which are used to train the neural network model, to adjust and select the hyperparameters of the model during training, and to evaluate the model performance and generalization ability respectively;
[0011] Build a UNet-ViT neural network model;
[0012] Based on the Adam optimization algorithm, use the training set data to train the UNet-ViT network and 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 the visualization model of the cavity.
[0015] Preferably, the parameters of the cavity detection area include the size of the virtual box of the cavity detection area, the size of the cavity Ω, and the relative permeability μ r .
[0016] Preferably, the parameters of the inner interface of the cavity include the shape, the angle θ of the incident wave irradiation, the relative permittivity ε r and the impedance coefficient ρ.
[0017] Preferably, based on the Adam optimization algorithm, use the training set data to train the UNet-ViT network and update the parameters of the UNet-ViT neural network model, including
[0018] the set initial learning rate, use the MSE loss function and the Adam optimization algorithm to update the parameters of the UNet-ViT neural network model;
[0019] For the model obtained according to the model parameters obtained each time, use the test set data to input into this model to predict the test set data, and use the MSE loss function to calculate the loss value between the predicted test set data and the original output data matrix of the test set, and evaluate the model through this loss value;
[0020] Use the MSE loss function
[0021]
[0022] where N = h o w o is the number of pixel points, Y ij is the true value of the data point, is the predicted value of the data point.
[0023] Preferably, the evaluation indicators include the mean absolute percentage error MAPE, the structural similarity index SSIM, and the peak signal-to-noise ratio PSNR, and the calculation formulas are respectively:
[0024]
[0025] where y i represents the true value, represents the predicted value, and n represents the total number of sample points.
[0026]
[0027] where α > 0, β > 0, γ > 0, α, β, γ are non-negative, and respectively represent the proportions of different features in the SSIM measurement. Usually when calculating SSIM, take α = β = γ = 1, which means that the influences of brightness, contrast, and structure are equivalent. We also adopt the default when calculating SSIM. l(x,y) represents the brightness comparison, c(x,y) represents the contrast comparison, s(x,y) is the structure comparison, μ x and μ y respectively represent the average values of x and y, σ x and σ y respectively represent the standard deviations of x and y, σ xy is the covariance of x and y, and c1, c2, c3 are constants to avoid division by zero errors.
[0028]
[0029] where MAX I represents the maximum pixel value of the image, and MSE is the mean square error, which is also the loss function adopted.
[0030] Therefore, the method for electromagnetic reconstruction of impedance non-uniform cavities based on the UNet-ViT neural network proposed by the present invention significantly improves the accuracy of inversion, has high reconstruction precision, and can accurately restore the information of the cavity. Description of the Drawings
[0031] Figure 1 It is a two-dimensional open cavity scattering model with an impedance ground plane embedded with non-uniform media;
[0032] Figure 2 The overall structure of UNet-ViT is an Encoder-Decoder structure;
[0033] Figure 3 It is an introduction to the training data;
[0034] Figure 4 It is the flow chart of the input-output UNet-ViT neural network;
[0035] Figure 5 It is the shape of the dielectric interface inside the cavity generated based on the superformula;
[0036] Figure 6 It is the original images and inversion results of some samples in the test set under different shapes (determined by the superformula) and different dielectric backgrounds; Figure 6 (a) is the true image of different shapes and different background dielectrics; 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 It is the MAPE, SSIM, and PSNR of the MLP, CNN, UNet, and UNet-ViT models; Figure 7 (a) is the MAPE of the MLP, CNN, UNet, and UNet-ViT models; Figure 7 (b) is the SSIM of the MLP, CNN, UNet, and UNet-ViT models; Figure 7 (c) is the PSNR of the MLP, CNN, UNet, and UNet-ViT models;
[0038] Figure 8 It is an example diagram of a double S-bend cavity and the shape of the internal medium;
[0039] Figure 9 It is the prediction results of different models; Figure 9 (a) is the true image; Figure 9(b) is the inversion result of the MLP model; Figure 9 (c) is the inversion result of the CNN model; Figure 9 (d) is the inversion result of the UNet model; Figure 9 (e) is the inversion result of the UNet-ViT model;
[0040] Figure 10 are the radar charts of the MAPE, SSIM, and PSNR metrics of different models on the prediction set data; Figure 10 (a) is the radar chart of the MAPE of different models on the prediction set data; Figure 10 (b) is the radar chart of the SSIM of different models on the prediction set data; Figure 10 (c) is the radar chart of the PSNR of different models on the prediction set data. Detailed implementation mode
[0041] The technical solutions of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0042] Unless otherwise defined, the technical terms or scientific terms used in the present invention shall have the ordinary meanings understood by those of ordinary skill in the field to which the present invention belongs.
[0043] The simulation dataset was generated using Matlab software on a multi-core large-cache server through the PG finite element interface method. The training of the neural network was carried out in Python language based on the pytorch environment of NVIDIA GeForce RTX 3090.
[0044] The present invention provides a method for electromagnetic reconstruction of impedance non-uniform cavities based on the UNet-ViT neural network, including the following steps:
[0045] Step 1: Initialize the parameters of the cavity detection area: the size of the virtual box of the cavity detection area, the size of the cavity Ω, and the relative magnetic permeability μ r ;
[0046] Step 2: Construct the input data matrix and the output data matrix, as Figure 3 shown, including
[0047] Use the super formula to introduce cavity medium interfaces of different shapes;
[0048] By changing the cavity internal interface parameters (shape, incident wave irradiation angle θ, relative permittivity ε r and impedance coefficient ρ) to obtain different scattering field values, and further processing the obtained scattering field values to obtain different RCS values. The RCS value is a number;
[0049] Different RCS values constitute the input data matrix Among them, W i represents the width of the input matrix, and H i represents the height of the input matrix;
[0050] By dividing the BOX area into a grid of W o ×H o and taking the dielectric constant value at the center point of each grid to generate the output data matrix W o represents the width of the output matrix, and 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, to adjust and select the hyperparameters of the model during training, and to evaluate the model performance and generalization ability;
[0052] Step 4: Establish a UNet-ViT neural network;
[0053] As Figure 2 shown, the overall UNet-ViT is an Encoder-Decoder structure, which extracts specific information through the connection of Information Extraction in the middle. 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, Information Extraction is composed of many ViT-e blocks, and ViT-e learns context 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] During the process of training the neural network, the initial learning rate is set to 0.0001, the MSE loss function (Formula 1) is adopted, and the Adam optimization algorithm is used to update the parameters of the model. After training for 200 epochs, the final model parameters are saved.
[0056] For the model obtained according to the model parameters obtained each time, use the test set data to input into this model to predict the data of the test set, and use the MSE loss function to calculate the loss value between the predicted test set data and the original output data matrix of the test set, and evaluate the model through this loss value;
[0057] Adopt the MSE loss function
[0058]
[0059] where N = h o w o is the number of pixel points, and Y ij is the true value of the data point, and
[0060] A loss curve is established using the loss value of each time, and the iteration is terminated when the loss curve tends to be flat. According to the empirical value, the iteration is terminated after 200 times.
[0061] The trained UNet-ViT model is used to invert the data in the prediction set, evaluation indicators are set to evaluate the inversion results, and a visualization model of the cavity is output.
[0062] Mean Absolute Percentage Error (MAPE), Structural Similarity Index (SSIM), and Peak Signal-to-Noise Ratio (PSNR).
[0063] MAPE is an indicator to evaluate the 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 the image quality, considering brightness, contrast, and structural information. The value of this index ranges from -1 to 1, and 1 indicates complete similarity. PSNR is used to measure the quality of image reconstruction or compression, and the higher the value, the better the quality. The calculation formulas are as follows:
[0064]
[0065] where y i represents the true value, represents the predicted value, and n represents the total number of sample points.
[0066]
[0067] where α > 0, β > 0, γ > 0, and α, β, γ are non-negative, representing the proportions of different features in the SSIM measurement. Usually, when calculating SSIM, α = β = γ = 1, which means that the influences of brightness, contrast, and structure are equivalent. We also adopt the default values when calculating SSIM. l(x, y) represents the brightness comparison, c(x, y) represents the contrast comparison, s(x, y) is the structure comparison, μ x and μ y represent the averages of x and y respectively, σ x and σ y represent the standard deviations 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] where MAXI denotes the maximum pixel value of the image, and MSE is the mean square error, which is also the loss function adopted.
[0070] Example 1
[0071] A simple cavity with a multi-shaped single dielectric interface
[0072] Inverse scattering research on a non-uniform dielectric cavity filled with an absorbing material with different shapes. Figure 1 Shows a schematic diagram of the cavity model. Use to represent the upper half-space plane, and use Ω ∈ R 2 to represent a two-dimensional non-uniform cavity embedded in an impedance ground plane. Divide the cavity Ω into two parts Ω (1) and Ω (2) , which are used to fill different dielectrics. Γ represents the cavity aperture, θ is the incident angle, Γ c is the impedance ground plane, and S is the cavity wall (coated with an absorbing material). B r is a virtual semi-circle, which is used to assist in constructing the artificial boundary condition. (E i , H i ) represents the incident wave of the cavity, and (E s , H s ) is the scattered field. The electromagnetic fields of the cavity wall S and the impedance ground plane Γ c must satisfy the impedance boundary condition (IBC). are the relative permittivity and relative permeability inside Ω (1) respectively. are the relative permittivity and relative permeability inside Ω (2) respectively.
[0073] First, define the size of the virtual box in the cavity detection area as 1.2m * 0.6m, the size of the cavity Ω as 1m * 0.5m, and the value of the permeability μ r is 1. By changing the shape of the non-uniform dielectric interface inside the cavity, the incident angle θ of the incident wave, the relative permittivity ε r and the impedance coefficient ρ, different scattered field values are obtained, thereby generating a large number of samples. The incident angle ranges from 0 to 90 degrees, the relative permittivity inside Ω (1) ranges from 4 to 5, the relative permittivity inside the Ω (2) area ranges from 1 to 2, and the impedance coefficient ranges from 0.02 to 1.36. Figure 5 Shows different shapes generated by the super formula. In this example, due to limited computing resources, 30 shapes are selected as Ω (1)The medium interface. Each shape can generate 100 groups of samples by changing the values of three variables, and the total number of samples in the example is 3000. The dataset is divided into a training set, a validation set, and a test set, which are used to train the neural network model, to adjust and select the hyperparameters of the model during training, and to evaluate the model performance and generalization ability. This example uses the superformula to introduce multiple shapes and performs inversion based on the data generated by the multi-shape single medium interface.
[0074] In this embodiment, three other neural network models are also used for electromagnetic inversion. They are MLP, CNN, and UNet. The advantages of convolution in processing images are demonstrated. Compared with MLP, CNN performs better in feature extraction. Due to its skip connections and deeper network structure, UNet can more effectively retain and utilize image details. Finally, UNet-ViT combines the structural advantages of UNet and the long-range dependence modeling ability of ViT, achieving the best results and further improving the accuracy and robustness of electromagnetic inversion.
[0075] Figure 6 The inversion results of different models using different shapes inside the rounded rectangle cavity are shown, Figure 6 (a), Figure 6 (b), Figure 6 (c), Figure 6 (d), Figure 6 (e) represent the original image, the MLP inversion result, the CNN inversion result, the UNet inversion result, and the UNet-ViT inversion result respectively.
[0076] It can be seen that the image reconstructed by the MLP method is very blurred. Only the existence of the medium interface inside the cavity can be faintly seen, but its specific shape cannot be predicted, and the information of the background medium cannot be accurately predicted either, with a large amount of noise. Compared with MLP, the effect of the CNN method is significantly improved. For the internal interface, the general shape can be reflected, but there are serious artifacts at the edge of the interface, and CNN also cannot accurately predict the information of the cavity medium. Although the accuracy of the UNet model at the edge of the internal interface is relatively 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. Whether it is a complex shape or a simple shape, the UNet-ViT model overcomes the problem of low accuracy at the edge of the internal interface and can accurately predict the shape of the original image. And the prediction accuracy of the cavity medium information is also relatively high, with a significant improvement in the imaging quality.
[0077] The average values of MAPE, SSIM, and PSNR of different prediction models on the test set are as Figure 7As shown, the UNet-ViT model has the lowest mean absolute percentage error (MAPE), indicating a high precision of the prediction model. The structural similarity index (SSIM) of the UNet-ViT model is the highest, reaching 0.933, indicating that the predicted image has a very good similarity with 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 good image quality and relatively small distortion. It can be concluded that the UNet-ViT model is superior to other models in the reconstruction of multi-shaped single-medium cavities.
[0078] Example 2
[0079] Complex cavities with multi-shaped multiple dielectric interfaces
[0080] The results of Example 1 show that the UNet-ViT model performs excellently in reconstructing the shapes of different dielectric interfaces in simple cavities. To verify the applicability of the model in complex cavities, a complex double S-bend structure in the inlet of a stealth fighter is used as the research object in this example. In addition, many fighter jets adopt a bump inlet method, so various shapes are introduced into the cavity to simulate the bump. Figure 8 Shows the schematic diagram of the double S-bend cavity structure.
[0081] Figure 9 Shows the prediction results of different models. It can be seen that the reconstruction effect of the MLP model is very blurred. It can only identify that the cavity is non-uniform, but cannot accurately predict the shape of the non-uniform dielectric interface and the information of the background medium. In contrast, the CNN model performs well in reconstructing the cavity and the shape of the non-uniform medium, but there are serious artifacts near the interface, and the overall image is darker than the original image, failing to comprehensively and accurately extract all information. 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 inversion accuracy.
[0082] In Figure 10 Regarding the MAPE index, the value of the UNet-ViT model is the lowest, close to 0, only 0.013, indicating that the UNet-ViT model has small errors and high prediction accuracy. For the SSIM index, the value of the MLP model is the lowest, indicating the worst prediction effect of this model, while the value of the UNet-ViT model is the highest, reaching 0.933. At the same time, the UNet-ViT model also performs best in the PSNR index, reaching 32 dB, indicating good image quality. Figure 10 Further verifies the superiority of the UNet-ViT model in the reconstruction of multi-shaped and multi-dielectric complex cavities.
[0083] Whether it is for the reconstruction of a simple cavity with a single medium interface of multiple shapes or for the reconstruction of a complex cavity with multiple medium interfaces of multiple shapes, the results show that the proposed UNet-ViT model outperforms the MLP, CNN, and UNet models in terms of performance and has a high reconstruction accuracy, capable of accurately restoring the information of the cavity.
[0084] Therefore, by adopting the above method of the UNet-ViT neural network for the electromagnetic inverse scattering problem of impedance non-uniform cavities, the accuracy of inversion is greatly improved, with a high reconstruction accuracy and the ability to accurately restore the information of the cavity.
[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that they can still modify or equivalently replace the technical solutions of the present invention, and these modifications or equivalent replacements cannot make the modified technical solutions deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for the electromagnetic reconstruction problem of impedance non-uniform cavities based on the UNet-ViT neural network, characterized in that, It includes the following steps: Initialize the parameters of the cavity detection area; Introduce cavity medium interfaces of different shapes using the super formula; Obtain different scattered field values by changing the internal interface parameters of the cavity, and further process the obtained scattered field values to obtain different RCS values; Different RCS values form the input data matrix where W i represents the width of the input matrix, and H i represents the height of the input matrix; By dividing the BOX area into a grid of W o ×H o and taking the dielectric constant value at the center point of each grid to generate an output data matrix W o represents the width of the output matrix, and 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, which are used to train the neural network model, to adjust and select the hyperparameters of the model during training, and to evaluate the model performance and generalization ability respectively; Build a UNet-ViT neural network model; Based on the Adam optimization algorithm, use the training set data to train the UNet-ViT network and update the parameters of the UNet-ViT neural network model; Use the loss value obtained 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; Set evaluation indicators to evaluate the inversion results and output the cavity visualization model.
2. The method for electromagnetic reconstruction problem of impedance inhomogeneous cavity based on UNet-ViT neural network according to claim 1, wherein The parameters of the cavity detection area include the size of the virtual box of the cavity detection area, the size of the cavity Ω, and the relative permeability μ r .
3. The method for electromagnetic reconstruction of impedance non-uniform cavities based on the UNet-ViT neural network according to claim 1, wherein The internal interface parameters of the cavity include the shape, the angle θ of the incident wave irradiation, and the relative permittivity ε r and the impedance coefficient ρ.
4. The method for electromagnetic reconstruction of impedance non-uniform cavities based on the UNet-ViT neural network according to claim 1, characterized in that, Based on the Adam optimization algorithm, use the training set data to train the UNet-ViT network and update the parameters of the UNet-ViT neural network model, including The set initial learning rate, use the MSE loss function and the Adam optimization algorithm to update the parameters of the UNet-ViT neural network model; For the model obtained according to the model parameters obtained each time, input the test set data into this model to predict the test set data, and use the MSE loss function to calculate the loss value between the predicted test set data and the original output data matrix of the test set, and evaluate the model through this loss value; Use the MSE loss function where N = h o w o is the number of pixel points, 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 an impedance inhomogeneous cavity based on the UNet-ViT neural network according to claim 1, characterized in that, The evaluation indicators include the mean absolute percentage error MAPE, the structural similarity index SSIM, and the peak signal-to-noise ratio PSNR, which are respectively: 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, and α, β, γ are non - negative, respectively representing the proportions of different features in the SSIM measurement. l(x, y) represents the luminance comparison, c(x, y) represents the contrast comparison, s(x, y) is the structure comparison, μ x and μ y represent the average values of x and y respectively, σ x and σ y represent the standard deviations 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 represents the maximum pixel value of the image, and MSE is the mean square error, which is also the loss function adopted.
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