Adaptive control method and system for hydraulic servo action of hydraulic clamp

By combining the ARIMA model and reinforcement learning mechanism, optimizing the position control of the hydraulic clamp, the problem of large oil circuit loss and pressure fluctuation when the hydraulic clamp provides clamping force is solved, achieving higher control accuracy and production efficiency.

CN118915458BActive Publication Date: 2025-03-21SUZHOU KINGHOU INTELLIGENT EQUIP CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411000600.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2025-03-21
Estimated Expiration
2044-07-25

AI Technical Summary

Technical Problem

When the hydraulic clamper provides clamping force, the oil pump needs to continuously apply pressure, resulting in large oil circuit losses and pressure fluctuations, affecting the stability of the mold.

Method used

Optimize the position control of hydraulic clamps through integrated time series analysis (ARIMA model) and reinforcement learning mechanism. The ARIMA model is used to predict the hydraulic cylinder position and dynamically adjust the scaling factor in the PID controller through the reinforcement learning mechanism to ensure that the hydraulic cylinder can accurately stay at the position required to push the poppet valve to close the oil circuit.

Benefits of technology

It improves the accuracy of hydraulic cylinder position control, reduces energy consumption and equipment losses, improves production efficiency and equipment utilization, and enhances the adaptability and flexibility of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118915458B_ABST
    Figure CN118915458B_ABST
Patent Text Reader

Abstract

The invention discloses an adaptive control method and system for hydraulic servo action of a hydraulic clamp; the invention relates to the technical field of clamps; an ARIMA model includes a prediction function f(x(k))=y(k), and by inputting an independent variable x(k) at time k, a corresponding dependent variable y(k) is predicted; for the independent variable and the dependent variable in the scheme, there is an obvious trend between the two, so the ARIMA model hyperparameters p, d and q are determined based on the trend mechanism; the determination method is to need to be in the training set D train The hyperparameters p, d and q are updated using the BIC information criterion. The present invention can ensure that the hydraulic cylinder stays precisely at the position required to push the poppet valve to close the oil circuit between the link of "sliding the hydraulic cylinder to the side of the poppet valve" and "closing the oil circuit" through real-time data collection and preprocessing, combined with the prediction ability of the ARIMA model and the dynamic adjustment of the reinforcement learning mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of clamps, in particular to an intelligent control technology for hydraulic clamps, and in particular to an adaptive control method and system for hydraulic servo actions of hydraulic clamps. Background Art

[0002] In order to solve the low production efficiency of large injection molding machines caused by mold replacement, large injection molding production lines at this stage generally have a quick mold change system for the injection molding machine. The main device of this quick mold change system is called a "clamp". By clamping the mold and combining other devices, the large injection molding machine can be quickly changed.

[0003] Hydraulic clamps not only solve the problem of mechanical rotary clamps that lack clamping force around them, causing mold deformation and loss, but also solve the problem of magnetic suction cup clamps that have affected mold opening stroke and high costs. Therefore, hydraulic clamps are the current mainstream development trend. However, when hydraulic clamps provide clamping force, the oil pump needs to continuously provide pressure, which not only causes large oil circuit losses, but also causes continuous pressure to fluctuate due to the instability of the oil circuit, which has a certain impact on the stability of the mold. To this end, many existing technologies attempt to solve this phenomenon, such as:

[0004] (1) CN201910898872.7 discloses a Chinese invention patent for a hydraulic ejection lever clamping device and a clamping and mold changing method for a mold (publication date: 2020-01-03); the scheme forms a crank-connecting rod mechanism by moving the piston upward to contact the tail of the lever, so that the lever rotates with the front lever rotation support as the rotation reference point, and then the mold is firmly clamped through the dead point of the mechanism, and no fluctuation occurs; however, from the perspective of mechanism, the dead point is fixed. If the dead point is used to clamp the mold, it can only be adapted to molds of a specific size to correspond to the specific dead point position, so it cannot be effectively adapted to molds of other specifications, and its applicability is insufficient;

[0005] (2) On October 13, 2023, the applicant disclosed a Chinese invention patent for a heavy-duty clamp with a built-in pressurizing device (grant number: CN114193706B). The linkage of the pressure relief rod and the poppet valve is utilized. After the pneumatic oil pressure device provides sufficient hydraulic oil to the mold clamping device and converts it into clamping force, the hydraulic rod (hydraulic cylinder) slides toward the side of the poppet valve, and then closes the oil circuit to disconnect the pneumatic oil pressure device and the mold clamping device. On the one hand, after the connection is disconnected, the oil pressure in the clamping oil circuit is stable and is not affected by the fluctuation of the pneumatic oil pressure device oil circuit, so that the clamping force can be better provided to ensure the injection molding quality. On the other hand, the pneumatic oil pressure device does not need to work for a long time after the disconnection, so the energy consumption is reduced and the loss is reduced. At the same time, it can be adapted to molds of different sizes and specifications. However, after long-term application, the applicant discovered that in the above-mentioned operation mode, the switching between the link of "making the hydraulic cylinder slide toward the side of the poppet valve" and the link of "closing the oil circuit" is not instantaneous, but has a certain reaction time; when the hydraulic cylinder slides toward the side of the poppet valve (to be precise, the moment when the two links are switched), the piston will be subjected to an instantaneous fluctuation, which will cause an impact on the piston and may cause fluctuation in the fixation of the mold.

[0006] According to the applicant's analysis, the above defects are caused by two reasons:

[0007] 1) Mechanical inertia: When the hydraulic cylinder slides toward the poppet valve, the piston will not stop immediately at a certain position due to the inertia of the mechanical components. This inertia causes the piston to vibrate slightly before and after reaching the target position.

[0008] 2) Hysteresis of oil flow: When the hydraulic cylinder pushes the poppet valve to move to the position of closing the oil circuit, the oil needs to flow through the oil circuit system to respond to this change. Due to the resistance of the oil circuit and the oil flow speed, there is a certain hysteresis in the flow of the oil. This hysteresis causes a brief fluctuation in the oil pressure in the oil circuit before the poppet valve completely closes the oil circuit, which in turn affects the above-mentioned piston.

[0009] The applicant's current solution is to manually control the position of the hydraulic cylinder between the step of "sliding the hydraulic cylinder to the side of the poppet valve" and the step of "closing the oil circuit" to make it "fit" the position required by the poppet valve to close the oil circuit; however, this method is undoubtedly inefficient and lacks precision.

[0010] To this end, the present invention proposes an adaptive control method and system for the hydraulic servo action of a hydraulic clamp. Summary of the invention

[0011] In view of this, the embodiments of the present invention hope to provide an adaptive control method and system for the hydraulic servo action of the hydraulic clamp to solve or alleviate the technical problems existing in the prior art, namely:

[0012] The sliding speed of the hydraulic cylinder should be stable and controllable to avoid shock caused by excessive acceleration or deceleration. Therefore, how to intelligently and automatically ensure that the hydraulic cylinder can dynamically and accurately stay at the position required to push the poppet valve to close the oil circuit over time between the link of "sliding the hydraulic cylinder to the side of the poppet valve" and the link of "closing the oil circuit" is a technical problem to be solved by this application.

[0013] The technical solution of the present invention is achieved in this way:

[0014] First, an adaptive control method for the hydraulic servo action of a hydraulic clamp is provided.

[0015] 1. Overview:

[0016] The present invention aims to solve the above-mentioned technical problems. By integrating time series analysis (ARIMA model) with reinforcement learning mechanism, the optimization of hydraulic clamp position control is achieved. First, by real-time acquisition of key data in the hydraulic system and preprocessing, high-quality input is provided for subsequent model training. Subsequently, the ARIMA model is used to predict the position of the hydraulic cylinder to capture the trend law in the data. Next, the reinforcement learning mechanism is introduced, and the prediction result of the ARIMA model is used as the state input. The scaling factor in the PID controller is dynamically adjusted through the strategy network to cope with the complex and changeable working environment. Finally, through the closed-loop control strategy, it is ensured that the hydraulic cylinder can accurately stay in the position required to push the poppet valve to close the oil circuit, thereby reducing energy consumption and equipment loss while ensuring the injection quality, and improving the overall production efficiency and equipment utilization rate.

[0017] (II) Introducing a closed-loop discrete PID controller:

[0018] 2.1PID controller:

[0019] For the hydraulic cylinder of the current hydraulic clamp, a PID controller must first be introduced to achieve closed-loop control. The core of the PID controller is to calculate the control error (i.e. the difference between the target position and the actual position), and based on this error, output the control signal through a combination of proportion (P), integration (I) and differentiation (D):

[0020]

[0021] Where u(t) is the output signal of the controller. K p is the proportional gain. K i is the integral gain. K d is the derivative gain. e(t)=SP-PV is the control error, where SP is the set point (target position) and PV is the process variable (actual position). is the integral term of the error, the integral from 0 to the current time t. τ is the integral variable. dt / de(t) is the differential term of the error, which represents the rate of change of the error over time.

[0022] 2.2 Discrete PID controller:

[0023] The control of the hydraulic cylinder is a continuous process between the link of "sliding the hydraulic cylinder to the side of the poppet valve" and the link of "closing the oil circuit". However, in the actual digital control system, this continuous control process needs to be discretized; therefore, this solution needs to make some discretization improvements to the traditional PID controller:

[0024] By dividing the time-continuous control process into a series of discrete sampling moments, and calculating the control output at each sampling moment based on the current error and past error history, the precise control of the hydraulic cylinder position can be achieved. That is:

[0025]

[0026] Where u(k) is the control output at the kth sampling moment, hereinafter referred to as "electrical signal u(k)". e(k)=SP(k)-PV(k) is the control error, where SP(k) is the set point (target position) at the kth sampling moment, and PV(k) is the process variable (actual position) at the kth sampling moment. Δt is the sampling period. is the sum of the errors from 0 to k, simulating the continuous time integral. e(k)-e(k-1) / Δt is the difference of the errors, simulating the continuous time differential.

[0027] 2.3 Introducing dynamic scaling factor α:

[0028] At present, the discrete PID controller given in 2.2 above has no practical significance, but it provides a basic framework. Currently, a dynamic scaling factor α(k) can be introduced to scale the above discrete PID controller between the link of "sliding the hydraulic cylinder to the side of the poppet valve" and the link of "closing the oil circuit". The purpose of this is to dynamically adjust the output of the controller according to the real-time state or performance requirements of the system to ensure that the hydraulic cylinder can stay at the target position more accurately:

[0029]

[0030] By adjusting the value of α(k), the position control performance of the hydraulic cylinder can be optimized. For example, reducing the value of α(k) when approaching the target position can slow down the movement of the hydraulic cylinder so that it can stay at the target position more accurately. In addition, the introduction of the dynamic scaling factor enhances the robustness of the PID control system. Even if the system parameters change within a certain range, the stability and control accuracy of the system can be maintained by properly adjusting the value of α(k).

[0031] Because when the position of the hydraulic cylinder deviates from the target position, the PID controller will generate a control output to eliminate this deviation. The role of the dynamic scaling factor α(k) is to further adjust the size of the control output on this basis, thereby achieving more accurate error compensation.

[0032] So far, the technical context of the present invention has been clarified, that is, how to dynamically assign a value to the dynamic scaling factor α(k).

[0033] (III) Technical solution:

[0034] In order to dynamically assign the dynamic scaling factor α(k) and solve the technical problem to be solved by the present application, the present invention selects to perform the following operation steps before the hydraulic cylinder slides toward the poppet valve side to close the oil circuit:

[0035] 3.1 Step S1, Data Engineering:

[0036] The piston position a, oil circuit resistance b and oil flow velocity c data are collected in real time from the hydraulic clamp to form the independent variable x. Where x = (a, b, c). The position of the hydraulic cylinder is recorded each time the poppet valve successfully closes the oil circuit as a sample of the dependent variable y (target position).

[0037] Then, the above data are arranged in chronological order into a time series data, namely, data set D: D = [(x1, y1), (x2, y2), ..., (x n ,y n )];

[0038] Among them, (x i ,y i ) is the i-th sample, and n is the number of samples. Then the dataset D is divided into training set D train and the test set D test .

[0039] 3.2 Step S2, activate the ARIMA model:

[0040] The ARIMA model includes a prediction function f(x(k))=y(k), which predicts the corresponding dependent variable y(k) by inputting the independent variable x(k) at time k;

[0041] For the independent variables and dependent variables in this scheme, there is an obvious trend between the two, so the ARIMA model hyperparameters p, d and q are determined based on the trend mechanism; the method for determining them is to use the training set D train The hyperparameters p, d, and q are updated using the BIC information criterion.

[0042] In the process of training the ARIMA model, the test set D is used. test The mean square error (MSE) of the ARIMA model is verified by data, and the hyperparameters p, d, and q updated during a round of training that minimizes the MSE value are selected as the optimal model parameters.

[0043] 3.2.1 Step S200, read the structure of the ARIMA model:

[0044] The ARIMA model consists of an autoregressive (AR) part, a differencing (I) part, and a moving average (MA) part:

[0045]

[0046] Where: Y k represents the observed value at time k (i.e., the hydraulic cylinder position). B is the backshift operator, d is the order of the difference, which represents the number of differences required to make the sequence stable. Φ(B) is the autoregressive polynomial, is the autoregressive coefficient. Θ(B) is the moving average polynomial; where q is the order of the moving average, θ1,θ2,...,θ q is the moving average coefficient. k is a white noise sequence, representing the random error term at time k.

[0047] For the hydraulic cylinder position prediction in this scheme, the specific application of the ARIMA model will depend on the optimal hyperparameters p, d and q selected on the training set by the BIC information criterion, as well as the corresponding coefficients and θ1,θ2,...,θ q In practical applications, these parameters will be obtained through the model training process and used in subsequent prediction tasks. The training methods include:

[0048] 3.2.1.1 Determine ARIMA model hyperparameters based on trend mechanism:

[0049] In the training set D train We fit the ARIMA model using different combinations of hyperparameters p, d, and q. That is, for each set of hyperparameters, we calculate the BIC (Bayesian Information Criterion) value of the model on the training set:

[0050] BIC = n ln(MSE) + K ln(n);

[0051] Where n is the number of samples in the training set, MSE is the mean square error of the model under this set of hyperparameters, and K is the number of model parameters (K = p + d + q + 1).

[0052] Then, the hyperparameter combination that minimizes the BIC value is selected as the preliminary optimal hyperparameter.

[0053] 3.2.1.2 Training ARIMA model:

[0054] Use the initial optimal hyperparameter combination in the training set D train The ARIMA model is trained on . The training process involves:

[0055] The first step is to estimate the autoregressive coefficients and moving average coefficients θ1,θ2,...,θ q .

[0056] The second step is to verify the goodness of fit of the model to ensure that the model can accurately capture the trends and volatility in the series.

[0057] The third step is to use the test set D test Verify the performance of the trained ARIMA model and select the optimal parameters:

[0058] Calculate the mean square error (MSE) of the model on the test set:

[0059]

[0060] Among them, m is the number of test set samples, y i is the actual observed value corresponding to the sample, is the model prediction value.

[0061] If the MSE on the test set is less than a preset threshold or is better than other candidate models, the current hyperparameters are confirmed to be the optimal model parameters and proceed to the fourth step (i.e. stop training); otherwise, return to the second step above, try to adjust the hyperparameters and retrain the model.

[0062] 3.2.2 Step S201, activate the prediction function f(x(k)):

[0063] f(x(k))=y(k)=μ+∑ i=1 pφ i (y k-i -μ)+∑ j=1 qθ j ε k-j ;

[0064] Where: μ is the intercept term, φ i is the i-th autoregressive coefficient.k-i is the actual observed value or the differenced value (depending on the difference order d) at time points i before the prediction time k. j is the jth moving average coefficient. k-j is the prediction error term at j time points before the prediction time k.

[0065] The above expression of the prediction function f(x(k)) temporarily ignores the difference part, because the difference is a preprocessing step for the original sequence before the model is fitted. k-i should be the differenced sequence value (if d>0), and ε k-j It is the residual term estimated during the model fitting process, rather than being directly observable, so it is expressed in an implicit form in this formula.

[0066] 3.3 Step S3, introduce reinforcement learning mechanism:

[0067] First read the reinforcement learning environment, including the state space S, action space A, and reward function.

[0068] The reinforcement learning mechanism is based on the policy network designed by the policy gradient method, which uses the ARIMA model to predict the baseline value of the dynamic scaling factor α(k) near the target position as input. The predicted dependent variable y(k) of the ARIMA model is then input into the policy network as part of the state, and the policy network adjusts the value of the dynamic scaling factor α(k) according to the current state.

[0069] 3.3.1 Step S300, read the reinforcement learning environment:

[0070] (1) The state space S includes the piston position a(k'), the oil resistance b(k'), the oil flow velocity c(k'), and the dependent variable y(k') predicted by the ARIMA model at the current time k'.

[0071] These state variables are formally represented as the state vector s k ', which is referred to as "state" in the following text:

[0072] s k '=[a(k'),b(k'),c(k'),y(k')];

[0073] (2) The action space A is the value range of the dynamic scaling factor α(k), which is an interval value of [0,1] and is referred to as “action” in the following text.

[0074] (3) Reward function R(s) k ',a k ') is designed based on the deviation between the hydraulic cylinder position and the target position. The smaller the deviation, the higher the reward:

[0075] R(s k' ,a k' )=-β·|p target -p actual (s k' ,a k' )|;

[0076] Among them, β is a positive proportionality coefficient, p target is the target position, p actual (s k ',a k ') is in the current state s k ' and action a k 'The actual position of the lower hydraulic cylinder.

[0077] 3.3.2 Step S301, read the policy network:

[0078] Policy Network The design is based on the policy gradient method, where Represents the parameters of the network. The policy network accepts the state s k ' as input and output action a k '(i.e., the probability distribution of the dynamic scaling factor α(k)).

[0079] 3.2.2.1 Policy Network The structure:

[0080] Policy Network It is a multi-layer perceptron (MLP) with a total of L hidden layers. Each hidden layer uses the ReLU activation function, and the output layer uses the sigmoid activation function to ensure that the output value (i.e., the dynamic scaling factor α(k)) is in the interval [0,1]. Policy network The specific form is as follows:

[0081] (1) Input layer:

[0082] Input status(s k' ∈R n ), where n is the dimension of the state space.

[0083] (2) Hidden layer (for l = 1, 2, ..., L):

[0084] The output h of the lth hidden layer (l) k' is calculated as:

[0085]

[0086] Among them, h (0) k'=s k', that is, the input layer directly passes the state as the output of the hidden layer 0; W(l) and b(l) are the weight matrix and bias vector of the lth layer respectively; ReLU is a linear rectification function, defined as ReLU(x) = max(0,x).

[0087] (3) Output layer: Action a of the output layer k 'Calculated as:

[0088] a k '=σ(wTh(L) k' + b) = α(k);

[0089] Among them, σ is the sigmoid activation function, W and b are the weight vector and bias term of the output layer respectively.

[0090] 3.3.2.2 Training strategy network:

[0091] During the training process, the ARIMA model is used to predict the baseline value of the dynamic scaling factor α(k) near the target position as an auxiliary input to the policy network. The policy network adjusts the value of the dynamic scaling factor α(k) according to the current state to maximize the cumulative reward. Training the policy network involves the following steps:

[0092] In the first step, starting from the initial state s0, the policy network is used to select action a0.

[0093] In the second step, perform action a0 and observe the new state s1 and reward r0. Update the weight matrix W(l) of the hidden layer and the bias vector b(l) of the hidden layer, as well as the weight vector W and bias term b of the output layer, and calculate the mean square error (MSE) value of the hidden layer and the output layer;

[0094] The third step is to collect state transition samples [(s0,a0,r0,s1),(s1,a1,r1,s2),...].

[0095] Use the collected samples to update the parameters of the policy network The policy gradient algorithm (REINFORCE algorithm) is used to maximize the expectation of the cumulative reward.

[0096] The fourth step is to stop the iteration when the policy network converges or reaches the predetermined number of iterations, and select the weight matrix W(l), bias vector b(l), weight vector W and bias term b obtained in the round of training that minimizes the MSE value as the optimal model parameters.

[0097] 3.4 Step S4, closed-loop control:

[0098] The dynamic scaling factor α(k) is introduced into the discretized PID controller as described in 2.3 above to form an electrical signal u(k) to control the dwell position of the hydraulic cylinder of the hydraulic clamp:

[0099]

[0100] Where, e(k)=SP(k)-PV(k) is the control error, where SP(k) is the set point (target position) at k sampling moments, PV(k) is the process variable (actual position) at k sampling moments, and Δt is the sampling period. is the sum of the errors from 0 to k, simulating the continuous time integral. e(k)-e(k-1) / Δt is the difference of the errors, simulating the continuous time differential. K p is the proportional gain. K i is the integral gain. K d is the differential gain.

[0101] (IV) Mechanisms for resolving technical issues:

[0102] 4.1 Data-driven location prediction:

[0103] The ARIMA model is used to predict the position of the hydraulic cylinder. By collecting data such as the piston position, oil circuit resistance, and oil flow rate in the hydraulic system in real time, the input feature vector is constructed and input into the ARIMA model for position prediction. The ARIMA model can capture the trend and periodicity in the data, thereby more accurately predicting the position of the hydraulic cylinder at a future moment.

[0104] 4.2 Reinforcement learning optimization control strategy:

[0105] Based on the prediction of the hydraulic cylinder position, a reinforcement learning mechanism is introduced to optimize the control strategy. Reinforcement learning learns how to select the optimal action based on the current state by interacting with the environment to maximize the cumulative reward. In this scenario, the state includes the current position of the hydraulic cylinder, the prediction results of the ARIMA model, etc., the action is the adjustment value of the dynamic scaling factor α(k), and the reward is designed based on the deviation between the hydraulic cylinder position and the target position. The smaller the deviation, the higher the reward.

[0106] 4.3 Dynamically adjust PID controller parameters:

[0107] Under the guidance of the reinforcement learning mechanism, the scaling factor α(k) of the PID controller is dynamically adjusted. The PID controller is responsible for calculating the control output (electrical signal u(k)) based on the error between the set point (i.e., the position required for the poppet valve to close the oil circuit) and the actual position to drive the hydraulic cylinder to move to the target position. By dynamically adjusting the scaling factor α(k), the control strength of the PID controller can be adjusted in real time, so that the hydraulic cylinder can stay at the target position more accurately.

[0108] 4.4 Closed-loop feedback ensures accuracy:

[0109] The entire control process forms a closed-loop feedback system. The PID controller outputs a control signal to drive the hydraulic cylinder to move, and the position information of the hydraulic cylinder is collected in real time and fed back to the control system. By comparing the deviation between the actual position and the target position and adjusting the control strategy according to the deviation, it is ensured that the hydraulic cylinder can continue to approach the target position and finally stay accurately at the position required to push the poppet valve to close the oil circuit.

[0110] Second, the adaptive control system for the hydraulic servo action of the hydraulic clamp:

[0111] A clamp with a built-in pressurizing device, such as a heavy-duty clamp with a built-in pressurizing device disclosed by the applicant (CN114193706B); on this basis, it also includes:

[0112] A processor and a memory connected to the processor, wherein program instructions are stored in the memory, and when the program instructions are executed by the processor, the processor executes the adaptive control method as described above; after the electrical signal u(k) is generated, it is transmitted to a PLC controller, and the clamp is controlled by the PLC controller.

[0113] Compared with the prior art, the present invention has the following beneficial effects:

[0114] 1. Improve position control accuracy: The present invention can ensure that the hydraulic cylinder stays precisely at the position required to push the poppet valve to close the oil circuit between the link of "sliding the hydraulic cylinder to the side of the poppet valve" and "closing the oil circuit" through real-time data collection and preprocessing, combined with the prediction ability of the ARIMA model and the dynamic adjustment of the reinforcement learning mechanism. This high-precision control not only ensures the stability of the clamping force during the injection molding process, but also reduces the downtime adjustment time caused by position deviation.

[0115] 2. Reduce energy consumption and equipment loss: Since the hydraulic cylinder of the present invention can accurately stay at the target position and disconnect from the pneumatic oil pressure device in time, the pneumatic oil pressure device does not need to work for a long time, thereby significantly reducing energy consumption. At the same time, the improved stability of the oil circuit reduces equipment loss caused by oil circuit fluctuations, prolongs the service life of the equipment, and further reduces maintenance costs.

[0116] 3. Improve production efficiency and equipment utilization rate: The present invention optimizes the control mechanism of the hydraulic clamp, which shortens the mold replacement time and injection molding cycle, thereby improving production efficiency and equipment utilization rate.

[0117] 4. Enhance system adaptability and flexibility: The solution of the present invention integrates time series analysis and reinforcement learning mechanisms, so that the system can dynamically adjust the control strategy according to the changes in the actual working environment. This design makes the system more adaptable and flexible, and can better cope with complex and changing injection molding production needs, such as different mold sizes, material properties, etc.

[0118] 5. Improve the level of automation and intelligence: The technical solution of the present invention provides strong support for the automation of injection molding by accurately controlling the position of the hydraulic cylinder. It not only reduces the need for manual intervention and labor intensity, but also improves the stability and reliability of the automated production line. At the same time, the introduction of the intelligent control mechanism enables the system to automatically adjust the control parameters according to production needs, realizing the intelligent management of the production process.

[0119] 6. Optimize cost-effectiveness: The present invention helps to reduce the overall production cost of the enterprise and improve cost-effectiveness by reducing energy consumption, reducing equipment loss, improving production efficiency and equipment utilization rate and other comprehensive benefits. BRIEF DESCRIPTION OF THE DRAWINGS

[0120] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0121] Figure 1 It is a schematic diagram of the method flow of the present invention;

[0122] Figure 2 It is a schematic diagram of the system composition of the present invention;

[0123] Figure 3 A schematic diagram of the training method of the ARIMA model of the present invention;

[0124] Figure 4 A schematic diagram of a training method for a reinforcement learning mechanism of the present invention;

[0125] Figure 5 It is a comparative schematic diagram of the test example of the present invention. DETAILED DESCRIPTION

[0126] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below;

[0127] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0128] Embodiment 1: Figure 1 As shown, the present embodiment discloses an adaptive control method for the hydraulic servo action of the hydraulic clamp, which aims to control the position of the hydraulic cylinder between the link of "sliding the hydraulic cylinder to the side of the poppet valve" and the link of "closing the oil circuit" so that it "fits" the position required by the poppet valve to close the oil circuit. By accurately controlling the position of the hydraulic cylinder, the jitter deviation of the piston before and after reaching the target position due to mechanical inertia can be slowed down or eliminated. This precise control can reduce the instantaneous fluctuation of the piston at the moment of switching, thereby reducing the impact force on the piston and the mold, and improving the stability and reliability of the system. Since the position of the hydraulic cylinder is precisely controlled, it can accurately reach and fit the position required by the poppet valve to close the oil circuit at the appropriate time. This smooth transition reduces the oil pressure fluctuation caused by the hysteresis of the oil flow, making the state change of the oil circuit system more stable, which is conducive to maintaining the stable operation of the entire hydraulic system. To achieve this goal, it is necessary to implement the following steps S1 to S4 in a cycle:

[0129] In this embodiment, regarding step S1, data engineering: real-time data of piston position a, oil circuit resistance b and oil flow velocity c are collected from the hydraulic clamp to form an independent variable x, where x = (a, b, c).

[0130] Specific:

[0131] (1) Piston position a acquisition: Based on the size of the mold to be clamped, the current position of the piston is acquired in real time through the displacement sensor built into the hydraulic cylinder. The size information of the mold is usually transmitted to the control system through external input or preset parameters, and the system estimates or directly obtains the expected piston position range based on this.

[0132] (2) Estimation of oil circuit resistance b: The current oil circuit resistance can be estimated by simulating the physical model of the hydraulic system or using empirical formulas based on hydraulic oil parameters (such as temperature, pressure, etc.).

[0133] (3) Measurement of oil flow velocity c: The oil flow velocity is directly measured using a flow sensor installed in the oil circuit, or is indirectly calculated using parameters such as pressure difference and oil circuit cross-sectional area.

[0134] It can be understood that, in addition to using the above calculation method, the oil circuit resistance b and the oil flow velocity c can also be directly obtained according to the theoretical design parameters of the hydraulic oil.

[0135] At the same time, the position of the hydraulic cylinder is recorded each time the poppet valve successfully closes the oil circuit as a sample of the dependent variable y (target position). Its parameters can be obtained from the sensors of the hydraulic cylinder. Then, the above data are arranged in chronological order into a time series data, namely data set D:

[0136] D=[(x1,y1),(x2,y2),...,(x n ,y n )];

[0137] Among them, (x i ,y i ) is the i-th sample, and n is the number of samples. These samples represent the exact position that the hydraulic cylinder needs to reach under different working conditions (i.e., different combinations of independent variables x) to ensure that the poppet valve can effectively close the oil circuit.

[0138] It is understandable that the dataset D can also be processed by conventional methods, such as cleaning, removing noise and outliers. Or the independent variable x can be standardized or normalized to ensure that the variables are comparable in value. The dataset D is divided into the training set D train and the test set D test .

[0139] In this embodiment, regarding step S2, the ARIMA model is activated: the ARIMA model includes a prediction function f(x(k))=y(k), which predicts the corresponding dependent variable y(k) by inputting the independent variable x(k) at time k;

[0140] For the independent variables and dependent variables in this scheme, there is an obvious trend between the two, so the ARIMA model hyperparameters p, d and q are determined based on the trend mechanism; the method for determining them is to use the training set D train The hyper parameters p, d and q are updated using the BIC information criterion, which includes the following steps S200-S201.

[0141] Specifically, in step S200, the structure of the ARIMA model is read:

[0142] The ARIMA model consists of an autoregressive (AR) part, a differencing (I) part, and a moving average (MA) part, where:

[0143] (1) Autoregressive part (AR): predicts the current value through past observations (i.e., hydraulic cylinder position). Its polynomial form is:

[0144] Φ(B)=1-φ1B-φ2B2-…-φ p Bp;

[0145] in, is the autoregressive coefficient and P is the order of autoregression, which together determine the extent to which past values ​​affect current values.

[0146] (2) Difference part (I): The difference operation is to make the non-stationary time series stationary so as to make more effective predictions. d is the order of difference, which indicates how many times the difference operation is required to make the series stationary.

[0147] (3) Moving average (MA): The prediction error is smoothed by introducing a weighted sum of a white noise sequence. Its polynomial form is:

[0148] θ(B)=1+θ1B+θ2B2+…+θ q Bq;

[0149] Among them, θ1, θ2, ..., θ q is the moving average coefficient and q is the order of the moving average, which together determine the impact of the forecast error on the current value.

[0150] Furthermore, the overall structure of the ARIMA model is:

[0151]

[0152] Where: Y k represents the observed value (i.e., the hydraulic cylinder position) at time k. B is the backshift operator. d is the order of difference, which represents the number of differences required to make the series stationary. Φ(B) is the autoregressive polynomial. Θ(B) is the moving average polynomial. ε k is a white noise sequence, representing the random error term at time k.

[0153] Specifically, step S201 activates the prediction function f(x(k)):

[0154] f(x(k))=y(k)=μ+∑ i=1 pφ i (y k-i-μ)+∑ j=1 qθ j ε k-j ;

[0155] in:

[0156] μ: intercept term, representing the average level or center line of the trend of the time series.

[0157] φ i : The i-th autoregressive coefficient, used to describe the relationship between the current value and the historical value. i It measures the degree of linear dependence between the current value in the time series and its value at the previous i time points. These coefficients are estimated during the model fitting process, and the least squares method can also be introduced to minimize the prediction error to optimize the iteration.

[0158] y k-i : The actual observed value or the differenced value (depending on the difference order d) at time points i before the prediction time k. These historical observations are used to predict the current value based on the autoregressive part. If the difference order d is greater than 0, these values ​​should be the differenced series values.

[0159] θ j : The jth moving average coefficient, used to describe the relationship between the current forecast error and the past forecast errors. θ j It measures the linear dependence between the current prediction error and the prediction errors at the previous j time points. These coefficients are also estimated during the model fitting process. At the same time, the least squares method can be introduced to minimize the prediction error to optimize the iteration.

[0160] ε k-j : The forecast error terms at j time points before the forecast time k. These forecast error terms are calculated during the model fitting process and represent the difference between the actual observed value and the model predicted value. When forecasting future values, these error terms are used to adjust the forecast value based on the moving average part.

[0161] It should be noted that, in practical applications, the implementation steps of obtaining the predicted value of the dependent variable y(k) based on steps S200 to S201 include:

[0162] P1. According to the given formula, at each step k, use the actual observation value y at the previous p time points k-i (If the data has been differentiated, it is the value after differentiation) and the prediction error term ε at the first q time points k-j (These error terms are calculated during the model training process) to calculate the predicted value y(k) at the current moment.

[0163] P2. Calculate the autoregressive part∑ i=1 pφ i (yk-i -μ), which predicts the current value based on past data points and the intercept term.

[0164] P3, plus the moving average part∑ j=1 qθ j ∈ k-j , which takes into account past forecast errors to further adjust the forecast values.

[0165] P4. Finally, add the two parts together and add the intercept term μ to get the predicted value y(k) at the current moment.

[0166] It should be noted that the above expression of the prediction function f(x(k)) temporarily ignores the difference part, because the difference is a preprocessing step for the original sequence before model fitting. k-i should be the differenced sequence value (if d>0), and ε k-j It is the residual term estimated during the model fitting process, rather than being directly observable, so it is expressed in an implicit form in this formula.

[0167] At the same time, if the difference order d>0, the predicted y(k) is actually the predicted value of the differenced sequence, so this solution provides two implementation strategies:

[0168] 1) If one wishes to implement a form of advance compensation based on predicted action for the hydraulic servo action of the hydraulic clamp, the y(k) value may be directly substituted into step S3.

[0169] 2) If you want to implement a real-time correction mode for the hydraulic servo action of the hydraulic clamp, you need to convert the y(k) value back to the original scale by accumulation (integration), that is, perform a reverse difference process and update it, and then bring it to step S3.

[0170] It can be understood that by considering the autocorrelation in the time series data and the moving average effect of the error, the prediction function can more accurately capture the dynamic changes in the data, thereby improving the prediction accuracy for future time points. With the continuous input of data and the continuous training of the model, the prediction function can adaptively adjust its parameters to better adapt to the changes in the actual system, thereby enhancing the adaptability and robustness of the hydraulic servo system. Based on the accurate prediction results, the hydraulic servo system can more accurately adjust its control strategy to ensure that the hydraulic cylinder can dynamically and accurately stay in the position required to push the poppet valve to close the oil circuit, thereby improving the overall performance and stability of the system.

[0171] Furthermore, the Python execution program of the ARIMA model disclosed in step S2 is as follows:

[0172]

[0173]

[0174]

[0175]

[0176] The above program creates a class called ArimaModel, which encapsulates the training, prediction and saving functions of the ARIMA model. It combines the three key components of autoregression (AR), difference (I) and moving average (MA).

[0177] It is understandable that for the hydraulic cylinder position prediction in this embodiment, the specific application of the ARIMA model will depend on the optimal hyperparameters p, d and q selected on the training set by the BIC information criterion, as well as the corresponding coefficients and θ1,θ2,...,θ q Therefore, in practical applications, these parameters will be obtained through the model training process, and then deployed and used for prediction tasks. In the process of training the ARIMA model, the test set D is used. test The mean square error (MSE) of the ARIMA model is verified by data, and the hyperparameters p, d and q updated in a round of training that minimizes the MSE value are selected as the optimal model parameters. The specific training method can be implemented by referring to the technical solution disclosed in Example 2.

[0178] In this embodiment, regarding step S3, a reinforcement learning mechanism is introduced: in the adaptive control method for the hydraulic servo action of the hydraulic clamp, in order to ensure that the hydraulic cylinder can dynamically and accurately stay in the position required to push the poppet valve to close the oil circuit over time, we introduced a reinforcement learning mechanism and combined it with the ARIMA model to optimize the control process.

[0179] Specifically, the reinforcement learning environment is first read, including the state space S, the action space A and the reward function. The reinforcement learning mechanism is based on the policy network designed by the policy gradient method, and the ARIMA model is used to predict the baseline value of the dynamic scaling factor α(k) near the target position as input. Then the predicted dependent variable y(k) of the ARIMA model is input into the policy network as part of the state, and the policy network adjusts the value of the dynamic scaling factor α(k) according to the current state. This step specifically includes the following steps S300~S301.

[0180] Specifically, step S300, read the reinforcement learning environment:

[0181] (1) The state space S includes the piston position a(k'), the oil resistance b(k'), the oil flow velocity c(k'), and the dependent variable y(k') predicted by the ARIMA model at the current time k'.

[0182] These state variables are formally represented as the state vector s k ', which is referred to as "state" in the following text:

[0183] s k '=[a(k'),b(k'),c(k'),y(k')];

[0184] These parameters together reflect the current operating state of the system. The state vector s k 'As the input of the subsequent strategy network, it is used to guide the adjustment of the dynamic scaling factor α(k) to optimize the position control of the hydraulic cylinder.

[0185] (2) The action space A is the value range of the dynamic scaling factor α(k), which is an interval value of [0,1] and is referred to as “action” in the following text.

[0186] (3) Reward function R(s) k ',a k ') is designed based on the deviation between the hydraulic cylinder position and the target position. The smaller the deviation, the higher the reward:

[0187] R(s k' ,a k' )=-β·|p target -p actual (s k' ,a k' )|;

[0188] Among them, β is a positive proportionality coefficient, p target is the target position, p actual (s k ',a k ') is in the current state s k ' and action a k 'The actual position of the lower hydraulic cylinder.

[0189] Through the reward function, the system can evaluate the effects of different actions and continuously optimize the control strategy based on the feedback signal. The smaller the deviation, the higher the reward, thus motivating the system to move closer to the target position.

[0190] Furthermore, the Python execution program of step S3001 is as follows:

[0191]

[0192]

[0193]

[0194] The above program uses Python and TensorFlow to build the reinforcement learning environment described above. It is a 4*4 grid world that defines the external world that the agent can interact with. It includes basic information such as state, action, reward, and whether it is finished. In the above MazeEnvironment, the agent moves in the grid, and the goal is to reach the specified end point to maximize the incentive.

[0195] Specifically, step S301, read the policy network: policy network The design is based on the policy gradient method, where Represents the parameters of the network. The policy network accepts the state s k ' as input and output action a k '(i.e., the probability distribution of the dynamic scaling factor α(k)). The specific action a is sampled from this probability distribution k ', used to adjust the control parameters of the hydraulic cylinder.

[0196] In actual operation, the system continuously collects new state-action-reward data for training and optimizing the policy network. Through the policy gradient method, the policy network can gradually learn the strategy of selecting the optimal action under different states, thereby achieving precise control of the hydraulic cylinder position.

[0197] It is understandable that by introducing the reinforcement learning mechanism and combining it with the ARIMA model to predict the baseline value of the dynamic scaling factor, the system can more accurately adjust the position of the hydraulic cylinder and reduce the deviation from the target position. Reinforcement learning continuously optimizes the control strategy through trial and error and feedback mechanisms; the ARIMA model provides the ability to predict future states and helps the system make adjustments in advance. With the accumulation of data and the continuous optimization of the policy network, the system can gradually learn more efficient control strategies and achieve adaptive control. The reinforcement learning mechanism gradually improves the control performance of the system through continuous learning and optimization processes.

[0198] Furthermore, the policy network The structure is a 3*3*1 multi-layer perceptron (MLP), which can effectively extract features from the input state and generate output actions through nonlinear transformation. Each hidden layer uses the ReLU activation function to introduce nonlinearity, while the output layer uses the sigmoid activation function to ensure that the output value (i.e., the dynamic scaling factor α(k)) is in the range [0,1].

[0199] Policy Network The specific form is as follows:

[0200] (1) Input layer:

[0201] Input status(s k' ∈R n ), where n is the dimension of the state space. This state vector contains all the key information related to the current hydraulic servo action. The input layer directly receives the state vector s k 'As the output of hidden layer 0 h(0)k', that is, h(0)k'=s k '.

[0202] (2) Hidden layer (for l = 1, 2, 3):

[0203] The output h of the lth hidden layer (l) k' is calculated as:

[0204]

[0205] Among them, h (0) k'=s k ', that is, the input layer directly passes the state as the output of the hidden layer 0; W(l) and b(l) are the weight matrix and bias vector of the lth layer respectively; ReLU is a linear rectification function, defined as ReLU(x) = max(0,x).

[0206] In the hidden layer, a linear transformation is first performed to generate an intermediate vector z (l) k'. This step uses the weight matrix W(l) and the bias vector b(l) to output h of the previous layer. (l-1) k' is implemented by weighted summation. Next, the ReLU activation function is used to activate the intermediate vector z (l) k' is transformed nonlinearly to obtain the output h of the hidden layer (l) k'. The ReLU function can introduce nonlinear factors and help the network better capture complex data relationships.

[0207] (3) Output layer: Action a of the output layer k 'Calculated as:

[0208] a k '=σ(wTh(L) k' + b) = α(k);

[0209] Among them, σ is the sigmoid activation function, W and b are the weight vector and bias term of the output layer respectively.

[0210] In the output layer, first the output of the last hidden layer (L = 3 is the total number of hidden layers) to perform a linear transformation, and calculate the intermediate value through the weight vector W and the bias term b. Finally, the sigmoid activation function is used to perform a nonlinear transformation on the intermediate value to obtain the output action a k '. Since the output range of the sigmoid function is between [0,1], ak' (i.e., the dynamic scaling factor α(k)) is also in this interval, which is critical for controlling the thrust and position adjustment of the hydraulic cylinder.

[0211] It is understandable that through the policy network Dynamic adjustment, the system can adjust according to the current state s k 'The optimal dynamic scaling factor α(k) is calculated in real time to achieve precise control of the hydraulic cylinder position. This dynamic adaptability enables the system to maintain high control accuracy and stability under different working conditions. The introduction of ReLU and sigmoid activation functions enables the network to handle complex nonlinear relationships. By adjusting the dynamic scaling factor α(k), the system can accurately control the hydraulic cylinder to stay in the position required to push the poppet valve to close the oil circuit, ensuring the accuracy and reliability of the hydraulic servo action.

[0212] Furthermore, the Python execution program of step S301 is as follows:

[0213]

[0214]

[0215] In the above program, the previously described multilayer perceptron (i.e., neural network) is defined using TensorFlow's Keras API to output the probability distribution of actions based on the current state. The multilayer perceptron in PolicyNetwork contains softmax activations and outputs action probabilities. The size of the input layer depends on the dimension of the state vector. The size of the output layer is equal to the size of the action space, that is, the number of different actions that the agent can perform.

[0216] In this embodiment, regarding step S4, closed-loop control: the dynamic scaling factor α(k) is introduced into the discretized PID controller to form an electrical signal u(k) to control the dwell position of the hydraulic cylinder of the hydraulic clamp:

[0217]

[0218] Where, e(k)=SP(k)-PV(k) is the control error, where SP(k) is the set point (target position) at k sampling moments, PV(k) is the process variable (actual position) at k sampling moments, and Δt is the sampling period. is the sum of the errors from 0 to k, simulating the continuous time integral. e(k)-e(k-1) / Δt is the difference of the errors, simulating the continuous time differential. K p is the proportional gain. K i is the integral gain. K d is the differential gain.

[0219] It is understandable that because the dynamic scaling factor α(k) is based on the predicted dependent variable y(k) at the current time k and the design of the reward function and the multi-layer perceptron in the reinforcement learning mechanism (the smaller the deviation, the higher the reward), α(k) can adaptively adjust the output of the PID controller under different working conditions, thereby achieving more precise control of the hydraulic cylinder position. When the system approaches the target position, α(k) decreases to slow down the adjustment speed and avoid overshoot; when the system is far away from the target position, α(k) increases to speed up the adjustment speed. The control signal u(k) is applied to the hydraulic control system, and by adjusting the driving force or displacement of the hydraulic cylinder, the hydraulic cylinder gradually approaches and stabilizes at the position required to push the poppet valve to close the oil circuit.

[0220] It can be understood that by introducing the dynamic scaling factor α(k), the PID controller can be adaptively adjusted according to the real-time state of the system, thereby improving the control accuracy of the hydraulic cylinder's dwell position. The application of the dynamic scaling factor helps to reduce the overshoot and oscillation of the system, so that the system can maintain stable operation under different working conditions. When the system is far away from the target position, the dynamic scaling factor can increase the output gain of the PID controller, thereby speeding up the adjustment speed and shortening the response time. This control method can adjust and optimize parameters according to different working conditions and requirements, and has strong adaptability and flexibility.

[0221] Furthermore, the python execution program of step S4 (using the pymodbus library to process the ModbusRTU protocol) is as follows:

[0222] (1) Initialize the Modbus RTU client, which will connect to the serial port of the PLC:

[0223]

[0224] (2) Generate electrical signal u(k):

[0225]

[0226]

[0227]

[0228] (3) After completing all operations, disconnect from the PLC:

[0229] client.close()

[0230] print("Connection to PLC closed")

[0231] In the above program, Modbus RTU communicates through a serial port (such as RS-485 or RS-232) and uses binary form of data transmission. It defines a message structure for exchanging data in the PLC. By using the pymodbus library, the Python program can simulate a Modbus client and communicate with a Modbus RTU-compatible PLC through a serial port. Allows Python programs to send instructions (such as writing to registers) to the PLC and receive responses from the PLC. The PIDController class encapsulates the PID control logic and provides an update method to calculate the control output u(k) based on the current error value. You can adjust the performance of the controller by modifying the values ​​of Kp, Ki, Kd, ​​and dt. In addition, α(k) is set by the set_alpha method. Write it to a specific register of the PLC through Modbus RTU. In this way, the PLC can perform corresponding operations based on this signal.

[0232] Embodiment 2: Figure 3 As shown, this embodiment discloses a training method of the ARIMA model as described in Embodiment 1, comprising:

[0233] The first step is to estimate the autoregressive coefficient using methods such as maximum likelihood estimation and least squares method. and moving average coefficients θ1,θ2,...,θ q .

[0234] The second step is to verify the goodness of fit of the model to ensure that the model can accurately capture the trends and volatility in the series.

[0235] The third step is to use the test set D test Verify the performance of the trained ARIMA model and select the optimal parameters:

[0236] The method is to calculate the mean square error (MSE) of the model on the test set:

[0237]

[0238] Among them, m is the number of test set samples, y i is the actual observed value corresponding to the sample, is the model prediction value.

[0239] If the MSE on the test set is less than a preset threshold or is better than other candidate models, the current hyperparameters are confirmed to be the optimal model parameters and proceed to the fourth step (i.e. stop training); otherwise, return to the second step above, try to adjust the hyperparameters and retrain the model.

[0240] It can be understood that through the sophisticated parameter estimation and model validation process, it is ensured that the ARIMA model can accurately capture the trend and volatility of the hydraulic cylinder position change in the hydraulic servo system, thereby improving the prediction accuracy. As the system operating conditions change (such as oil temperature fluctuations, load changes, etc.), the ARIMA model can adapt to these changes by retraining and adjusting parameters to maintain accurate control of the hydraulic cylinder position. Based on accurate prediction results, the control strategy of the hydraulic servo system can be dynamically adjusted (such as adjusting the output pressure of the pump, changing the movement speed of the hydraulic cylinder, etc.) to achieve more efficient and stable oil circuit closure operation.

[0241] Furthermore, the Python program of the training method provided in this embodiment is as follows (the statsmodels library needs to be installed):

[0242]

[0243]

[0244]

[0245] model.plot_forecast(data,forecast,'20230101','20230410')

[0246] In the above program, the ARIMA model as described in Example 1 is read based on the class of ArimaModel. The ARIMA model is defined by three parameters: p (order of autoregressive term), d (number of differences) and q (order of moving average term). Difference is the process of converting the original time series into a stationary series for subsequent analysis and prediction. The number of differences d indicates how many times the sequence is converted into a stationary series. The autoregressive term indicates that the current value depends on the historical value of the sequence. The order p of the autoregressive term indicates how many past historical values ​​are considered in the model. The moving average term is used to deal with random fluctuations in the sequence. The order q of the moving average term indicates how many past forecast errors are considered in the model.

[0247] Model training involves using historical data to estimate model parameters (such as the coefficients of autoregressive and moving average terms). Once the model is trained, it can be used to predict values ​​at future time points. Finally, by plotting the actual values ​​against the predicted values, you can visually evaluate the model's predictive performance.

[0248] Embodiment 3: Figure 4 As shown, this embodiment discloses a reinforcement learning mechanism and a training method of a policy network thereof as described in Embodiment 1. During the training process, the ARIMA model is used to predict the reference value of the dynamic scaling factor α(k) near the target position as an auxiliary input of the policy network. The policy network adjusts the value of the dynamic scaling factor α(k) according to the current state to maximize the cumulative reward. Training the policy network involves the following steps:

[0249] First, define a reinforcement learning environment, where the position, speed, pressure and other states of the hydraulic cylinder are used as the environment state s, the control signal (such as the motor drive signal) output by the policy network is used as the action a, and the system response caused by the change in the position of the hydraulic cylinder after the action is executed (such as whether the oil circuit is successfully closed) is used as the reward r. The goal is to train a policy network that can select the optimal action based on the current state to maximize the cumulative reward. Then execute:

[0250] In the first step, starting from the initial state s0, the policy network selects action a0. The initial action a0 is selected using its internal logic (the forward propagation mechanism of the multi-layer perceptron).

[0251] In the second step, perform action a0, observe the system response, and obtain the new state s1 and the corresponding reward r0. Update the internal parameters of the policy network, including the weight matrix W(l) and bias vector b(l) of the hidden layer, and the weight vector W and bias term b of the output layer. This process usually involves a backpropagation algorithm to calculate the gradient and update the parameters to minimize the loss function (mean square error MSE). Calculate the MSE values ​​of the hidden layer and the output layer to monitor the training process and evaluate the model performance.

[0252] The third step is to repeat the above process and collect state transition samples [(s0,a0,r0,s1),(s1,a1,r1,s2),...]. Use the collected samples to update the parameters of the policy network. The policy gradient algorithm (REINFORCE algorithm) is used to maximize the expectation of the cumulative reward. The REINFORCE algorithm optimizes the policy network by calculating the gradient of the cumulative reward, enabling it to select actions that are more likely to obtain high cumulative rewards.

[0253] Step 4: When the performance of the policy network tends to be stable (i.e., the MSE value no longer decreases significantly) or reaches the predetermined number of iterations, stop training. Select the round with the smallest MSE value from all training rounds, and save its corresponding weight matrix W(l), bias vector b(l), weight vector W and bias term b as the optimal model parameters.

[0254] It can be understood that by introducing the ARIMA model to predict the dynamic scaling factor, the policy network can adapt to environmental changes more accurately, especially when fine adjustments are required near the target position, improving the accuracy and stability of control. Using the reinforcement learning mechanism, the policy network can find the control strategy that best suits the current environmental conditions through continuous trial and error and learning, thereby improving the efficiency and accuracy of the hydraulic servo action.

[0255] Furthermore, the Python program for the training step of this embodiment is as follows:

[0256]

[0257]

[0258]

[0259]

[0260] In the above program, the multilayer perceptron is responsible for generating the probability distribution of possible actions based on the current state. After each episode, REINFORCE adjusts the parameters of the policy network by calculating the total reward (or the discounted cumulative reward) obtained through the complete trajectory of the simulation. When the reward is high, the probability of the corresponding action is increased; otherwise, it is reduced. Finally, TensorFlow's automatic differentiation is used to calculate the gradient of the policy network parameters and update the network accordingly.

[0261] Embodiment 4: Figure 2 As shown, this embodiment discloses an adaptive control system for the hydraulic servo action of the hydraulic clamp, which is the hardware carrier of the technical solution disclosed in the first embodiment.

[0262] Including a clamp with a self-pressurizing device, such as a heavy-duty clamp with a self-pressurizing device disclosed by the applicant (the specific structure can refer to the technical solution of Chinese invention patent CN114193706B); on this basis, it also includes:

[0263] A processor and a memory connected to the processor, wherein program instructions are stored in the memory, and when the program instructions are executed by the processor, the processor executes the adaptive control method as described above; after the electrical signal u(k) is generated, it is transmitted to a PLC controller, and the clamp is controlled by the PLC controller.

[0264] Test example:

[0265] 1. Overview

[0266] This example aims to explore the application effect of the adaptive control strategy of the hydraulic servo action of the hydraulic clamp in improving the performance of the hydraulic quick mold change system, especially in reducing mold vibration. By comparing the performance of the optimized parameter control method with the traditional manual adjustment method under specific working conditions, this study provides a new technical perspective and theoretical basis for vibration control in the injection mold production process.

[0267] (II) Experimental equipment and materials:

[0268] 2.1 Experimental group and control group shared equipment:

[0269] Injection molding machine: FA-450 two-platen large injection molding machine, used to simulate the actual production environment.

[0270] Hydraulic quick mold change system: QMCS-400T, provided by Suzhou Jinghou Intelligent Equipment Co., Ltd., the specific parameters are shown in Table 1.

[0271] Mould and material: JS008 standard bus plastic seat mould, injection moulding material is PE.

[0272] Vibration detection equipment: iSensor three-axis vibration intelligent sensor and its supporting software, used to accurately measure and record mold vibration data. The sensor is fixed to the outer shell of the mold by bonding.

[0273]

[0274] Table 1. Main parameters of QMCS-400T hydraulic quick mold change system

[0275] 2.2 Experimental group-specific equipment:

[0276] It includes a KF32A150MQV MCU processor and a P41 / solidigm P44 memory connected thereto. The memory stores program instructions. When the program instructions are executed by the processor, the processor executes an adaptive control method for the hydraulic servo action of the hydraulic clamp. After generating the control electrical signal u(k), it is handed over to the Siemens S7-1200 PLC controller to control the poppet valve in the pressure stabilizing device, thereby adjusting the oil pressure of the closed oil circuit. The main implementation parameters are as follows:

[0277] 1) The pressure increase ratio of the pneumatic pump on the pump station is 1:50, and the oil output is greater than 2.4L / min;

[0278] 2) The operating noise of the pneumatic booster pump shall not exceed 80 decibels;

[0279] 3) Maximum oil circuit pressure resistance: 39.2MPa (400kgf / cm2);

[0280] 4) Maximum air supply pressure: 0.58MPa (6kgf / cm2);

[0281] 5) Normal operating pressure: 250kgf / cm2--280kgf / cm2;

[0282] 6) Gas supply pressure range: 0.4~0.6MPa (4~6kgf / cm2);

[0283] 7) Operating temperature range: -10~70℃;

[0284] 8) Solenoid valve operating voltage: DC24V;

[0285] 9) Use 46# anti-wear high-pressure hydraulic oil;

[0286] 10) The control valves of the circuits are all leak-free hydraulic reversing valves controlled by single electromagnetic pneumatic reversing valves;

[0287] 11) When the oil pressure is lower than the set pressure (190Kgf / cm2), the system will automatically replenish the pressure;

[0288] 12) Each hydraulic circuit has a pressure detection function. When any circuit is lower than the safety pressure of 190Kgf, it will stop immediately.

[0289] (III) Experimental methods:

[0290] This study adopts a comparative experimental design, divided into an experimental group and a control group. The experimental group adopts an adaptive control method, generating a control electrical signal u(k) through the MCU processor, which is executed by the PLC controller to automatically adjust the hydraulic cylinder position of the hydraulic clamp; the control group adopts the traditional manual adjustment method.

[0291] The experimental process is divided into five stages, each with clear operation content and time allocation:

[0292] (1) Shutdown preparation stage (0-2 minutes)

[0293] (2) Hydraulic quick mold change system startup phase (2-4 minutes)

[0294] (3) Poppet valve oil supply stage (4-6 minutes)

[0295] (4) Mold clamping stage (6-8 minutes)

[0296] (5) Mold change operation and oil pressure control stage (8-9.4 minutes)

[0297] The iSensor triaxial vibration intelligent sensor recorded and plotted the mold vibration of the two sets of experiments.

[0298] (IV) Experimental results and analysis:

[0299] Using the data recorded by the iSensor triaxial vibration intelligent sensor, the mold vibration curves of the experimental group and the control group were plotted ( Figure 5 ), and conducted the following analysis:

[0300] (1) Standby stage (0-2 minutes): There was no vibration in both groups, verifying the accuracy of the sensor and system.

[0301] (2) System startup phase (2-4 minutes): Both groups experienced slight vibrations, which were mainly caused by system startup and the operation of related mechanisms, and the vibration levels were similar.

[0302] (4) Poppet valve operation stage (4-6 minutes): The vibration increased, but the difference between the two groups was not significant, indicating that the vibration in this stage was mainly caused by the poppet valve operation.

[0303] (5) Mold clamping stage (6-8 minutes): The vibration of the control group increased significantly and exceeded the preset threshold around the 7th minute, with a peak value of up to 450 dmm / s 2 , showing a serious vibration problem; while the vibration of the experimental group always remained below the threshold and decreased in a step-like manner over time, indicating that the adaptive control method effectively suppressed the vibration.

[0304] (5) Mold change operation and oil pressure control stage (8-9.4 minutes): The vibration of both groups gradually decreased, but the vibration control of the experimental group was more stable, which further verified the superiority of the adaptive control method.

[0305] (V) Conclusion:

[0306] This example verifies the significant suppression effect of mold vibration in the hydraulic rapid mold change system by the adaptive control method of the hydraulic servo action of the hydraulic clamp through comparative experiments. Compared with the traditional manual adjustment method, this method can more effectively control vibration during mold clamping and mold change, improve production stability and mold service life.

[0307] The above specific embodiments only express the embodiments of the relevant practical applications of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.

Claims

1. An adaptive control method for a hydraulic servo action of a hydraulic clamp, characterized in that: Before the hydraulic cylinder slides toward the poppet valve to close the oil circuit, perform the following steps: S1, data engineering: collect the piston position a, oil circuit resistance b and oil flow velocity c data from the hydraulic clamp in real time to form the independent variable x; set the position of the hydraulic cylinder as the dependent variable y; S2, Activate the ARIMA model: Determine the ARIMA model hyperparameters p, d, and q based on the trend mechanism, and predict the corresponding dependent variable y(k) by inputting the independent variable x(k) at time k through the prediction function f(x(k)); The structure of the ARIMA model is: Where: Y k represents the observation value at time k; B is the backshift operator; d is the order of difference; Φ(B) is the autoregressive polynomial; P is the order of autoregressive; Θ(B) is the moving average polynomial; q is the order of moving average; are the autoregressive coefficients; θ1, θ2, ..., θ q is the moving average coefficient; ε k is a white noise sequence; The method for determining the ARIMA model hyperparameters p, d and q based on the trend mechanism is: for each set of hyperparameters, the BIC value is calculated: BIC = nln(MSE) + Kln(n); Where n is the number of samples, MSE is the mean square error of the model under this set of hyperparameters, and K is the number of model parameters; the hyperparameter combination that minimizes the BIC value is selected as the initial optimal hyperparameter; The prediction function f(x(k)) is in the form of: f(x(k))=y(k)=μ+∑ i=1 pf i (y k-i -μ)+∑ j=1 qth j e k-j ; Among them, μ is the intercept term; φ i is the i-th autoregressive coefficient; y k-i is the actual observed value or differential value at time points i before the prediction time k; θ j is the jth moving average coefficient; ε k-j It is the prediction error term at j time points before the prediction time k; In the environment: The state space S includes the piston position a(k'), oil resistance b(k'), oil flow velocity c(k') at the current time k', and the dependent variable y(k') predicted by the ARIMA model at the current time k': s k ′=[a(k′),b(k′),c(k′),y(k′)]; The action space A is an interval value of [0, 1]; Reward function R(s k ′,a k ′): R(s k′ , a k′ )=-β·|p target -P actual (s k′ , a k′ )|; Among them, β is a positive proportionality coefficient, p target is the target position, p actual (s k ′,a k ′) is in the current state s k ′ and action a k 'The actual position of the lower hydraulic cylinder; S3, introducing a reinforcement learning mechanism: reading the reinforcement learning environment, including the state space S, the action space A and the reward function, the policy network uses the ARIMA model to predict the baseline value of the dynamic scaling factor α(k) near the target position as input, inputs the dependent variable y(k) as part of the state into the policy network, and adjusts the value of the dynamic scaling factor α(k) according to the current state; S4, closed-loop control: introducing the dynamic scaling factor α(k) into the PID controller to form an electrical signal u(k) to control the dwell position of the hydraulic cylinder; In S4, the implementation method of the PID controller is: Where, e(k)=SP(k)-PV(k) is the control error, where SP(k) is the set point at k sampling moments, PV(k) is the process variable at k sampling moments; Δt is the sampling period; is the sum of the errors from 0 to k; e(k)-e(k-1) / Δt is the difference of the errors; K p is the proportional gain; K i is the integral gain; K d is the differential gain.

2. The adaptive control method according to claim 1, characterized in that: In S2, the policy network The design is based on the policy gradient method, where Represents the parameters of the network; the policy network accepts the state s k ' as input and output the action a k The probability distribution of ′.

3. The adaptive control method according to claim 2, characterized in that: The policy network π is a multi-layer perceptron consisting of: Input layer: input state (s k′ ∈R n ), where n is the dimension of the state space; Hidden layer: the output h of the lth hidden layer (l) k' is: Among them, h (0) k′=s k′ ; W(l) and b (l) are the weight matrix and bias vector of the lth layer respectively; ReLU is the linear rectification function; Output layer: its action a k ' is calculated as: a k ′=σ(wTh(L) k′ + b) = α(k); Among them, σ is the sigmoid activation function, W and b are the weight vector and bias term of the output layer respectively.

4. An adaptive control system for the hydraulic servo action of a hydraulic clamp, including a clamp with a self-contained booster device, characterized in that: It also includes a processor and a memory connected to the processor, wherein the memory stores program instructions, and when the program instructions are executed by the processor, the processor executes the adaptive control method as described in any one of claims 1-3.

5. The adaptive control system according to claim 4, characterized in that: After the electrical signal u(k) is generated, it is transmitted to a PLC controller, and the clamp is controlled by the PLC controller.

Citation Information

Patent Citations

  • Hydraulic lever-ejection-type clamping device for mold and clamping and mold change methods

    CN110640066A

  • A heavy-duty clamp with built-in pressure boosting device

    CN114193706B

  • Hydraulic control valve of transmission clutch for automatic transmission

    CN102145653A

  • Constant-force grinding device and grinding control method thereof

    CN109202688A