Magnetic fluid coefficient inversion method based on PINN

Through the PINN-based magnetic fluid system inversion method, the accuracy and consistency of parameter inversion under sparse data are solved using feedforward neural network and physical equation constraints, and efficient parameter inversion of magnetofluid system is achieved. In the case of scarce data near the boundary layer, the computing cost and resource requirements are significantly reduced.

CN119067005APending Publication Date: 2024-12-03ANHUI UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411079622.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The prior art has poor accuracy in inverting magnetofluid system parameters when processing sparse data, poor physical consistency, and it is difficult to use a small amount of data near the boundary layer to invert parameters. Inversion of coefficients that change over time is challenging and computational cost is high. .

Method used

Using the magnetic fluid system inversion method based on physical information neural network (PINN), by constructing a PINN model, using the feedforward neural network to invert constant coefficients and variable coefficients over time, embedded physical equation constraints to reduce dependence on data. Improve computing efficiency.

Benefits of technology

In the case of sparse data, effectively invert parameters, reduce computing resource requirements, improve physical consistency, and quickly fit coefficients near the boundary layer, significantly reduce calculation costs, and ensure that the results comply with the laws of physics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119067005A_ABST
    Figure CN119067005A_ABST
Patent Text Reader

Abstract

The invention discloses a magnetic fluid coefficient inversion method based on a PINN, relates to the technical field of magnetic fluid parameter inversion, and solves the problems that in the prior art, when sparse data is used for parameter inversion, the accuracy is poor, the physical constraint is weak, a small amount of data near a boundary layer is difficult to invert parameters, and the accuracy is poor. And inversion of the coefficient changing along with time is challenging. A plurality of data matrixes are obtained according to a magnetofluid equation; respectively preprocessing the magnetofluid equation and the plurality of data matrixes to obtain a normalized magnetofluid equation and a training data set; training a PINN model based on the normalized magnetofluid equation and the training data set; comparing a prediction coefficient output by the PINN model with a real coefficient, and calculating an inversion error; according to the method, the physical equation is embedded into the neural network, effective parameter inversion can be carried out even under the condition of sparse data, and the constraint provided by the physical equation enables the dependency of the model on the data quantity and quality to be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of magnetic fluid parameter inversion, and specifically is a magnetic fluid coefficient inversion method based on PINN. Background Art

[0002] Magnetohydrodynamics (MHD) is the science that studies the interaction between magnetic fields and conductive fluids. It is widely used in engineering, physics, astronomy and other fields. For example, in nuclear fusion research, MHD is used to describe plasma behavior; in geophysics, MHD is used to explain the generation and changes of the geomagnetic field; in industry, MHD is used in metallurgical processes and material processing. In magnetohydrodynamics, parameter identification (i.e., determining the key physical parameters in the system) is a key step in accurate modeling and simulation. However, due to the complexity and nonlinear characteristics of magnetohydrodynamic systems, accurately describing and simulating these systems remains a huge challenge.

[0003] The existing methods for inverting the parameters of MHD systems mainly include methods based on numerical simulation, methods based on experimental data, and classical machine learning methods. Among the existing methods, the methods based on experimental data and the methods based on classical machine learning require experimental data or simulation data to invert the parameters, but in the case of sparse data, inverting the parameters will face significant challenges. Although these methods can still achieve parameter inversion to a certain extent through reasonable coping strategies, in comparison, the methods based on physical information neural network (PINN) have obvious advantages in processing sparse data. In addition, the existing methods have a poor degree of utilization of physical equations. Although the establishment of physical models based on numerical simulation methods belongs to strong physical constraints, the use of finite element, finite difference or finite volume methods for discretization and solution has high computational complexity and computational cost; while the methods based on experimental data and the methods based on classical machine learning are both weak physical constraints, and are more dependent on data, so the inversion parameters require a large amount of high-quality data. Since the methods based on experimental data and the methods based on classical machine learning require a large amount of high-quality data, it is difficult to obtain a large amount of data near the boundary layer for parameter inversion. Therefore, if there is only a small amount of data near the boundary layer, it is very challenging to use the methods based on experimental data and the methods based on classical machine learning to invert the parameters. When inverting coefficients that vary with time, existing methods have high requirements on the amount of data. In addition, methods based on numerical simulation have high computational costs and are more time-consuming. Methods based on experimental data are also highly dependent on complete, high-quality time series data and have poor physical consistency. Methods based on classical machine learning lack physical constraints and are difficult to accurately invert complex coefficients that vary with time. Summary of the invention

[0004] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes a PINN-based magnetohydrodynamic coefficient inversion method to solve the technical problems existing in the prior art, such as poor accuracy of inverting parameters using sparse data, poor physical consistency, difficulty in inverting parameters using a small amount of data near the boundary layer, and challenging inverting coefficients that vary with time.

[0005] To achieve the above object, the first aspect of the present invention provides a PINN-based magnetic fluid coefficient inversion method, comprising:

[0006] Step S1: obtaining a number of data matrices according to the magnetic fluid equation;

[0007] Step S2: Preprocessing the magnetic fluid equation and several data matrices respectively to obtain a normalized magnetic fluid equation and a training data set;

[0008] Step S3: constructing a PINN model based on the coefficient type of the inversion coefficient; wherein the coefficient type includes a constant coefficient and a time-varying coefficient;

[0009] Step S4: training the PINN model based on the normalized magnetic fluid equation and the training data set;

[0010] Step S5: Compare the predicted coefficients output by the PINN model with the true coefficients and calculate the inversion error.

[0011] Preferably, the data matrices obtained according to the magnetic fluid equation include:

[0012] The magnetic fluid equation is as follows:

[0013]

[0014] in, k is a constant, i is an imaginary unit, the unknown coefficient λ1 is the ratio of the real resistance to the theoretical resistance, the unknown coefficient λ2 is the ratio of the real magnetic field to the theoretical magnetic field, x is space, t is time, δψ0 is the equilibrium magnetic flux, ψ1 is the perturbation magnetic flux, φ1 is the perturbation stream function, is the normalized space, B0 is the equilibrium magnetic field, η is the resistance, J z1 is the disturbance current, μ0 is the vacuum permeability;

[0015] Based on the magnetohydrodynamic equation, several data matrices M with shapes of m×n are obtained from the spatial domain and the time domain. j , where j = 1, 2, 3, 4, 5; m is the number of spatial series samples, n is the number of time series samples; M1, M2, M3, M4, M5 are the corresponding functions ψ1, φ1, A data matrix in both time and space dimensions;

[0016] A simulation experiment is conducted on the magnetic fluid system, and several data sequences are obtained from the spatial domain and time domain of the magnetic fluid system, and the data sequences are filled into the corresponding data matrix M. j middle.

[0017] It should be noted that the disturbance flux ψ1 and the disturbance stream function φ1 are both functions of space x and time t; is the first-order partial derivative of the disturbance flux ψ1 with respect to time t; is the second-order partial derivative of the disturbance flux ψ1 with respect to space x; is the first-order partial derivative of the equilibrium magnetic flux δψ0 with respect to space x; due to the functions ψ1, φ1, The expression forms of are all matrices, so the present invention uses data matrices to represent the corresponding functions.

[0018] Preferably, the step of acquiring a plurality of data sequences from the space domain and the time domain of the magnetic fluid system includes:

[0019] There are two ways to obtain data sequences from the spatial domain of a magnetic fluid system: the first is to obtain data sequences uniformly in the entire spatial domain, and the second is to obtain data sequences uniformly near the boundary layer; the boundary layer refers to the vicinity of the spatial point with the most drastic changes in the entire spatial domain of the magnetic fluid system and its nearby domain;

[0020] The data sequence is acquired from the time domain of the magnetic fluid system at set time intervals.

[0021] The present invention obtains data for inverting the magnetohydrodynamic coefficients in two different ways, one is to uniformly obtain data in the entire spatial domain, and the other is to uniformly obtain data near the boundary layer; when both methods can correctly invert the coefficients, uniformly obtaining data near the boundary layer can fit the real coefficients more quickly, which is related to the characteristics of the area near the boundary layer. The inside of the boundary layer is the core area, and the evolution of the system is very dramatic and has strong spatial characteristics. Therefore, when there are more data in the core area or it is closer to the core of the core area, the fitting speed will be faster.

[0022] Preferably, the preprocessing of the magnetic fluid equation and the plurality of data matrices respectively comprises:

[0023] The magnetic fluid equation is preprocessed, that is, normalized, to obtain the normalized magnetic fluid equation:

[0024]

[0025] in, Among them, τ A , τ R , a, Bp , c are all constants;

[0026] Several data matrices are preprocessed and integrated into training datasets.

[0027] Preferably, the constructing of the PINN model based on the coefficient type of the inversion coefficient comprises:

[0028] Get the coefficient type of the inversion coefficient;

[0029] If the coefficient type is a constant coefficient: set the unknown coefficients λ1 and λ2 as trainable variables and set an initial value for them; iteratively optimize the loss function through the optimizer until the maximum number of iterations is reached to obtain the predicted values ​​λ'1 and λ'2 of the unknown coefficients λ1 and λ2;

[0030] If the coefficient type is a time-varying coefficient: set up two feedforward neural networks to invert the unknown coefficients λ1 and λ2; the input of the feedforward neural network is time, and the output is the predicted coefficients λ1(t) and λ2(t); the optimizer iteratively optimizes the loss function to obtain the predicted values ​​λ1(t) and λ2(t) of the unknown coefficients λ1 and λ2;

[0031] Among them, the loss function is the equation loss of the PINN model.

[0032] The present invention uses a feedforward neural network to invert the coefficients that change with time. Compared with the high cost calculation of the existing method, the feedforward neural network optimizes the calculation to make the cost lower, enable efficient processing and optimization, and significantly reduce the demand for computing resources.

[0033] Preferably, the training of the PINN model based on the normalized magnetic fluid equation and the training data set includes:

[0034] The training data set is used as the input of the PINN model, and the normalized magnetohydrodynamic equation is embedded in the PINN model; the loss function is calculated based on the coefficient type of the inversion parameter and the normalized magnetohydrodynamic equation, and the PINN model is trained by minimizing the equation loss.

[0035] Preferably, the coefficient type based on the inversion parameter and the normalized magnetic fluid equation calculation loss function includes:

[0036] If the coefficient type of the inversion coefficient is a constant coefficient, the output of the PINN model is the predicted value λ'1, λ'2 of the constant coefficient, and the loss function Loss of the PINN model is defined as:

[0037] Loss = αLoss f ;

[0038]

[0039] Among them, Loss f is the physical equation constraint, α is the weight coefficient;

[0040] If the coefficient type of the inversion coefficient is a time-varying coefficient, the output of the model is λ1(t) and λ2(t), and the loss function Loss of the PINN model is defined as:

[0041] Loss = βLoss f ;

[0042]

[0043] Among them, Loss f is the physical equation constraint, and β is the weight coefficient.

[0044] The present invention inverts the magnetohydrodynamic coefficients based on the PINN model. By embedding physical equations into neural networks, effective parameter inversion can be performed even when data is sparse. The constraints provided by the physical equations reduce the model's dependence on data quantity and quality. At the same time, compared with existing methods, this method also has strong physical constraints, ensuring that the model results not only conform to the data, but also conform to the laws of physics, and have higher physical consistency.

[0045] Compared with the prior art, the present invention has the following beneficial effects:

[0046] 1. The present invention obtains data for inverting the magnetohydrodynamic coefficients in two different ways, one is to uniformly obtain data in the entire spatial domain, and the other is to uniformly obtain data near the boundary layer; when both methods can correctly invert the coefficients, uniformly obtaining data near the boundary layer can fit the real coefficients more quickly, which is related to the characteristics of the area near the boundary layer. The inside of the boundary layer is the core area, and the evolution of the system is very dramatic and has strong spatial characteristics. Therefore, when there are more data in the core area or it is closer to the core of the core area, the fitting speed will be faster.

[0047] 2. The present invention uses a feedforward neural network to invert the coefficients that change with time. Compared with the high cost calculation of the existing method, the feedforward neural network optimizes the calculation to make the cost lower, and can efficiently process and optimize, which significantly reduces the demand for computing resources.

[0048] 3. The present invention inverts the magnetohydrodynamic coefficients based on the PINN model. By embedding the physical equations into the neural network, effective parameter inversion can be performed even when the data is sparse. The constraints provided by the physical equations reduce the model's dependence on the quantity and quality of data. At the same time, compared with the existing methods, this method also has strong physical constraints, ensuring that the model results not only conform to the data, but also conform to the laws of physics, and have higher physical consistency. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1 It is a flow chart of the magnetic fluid coefficient inversion method based on PINN of the present invention;

[0051] Figure 2 It is a comparison diagram of the fitting curves of the constant coefficient λ1 corresponding to the two data acquisition methods in the present invention;

[0052] Figure 3 It is a comparison diagram of the fitting curves of the constant coefficient λ2 corresponding to the two data acquisition methods in the present invention;

[0053] Figure 4 It is a relative error change diagram of the fitting curve of the constant time-varying coefficient λ1(t) corresponding to the two data acquisition methods in the present invention;

[0054] Figure 5 It is a relative error change diagram of the fitting curve of the constant time-varying coefficient λ2(t) corresponding to the two data acquisition methods in the present invention. DETAILED DESCRIPTION

[0055] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] See also Figure 1-Figure 5 , the present invention provides the following three embodiments:

[0057] Example 1

[0058] like Figure 1 As shown, this embodiment provides a PINN-based magnetic fluid coefficient inversion method, including:

[0059] Step S1: obtaining a number of data matrices according to the magnetic fluid equation;

[0060] Specifically, the magnetic fluid equation is as follows:

[0061]

[0062] in, k is a constant, i is an imaginary unit, the unknown coefficient λ1 is the ratio of the real resistance to the theoretical resistance, the unknown coefficient λ2 is the ratio of the real magnetic field to the theoretical magnetic field, x is space, t is time, δψ0 is the equilibrium magnetic flux, ψ1 is the perturbation magnetic flux, φ1 is the perturbation stream function, is the normalized space, B0 is the equilibrium magnetic field, η is the resistance, J z1 is the disturbance current, μ0 is the vacuum permeability;

[0063] Based on the magnetohydrodynamic equation, several data matrices M with shapes of m×n are obtained from the spatial domain and the time domain. j , where j = 1, 2, 3, 4, 5; m is the number of spatial series samples, n is the number of time series samples; M1, M2, M3, M4, M5 are the corresponding functions ψ1, φ1, A data matrix in both time and space dimensions;

[0064] A simulation experiment is conducted on the magnetic fluid system, and several data sequences are obtained from the spatial domain and time domain of the magnetic fluid system, and the data sequences are filled into the corresponding data matrix M. j middle.

[0065] It should be noted that the disturbance flux ψ1 and the disturbance stream function φ1 are both functions of space x and time t; is the first-order partial derivative of the disturbance flux ψ1 with respect to time t; is the second-order partial derivative of the disturbance flux ψ1 with respect to space x; is the first-order partial derivative of the equilibrium magnetic flux δψ0 with respect to space x; due to the functions ψ1, φ1, The expression forms of are all matrices, so the present invention uses data matrices to represent the corresponding functions.

[0066] In this embodiment, several data sequences are obtained from the space domain and time domain of the magnetic fluid system, including:

[0067] There are two ways to obtain data sequences from the spatial domain of a magnetic fluid system: the first is to obtain data sequences uniformly in the entire spatial domain, and the second is to obtain data sequences uniformly near the boundary layer; the boundary layer refers to the vicinity of the spatial point with the most drastic changes in the entire spatial domain of the magnetic fluid system and its nearby domain;

[0068] The data sequence is acquired from the time domain of the magnetic fluid system at set time intervals.

[0069] The present invention obtains data for inverting the magnetohydrodynamic coefficients in two different ways, one is to uniformly obtain data in the entire spatial domain, and the other is to uniformly obtain data near the boundary layer; when both methods can correctly invert the coefficients, uniformly obtaining data near the boundary layer can fit the real coefficients more quickly, which is related to the characteristics of the area near the boundary layer. The inside of the boundary layer is the core area, and the evolution of the system is very dramatic and has strong spatial characteristics. Therefore, when there are more data in the core area or it is closer to the core of the core area, the fitting speed will be faster.

[0070] Step S2: Preprocessing the magnetic fluid equation and several data matrices respectively to obtain a normalized magnetic fluid equation and a training data set;

[0071] The magnetic fluid equation is preprocessed, that is, normalized, to obtain the normalized magnetic fluid equation:

[0072]

[0073] in, Among them, τ A , τ R , a, B p , c are all constants;

[0074] Several data matrices are preprocessed and integrated into training datasets.

[0075] Step S3: constructing a PINN model based on the coefficient type of the inversion coefficient; wherein the coefficient type includes a constant coefficient and a time-varying coefficient;

[0076] Get the coefficient type of the inversion coefficient;

[0077] If the coefficient type is a constant coefficient: set the unknown coefficients λ1 and λ2 as trainable variables and set an initial value for them; iteratively optimize the loss function through the optimizer until the maximum number of iterations is reached to obtain the predicted values ​​λ'1 and λ'2 of the unknown coefficients λ1 and λ2;

[0078] If the coefficient type is a time-varying coefficient: set up two feedforward neural networks to invert the unknown coefficients λ1 and λ2; the input of the feedforward neural network is time, and the output is the predicted coefficients λ1(t) and λ2(t); the optimizer iteratively optimizes the loss function to obtain the predicted values ​​λ1(t) and λ2(t) of the unknown coefficients λ1 and λ2;

[0079] Among them, the loss function is the equation loss of the PINN model.

[0080] The present invention uses a feedforward neural network to invert the coefficients that change with time. Compared with the high cost calculation of the existing method, the feedforward neural network optimizes the calculation to make the cost lower, enable efficient processing and optimization, and significantly reduce the demand for computing resources.

[0081] Step S4: training the PINN model based on the normalized magnetic fluid equation and the training data set;

[0082] The training data set is used as the input of the PINN model, and the normalized magnetic fluid equation is embedded in the PINN model; the loss function is calculated based on the normalized magnetic fluid equation, and the PINN model is trained by minimizing the equation loss;

[0083] In this embodiment, the loss function is calculated based on the normalized magnetic fluid equation, and the specific steps are as follows:

[0084] If the coefficient type of the inversion coefficient is a constant coefficient, the output of the PINN model is the predicted value λ'1, λ'2 of the constant coefficient, and the loss function Loss of the PINN model is defined as:

[0085] Loss = αLoss f ;

[0086]

[0087] Among them, Loss f is the physical equation constraint, α is the weight coefficient;

[0088] If the coefficient type of the inversion coefficient is a time-varying coefficient, the output of the model is λ1(t) and λ2(t), and the loss function Loss of the PINN model is defined as:

[0089] Loss = βLoss f ;

[0090]

[0091] Among them, Loss f is the physical equation constraint, and β is the weight coefficient.

[0092] The present invention inverts the magnetohydrodynamic coefficients based on the PINN model. By embedding physical equations into neural networks, effective parameter inversion can be performed even when data is sparse. The constraints provided by the physical equations reduce the model's dependence on data quantity and quality. At the same time, compared with existing methods, this method also has strong physical constraints, ensuring that the model results not only conform to the data, but also conform to the laws of physics, and have higher physical consistency.

[0093] Step S5: Compare the predicted coefficients output by the PINN model with the true coefficients and calculate the inversion error.

[0094] Example 2

[0095] In magnetohydrodynamics, parameter identification (i.e., determining the key physical parameters in the system) is a key step in accurate modeling and simulation. However, due to the complexity and nonlinear characteristics of magnetohydrodynamic systems, accurately describing and simulating these systems is still a huge challenge. In order to verify the technical effects used in this method, this embodiment performs parameter inversion on a normalized magnetohydrodynamic model and analyzes the experimental results to verify the real effect of this method.

[0096] Figure 2 and Figure 3 This is a comparison diagram of the fitting curves of the constant coefficients λ1 and λ2 obtained by inversion under the two data acquisition methods in Example 1; the experimental steps to obtain this result are:

[0097] Obtain several sparse data matrices, the sparse data matrices are the corresponding functions ψ1, φ1, In the data matrix in both time and space dimensions, 11 points are uniformly selected in x∈[-1,1]. When x∈[-0.1,0.1] is near the boundary layer, the same sparse data is uniformly selected from x∈[-0.1,0.1].

[0098] The acquired data and the magnetic fluid equation are processed in the preprocessing manner in Example 1 to obtain the data set required for model input, wherein the parameters to be inverted and the magnetic fluid equation are:

[0099]

[0100] Among them, λ1 and λ2 are the parameters to be inverted, and their true values ​​are both 1;

[0101] Construct a PINN model. The input of the PINN model is the training data set, and the normalized magnetohydrodynamic equation is used as the physical constraint. The output of the PINN model is the coefficient prediction value. At this time, the coefficient type of the inversion coefficient is a constant coefficient, so the coefficient is set as a trainable variable, and λ1=0, λ2=2 are set. The coefficient prediction value of the output of the PINN model is defined as λ'1, λ'2, and the loss function of PINN is defined as:

[0102] Loss = αLoss f ;

[0103]

[0104] Among them, Loss f is the physical equation constraint, α is the weight coefficient, and α is set to 1; the above loss is iteratively optimized using the Adam optimizer to train the PINN model with 30,000 iterations;

[0105] like Figure 2 and Figure 3 As shown, the two methods of acquiring data proposed in Example 1: uniform acquisition in the entire spatial domain and uniform acquisition near the boundary layer, the parameters in the inversion of the magnetofluid equation using the method based on the PINN model can be well fitted to the true values; in addition, when acquiring data uniformly near the boundary layer, the fitting speed of the two unknown constants λ1 and λ2 is faster than that of acquiring data uniformly in the entire spatial domain. This is because for the boundary layer problem, the inside of the boundary layer is the core area, the evolution of the magnetofluid system is very dramatic, and it has strong spatial characteristics. Therefore, when there is more data in the core area, the fitting speed will be faster.

[0106] Example 3

[0107] like Figure 4 and Figure 5 As shown in Figure 1, the relative error change of the fitting curve of the coefficients λ1(t) and λ2(t) over time under two training data conditions is shown in Figure 1. The experimental steps to obtain this result are:

[0108] Obtain several sparse data matrices, the sparse data matrices are the corresponding functions ψ1, φ1, In the data matrix in both time and space dimensions, 11 points are uniformly selected in x∈[-1,1]. When x∈[-0.1,0.1] is near the boundary layer, the same sparse data is uniformly selected from x∈[-0.1,0.1].

[0109] The acquired data and the magnetic fluid equation are processed in the preprocessing manner in Example 1 to obtain the data set required for model input, wherein the parameters to be inverted and the magnetic fluid equation are:

[0110]

[0111] Among them, λ1 and λ2 are the parameters to be inverted, and their true values ​​are both 1;

[0112] Construct a PINN model. The input of the PINN model is the training data set, and the normalized magnetohydrodynamic equation is used as the physical constraint. The output of the PINN model is the coefficient prediction value. At this time, the coefficient type of the inversion coefficient is a time-varying coefficient. Set the pre-neural network: the input of the pre-neural network is time, and the output of the pre-neural network is the predicted time-varying coefficient. Define the coefficient prediction value of the output of the PINN model as λ1(t) and λ2(t), and define the loss function of the PINN model as:

[0113] Loss = βLoss f ;

[0114]

[0115] Among them, Loss f is the physical equation constraint, β is the weight coefficient, and β is set to 100; the above loss is iteratively optimized using the Adam optimizer to train the PINN model with an iteration number of 200,000;

[0116] like Figure 4 and Figure 5 As shown in , the two data acquisition methods proposed in Example 1: uniform acquisition in the entire spatial domain and uniform acquisition near the boundary layer, the error of the coefficients that change with time in the inversion of the magnetic fluid equation using the method based on the PINN model is within 1%. Among them, when acquiring data uniformly near the boundary layer, the fitting speed of λ1(t) and λ2(t) is faster than that of acquiring data uniformly in the entire spatial domain, and the relative error is smaller than that of acquiring data uniformly in the entire spatial domain, that is, faster and more accurate.

[0117] In summary, it can be seen that the present invention can accurately invert unknown coefficients in the case of sparse data in combination with physical constraints. In addition, the present invention also proposes two ways of acquiring data: uniform acquisition in the entire spatial domain and uniform acquisition near the boundary layer, which improves the speed and accuracy of the inversion results to a certain extent.

[0118] Part of the data in the above formula is calculated by removing the dimension and taking its numerical value. The formula is a formula closest to the actual situation obtained by software simulation of a large amount of collected data; the preset parameters and preset thresholds in the formula are set by technical personnel in this field according to actual conditions or obtained through simulation of a large amount of data.

[0119] The above embodiments are only used to illustrate the technical method 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 the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.

Claims

1. A PINN-based magnetohydrodynamic coefficient inversion method, characterized in that: include: Step S1: obtaining a number of data matrices according to the magnetic fluid equation; Step S2: Preprocessing the magnetic fluid equation and several data matrices respectively to obtain a normalized magnetic fluid equation and a training data set; Step S3: constructing a PINN model based on the coefficient type of the inversion coefficient; wherein the coefficient type includes a constant coefficient and a time-varying coefficient; Step S4: training the PINN model based on the normalized magnetic fluid equation and the training data set; Step S5: Compare the predicted coefficients output by the PINN model with the true coefficients and calculate the inversion error.

2. A PINN-based magnetic fluid coefficient inversion method according to claim 1, characterized in that: The method obtains several data matrices according to the magnetic fluid equation, including: The magnetic fluid equation is as follows: in, k is a constant, i is an imaginary unit, the unknown coefficient λ1 is the ratio of the real resistance to the theoretical resistance, the unknown coefficient λ2 is the ratio of the real magnetic field to the theoretical magnetic field, x is space, t is time, δψ0 is the equilibrium magnetic flux, ψ1 is the perturbation magnetic flux, φ1 is the perturbation stream function, is the normalized space, B0 is the equilibrium magnetic field, η is the resistance, J z1 is the disturbance current, μ0 is the vacuum permeability; Based on the magnetohydrodynamic equation, several data matrices M with shapes of m×n are obtained from the spatial domain and the time domain. j , where j = 1, 2, 3, 4, 5; m is the number of spatial series samples, n is the number of time series samples; M1, M2, M3, M4, M5 are the corresponding functions ψ1, φ1, A data matrix in both time and space dimensions; A simulation experiment is conducted on the magnetic fluid system. Several data sequences are obtained from the spatial and temporal domains of the magnetic fluid system and the data sequences are filled into the corresponding data matrix M. j middle.

3. A PINN-based magnetic fluid coefficient inversion method according to claim 2, characterized in that: The method of obtaining a plurality of data sequences from the space domain and the time domain of the magnetic fluid system includes: There are two ways to obtain data sequences from the spatial domain of a magnetic fluid system: the first is to obtain data sequences uniformly in the entire spatial domain, and the second is to obtain data sequences uniformly near the boundary layer; the boundary layer refers to the vicinity of the spatial point with the most drastic changes in the entire spatial domain of the magnetic fluid system and its nearby domain; The data sequence is acquired from the time domain of the magnetic fluid system at set time intervals.

4. The PINN-based magnetic fluid coefficient inversion method according to claim 2, characterized in that: The preprocessing of the magnetic fluid equation and the plurality of data matrices respectively includes: The magnetic fluid equation is preprocessed, that is, normalized, to obtain the normalized magnetic fluid equation: in, Among them, τ A , τ R , a, B p , c are all constants; Several data matrices are preprocessed and integrated into training datasets.

5. The PINN-based magnetic fluid coefficient inversion method according to claim 4, characterized in that: The PINN model is constructed based on the coefficient type of the inversion coefficient, including: Get the coefficient type of the inversion coefficient; If the coefficient type is a constant coefficient: set the unknown coefficients λ1 and λ2 as trainable variables and set an initial value for them; iteratively optimize the loss function through the optimizer until the maximum number of iterations is reached to obtain the predicted values ​​λ'1 and λ'2 of the unknown coefficients λ1 and λ2; If the coefficient type is a time-varying coefficient: set up two feedforward neural networks to invert the unknown coefficients λ1 and λ2; the input of the feedforward neural network is time, and the output is the predicted coefficients λ1(t) and λ2(t); the optimizer iteratively optimizes the loss function to obtain the predicted values ​​λ1(t) and λ2(t) of the unknown coefficients λ1 and λ2; Among them, the loss function is the equation loss of the PINN model.

6. The PINN-based magnetic fluid coefficient inversion method according to claim 5, characterized in that: The method of training the PINN model based on the normalized magnetic fluid equation and the training data set includes: The training data set is used as the input of the PINN model, and the normalized magnetohydrodynamic equation is embedded in the PINN model; the loss function is calculated based on the coefficient type of the inversion parameter and the normalized magnetohydrodynamic equation, and the PINN model is trained by minimizing the equation loss.

7. The PINN-based magnetic fluid coefficient inversion method according to claim 6, characterized in that: The coefficient type based on the inversion parameter and the normalized magnetic fluid equation calculation loss function include: If the coefficient type of the inversion coefficient is a constant coefficient, the output of the PINN model is the predicted value λ'1, λ'2 of the constant coefficient, and the loss function Loss of the PINN model is defined as: Loss=αLoss f ; Among them, Loss f is the physical equation constraint, α is the weight coefficient; If the coefficient type of the inversion coefficient is a time-varying coefficient, the output of the model is λ1(t) and λ2(t), and the loss function Loss of the PINN model is defined as: Loss=βaLoss f ; Among them, Loss f is the physical equation constraint, and β is the weight coefficient.

Citation Information

Cited By

  • PINN-based substance transport prediction and model parameter inversion method

    CN120220842A

  • Engineering skin-based engineering structure performance state inversion method, safety early warning method and system

    CN120470912A