A groundwater seepage parameter inversion method combining FNO and ensemble Kalman filter
By combining Fourier neural operators and ensemble Kalman filtering, the problems of high computational cost and low accuracy in groundwater seepage parameter inversion are solved, achieving efficient and accurate seepage parameter inversion, reducing computational resource consumption, and improving the stability and economy of the inversion.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2026-03-24
AI Technical Summary
Existing groundwater seepage parameter inversion methods are computationally expensive, inefficient, and struggle to accurately capture the complex relationship between parameters and observational data. Furthermore, they are difficult to quantify the uncertainty of inversion results. Traditional methods are highly dependent on initial conditions and prior information, and cannot provide stable inversion results.
By combining the Fourier Neural Operator (FNO) and the Ensemble Kalman Filter (EnKF), a two-dimensional Darcy flow equation seepage model is established, a Fourier Neural Operator network is constructed, and an adaptive correction algorithm is used to optimize the model parameters within the framework of the Ensemble Kalman Filter to extract permeability parameters through posterior sampling.
It significantly reduces the solution time of the forward problem, improves the inversion efficiency and accuracy, can effectively handle parameter uncertainty, reduce computational resource consumption, reduce hardware costs, and enhance the practicality and economy of the inversion method.
Smart Images

Figure CN120911268B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of groundwater seepage parameter inversion, in particular to a groundwater seepage parameter inversion method combining FNO and ensemble Kalman filter. BACKGROUND
[0002] Groundwater seepage parameter inversion is one of the core problems in hydrology and environmental science, and is crucial for understanding groundwater flow and pollutant migration paths. Solving this problem has important practical application value for water resource management and environmental protection. However, groundwater seepage parameter inversion usually involves highly nonlinear and ill-posed partial differential equations, which are extremely challenging to solve.
[0003] Existing numerical simulation-based methods, such as the Finite Element Method (FEM) and the Finite Difference Method (FDM), although can simulate groundwater flow by solving partial differential equations, have obvious limitations. These methods are computationally expensive, especially when dealing with complex aquifer structures and large-scale observation data, requiring a large amount of computational resources and time, resulting in low efficiency. In addition, these methods have difficulty in dealing with nonlinear relationships and uncertainties, making it difficult to accurately capture the complex relationship between parameters and observation data, thereby limiting the inversion accuracy. At the same time, these methods are highly dependent on initial conditions and prior information, and deviations in initial conditions or prior information can lead to inaccurate inversion results. Finally, these traditional methods usually only provide point estimates of parameters, making it difficult to quantify the uncertainty of the inversion results, limiting their reliability in practical applications.
[0004] Although Bayesian methods can provide point estimates and uncertainty quantification of parameters, traditional Markov Chain Monte Carlo (MCMC) methods are computationally intensive and not suitable for large-scale problems. In recent years, with the rapid development of machine learning technology, neural networks have shown great potential in solving complex nonlinear problems. In particular, the Fourier Neural Operator (FNO), as a new type of neural network architecture, can learn the mapping relationship between operators and quickly generate solutions to partial differential equations, with high computational efficiency and strong generalization ability. At the same time, the Ensemble Kalman Filter (EnKF), as a posterior sampling method based on the Bayesian framework, can effectively handle uncertainty and provide uncertainty quantification of parameters through the propagation and update of ensemble members.
[0005] The Chinese patent application with publication number CN118862715A discloses a groundwater seepage prediction method, system, device and medium based on transfer learning and conditional embedding operator theory, wherein the method comprises the following steps: training a Fourier neural operator network in an offline case, obtaining a trained Fourier neural operator network by minimizing a regression loss; fine-tuning the trained Fourier neural operator network using transfer learning to obtain an adaptive Fourier neural operator network; updating the adaptive Fourier neural operator network using conditional embedding operator theory to obtain an adaptive Fourier neural operator network based on CEOD (Conditional embedding operator discrepancy); and solving to obtain a prediction result. The method replaces the traditional numerical method and simple neural network for solving partial differential equations based on transfer learning and conditional embedding operator theory, combines Fourier transform with neural operators, and uses fast Fourier transform in the Fourier domain to speed up the solution of differential operators in partial differential equations. However, although the Fourier neural operator network improves the calculation efficiency, the complexity of the model itself and the calculation cost in the training process are still high, the uncertainty of the inversion result cannot be quantified, and thus the groundwater seepage parameter inversion cannot be efficient, accurate and reliable. SUMMARY
[0006] In view of the low precision and efficiency of groundwater seepage parameter inversion in the prior art, the present application provides a groundwater seepage parameter inversion method combining FNO and ensemble Kalman filtering.
[0007] The present application is achieved by the following technical solutions:
[0008] A groundwater seepage parameter inversion method combining FNO and ensemble Kalman filtering comprises the following steps:
[0009] Step 1: Establish a two-dimensional Darcy flow equation seepage model to generate a training set and a test set of permeability and hydraulic head.
[0010] Step 2: Construct a Fourier neural operator network, and use the training set and the test set of permeability and hydraulic head to perform offline training on the Fourier neural operator network to obtain a Fourier neural operator surrogate model.
[0011] Step 3: For the Fourier neural operator surrogate model , use an adaptive correction algorithm to optimize the model parameters under the framework of ensemble Kalman filtering to obtain an adaptive correction Fourier neural operator network based on ensemble Kalman filtering.
[0012] Step 4, ensemble Kalman filter posterior sampling is performed using the adaptive modified Fourier neural operator network based on ensemble Kalman filter to generate posterior samples;
[0013] Step 5, the permeability parameter is extracted from the posterior samples.
[0014] Preferably, in step 1, the training set and test set of permeability are generated by two different Gaussian probability measures, and the training set and test set of hydraulic head are generated by finite element method.
[0015] Preferably, in step 2, the Fourier neural operator network includes two local fully connected neural operators and a plurality of Fourier neural operators.
[0016] The first local fully connected neural operator performs high-dimensional mapping on the input data to obtain representable features;
[0017] The Fourier neural operator performs Fourier transform and linear transform on the representable features to obtain Fourier domain features;
[0018] The second local fully connected neural operator re-maps the Fourier domain features back to the same function space as the input data to generate output results consistent with the input data.
[0019] Preferably, in step 3, the specific steps of obtaining the adaptive modified Fourier neural operator network based on Kalman filter are as follows:
[0020] Step 31, initialization: it is assumed that there is a high-fidelity model ;
[0021] Step 32, online calculation: using Fourier neural operator surrogate model As a positive problem solver, run ensemble Kalman filter, and after each iteration of the ensemble Kalman filter, check whether the Fourier neural operator surrogate model needs to be corrected, and record the sample state at this moment as ;
[0022] Step 33, model update judgment: calculate the relative error of the Fourier neural operator surrogate model and the high-fidelity model at , and obtain the updated surrogate model according to the relative error as the judgment standard;
[0023] Step 34, using the updated surrogate model as a positive problem solver, perform ensemble Kalman filter sampling to obtain posterior samples;
[0024] Step 35: Repeat steps 32-34 until the stopping criterion is met to obtain the adaptive modified Fourier neural operator network based on ensemble Kalman filtering.
[0025] Preferably, in step 33, if the relative error is greater than a given threshold... Then in Random selection within the unit sphere sample points ,in, Let k represent the sample points, be a constant, and solve using the finite element method. 1 sample point, obtained ;
[0026] Then construct an updated training set Use the updated training set Retraining the Fourier neural operator replacement model Update the Fourier neural operator replacement model The parameters of the last two network layers are denoted as the output model. and order ;
[0027] If the relative error does not exceed the given threshold Then, the Fourier neural operator will continue to be used as an alternative model. As an updated alternative model.
[0028] Preferably, in step 4, during posterior sampling, the corresponding ensemble Kalman filter sampling method is selected for different scenarios:
[0029] To address the inverse problem, an iterative regularized set Kalman filter is used for sampling;
[0030] For nonlinear problems, an iterative regularized ensemble Kalman filter with statistical linearization is used for sampling;
[0031] For complex problems with uncertain or changing prior distributions, an adaptive iterative regularized ensemble Kalman filter with statistical linearization is used for sampling.
[0032] Preferably, in step 5, the process of extracting the permeability parameter from the posterior sample is as follows:
[0033] First, collect all posterior samples obtained through ensemble Kalman filtering posterior sampling;
[0034] Then, the permeability values from all posterior samples are averaged to calculate the posterior mean permeability. ;
[0035] Finally, the posterior mean penetration rate The inversion results are output for subsequent analysis and application.
[0036] A groundwater seepage parameter inversion system combining FNO and ensemble Kalman filtering includes a data generation module, an initial model processing module, a model optimization module, a posterior sampling module, and a permeability extraction module. The data generation module establishes a two-dimensional Darcy flow equation seepage model and generates training and testing sets for permeability and hydraulic head. The initial model processing module constructs a Fourier neural operator network and performs offline training on the Fourier neural operator network using the training and testing sets for permeability and hydraulic head to obtain a Fourier neural operator replacement model. The model optimization module is used for the Fourier neural operator replacement model. Within the framework of ensemble Kalman filtering, an adaptive correction algorithm is used to optimize model parameters, resulting in an adaptively corrected Fourier neural operator network based on ensemble Kalman filtering. The sampling module is used to perform ensemble Kalman filtering posterior sampling using the adaptively corrected Fourier neural operator network based on ensemble Kalman filtering to generate posterior samples. The permeability extraction module is used to extract permeability parameters from the posterior samples.
[0037] An electronic device includes a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the groundwater seepage parameter inversion method combining FNO and ensemble Kalman filtering.
[0038] A storage medium storing a computer program that, when executed by a processor, implements the steps of the groundwater seepage parameter inversion method combining FNO and ensemble Kalman filtering.
[0039] Compared with existing technologies, it has the following beneficial effects:
[0040] This invention presents a groundwater seepage parameter inversion method combining Fourier neural operators (FNO) and ensemble Kalman filtering. It employs Fourier neural operators as a substitute model for the forward problem, significantly reducing the solution time. Simultaneously, ensemble Kalman filtering (EnKF) and its variants reduce the sample size required for posterior sampling, thereby greatly improving the overall efficiency of the inversion.
[0041] Among them, the Fourier neural operator can learn and capture the complex nonlinear relationship between parameters and observed data. Ensemble Kalman filtering further improves inversion accuracy by effectively handling parameter uncertainties and adaptively adjusting the prior distribution and regularization parameters. In particular, Adaptive Iterative Regularized Ensemble Kalman Filtering (Adaptive IREKF-SL) can accurately and quickly perform posterior sampling when dealing with prior distributions containing hyperparameters. Simultaneously, by introducing a regularization mechanism, it effectively avoids overfitting and semi-convergence problems, enhancing the stability of the inversion process. Ensemble Kalman filtering exhibits strong adaptability, still obtaining stable and reliable inversion results even under noise influences or inaccurate prior information.
[0042] This invention presents a groundwater seepage parameter inversion method combining FNO and ensemble Kalman filtering. The combination of FNO and ensemble Kalman filtering reduces computational resource consumption, lowers hardware costs, and improves the practicality and economy of the inversion method. Compared with traditional numerical methods, FNO and ensemble Kalman filtering improve computational efficiency while maintaining high accuracy, verifying the effectiveness and superiority of this invention in groundwater seepage parameter inversion. Attached Figure Description
[0043] Figure 1 This is a flowchart of a groundwater seepage parameter inversion method combining FNO and ensemble Kalman filtering according to the present invention;
[0044] Figure 2 (a) is a random parameter The truth values of (b), (c), and (d) are respectively Furthermore, when IREKF is used as the posterior sampling algorithm, the posterior mean is obtained by inversion from FEM, FNO, and AFNO.
[0045] Figure 3 (a) is a random parameter The truth values of (b), (c), and (d) are respectively Furthermore, when IREKF is used as the posterior sampling algorithm, the posterior mean is obtained by inversion from FEM, FNO, and AFNO.
[0046] Figure 4 (a), (b), and (c) are respectively When IREKF is used as a posterior sampling algorithm, the posterior mean is obtained by inversion from FEM, FNO, and AFNO.
[0047] Figure 5 (a)(b)(c) are respectively When IREKF is used as a posterior sampling algorithm, the posterior mean is obtained by inversion from FEM, FNO, and AFNO.
[0048] Figure 6 (a)(b)(c) are respectively When IREKF-SL is used as a posterior sampling algorithm, the posterior mean is obtained by inversion from FEM, FNO, and AFNO.
[0049] Figure 7 (a)(b)(c) are respectively When Adaptive IREKF-SL is used as a posterior sampling algorithm, the posterior mean is obtained by inversion from FEM, FNO, and AFNO. Detailed Implementation
[0050] The present invention will be further described in detail below with reference to specific embodiments. These descriptions are for explanation purposes only and are not intended to limit the scope of the invention.
[0051] This invention discloses a groundwater seepage parameter inversion method combining FNO and ensemble Kalman filtering, referring to... Figure 1 This includes the following steps:
[0052] Step 1: Establish a two-dimensional Darcy flow equation seepage model and generate training and test sets for permeability and hydraulic head.
[0053] The two-dimensional Darcy flow equation is a second-order elliptic partial differential equation describing the low-velocity seepage flow of fluid in porous media. Its equation form is as follows:
[0054]
[0055]
[0056] in, It is the underground permeability, which reflects the water conductivity of porous media at different locations; It is the hydraulic head, which represents the pressure potential energy of the fluid at that point. It is the source term. The porous medium region is taken as a square domain. , source item , .
[0057] The training and test sets for permeability were generated using two different Gaussian probability measures, while the training and test sets for hydraulic head were generated using the finite element method.
[0058] Specifically, in the training set, penetration rate Generated from a Gaussian probability measure, the covariance matrix of which is: , Let be the Laplace matrix, where, Represents the identity matrix.
[0059] Hydraulic head yes Discretized into The finite element solution under the mesh condition. When obtaining training data using the finite element method, the stiffness matrix has uncertainty; the uncertainty parameter is taken. .
[0060] In the test set, the true value of penetration. Generated by another Gaussian probability measure (covariance matrix) ).
[0061] Hydraulic head measurement value It is the true value of permeability Discretize into Uncertainty parameters of the stiffness matrix in the finite element solution at time t. .
[0062] Specifically, the finite element method (FEM) is used to numerically solve the two-dimensional Darcy flow equations to generate training and test sets for hydraulic head. The FEM is a method for solving partial differential equations by dividing the solution domain into a finite number of smaller elements and transforming the partial differential equations into a set of algebraic equations. During the solution process, a stiffness matrix is constructed. The stiffness matrix is obtained by discretizing the partial differential equations and contains information about the physical properties (such as material properties and geometry) of the equations. In the offline process, a linear system of equations is obtained. In actual calculations, constructing the stiffness matrix involves numerical integration of the spatial derivatives in the equations, which may introduce numerical errors. To simulate this uncertainty, an uncertainty parameter is introduced when constructing the stiffness matrix. The value of this parameter differs between the training and test sets. and This uncertainty parameter can be used to evaluate the model’s performance when faced with different levels of numerical uncertainty.
[0063] Additive Gaussian noise with a mean of 0 was added to the hydraulic head values calculated using the finite element method. Data measurements were taken at uniform grid points; for example, 100 measurement points were used, with the coordinates of the measurement points as follows: The measurement point data is noisy data, among which, and This indicates the row and column indices of the measurement point within the grid. Specifically, and The value range is from 1 to 10, which means that in In the grid, a measurement point is taken every 10 grid points to obtain... There are 10 measurement points.
[0064] The training and test sets are generated in the same way, but different covariance matrices are used to introduce uncertainty, which can enhance the generalization and robustness of the model. The training set contains 300 random parameters and their corresponding finite element solutions, while the test set contains 100 random parameters and their corresponding finite element solutions.
[0065] Step 2: Construct a Fourier neural operator network. Train the Fourier neural operator network offline using the training and testing sets of permeability and hydraulic head to obtain a Fourier neural operator replacement model. .
[0066] The Fourier Neural Operator Network (FNO) consists of two locally fully connected neural operators and several Fourier neural operators. The first locally fully connected neural operator performs a high-dimensional mapping on the input data to obtain representative features. The Fourier neural operators perform Fourier transform and linear transform on the representative features to obtain Fourier domain features. The second locally fully connected neural operator remaps the Fourier domain features back to the same function space as the input data, generating an output result consistent with the input data.
[0067] Specifically, the input data is first mapped to the frequency domain using a Fast Fourier Transform (FFT). Then, frequency domain features between specified frequencies are obtained through a filter. Next, an inverse Fourier transform is used to convert these frequency domain features back to the physical domain, yielding the transformation result. Simultaneously, a linear transformation is performed on the frequency domain features to obtain the linear transformation result. The results of the Fourier transform and the linear transformation are added together and then processed by a nonlinear activation function to obtain the final hidden features of that Fourier layer. These final hidden features are passed layer by layer, with each layer performing the same feature extraction and nonlinear activation function processing until the last layer, generating the Fourier domain features. A second locally fully connected neural operator projects the Fourier domain features back into the function space of the input data, completing the mapping from features to output.
[0068] At the data processing level, the parameters of partial differential equations Input to AFNO network middle, By locally fully connected neural operators , Fourier neural operator And another locally fully connected neural operator The composition is as follows:
[0069] parameter After the first locally fully connected neural operator Subsequently, a large number of characterizable features were extracted. ;
[0070] Characteristic features are represented by Fourier transform and linear transform respectively. Extraction is performed, and the features extracted by Fourier transform are denoted as the first extracted features. The features extracted by linear transformation are denoted as the second extracted features. ;
[0071] Extract the first feature Second Extraction Features Add them together, and then pass them through a nonlinear activation function. This yields the final hidden features of the Fourier layer. ;
[0072] These implicit features The features are passed down layer by layer to the next layer of the network. Each layer undergoes a similar feature extraction and processing process until the last layer.
[0073] The Fourier domain features generated by the last Fourier layer Input to the second locally fully connected neural operator To obtain the numerical solution corresponding to the parameter data. .
[0074] Mathematically, this process can be described as:
[0075]
[0076]
[0077]
[0078]
[0079]
[0080]
[0081] in, Represents the characteristic that can be characterized. It is a feature extracted through Fourier transform. These are features extracted through linear transformation. It is a non-linear activation function. It is a Fourier transform. It is the inverse Fourier transform. It is a periodic transformation. These are parameters related to linear transformation. This typically represents the output feature of the last Fourier layer, and the output of each layer during the layer-by-layer propagation process. These are all inputs to the next layer. Therefore, yes The output of the previous layer, ultimately It is obtained through such layer-by-layer transmission and transformation.
[0082] This invention uses the GELU function as a nonlinear activation function, expressed as follows: ,in , This is the error function.
[0083] Step 3, for the Fourier neural operator substitution model Within the framework of ensemble Kalman filtering, an adaptive correction algorithm is used to optimize model parameters, resulting in an adaptively corrected Fourier neural operator network (AFNO) based on ensemble Kalman filtering. The AFNO further optimizes network parameters based on FNO through an adaptive correction algorithm to improve solution accuracy in specific posterior distribution regions. During posterior exploration, new training points are automatically selected to fine-tune the FNO model.
[0084] Within the ensemble Kalman filter framework, adaptive correction algorithms (such as Adam) are used to optimize network parameters, particularly the last two layers. The specific process is as follows:
[0085] Step 31, Initialization: Assume there exists a high-fidelity model. This high-fidelity model It closely resembles the true positive model, and sets the initial learning rate. Maximum number of adaptive corrections and error threshold The initial iteration step size of the ensemble Kalman filter Set it to 0.1;
[0086] Step 32, Online Calculation: Using Fourier Neural Operators to Replace the Model As a solution to the positive problem, an ensemble Kalman filter is run, and the ensemble Kalman filter is applied in each iteration. After that, check whether the Fourier neural operator replacement model needs to be corrected. Record the sample state at that moment as ;
[0087] Step 33, Model Update Judgment: Calculate the Fourier neural operator replacement model respectively. and high-fidelity models exist The relative error at the point is used as the judgment criterion to obtain the updated alternative model;
[0088] Where the relative error is greater than a given threshold Then in Random selection within the unit sphere sample points ,in, Let k represent the sample points, be a constant, and solve using the finite element method. 1 sample point, obtained ;
[0089] Then construct an updated training set Use the updated training set Retraining the Fourier neural operator replacement model Update the Fourier neural operator replacement model The parameters of the last two network layers are denoted as the output model. and order ;
[0090] If the relative error does not exceed the given threshold Then, the Fourier neural operator will continue to be used as an alternative model. As an updated alternative model;
[0091] Step 34: Use the updated alternative model as the forward problem solver to perform ensemble Kalman filtering sampling to obtain posterior samples;
[0092] Step 35: Repeat steps 32-34 until the stopping criterion is met to obtain the adaptive modified Fourier neural operator network based on ensemble Kalman filtering.
[0093] Step 4: Use an adaptive modified Fourier neural operator network based on ensemble Kalman filtering to perform ensemble Kalman filtering posterior sampling and generate posterior samples.
[0094] During posterior sampling, the appropriate ensemble Kalman filter sampling method is selected for different scenarios:
[0095] (i) For the inverse problem, iterative regularized set Kalman filtering is used for sampling.
[0096] Iterative Regularized Ensemble Kalman Filtering (IREKF) builds upon traditional Ensemble Kalman Filtering (EnKF) by introducing a regularization term and a stopping criterion (such as the Morozov difference principle) to avoid overfitting and semi-convergence. It iteratively updates the particle set to gradually approximate the posterior distribution. The detailed calculation steps are as follows:
[0097] (1) Input: Let a priori The initial set of particles generated, , , For the observation noise covariance matrix. Start the loop. (The loop continues...) It is the number of particles; Represents the covariance matrix of a normal distribution; It is a parameter between 0 and 1, which is usually used to control the convergence speed or step size of the algorithm; It is greater than The parameters are typically used to determine the stopping criterion or the number of iterations for an algorithm; It is an iteration counter that starts from 0 and increments by 1 with each iteration until the stopping criterion is met.
[0098] (2) Prediction Steps. Define the forward solution for the particle: . Indicates the first Parameter values of individual particles Through mapping The predicted observations are obtained by transforming the data into the observation space. Using this set, the sample mean and the mean of the forward solution can be defined as follows: , .
[0099] (3) Analysis steps. Define the sample covariance matrix as follows:
[0100] ,
[0101] .
[0102] Calculate Kalman gain , The step size. Indicates parameters and observed values The covariance matrix between them. Represents the observed value Its own covariance matrix.
[0103] (4) Update each particle in the set according to the following formula (i.e., the Kalman filter equation):
[0104] . Indicates the first The particle in the first The actual observations at the next iteration. These observations... It is the observed value predicted by the model. The actual measurement data for comparison.
[0105] (5) Order Indicates the noise level, if Stop the loop and output the posterior sample. .
[0106] (II) For nonlinear problems, an iterative regularized ensemble Kalman filter with statistical linearization is used for sampling. Based on IREKF, statistical linearization is further introduced, and the calculation method of the Kalman gain is modified to avoid ensemble collapse. This method enhances the stability and accuracy of the algorithm by statistically linearizing the gradient of the forward model. The detailed calculation steps are as follows:
[0107] (1) Input: Let a priori The initial set of particles generated, , , For the observation noise covariance matrix. Start the loop.
[0108] (2) Prediction Steps. Define the forward solution for the particle: Using this set, the sample mean and the mean of the positive solutions can be defined as follows: , .
[0109] (3) Analysis steps. Define the sample covariance matrix as follows:
[0110] ,
[0111] .
[0112] calculate Kalman gain , The step size.
[0113] (4) Update each particle in the set according to the following formula (i.e., the Kalman filter equation):
[0114] .
[0115] (5) Order Indicates the noise level. If... Stop the loop and output the posterior sample. .
[0116] (III) For complex problems with uncertain or changing prior distributions, an adaptive iterative regularized ensemble Kalman filter with statistical linearization is used for sampling. Based on IREKF-SL, it assumes the prior distribution is random and introduces hyperparameters. By adaptively updating the hyperparameters, the adaptability and accuracy of the algorithm are further improved. This method can dynamically adjust the regularization parameters during iteration, better handling the uncertainty of the prior distribution. The detailed calculation steps are as follows:
[0117] (1) Input: Initialize hyperparameters ,make a priori The initial set of particles generated, , , To observe the noise covariance matrix. This is a hyperparameter used to adjust the compactness of the prior distribution, and it affects the initialization process of the particle filter algorithm. For Start the loop.
[0118] (2) Prediction Steps. Define the forward solution for the particle: Using this set, the sample mean and the mean of the positive solutions can be defined as follows: , .
[0119] (3) Analysis steps. Define the sample covariance matrix as follows:
[0120] ,
[0121] .
[0122] calculate Kalman gain , The step size.
[0123] (4) Update each particle in the set according to the following formula (i.e., the Kalman filter equation):
[0124] .
[0125] (5) Update the hyperparameters according to the hyperparameter distribution using the following formula. :
[0126] If the hyperparameters follow an exponential distribution The updated formula is: ;
[0127] If the hyperparameters follow a normal distribution The updated formula is: ;
[0128] make Indicates the noise level. If... Stop the loop and output the posterior sample. .
[0129] Through the above steps, the three methods provide efficient solutions for groundwater seepage parameter inversion in different scenarios. IREKF is suitable for inverse problems, IREKF-SL is suitable for nonlinear problems, and Adaptive IREKF-SL performs well in complex problems with uncertain or changing prior distributions.
[0130] Step 5: Extract permeability parameters from the posterior sample. The detailed process is as follows:
[0131] First, all posterior samples obtained through ensemble Kalman filtering posterior sampling are collected, and these samples contain multiple possible permeability values.
[0132] Then, the permeability values from all posterior samples are averaged to calculate the posterior mean permeability. ,Right now:
[0133]
[0134] in, It is the number of posterior samples. It is the first The permeability value in the posterior sample. Posterior mean permeability. This represents the most likely value of the penetration rate given the observed data and model assumptions.
[0135] Finally, the calculated posterior mean permeability will be used. The results of the inversion are output for subsequent analysis and application.
[0136] Step 6, Numerical Verification
[0137] We employ the Finite Element Method (FEM), FNO, and AFNO as forward problem solvers, combined with IREKF, IREKF-SL, and Adaptive IREKF-SL for posterior sampling, to explore the accuracy and efficiency performance of the results obtained in solving the inverse problem of the two-dimensional Darcy flow equation under different particle numbers and noise levels. Training and test sets are generated using Gaussian probability measures. The training set contains 300 sets of random parameters and their finite element solutions, while the test set contains 100 sets.
[0138] Both sets of data were generated in the same way, but different covariance matrices were used to introduce uncertainty to enhance the model's generalization and robustness. A filtering method was selected from IREKF, IREKF-SL, and Adaptive IREKF-SL. The number of particles was set. Initial iteration step size Maximum number of adaptive corrections .
[0139] Figure 2 andFigure 3 The performance comparison of different forward problem solvers for the inversion problem of the two-dimensional Darcy flow equation is presented under different particle numbers. When the particle number is small ( When using FEM as the forward problem solver, a significant error exists between the posterior mean obtained through IREKF and the true value. If FNO is used as the forward problem solver, the posterior mean not only deviates significantly from the true value but also shows a further increase in error compared to the posterior mean obtained through FEM. Even with the introduction of AFNO for model correction, a large difference remains between the inversion result and the true value, as well as the FEM inversion solution. It is speculated that the main reason for this phenomenon is that insufficient particle count leads to inaccurate estimation of sample variance, affecting the calculation of Kalman gain and thus reducing the accuracy of parameter estimation.
[0140] When the number of particles ( After increasing the number of particles, using FEM as the forward problem solver for inversion calculation significantly reduced the error between the inversion results and the true values. This indicates that the FEM solver can provide more accurate estimation results as the number of particles increases. Nevertheless, a large error still exists between the posterior mean obtained using FNO as the forward problem solver and the true values, as well as the posterior mean obtained using FEM. This error is mainly attributed to the difference in data distribution between the training and test sets, leading to insufficient generalization ability of the FNO model. However, after correction using the AFNO model, the error between the posterior mean obtained using AFNO as the forward problem solver and the posterior mean obtained using FEM is significantly reduced and closer to the true values. This result shows that the AFNO model can effectively improve the accuracy of inversion by correcting the inaccuracies of the FNO model in the posterior distribution space, thereby enhancing the model's generalization ability and inversion accuracy.
[0141] Figure 4 and Figure 5 This demonstrates the effectiveness of using FEM, FNO, and AFNO as forward problem solvers, combined with IREKF for posterior sampling, for the two-dimensional Darcy flow equation inversion problem under different noise levels. At low noise levels... conditions, Figure 4 The posterior mean values obtained by three forward problem solvers are shown. The results indicate that, compared to FEM, FNO as a forward problem solver has a larger error in its inversion solution. However, when an adaptive correction algorithm is introduced, AFNO significantly improves the inversion accuracy, and the error between it and the inversion solution obtained by FEM is significantly reduced. This verifies that AFNO can effectively improve inversion accuracy and obtain inversion results close to those of FEM under low noise levels. Under high noise levels… conditions, Figure 5The results show the posterior mean values obtained by IREKF sampling for the three forward problem solvers under the same experimental settings. It can be seen that the error between the FNO inversion solution and the FEM inversion solution is relatively large. Although the error between AFNO and FEM inversion solutions is reduced after introducing the adaptive correction algorithm, the correction effect of AFNO is not significant compared to low noise levels. This may be because the increased noise level leads to a decrease in the correction effect of AFNO. In summary, the AFNO model can effectively improve inversion accuracy under low noise levels, but under high noise levels, the correction effect may become insignificant due to noise interference. This indicates that in practical applications, noise level is one of the important factors affecting inversion accuracy, and AFNO, as an improved forward problem solver, performs differently under different noise levels.
[0142] In the study of the inversion problem of the two-dimensional Darcy flow equation, a statistical comparison of sampling time and accuracy was conducted for three forward problem solvers. Experimental results show that the total time for using the FNO substitute model and performing IREKF sampling with this model is approximately 597 seconds; while after introducing an adaptive correction mechanism, the training and posterior sampling of the AFNO substitute model requires 804 seconds; in contrast, solving the forward problem using the traditional FEM and performing IREKF sampling requires approximately 1835 seconds. These data indicate that although FNO has some errors, it is about 3 times more time efficient than FEM, and these errors can be effectively corrected by the adaptive algorithm, thus increasing the overall computational cost only slightly. Furthermore, AFNO saves more than 2 times the time compared to FEM while providing higher accuracy sampling results.
[0143] Figure 6 and Figure 7 The effects of two different ensemble Kalman filtering algorithms—IREKF-SL and AdaptiveIREKF-SL—on the two-dimensional Darcy flow equation inversion problem are demonstrated. In the experiment, the number of particles ( ) and noise level ( The values were fixed to ensure comparability of results. The experiments only compared the closeness of the posterior means obtained from FNO and AFNO to FEM, rather than comparing them to the true values. In the IREKF-SL method, after a certain number of iterations (e.g., 10), the relative error between the posterior means obtained from FNO and FEM is calculated to determine whether adaptive correction is needed. Figure 6The posterior means obtained by the three methods, FEM, FNO, and AFNO, under this algorithm are shown. The results indicate that AFNO, compared to the uncorrected FNO, is more effective in reducing the error between the posterior means and those obtained by FEM, demonstrating the improvement effect of AFNO in enhancing inversion accuracy. In the Adaptive IREKF-SL method, the initial hyperparameters are set to 1 and assumed to follow an exponential distribution. During each iteration, the relative error is calculated to determine whether correction is needed. Figure 7 The diagram shows the posterior means obtained by the three methods, FEM, FNO, and AFNO, under this algorithm. Similar to IREKF-SL, AFNO also shows an improvement over FNO under the Adaptive IREKF-SL algorithm, making the posterior mean closer to the posterior mean obtained by FEM.
[0144] Furthermore, when using FEM as the forward problem solver, the posterior sampling times of the IREKF-SL and Adaptive IREKF-SL algorithms are approximately 1069 seconds and 357 seconds, respectively. Using the FNO substitute model, the sampling time of IREKF-SL is approximately 421 seconds, while the sampling time of Adaptive IREKF-SL is further reduced to approximately 126 seconds. After introducing an adaptive correction mechanism, the sampling times of the AFNO substitute model are approximately 489 seconds for IREKF-SL and approximately 112 seconds for Adaptive IREKF-SL. Therefore, the improved posterior sampling algorithms (i.e., IREKF-SL and Adaptive IREKF-SL) significantly accelerate the iteration speed of the ensemble particles and reduce the overall sampling time. Compared to the FEM method, FNO and AFNO, as substitute models, significantly save computation time without introducing excessively high solution errors, thus verifying the effectiveness of AFNO in improving inversion efficiency and accuracy. These results demonstrate that AFNO combined with the improved posterior sampling algorithm can not only provide accuracy comparable to the traditional FEM method, but also significantly reduce computational costs, making it of significant practical value for solving computationally intensive inversion problems.
[0145] This invention proposes a groundwater seepage parameter inversion method combining FNO and ensemble Kalman filtering, which revolves around solving the inverse problem of partial differential equations. It constructs an alternative model based on Bayesian inversion theory and solves the problem by performing posterior sampling of the target parameters. In view of the inadequacy of MCMC requiring too large a sample size, three ensemble Kalman filter variants are proposed for posterior sampling.
[0146] In the solution of the forward problem, to reduce computational load, a neural operator substitution model is introduced based on the idea of machine learning substitution models. This model can learn operators in infinite-dimensional space. To further improve computational efficiency, Fourier neural operators are used as the substitution model for the forward problem within the Bayesian framework, and combined with ensemble Kalman filtering for sampling. An online adaptive correction mechanism is also introduced, allowing the Fourier neural operator to continuously fit new data to obtain a better posterior estimate.
[0147] In summary, this invention combines Fourier neural operators and ensemble Kalman filtering, and optimizes network parameters through an adaptive correction algorithm, effectively improving the accuracy and efficiency of groundwater seepage parameter inversion, and has significant application value.
[0148] This invention also discloses a groundwater seepage parameter inversion system combining Fourier neural operators and ensemble Kalman filtering, including a data generation module, an initial model processing module, a model optimization module, a posterior sampling module, and a permeability extraction module. The data generation module is used to establish a two-dimensional Darcy flow equation seepage model and generate training and testing sets for permeability and hydraulic head. The initial model processing module is used to build a Fourier neural operator network and perform offline training to obtain a Fourier neural operator replacement model. The model optimization module is used for the Fourier neural operator replacement model. Within the framework of ensemble Kalman filtering, an adaptive correction algorithm is used to optimize model parameters, resulting in an adaptively corrected Fourier neural operator network based on Kalman filtering. The sampling module is used to perform ensemble Kalman filtering sampling using the adaptively corrected Fourier neural operator network based on Kalman filtering to generate posterior samples. The permeability extraction module is used to extract permeability parameters from the posterior samples.
[0149] The present invention also discloses an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the groundwater seepage parameter inversion method combining FNO and ensemble Kalman filtering.
[0150] The present invention also discloses a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the groundwater seepage parameter inversion method combining FNO and ensemble Kalman filtering.
[0151] The above description is merely a preferred embodiment of the present invention and is not intended to limit the technical solution of the present invention in any way. Those skilled in the art should understand that, without departing from the spirit and principles of the present invention, the technical solution can be modified and replaced in several simple ways, and these modifications and replacements are all within the scope of protection covered by the claims.
Claims
1. A method for inverting groundwater seepage parameters by combining FNO and ensemble Kalman filtering, characterized in that, Includes the following steps: Step 1: Establish a two-dimensional Darcy flow equation seepage model and generate training and test sets for permeability and hydraulic head; Step 2: Construct a Fourier neural operator network. Train the Fourier neural operator network offline using the training and testing sets of permeability and hydraulic head to obtain a Fourier neural operator replacement model. ; The Fourier neural operator network includes two locally fully connected neural operators and several Fourier neural operators. The first locally fully connected neural operator performs high-dimensional mapping on the input data to obtain representative features; Fourier neural operators perform Fourier transform and linear transform on the characterizable features to obtain Fourier domain features. The second locally fully connected neural operator remaps the Fourier domain features back to the same function space as the input data, generating an output consistent with the input data; Step 3, for the Fourier neural operator substitution model Within the framework of ensemble Kalman filtering, an adaptive correction algorithm is used to optimize the model parameters, resulting in an adaptively corrected Fourier neural operator network based on ensemble Kalman filtering. The specific steps are as follows: Step 31, Initialization: Assume there exists a high-fidelity model. ; Step 32, Online Calculation: Using Fourier Neural Operators to Replace the Model As a solution to the positive problem, an ensemble Kalman filter is run, and the ensemble Kalman filter is applied in each iteration. After that, check whether the Fourier neural operator replacement model needs to be corrected. Record the sample state at that moment as ; Step 33, Model Update Judgment: Calculate the Fourier neural operator replacement model respectively. and high-fidelity models exist The relative error at a given threshold is used as the criterion to obtain the updated replacement model; if the relative error is greater than a given threshold... Then in Random selection within the unit sphere sample points ,in, Let k represent the sample points, be a constant, and solve using the finite element method. 1 sample point, to obtain ; Then construct an updated training set Use the updated training set Retraining the Fourier neural operator replacement model Update the Fourier neural operator replacement model The parameters of the last two network layers are denoted as the output model. and order ; If the relative error does not exceed the given threshold Then, the Fourier neural operator will continue to be used as an alternative model. As an updated alternative model; Step 34: Use the updated alternative model as the forward problem solver to perform ensemble Kalman filtering sampling to obtain posterior samples; Step 35: Repeat steps 32-34 until the stopping criterion is met to obtain the adaptive modified Fourier neural operator network based on ensemble Kalman filtering; Step 4: Use an adaptive modified Fourier neural operator network based on ensemble Kalman filtering to perform ensemble Kalman filtering posterior sampling and generate posterior samples; Step 5: Extract permeability parameters from the posterior sample.
2. The groundwater seepage parameter inversion method combining FNO and ensemble Kalman filtering according to claim 1, characterized in that, In step 1, the training and test sets for permeability are generated by two different Gaussian probability measures, while the training and test sets for hydraulic head are generated by the finite element method.
3. The groundwater seepage parameter inversion method combining FNO and ensemble Kalman filtering according to claim 1, characterized in that, In step 4, during posterior sampling, the corresponding ensemble Kalman filter sampling method is selected for different scenarios: To address the inverse problem, an iterative regularized set Kalman filter is used for sampling; For nonlinear problems, an iterative regularized ensemble Kalman filter with statistical linearization is used for sampling; For complex problems with uncertain or changing prior distributions, an adaptive iterative regularized ensemble Kalman filter with statistical linearization is used for sampling.
4. The groundwater seepage parameter inversion method combining FNO and ensemble Kalman filtering according to claim 3, characterized in that, In step 5, the process of extracting the permeability parameter from the posterior sample is as follows: First, collect all posterior samples obtained through ensemble Kalman filtering posterior sampling; Then, the permeability values from all posterior samples are averaged to calculate the posterior mean permeability. ; Finally, the posterior mean penetration rate The inversion results are output for subsequent analysis and application.
5. A groundwater seepage parameter inversion system combining FNO and ensemble Kalman filtering, used to implement the groundwater seepage parameter inversion method combining FNO and ensemble Kalman filtering as described in any one of claims 1 to 4, characterized in that, The system includes a data generation module, an initial model processing module, a model optimization module, a posterior sampling module, and a permeability extraction module. The data generation module is used to establish a two-dimensional Darcy flow equation seepage model and generate training and testing sets for permeability and hydraulic head. The initial model processing module is used to construct a Fourier neural operator network and to perform offline training on the Fourier neural operator network using the training and testing sets for permeability and hydraulic head to obtain a Fourier neural operator alternative model. The model optimization module is used for the Fourier neural operator replacement model. Within the framework of ensemble Kalman filtering, an adaptive correction algorithm is used to optimize model parameters, resulting in an adaptively corrected Fourier neural operator network based on ensemble Kalman filtering. The sampling module is used to perform ensemble Kalman filtering posterior sampling using the adaptively corrected Fourier neural operator network based on ensemble Kalman filtering to generate posterior samples. The permeability extraction module is used to extract permeability parameters from the posterior samples.
6. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the groundwater seepage parameter inversion method combining FNO and ensemble Kalman filtering as described in any one of claims 1 to 4.
7. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the groundwater seepage parameter inversion method combining FNO and ensemble Kalman filtering as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Underground water seepage prediction method, system and equipment based on transfer learning and conditional embedding operator theory and medium
CN118862715A
Shield tunneling digital twin stratum construction method and system fusing multi-source data
WO2024229914A1