Method for predicting internal magnetic field of aluminum electrolysis cell based on physical information network PINN
By adopting the PINN method based on the physical information network in the prediction of the internal magnetic field of the aluminum electrolytic cell, the problems of large computing resources and time consumption, poor real-time performance, and short equipment life in the prior art are solved, and efficient and accurate magnetic field prediction is achieved. Enhanced interpretability of the model.
Patent Information
- Application Number
- CN202411433945.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-02-11
AI Technical Summary
In the prediction of internal magnetic field of aluminum electrolytic cells, the existing technology has problems such as large computing resources and time consumption, poor real-time performance, short equipment life, high cost, difficulty in internal installation, small data volume, low quality and low model interpretability.
Using the PINN method based on the physical information network, a physical model of the magnetic field inside the aluminum electrolytic cell is constructed, a loss function is constructed and a PINN model is trained to achieve the prediction of the magnetic field inside the aluminum electrolytic cell. This method introduces a physical loss function, which increases the interpretability of the model and reduces dependence on the quantity and quality of data.
The speed and accuracy of the internal magnetic field prediction of aluminum electrolytic cells is improved, the consumption of computing resources is reduced, the interpretability of the model is enhanced, and network training and prediction is carried out without the need for a large amount of label data.
Smart Images

Figure CN119416456A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of aluminum electrolysis industry, and in particular to a method for predicting the internal magnetic field of an aluminum electrolysis cell based on a physical information network PINN. Background Art
[0002] The prediction of the magnetic field inside the aluminum electrolytic cell plays a vital role in the aluminum production process. With the rapid development of the aluminum electrolysis industry and the increasingly stringent requirements of the country for energy conservation and emission reduction, while expanding the scale of aluminum electrolysis production, the physical field has an increasingly greater impact on the electrolysis process. During the electrolysis process of the aluminum electrolytic cell, a large current will generate a strong magnetic field. The electromagnetic force generated by the uneven distribution of the magnetic field is a major factor in the movement of the electrolyte and the aluminum liquid. Therefore, the distribution of the magnetic field inside the aluminum electrolytic cell directly affects the current efficiency during the electrolysis process, the life of the electrolytic cell wall, etc. Magnetic field prediction can not only significantly improve production efficiency and optimize energy consumption control, but also significantly improve product quality. By accurately predicting and regulating the magnetic field distribution inside the electrolytic cell, the current density distribution and heat distribution can be optimized, thereby improving the uniformity and efficiency of the electrolytic reaction, reducing energy consumption, and increasing aluminum production. In addition, reasonable adjustment of the magnetic field helps to reduce the non-uniform heating of molten aluminum, improve the physical and chemical properties of aluminum, and thus improve the consistency and quality of the product.
[0003] When it comes to predicting the magnetic field inside an aluminum electrolysis cell, traditional methods can be roughly divided into three categories: finite element numerical simulation method, experimental measurement method, and deep learning method. All of them have significant limitations. The specific analysis is as follows:
[0004] (1) The finite element numerical simulation method uses numerical tools such as computational fluid dynamics (CFD) or finite element analysis to simulate the magnetic field distribution inside the aluminum electrolytic cell by numerically solving the magnetic field equation and fluid dynamics equation. It usually includes establishing a geometric model of the electrolytic cell, setting boundary conditions, calculating and solving the magnetic field equation and fluid dynamics equation, and obtaining a steady-state or transient magnetic field solution through an iterative method. However, this method requires a lot of computing resources and time, has high requirements on the accuracy of model parameters, is prone to deviations, has poor real-time performance, and cannot be predicted in actual production.
[0005] (2) The experimental measurement method is to directly install a magnetic induction meter or Hall sensor in the actual aluminum electrolytic cell to measure the magnetic field strength; use a magnetic current meter to measure the direction and size of the magnetic field and other sensors or detection equipment to measure the magnetic field distribution. This method is limited by the accuracy and reliability of the measuring equipment, especially in high temperature and corrosive environments. The life and accuracy of the equipment may be affected, the cost is high, and internal installation is difficult.
[0006] (3) The deep learning method is based on the collection of a large amount of magnetic field data from the actual operation of the aluminum electrolytic cell, including the current density distribution and electrolyte flow conditions under different operating conditions. Then, a deep learning network, such as a convolutional neural network (CNN), a recurrent neural network (RNN) or a combination of them (such as CNN-RNN) is used to process the information of the spatial and temporal series, and the magnetic field prediction is performed after the network training is completed. However, deep learning models usually require a large amount of labeled data for training in order to learn and generalize patterns. It is difficult to collect data inside the aluminum electrolytic cell, and there are generally small amounts of data and low data quality, which will affect the network training effect and prediction ability. In addition, deep learning models are usually presented in a black box form, and the predictive results are poorly interpretable, and it is impossible to understand the physical rationality and causal relationship of the results, which limits the application of this method in engineering practice. Summary of the invention
[0007] In view of this, the present invention provides a method for predicting the internal magnetic field of an aluminum electrolytic cell based on a physical information network PINN, so as to at least solve the problems in the prior art that the finite element numerical simulation method consumes a lot of computing resources and time and has poor real-time performance; the method based on experimental measurement has a short equipment life, high cost, and difficulty in internal installation; and the deep learning method has a small amount of real data and low quality, and the model training is difficult and the interpretability is low.
[0008] In order to achieve the above object, the present invention adopts the following technical solution:
[0009] A method for predicting the magnetic field inside an aluminum electrolysis cell based on a physical information network PINN comprises the following steps:
[0010] The data related to the magnetic field to be predicted are input into the trained PINN model, and the predicted data of the total magnetic induction intensity at any point inside the aluminum electrolysis cell are output; wherein the relevant data include: the time characteristics, spatial characteristics and anode current of the magnetic field inside the aluminum electrolysis cell; the specific contents of constructing the trained PINN model include:
[0011] S1. Construct a physical model of the magnetic field inside the target aluminum electrolysis cell;
[0012] S2. Construct a PINN model, construct a loss function based on the physical model of the internal magnetic field of the target aluminum electrolytic cell, obtain a simulation data set to iteratively train and back-propagate the PINN model, calculate the physical loss in the back-propagation process through the loss function, and if the preset conditions are met, the training is completed, and a PINN model for predicting the target internal magnetic field is obtained;
[0013] S3. Complete the verification of the PINN model and obtain the trained PINN model.
[0014] Preferably, the specific content of S1 includes:
[0015] The magnetic field inside the aluminum reduction cell is divided into four parts: busbar area Q1, anode, cathode carbon block and aluminum liquid electrolyte area Q2, magnetic material cathode steel rod area with active current Q3, aluminum reduction cell shell area Q4; the influence of the busbar on the magnetic field is ignored, and the busbar area Q1 is not considered;
[0016] Magnetic field of Q2 for:
[0017]
[0018] Where μ is the magnetic permeability, is the magnetic field strength generated by the Q2 region, is the Hamiltonian operator, is the current density in the Q2 region, calculated by the current anode current I, is the radial vector from the source point to the field point, and r is the distance from the field point to the source point;
[0019] Magnetic field of Q3 for:
[0020]
[0021] in is the magnetic field strength generated by the cathode steel rod current, is the magnetic field strength generated by the ferromagnetic cathode steel rod;
[0022] Define the simplified scalar magnetic potential as φ, and get from formula (2):
[0023]
[0024] In the formula, It indicates the magnetic field strength generated by the ferromagnetic cathode steel bar, and there is no active current;
[0025] but:
[0026]
[0027] In the formula, is the total magnetic field strength of Q3; is the current density in Q3 region;
[0028] Magnetic field of Q4 for:
[0029] because So we define a full scalar magnetic potential have to:
[0030]
[0031] The total magnetic induction intensity at any point inside the aluminum electrolysis cell is:
[0032]
[0033] Preferably, the specific content of S2 includes:
[0034] The PINN network model is constructed. The input of the PINN network model is the time characteristic t, spatial characteristic u(x, y, z) and anode current I of the magnetic field inside the aluminum electrolysis cell, where u(x, y, z) represents the spatial coordinates of any point in the physical model of the magnetic field inside the aluminum electrolysis cell, and the output is the total magnetic induction intensity at any point inside the aluminum electrolysis cell, which specifically includes:
[0035] The PINN model includes input layer, fully connected layer, output layer and loss function;
[0036] The input layer is used to receive spatial features u(x, y, z), time features t and the anode current I of the aluminum electrolysis cell;
[0037] The hidden layer in the fully connected layer uses ReLu as the activation function;
[0038] The output layer is used to output the total magnetic induction intensity B(x, y, z, t) of any point inside the aluminum electrolysis cell at time t. The derivative terms with respect to u(x, y, z) and t are calculated using automatic differentiation, which is convenient for inclusion in the loss function Loss to calculate the physical loss in back propagation.
[0039] Preferably, the loss function Loss in S2 is:
[0040] Loss = λ2L2+λ3L3+λ4L4(12)
[0041]
[0042] in, are the true values of the magnetic induction intensity of the sampling points in Q2, Q3 and Q4, respectively; N2, N3 and N4 are the number of sampling points in Q2, Q3 and Q4, respectively; L2, L3 and L4 are the loss functions corresponding to Q2, Q3 and Q4, respectively; λ2, λ3 and λ4 are the weights corresponding to Q2, Q3 and Q4, respectively.
[0043] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a method for predicting the internal magnetic field of an aluminum electrolysis cell based on a physical information network PINN, which has the following beneficial effects:
[0044] Aiming at predicting the internal magnetic field of an aluminum reduction cell, the present invention proposes a prediction method for the internal magnetic field of an aluminum reduction cell based on a physical information network PINN, and introduces a physical loss function, which is more in line with physical laws and increases interpretability. Compared with other deep learning networks, it is much less dependent on the quantity and quality of data.
[0045] Traditional supervised deep learning networks are difficult to train using sparse real magnetic field data, and the model accuracy is low. The magnetic field data inside the aluminum electrolytic cell is difficult to collect, and the amount of real data is small. Compared with the traditional data-driven neural network method, the PINN network requires less data to achieve better prediction capabilities. Because the injection of physical laws provides additional information and constraints for the neural network, it enables it to learn and generalize more effectively. It solves the problems of poor real-time performance of existing technologies, large amounts of computing resources and time, difficult installation of internal magnetic field measurement instruments, high wear and tear costs, inaccurate measurements, and prediction accuracy that is too dependent on the quantity and quality of measured data. Network training and prediction are performed without the need for labeled data. It can be seen that this solution can effectively improve the speed and accuracy of the prediction of the internal magnetic field of the aluminum electrolytic cell. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] 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.
[0047] Figure 1 A flowchart of a method for predicting the internal magnetic field of an aluminum electrolysis cell based on a physical information network PINN provided by the present invention;
[0048] Figure 2 A structural diagram of a PINN model in a method for predicting the internal magnetic field of an aluminum electrolysis cell based on a physical information network PINN provided by the present invention. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not 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.
[0050] The present invention provides a method for predicting the magnetic field inside an aluminum electrolysis cell based on a physical information network PINN, such as Figure 1 As shown, the following steps are included:
[0051] The data related to the magnetic field to be predicted are input into the trained PINN model, and the predicted data of the total magnetic induction intensity at any point inside the aluminum electrolysis cell are output; wherein the relevant data include: the time characteristics, spatial characteristics and anode current of the magnetic field inside the aluminum electrolysis cell; the specific contents of constructing the trained PINN model include:
[0052] S1. Construct a physical model of the magnetic field inside the target aluminum electrolysis cell;
[0053] S2. Construct a PINN model, construct a loss function based on the physical model of the internal magnetic field of the target aluminum electrolytic cell, obtain a simulation data set to iteratively train and back-propagate the PINN model, calculate the physical loss in the back-propagation process through the loss function, and if the preset conditions are met, the training is completed, and a PINN model for predicting the target internal magnetic field is obtained;
[0054] S3. Complete the verification of the PINN model and obtain the trained PINN model.
[0055] In order to further implement the above technical solution, the specific contents of S1 include:
[0056] The magnetic field inside the aluminum reduction cell is divided into four parts: busbar area Q1, anode, cathode carbon block and aluminum liquid electrolyte area Q2, magnetic material cathode steel rod area with active current Q3, aluminum reduction cell shell area Q4; the influence of the busbar on the magnetic field is ignored, and the busbar area Q1 is not considered;
[0057] Magnetic field of Q2 for:
[0058]
[0059] Where μ is the magnetic permeability, is the magnetic field strength generated by the Q2 region, is the Hamiltonian operator, is the current density in the Q2 region, calculated by the current anode current I, is the radial vector from the source point to the field point, and r is the distance from the field point to the source point;
[0060] Magnetic field of Q3 for:
[0061]
[0062] in is the magnetic field strength generated by the cathode steel rod current, is the magnetic field strength generated by the ferromagnetic cathode steel rod;
[0063] Define the simplified scalar magnetic potential as φ, and get from formula (2):
[0064]
[0065] In the formula, It indicates the magnetic field strength generated by the ferromagnetic cathode steel bar, and there is no active current;
[0066] but:
[0067]
[0068] In the formula, is the total magnetic field strength of Q3; is the current density in Q3 region;
[0069] Magnetic field of Q4 for:
[0070] because So we define a full scalar magnetic potential have to:
[0071]
[0072] The total magnetic induction intensity at any point inside the aluminum electrolysis cell is:
[0073]
[0074] It should be noted that:
[0075] In an aluminum electrolytic cell, current density J is a quantity that describes the current distribution, indicating the amount of current passing through a unit area. Anode current I is the amount of charge actually flowing in the conductor, and its relationship is:
[0076]
[0077] Where J represents the current density in A / m 2 ; I is the current, the unit is A; S is the cross-sectional area of the conductor, the unit is m 2 .
[0078] In order to further implement the above technical solution, the specific contents of S2 include:
[0079] The PINN network model is constructed. The input of the PINN network model is the time characteristic t, spatial characteristic u(x, y, z) and anode current I of the magnetic field inside the aluminum electrolysis cell, where u(x, y, z) represents the spatial coordinates of any point in the physical model of the magnetic field inside the aluminum electrolysis cell, and the output is the total magnetic induction intensity at any point inside the aluminum electrolysis cell, which specifically includes:
[0080] The PINN model includes input layer, fully connected layer, output layer and loss function;
[0081] The input layer is used to receive spatial features u(x, y, z), time features t and the anode current I of the aluminum electrolysis cell;
[0082] The hidden layer in the fully connected layer uses ReLu as the activation function;
[0083] The output layer is used to output the total magnetic induction intensity B(x, y, z, t) of any point inside the aluminum electrolysis cell at time t. The derivative terms with respect to u(x, y, z) and t are calculated using automatic differentiation, which is convenient for inclusion in the loss function Loss to calculate the physical loss in back propagation.
[0084] It should be noted that:
[0085] The key idea of PINN is to embed physical constraints into the neural network so that the network can learn the behavior of the physical system and satisfy the physical equations. In this embodiment, the fully connected layer consists of 5 hidden layers, each containing 64 neurons, and ReLu is used as the activation function;
[0086] During the forward propagation process of the PINN model, the model outputs the magnetic induction intensity B, and its derivatives with respect to u(x, y, z) and t are calculated using automatic differentiation, so that they can be substituted into the loss function for back propagation when optimizing the model to ensure that the model satisfies the constraints of the physical equations. Automatic differentiation is completed through the Autograd component of the PyTorch framework. Its principle is to dynamically build a calculation graph and use the chain rule to automatically calculate the gradient of each parameter during back propagation, so that the model considers both data errors (data-driven losses) and errors in physical equations (physics-driven losses) when updating parameters.
[0087] In order to further implement the above technical solution, the loss function Loss in S2 is:
[0088] Loss = λ2L2+λ3L3+λ4L4(12)
[0089]
[0090] in, are the true values of the magnetic induction intensity of the sampling points in Q2, Q3 and Q4, respectively; N2, N3 and N4 are the number of sampling points in Q2, Q3 and Q4, respectively; L2, L3 and L4 are the loss functions corresponding to Q2, Q3 and Q4, respectively; λ2, λ3 and λ4 are the weights corresponding to Q2, Q3 and Q4, respectively.
[0091] In the method of the present invention, when training the neural network, the total loss function Loss can be made to approach 0 through cyclic iteration. When the total loss of the neural network approaches 0, the network can be considered to be an approximation of the internal magnetic field of the target aluminum electrolysis cell. In this way, the training of the PINN network is completed, and the network can be used to predict the internal magnetic field of the aluminum electrolysis cell.
[0092] In S3, the accuracy of the model is verified based on the prediction results of the PINN network model and the measured data or the data calculated by the finite element method.
[0093] After the PINN network training is completed, the magnetic field predicted by the network is verified by using the field measured data measured by the sensor or the magnetic field data simulated by the finite element method. The MAE (mean absolute error) and the determination coefficient R 2 To evaluate the performance of the model. MAE (mean absolute error) can reflect the data error between the predicted value and the true value, and is used to determine whether the accuracy of the prediction result meets the needs of engineering applications. 2 This indicates that the network model is highly correlated with the observed data, confirming whether the model has good generalization ability for magnetic induction intensities under different working conditions and spatial locations.
[0094] Aiming at predicting the magnetic field inside an aluminum electrolysis cell, the present invention proposes a method for predicting the magnetic field inside an aluminum electrolysis cell based on PINN (physical information network).
[0095] Compared with the existing methods, the trained PINN network is used to predict the internal magnetic field of the aluminum electrolytic cell. Because the deep learning network has a fast prediction speed, the time spent on predicting the magnetic induction intensity at a certain spatial position is in milliseconds, which fully meets the real-time prediction requirements in the project and occupies less computing resources. It solves the problems of poor real-time performance of traditional finite element simulation methods, numerical calculation methods, experimental measurement methods, etc., requiring a lot of computing resources and time, difficult installation of internal magnetic field measurement instruments, high wear and tear costs, and inaccurate measurements.
[0096] Because the aluminum reduction cell is a closed, high-temperature, strong-magnetic, and highly corrosive space, the internal magnetic field measuring instrument is difficult to install, has high wear and tear costs, and lacks real data on the internal magnetic field. The present invention establishes a physical equation based on the target aluminum reduction cell, customizes a loss function that conforms to the laws of physics, and constructs a PINN network to predict the internal magnetic field distribution of the aluminum reduction cell. This solves the problem that the prediction accuracy of the deep learning method is too dependent on the quantity and quality of the measured data, and performs network training and prediction without the need for label data, and improves the interpretability of the model at the physical level.
[0097] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for predicting the magnetic field inside an aluminum electrolysis cell based on a physical information network PINN, characterized in that: The following steps are involved: The data related to the magnetic field to be predicted are input into the trained PINN model, and the predicted data of the total magnetic induction intensity at any point inside the aluminum electrolysis cell are output; wherein the relevant data include: the time characteristics, spatial characteristics and anode current of the magnetic field inside the aluminum electrolysis cell; the specific contents of constructing the trained PINN model include: S1. Construct a physical model of the magnetic field inside the target aluminum electrolysis cell; S2. Construct a PINN model, construct a loss function based on the physical model of the internal magnetic field of the target aluminum electrolytic cell, obtain a simulation data set to iteratively train and back-propagate the PINN model, calculate the physical loss in the back-propagation process through the loss function, and if the preset conditions are met, the training is completed, and a PINN model for predicting the target internal magnetic field is obtained; S3. Complete the verification of the PINN model and obtain the trained PINN model.
2. The method for predicting the internal magnetic field of an aluminum electrolysis cell based on a physical information network PINN according to claim 1 is characterized in that: The specific contents of S1 include: The magnetic field inside the aluminum reduction cell is divided into four parts: busbar area Q1, anode, cathode carbon block and aluminum liquid electrolyte area Q2, magnetic material cathode steel rod area with active current Q3, aluminum reduction cell shell area Q4; the influence of the busbar on the magnetic field is ignored, and the busbar area Q1 is not considered; Magnetic field of Q2 for: Where μ is the magnetic permeability, is the magnetic field intensity generated in the Q2 region, ▽ is the Hamiltonian operator, is the current density in the Q2 region, calculated by the current anode current I, is the radial vector from the source point to the field point, and r is the distance from the field point to the source point; Magnetic field of Q3 for: in is the magnetic field strength generated by the cathode steel rod current, is the magnetic field strength generated by the ferromagnetic cathode steel rod; Define the simplified scalar magnetic potential as φ, and get from formula (2): In the formula, It indicates the magnetic field strength generated by the ferromagnetic cathode steel bar, and there is no active current; but: In the formula, is the total magnetic field strength of Q3; is the current density in the Q3 region, calculated by the current anode current I; Magnetic field of Q4 for: because So we define a full scalar magnetic potential have to: The total magnetic induction intensity at any point inside the aluminum electrolysis cell is:
3. The method for predicting the internal magnetic field of an aluminum electrolysis cell based on a physical information network PINN according to claim 1 is characterized in that: The specific contents of S2 include: The PINN network model is constructed. The input of the PINN network model is the time characteristic t, spatial characteristic u(x, y, z) and anode current I of the magnetic field inside the aluminum electrolysis cell, where u(x, y, z) represents the spatial coordinates of any point in the physical model of the magnetic field inside the aluminum electrolysis cell, and the output is the total magnetic induction intensity at any point inside the aluminum electrolysis cell, which specifically includes: The PINN model includes input layer, fully connected layer, output layer and loss function; The input layer is used to receive spatial features u(x, y, z), time features t and the anode current I of the aluminum electrolysis cell; The hidden layer in the fully connected layer uses ReLu as the activation function; The output layer is used to output the total magnetic induction intensity B(x, y, z, t) of any point inside the aluminum electrolysis cell at time t. The derivative terms with respect to u(x, y, z) and t are calculated using automatic differentiation, which is convenient for inclusion in the loss function Loss to calculate the physical loss in back propagation.
4. The method for predicting the internal magnetic field of an aluminum electrolysis cell based on a physical information network PINN according to claim 2 is characterized in that: The loss function Loss in S2 is: Loss=λ2L2+λ3L3+λ4L4 (12) in, and are the true values of the magnetic induction intensity of the sampling points in Q2, Q3 and Q4, respectively; N2, N3 and N4 are the number of sampling points in Q2, Q3 and Q4, respectively; L2, L3 and L4 are the loss functions corresponding to Q2, Q3 and Q4, respectively; λ2, λ3 and λ4 are the weights corresponding to Q2, Q3 and Q4, respectively.
Citation Information
Cited By
Intelligent optimization method and system for irradiation crosslinking process of flexible armor wire
CN119849897A
High-order direct-current micro-grid system multi-loss synchronous convergence modeling method based on improved physical information neural network
CN120951775A