Physical field domain modeling method based on improved firework algorithm
By combining the improved fireworks algorithm with a physical information neural network, a candidate library is dynamically constructed and coefficients are refined, solving the local optima and prior dependence problems in physical field modeling in existing technologies, and achieving efficient and accurate modeling in unknown systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING UNIV OF POSTS & TELECOMM
- Filing Date
- 2026-03-13
- Publication Date
- 2026-06-19
AI Technical Summary
Existing physical field modeling methods suffer from problems such as strong dependence on a complete candidate library, low search efficiency, easy getting trapped in local optima, and limited applicability. In particular, they are difficult to achieve high-precision modeling in environments lacking prior information and with noise.
An improved fireworks algorithm is used to adaptively construct and evolve the candidate library. The coefficients are refined by combining a physical information neural network. By simulating the fireworks explosion and mutation process, the candidate function library is dynamically generated and screened. The derivative is calculated using automatic differentiation technology, and a fitness function and stability evaluation mechanism are designed to avoid local optima and noise interference.
It significantly improves the modeling accuracy and robustness in unknown and complex systems, reduces the reliance on complete prior knowledge, and achieves efficient and accurate partial differential equation discovery, making it suitable for noisy environments and data-scarce scenarios.
Smart Images

Figure CN122242218A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a physical field modeling method based on an improved fireworks algorithm. Background Technology
[0002] Partial differential equations (PDEs) are a core mathematical tool for describing nonlinear dynamic phenomena in physical, engineering, and biological systems. Traditional PDE construction typically relies on first principles, such as the law of conservation of mass, or phenomenological modeling based on empirical knowledge. With the rapid development of data acquisition technologies and computing power, a data-driven paradigm for discovering governing equations directly from observational data has gradually emerged, becoming an important supplement to traditional theoretical derivations. In the field of data-driven PDE discovery, early research mainly relied on sparse regression techniques. This type of method pre-constructs a complete library containing a large number of candidate function terms (such as spatial derivatives and nonlinear combinations of response functions), and then uses sparsity-enhancing algorithms to select a few key terms from this library to form the governing equations. This method has certain advantages in terms of computational efficiency and model simplicity. However, its performance is highly dependent on the completeness of the candidate library, and when processing noisy data, the process of approximating derivatives using the finite difference method introduces significant errors, leading to a severe decrease in recognition accuracy. To mitigate noise interference, subsequent research introduced techniques such as weak form and integral regression, but essentially, they still have not escaped the structural dependence on the pre-set complete library.
[0003] Physical information neural networks (PINs) significantly enhance their tolerance to noisy data by embedding physical laws as loss functions into the neural network training process and using automatic differentiation techniques to accurately calculate derivatives of each order. Based on this, researchers have further proposed improvement strategies such as alternating direction optimization and rational neural networks to enhance optimization efficiency and the ability to approximate the response functions of complex systems. However, the application of PINs also faces serious challenges: their training still requires a predefined, overly comprehensive candidate library, and the structure and composition of this candidate library must be explicitly set before model startup. For complex systems with completely unknown mechanisms, this prerequisite is often difficult to meet, severely limiting the applicability of this type of method.
[0004] In existing technologies, such as the physical field modeling method, device, electronic device, and storage medium disclosed in CN120449725A, the method obtains the type of the field to be modeled and the modeling parameters, determines the corresponding partial differential equation, generates an initial hyperparameter set based on a preset optimization objective and a historical hyperparameter set, calculates the equation solution, and constructs a field model, thereby achieving efficient automatic solution of partial differential equations. This method is applicable to engineering scenarios such as complex electromagnetic fields, flow fields, and thermodynamic fields. However, when performing physical field modeling, it is limited by fixed preset partial differential equations, thus limiting its application scenarios. CN116910428B discloses a soft measurement method for automatically determining the structure of spatiotemporal dynamic systems. This method achieves soft measurement of spatiotemporally dependent dynamic systems containing unknown PDE (Partial Differential Equation) structures by approximately satisfying the solutions and source terms of the partial differential equations used to describe actual spatiotemporally dependent dynamic industrial processes.
[0005] Furthermore, to address the reliance on a complete candidate library, some researchers have attempted breakthroughs from the perspective of optimization algorithms, searching for potential partial differential equation forms by simulating natural selection or evolutionary processes. These evolutionary algorithms do not require a pre-existing complete candidate library; they explore equation structures in a vast solution space through random operations such as crossover and mutation. However, this type of method also has inherent drawbacks. First, completely random crossover and mutation operations lead to an exponential expansion of the search space, requiring iterative evaluation of massive numbers of candidate solutions, resulting in enormous computational overhead. Second, in complex search spaces, evolutionary algorithms are prone to getting trapped in local optima, making it difficult to guarantee the discovery of all properties of the equation. Existing evolutionary methods typically require pre-setting the highest order of the derivative, and the derivative value must be pre-calculated, which has significant limitations when dealing with real, unknown, and complex systems. More importantly, existing research based on evolutionary algorithms mainly focuses on equation selection, lacking in-depth exploration of the construction mechanism of the candidate library itself; the evolution of the library still exhibits strong randomness and blindness.
[0006] In summary, existing physical field modeling methods suffer from problems such as limited variety, strong reliance on prior knowledge, sensitivity to hyperparameters, low search efficiency, and susceptibility to getting trapped in local optima.
[0007] Therefore, there is an urgent need for a physical field modeling method that can adaptively construct and evolve the candidate library with very little prior information, while taking into account the simplicity and accuracy of the discovery equation. Summary of the Invention
[0008] In view of this, this application discloses a physical field modeling method based on an improved fireworks algorithm to solve the problems in the prior art, including:
[0009] S1. Obtain observation data of the system under test;
[0010] S2. Construct a candidate library by encoding the mathematical terms in the partial differential equations;
[0011] S3. Based on the fireworks algorithm, the candidate library is iteratively generated and screened to obtain the optimal equation structure;
[0012] The fireworks algorithm treats the candidate library as fireworks, with each fireworks corresponding to a candidate library. For each fireworks, the explosion radius and the number of sparks that can be generated are calculated based on the fitness value. The explosion radius represents the allowed range of factor expansion, and the sparks represent the elements in the fireworks. The fitness value is initialized before the first iteration and updated during each iteration, and is used to measure the value of the candidate library in performing a fine search locally.
[0013] S4. Refine the coefficients of the optimal equation structure to obtain a highly accurate partial differential equation; the highly accurate partial differential equation has the following form: ;in, Represents the time derivative term. Represents the spatial derivative term. This represents the coefficients after optimization based on physical constraints;
[0014] S5. Construct the physical field based on highly accurate partial differential equations with coefficients.
[0015] The beneficial effects of this application include:
[0016] This application simulates the process of fireworks explosion and mutation, and through the local search mechanism at the path level of the fireworks algorithm, independently evaluates and optimizes each candidate path, dynamically generates and filters a candidate function library of various combinations that constitute potential terms of partial differential equations, which can significantly enhance the accuracy of local search and the global convergence ability.
[0017] To avoid local optima in the fireworks algorithm, an improved fitness function was designed to evaluate the merits of each candidate library. By introducing the most complex term and the stepwise relaxation penalty factor into the fitness function, the candidate library is ensured to evolve from simple to complex, avoiding premature local optima. The prediction accuracy, sparsity, structural simplicity, and physical consistency of the equation are comprehensively considered.
[0018] This application also designs a moving time-domain variation coefficient evaluation strategy, which dynamically evaluates the stability of each coefficient in the candidate library, eliminates redundant terms and noise interference, and ensures that the selected optimal candidate library has high reliability and stability.
[0019] This application also combines physical information neural networks to refine the coefficients of the candidate library, further improving the accuracy of coefficient identification and ensuring the high fidelity of the discovered equations in limited data and noisy environments; it utilizes automatic differentiation technology to achieve stable calculation of higher-order derivatives without the need to pre-set the derivative order, enhancing the method's adaptability to unknown and complex systems, and providing an efficient, accurate, and interpretable automatic partial differential equation discovery solution for scientific computing and physical field modeling.
[0020] This application achieves adaptive construction and evolution of the candidate function library through an improved fireworks algorithm and an embedded neural network collaborative mechanism. This can significantly reduce the dependence on complete prior knowledge and manual parameter tuning, thereby improving the applicability and robustness of partial differential equation discovery in unknown systems. It can also provide a new design idea for those skilled in the art. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating the physical field modeling method based on the improved fireworks algorithm in the embodiments of this application;
[0022] Figure 2 This is a schematic diagram of the physical field modeling based on the improved fireworks algorithm in the embodiments of this application;
[0023] Figure 3 This is a schematic diagram of explosion and Gaussian mutation in an embodiment of this application;
[0024] Figure 4 This is a schematic diagram illustrating the generation and filtering of the candidate library within a single loop in an embodiment of this application. Detailed Implementation
[0025] To make the objectives, technical solutions, features, and advantages of this application clearer and to enable those skilled in the art to better understand the technical solutions of this application, the following detailed description of this application is provided in conjunction with the accompanying drawings and embodiments.
[0026] This embodiment includes a physical field modeling method based on an improved fireworks algorithm, such as... Figure 1 As shown, it includes:
[0027] S1. Obtain the observation data of the system under test and construct an embedded neural network.
[0028] Specifically, this involves acquiring spatiotemporal observation data of the physical system. This data can be experimental measurements or discrete points generated by numerical simulations, typically represented as a series of spatiotemporal coordinates and their corresponding system response values, denoted as... ,in From 1 to , This represents the total number of observed samples. and Representing spatial coordinates and time coordinates respectively. The value is the observation value in this coordinate system.
[0029] In order to continuously estimate the system response function and its derivatives from these discrete data, this application constructs a fully connected feedforward neural network to approximate the true system response function. The fully connected feedforward neural network is denoted as... ,in, This represents the weights and bias parameters in the network. The input is the spatiotemporal coordinates. The output is a prediction of the response value at that point. The network structure contains multiple hidden layers, each containing several neurons. The activation function can be chosen from options such as the sine function or the hyperbolic tangent function to provide sufficient nonlinear expressive power.
[0030] Furthermore, a fully connected feedforward neural network is constructed; this network is pre-trained before use, with the training objective being to minimize the error between the predicted and observed values. To improve the robustness of the neural network model to potential noise and large errors, a log-mean squared error loss function is employed. The formula is:
[0031]
[0032] in, Represents the total number of samples. Represents the actual value. This indicates that the fully connected feedforward neural network represents the first... The predicted value for each sample, This represents a very small positive number (e.g., 1e-8), used to ensure that the value inside the logarithmic function is always positive, avoiding numerical computation problems. Using the logarithmic form can compress the dynamic range of the error, making the training process more stable, especially in the presence of outliers.
[0033] During training, the observed data is divided into training and validation sets. An early stopping strategy is adopted, which means that training is terminated when the error on the validation set no longer decreases, in order to prevent overfitting.
[0034] After training, the fully connected feedforward neural network can predict any spatiotemporal point with high accuracy. function value More importantly, neural network-based automatic differentiation techniques can calculate efficiently and accurately. Partial derivatives of any order with respect to time and spatial coordinates, such as the first-order time derivative. First spatial derivative Second-order spatial derivative These predicted values and derivative values will serve as the basis for building the candidate library for the subsequent fireworks algorithm module, avoiding the numerical errors introduced when using finite difference approximations of derivatives in traditional methods.
[0035] S2. Construct a candidate library by encoding the mathematical terms in the partial differential equations.
[0036] To facilitate efficient storage and computation by computers, the time derivative term is... (For example or The left-hand side is considered as a term on the left-hand side of the differential equation, and the spatial derivative term is considered as a term on the right-hand side. The left-hand and right-hand sides are encoded respectively, mapping the mathematical terms in the partial differential equation to a sequence of numbers. The specific encoding rules are as follows:
[0037] Represent response functions of different orders numerically. For example, the response function can be represented by the number 0. The number 1 itself represents the first spatial derivative. The number 2 represents the second spatial derivative. The number 3 represents the third spatial derivative. And so on;
[0038] A term involving multiple factor products is represented by a sequence of different combinations of numbers; for example, a term... Encoded as a sequence [0, 1], item Encoded as [2, 2], item It is encoded as [1, 2].
[0039] Ultimately, a set consisting of numerical sequences is obtained. The candidate library for encoding, or fireworks; the time derivative term and the spatial derivative term are distinguished by the left-hand or right-hand term labels.
[0040] Furthermore, the candidate library is initialized; in this embodiment, a simple candidate library containing the most basic items is constructed, such as {[0], [1], [2], [3]}, corresponding to respectively , , , This initial library is usually incomplete; it may be missing some terms from the actual equations or may contain redundant terms.
[0041] S3. Based on the improved fireworks algorithm, the candidate library is iteratively generated and filtered to obtain the optimal equation structure. This includes:
[0042] S31. Generate fireworks, and determine the explosion radius and number of sparks based on the fitness value.
[0043] Consider the m candidate libraries in this iteration as fireworks, and each fireworks... A corresponding candidate library is established; for each firework, its fitness value is used to determine the appropriate firework type. The explosion radius and the number of sparks that can be generated are calculated. The explosion radius represents the allowed range of factor expansion, and the sparks represent elements in the fireworks. The fitness value is initialized before the first iteration and updated during each iteration. It is used to measure the value of the candidate library in performing a fine-grained search locally. The smaller the fitness value, the better the candidate library is, and the higher the value of performing a fine-grained search locally. Therefore, a smaller explosion radius and a larger number of sparks are set. Fireworks with large fitness values correspond to poorer candidate libraries and are assigned larger explosion radii and fewer sparks to conduct a wider exploration and increase the possibility of discovering new structures.
[0044] Taking the spatial derivative term as an example, in this embodiment, the explosion radius... With the number of sparks The calculation formula is as follows:
[0045]
[0046]
[0047] in, It is a preset hyperparameter that represents the maximum allowable blast radius; This indicates the preset total spark count control parameter. and Let represent the minimum and maximum fitness values among all fireworks in the current iterations, respectively. It is a very small positive number, used to avoid the denominator being zero. This represents the floor function. To control computational overhead, it is also necessary to... and Implement boundary limits, setting minimum and maximum values to prevent individual fireworks from producing too many or too few sparks.
[0048] S32. Fireworks are used to evolve and update a candidate library based on their explosion radius and the number of sparks. The candidate library evolution includes explosions and mutations, illustrated in the diagram below. Figure 3 As shown.
[0049] The explosion expands the equation structure by increasing the number of factors in the partial differential equation terms in the candidate library. Specifically, the fireworks expand by factoring each term in the candidate library, generating new sparks. For example, for a given term [0] (representing...) ), within the blast radius Within the range, [0,0] can be generated (i.e., ) and [0,0,0] (i.e. More complex terms, such as [0,1], are also included. If a term contains multiple factors, for example, [0,1] (representing...). If the explosion operation expands each factor separately while keeping other factors unchanged, it will generate a variety of combinations such as [0,0,1], [0,0,0,1], [0,1,1].
[0050] The mutation, achieved by adjusting the order of partial differential equation terms and randomly adding or deleting terms from the candidate pool, increases the diversity of the population and prevents the algorithm from prematurely falling into local optima. This includes order mutation, term addition, and term deletion; specifically:
[0051] The order variation refers to adding or subtracting 1 from a factor in a term with a certain probability, and the change follows a Gaussian distribution with a mean of 0 and a variance of 1. In practice, the change is usually rounded down. For example, representing... [2] may mutate into [1] ( ) or [3] ( The time derivative term can also undergo order variation, for example... Encoding [1] may mutate to [2] representing .
[0052] The item addition involves randomly selecting an item from a preset base function library and adding it to the current candidate library. The base function library may contain items such as... , , , This includes common items, but is not limited to these; it can also include more complex items. This operation is equivalent to introducing entirely new potential items into the library.
[0053] The term deletion involves randomly removing one term from the current candidate pool. This operation helps to eliminate redundant or erroneous terms and simplify the equation structure.
[0054] Furthermore, to improve search efficiency and avoid meaningless computations in overly complex regions, this application also designs an explosion constraint strategy: in each iteration, the maximum value of the spark complexity of the current iteration is recorded. If there is a firework in the previous round, the complexity is... Exceeded the maximum value of the previous generation If the condition is not met, the firework will not detonate. As a preferred embodiment, the complexity of the firework is determined by considering both the number of items in the candidate library and the complexity of the items themselves. The formula for the complexity index in this embodiment is:
[0055]
[0056] in, This indicates the number of items in the candidate pool. It is the number of factors of the most complex item in the library, that is, the number of factors of the item that contains the most factors.
[0057] The explosion constraint strategy can effectively control the disorderly expansion of the search space, ensuring that the evolution of the candidate library proceeds in an orderly manner along the path of "from simple to complex", which greatly saves computation time.
[0058] S33, Update fitness value.
[0059] After each explosion and mutation generates a new spark, which constitutes a new candidate library, a fitness value needs to be calculated to quantify its quality.
[0060] This application designs an improved fitness function, aiming to guide the search process from simple structures to complex structures in an ordered manner, while balancing the accuracy and simplicity of the equations. The improved fitness function is defined as follows:
[0061]
[0062] Where MSE represents the mean squared error. This represents a preset simplicity penalty factor, used to control the degree of emphasis placed on the simplicity of the equation. The L0 norm is used to measure how well the candidate library fits the data. This represents the preset complexity constraint penalty factor, used to control the strength of the constraint on the complexity of a term. This represents the preset threshold for the number of factors in the complex term. This represents the number of factors of the most complex term in the current candidate pool.
[0063] The MSE is calculated by: calculating the predicted left-hand term value at all sample points embedded in the neural network. (For example ) and the values of all candidate library items on the right. The coefficient vector corresponding to the current candidate pool is obtained by using LASSO regression (a sparse regression method). This makes the linear combination of the terms on the right-hand side... As close as possible to the left-hand item The mean square error is... .
[0064] The L0 norm refers to the coefficient vector. The number of non-zero elements reflects the number of terms in the final equation. An L0 norm penalty term is introduced. This is to follow Occam's razor principle, which is to favor equations with fewer terms and simpler structures.
[0065] The number of factors for the most complex term represents the number of factors in the current candidate library that contains the most factors. For example, in the library {[0], [1], [0,1,2]}, the most complex term is [0,1,2], and its number of factors is 3. When a term with a complexity exceeding the preset threshold MaxF appears in the library, the fitness function will add an additional penalty term. .
[0066] Furthermore, as a preferred embodiment, MaxF, , The value is adjusted with each iteration; in the early stages of iteration, a smaller MaxF and an appropriate [value] are set. The value can effectively suppress the occurrence of overly complex terms, allowing the algorithm to prioritize exploring candidate libraries with simple structures. As iterations proceed, the value is gradually relaxed (i.e., reduced). and The value of reduces the penalty for simplicity and complexity, thus allowing the exploration of candidate libraries that, while structurally more complex, can more accurately fit the data. This gradual relaxation strategy enables incremental learning "from simple to complex," preventing the algorithm from prematurely getting stuck in simple but imprecise local optima.
[0067] S34. Select the best candidates from the candidate pool and perform a stability evaluation based on the moving time domain to complete the current iteration.
[0068] Since a large number of sparks are generated in the candidate pool through explosion and mutation operations in each iteration, it is necessary to select some individuals as the next generation of sparks to continue the evolution. Figure 4 The screening process in this embodiment is illustrated. The screening combines an elitist strategy with random selection and introduces a stability assessment based on the mobile temporal domain. Specifically, it includes:
[0069] Step 1: Sort all sparks, including the current firework, according to their fitness values.
[0070] Step 2: Retain the top few sparks with the best fitness in the next iteration to ensure that excellent structures are not lost.
[0071] However, relying solely on fitness values for selection may still lead to local optima, because some candidate libraries, while having small fitting errors, may contain many unstable and redundant terms. These terms exist due to random fitting caused by noise and lack physical meaning. To eliminate such unreliable solutions, this application proposes a stability evaluation method based on the moving time domain for the elite selection strategy, including:
[0072] Step 3: Transfer the time domain Divide into several overlapping time slices, for example, slices .
[0073] Step 4: For each candidate library to be evaluated, keeping the spatial domain unchanged, recalculate the predicted values and derivative values of all sample points for each time slice, and perform LASSO regression on the coefficient vector of the time slice. Solving this problem involves recalculating the predicted values and derivatives for all sample points using an embedded neural network. This yields the corresponding coefficient value for each item k in the candidate pool. Each corresponds to a different time slice.
[0074] Step 5: Calculate the coefficient of variation of each term across all slices. The average of the coefficients of variation of all items is taken as the overall coefficient of variation of the candidate library. The coefficient of variation is used to measure the stability of a term over different time periods. The smaller the coefficient of variation, the more stable the coefficient of the term is over different time periods, and the more reliable its physical meaning. In this embodiment, the formula for the coefficient of variation is: ,in Indicates the first The standard deviation of each coefficient This represents the corresponding mean.
[0075] Step 6: Save the spark with the highest fitness value and record the overall coefficient of variation. With fitness This completes the current iteration.
[0076] Furthermore, after N rounds of iteration, the selection is made such that... The smallest candidate library is used as the globally optimal equation structure. The globally optimal candidate library is determined and updated based on the criterion of minimizing the combination of the coefficient of variation and fitness value. This criterion balances fitting accuracy and structural stability, and can screen out equation forms that are both accurate and reliable. In some embodiments, the optimal candidate library can also be adjusted based on actual circumstances. and The weights are adjusted.
[0077] In this embodiment, the iteration number N is set to 100, but in some embodiments it can also be set to other fixed values.
[0078] As the core design of this application, the improved fireworks algorithm aims to simulate the dynamic process of fireworks explosion, taking the initial candidate library as the starting point, and gradually building and screening the candidate library through explosion and mutation operations until the evolution can accurately describe the complex equation structure of the observed data, that is, the optimal equation structure.
[0079] S4. Based on the physical information neural network, the coefficients of the optimal equation structure are refined to obtain a partial differential equation with highly accurate coefficients.
[0080] When the structure of the optimal candidate library is determined by the fireworks algorithm module Next, the coefficients need to be solved with high precision. Although preliminary coefficient estimates were obtained through LASSO in step S33, these coefficients were obtained through sparse regression under a fixed candidate library structure, resulting in limited accuracy and failing to fully utilize the fitting ability of neural networks for functions. Therefore, this application employs a physical information neural network to further refine the coefficients of the equation.
[0081] Specifically, the network structure of PINN (Physical Information Neural Network) is exactly the same as the fully connected feedforward neural network trained in S1, and it is also used to predict arbitrary spatiotemporal points based on sample points. function value and calculation The partial derivatives with respect to time and space coordinates of any order exist, but the loss function differs. PINN's loss function consists of a data fitting term and a physical constraint term; the data fitting term limits the error between the observed and predicted values; the physical constraint term limits the predicted values to satisfy the conditions specified by... The defined partial differential equation is the one that satisfies the highly accurate coefficients obtained from S4. The loss function equation used in this embodiment is as follows:
[0082]
[0083] in, Indicates the number of observation points. Represents the observed value. This represents the predicted value of PINN; This indicates the number of coordinate points. The coordinate points can be the observation points themselves or additionally selected spatiotemporal points (e.g., obtained through Latin hypercube sampling). This represents the left-hand derivative value of the PINN prediction; This represents the predicted value of each item in the optimal candidate pool at the matching point; This represents the coefficient vector to be optimized, which is used as the training parameters of the network. This represents the balance coefficient, used to adjust the weight between data fitting and physical constraints.
[0084] By minimizing the loss function While fitting observed data, the neural network is also forced to ensure its output strictly adheres to the physical laws defined by the candidate database. During training, the coefficients... It will be continuously updated and eventually converge to a value with extremely high precision. To accelerate convergence, the parameters of the embedded neural network trained in step S1 can be used as the initial values of PINN for transfer learning, thereby greatly shortening the training time.
[0085] Finally, a highly accurate partial differential equation with coefficients is obtained, in the form of: ,in, Represents the time derivative term. The term represents the spatial derivative, specifically the optimal combination of terms obtained based on the improved fireworks algorithm. This represents the coefficients after optimization based on physical constraints.
[0086] S5. Construct the physical field based on highly accurate partial differential equations with coefficients.
[0087] Based on the highly accurate partial differential equations with these coefficients, it is possible to predict the parameters of the system under test or to help understand complex physical fields.
[0088] The overall concept of the physical field modeling method based on the fireworks algorithm designed in this application is as follows: Figure 2 As shown, by using digital encoding, explosive mutation, complexity-guided fitness function, and moving-time stability screening, the optimal candidate library is dynamically constructed, which greatly reduces the dependence on a complete prior library compared to traditional methods in the prior art. The coefficients are refined by a physical information neural network, which significantly improves the accuracy of equation discovery. The robustness and convergence efficiency of the method are enhanced by the explosive constraint strategy and stability evaluation mechanism.
[0089] This application can automatically and accurately discover the governing equations of complex physical systems under conditions of noisy environments, scarce data, and lack of prior knowledge, providing an efficient and reliable technical solution for physical field modeling. Overall, it features high precision, strong robustness, fast convergence, and applicability to noisy environments and scenarios with scarce data.
[0090] Finally, it should be noted that the above description only depicts some embodiments of this application. For those skilled in the art, various changes, modifications, substitutions, and variations can be conceived of these embodiments without departing from the principles and spirit of this application. The scope of protection of this application is defined by the appended claims and their equivalents, and all the above-mentioned behaviors should be covered within the scope of protection of this application.
Claims
1. A physical field domain modeling method based on an improved fireworks algorithm, characterized in that, include: S1. Obtain observation data of the system under test; S2. Construct a candidate library by encoding the mathematical terms in the partial differential equations; S3. Based on the fireworks algorithm, the candidate library is iteratively generated and screened to obtain the optimal equation structure; The fireworks algorithm treats the candidate library as fireworks, with each fireworks corresponding to one candidate library; for each fireworks, the explosion radius and the number of sparks that can be generated are calculated based on the fitness value. The blast radius represents the permissible range of factor expansion, and the spark represents the element in the firework; The fitness value is initialized before the first iteration and updated during each iteration. It is used to measure the value of the candidate library in performing fine-grained searches locally. S4, coefficient refinement is performed on the optimal equation structure to obtain a highly accurate partial differential equation of coefficients; the highly accurate partial differential equation of coefficients is in the form of ; wherein, denotes a time derivative term, denotes a spatial derivative term, denotes a coefficient optimized through physical constraints. S5. Construct the physical field based on highly accurate partial differential equations with coefficients.
2. The physical field domain modeling method based on the improved fireworks algorithm according to claim 1, wherein, The process of constructing a candidate library involves using the time derivative term as the left-hand side term of the differential equation and the spatial derivative term as the right-hand side term. The left-hand and right-hand terms are encoded respectively, mapping the mathematical terms in the partial differential equation into a numerical sequence.
3. The physical field domain modeling method based on the improved fireworks algorithm according to claim 2, characterized in that, The encoding of the left-hand and right-hand terms respectively includes: representing response functions of different orders with numbers, forming a sequence with different combinations of numbers to represent terms involving multiple factor products, and obtaining a set composed of number sequences.
4. The method of claim 1, wherein, The candidate library is iteratively generated and filtered using an improved fireworks algorithm, including: S31. Generate fireworks, and determine the explosion radius and number of sparks based on the fitness value; S32. Fireworks evolve and update the candidate library based on the explosion radius and the number of sparks; the candidate library evolution includes explosion and mutation; The explosion expands the equation structure by increasing the number of factors in the partial differential equation terms in the candidate library. The fireworks expand the factors along each term in the candidate library to generate new sparks. The mutation, by adjusting the order of the partial differential equation terms and randomly adding or deleting terms from the candidate pool, increases the diversity of the population and prevents the algorithm from getting trapped in local optima too early. S33, Update fitness value; S34. Perform elite selection on the candidate pool to complete the current iteration.
5. The physical field modeling method based on the improved fireworks algorithm according to claim 4, characterized in that, The candidate pool evolves using an explosion limiting strategy: in each iteration, the maximum value of the spark complexity of the current iteration is recorded If in the current iteration, there is a spark whose complexity exceeds the maximum value of the previous generation , then the spark is not subjected to an explosion operation.
6. The physical field domain modeling method based on the improved fireworks algorithm according to claim 4, wherein, The updated fitness value uses a modified fitness function, the formula of which is: ; in, Let MSE represent the fitness function, and mean squared error. This represents the preset simplicity penalty factor. Describing the L0 norm, This represents the pre-defined complexity constraint penalty factor. This represents the number of factors of the most complex term in the current candidate pool. This represents the preset threshold for the number of complex terms.
7. The physical field modeling method based on the improved fireworks algorithm according to claim 4, characterized in that, The process of selecting the best candidates from the pool also includes a stability assessment based on the mobile time domain; including: Step 1: Sort all sparks, including the current firework, according to their fitness values; Step 2: Retain the top few sparks with the best fitness in the next iteration; Step 3: Divide the time domain into several overlapping time slices; Step 4: For each candidate library to be evaluated, keeping the spatial domain unchanged, recalculate the predicted values and derivative values of all sample points for each time slice, and perform LASSO regression on the coefficient vector of the time slice. Solve to obtain the corresponding coefficient values. Each corresponds to a different time slice; Step 5: Calculate the coefficient of variation for each item across all slices, and take the average of all item coefficients of variation as the overall coefficient of variation for the candidate library; the coefficient of variation is used to measure the stability of the item over different time periods. Step 6: Save the spark with the highest fitness value and record the overall coefficient of variation. With fitness This completes the current iteration.
8. The physical field modeling method based on the improved fireworks algorithm according to claim 7, characterized in that, After N rounds of iteration, choose the one that makes The smallest candidate library is used as the globally optimal equation structure.
9. The physical field modeling method based on the improved fireworks algorithm according to claim 1, characterized in that, The coefficient refinement of the optimal equation structure is implemented based on a physical information neural network; the physical information neural network is used to predict arbitrary spatiotemporal points based on sample points. function value and calculation Partial derivatives of any order with respect to time and space coordinates.
10. The physical field modeling method based on the improved fireworks algorithm according to claim 9, characterized in that, The physical information neural network is pre-trained before use; The loss function consists of a data fitting term and a physical constraint term; the data fitting term is used to limit the error between the observed value and the predicted value; the physical constraint term is used to limit the predicted value to satisfy a partial differential equation with highly accurate coefficients.
Citation Information
Patent Citations
A soft-sensing method for spatiotemporal dynamic systems to automatically determine the structure of partial differential equations
CN116910428B
Physical field domain modeling method and device, electronic equipment and storage medium
CN120449725A