Dual-predictive collaborative safety control method and system for energetic material shaping
By constructing a dynamic prediction model for temperature and mass and an adaptive control process, combined with a sliding window mechanism and a large language model, real-time collaborative optimization of safety and quality during the processing of energetic materials was achieved. This solved the problem of balancing safety and quality in traditional control, and improved real-time response speed and control accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA ORDNANCE EQUIP GRP AUTOMATION RES INST CO LTD
- Filing Date
- 2026-02-25
- Publication Date
- 2026-05-26
Smart Images

Figure CN122085679A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent control technology, and more specifically to a dual-prediction collaborative safety control method and system for shaping energetic materials. Background Technology
[0002] Energetic materials, such as explosives and propellants, play an indispensable role in the manufacture of weapons and ammunition in the defense industry and in rocket propulsion systems in the aerospace industry due to their ability to rapidly release large amounts of energy in response to external stimuli. Shaping is a crucial step in the production process of energetic material products, directly affecting the dimensional accuracy and surface quality of the product, thus influencing its performance and reliability. However, the high sensitivity and potential explosive hazards of energetic materials mean that even slight carelessness during machining can trigger unexpected reactions due to cutting heat and forces, leading to serious safety accidents and huge economic losses.
[0003] Current machining control methods mostly employ empirically based static parameter settings or traditional mechanistic model-driven control approaches. These mechanistic models require predefined complex mathematical relationships such as material thermodynamics, making them ill-suited to dynamic changes in operating conditions, such as fluctuations in energetic material properties and tool wear. Furthermore, the prediction accuracy for temperature and mass during machining is insufficient, and the prediction delay is high, failing to meet real-time control requirements. In addition, existing technologies lack temperature-mass co-optimization control strategies, making it difficult to maintain quality stability while ensuring machining safety, specifically manifesting in the following five major pain points:
[0004] 1. The conflict between safety and high precision requirements is prominent. Traditional manual operation and static parameter control cannot balance safety and quality, which can easily lead to thermal runaway or substandard processing accuracy.
[0005] 2. The temperature prediction model does not integrate time-series features, resulting in low prediction accuracy and high inference latency, which cannot provide accurate data support for real-time control.
[0006] 3. Quality assessment relies on manual annotation, which is highly subjective and inconsistent, resulting in insufficient accuracy and weak generalization ability of the prediction model;
[0007] 4. The control method relies on traditional mechanism models, which are difficult to adapt to dynamic working conditions such as fluctuations in material properties and tool wear, resulting in poor flexibility and adaptability;
[0008] 5. Lack of temperature-quality co-optimization strategy, safety control adopts fixed thresholds, cannot dynamically match changes in working conditions, slow emergency response, and difficulty in ensuring continuous safety and stability.
[0009] In summary, existing technologies, based on device-centric architectures, lack efficient, adaptive, and collaborative control strategies and methods. There is an urgent need for an intelligent control scheme that can achieve real-time dual prediction, dynamic optimization, and safe collaboration to overcome safety bottlenecks and quality constraints in the precision processing of energetic materials. Summary of the Invention
[0010] This invention provides a dual-prediction collaborative safety control method for energetic material shaping, which solves the technical problem that it is difficult to optimize safety and processing quality in real time during energetic material shaping.
[0011] This invention is achieved through the following technical solution:
[0012] In a first aspect, this application provides a dual-prediction collaborative safety control method for shaping energetic materials, comprising the following steps:
[0013] Real-time acquisition of multi-source parameters during the shaping and cutting process of energetic materials, including ambient temperature, workpiece geometric parameters, cutting parameters, and historical temperature time series data;
[0014] Based on historical temperature time series data, a sliding window mechanism is used to extract historical temperature time series features, construct a dynamic temperature prediction model, and output the predicted value of the highest cutting temperature.
[0015] Based on manual quality scoring data, a standardized quality dataset is generated through large language model correction, a dynamic quality prediction model is constructed, and a processing quality score is output.
[0016] Input the predicted maximum cutting temperature and the machining quality fraction into the adaptive control process, construct a dynamic linear time-varying model based on real-time monitoring data, and achieve dual-objective collaborative optimization of maximizing quality and temperature safety constraints through a sequential quadratic programming algorithm to generate control parameter adjustment instructions;
[0017] The safety threshold is dynamically adjusted based on the tool wear state and material phase transformation characteristics, and the control parameter adjustment command is executed using a hierarchical response strategy.
[0018] A further optimized solution involves constructing a dynamic temperature prediction model, including the following steps:
[0019] Collect key input data such as ambient temperature, workpiece geometry parameters and cutting parameters, and supplement them with historical average processing temperature as time-series features to form a multidimensional input dataset;
[0020] The multidimensional input dataset is preprocessed, including missing value imputation, data standardization, and time interval threshold filtering, and the preprocessed feature data is output.
[0021] The preprocessed feature data is input into a multilayer perceptron model, which includes a hidden layer and an output layer. The hidden layer uses the ReLU activation function and introduces the Dropout regularization mechanism, while the output layer performs regression prediction of the maximum cutting temperature.
[0022] The multilayer perceptron model is trained using a dynamic learning rate preheating and decay strategy combined with the Adam optimizer. The mean squared error is used as the loss function to optimize the model parameters, and the trained dynamic temperature prediction model is output.
[0023] A further optimized solution involves constructing a dynamic quality prediction model, which includes the following steps:
[0024] Collect key process parameters such as workpiece inner diameter, workpiece outer diameter, spindle speed, feed rate, and depth of cut to form a process parameter dataset;
[0025] The process parameter dataset is input into a large language model for quantitative evaluation and correction, combined with manual quality scoring data, to generate a standardized quality scoring dataset.
[0026] The standardized quality score dataset is input into a multilayer perceptron model, which includes a hidden layer and an output layer. The hidden layer uses the ReLU activation function and introduces the Dropout regularization mechanism. The output layer predicts the processing quality score and outputs the predicted quality value.
[0027] The multilayer perceptron model is trained using a dynamic learning rate warm-up and decay strategy combined with the Adam optimizer. The mean squared error is used as the loss function to optimize the model parameters, and the trained dynamic prediction model is output.
[0028] A further optimized solution involves constructing a dynamic linear time-varying model, specifically including the following steps:
[0029] A sliding time window mechanism is used to cache real-time monitoring data, which includes spindle speed, feed rate, cutting temperature and machining quality indicators, forming a time series dataset.
[0030] Based on the time series dataset, a local linear relationship is fitted in each control cycle to establish a dynamic mapping model between cutting parameters and temperature / quality indicators, and an initial linear time-varying model is output.
[0031] The coefficient matrix of the initial linear time-varying model is updated online using the recursive least squares method, and the model parameters are adjusted in real time to adapt to changes in processing conditions, outputting an optimized dynamic linear time-varying model.
[0032] The optimized dynamic linear time-varying model and real-time monitoring data are updated synchronously. The latest data samples are maintained through a sliding window mechanism, and the dynamically linear time-varying model is output in real time.
[0033] A further optimized solution involves using a sequential quadratic programming algorithm to achieve a dual-objective coordinated optimization of maximizing quality and meeting temperature safety constraints, comprising the following steps:
[0034] Based on the real-time mapping relationship output by the dynamic linear time-varying model, a pseudo gradient vector is calculated, which includes the quality score gradient and the temperature constraint gradient, and the system sensitivity characteristics are output.
[0035] The system sensitivity characteristics are input into a sequential quadratic programming algorithm for iterative solution. Based on the mass maximization objective function and temperature safety constraints, optimization calculations are performed, and control parameter adjustment instructions are output.
[0036] The control parameter adjustment instructions are converted into an instruction format executable by the CNC system. The spindle ratio and feed ratio parameter values are adjusted in real time through CNC instructions to achieve dynamic optimization of machining parameters.
[0037] A further optimized solution involves employing a hierarchical response strategy to execute control parameter adjustment commands, including the following steps:
[0038] The predicted maximum cutting temperature is compared with the dynamic safety threshold to obtain the comparison result;
[0039] The control mode is selected based on the comparison results, including normal operating condition optimization control, threshold deceleration control, and abnormal operating condition emergency stop control.
[0040] When an abnormal operating condition is detected, the emergency stop protocol is triggered to perform safety protection.
[0041] Further optimizations include:
[0042] A full-link real-time bidirectional communication channel is established between the industrial control computer, the CNC system and the sensor network through the WebSocket network communication protocol to transmit real-time machining data and control commands.
[0043] A persistent data storage mechanism is established by using a MySQL database to store system task configuration parameters, historical processing data, and real-time process data.
[0044] To address the time-sensitive nature of energetic material processing, a sliding time window mechanism is constructed to process real-time data streams and extract historical temperature sequence features.
[0045] A further optimized solution involves forming a closed-loop control system for the entire process, sequentially executing data sensing, model prediction, dynamic optimization, and command execution.
[0046] Secondly, this application provides a dual-predictive cooperative safety control system for implementing the method described above, comprising:
[0047] The data acquisition module is used to collect ambient temperature, workpiece geometric parameters, cutting parameters, and historical temperature time series data in real time.
[0048] The temperature dynamic prediction module is communicatively connected to the data acquisition module and is used to construct a temperature dynamic prediction model and output the predicted value of the highest cutting temperature.
[0049] The quality prediction module is communicatively connected to the data acquisition module and is used to construct a dynamic quality prediction model and output a processing quality score.
[0050] The adaptive control module communicates with the temperature dynamic prediction module and the mass prediction module. It is used to build a dynamic linear time-varying model based on real-time monitoring data and achieve dual-objective collaborative optimization through a sequential quadratic programming algorithm.
[0051] The safety monitoring module is communicatively connected to the adaptive control module and is used to dynamically adjust the safety threshold and execute a tiered response strategy based on the tool wear state and material phase transformation characteristics.
[0052] Further optimizations include:
[0053] The communication interface module uses the WebSocket network communication protocol to achieve real-time data synchronization between the industrial control computer, CNC system and sensors, and outputs communication status information.
[0054] The data storage module uses a MySQL database to store task configurations and processing data, and outputs the data management status.
[0055] The human-computer interaction module is used for parameter input and status monitoring, and outputs user operation feedback.
[0056] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0057] This application achieves an effective balance between safety and quality stability during processing through a collaborative optimization mechanism of temperature and quality dual prediction models. This method innovatively combines dynamic temperature prediction fused with time-series features with quality assessment corrected by a large language model, constructing a collaborative control framework of a dynamic linear time-varying model and a sequential quadratic programming algorithm.
[0058] Based on real-time temperature prediction and flexible safety boundary control, the system effectively prevents thermal runaway risks and enables rapid emergency stop response. Quality score correction using a large language model ensures the consistency and accuracy of quality predictions, significantly improving prediction precision. The model-free adaptive control framework employed can track dynamic changes in processing conditions in real time, achieving dual-objective coordinated optimization of maximizing quality and meeting temperature safety constraints through pseudo-gradient estimation and optimization algorithms.
[0059] Furthermore, by using WebSocket and MySQL, real-time bidirectional data synchronization across the entire industrial control computer-CNC system-sensors chain was achieved, thus constructing a highly efficient and integrated system architecture.
[0060] This method significantly improves the response speed and processing efficiency of the control system, effectively overcoming the technical bottlenecks in traditional processing control, such as the difficulty in balancing safety and quality, insufficient prediction accuracy, and high response delay, and providing reliable technical support for the high-risk shaping and processing of energetic materials. Attached Figure Description
[0061] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:
[0062] Figure 1 A flowchart of a dual-prediction collaborative safety control method for energetic material shaping provided in an embodiment of this application;
[0063] Figure 2 The temperature prediction model structure provided in the embodiments of this application;
[0064] Figure 3 The quality prediction model structure provided in the embodiments of this application;
[0065] Figure 4 A framework diagram of SLSQP-based optimized adaptive control technology provided for embodiments of this application;
[0066] Figure 5 This is an overall framework diagram of the processing and shaping software system provided in the embodiments of this application;
[0067] Figure 6 This is a technical architecture roadmap provided for the embodiments of this application. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of this invention are only for explaining this invention and are not intended to limit this invention.
[0069] First, some of the technical terms used in this application will be explained to help those skilled in the art understand this application.
[0070] MLP: Multilayer Perceptron;
[0071] LLM: Large Language Model;
[0072] SLSQP: Sequential Least Squares Quadratic Programming;
[0073] RLS: Recursive Least Squares;
[0074] LTV: Linear Time-Variant;
[0075] MSE: Mean Square Error;
[0076] ReLU: Rectified Linear Unit;
[0077] Adam: Adaptive Moment Estimation;
[0078] HMI: Human-Machine Interface;
[0079] WebSocket: Web Socket, a network socket;
[0080] Firstly, such as Figure 1 As shown, this application provides a dual-prediction collaborative safety control method for energetic material shaping, comprising the following steps:
[0081] S1: Real-time acquisition of multi-source parameters during the shaping and cutting process of energetic materials;
[0082] S2: Based on historical temperature time series data, extract historical temperature time series features through a sliding window mechanism, construct a dynamic temperature prediction model, and output the predicted value of the highest cutting temperature;
[0083] S3: Based on manual quality scoring data, a standardized quality dataset is generated through large language model correction, a dynamic quality prediction model is constructed, and a processing quality score is output.
[0084] S4: Input the predicted value of the highest cutting temperature and the machining quality fraction into the adaptive control process, construct a dynamic linear time-varying model based on real-time monitoring data, achieve dual-objective collaborative optimization of maximizing quality and temperature safety constraints through a sequential quadratic programming algorithm, and generate control parameter adjustment instructions;
[0085] S5: Dynamically adjust the safety threshold based on the tool wear state and material phase transformation characteristics, and execute the control parameter adjustment command using a layered response strategy.
[0086] This embodiment innovatively combines temperature dynamic prediction fused with time-series features with quality assessment of large language model correction, and constructs a model-independent temperature-quality collaborative adaptive control framework. By fitting the system characteristics in real time with a dynamic linear time-varying model, and combining it with a sequential quadratic programming algorithm, the dual-objective collaborative optimization of maximizing quality and temperature safety constraints is achieved, realizing an effective balance between safety and quality stability in the processing of energetic materials, and solving the technical problem of difficulty in balancing safety and quality in traditional processing control.
[0087] Dynamic elastic safety boundary control based on a hierarchical response strategy adaptively adjusts the safety threshold according to the tool wear state and material phase transformation characteristics. It designs a "normal working condition optimization - threshold approach deceleration - abnormal working condition emergency stop" mechanism, which effectively prevents the risk of thermal runaway while ensuring machining accuracy, and significantly improves the real-time response speed and control accuracy of the system.
[0088] In one embodiment, S1: Real-time acquisition of multi-source parameters during the shaping and cutting process of energetic materials, specifically including the following sub-steps:
[0089] Step S11: Real-time acquisition of multi-source parameters during the shaping and cutting process of energetic materials; specifically, six key input parameters are acquired in real time through a sensor network, including ambient temperature, workpiece inner diameter, workpiece outer diameter, spindle speed, feed rate, and depth of cut, and the average processing temperature of the previous moment is added as a time-series feature; missing values in the data are filled using an intermediate value interpolation method, and all data are standardized to convert to zero mean and unit variance; at the same time, a time interval threshold is set, and when the time interval between two processing operations exceeds the threshold, the average temperature feature of the previous moment is zeroed out;
[0090] Step S12: Establish a full-link real-time bidirectional communication connection between the industrial control computer, the CNC system, and the sensor network based on the WebSocket network communication protocol; This channel is used to synchronously transmit instructions and status data, and uses WebSocket and MySQL to realize data synchronization among the three, achieving full-link real-time bidirectional data synchronization.
[0091] Step S13: Use a MySQL database as the persistent storage core to centrally manage the processing task configuration parameters and the entire process data; the operator inputs processing parameters such as target size and material type through the human-machine interface, and the system generates a task configuration file based on this and stores it in the database; at the same time, all real-time collected processing process data and historical records are also stored here to ensure the integrity and traceability of the data.
[0092] Step S14: To address the time-sensitive nature of energetic material processing, a sliding time window mechanism is constructed to process real-time data streams. Specifically, the sliding time window is used to cache the most recent processing data, including spindle speed, feed rate, cutting temperature, and processing quality indicators, thereby forming a time-series feature dataset for the model to use.
[0093] Based on steps S11-S14, this embodiment achieves real-time bidirectional data synchronization across the entire industrial control computer-CNC system-sensor chain via WebSocket and MySQL.
[0094] In one embodiment, the construction of the temperature dynamic prediction model in step S2 specifically includes the following sub-steps:
[0095] Step S21: Based on the constructed time series feature dataset, extract historical temperature time series features using a sliding window mechanism; specifically, extract historical temperature series data from the dataset, supplement the average processed temperature of the previous moment as input features, and zero out invalid time series features according to a preset time interval threshold.
[0096] Step S22: Input the processed time-series feature dataset into a specially constructed multilayer perceptron model; specifically, the input layer of this MLP model receives 7-dimensional features (including 6 key parameters: ambient temperature, workpiece inner diameter, workpiece outer diameter, spindle speed, feed rate, and depth of cut, as well as time-series temperature features). The specific structure of the temperature prediction model is as follows: Figure 2 As shown, the model includes an input layer, two hidden layers, and an output layer. The output layer predicts the maximum cutting temperature. The hidden layers use the ReLU activation function and introduce a Dropout mechanism to prevent overfitting. The model design goal is to achieve an inference latency of ≤1ms and a prediction error of ≤3%.
[0097] Step S23: Train the model using a dynamic learning rate strategy combined with the Adam optimizer; specifically, the initial learning rate is set to 0.004, and the learning rate is gradually increased using a learning rate warm-up strategy in the first 20 iterations. Every 4000 iterations, the learning rate is reduced to 0.1 times its original value, and a total of 10000 iterations are trained; the Adam optimizer is used, with mean squared error (MSE) as the loss function.
[0098] Step S24: Deploy the trained model to the industrial control computer and output the predicted value of the highest cutting temperature online in real time; after actual deployment, the model's single inference latency is ≤0.9ms, the MSE is ≤0.933 on the test set, and the temperature prediction error is controlled within ±5℃.
[0099] This embodiment constructs a dynamic temperature prediction model, utilizes a sliding window mechanism to extract historical temperature time-series features, and inputs the processed multidimensional features into a multilayer perceptron model. This model structure includes an input layer, a hidden layer, and an output layer. The hidden layer employs the ReLU activation function and introduces a Dropout mechanism to enhance stability. Model training employs a dynamic learning rate strategy, combined with the Adam optimizer using mean squared error as the loss function for meticulous optimization. After deployment, it achieves extremely low single-inference latency and high prediction accuracy, with strict control over the temperature error range, significantly improving the reliability and accuracy of real-time monitoring and providing a solid guarantee for the safe and collaborative control of energetic material processing.
[0100] In one embodiment, step S3, which involves building and deploying a dynamic quality prediction model, specifically includes the following sub-steps:
[0101] Step S31: Collect five key process parameters: workpiece inner diameter, workpiece outer diameter, spindle speed, feed rate, and depth of cut. Simultaneously, experienced operators perform an initial quality score on the machined workpiece based on indicators such as surface roughness, dimensional accuracy, and surface defects. Subsequently, the workpiece image and initial score are input into a Large Language Model (LLM) for quantitative evaluation and correction, eliminating subjective bias and generating a high-precision, highly consistent quality score dataset. The LLM quantitatively evaluates and corrects manual annotations, generating a standardized quality score dataset (Qscore), which is calculated based on a comprehensive assessment of indicators such as surface roughness, dimensional error, and micro-defect density.
[0102] Step S32: Input the above quality score dataset into a multilayer perceptron (MLP) model to construct a dynamic quality prediction model. The specific structure of the quality prediction model is as follows: Figure 3As shown, the model adopts a two-layer hidden layer structure. The input layer receives 5 key process features (workpiece inner diameter, workpiece outer diameter, spindle speed, feed rate, and depth of cut). Redundant parameters such as temperature are eliminated through feature engineering in the early stage, and temperature features with less influence are eliminated through feature screening, further optimizing the model input, simplifying the model structure while ensuring prediction accuracy. The hidden layer uses the ReLU activation function and introduces the Dropout mechanism to prevent overfitting. The output layer directly predicts the standardized quality score value, thus effectively solving the problems of traditional quality assessment relying on manual annotation, strong subjectivity, and poor model generalization ability.
[0103] Step S33: Train the quality dynamic prediction model using the same dynamic learning rate strategy and Adam optimizer as the temperature prediction model, and use mean squared error as the loss function; train the model until the loss stabilizes and converges, and its generalization accuracy is improved to MSE ≤ 0.001; deploy the trained model to the industrial control computer and output the predicted processing quality score online in real time; after deployment, the model's single inference latency is ≤ 0.99ms, the MSE on the test set is ≤ 0.0001, and the quality score prediction error is ≤ 10%.
[0104] This embodiment innovatively introduces a large language model to intelligently correct manual quality scores by constructing a dynamic quality prediction model, generating a standardized dataset, effectively eliminating subjective evaluation bias, and significantly improving the consistency of data quality. Subsequently, key process features are input into a multilayer perceptron model, which employs a two-layer hidden layer structure. The hidden layers use the ReLU activation function and introduce a Dropout mechanism to enhance generalization ability. Streamlined feature engineering simplifies the model structure while ensuring prediction accuracy. The training process uses a dynamic learning rate strategy and the Adam optimizer, achieving stable convergence with a mean squared error loss function. After deployment, the model exhibits extremely low inference latency and excellent prediction accuracy, performing exceptionally well on the test set with prediction errors maintained at a low level. This fundamentally solves the problem of traditional quality assessment relying on manual labor and being highly subjective, providing solid and reliable technical support for real-time optimization and quality control of the processing process.
[0105] In one embodiment, the adaptive control process in step S4 specifically includes the following sub-steps:
[0106] Step S41: Based on temperature prediction and quality prediction values A dynamic linear time-varying model representing the input-output relationship of the processing is constructed, and the model coefficients are updated online using the recursive least squares method; specifically, in each control cycle... Within this model, the complex nonlinear process is approximated as the following locally linear relationship:
[0107] Equation (1)
[0108] in, Represents the spindle speed. Represents feed rate; model coefficients , , , , These are not fixed values, but time-varying parameters; they are updated online in real time using the recursive least squares method: the algorithm uses the latest process data and double prediction results within the sliding time window to continuously iterate and optimize the coefficient estimation, enabling the model to dynamically fit the current actual processing state, and providing accurate process model basic coefficients for subsequent real-time optimization control.
[0109] Step S42: Based on the online-updated dynamic linear time-varying model, calculate the pseudo-gradient vector including the quality score gradient and the temperature constraint gradient;
[0110] Maximizing the quality score Q is taken as the optimization objective, and this is applied to the control variables (spindle speed). Feed rate The pseudo-gradient approximation of the quality score is:
[0111] Equation (2)
[0112] Meanwhile, the temperature pseudo-gradient with respect to the same control variable, based on the temperature constraint Tmax≤Tsafe, is approximated as:
[0113] Equation (3)
[0114] Among them, weight , Determined by the quality scoring rules described in step S32; coefficient , It reflects the sensitivity of cutting parameters to temperature in real time and is updated online using the recursive least squares method;
[0115] Step S43: Using the pseudo gradient vector (mass target pseudo gradient) With temperature-constrained pseudo-gradient Using this as the key input, the SLSQP (Sequence Quadratic Programming) algorithm is embedded for iterative optimization, and the optimization framework for adaptive control is as follows: Figure 4As shown in Table 1, the algorithm process involves obtaining a set of real-time optimized cutting parameter control commands. Specifically, the cutting parameter vector and convergence tolerance are initialized. The nonlinear temperature constraint is linearized in each iteration cycle. A quadratic programming subproblem is constructed and solved to obtain the optimal search direction. The step size is determined and the optimization variables are updated through one-dimensional search, and the process is iterated until convergence. The entire optimization process can achieve real-time performance with a single iteration time of ≤5 ms on an industrial control computer. Finally, the optimized spindle scaling command (Z0) and feed scaling command (G01) are output. Thus, under the premise of strictly meeting the dynamic temperature safety threshold, the machining quality is maximized through closed-loop control of "sensing-prediction-optimization-execution".
[0116] Table 1 Overall Principle and Flow of SLSQP Algorithm
[0117] Algorithm 1: SLSQP enter: Output: Optimal solution and the corresponding objective function value 1: Initialize x = x0, calculate f(x), ∇f(x), and the constraint values and gradient. 2: while :3: Linearization constraints: 4: Solve the quadratic programming subproblem; 5: 6: subject to 7: Based on the solution of the subproblems Update variables: 8: The step size returns the optimal solution.
[0118] Step S44: Using spindle speed and feed rate commands as control commands, the industrial control computer sends them to the CNC system in real time to dynamically adjust the spindle speed and feed rate. This execution action constitutes the final link of the "sensing-prediction-optimization-execution" closed-loop control, directly driving the machining parameters to be adjusted in real time along the optimized path while meeting the dynamic temperature safety threshold, so as to maximize the machining quality.
[0119] This embodiment utilizes an adaptive control process to construct a dynamic linear time-varying model. It then uses recursive least squares to update the model coefficients online, fitting the nonlinear relationship of the machining process in real time to ensure the model dynamically conforms to actual working conditions. Based on this model, pseudo-gradient vectors of the quality scoring gradient and temperature constraint gradient are calculated, and a sequential quadratic programming algorithm is embedded for iterative optimization. The algorithm efficiently generates spindle and feed rate adjustment commands by linearizing constraints and solving quadratic programming subproblems. The entire optimization process achieves rapid iteration and real-time control. Commands are issued on the industrial control computer, directly driving the CNC system to dynamically adjust machining parameters. This maximizes machining quality while strictly meeting temperature safety constraints, forming a closed-loop control of "perception-prediction-optimization-execution," significantly improving the system's adaptive capability, real-time response accuracy, and collaborative optimization reliability.
[0120] In one embodiment, the security control strategy in step S5 includes the following sub-steps:
[0121] Step S51: Based on the real-time monitored tool wear condition and material phase transformation characteristics, dynamically calculate and update the safe threshold for the maximum cutting temperature. This forms a flexible safety boundary that changes with operating conditions, providing a precise basis for risk assessment;
[0122] Step S52: Real-time comparison of the highest predicted cutting temperature output by the temperature dynamic prediction model. With dynamic security threshold The system performs real-time comparisons and obtains the comparison results. Based on the comparison results, the system pre-determines the risk level and selects from three control modes: "normal operating condition optimization", "approaching the threshold speed reduction" and "abnormal operating condition emergency stop", and obtains the pre-selection results.
[0123] Step S53: Based on the pre-selection results, dynamically execute the corresponding hierarchical control strategy:
[0124] when far below At that time, the optimization instructions in step S4 are executed first to pursue the best processing quality;
[0125] when Approaching When this occurs, the safety protection logic is triggered, prioritizing the reduction of spindle speed and feed rate to ensure that the temperature returns to a safe range;
[0126] When an abnormal operating condition is predicted or detected, the emergency stop protocol is immediately triggered. The hardware-level response ensures that the emergency stop action is executed within 2ms, which solves the problems of conservative or overshooting fixed threshold control and slow emergency response. As the final safety circuit breaker measure, this mechanism, combined with dynamic monitoring, forms a complete "prediction-early warning-protection-circuit breaker" safety closed loop.
[0127] The safety control strategy provided in this embodiment dynamically updates the safety threshold for the highest cutting temperature. Based on real-time monitoring of tool wear and material phase transformation characteristics, it forms an elastic safety boundary that changes with the working conditions, providing an accurate basis for risk assessment. By comparing the predicted temperature value with the dynamic threshold in real time, the system pre-determines the risk level and intelligently selects from three modes: normal working condition optimization, speed reduction approaching the threshold, and emergency stop under abnormal working conditions. It executes a layered response strategy to ensure that the machining process is safe and controllable. When an anomaly is detected, an emergency stop protocol is immediately triggered, achieving rapid protection through hardware-level response. This effectively solves the limitations of fixed threshold control and forms a complete prediction-early warning-protection-fuse safety closed loop, significantly improving the system's adaptive safety, real-time response capability, and overall reliability.
[0128] In one embodiment, this application provides a dual-predictive collaborative safety control method and system for energetic material shaping. This method integrates three stages—data acquisition and processing, offline training, and online predictive control—to construct a complete closed-loop architecture.
[0129] During the data acquisition and processing stage, multi-source parameters are collected in real time, including ambient temperature, workpiece geometric parameters, cutting parameters and historical temperature time series data. The WebSocket network communication protocol is used to realize end-to-end data synchronization between the industrial control computer, CNC system and sensors with the MySQL database.
[0130] To address the time-sensitive nature of energetic materials, a sliding window mechanism is employed to extract historical temperature sequence features, enhancing the model's ability to represent dynamic processing behavior. During the offline training phase, historical data is used to construct processing quality monitoring models and cutting temperature monitoring models in parallel, learning the mapping relationship between parameters and quality or temperature.
[0131] Offline phase: Supervised learning is performed using historical data to build the basic model. This phase includes the following two parallel training modules:
[0132] The processing quality supervision training module uses historical quality data to train a model and learn the mapping relationship between processing parameters and quality.
[0133] The cutting temperature monitoring and training module uses historical temperature data to train the model and learn the thermodynamic relationship between machining parameters and cutting temperature.
[0134] The deep neural network prediction model layer serves as the core hub connecting the offline and online phases. Based on the results of offline training, two core deep learning models are constructed: a machining quality deep neural network prediction model and a cutting temperature deep neural network prediction model. These two models will receive real-time data input during the online phase.
[0135] During the online phase, real-time data is received through a deep neural network prediction model, dual prediction is performed to output processing quality score and temperature value, and optimization instructions are generated based on adaptive control algorithm to directly control the processing equipment.
[0136] This innovative approach combines dynamic temperature prediction fused with time-series features with quality assessment based on large language model correction, constructing a model-independent adaptive control framework. By abandoning traditional mechanistic models, a dynamic linear time-varying (LTV) model is built based on real-time monitoring data, and the model coefficients are updated online using recursive least squares (RLS). Combined with a pseudo-gradient online estimation method, the temperature prediction results are transformed into time-varying constraints, embedding the SLSQP sequential quadratic programming algorithm to achieve dual-objective optimization of maximizing quality and meeting temperature safety constraints. This method solves the problems of poor adaptability and inability to coordinate safety and quality optimization in existing control methods, significantly improving control accuracy under dynamic operating conditions.
[0137] The above embodiments fully cover the technical content, highlighting the system's advantages in safety, accuracy, and adaptive performance. Through the synergistic optimization of temperature and mass dual-prediction models, an effective balance between safety and stability during processing is achieved. All numerical values are represented using Arabic numerals, ensuring the accuracy and readability of the description. This method provides reliable technical support for the high-risk shaping and processing of energetic materials, effectively solving the problem of balancing safety and quality in traditional control methods. Simultaneously, by simplifying the model structure, optimizing the data processing flow, and implementing a full-link data synchronization architecture (such as WebSocket and MySQL integration), system deployment and maintenance costs are reduced, and integration efficiency is improved.
[0138] Secondly, this application provides a dual-prediction cooperative safety control system for energetic material shaping, comprising:
[0139] The data acquisition module is used to collect ambient temperature, workpiece geometric parameters, cutting parameters, and historical temperature time series data in real time.
[0140] The temperature dynamic prediction module is communicatively connected to the data acquisition module and is used to construct a temperature dynamic prediction model and output the predicted value of the highest cutting temperature.
[0141] The quality prediction module is communicatively connected to the data acquisition module and is used to construct a dynamic quality prediction model and output a processing quality score.
[0142] The adaptive control module communicates with the temperature dynamic prediction module and the mass prediction module. It is used to build a dynamic linear time-varying model based on real-time monitoring data and achieve dual-objective collaborative optimization through a sequential quadratic programming algorithm.
[0143] The safety monitoring module is communicatively connected to the adaptive control module and is used to dynamically adjust the safety threshold and execute a tiered response strategy based on the tool wear state and material phase transformation characteristics.
[0144] The technical architecture roadmap for a dual-predictive collaborative safety control system for energetic material shaping is as follows: Figure 6 As shown, the system achieves closed-loop control of data perception, model prediction, dynamic optimization, and instruction execution through modular design.
[0145] In the system architecture, the temperature dynamic prediction module, the mass dynamic prediction module, and the adaptive control module work together as core functional modules.
[0146] The dynamic temperature prediction module is responsible for safety assurance. Its implementation involves data preprocessing, model building, training, and deployment. The module collects six key input parameters: ambient temperature, workpiece inner diameter, workpiece outer diameter, spindle speed, feed rate, and depth of cut, and supplements them with the average machining temperature of the previous moment as a temporal feature. Missing values are imputed, the data is standardized, and an interval threshold is set to filter invalid features. The model adopts a multilayer perceptron structure with two hidden layers. The input layer has seven-dimensional features, and the output layer predicts the highest cutting temperature. The hidden layer uses the ReLU activation function and introduces the Dropout mechanism to prevent overfitting. The training process adopts a dynamic learning rate strategy, with an initial learning rate of 0.004, a warm-up period of 20 rounds, and a decay to 0.1 times every 4000 rounds, for a total of 10000 iterations. The model is trained using the Adam optimizer with mean squared error as the loss function. After deployment, the model's single inference latency does not exceed 0.9 milliseconds, the mean squared error on the test set does not exceed 0.933, and the temperature prediction error is controlled within ±5℃.
[0147] The quality dynamic prediction module is built on a similar framework but focuses on machining quality assessment: the module collects five process parameters—workpiece inner diameter, workpiece outer diameter, spindle speed, feed rate, and depth of cut—and combines them with human quality scoring data; it corrects the human annotations using a large language model to generate a standardized quality scoring dataset, eliminating subjective bias; the model also uses a two-layer multilayer perceptron, with a five-dimensional feature input layer and a quality score prediction output layer; the hidden layer uses ReLU and Dropout mechanisms to ensure model stability; the training strategy is consistent with the temperature module, using a dynamic learning rate and Adam optimizer to ensure stable convergence of the loss; after deployment, the model inference latency does not exceed 0.99 milliseconds, the mean square error of the test set does not exceed 0.0001, and the quality prediction error is less than 10%, significantly improving assessment consistency and generalization ability.
[0148] The adaptive control module employs a model-free optimization framework, achieving collaborative safety control through a dynamic linear time-varying model and a sequential quadratic programming algorithm. The module constructs local linear relationships based on real-time monitoring data, utilizes a sliding time window to cache machining parameters such as spindle speed, feed rate, cutting temperature, and quality indicators, and updates model coefficients online using recursive least squares. A pseudo-gradient vector is used to estimate the quality score gradient and temperature constraint gradient online, driving the sequential quadratic programming algorithm for iterative optimization, with each iteration taking no more than 5 milliseconds. The optimization results are converted into CNC commands, such as adjusting the spindle speed or feed rate, and control parameters are issued in real-time to ensure rapid response during machining.
[0149] Based on the modules mentioned above, the system framework is as follows: Figure 5 As shown, its overall architecture and workflow are as follows:
[0150] The operator inputs machining task parameters (such as target dimensions and material type) through the Human-Machine Interface (HMI) module. These parameters are stored as a task configuration file in the MySQL database of the data storage module. After parsing the task parameters, the industrial control computer sends initial machining instructions to the CNC system via the WebSocket network communication protocol of the communication interface module.
[0151] During machining, a sensor network deployed in the cutting zone (belonging to the data acquisition module) collects multi-source data, including temperature, in real time. This real-time data, along with historical time-series data from the database, is input into the temperature dynamic prediction module and the quality prediction module. The two modules perform parallel reasoning and output the predicted values for the highest cutting temperature and machining quality fraction in real time, respectively.
[0152] Temperature and quality predictions, along with real-time monitored process parameters, are fed into the adaptive control module. This module performs online optimization calculations based on a dynamic linear time-varying model (LTV) and a sequential quadratic programming algorithm (SLSQP) to generate control parameter adjustment instructions (such as spindle rate instruction Z0 and feed rate instruction G01) aimed at maximizing machining quality while strictly meeting temperature safety constraints.
[0153] The safety monitoring module compares the predicted temperature value with the dynamic safety threshold in real time, and performs a risk assessment based on the tool wear status, deciding on a tiered response strategy from "normal optimization," "approaching deceleration," or "abnormal emergency stop." Finally, the control commands, after being arbitrated by the safety strategy, are sent to the CNC system in real time via the industrial computer and WebSocket link, driving the actuators (such as the spindle and feed axes) to dynamically adjust the machining parameters.
[0154] The above process repeats itself, forming a complete closed-loop control system of "data perception → model prediction → dynamic optimization → safety monitoring → command execution". This system ensures continuous optimization of the energetic material shaping and processing process within safety boundaries, achieving a synergistic improvement in processing safety, quality consistency, and production efficiency.
[0155] In one embodiment, the overall system inputs machining task parameters (such as target size and material type) through a human-machine interface (HMI) module, which stores the parameters in a MySQL database of the data storage module. After parsing the data, the industrial control computer sends instructions to the CNC system via the WebSocket network communication protocol of the communication interface module. The sensor network collects cutting zone temperature data in real time, inputs it to the temperature and quality prediction module, and dynamically adjusts machining parameters (such as spindle speed and feed rate) in conjunction with the output of the adaptive control module. The system adopts a hierarchical response strategy, dynamically adjusting the safety threshold according to the tool wear state and material phase transformation characteristics to achieve three-level control: "normal optimization - approximation deceleration - emergency stop in abnormal conditions". The emergency stop response time under abnormal conditions does not exceed 2 milliseconds, effectively ensuring machining safety; at the same time, the quality prediction error does not exceed 10%, significantly improving machining accuracy and consistency.
[0156] In one embodiment, the dual-prediction collaborative safety control system for energetic material shaping provided in this application further includes a communication interface module, a data storage module, and a human-machine interaction module: the communication interface module uses the WebSocket network communication protocol to achieve real-time data synchronization between the industrial control computer, the CNC system, and the sensors, and outputs communication status information; the data storage module uses a MySQL database to store task configuration and processing data, and outputs data management status; the human-machine interaction module is used for parameter input and status monitoring, and outputs user operation feedback. These modules together support end-to-end integration, ensuring efficient system operation.
[0157] The functions of each module in the dual-predictive collaborative safety control system for energetic material shaping correspond to the steps in the embodiment of the dual-predictive collaborative safety control method for energetic material shaping. Their functions and implementation processes will not be described in detail here.
[0158] Thirdly, embodiments of this application provide a dual-prediction collaborative safety control device for shaping energetic materials. The dual-prediction collaborative safety control device for shaping energetic materials can be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.
[0159] In this embodiment, the dual-prediction collaborative safety control device for energetic material shaping may include a processor, a memory, a communication interface, and a communication bus.
[0160] The communication bus can be of any type and is used to interconnect the processor, memory, and communication interface.
[0161] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces for interconnecting devices within the dual-predictive collaborative safety control device for energetic material shaping, as well as interfaces for interconnecting the dual-predictive collaborative safety control device for energetic material shaping with other devices (such as other computing devices or user equipment). Physical interfaces can be Ethernet interfaces, fiber optic interfaces, ATM interfaces, etc.; user equipment can be displays, keyboards, etc.
[0162] Memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0163] The processor can be a general-purpose processor, which can call a dual-prediction collaborative safety control program for energetic material shaping stored in memory and execute the dual-prediction collaborative safety control method for energetic material shaping provided in the embodiments of this application. For example, the general-purpose processor can be a central processing unit (CPU). The method executed when the dual-prediction collaborative safety control program for energetic material shaping is called can refer to the various embodiments of the dual-prediction collaborative safety control method for energetic material shaping in this application, and will not be repeated here.
[0164] Fourthly, embodiments of this application also provide a readable storage medium.
[0165] The present application has a readable storage medium storing a dual-prediction cooperative safety control program for energetic material shaping, wherein when the dual-prediction cooperative safety control program for energetic material shaping is executed by a processor, it implements the steps of the dual-prediction cooperative safety control method for energetic material shaping as described above.
[0166] The method implemented when the dual-predictive collaborative safety control procedure for energetic material shaping is executed can be referred to in the various embodiments of the dual-predictive collaborative safety control method for energetic material shaping in this application, and will not be repeated here.
[0167] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A dual-prediction collaborative safety control method for shaping energetic materials, characterized in that, Includes the following steps: Real-time acquisition of multi-source parameters during the shaping and cutting process of energetic materials, including ambient temperature, workpiece geometric parameters, cutting parameters, and historical temperature time series data; Based on historical temperature time series data, a sliding window mechanism is used to extract historical temperature time series features, construct a dynamic temperature prediction model, and output the predicted value of the highest cutting temperature. Based on manual quality scoring data, a standardized quality dataset is generated through large language model correction, a dynamic quality prediction model is constructed, and a processing quality score is output. The predicted maximum cutting temperature and the machining quality fraction are input into the adaptive control process. A dynamic linear time-varying model is constructed based on real-time monitoring data. The dual-objective collaborative optimization of maximizing quality and temperature safety constraints is achieved through a sequential quadratic programming algorithm, and control parameter adjustment instructions are generated. The safety threshold is dynamically adjusted based on the tool wear state and material phase transformation characteristics, and the control parameter adjustment command is executed using a hierarchical response strategy.
2. The dual-prediction collaborative safety control method for shaping energetic materials according to claim 1, characterized in that, The construction of the dynamic temperature prediction model includes the following steps: Collect key input data such as ambient temperature, workpiece geometry parameters and cutting parameters, and supplement them with historical average processing temperature as time-series features to form a multidimensional input dataset; The multidimensional input dataset is preprocessed, including missing value imputation, data standardization, and time interval threshold filtering, and the preprocessed feature data is output. The preprocessed feature data is input into a multilayer perceptron model, which includes a hidden layer and an output layer. The hidden layer uses the ReLU activation function and introduces the Dropout regularization mechanism, while the output layer performs regression prediction of the maximum cutting temperature. The multilayer perceptron model is trained using a dynamic learning rate preheating and decay strategy combined with the Adam optimizer. The mean squared error is used as the loss function to optimize the model parameters, and the trained dynamic temperature prediction model is output.
3. The dual-prediction collaborative safety control method for shaping energetic materials according to claim 1, characterized in that, The construction of the quality dynamic prediction model includes the following steps: Collect key process parameters such as workpiece inner diameter, workpiece outer diameter, spindle speed, feed rate, and depth of cut to form a process parameter dataset; The process parameter dataset is input into a large language model for quantitative evaluation and correction, combined with manual quality scoring data, to generate a standardized quality scoring dataset. The standardized quality score dataset is input into a multilayer perceptron model, which includes a hidden layer and an output layer. The hidden layer uses the ReLU activation function and introduces the Dropout regularization mechanism. The output layer predicts the processing quality score and outputs the predicted quality value. The multilayer perceptron model is trained using a dynamic learning rate warm-up and decay strategy combined with the Adam optimizer. The mean squared error is used as the loss function to optimize the model parameters, and the trained dynamic prediction model is output.
4. The dual-prediction collaborative safety control method for shaping energetic materials according to claim 1, characterized in that, The construction of the dynamic linear time-varying model specifically includes the following steps: A sliding time window mechanism is used to cache real-time monitoring data, which includes spindle speed, feed rate, cutting temperature and machining quality indicators, forming a time series dataset. Based on the time series dataset, a local linear relationship is fitted in each control cycle to establish a dynamic mapping model between cutting parameters and temperature / quality indicators, and an initial linear time-varying model is output. The coefficient matrix of the initial linear time-varying model is updated online using the recursive least squares method, and the model parameters are adjusted in real time to adapt to changes in processing conditions, outputting an optimized dynamic linear time-varying model. The optimized dynamic linear time-varying model and real-time monitoring data are updated synchronously. The latest data samples are maintained through a sliding window mechanism, and the dynamically linear time-varying model is output in real time.
5. The dual-prediction collaborative safety control method for shaping energetic materials according to claim 1, characterized in that, The method of achieving dual-objective coordinated optimization of maximizing quality and meeting temperature safety constraints through a sequential quadratic programming algorithm includes the following steps: Based on the real-time mapping relationship output by the dynamic linear time-varying model, a pseudo gradient vector is calculated, which includes the quality score gradient and the temperature constraint gradient, and the system sensitivity characteristics are output. The system sensitivity characteristics are input into a sequential quadratic programming algorithm for iterative solution. Based on the mass maximization objective function and temperature safety constraints, optimization calculations are performed, and control parameter adjustment instructions are output. The control parameter adjustment instructions are converted into an instruction format executable by the CNC system. The spindle ratio and feed ratio parameter values are adjusted in real time through CNC instructions to achieve dynamic optimization of machining parameters.
6. The dual-prediction collaborative safety control method for shaping energetic materials according to claim 1, characterized in that, The step of executing control parameter adjustment instructions using a hierarchical response strategy includes the following steps: The predicted maximum cutting temperature is compared with the dynamic safety threshold to obtain the comparison result; The control mode is selected based on the comparison results, including normal operating condition optimization control, threshold deceleration control, and abnormal operating condition emergency stop control. When an abnormal operating condition is detected, the emergency stop protocol is triggered to perform safety protection.
7. The dual-prediction collaborative safety control method for shaping energetic materials according to claim 1, characterized in that, Also includes: A full-link real-time bidirectional communication channel is established between the industrial control computer, the CNC system and the sensor network through the WebSocket network communication protocol to transmit real-time machining data and control commands. A persistent data storage mechanism is established by using a MySQL database to store system task configuration parameters, historical processing data, and real-time process data. To address the time-sensitive nature of energetic material processing, a sliding time window mechanism is constructed to process real-time data streams and extract historical temperature sequence features.
8. The dual-prediction collaborative safety control method for shaping energetic materials according to claim 1, characterized in that, The overall process forms a closed-loop control system, which sequentially executes data sensing, model prediction, dynamic optimization, and command execution.
9. A dual-predictive collaborative safety control system for shaping energetic materials, characterized in that, The dual-prediction collaborative safety control method for shaping energetic materials according to any one of claims 1-8 includes: The data acquisition module is used to collect ambient temperature, workpiece geometric parameters, cutting parameters, and historical temperature time series data in real time. The temperature dynamic prediction module is communicatively connected to the data acquisition module and is used to construct a temperature dynamic prediction model and output the predicted value of the highest cutting temperature. The quality prediction module is communicatively connected to the data acquisition module and is used to construct a dynamic quality prediction model and output a processing quality score. The adaptive control module communicates with the temperature dynamic prediction module and the mass prediction module. It is used to build a dynamic linear time-varying model based on real-time monitoring data and achieve dual-objective collaborative optimization through a sequential quadratic programming algorithm. The safety monitoring module is communicatively connected to the adaptive control module and is used to dynamically adjust the safety threshold and execute a tiered response strategy based on the tool wear state and material phase transformation characteristics.
10. The dual-predictive collaborative safety control system for energetic material shaping according to claim 9, characterized in that, Also includes: The communication interface module uses the WebSocket network communication protocol to achieve real-time data synchronization between the industrial control computer, CNC system and sensors, and outputs communication status information. The data storage module uses a MySQL database to store task configurations and processing data, and outputs the data management status. The human-computer interaction module is used for parameter input and status monitoring, and outputs user operation feedback.