A method and apparatus for predicting the state of a phase change fluid dosing system
By constructing a deep neural network prediction model and multi-scale modeling, the problems of control accuracy and response lag in phase change fluid transport systems are solved, achieving high-precision system state prediction and safety redundancy design, improving oxygen utilization and equipment safety, and supporting multi-scenario applicability and human-machine collaborative control.
Patent Information
- Application Number
- CN202511811577.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-03-31
- Estimated Expiration
- 2045-12-04
AI Technical Summary
Existing phase change fluid transport systems suffer from low control precision, slow response, and lack of predictive capabilities. They cannot effectively adapt to dynamic load changes and lack safety redundancy design and human-machine interaction, resulting in low oxygen utilization, high risk of equipment damage, and unstable propellant supply.
A prediction model based on deep neural networks is constructed, which combines physical system simulation and historical data to perform multi-scale modeling. Dynamic quantile filtering and adaptive weighted loss function are used to achieve real-time data cleaning and prediction. Fault alarm and manual control switching mechanisms are also provided.
It achieves high-precision system status prediction, improves oxygen utilization and equipment safety, reduces response lag risk, and supports multi-scenario applicability and human-machine collaborative control.
Smart Images

Figure CN121257411B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of industrial automation and Internet of Things (IoT) technology, and in particular to a method and apparatus for predicting the state of a phase change fluid quantitative delivery system. Background Technology
[0002] Phase change fluid quantitative delivery technology is a core technology in high-end equipment fields such as medical oxygen supply, aerospace propulsion, and fuel cells. The liquid oxygen, liquid hydrogen, and other media delivered in these systems undergo complex phase transitions during the process, involving nonlinear dynamic processes such as multiphase flow, heat transfer, and mass transfer. Precise control of these media has always been a challenge and a key focus in the field of industrial automation.
[0003] In the field of medical oxygen supply, especially in critical medical settings such as operating rooms and intensive care units, the stability and accuracy of oxygen supply are directly related to patient safety. Currently, most medical oxygen supply systems still use threshold-based start-stop control or conventional PID control. These traditional control methods have significant technical limitations: First, the control precision is limited and cannot effectively adapt to the dynamic changes in load caused by patients' respiratory demands, resulting in oxygen utilization rates typically below 70%; second, the strong endothermic effect of liquid oxygen during vaporization can easily lead to frost or even ice blockage on the outer walls of the delivery pipeline, affecting heat transfer efficiency and potentially causing equipment damage and safety risks; furthermore, when a patient's oxygen consumption suddenly increases, the system needs to quickly adjust the heating power, but traditional control methods, due to their inherent response lag, often require several minutes to re-establish a stable state, which is unacceptable in real clinical environments.
[0004] In the aerospace field, propellant loading and supply systems face even more severe technical challenges. Cryogenic propellants such as liquid hydrogen and liquid oxygen are highly susceptible to complex phenomena such as cavitation and two-phase flow during transport. Traditional physical model-based control methods often perform poorly in the face of extreme operating conditions and drastic changes in multiphase flow. Existing control systems mostly rely on high-precision sensors for real-time feedback, but in the event of sensor failure or data anomalies, the system lacks effective fault tolerance mechanisms and state prediction capabilities, which may lead to propellant supply fluctuations or even mission failure.
[0005] In recent years, with the development of artificial intelligence technology, some studies have attempted to introduce data-driven methods into fluid control systems. However, these existing intelligent control schemes still have significant shortcomings: First, the models are poorly adaptable to the dynamic operating conditions of the system and struggle to effectively handle the strong nonlinear characteristics caused by medium phase changes and equipment switching; second, they lack robust cleaning mechanisms for real-time operating data, and abnormal data can easily lead to the accumulation of prediction biases; third, most existing schemes remain at the algorithm level and fail to build a complete hardware and software co-engineering architecture, lacking system-level solutions that deeply integrate prediction models with real-time control and human-machine interaction; most importantly, when the prediction results deviate significantly from the actual state, there is a lack of effective safety redundancy design and manual intervention mechanisms.
[0006] Furthermore, existing digital twin technologies have significant limitations in multi-scale modeling. Most systems only reach the level of geometric modeling or simple physical modeling, failing to achieve an organic integration of physical models and data-driven models. This results in a significant "model gap" between the digital twin and the actual system, making it difficult to support accurate state prediction and fault early warning. Therefore, developing a prediction method for phase change fluid quantitative delivery systems with high-precision prediction capabilities, strong robustness, support for real-time interaction, and multiple safety guarantees has become an urgent industry need, and this is the core technical problem that this invention aims to solve. Summary of the Invention
[0007] To address the shortcomings of existing phase change fluid delivery systems, such as low control accuracy, slow response, and lack of predictive capabilities, this invention proposes a method and apparatus for predicting the state of a quantitative phase change fluid delivery system. This method and apparatus can accurately predict the system state and enable fault diagnosis and decision support. It is applicable to scenarios requiring precise control of phase change fluid flow rates, such as medical gas supply, fuel cells, and aerospace propulsion systems. The specific technical solution is as follows:
[0008] A method for predicting the state of a phase change fluid quantitative transport system includes:
[0009] Step 1: Based on the actual physical system, construct a system simulation model, perform system simulation on the operation mode under different working conditions, and obtain training samples by combining historical operation data.
[0010] Step 2: Based on the deep neural network and the training samples, a deep learning prediction model is trained.
[0011] Step 3: Acquire the actual operating data of the phase change fluid quantitative delivery system in real time, and input the actual operating data into the deep learning prediction model to generate the predicted state data of the system;
[0012] Step four: Monitor the deviation between the actual operating data and the predicted state data. When the deviation exceeds a preset deviation threshold, trigger a fault alarm and switch the system from automatic to manual control mode.
[0013] Furthermore, the training samples and actual operating data are preprocessed, specifically as follows:
[0014] First, a dynamic quantile filtering method is used to clean the data in order to filter out outliers;
[0015] Secondly, quartiles are used for scaling to standardize the data.
[0016] Furthermore, in step one, all core components of the phase change fluid transport system are modeled and parameterized. The core components mainly include a storage tank, an electric heater, a first solenoid valve, a vaporizer, a superheater, a second solenoid valve connected in sequence, and a pipeline system connecting the above components.
[0017] The Latin hypercube sampling method is used to generate the input variable combinations of the system simulation model under different operating conditions.
[0018] Furthermore, the deep learning prediction model includes an input layer, a deep core module, and an output layer;
[0019] The input layer is used to receive three-dimensional input features including tank pressure, the opening degree of the first solenoid valve, and the opening degree of the second solenoid valve.
[0020] The deep core module is composed of at least four hidden layers stacked together;
[0021] The output layer is used to output five-dimensional output status parameters, including the pressure of the first solenoid valve, the pressure of the second solenoid valve, the power of the vaporizer, the power of the superheater, and the total outlet flow of the system.
[0022] Furthermore, all four hidden layers are fully connected layers, and each hidden layer contains a linear transformation layer, a batch normalization layer, and a random deactivation layer. The fully connected layers use the Swish activation function, and the deactivation rate of the random deactivation layer is set to 0.4.
[0023] Furthermore, the training of the deep learning prediction model adopts an adaptive weighted loss function, and in the adaptive weighted loss function, the loss weights of the total system outlet flow and the second solenoid valve pressure in the five-dimensional output state parameters are set to three times the loss weights of the other output state parameters.
[0024] Furthermore, the training of the deep learning prediction model also employs the Adam optimizer, which combines the momentum method and the RMSProp adaptive learning rate optimization algorithm.
[0025] Furthermore, in step three, the predicted state data of the system is also generated based on the device states of the first and second solenoid valves in the system, using a state switching prediction mode. The specific judgment logic of this prediction mode is as follows:
[0026] Shutdown mode: When the opening degree of the first solenoid valve is zero, the output values of all predicted state parameters are set to zero;
[0027] Single-path mode: When the opening degree of the second solenoid valve is zero and the opening degree of the first solenoid valve is greater than zero, only the pressure parameters associated with the first solenoid valve are predicted.
[0028] Full circuit mode: When the opening degree of both the first solenoid valve and the second solenoid valve is greater than zero, predict the state parameters of all components.
[0029] Furthermore, in step four, the deviation is measured using the mean absolute percentage error, and the instantaneous deviation is smoothed using a moving average filter.
[0030] A state prediction device for a phase change fluid quantitative delivery system, comprising:
[0031] The data acquisition module is used to acquire the actual operating data of the system in real time;
[0032] The simulation module establishes a system simulation model based on the actual physical system and performs system simulations on operating modes under different working conditions, combining historical system operation data to obtain training samples.
[0033] The model training module is configured to train a deep learning prediction model based on the training samples.
[0034] The state prediction module is configured to input the actual operating data acquired by the data acquisition module into the deep learning prediction model to generate the predicted state data of the system.
[0035] The monitoring switching module is configured to monitor the deviation between the actual operating data and the predicted state data, and switch the system control mode to manual control mode when the deviation exceeds a preset deviation threshold.
[0036] The beneficial effects of this invention are as follows:
[0037] 1. Significantly improved system prediction accuracy: Based on multi-scale modeling technology, a digital twin is constructed that integrates physical model and data-driven model. A deep neural network with batch standardization and random deactivation layers is used, combined with dynamic quantile filtering data cleaning, which improves the prediction accuracy of key parameters such as flow rate and pressure to R²≥ 0.98.
[0038] 2. Adaptive control capability: By automatically switching the prediction mode according to the equipment status, the system can intelligently select the prediction strategy based on status parameters such as the opening degree of the solenoid valve, so as to greatly improve the prediction accuracy and efficiency.
[0039] 3. Early warning and safety protection: When the deviation between real-time monitoring data and prediction results exceeds the set threshold, the system will immediately issue a fault alarm and can switch to manual control mode to realize closed-loop safety management of "prediction-monitoring-intervention" and significantly reduce the risk of system operation.
[0040] 4. Human-machine collaborative control efficiency optimization: It integrates visual trend display, PID parameter self-tuning and manual overlay control functions, supports real-time recording and analysis of operating data, greatly reduces the technical threshold of operation, and improves the efficiency of system debugging and maintenance.
[0041] 5. Multi-scenario applicability and system compatibility: Adopting a modular design, it supports interface with hardware platforms such as PLCs and microcontrollers of different brands through standard communication protocols, and can be flexibly applied to various high-precision fluid control scenarios such as medical oxygen supply, aerospace propulsion, and fuel cells. Attached Figure Description
[0042] Figure 1 This is a schematic flowchart of a state prediction method for a phase change fluid quantitative delivery system according to an embodiment of the present invention;
[0043] Figure 2 This is a schematic diagram of the structure of a phase change fluid quantitative delivery system according to an embodiment of the present invention;
[0044] Figure 3 This is a schematic diagram of the working process of state prediction for a phase change fluid quantitative delivery system according to an embodiment of the present invention;
[0045] Figure 4 This is an R-squared of a prediction model according to an embodiment of the present invention, which quantifies its five output results.
[0046] Figure 5 This is a system interface diagram of a human-computer interaction module according to an embodiment of the present invention. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0048] This embodiment provides a prediction method for a phase change fluid quantitative transport system based on digital twin technology. By constructing a prediction system consisting of a high-fidelity physical simulation model, a data-driven deep learning prediction model, and a real-time data interaction module, it is possible to accurately predict the key physical states during the phase change fluid transport process online. This method solves the problems of poor control performance and safety risks caused by inaccurate models and response lags in traditional control strategies. It achieves the beneficial effects of providing operators with fault warnings and auxiliary decision support by predicting system state change trends in advance, and laying the foundation for optimized system control.
[0049] like Figure 1 As shown, the prediction method flow of this embodiment of the invention can be divided into an offline modeling stage and an online prediction stage.
[0050] The offline modeling phase includes:
[0051] Step 1: Based on the actual physical system, construct a system simulation model, perform system simulation on the operation mode under different working conditions, and obtain training samples by combining historical operation data.
[0052] This step involves constructing a high-fidelity simulation model capable of accurately reproducing the dynamic characteristics of the physical system. This model serves as the data source for training subsequent deep learning models, and its accuracy directly determines the performance of the final prediction model. In a specific embodiment, the construction of this system simulation model is performed using commercial thermo-fluid system simulation software such as Flomaster. It is understood that this process is not a simple black-box simulation, but rather a refined mathematical modeling and parameterization of each physical component in the system based on the first principles of fluid mechanics and thermodynamics. Specifically, it includes the following sub-steps:
[0053] Step 1.1: Physical component modeling and parameterization, as detailed below.
[0054] The simulation model includes a mathematical description of all the core components of the entire phase change fluid transport system. For example... Figure 2 As shown, these components mainly include a storage tank 1, an electric heater 2, a first solenoid valve 3, a second solenoid valve 4, a vaporizer 5, a superheater 6, and a piping system connecting these components.
[0055] First, tank 1 is modeled. The tank is abstracted as a pressure vessel with constant or variable volume. The core of its model is the equations of mass conservation and energy conservation. The model requires input of the tank's geometric parameters, such as volume, height, and diameter; material properties, such as the thermal conductivity and specific heat capacity of the tank wall material; and the heat exchange coefficient with the external environment. Some of these parameters come from the equipment design manual, while others, such as the heat exchange coefficient, need to be calibrated and identified based on historical operating data, such as ambient temperature and the rate of temperature change inside the tank, to ensure that the model accurately reflects the actual heat leakage effect.
[0056] For example, the volume of storage tank 1 can be set to The material is 304 stainless steel, and its thermal conductivity is... Assuming the storage tank is cylindrical with a diameter of... ,high The combined convective and radiative heat transfer coefficient with the external environment. It can be fitted through experimental data; for example, it can be set to... The precise setting of these parameters is crucial to ensuring that the simulation model can accurately simulate the phenomenon of self-pressurization of fluid pressure inside the tank due to the transfer of heat from the environment.
[0057] Secondly, the pipeline system is modeled. The flow in the pipeline is modeled as a one-dimensional two-phase flow. The model is based on one-dimensional continuity, momentum, and energy equations. Key parameters include the pipe's inner diameter, length, wall thickness, and absolute material roughness. Frictional pressure drop and gravitational pressure drop must be considered in the momentum equation. Frictional pressure drop is calculated using friction coefficient formulas applicable to the entire flow regime, such as those from Churchill or Colebrook-White. Calculating the pressure drop in two-phase flow is more complex, requiring the introduction of a two-phase flow model, such as a homogeneous equilibrium model or a more accurate phase-separated flow model (such as the Lockhart-Martinelli method), and consideration of the effects of interphase slip.
[0058] For example, the inner diameter of the main pipeline from storage tank 1 to vaporizer 5 can be set to... ,length The material is 304 stainless steel, and its absolute roughness is... According to the Reynolds number and relative roughness The simulation software will automatically calculate the Fanning coefficient of friction. For the flow of liquid oxygen (LOX) in pipelines, when a phase change occurs, the fluid's density, viscosity, and other physical properties will change drastically. The simulation model must be able to call upon accurate physical property databases, such as NIST REFPROP, to query the physical property parameters under the current temperature and pressure in real time.
[0059] Next, the valve assembly is modeled. The valve is modeled as a variable throttling resistance element. Its core parameter is the flow coefficient. This coefficient characterizes the valve's flow capacity when fully open. The valve's flow characteristic curve, i.e., the relationship between opening degree and flow coefficient, such as linear or equal percentage, must also be accurately input. The model simulates its throttling effect by solving the functional relationship between the pressure drop before and after the valve and the flow rate through the valve.
[0060] For example, such as Figure 2 In the middle, the flow coefficient of the first solenoid valve 3 It can be set to 1.5, and its flow characteristic is quick-opening. The flow coefficient of the second solenoid valve 4... It can be set to 2.5, and its flow characteristic is linear. In the simulation, the valve opening, such as 0% to 100%, is used as an input variable. The simulator will calculate the current flow coefficient in real time based on this opening and the valve characteristic curve. And substitute it into the simplified form of the flow equation Perform the calculation.
[0061] Finally, the heat exchange equipment is modeled. This equipment is modeled as forced convection heat exchangers. The core of the model is the energy balance equation and the heat transfer equation. Where P is the heating power, It is quality flow. U is the enthalpy increase at the fluid inlet and outlet, U is the overall heat transfer coefficient, and A is the heat transfer area. It is the logarithmic mean temperature difference. The calculation of the overall heat transfer coefficient U requires comprehensive consideration of the convective heat transfer coefficient of the fluid inside the pipe, the thermal conductivity of the pipe wall, and the heat transfer coefficient outside the pipe. In particular, for phase change heat transfer, the convective heat transfer coefficient is much higher than that of single-phase flow, and the model must use special boiling heat transfer or condensation heat transfer correlations for calculation.
[0062] For example, the heating power of the vaporizer 5 It is an adjustable input, ranging from 0-10kW. Its heat exchange area... The simulation model needs to be based on the input mass flow rate. and inlet fluid state and heating power The dryness or temperature of the outlet fluid is calculated, and the inlet fluid is typically a saturated liquid. Similarly, the superheater 6 further heats the saturated steam to a superheated state. Its model is similar to that of the vaporizer, but it handles the heat exchange process of single-phase steam.
[0063] Step 1.2: Multi-condition simulation and training sample generation, as detailed below:
[0064] After model building and parameterization are completed, multi-condition simulations are performed to generate training samples covering the entire operating envelope of the system. This step employs the Design of Experiments (DoE) method, systematically changing the model's input variables and recording the corresponding output variables.
[0065] Input variables, i.e. operating conditions, mainly include:
[0066] The initial pressure of storage tank 1, in an example range: 1.0 MPa - 2.0 MPa;
[0067] The opening degree of the first solenoid valve 3 is 0%-100%.
[0068] The second solenoid valve has an opening range of 0%-100% and a power rating of 0kW-10kW.
[0069] Heating power of vaporizer 5, range: 0 kW - 10 kW;
[0070] The heating power of superheater 6 ranges from 0 kW to 5 kW.
[0071] Ambient temperature, range: -10℃ to 40℃.
[0072] To efficiently explore the high-dimensional parameter space, Latin Hypercube Sampling (LHS) is employed to generate combinations of input variables. Compared to grid search, LHS achieves better space-filling results with fewer sample points. For example, it can generate 5000 different combinations of operating parameters.
[0073] For each set of operating parameters, a dynamic simulation is performed. The simulation starts from a steady-state initial condition, and then one or more input parameters are changed by a step or ramp. The simulation process lasts for a period of time, such as 600 seconds, and all system state variables of interest are recorded at a high sampling frequency, such as 10 Hz.
[0074] The output variables, i.e. the simulation results, include: inlet pressure of the first solenoid valve 3, inlet pressure of the second solenoid valve 4, outlet temperature of the vaporizer 5, outlet temperature of the superheater 6, and total outlet flow rate of the system.
[0075] By executing these 5000 simulations, a massive time-series dataset can be obtained. Each row of this dataset represents a snapshot of the system at a given time point, containing the control inputs and system state outputs at that time, forming the training samples required for training the deep learning model. For example, if each simulation generates 6000 data points, the total sample size will reach [number missing]. These massive amounts of high-quality simulation data form the basis for training high-precision prediction models.
[0076] Step 2: Build a deep neural network model and train it based on the training samples to obtain a deep learning prediction model.
[0077] The core of this step lies in using the massive dataset generated in S100 to train a neural network model that can accurately fit the nonlinear mapping relationship between the system's input and output through deep learning techniques. This process includes sub-steps such as data preprocessing, model architecture design, loss function definition, and model training optimization. Details are as follows:
[0078] Step 2.1: Data preprocessing, as follows.
[0079] Before use, raw simulation data or subsequent real-world data must undergo rigorous preprocessing to improve model training efficiency and final prediction performance. Preprocessing mainly includes data cleaning and data standardization.
[0080] First, data cleaning is performed. This embodiment employs a dynamic quantile filtering method. This method is particularly suitable for processing transient noise or sensor spikes in time series data. The principle is to set a sliding window, for example, with a window size of 100 data points. For each of the 100 data points within the window, its 5th percentile Q is calculated. 0.05 and the 95th percentile Q 0.95 Then, iterate through each data point in the window, and if the value of a data point is less than Q... 0.05 or greater than Q 0.95 If the value is not found in the mean, then that point is considered an outlier. For detected outliers, the median within the window can be used for replacement, which is less sensitive to outliers than mean replacement.
[0081] For example, suppose that at a certain moment, the data sequence collected by the flow sensor within a window is [..., 50.1, 50.2, 85.3, 50.4, 49.9, ...] (unit: L / min). Here, 85.3 is a distinct spike. The window size is 50, and the Q of this window is calculated. 0.05 ≈49.5, Q 0.95≈51.0. Since 85.3 > 51.0, this point is identified as an anomaly. Assuming the median within the window is 50.3, then 85.3 will be replaced with 50.3. This dynamic filtering process continues as the window slides across the entire time series, effectively cleansing the data.
[0082] Secondly, data standardization is performed. Because the model's input characteristics, such as pressure (MPa) and valve opening (%), and output characteristics, such as power (kW) and flow rate (L / min), have different physical dimensions and numerical ranges, directly inputting them into the model can lead to slow or unstable convergence of the gradient descent process. Therefore, data standardization is necessary. This embodiment uses robust scaling (RobustScaler) because it uses quartiles for scaling and is insensitive to outliers in the data. Its standardization formula is:
[0083] ,
[0084] in, These are the original data points. These are the standardized data points. Q1 is the 25th percentile (lower quartile) of all training samples for this feature, and Q3 is the 75th percentile (upper quartile). All features are scaled to a roughly similar range, reducing the impact of extreme values. The Q1 and Q3 values calculated during the standardization process need to be saved because in the subsequent online prediction phase, the real-time collected data needs to be standardized using the same parameters, and the model's prediction output also needs to be de-standardized using these parameters to restore its original physical meaning.
[0085] For example, assume that the tank pressure characteristics in all training samples are Q1=1.2 MPa and Q3=1.8 MPa. When a real-time acquired pressure value is X... realtime When the pressure is 1.5 MPa, its standardized input value is:
[0086] .
[0087] The above steps identify and filter out instantaneous outliers by dynamically calculating the quantile boundaries of the data within a sliding time window. This solves the problem that noise or glitches in the original sensor data may interfere with the accuracy of model prediction, thus achieving the beneficial effects of improving the quality of input data and enhancing the robustness of model prediction.
[0088] Step 2.2: Deep learning prediction model architecture design and training. The model is constructed using a deep neural network (DNN), as detailed below:
[0089] Step 2.2.1: Model macro architecture and data flow.
[0090] The model is defined as a multiple-input multiple-output (MIMO) feedforward neural network. Its macroscopic architecture consists of an input layer, a deep core module composed of multiple hidden layers, and an output layer.
[0091] The data flow is clear and unambiguous: the three-dimensional feature vectors related to system control are sent to the input layer, undergo layer-by-layer nonlinear transformation and feature extraction by the deep core module, and are finally mapped by the output layer into a five-dimensional parameter vector representing the system's operating state.
[0092] Step 2.2.2: Deconstructive description of each level of the model, as follows.
[0093] The input layer has a tensor shape of (N, 3), where N is the batch size and 3 is the feature dimension. These three features are strictly defined as: tank pressure (MPa), opening degree of the first solenoid valve 3 (%), and opening degree of the second solenoid valve 4 (%).
[0094] For example, a specific input sample vector can be These represent the tank pressure as 1.65 MPa, the opening degree of the first solenoid valve 3 as 75%, and the opening degree of the second solenoid valve 4 as 50%.
[0095] The deep core module consists of at least four fully connected layers stacked together, forming the core computational part of the model. In this embodiment, the network structure is designed as Input(3) -> FC(256) -> FC(512) -> FC(256) -> FC(128) -> Output(5). Each layer includes operations such as linear transformation, batch normalization, activation function, and random deactivation.
[0096] Taking the first hidden layer (FC(256)) as an example, the deconstruction process includes the following steps:
[0097] a. Input tensor definition: The shape of the input tensor for this layer is (N, 3).
[0098] b. Core processing and parameterization, specifically:
[0099] Linear transformation: Perform matrix multiplication Z = X·W T +b. Here, X is the input tensor (shape (N, 3)), W is the weight matrix of this layer with shape (256, 3), and b is the bias vector with shape (256,). This operation linearly maps 3D input features to a 256-dimensional space. The weights W and biases b are the parameters the model needs to learn.
[0100] Batch Normalization: This operation performs batch normalization on the output Z of the linear transformation. In each training batch, the mean and variance of Z along the channel dimension are calculated and used to normalize Z. This can accelerate model convergence and provides a degree of regularization, making the model less sensitive to weight initialization.
[0101] Swish activation function: The standardized result is input into the Swish activation function. The Swish function is defined as follows: Compared to the commonly used ReLU function, the Swish function is smooth and non-monotonic in the negative region, a characteristic that has proven to provide better performance in some deep networks. Parameters It is usually set to 1.
[0102] For example, if the output value of a neuron after batch standardization is a = -1.5, then the value after Swish activation is... .
[0103] Random dropout: During forward propagation, at a preset dropout rate p=0.4, 40% of the neurons in the output of the activated layer are randomly set to zero, while the values of the remaining neurons are amplified by a factor of 1 / (1-p) to maintain the expected total activation value. This operation is performed only during the training phase and effectively prevents co-adaptation between neurons, making it a powerful technique for suppressing model overfitting.
[0104] c. Output Tensor Definition: After the complete processing of the first hidden layer, the output tensor has a shape of (N, 256). This tensor will be used as the input of the second hidden layer (FC(512)) to repeat the above-described processing flow.
[0105] The output layer is a linear fully connected layer. Because it's a regression problem, it doesn't have an activation function. Its output tensor has a shape of (N, 5). These five output dimensions are strictly defined as: pressure of the first solenoid valve (MPa), pressure of the second solenoid valve (MPa), power of the vaporizer (kW), power of the superheater (kW), and total system outlet flow rate (L / min).
[0106] For example, for the above input sample One possible predicted output vector of the model (after destandardization) is .
[0107] Step 2.2.3: Design the loss function and optimizer for model training.
[0108] To ensure the model training process focuses more on parameters crucial to system control, this embodiment employs an adaptive weighted loss function. This loss function is based on Mean Squared Error (MSE), but assigns different weights to the MSE of different output parameters. The expression for this loss function is as follows:
[0109] ,
[0110] Where y is the actual value, Y is the model prediction value, i iterates through 5 output dimensions, and j iterates through N samples in the batch. Based on experience, the total system outlet flow and the pressure of the second solenoid valve 4 are key control indicators, requiring the highest prediction accuracy. Therefore, their weights... It is set to a higher value than the other parameters.
[0111] For example, weight vector It can be set to These correspond to the pressure of the first solenoid valve 3, the pressure of the second solenoid valve 4, the vaporizer power, the superheater power, and the flow rate loss, respectively. This means that when calculating the gradient through backpropagation, the error gradient generated by the pressure and flow rate of the second solenoid valve 4 will be amplified by a factor of 3, thus forcing the model to prioritize the optimization of the predictions for these two key parameters.
[0112] The model was trained using the Adam optimizer, an adaptive learning rate optimization algorithm that combines momentum and RMSProp principles. The initial learning rate was set to 0.001. The model was trained multiple times on the training set until the loss on the validation set no longer decreased significantly, at which point the model parameters were saved.
[0113] The online prediction phase includes:
[0114] Step 3: Acquire the actual operating data of the phase change fluid quantitative delivery system in real time, and input the actual operating data into the deep learning prediction model to generate the predicted state data of the system.
[0115] This step describes how to deploy the trained model in a real-world industrial environment for online prediction. Specifically, it includes the following sub-steps:
[0116] Step 3.1: Real-time data acquisition and interaction, as detailed below:
[0117] The system's real-time operating data is acquired through a data acquisition module, which physically consists of sensors installed throughout the system. The analog signals from these sensors are fed into the analog input module of a programmable logic controller (PLC). After processing by its internal program, the PLC stores these physical quantities, such as tank pressure, valve opening feedback, and temperature, in its registers.
[0118] A prediction program runs on the host computer or edge computing device 12, which interacts with the PLC through a communication module. This communication can use an industrial Ethernet protocol, such as Modbus TCP. The host computer, acting as a client, sends read requests to the PLC, which acts as a server, at a fixed frequency, such as 10 Hz, to read the register addresses that store input characteristics such as tank pressure, the opening degree of the first solenoid valve 3, and the opening degree of the second solenoid valve 4.
[0119] For example, the host computer program constructs a Modbus TCP message requesting to read three consecutive registers starting at address 40001. Upon receiving the request, the PLC returns the values of these registers. The host computer parses the message to obtain the raw integer data and converts it into a floating-point number with physical units according to a preset range; for example, converting the integer value 32767 back to a pressure of 2.0 MPa.
[0120] Step 3.2: Online prediction execution, as detailed below:
[0121] After the host computer obtains the real-time data, it immediately executes the online prediction process.
[0122] First, the acquired real-time 3D input vectors—tank pressure, first solenoid valve 3 opening degree, and second solenoid valve 4 opening degree—are preprocessed. This includes standardizing the data using the same robust normalizer as in the training phase, i.e., the same Q1 and Q3 values.
[0123] Then, the standardized input vector is fed into the loaded deep learning prediction model. Before executing the model's forward propagation, a crucial logical judgment module is entered: the state switching prediction mode. This mode intelligently selects the prediction strategy based on the system's macroscopic operating state to significantly improve prediction accuracy and efficiency. Its logic is as follows:
[0124] Rule 1: Shutdown Mode. The program first checks the opening of the first solenoid valve 3. If the opening is 0% or below a very small threshold, such as 1%, it indicates that the main circuit is shut off, and there should be no flow in the entire downstream system. In this case, the program will directly bypass the neural network calculation and force the output to be a five-dimensional vector of all zeros [0, 0, 0, 0, 0]. This avoids the small perturbations that the model may produce in the prediction near zero input, ensuring the physical meaning of the result.
[0125] Rule 2: Single-path mode. If the opening of the first solenoid valve 3 is greater than 0%, the program then checks the opening of the second solenoid valve 4. If the opening of the second solenoid valve 4 is 0%, it means the system is only operating through the first path via the first solenoid valve 3. Under this specific condition, parameters related to the second path, such as the pressure of the second solenoid valve 4, should be zero or close to a fixed value. To improve accuracy, a simpler first prediction sub-model specifically trained for single-path mode can be invoked. This model may only predict parameters related to the first path, such as the pressure and flow rate of the first solenoid valve 3, while other outputs are set to fixed values or zero.
[0126] Rule 3: Full-Circuit Mode. If the opening degree of both the first solenoid valve 3 and the second solenoid valve 4 is greater than 0%, it indicates that the system is in a complex operating condition of dual-path parallel or serial operation. In this case, the program calls the trained, complete, and global deep learning prediction model to predict all five-dimensional state parameters.
[0127] In summary, the predicted state data of the system is generated based on the equipment status of the valve components in the system using a state switching prediction mode. This state switching prediction mode includes: when the opening degree of the first solenoid valve is zero, setting the output values of all predicted state parameters to zero; when the opening degree of the second solenoid valve is zero and the opening degree of the first solenoid valve is greater than zero, invoking the first prediction sub-model to predict only the pressure parameters associated with the first solenoid valve; and when the opening degrees of both the first and second solenoid valves are greater than zero, invoking the global prediction model to predict the state parameters of all components.
[0128] This state-switching prediction model combines domain knowledge with a data-driven model to form a hybrid intelligent system, whose robustness and accuracy far exceed those of a single end-to-end model.
[0129] After passing through the corresponding prediction model, a standardized five-dimensional output vector is obtained. Finally, the output vector is de-standardized using the saved normalizer parameters to restore it to predicted state data with actual physical units.
[0130] Step 4: Monitor the deviation between the actual operating data and the predicted state data. When the deviation exceeds a preset deviation threshold, switch the system's control mode to manual control mode, specifically including the following:
[0131] Step 4.1: Deviation monitoring and evaluation, as follows:
[0132] After obtaining the predicted state data, the predictive program does not immediately use it for control. It simultaneously acquires corresponding actual measured values from the PLC, such as valve pressure measured by pressure sensors 7 and 8, and actual flow rate measured by the flow meter.
[0133] The program then calculates the deviation between the predicted and actual values in real time. This deviation can be measured using various metrics, such as absolute error or relative error. A commonly used metric is the Mean Absolute Percentage Error (MAPE):
[0134] ,
[0135] Where i represents the monitored status parameter, such as flow rate.
[0136] To avoid false alarms caused by noise from single-point measurements, the program usually smooths the calculated instantaneous deviation, for example, by using a moving average filter.
[0137] For example, the program can calculate the moving average of the traffic MAPE value over the past 10 seconds. .
[0138] Step 4.2: Threshold determination and mode switching, as detailed below:
[0139] The program internally sets a preset deviation threshold. This threshold is determined based on the system's safety requirements and control precision needs.
[0140] For example, for the total outflow of the system, its deviation threshold It can be set to 15%.
[0141] The program continuously compares the smoothed deviation with a preset threshold. If If the disturbance persists for a period of time, such as more than 5 seconds, to prevent transient disturbances, the system will determine that the prediction model may have failed or that the system has entered an unknown operating condition that the model has not learned, such as equipment failure or pipeline leakage.
[0142] Once the threshold condition is triggered, the monitoring switch module will immediately perform the following actions:
[0143] Generate an alarm: A prominent fault alarm window pops up on the human-machine interface (HMI), and an audible and visual alarm alerts on-site operators. The alarm message indicates which parameter's prediction deviation is too large.
[0144] Triggering control mode switch: The system automatically forces a switch from "Automatic Mode" to "Manual Control Mode." In this mode, the PLC will no longer accept automatic control commands from the host computer, but will directly respond to valve opening or heater power settings manually entered by the operator on the HMI. This provides the operator with the highest authority to intervene in abnormal situations, ensuring the ultimate safety of the system.
[0145] Through this closed-loop monitoring and switching mechanism, this method not only utilizes the predictive capabilities of deep learning models, but also equips them with reliable safety "guardrails," achieving a balance between intelligence and high reliability.
[0146] This embodiment provides a state prediction device for a phase change fluid quantitative delivery system, which is the physical carrier of the method described in Embodiment 1. Figure 2 and Figure 3 As shown, the device includes physical fluid dynamics equipment in hardware, and integrates multiple functional modules at the software and information level, such as data acquisition, simulation, model training, state prediction, and monitoring switching, forming a typical cyber-physical system, including:
[0147] The data acquisition module consists of various sensors deployed in the physical system, signal conditioning circuits, and the PLC's I / O modules. Specifically, it includes: a pressure sensor 7 installed on storage tank 1; a pressure sensor 8 and a temperature sensor 9 installed upstream of the first solenoid valve 3 and the second solenoid valve 4; a temperature sensor 10 and a pressure sensor 11 installed at the outlets of vaporizer 5 and superheater 6; and a flow meter for measuring the final flow rate. This module is responsible for converting continuous analog signals from the physical world into digital signals, making them accessible to the upper-level system via the communication bus.
[0148] The simulation module, typically deployed on an engineering workstation or server, embeds the high-fidelity thermofluid simulation software, such as Flomaster, and the corresponding system model files from step one. Its function is to perform large-scale simulation calculations offline, based on the engineer's settings, providing high-quality training samples for the model training module.
[0149] The model training module, typically deployed on a server or workstation equipped with a GPU for powerful computing capabilities, includes a deep learning framework such as TensorFlow or PyTorch, along with the scripts described in step two for data preprocessing, model building, training, and evaluation. Its function is to receive data from the simulation module and automate the entire model training process, ultimately generating a deployable, static prediction model file, for example, in .h5 or .pb format. Figure 4The results show a comprehensive evaluation of the model's predictive performance, with quantitative analysis of its five outputs. The results indicate that the coefficients of determination (R²) for all modules are above 0.98, demonstrating extremely high fit and providing a solid quantitative foundation for subsequent analysis and decision-making.
[0150] The state prediction module is deployed on a host computer or edge computing device 12 that communicates in real time with the field PLC. It loads the prediction model file generated by the model training module. Its core function is to execute the online prediction task in step three, including: acquiring real-time data through the data acquisition module, performing preprocessing, executing state switching prediction logic, calling the neural network model for forward propagation calculation, and de-standardizing the results to ultimately generate an accurate prediction of the system's future state.
[0151] The monitoring and switching module, tightly integrated with the status prediction module, is also deployed on the host computer or edge computing device 12. It is responsible for executing the safety monitoring and switching logic in step four. This module continuously compares the output of the status prediction module with the actual measured values of the data acquisition module, calculates the deviation, and compares it with internally set safety thresholds. Once a condition is triggered, it immediately issues an alarm through the human-machine interface and sends a mode switching command to the lower-level PLC, forcing the system into manual control mode, thereby ensuring system safety in extreme situations.
[0152] Human-Computer Interaction (HMI) modules, such as Figure 5 As shown, this module provides the operator with a graphical interface for interacting with the system. It visualizes the predicted values from the status prediction module and the actual values from the data acquisition module as real-time trend graphs, allowing the operator to intuitively monitor the prediction results. It also provides parameter setting windows such as the PID parameter debugging window, a manual / automatic mode switch button, and input interfaces for manual control quantities such as valve opening. When the monitoring switching module triggers an alarm, this module is responsible for presenting the alarm information in the most prominent way.
[0153] In summary, this system, through the collaborative work of its various modules, organically combines the predictive capabilities of deep learning with the reliability requirements of industrial control, forming a complete and intelligent solution for quantitative delivery of phase change fluids.
[0154] While preferred embodiments of the invention have been shown and described above, it should be understood that these embodiments are exemplary and should not be construed as limiting the invention. Those skilled in the art can make various changes, modifications, substitutions, and alterations to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
[0155] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. These modifications or substitutions do not cause the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of this application.
[0156] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0157] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0158] The units described as separate components may or may not be physically separate. A component shown as a unit can be one physical unit or multiple physical units; that is, it can be located in one place or distributed in multiple different places. Depending on actual needs, some or all of the units can be selected to achieve the purpose of this embodiment.
[0159] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit described above can be implemented in hardware.
[0160] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method of predicting the state of a phase change fluid dosing system, characterized by, The application relates to a deep learning prediction model for a phase change fluid quantitative delivery system. Step one: based on an actual physical system, a system simulation model is constructed, the operation mode under different working conditions is simulated, and training samples are obtained by combining historical operation data; In step one, all core components of the phase change fluid delivery system are modeled and parameterized, the core components include a storage tank, an electric heater, a first electromagnetic valve, a vaporizer, a superheater, a second electromagnetic valve connected in sequence, and a pipeline system connecting the above components; a Latin hypercube sampling method is used to generate input variable combinations of the system simulation model under different working conditions; Step two: a deep learning prediction model is trained based on a deep neural network and the training samples; The deep learning prediction model comprises an input layer, a deep core module and an output layer; The input layer is used for receiving three-dimensional input features including storage tank pressure, first electromagnetic valve opening degree and second electromagnetic valve opening degree; The deep core module is stacked by at least four hidden layers; The output layer is used for outputting five-dimensional output state parameters including first electromagnetic valve pressure, second electromagnetic valve pressure, vaporizer power, superheater power and system total outlet flow; Step three: real-time actual operation data of the phase change fluid quantitative delivery system are obtained, and the actual operation data are input into the deep learning prediction model to generate predicted state data of the system; In step three, the predicted state data of the system are also generated based on the equipment states of the first electromagnetic valve and the second electromagnetic valve in the system by using a state switching prediction mode, and the judgment logic of the prediction mode is as follows: Off mode: when the opening degree of the first electromagnetic valve is zero, the output values of all predicted state parameters are zero; Single-path mode: when the opening degree of the second electromagnetic valve is zero and the opening degree of the first electromagnetic valve is greater than zero, only the pressure parameter associated with the first electromagnetic valve is predicted; Full-path mode: when the opening degrees of the first electromagnetic valve and the second electromagnetic valve are both greater than zero, the state parameters of all components are predicted; Step four: the deviation between the actual operation data and the predicted state data is monitored, when the deviation exceeds a preset deviation threshold, a fault alarm is triggered, and the control mode of the system is switched from automatic to manual.
2. The method of claim 1, wherein, The training samples and the actual operation data are preprocessed, specifically: First, dynamic quantile filtering method is used for data cleaning to filter out abnormal values; Second, four quantiles are used for scaling to standardize the data.
3. The method of claim 1, wherein, The at least four hidden layers are all full connection layers, linear transformation layers, batch normalization layers and random inactivation layers are arranged in the hidden layers, the full connection layers adopt Swish activation functions, and the inactivation rate of the random inactivation layers is 0.
4.
4. The method of claim 1, wherein, The training of the deep learning prediction model adopts an adaptive weighted loss function, and in the adaptive weighted loss function, the loss weight of the system total outlet flow and the second electromagnetic valve pressure in the five-dimensional output state parameters is set to be three times the loss weight of other output state parameters.
5. The method of claim 4, wherein, The training of the deep learning prediction model also adopts an Adam optimizer, and the optimizer combines a momentum method and an adaptive learning rate optimization algorithm based on the idea of RMSProp.
6. The method of claim 1, wherein, In step four, the deviation adopts the mean absolute percentage error as a measurement index, and the instantaneous deviation is smoothed by using a moving average filter.
7. A phase change fluid dosing system state prediction device employing the method of any one of claims 1 to 6, characterized by The system comprises: a data acquisition module, configured to acquire actual operation data of the system in real time; an emulation module, configured to establish a system emulation model based on an actual physical system, and to perform system emulation on operation modes under different working conditions, and to obtain training samples in combination with historical operation data of the system; a model training module, configured to train a deep learning prediction model based on the training samples; a state prediction module, configured to input the actual operation data acquired by the data acquisition module into the deep learning prediction model, so as to generate predicted state data of the system; a monitoring switching module, configured to monitor a deviation between the actual operation data and the predicted state data, and to switch a system control mode to a manual control mode when the deviation exceeds a preset deviation threshold.
Citation Information
Patent Citations
Complex industrial system operation monitoring method and system based on digital twinning
CN115857447A
Method, device and system for monitoring running state of fuel injection system based on digital twin model and medium
CN117371313A