Sacrificial anode casting temperature control method and system based on multiple sensors

By combining multi-sensor data fusion and physical information neural networks, the problem of fusing multi-source heterogeneous sensor data was solved, enabling precise reconstruction and control of the internal temperature field of the mold, thus improving casting quality and system reliability.

CN121657787APending Publication Date: 2026-03-13TAICANG KAIDE ANTICORROSION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511922572.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-18
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively integrate data from multiple heterogeneous sensors, resulting in insufficient accurate understanding of the dynamic temperature field inside the mold, inability to accurately predict casting defects, and a lack of real-time control capabilities.

Method used

By employing a multi-sensor data fusion method, multi-source data is processed through time resampling and feature encoding. Combined with a physical information neural network and a dynamic weight adjustment mechanism, the three-dimensional temperature field inside the mold is reconstructed, and the uncertainty is quantified, thereby achieving accurate prediction and control of the temperature field.

Benefits of technology

It significantly improves temperature prediction accuracy and system reliability, reduces casting defects, saves energy consumption, improves product quality stability, and provides key technical support for intelligent casting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121657787A_ABST
    Figure CN121657787A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of metal material processing, discloses a multi-sensor-based sacrificial anode casting temperature control method and system, and effectively solves the problems of inaccurate temperature field sensing and control lag in the sacrificial anode casting process through combination of multi-source sensor data fusion and a physical information neural network. According to the method, the generalization ability of a physical constraint enhancement model is utilized, the double constraints of dynamic weight optimization balance data and rules are utilized, and risk early warning is realized by means of uncertainty quantification. And finally, the comprehensive effects of reducing casting defects, saving energy consumption and improving product quality stability are achieved, and key technical support is provided for intelligent upgrading of the precision casting industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of metal material processing technology, and in particular to a method and system for controlling the temperature of sacrificial anode casting based on multiple sensors. Background Technology

[0002] The casting of sacrificial anodes is a crucial manufacturing process in marine engineering corrosion protection, and its quality directly determines the effectiveness and lifespan of the cathodic protection system. During casting, molten metal is injected into the mold cavity, undergoing multiple stages including filling, solidification, and cooling. Inside the mold, especially for large or complex-shaped anodes, the thermal field distribution exhibits significant non-uniformity and dynamic time-varying characteristics. For example, near the gate, high-temperature molten metal continuously flows in, concentrating the heat; while at the end of the cavity or in areas with thick cross-sections, heat dissipation is relatively slow; areas far from the gate may experience lower temperatures due to excessively rapid heat loss. Improper control of this non-uniform temperature field can trigger a series of process problems, severely affecting the internal structure and surface quality of the casting. To accurately capture this complex thermal process, modern casting systems employ various types of sensors deployed in different characteristic areas of the mold, such as the gate, key locations within the cavity, and typical points far from the gate. These sensors may include thermocouples for direct contact temperature measurement, infrared sensors for non-contact surface temperature measurement, and pressure or flow sensors for indirectly reflecting the flow state of the molten metal, collectively forming a multi-source sensing system.

[0003] However, the application of such multi-sensor systems also introduces new technical challenges. Due to differences in working principles, installation locations, and design goals, the data generated by each sensor differs fundamentally in type (e.g., temperature, pressure), sampling frequency, and physical meaning, forming multi-source heterogeneous datasets. Existing technologies often rely on single-type sensors, such as using only thermocouples for limited point-based temperature measurements, or integrating multiple sensors but failing to go beyond simple threshold judgment or independent channel monitoring. This approach struggles to construct a global, continuous, and dynamically evolving three-dimensional temperature field within the mold, and cannot accurately reveal the propagation law of the solidification front and the distribution of hot spots, resulting in insufficient predictive ability for casting defects such as shrinkage cavities, porosity, and cracks. The core issue lies in the fact that existing methods have failed to effectively address several key challenges inherent in multi-source heterogeneous data fusion. First, there is the problem of accurate synchronization of data timestamps; differences in the data acquisition times of different sensors directly affect the accuracy of subsequent fusion analysis. Second, the influence of parameters such as temperature, pressure, and flow rate on the final casting quality is not isolated; there are complex, nonlinear coupling relationships between them, and these relationships change dynamically with the process stage, making it difficult for traditional linear models or fixed weight allocation strategies to accurately describe them. Furthermore, insufficient understanding of the coupling effects of multiple physical fields such as fluid dynamics, heat conduction, and phase change during the casting process, coupled with the lack of advanced algorithms capable of processing high-dimensional heterogeneous data in real time and extracting deep correlations, further restricts the accurate understanding and precise control of the actual thermal processes inside the mold. Therefore, there is an urgent need for an innovative method that can efficiently integrate data from multiple heterogeneous sensors to accurately reconstruct the dynamic temperature field inside the mold and provide a reliable basis for intelligent control. Summary of the Invention

[0004] This application proposes a method and system for controlling the casting temperature of sacrificial anodes based on multiple sensors, in order to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, this application adopts the following technical solution: a multi-sensor-based method for controlling the casting temperature of sacrificial anodes, comprising the following steps: Step S1: In response to the start of the sacrificial anode casting process, raw data generated by various sensors deployed in different feature areas of the mold are collected. The raw data includes temperature, pressure and flow rate parameters, and their time series and spatial coordinates differ. The raw data is resampled to unify the timestamp sequence, and spatial coordinate registration is performed based on the three-dimensional computer-aided design model of the mold. At the same time, non-temperature parameters are processed by feature encoding, and the spatiotemporally aligned multi-source feature tensor is output. Step S2: Input the multi-source feature tensor obtained in step S1 into a predefined physical information neural network. The physical information neural network receives spatial coordinates and time variables as input and outputs the predicted temperature of each point inside the mold. The training process of the physical information neural network is subject to the physical constraints of the heat conduction partial differential equation. The residual loss of the network's predicted temperature to the physical equation is calculated by automatic differentiation technology. Step S3: Based on the multi-source feature tensor of step S1 and the predicted temperature and physical constraint residual loss obtained in step S2, construct a multi-objective loss function that includes data fitting loss term and physical constraint loss term; adopt a dynamic weight adjustment mechanism to calculate the adaptive weight coefficients of data fitting loss term and physical constraint loss term according to the real-time state during training, form a comprehensive loss function and optimize the parameters of the physical information neural network. Step S4: Input the discrete spatiotemporal coordinates of the entire mold domain into the physical information neural network optimized in step S3, perform forward propagation calculations to obtain complete distribution data of the three-dimensional temperature field; at the same time, enable Monte Carlo Dropout technology to perform multiple random predictions, calculate the mean and standard deviation of the temperature prediction at each spatial point, and quantify the uncertainty of the temperature field prediction.

[0006] Furthermore, in step S1, time resampling specifically includes: Using the time series of the sensor with the highest sampling frequency as a reference, adaptive spline interpolation is performed on the sensor measurements at non-reference timestamps; An acceleration constraint term is introduced during the interpolation calculation process. The interpolation result is optimized by using cubic spline basis functions and regularization weights to suppress phase distortion in high dynamic scenes. The acceleration constraint term uses flow velocity sensor data to calculate the fluid motion acceleration, and the regularization weight is dynamically adjusted according to the casting stage.

[0007] Furthermore, in step S1, the feature encoding of non-temperature parameters specifically involves: The pressure and flow velocity parameters in the original data are encoded using an independent shallow neural network. By linearly transforming the weight matrix and bias vector and applying a nonlinear activation function, a high-dimensional feature vector aligned with the temperature feature dimension is output.

[0008] Furthermore, in step S2, physical constraints of the heat conduction partial differential equation are introduced during the training process of the physical information neural network, specifically including: The first-order partial derivative of the network-predicted temperature with respect to time and the second-order partial derivative with respect to spatial coordinates are calculated using automatic differentiation techniques, and then the residuals of the heat conduction partial differential equation are solved. The partial differential equation for heat conduction includes source terms caused by the latent heat of phase change, which are used to describe the thermodynamic behavior of molten metal during solidification in the casting process; The residual calculation covers randomly distributed configuration points throughout the entire mold domain, and the physical constraint loss term is constructed in the form of mean square error.

[0009] Furthermore, in step S2, the input data preprocessing of the physical information neural network includes: The spatiotemporal coordinates in the multi-source feature tensor obtained in step S1 are concatenated with the aggregated features, and a Fourier feature embedding transformation is applied to map the original input to a high-dimensional frequency space. The parameters of the Fourier feature embedding transform are obtained through random initialization or training, which are used to enhance the network's ability to capture high-frequency components of the temperature field.

[0010] Furthermore, in step S3, the construction of the multi-objective loss function and the dynamic weight adjustment mechanism specifically include: The data fitting loss term is calculated based on the multi-source feature tensor in step S1. This loss term measures the difference between the predicted temperature and the actual temperature measured by the sensor. Meanwhile, based on the physical constraint residual loss term from step S2, this loss term characterizes the degree to which the predicted temperature field satisfies the partial differential equation of heat conduction. A dynamic weight adjustment mechanism is adopted. Based on the numerical ratio and gradient norm of the data fitting loss term and the physical constraint loss term during the training process, the adaptive weight coefficients of the two are calculated in real time. The weighted sum is then used to form a comprehensive loss function to optimize the parameters of the physical information neural network. The weight coefficients dynamically decay as the number of training iterations increases, ensuring that data fitting is the primary focus in the early stages of training and physical constraints are strengthened in the later stages.

[0011] Furthermore, in step S3, the specific implementation of the dynamic weight adjustment mechanism includes: Construct a lightweight meta-learner that takes the ratio of the data fitting loss term to the physical constraint loss term and the gradient norm ratio as inputs, and outputs the weight adjustment amount. The weight adjustment amount is added to the initial weight based on exponential decay, and then normalized to obtain the final weight. The parameters of the meta-learner are updated synchronously with the parameters of the physical information neural network to form a closed-loop optimization, thereby suppressing training instability caused by sudden changes in the magnitude of loss.

[0012] Furthermore, in step S4, the temperature field reconstruction and uncertainty quantification specifically include: The discrete spatiotemporal coordinates of the entire mold domain are input into the physical information neural network optimized in step S3, and forward propagation calculation is performed to obtain the complete distribution data of the three-dimensional temperature field. Meanwhile, Monte Carlo Dropout technology is used to make multiple random predictions. Based on the multiple prediction results of each spatial point, the mean and quantile difference of the temperature prediction are calculated to quantify the uncertainty of the temperature field prediction. The quantile difference metric is obtained by calculating the difference between a predetermined higher quantile and a predetermined lower quantile, and is used to characterize the dispersion of the predicted values.

[0013] Furthermore, in step S4, the results of uncertainty quantification are used for dynamic risk warning: A comprehensive risk index is constructed based on the product of uncertainty measure and temperature field spatial gradient; When the comprehensive risk index exceeds the preset threshold, a defect risk warning signal is generated; The preset threshold is determined based on historical quality data of the casting process.

[0014] The temperature control system for sacrificial anode casting based on multiple sensors specifically includes: a multi-source spatiotemporal alignment and feature encoding module, a physical constraint temperature field prediction module, a multi-objective dynamic optimization module, and a temperature field reconstruction and uncertainty quantification module. The multi-source spatiotemporal alignment and feature encoding module, in response to the start of the sacrificial anode casting process, collects raw data generated by various sensors deployed in different feature areas of the mold. The raw data includes temperature, pressure, and flow rate parameters, and their time series and spatial coordinates differ. The module performs time resampling on the raw data to unify the timestamp sequence, performs spatial coordinate registration based on the three-dimensional computer-aided design model of the mold, and performs feature encoding processing on non-temperature parameters to output spatiotemporally aligned multi-source feature tensors. The physical constraint temperature field prediction module inputs the multi-source feature tensor obtained by the multi-source spatiotemporal alignment and feature encoding module into a predefined physical information neural network. This physical information neural network receives spatial coordinates and time variables as input and outputs the predicted temperature of each point inside the mold. The training process of the physical information neural network is subject to the physical constraints of the heat conduction partial differential equation. The residual loss of the network's predicted temperature to the physical equation is calculated through automatic differentiation technology. The multi-objective dynamic optimization module constructs a multi-objective loss function that includes data fitting loss and physical constraint loss terms, based on the multi-source feature tensor of the multi-source spatiotemporal alignment and feature encoding module and the predicted temperature and physical constraint residual loss obtained from the physical constraint temperature field prediction module. A dynamic weight adjustment mechanism is adopted to calculate the adaptive weight coefficients of the data fitting loss term and the physical constraint loss term according to the real-time state during the training process, forming a comprehensive loss function and optimizing the parameters of the physical information neural network. The temperature field reconstruction and uncertainty quantification module inputs the discrete spatiotemporal coordinates of the entire mold domain into the physical information neural network optimized by the multi-objective dynamic optimization module, performs forward propagation calculations, and obtains complete distribution data of the three-dimensional temperature field. At the same time, Monte Carlo Dropout technology is used to perform multiple random predictions, calculate the mean and standard deviation of the temperature prediction at each spatial point, and quantify the uncertainty of the temperature field prediction.

[0015] The beneficial effects of this invention are as follows: This invention effectively solves the problems of inaccurate temperature field perception and control lag during sacrificial anode casting by combining multi-source sensor data fusion with physical information neural networks, significantly improving temperature prediction accuracy and system reliability. This method enhances the generalization ability of the model by utilizing physical constraints, balances the dual constraints of data and patterns through dynamic weight optimization, and achieves risk warning by using uncertainty quantification. Ultimately, it achieves a comprehensive effect of reducing casting defects, saving energy consumption, and improving product quality stability, providing key technical support for the intelligent upgrading of the precision casting industry. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort: Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a system block diagram of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Example 1

[0019] This embodiment provides, for example Figure 1 The multi-sensor-based sacrificial anode casting temperature control method shown includes the following steps: Step S1: In response to the start of the sacrificial anode casting process, raw data generated by various sensors deployed in different feature areas of the mold are collected. The raw data includes temperature, pressure and flow rate parameters, and their time series and spatial coordinates differ. The raw data is resampled to unify the timestamp sequence, and spatial coordinate registration is performed based on the three-dimensional computer-aided design model of the mold. At the same time, non-temperature parameters are processed by feature encoding, and the spatiotemporally aligned multi-source feature tensor is output. Step S2: Input the multi-source feature tensor obtained in step S1 into a predefined physical information neural network. The physical information neural network receives spatial coordinates and time variables as input and outputs the predicted temperature of each point inside the mold. The training process of the physical information neural network is subject to the physical constraints of the heat conduction partial differential equation. The residual loss of the network's predicted temperature to the physical equation is calculated by automatic differentiation technology. Step S3: Based on the multi-source feature tensor of step S1 and the predicted temperature and physical constraint residual loss obtained in step S2, construct a multi-objective loss function that includes data fitting loss term and physical constraint loss term; adopt a dynamic weight adjustment mechanism to calculate the adaptive weight coefficients of data fitting loss term and physical constraint loss term according to the real-time state during training, form a comprehensive loss function and optimize the parameters of the physical information neural network. Step S4: Input the discrete spatiotemporal coordinates of the entire mold domain into the physical information neural network optimized in step S3, perform forward propagation calculations to obtain complete distribution data of the three-dimensional temperature field; at the same time, enable Monte Carlo Dropout technology to perform multiple random predictions, calculate the mean and standard deviation of the temperature prediction at each spatial point, and quantify the uncertainty of the temperature field prediction.

[0020] In this embodiment, specifically, in step S1, time resampling includes: Using the time series of the sensor with the highest sampling frequency as a reference, adaptive spline interpolation is performed on the sensor measurements at non-reference timestamps; In practice, adaptive spline interpolation is achieved through the following formula:

[0021] The parameters are defined as follows: Indicates the sensor's time The interpolation result (unit: ℃ or Pa or m / s) has the physical meaning of the aligned sensor measurement value. The number of spline basis functions (usually taken as...) =5), used to control the smoothness of interpolation; These are spline coefficients, obtained through least-squares fitting of historical data, reflecting the local data change trend; These are cubic B-spline basis functions (order = 3), used to construct continuous interpolation curves; The regularization weight (range 0.1~1.0) is dynamically adjusted according to the casting stage: a smaller value is used during the filling stage. ≈0.1) prioritizes responses to rapid changes, taking the larger value during the solidification stage. ≈1.0) to suppress oscillations; The acceleration constraint term (unit: measured value / second²) is calculated by differential calculation of fluid motion acceleration using flow velocity sensor data.

[0022] This formula transforms the traditional interpolation problem into a regularized optimization problem by introducing physically driven acceleration constraints and adaptive weights, effectively suppressing phase distortion caused by drastic fluid fluctuations during the casting process. In practical implementation, the time series data from the highest sampling frequency sensor (such as an infrared temperature sensor) is first used... Based on the benchmark, data from other sensors are resampled to a unified timestamp; then, interpolation at non-benchmark time points is calculated based on the above formula to ensure spatiotemporal synchronization of multi-source data.

[0023] An acceleration constraint term is introduced during the interpolation calculation process. The interpolation result is optimized by using cubic spline basis functions and regularization weights to suppress phase distortion in high dynamic scenes. The acceleration constraint term uses flow velocity sensor data to calculate the fluid motion acceleration, and the regularization weight is dynamically adjusted according to the casting stage.

[0024] In step S1, the feature encoding of non-temperature parameters is specifically performed as follows: The pressure and flow velocity parameters in the original data are encoded using an independent shallow neural network. By linearly transforming the weight matrix and bias vector and applying a nonlinear activation function, a high-dimensional feature vector aligned with the temperature feature dimension is output.

[0025] In practice, feature encoding is achieved through the following formula:

[0026] The parameters are defined as follows: The high-dimensional feature vector (dimension) of the encoded output =64), used for splicing with temperature features; For spatiotemporally aligned non-temperature parameter measurements (such as pressure vectors) (or flow rate scalar); For encoding weight matrix (dimension) , (As input dimension), multimodal mapping relationships are learned through training; For the bias vector (dimension) ×1), used to adjust the output offset; It is a non-linear activation function, specifically using LeakyReLU (negative slope coefficient = 0.01) to preserve negative value information.

[0027] This formula uses a shallow neural network to map the physical parameters (pressure, velocity) of heterogeneous graphs to a unified high-dimensional space, eliminating dimensional differences. In implementation, independent encoding networks are constructed for the pressure parameter (three-dimensional vector) and the velocity parameter (scalar), outputting feature vectors of a unified dimension. This aligns the tensor with the temperature feature (direct value) dimension, and the resulting concatenation forms a multi-source feature tensor. (in For time step, For the number of sensors, (As a feature dimension). This approach resolves the scale conflict problem caused by the direct fusion of heterogeneous data in traditional methods, providing standardized input for subsequent physical information neural networks.

[0028] In this embodiment, specifically, in step S2, the physical constraints of the heat conduction partial differential equation are introduced during the training process of the physical information neural network, specifically including: Temperature prediction is achieved using an automatic differentiation (AD) calculation network. Regarding time First-order partial derivatives and spatial coordinates The second-order partial derivative (i.e., the Laplace operator) This process then solves for the residuals of the partial differential equation (PDE) for heat conduction. In a specific implementation, the PDE is extended to include a latent heat source term for phase change:

[0029] In this formula: Temperature (unit: K) represents the thermal field distribution inside the mold; Time (in seconds) describes the dynamic changes during the solidification process; Thermal diffusivity (unit: m² / s, value on the order of 10⁻⁵ to 10⁻⁴) reflects the thermal conductivity of a material. The Laplace operator characterizes heat conduction in space; The latent heat source term for phase change (unit: K / s) is calculated using the following formula: ,in Latent heat coefficient (unit: J / kg) This represents the solid fraction, used to describe the endothermic and exothermic effects during the solidification of molten metal.

[0030] This formula accurately describes the unsteady thermodynamic behavior of molten metal during solidification in the casting process by introducing a latent heat term of phase change, thus avoiding the temperature field prediction deviation caused by the neglect of phase change in traditional heat conduction models.

[0031] The partial differential equation for heat conduction (PDE), containing source terms arising from the latent heat of phase change, describes the thermodynamic behavior of molten metal during solidification during casting. The embedding of physical constraints is achieved through the following residual loss function:

[0032] In this formula: The number of configuration points covers randomly distributed spatiotemporal points throughout the entire mold area. ; Temperature predicted by the Physical Information Neural Network (PINN); Partial derivatives are calculated directly using automatic differentiation (AD) technology, avoiding numerical discretization errors.

[0033] This formula uses the loss term in the form of mean square error to inject physical laws as soft constraints into the network training, ensuring that the predicted temperature field fits the sensor data and obeys the law of conservation of energy, thus significantly improving the reliability of inference in sparse regions of the sensor.

[0034] The residual calculation covers randomly distributed configuration points across the entire mold domain, and a physical constraint loss term is constructed using the mean square error. In specific implementation, the configuration points... Sampling is generated in the three-dimensional space and time domain of the mold using Latin hypercube sampling, with the sampling density dynamically adjusted according to the temperature gradient (e.g., increased density in the solidification front region). During training, a physical constraint loss term is used. Loss term for data fitting Collaborative optimization is achieved by balancing multiple objective constraints through a dynamic weighting mechanism.

[0035] In step S2, the input data preprocessing of the physical information neural network includes: The multi-source feature tensor obtained in step S1 spacetime coordinates in With the aggregated feature vector The vectors are concatenated to form the original input vector. Then, a Fourier Feature Embedding transformation is applied to map the original input to a high-dimensional frequency space. The transformation formula is:

[0036] In this formula: Let be a Fourier basis matrix, whose elements From Gaussian distribution initialization( =0.01), or used as a trainable parameter; Output feature dimension (default) =128), controlling frequency resolution; This is the high-dimensional feature vector after embedding.

[0037] This transformation projects the low-dimensional input into a high-dimensional frequency space, making it easier for neural networks to capture high-frequency oscillation patterns in the temperature field (such as transients at the solidification interface), overcoming the spectral bias problem of traditional neural networks and accelerating training convergence.

[0038] The parameters of the Fourier feature embedding transform are obtained through random initialization or training, and are used to enhance the network's ability to capture high-frequency components of the temperature field. In specific implementation, if the basis matrix... If set as trainable parameters, they are jointly optimized with the main network of the Physical Information Neural Network (PINN); if randomly initialized, they are fixed as static mappings. Embedded features As the actual input to the Physical Information Neural Network (PINN), it replaces the original coordinates to improve the fitting efficiency of dynamic temperature field changes.

[0039] In this embodiment, specifically, in step S3, the mechanism for constructing the multi-objective loss function and dynamically adjusting the weights includes: Based on the multi-source feature tensor of step S1 Calculate the data fitting loss term This loss term measures the difference between the predicted temperature and the sensor-measured temperature. Specifically, the data fitting loss term is calculated using the following formula:

[0040] in, This represents the number of sensor data points (the value depends on the product of the time step of the multi-source feature tensor and the number of sensors in step S1). It is the predicted temperature output by the Physical Information Neural Network (PINN) in step S2. It is the sensor's measured temperature after spatiotemporal alignment in step S1. and They represent the first The formula uses the spatial coordinates and timestamps of each data point to quantify the deviation between the predicted and actual values ​​through mean square error, ensuring consistency between the predicted and measured temperature fields.

[0041] Meanwhile, the physical constraint residual loss term based on step S2 This loss term characterizes the degree to which the predicted temperature field satisfies the partial differential equation for heat conduction. The physical constraint loss term directly references the output of step S2, and its calculation depends on the residuals of the partial differential equation for heat conduction, which are solved using automatic differentiation techniques.

[0042] A dynamic weight adjustment mechanism is adopted to fit the loss term based on the data during training. With physical constraint loss term The numerical proportions and gradient norm are used to calculate adaptive weighting coefficients for both in real time. These weighting coefficients are initialized using the following temperature-controlled annealing strategy:

[0043] In this context, λ is the decay rate (default value 0.01), which controls the transition rate of weights from data fitting to physical constraints; The number of training iterations (range of values) This formula uses exponential decay to ensure that data fitting is the primary factor in the early stages of training (with larger weights), while physical constraints are strengthened in the later stages of training (with gradually increasing weights).

[0044] Furthermore, a comprehensive loss function is formed by weighted summation:

[0045] in, and These are the dynamically adjusted final weight coefficients. The comprehensive loss function is used to optimize the parameters of the Physical Information Neural Network (PINN), achieving multi-objective collaborative optimization through gradient backpropagation.

[0046] The weight coefficients dynamically decay with the number of training iterations, ensuring that data fitting is the primary focus in the early stages of training, while physical constraints are strengthened in the later stages. This dynamic decay mechanism enhances stability through gradient-sensitive adaptive weight correction: calculating the gradient norm of the data fitting loss term. and the gradient norm of the physical constraint loss term And adjust the weights as follows:

[0047] in To prevent the influence of small constants that divide by zero, this correction suppresses the dominant role of loss terms with excessively large gradient norms in the optimization direction, thus avoiding training oscillations.

[0048] In step S3, the specific implementation of the dynamic weight adjustment mechanism includes: Construct a lightweight meta-learner (MLP) that fits the loss term to the data. With physical constraint loss term The ratio and gradient norm ratio Input: Weight adjustment amount The meta-learner structure is a two-layer perceptron with an input dimension of 2, an output dimension of 2, and a hidden layer dimension of 8. The activation function used is ReLU. Its calculation process is as follows:

[0049] Logarithmic transformation is used to compress the dynamic range of input values ​​and improve the numerical stability of the meta-learner.

[0050] Weight adjustment Compared with initial weights based on exponential decay ( and After being superimposed, the final weights are obtained through normalization:

[0051] Normalization ensures that the sum of the weight coefficients is 1, thus avoiding an imbalance in the magnitude of the loss.

[0052] The parameters of the meta-learner are updated synchronously with the parameters of the Physical Information Neural Network (PINN), forming a closed-loop optimization. In each training iteration, the meta-learner dynamically outputs an adjustment amount based on the current loss and gradient ratios, and optimizes it jointly with the main network through backpropagation to suppress training instability caused by sudden changes in the loss magnitude. This design makes the weight adjustment long-term adaptive, avoiding the local optima problem of fixed strategies.

[0053] In this embodiment, specifically, in step S4, the temperature field reconstruction and uncertainty quantification specifically include: The discrete spatiotemporal coordinates of the entire mold domain are input into the Physical Information Neural Network (PINN) optimized in step S3, and forward propagation calculations are performed to obtain the complete distribution data of the three-dimensional temperature field. Specifically, the discrete spatiotemporal coordinate point set of the entire mold domain... (in Spatial grid coordinates, For a point in time, The predicted temperature field is output after forward propagation through PINN, with the total number of grid points as input. During the forward propagation process, the network weights are fixed to the parameters optimized in step S3, ensuring that the prediction results inherit the physical constraints of the multi-objective loss function and the balance between data fitting.

[0054] Simultaneously, Monte Carlo Dropout technology is employed to perform multiple random predictions. Based on the multiple prediction results for each spatial point, the mean and quantile difference of the temperature predictions are calculated to quantify the uncertainty of the temperature field prediction. Monte Carlo Dropout maintains the activation of the Dropout layers in the network during the inference phase, performing predictions on the same set of spatiotemporal coordinates. Sub-random forward propagation (usually) ), generate a set of prediction samples The average temperature forecast is calculated using the following formula:

[0055] In this formula: The temperature forecast mean (unit: °C) represents a spatial point. In time The average predicted temperature; For the first Predicted temperature of the Monte Carlo sample (unit: °C); The number of samples (ranging from 100 to 500) is used to control statistical stability.

[0056] By fusing multiple random predictions using this formula, the random errors of a single prediction are suppressed, thereby improving the overall accuracy of the temperature field.

[0057] Quantile difference measure is obtained by calculating the difference between a predetermined higher quantile and a predetermined lower quantile, and is used to characterize the dispersion of the predicted values. Specifically, quantile difference measure... The calculation formula is:

[0058] In this formula: It is a measure of quantile difference (unit: °C), representing the width of the 90% prediction interval; and These represent the 95th and 5th percentiles of the sample set, respectively, obtained by linear interpolation after sorting the sample values.

[0059] This formula captures the dispersion of the predicted value by the difference between the high and low quantiles, avoiding reliance on assumptions about the shape of the data distribution, making it robust to outliers and more suitable for quantifying the uncertainty of non-Gaussian temperature fields.

[0060] In step S4, the results of uncertainty quantification are further used for dynamic risk warning: A comprehensive risk index is constructed based on the product of an uncertainty measure and the spatial gradient of the temperature field. (Comprehensive Risk Index) The calculation formula is:

[0061] In this formula: The comprehensive risk index (unit: ℃² / m) is quantified in spatial points. In time Defect risks; The spatial gradient norm (unit: °C / m) of the predicted mean of the temperature field reflects the degree of drastic temperature change. The quantile difference measure (unit: °C) is derived from the calculation results of the above implementation method.

[0062] By coupling the uncertainty metric with the physical field gradient using this formula, high-risk regions (such as solidification fronts) can be accurately identified. The risk is significantly increased when high gradient regions are superimposed with high uncertainty.

[0063] When the overall risk index exceeds a preset threshold, a defect risk warning signal is generated. The warning trigger condition is:

[0064] In this formula: The preset risk threshold (unit: ℃² / m) is dynamically adjusted based on historical quality data of the casting process (typical value 100℃² / m).

[0065] This formula achieves automated risk decision-making through threshold comparison. When the risk index exceeds the safe range, it automatically triggers an early warning, prompting the need for process adjustment.

[0066] The preset threshold is determined based on historical quality data of the casting process. The threshold optimization process is based on a historical database (containing defect types, locations, and corresponding temperature field data), and calculates the threshold for each region through statistical learning (such as quantile regression) to ensure the accuracy of the early warning.

[0067] Example 2

[0068] This embodiment provides, for example Figure 2 The multi-sensor-based sacrificial anode casting temperature control system shown includes: a multi-source spatiotemporal alignment and feature encoding module, a physical constraint temperature field prediction module, a multi-objective dynamic optimization module, and a temperature field reconstruction and uncertainty quantification module. The multi-source spatiotemporal alignment and feature encoding module, in response to the start of the sacrificial anode casting process, collects raw data generated by various sensors deployed in different feature areas of the mold. The raw data includes temperature, pressure, and flow rate parameters, and their time series and spatial coordinates differ. The module performs time resampling on the raw data to unify the timestamp sequence, performs spatial coordinate registration based on the three-dimensional computer-aided design model of the mold, and performs feature encoding processing on non-temperature parameters to output spatiotemporally aligned multi-source feature tensors. The physical constraint temperature field prediction module inputs the multi-source feature tensor obtained by the multi-source spatiotemporal alignment and feature encoding module into a predefined physical information neural network. This physical information neural network receives spatial coordinates and time variables as input and outputs the predicted temperature of each point inside the mold. The training process of the physical information neural network is subject to the physical constraints of the heat conduction partial differential equation. The residual loss of the network's predicted temperature to the physical equation is calculated through automatic differentiation technology. The multi-objective dynamic optimization module constructs a multi-objective loss function that includes data fitting loss and physical constraint loss terms, based on the multi-source feature tensor of the multi-source spatiotemporal alignment and feature encoding module and the predicted temperature and physical constraint residual loss obtained from the physical constraint temperature field prediction module. A dynamic weight adjustment mechanism is adopted to calculate the adaptive weight coefficients of the data fitting loss term and the physical constraint loss term according to the real-time state during the training process, forming a comprehensive loss function and optimizing the parameters of the physical information neural network. The temperature field reconstruction and uncertainty quantification module inputs the discrete spatiotemporal coordinates of the entire mold domain into the physical information neural network optimized by the multi-objective dynamic optimization module, performs forward propagation calculations, and obtains complete distribution data of the three-dimensional temperature field. At the same time, Monte Carlo Dropout technology is used to perform multiple random predictions, calculate the mean and standard deviation of the temperature prediction at each spatial point, and quantify the uncertainty of the temperature field prediction.

[0069] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for controlling the casting temperature of sacrificial anodes based on multiple sensors, characterized in that, Includes the following steps: Step S1: In response to the start of the sacrificial anode casting process, raw data generated by various sensors deployed in different feature areas of the mold are collected. The raw data includes temperature, pressure and flow rate parameters, and their time series and spatial coordinates differ. The raw data is resampled to unify the timestamp sequence, and spatial coordinate registration is performed based on the three-dimensional computer-aided design model of the mold. At the same time, non-temperature parameters are processed by feature encoding, and the spatiotemporally aligned multi-source feature tensor is output. Step S2: Input the multi-source feature tensor obtained in step S1 into a predefined physical information neural network. The physical information neural network receives spatial coordinates and time variables as input and outputs the predicted temperature of each point inside the mold. The training process of the physical information neural network is subject to the physical constraints of the heat conduction partial differential equation. The residual loss of the network's predicted temperature to the physical equation is calculated by automatic differentiation technology. Step S3: Based on the multi-source feature tensor of step S1 and the predicted temperature and physical constraint residual loss obtained in step S2, construct a multi-objective loss function that includes data fitting loss term and physical constraint loss term; adopt a dynamic weight adjustment mechanism to calculate the adaptive weight coefficients of data fitting loss term and physical constraint loss term according to the real-time state during training, form a comprehensive loss function and optimize the parameters of the physical information neural network. Step S4: Input the discrete spatiotemporal coordinates of the entire mold domain into the physical information neural network optimized in step S3, perform forward propagation calculations to obtain complete distribution data of the three-dimensional temperature field; at the same time, enable Monte Carlo Dropout technology to perform multiple random predictions, calculate the mean and standard deviation of the temperature prediction at each spatial point, and quantify the uncertainty of the temperature field prediction.

2. The method for controlling the casting temperature of sacrificial anodes based on multiple sensors according to claim 1, characterized in that, In step S1, time resampling specifically includes: Using the time series of the sensor with the highest sampling frequency as a reference, adaptive spline interpolation is performed on the sensor measurements at non-reference timestamps; An acceleration constraint term is introduced during the interpolation calculation process. The interpolation result is optimized by using cubic spline basis functions and regularization weights to suppress phase distortion in high dynamic scenes. The acceleration constraint term uses flow velocity sensor data to calculate the fluid motion acceleration, and the regularization weight is dynamically adjusted according to the casting stage.

3. The method for controlling the casting temperature of sacrificial anodes based on multiple sensors according to claim 2, characterized in that, In step S1, the feature encoding of non-temperature parameters is specifically performed as follows: The pressure and flow velocity parameters in the original data are encoded using an independent shallow neural network. By linearly transforming the weight matrix and bias vector and applying a nonlinear activation function, a high-dimensional feature vector aligned with the temperature feature dimension is output.

4. The method for controlling the casting temperature of sacrificial anodes based on multiple sensors according to claim 3, characterized in that, In step S2, physical constraints of the heat conduction partial differential equation are introduced during the training process of the physical information neural network, specifically including: The first-order partial derivative of the network-predicted temperature with respect to time and the second-order partial derivative with respect to spatial coordinates are calculated using automatic differentiation techniques, and then the residuals of the heat conduction partial differential equation are solved. The partial differential equation for heat conduction includes source terms caused by the latent heat of phase change, which are used to describe the thermodynamic behavior of molten metal during solidification in the casting process; The residual calculation covers randomly distributed configuration points throughout the entire mold domain, and the physical constraint loss term is constructed in the form of mean square error.

5. The method for controlling the casting temperature of sacrificial anodes based on multiple sensors according to claim 4, characterized in that, In step S2, the input data preprocessing of the physical information neural network includes: The spatiotemporal coordinates in the multi-source feature tensor obtained in step S1 are concatenated with the aggregated features, and a Fourier feature embedding transformation is applied to map the original input to a high-dimensional frequency space. The parameters of the Fourier feature embedding transform are obtained through random initialization or training, which are used to enhance the network's ability to capture high-frequency components of the temperature field.

6. The method for controlling the casting temperature of sacrificial anodes based on multiple sensors according to claim 5, characterized in that, In step S3, the construction of the multi-objective loss function and the dynamic weight adjustment mechanism specifically include: The data fitting loss term is calculated based on the multi-source feature tensor in step S1. This loss term measures the difference between the predicted temperature and the actual temperature measured by the sensor. Meanwhile, based on the physical constraint residual loss term from step S2, this loss term characterizes the degree to which the predicted temperature field satisfies the partial differential equation of heat conduction. A dynamic weight adjustment mechanism is adopted. Based on the numerical ratio and gradient norm of the data fitting loss term and the physical constraint loss term during the training process, the adaptive weight coefficients of the two are calculated in real time. The weighted sum is then used to form a comprehensive loss function to optimize the parameters of the physical information neural network. The weight coefficients dynamically decay as the number of training iterations increases, ensuring that data fitting is the primary focus in the early stages of training and physical constraints are strengthened in the later stages.

7. The method for controlling the casting temperature of sacrificial anodes based on multiple sensors according to claim 6, characterized in that, In step S3, the specific implementation of the dynamic weight adjustment mechanism includes: Construct a lightweight meta-learner that takes the ratio of the data fitting loss term to the physical constraint loss term and the gradient norm ratio as inputs, and outputs the weight adjustment amount. The weight adjustment amount is added to the initial weight based on exponential decay, and then normalized to obtain the final weight. The parameters of the meta-learner are updated synchronously with the parameters of the physical information neural network to form a closed-loop optimization, thereby suppressing training instability caused by sudden changes in the magnitude of loss.

8. The method for controlling the casting temperature of sacrificial anodes based on multiple sensors according to claim 7, characterized in that, In step S4, the temperature field reconstruction and uncertainty quantification specifically include: The discrete spatiotemporal coordinates of the entire mold domain are input into the physical information neural network optimized in step S3, and forward propagation calculation is performed to obtain the complete distribution data of the three-dimensional temperature field. Meanwhile, Monte Carlo Dropout technology is used to make multiple random predictions. Based on the multiple prediction results of each spatial point, the mean and quantile difference of the temperature prediction are calculated to quantify the uncertainty of the temperature field prediction. The quantile difference metric is obtained by calculating the difference between a predetermined higher quantile and a predetermined lower quantile, and is used to characterize the dispersion of the predicted values.

9. The method for controlling the casting temperature of sacrificial anodes based on multiple sensors according to claim 8, characterized in that, In step S4, the results of uncertainty quantification are further used for dynamic risk warning: A comprehensive risk index is constructed based on the product of uncertainty measure and temperature field spatial gradient; When the comprehensive risk index exceeds the preset threshold, a defect risk warning signal is generated; The preset threshold is determined based on historical quality data of the casting process.

10. A multi-sensor-based sacrificial anode casting temperature control system is applied to the multi-sensor-based sacrificial anode casting temperature control method as described in any one of claims 1-9, characterized in that, Specifically, it includes: The system comprises a multi-source spatiotemporal alignment and feature encoding module, a physically constrained temperature field prediction module, a multi-objective dynamic optimization module, and a temperature field reconstruction and uncertainty quantification module, among which; The multi-source spatiotemporal alignment and feature encoding module, in response to the start of the sacrificial anode casting process, collects raw data generated by various sensors deployed in different feature areas of the mold. The raw data includes temperature, pressure, and flow rate parameters, and their time series and spatial coordinates differ. The module performs time resampling on the raw data to unify the timestamp sequence, performs spatial coordinate registration based on the three-dimensional computer-aided design model of the mold, and performs feature encoding processing on non-temperature parameters to output spatiotemporally aligned multi-source feature tensors. The physical constraint temperature field prediction module inputs the multi-source feature tensor obtained by the multi-source spatiotemporal alignment and feature encoding module into a predefined physical information neural network. This physical information neural network receives spatial coordinates and time variables as input and outputs the predicted temperature of each point inside the mold. The training process of the physical information neural network is subject to the physical constraints of the heat conduction partial differential equation. The residual loss of the network's predicted temperature to the physical equation is calculated through automatic differentiation technology. The multi-objective dynamic optimization module constructs a multi-objective loss function that includes data fitting loss and physical constraint loss terms, based on the multi-source feature tensor of the multi-source spatiotemporal alignment and feature encoding module and the predicted temperature and physical constraint residual loss obtained from the physical constraint temperature field prediction module. A dynamic weight adjustment mechanism is adopted to calculate the adaptive weight coefficients of the data fitting loss term and the physical constraint loss term according to the real-time state during the training process, forming a comprehensive loss function and optimizing the parameters of the physical information neural network. The temperature field reconstruction and uncertainty quantification module inputs the discrete spatiotemporal coordinates of the entire mold domain into the physical information neural network optimized by the multi-objective dynamic optimization module, performs forward propagation calculations, and obtains complete distribution data of the three-dimensional temperature field. At the same time, Monte Carlo Dropout technology is used to perform multiple random predictions, calculate the mean and standard deviation of the temperature prediction at each spatial point, and quantify the uncertainty of the temperature field prediction.