Semi-solid magnesium alloy forming machine injection track optimization method based on iterative learning

Through iterative learning control method combined with particle swarm optimization and neural network model, the servo valve opening and pressure holding switching position are optimized, and the trajectory control accuracy problem of semi-solid magnesium alloy injection molding machine during high-speed injection is solved, achieving high-precision trajectory tracking and molding quality improvement.

CN120587433APending Publication Date: 2025-09-05YANSHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510628429.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

It is difficult for existing semi-solid magnesium alloy injection molding machines to achieve high-precision and stable trajectory control during high-speed injection, resulting in molding quality problems, such as defects such as bubbles, shrinkage holes and inclusions.

Method used

The control method based on iterative learning is adopted, combined with the BP neural network model optimized by particle swarm and the fractional-order PD controller, the servo valve opening and pressure holding switching positions are optimized, and the iterative learning controller is combined with AMESim and MATLAB/Simulink to achieve accurate tracking and control of the injection trajectory.

Benefits of technology

The semi-solid magnesium alloy injection molding machine has greatly improved the accuracy of trajectory control and the control error is less than 1%, ensuring molding quality and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120587433A_ABST
    Figure CN120587433A_ABST
Patent Text Reader

Abstract

The invention provides a semi-solid magnesium alloy forming machine injection track optimization method based on iterative learning. The semi-solid magnesium alloy forming machine injection track optimization method comprises the following steps that S1, a control system capable of conducting repeated injection is constructed based on a high-speed injection and precise brake control system in the semi-solid magnesium alloy forming machine injection process; s2, constructing a BP neural network model based on particle swarm optimization; s3, performing simulation to determine and obtain an optimal pressure maintaining switching position and an optimal control vector of the opening degree of the servo valve through multiple iterations; and S4, the optimal control vector is applied to the injection hydraulic system to obtain the optimal pressure maintaining switching position and the servo valve opening degree at the maximum injection speed required for achieving the preset track, so that the injection hydraulic system has the optimal injection track. According to the method, the injection track of the semi-solid magnesium alloy injection molding machine can be optimized, and the track control accuracy of the semi-solid magnesium alloy injection molding machine under the condition of high-speed injection is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of semi-solid magnesium alloy processing, and in particular to an injection trajectory optimization method of a semi-solid magnesium alloy forming machine based on iterative learning. Background Art

[0002] As a more advanced casting technology, magnesium alloy die-casting offers numerous advantages, including high dimensional accuracy, excellent stability, good interchangeability, and recyclable raw materials. Its products are used in various fields. While the current production capacity of die-casting machines can already meet the basic demand for die-cast parts, there is still a significant gap in intelligence and control accuracy compared to the world's most advanced die-casting machines. Semi-solid magnesium alloy injection molding machines are a type of die-casting machine. They rapidly fill the cavity of a die-casting mold with liquid alloy under high pressure and solidify it under even higher pressure to produce high-performance magnesium alloy parts. While the mechanical structure of a die-casting machine is relatively sophisticated, improving its manufacturing precision is costly. Therefore, to improve the quality of cast products, considerations can be given to improving the hydraulic control circuit, system stability, and parameter adjustment.

[0003] During the injection molding process of semi-solid magnesium alloys, an injection speed that is too fast will cause a surge phenomenon when the metal liquid enters the mold, resulting in defects such as bubbles, shrinkage cavities, and air holes, affecting the molding quality. An injection speed that is too slow will cause the metal liquid to stay in the mold for too long, resulting in condensation and solidification, causing defects such as inclusions and air holes in the product. Improper brake position setting will cause the metal liquid to stay in the mold for too long or too short, resulting in problems similar to injection speeds that are too fast or too slow, thus affecting the molding quality and performance of the product. However, the characteristics of semi-solid metals require extremely fast injection speeds, and factors such as response delays in mechanical and hydraulic systems make it difficult to achieve high-precision and stable closed-loop control of speed and brake position.

[0004] In order to maintain high precision, stable injection speed and brake position of the injection molding machine under high-speed injection, an efficient control algorithm is required. Summary of the Invention

[0005] In order to address the deficiencies of the above-mentioned prior art, the purpose of the present invention is to provide an injection trajectory optimization method for a semi-solid magnesium alloy forming machine based on iterative learning, which can optimize the injection trajectory of the semi-solid magnesium alloy forming machine and greatly improve the accuracy of trajectory control of the semi-solid magnesium alloy injection molding machine under high-speed injection.

[0006] Specifically, the present invention provides an injection trajectory optimization method for a semi-solid magnesium alloy forming machine based on iterative learning, which comprises the following steps:

[0007] S1. A control system capable of repeated injection is constructed based on the high-speed injection and precise braking control system of the injection process of a semi-solid magnesium alloy forming machine. The control system capable of repeated injection uses the control voltage for controlling the servo valve opening and the pressure-maintaining switching position as the control vector, the injection trajectory as the output vector, and the servo valve opening and the pressure-maintaining switching position as the state vector.

[0008] S2. Construct a BP neural network model based on particle swarm optimization. The BP neural network model based on particle swarm optimization is used to predict the optimal pressure-maintaining switching position and servo valve opening under multiple initial positions, main accumulator pressure, brake position, and maximum injection speed required for a preset injection trajectory according to different working conditions.

[0009] S3. The simulation determines the optimal control vector for the optimal pressure-maintaining switching position and the servo valve opening through multiple iterations. In each iteration, the control vector and control error of the previous iteration are obtained. A fractional-order PD controller is used to obtain a corrected error value, which is input into the controlled object as the control vector for this iteration for simulation. The control error and control vector of this iteration are corrected and used as the input value for the next iteration. The optimal control vector is obtained after multiple iterations.

[0010] S4. Apply the optimal control vector to the injection hydraulic system to obtain the optimal pressure-maintaining switching position and servo valve opening at the maximum injection speed required to achieve the preset trajectory, so that the injection hydraulic system has the optimal injection trajectory.

[0011] Preferably, the control system capable of repeated injection in S1 is expressed as:

[0012]

[0013] Among them, f and g are vector functions with corresponding dimensions; x k (t),u k (t), y k (t) are the state vector, control vector and output vector of the system during the kth repeated injection, is the rate of change of the system state during the k-th repeated injection.

[0014] Preferably, S2 specifically includes the following sub-steps:

[0015] S21. Use a particle swarm optimization algorithm to adjust the weight connections in the neural network to obtain a weight distribution that optimizes the performance of the entire neural network;

[0016] S22. Using the simulation platform, obtain data on the corresponding relationships among the main accumulator pressure, the servo valve control voltage, the starting injection position, and the maximum injection speed under various operating conditions; and obtain data on the corresponding relationships among the main accumulator pressure, the starting injection position, the brake position, the servo valve control voltage, and the pressure-maintaining switching position under various operating conditions;

[0017] S23, randomly divide the data into a data set and a training set, input the BP neural network algorithm based on particle swarm optimization for training, and output the predicted data. The output predicted data is the optimal servo valve opening and pressure holding switching position at the maximum injection speed and is defined as the expected initial state x k (0); state vector x k (t) is defined as the desired state, the output vector y k (t) is defined as the desired injection trajectory that can be achieved;

[0018] S24, based on the expected initial state x k (0) and the output vector can be the desired injection trajectory y k (t) High-speed injection and precise braking control can achieve the desired injection trajectory y k (t) refers to the controlled object in the control vector u k (t) reaches the desired state x k (t)t∈[0,T].

[0019] Preferably, the iterative process in S3 is specifically as follows: building an iterative learning controller based on MATLAB and AMESim, using the MATLAB and AMESim joint simulation interface to realize the communication between the iterative learning controller and the AMESim simulation platform of the high-speed injection hydraulic system, obtaining the output control vector through simulation, and finally reading the control vector and control error of the previous iteration in the MATLAB working range, using the fractional-order PD controller to calculate the corrected error value, and inputting it into the controlled object as the control vector for simulation, obtaining the control vector and control error of this time and correcting them as the input value for the next time.

[0020] Preferably, the initial conditions remain consistent during each iteration of S3.

[0021] Preferably, the control error in S3 is subjected to a limiting process and serves as a corrected error value of a learning parameter L of the iterative control of the fractional-order PD controller.

[0022] Preferably, the position and velocity of particles in the S21 particle swarm optimization algorithm are restricted to the interval

[0023] [-X max , X max ], [-V max , V max ], where Xmax ,V max are the maximum position and velocity of the particle respectively.

[0024] Preferably, the particle velocity and position update formulas in the S21 particle swarm optimization algorithm are:

[0025]

[0026] in, is the velocity component of the i-th particle in the N-th dimension after the t+1-th iteration process; is the velocity component of the i-th particle in the N-th dimension after the t-th iteration process; is the position component of the i-th particle in the N-th dimension after the t+1-th iteration process; is the position component of the i-th particle in the N-th dimension after the t-th iteration; ω is the inertia weight factor; c1 is the individual learning factor of each particle; c2 is the social learning factor of each particle, also known as the social acceleration constant; r1 and r2 are random numbers uniformly distributed in [0, 1]; is the best position currently found by the i-th particle after the t-th iteration process; is the best position found by all particles after the current t-th iteration process; N is the number of samples in the training set.

[0027] Preferably, the fitness function of the particle swarm optimization algorithm is:

[0028]

[0029] Among them, J is the fitness function, N is the number of samples in the training set; is the ideal output value of the nth sample control rate; u n is the actual output value of the nth sample control rate.

[0030] Preferably, after the iteration in S3 is completed, the position curve in the Simlink simulation result is used to determine whether the error is less than the set value. If it is less than the set value, the iteration ends. If the error is greater than the set value, the iteration continues until the error between the position curve in the simulation result and the target position curve is less than the set value, and the calculation ends.

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

[0032] (1) The present invention is based on the high-speed injection die-casting production of magnesium alloy parts by a semi-solid magnesium alloy injection molding machine. Based on the iterative learning control (ILC) algorithm, through the joint simulation of AMESim and MATLAB / Simulink, the given reference signal r(t) is tracked within a limited time interval to achieve accurate tracking of the preset injection trajectory. By using the data information from the previous action, the appropriate control input can be found through iteration, realizing iterative optimization of the control instructions. This greatly improves the accuracy of trajectory control of the semi-solid magnesium alloy injection molding machine under high-speed injection.

[0033] (2) This paper applies the iterative learning control (ILC) algorithm to a semi-solid magnesium alloy forming machine. Based on a deeper understanding of the ILC algorithm, through joint simulation analysis using MATLAB and amesim, the speed control and brake position control errors are reduced to less than 1%, greatly improving the accuracy of trajectory tracking control.

[0034] (3) The present invention combines the particle swarm optimization algorithm with the BP neural network algorithm to form a regression prediction algorithm to regressively predict the optimal servo valve opening and pressure-maintaining switching position required for the injection trajectory under different working conditions, which has excellent practical application value. At the same time, the PSO-BP neural network algorithm is combined with the iterative learning algorithm, and the output of the PSO-BP neural network algorithm is used as the input of the iterative learning algorithm to track the trajectory iteratively, thereby improving the accuracy of the predicted trajectory. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 Schematic diagram of the overall method of the present invention;

[0036] Figure 2 Schematic diagram of the high-speed injection hydraulic system optimization control method based on iterative learning control (ILC) algorithm of the present invention;

[0037] Figure 3a-Figure 3b is the evolution algebraic curve of the PSO-BP neural network in the present invention; Figure 3a The PSO-BP neural network algebra and optimal individual fitness for speed control, Figure 3b PSO-BP neural network algebra and optimal individual fitness for brake position control;

[0038] Figure 4a-4b is the neural network error histogram of speed control and brake position based on the PSO-BP neural network algorithm in the present invention; wherein, Figure 4a is the neural network error histogram for speed control, Figure 4b is the neural network error histogram of the brake position;

[0039] Figure 5a-5bSchematic diagram of the verification results of the speed control and brake position control neural network algorithms based on the PSO-BP neural network algorithm in the present invention; wherein, Figure 5a is the verification result of the neural network algorithm for speed control, Figure 5b This is the verification result of the neural network algorithm for brake position control;

[0040] Figure 6 This is the structural principle diagram of the AMESim high-speed injection hydraulic system in the present invention;

[0041] Figure 7 It is an iterative control principle diagram in the joint simulation platform MATLAB / Simulink of the present invention;

[0042] Figure 8 This is a flowchart of the operation of iterative learning control at the simulation level of the present invention;

[0043] Figure 9a-9b It is the iterative optimization result of the combined simulation control instruction of the present invention, where Figure 9a The control instruction iterative optimization results with 10 iterations are shown. Figure 9b Iterative optimization results of control instructions with 16 iterations;

[0044] Figure 10a-Figure 10b This is a schematic diagram of the target position control results of the combined simulation after optimization of the present invention, where Figure 10a This is a schematic diagram of the joint simulation target position control results after 10 optimization iterations. Figure 10b This is a schematic diagram of the target position control results of the joint simulation after 16 optimization iterations;

[0045] Figure 11a-Figure 11b Schematic diagram of the experimental results of the injection speed and brake position control algorithm based on the PSO-BP neural network algorithm in the present invention, where Figure 11a Schematic diagram of the experimental results of the injection speed control algorithm based on the PSO-BP neural network algorithm in the present invention. Figure 11b This is a schematic diagram of the experimental results of the brake position control algorithm based on the PSO-BP neural network algorithm in the present invention. DETAILED DESCRIPTION

[0046] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings.

[0047] The present invention provides an injection trajectory optimization method for a semi-solid magnesium alloy forming machine based on iterative learning, such as Figure 1 to Figure 1 1, which includes the following steps:

[0048] S1. Based on the high-speed injection and precise braking control system of the injection process of the semi-solid magnesium alloy forming machine, a control system capable of repeated injection is constructed. The control system capable of repeated injection uses the control voltage for controlling the servo valve opening and the pressure-maintaining switching position as the control vector, the injection trajectory as the output vector, and the servo valve opening and the pressure-maintaining switching position as the state vector.

[0049] The control system capable of repeated injection is expressed as:

[0050]

[0051] Among them, f and g are vector functions with corresponding dimensions; x k (t),u k (t), y k (t) are the state vector, control vector and output vector of the system during the kth repeated injection, is the rate of change of the system state during the k-th repeated injection.

[0052] S2. Construct a BP neural network model based on particle swarm optimization. The BP neural network model based on particle swarm optimization is used to predict the optimal pressure-holding switching position and servo valve opening at multiple initial positions, main accumulator pressure, brake position, and the maximum injection speed required for the preset injection trajectory according to different working conditions.

[0053] S2 specifically includes the following sub-steps:

[0054] S21. Use the particle swarm optimization algorithm to adjust the weight connection in the neural network to obtain the weight distribution that optimizes the performance of the entire neural network. In the particle swarm optimization algorithm, the position and speed of the particles are limited to the interval

[0055] [-X max , X max ], [-V max , V max ]Inside.

[0056] The particle velocity and position update formulas in the particle swarm optimization algorithm are:

[0057]

[0058] in, is the velocity component of the i-th particle in the N-th dimension after the t+1-th iteration process; is the velocity component of the i-th particle in the N-th dimension after the t-th iteration process; is the position component of the i-th particle in the N-th dimension after the t+1-th iteration process; is the position component of the i-th particle in the N-th dimension after the t-th iteration; ω is the inertia weight factor; c1 is the individual learning factor of each particle; c2 is the social learning factor of each particle, also known as the social acceleration constant; r1 and r2 are random numbers uniformly distributed in [0, 1]; is the best position currently found by the i-th particle after the t-th iteration process; is the best position found by all particles after the current t-th iteration process; N is the number of samples in the training set.

[0059] Fitness function of particle swarm optimization algorithm:

[0060]

[0061] Among them, J is the fitness function, N is the number of samples in the training set; is the ideal output value of the nth sample control rate; u n is the actual output value of the nth sample control rate.

[0062] S22. Use the simulation platform to obtain the corresponding relationship data between the main accumulator pressure, servo valve control voltage, starting injection position and maximum injection speed under various working conditions, as well as the corresponding relationship data between the main accumulator pressure, starting injection position, brake position, servo valve control voltage and pressure holding switching position under various working conditions.

[0063] S23, randomly divide the data into a data set and a training set, input the BP neural network algorithm based on particle swarm optimization for training, and output the predicted data. The output predicted data is the optimal servo valve opening and pressure holding switching position at the maximum injection speed and is defined as the expected initial state x k (0); state vector x k (t) is defined as the desired state, the output vector y k (t) is defined as the desired injection trajectory that can be achieved.

[0064] S24, based on the expected initial state x k (0) and the output vector can be the desired injection trajectory y k (t) High-speed injection and precise braking control can achieve the desired injection trajectory y k (t) refers to the controlled object in the control vector u k (t) reaches the desired state x k (t)t∈[0,T].

[0065] S3. The simulation determines the optimal control vector for the optimal pressure-maintaining switching position and the servo valve opening through multiple iterations. In each iteration, the control vector and control error of the previous iteration are obtained, and the corrected error value is obtained using the fractional-order PD controller. This error value is input into the controlled object as the control vector of this iteration for simulation, and the control error and control vector of this iteration are corrected and used as the input value for the next iteration. The optimal control vector is obtained after multiple iterations.

[0066] The iterative process specifically involves building an iterative learning controller based on MATLAB and AMESim. The MATLAB and AMESim joint simulation interface is used to enable communication between the iterative learning controller and the AMESim simulation platform for high-speed injection hydraulic systems. The control vector is then output through simulation. Finally, the control vector and control error from the previous iteration are read into the MATLAB workspace. A corrected error value is calculated using a fractional-order PD controller and used as the current control vector input to the controlled object for simulation. The resulting control vector and control error are corrected and used as the input for the next iteration. In a specific embodiment, the control error is clipped and used as the corrected error value for the learning parameter L of the iterative control of the fractional-order PD controller. After the iteration is complete, the position curve in the Simlink simulation results is used to determine whether the error is less than a set value. If so, the iteration ends. If the error is greater than the set value, the iteration continues until the error between the position curve in the simulation results and the target position curve is less than the set value. Initial conditions remain consistent throughout each iteration, namely, the initial starting position, initial servo valve opening, and initial pressure-maintaining switching position remain consistent throughout each iteration. Therefore, an initial positioning operation must be performed before each iteration begins.

[0067] S4. Apply the optimal control vector to the injection hydraulic system to obtain the optimal pressure-maintaining switching position and servo valve opening at the maximum injection speed required to achieve the preset trajectory, so that the injection hydraulic system has the optimal injection trajectory. Specific embodiments

[0069] This embodiment provides an injection trajectory optimization control method for a semi-solid magnesium alloy forming machine based on iterative learning. Figure 2-Figure 7As shown in the figure, the system includes the following steps: First, a high-speed injection and precise braking control system for the injection process of a semi-solid magnesium alloy forming machine is modeled, with x(t) being the system's state vector, u(t) the control vector, and y(t) the output vector. A repeatable injection control system is designed. Then, a BP neural network algorithm based on particle swarm optimization is used to learn the intrinsic relationships between the main accumulator pressure, injection speed, injection start position, braking position, pressure-holding switch position, and servo valve opening. This establishes a precise control model, and allows for regression prediction and adjustment of the servo valve opening and pressure-holding switch position. Given fixed main accumulator injection pressure and injection start position, the servo valve opening required to achieve the target speed is predicted. Furthermore, the predicted servo valve opening is applied to the control of the brake position to obtain the pressure-maintaining switching position, so as to achieve precise adjustment of the desired brake position; then, given the achievable desired trajectory (i.e., the ideal injection cylinder stroke trajectory) and the corresponding desired initial state (i.e., the specified injection starting position, servo valve opening, and pressure-maintaining switching position), the initial positioning of the injection system is set; secondly, an iterative learning controller is built based on MATLAB and AMESim, and the MATLAB and AMESim joint simulation interface is used to realize the communication between the iterative learning controller and the AMESim simulation platform of the high-speed injection hydraulic system, and the output control instructions are obtained through simulation, and finally, the control instructions are output in MATLAB. In the working range, the control instructions and control errors of the previous iteration are read. The 12ms hysteresis problem of the system is solved by adding an iterative learning controller with fractional-order PD tuning. The corrected error value is calculated using the fractional-order PD controller and input into the controlled object as the current instruction for simulation. The control vector and error are corrected and used as the input value for the next time. This cycle is repeated until the error between the actual position curve and the target position curve is less than the set value. The calculation is then terminated, thereby obtaining the appropriate control input to achieve high-precision and stable closed-loop control of speed and brake position. Finally, the simulation platform is combined with actual applications to verify the accuracy of the simulation.

[0070] Specific optimization control schemes such as Figure 2 As shown, specifically, it includes: S1. Perform abstract mathematical processing on the injection hydraulic system, and denote x(t) as the state vector of the system, which is n-dimensional; u(t) as the control vector, which is r-dimensional. When the output m-dimensional vector y(t) is a vector function of the state, the continuous control system can be expressed as:

[0071]

[0072] Where f and g are vector functions with corresponding dimensions. In this embodiment, taking repeated injection at a certain starting position as an example, it can be assumed that the injection system is repeatedly operated in a finite time interval [0, T], where T>0 is given. Since each round of injection action has a certain time interval, it can be assumed that the accumulator filling pressure and the return oil port back pressure are the same during the preparation process of the repeated action. Therefore, it can be considered that the functional relationship represented by the vector functions f and g in each repeated operation is unchanged, and the system dynamic characteristics described by them are said to be repeatable. Let k = 0, 1, 2, ... represent the number of repetitions under this working condition, and x k (t),u k (t), y k (t) are the state vector, control vector and output vector of the system at the kth repetition, respectively. Then the repeatable injection control system can be expressed as:

[0073]

[0074] S2. Construct a BP neural network model based on particle swarm optimization. The BP neural network model based on particle swarm optimization is used to predict the optimal pressure-holding switching position and servo valve opening at multiple initial positions, main accumulator pressure, brake position, and the maximum injection speed required for the preset injection trajectory according to different working conditions.

[0075] Particle Swarm Optimization (PSO) is combined with BP neural network to adjust the weight connection in the neural network. Assume that in the N-dimensional search space, the population X composed of n particles is X = (X1, X2, ···, X n ), where the position of the i-th particle is X i =[x i1 x i2 ···x iN ] T , i∈[1,n], Xi represents a possible solution. Substituting Xi into the objective function can calculate the fitness value corresponding to each particle position. The speed of the i-th particle is:

[0076] V i =[V i1 ,V i2 ,···,V iN ],i∈[1,n].

[0077] The particle velocity and position update formulas are:

[0078]

[0079]

[0080] Define the fitness function of PSO:

[0081]

[0082] in, is the velocity component of the i-th particle in the N-th dimension after the t+1-th iteration process; is the velocity component of the i-th particle in the N-th dimension after the t-th iteration process; is the position component of the i-th particle in the N-th dimension after the t+1-th iteration process; is the position component of the i-th particle in the N-th dimension after the t-th iteration process; ω is the inertia weight factor, which has a non-negative value range. The larger the value, the stronger the global optimization ability; c1 is the individual learning factor of each particle, also known as the individual acceleration constant; c2 is the social learning factor of each particle, also known as the social acceleration constant; r1 and r2 are random numbers uniformly distributed in [0, 1]. is the best position found by the i-th particle so far after the t-th iteration; is the best position found by all particles so far after the current t-th iteration process; N is the number of samples in the training set; is the ideal output value of the nth sample control rate; u n is the actual output value of the nth sample control rate. To prevent the blind search of particles, the position and speed of the particles are limited to the interval [-X max , X max ], [-V max , V max ] within. The fitness function is used to evaluate the performance of particles. In the context of optimizing neural networks, the network's prediction error is usually used as the fitness function, such as the mean square error. The fitness value of each particle indicates the performance of the network under the weight setting at that point. The goal of PSO is to find the particle position that minimizes the fitness function, that is, to find the weight that minimizes the network error. The PSO algorithm collaborates and competes among multiple particles, guiding the search process based on the best solutions of the group and individuals, and gradually finds the weight distribution that optimizes the performance of the entire neural network.

[0083] Specifically, by applying the PSO-BP neural network to learn the intrinsic relationship between the main accumulator pressure, servo valve opening, pressure-maintaining switching position, injection stroke, injection speed, and brake position, an accurate control model is established to regressively predict and adjust the servo valve opening and pressure-maintaining switching position. By using the high-precision AMESim simulation platform, the corresponding relationship data between the main accumulator pressure, servo valve control voltage, starting injection position and maximum injection speed under various working conditions are batch refined, as well as the corresponding relationship data between the main accumulator pressure, starting injection position, brake position, servo valve control voltage, and pressure-maintaining switching position under various working conditions. The data is randomly divided into data sets and training sets and brought into the network for training. After running the Matlab program code and completing the particle swarm optimization neural network algorithm (PSO-BP) program, the evolution termination generation is set to 50 generations. The speed control and brake position control PSO-BP neural network generations and the optimal individual fitness are as follows: Figure 3a and Figure 3b As shown. The fitness curves of the PSO-BP neural network algorithm for speed control and brake position control have converged at about 45 generations and 20 generations, and the fitness at this time is 8.6*10-7 and 1.26*10-3 respectively, which satisfies the requirement that the smaller the fitness, the smaller the error. Figure 4a-4b The results shown in the figure show that the error histogram for the speed control PSO-BP neural network is concentrated around -0.00013, and its mean absolute percentage error (MAPE) is only 0.638%. Similarly, the error for the brake position control PSO-BP neural network is concentrated around 0.006321, and its mean absolute percentage error (MAPE) is 0.785%. These findings demonstrate that the PSO-BP optimization method achieves significant results in approaching reality, with minimal error and high accuracy, making it suitable for regression prediction of optimal speed and brake control parameters.

[0084] S3. After the network reaches the training accuracy, call the sim function in MATLAB software to normalize the data samples first, and then make predictions. After obtaining the predicted data, denormalize the data and input the target speed and brake position predicted by the PSO-BP neural network to the servo valve control voltage and pressure switching position, as well as the pre-set main accumulator pressure, injection starting position, and brake position into the AMESim simulation platform to compare the speed and brake position obtained by the simulation platform with the target speed and brake position error. Figure 5a-5bAs shown, it can be seen that the target speed under the given main accumulator pressure and injection starting position is predicted by the servo valve control voltage obtained by the PSO-BP neural network. The speed simulated in the AMESim simulation platform is extremely close to the target speed, with an error of less than 1%. The target brake position under the given main accumulator pressure, starting injection position and servo valve control voltage is predicted by the PSO-BP neural network. The brake position simulated in the AMESim simulation platform is close to the target brake position, with an error of less than 1%.

[0085] High-speed injection and precise braking control within a defined stroke can be considered as a given desired trajectory (i.e., the ideal injection cylinder stroke trajectory) and a corresponding desired initial state (i.e., the specified injection start position, servo valve opening, and pressure-holding switching position) over a finite time interval [0, T]. The reachability of the desired trajectory here refers to the existence of a control vector for the controlled object with the desired initial state as the control vector, which produces a state trajectory corresponding to the desired trajectory.

[0086] Starting at time t = 0, each repetitive operation of the injection hydraulic system must begin from a certain initial point: the initial starting position, initial servo valve opening, and initial pressure-maintaining switch position. Therefore, an initial positioning operation must be performed before each iteration, and the initial point setting must meet the initial conditions. Initial conditions refer to the conditions imposed on the repeated positioning operation of the system's initial point to ensure iterative convergence during each iteration.

[0087] In a specific embodiment, an iterative learning controller is built based on MATLAB and AMESim. The MATLAB and AMESim joint simulation interface is used to realize the communication between the iterative learning controller and the AMESim simulation platform of the high-speed injection hydraulic system. A MATLAB script file is written to realize the automatic calculation of the joint simulation platform. The AMESim part of the joint simulation platform is shown in Figure 9. The joint simulation communication module therein is responsible for connecting MATLAB / Simulink and AMESim to exchange the calculation data of the two softwares, as the controlled object in the iterative learning (high-speed injection hydraulic system), to speed up the optimization speed of the iterative learning control. The MATLAB / Simulink part of the joint simulation platform is shown in Figure 10. As the core operating link of the iterative learning control joint simulation, it reads the control instructions and control errors of the previous round of iteration in the MATLAB working interval. The control error is processed by limiting, and the fractional-order PD controller is used as the L part of the learning function to correct the error value. The corrected error is added to the control instruction of the previous round of iterative control to form the control instruction of this round, which is input into the controlled object through the joint simulation interface (the high-speed injection hydraulic system simulation model of the joint simulation platform AMESim). After the simulation operation of the controlled object, the control results and control instructions of this round are output as the data basis for the next round of iterative operation. This cycle is repeated, and the specific number of iterations needs to be set. The number of iterations is set to k. After the iteration is completed, the curve in the Simlink simulation result is used to determine whether the error is less than the set value. If it is less than the set value, the iteration ends. If the error is greater than the set value, the iteration continues until the error between the actual position curve and the target position curve is less than the set value and the calculation ends.

[0088] The MATLAB running script part of the joint simulation platform serves as the running control program of the iterative learning control joint simulation. It is responsible for initializing the control instructions, importing the target control curve, initializing the two-part simulation model, optimizing the servo valve control instructions, judging whether the iterative learning is completed, and outputting the simulation calculation results.

[0089] Iterative learning control operation process at the simulation level Figure 8 As shown, open AMESim, modify the parameters of the working condition to be simulated, and then enter simulation mode. Clicking Run automatically opens the MATLAB / Simulink simulation platform. After opening the Simulink model, open the simulation script file, modify and add the desired trajectory of the working condition to be simulated, and start the simulation. After the run is completed, the simulation results are displayed and the control instructions are output.

[0090] The simulation results of high-speed injection and precise braking control system based on the injection process of semi-solid magnesium alloy forming machine are as follows: Figure 9a 、 Figure 9b 、 Figure 10a and Figure 10b shown. Figure 9a and Figure 9b This is the iterative optimization result of the control instructions for a co-simulated high-speed injection and precision braking control system for the injection process of a semi-solid magnesium alloy forming machine, as provided by the present invention. As shown in Figure 9, the injection position control instructions after the co-simulation are more accurate than the original ones, facilitating more precise control of the injection position. Figure 10a and Figure 10b The present invention provides a semi-solid magnesium alloy forming machine injection process of high-speed injection and precision braking control system after optimization of the joint simulation target position control results. Figure 10a and Figure 10b It can be seen that the target position control result after iteration has a smaller error and a more accurate braking position than the previous original target position control result. Figure 9a 、 Figure 9b 、 Figure 10a and Figure 10b The control signal after the co-simulation clearly demonstrates superior iterative performance compared to the original control signal, with both speed control and brake position control errors less than 1%. This demonstrates that the control algorithm has been significantly improved after multiple iterative learning cycles, further validating the effectiveness and applicability of iterative learning control methods for refining control signals.

[0091] S4. Apply the optimal control vector to the injection hydraulic system to obtain the optimal pressure holding switching position and servo valve opening at the maximum injection speed required to achieve the preset trajectory, so that the injection hydraulic system has the optimal injection trajectory. In this embodiment, the high-speed injection control experimental platform uses the Yizumi semi-solid magnesium alloy injection molding machine UN650MGII. The predicted data is input into the experimental platform, and 30 sets of data are selected for experimental analysis. The experimental results are as follows: Figure 11a-Figure 11b As shown in the figure, the PSO-BP neural network prediction is performed based on the target speed and target braking. The error between the experimental speed data verified on the experimental platform and the target speed of the predicted servo valve opening, as well as the error between the experimental braking endpoint data verified on the experimental platform and the target braking endpoint of the pressure-holding switching position are all within 5%, which proves that the use of the PSO-BP neural network to predict the target speed and target braking endpoint is feasible and accurate.

[0092] In summary, the present invention is based on the high-speed injection die-casting production of magnesium alloy parts by a semi-solid magnesium alloy injection molding machine. Based on the PSO-BP neural network algorithm, under the conditions of fixing the injection pressure of the main accumulator and the initial injection position, it effectively regresses and predicts and adjusts the servo valve opening and the pressure-holding switching position. The servo valve opening and pressure-holding switching position predicted by regression are used as the input of the iterative learning control (ILC) algorithm. In the iterative learning control algorithm, fractional-order PD tuning is added to the iterative controller to solve the problem of large hysteresis in the system. Through the joint simulation of AMESim and MATLAB / Simulink, the given reference signal r(t) is tracked within a limited time interval to achieve accurate tracking of the preset injection trajectory. By using the data information in the previous action, the appropriate control input can be found through iteration, and the iterative optimization of the control instructions is realized. The simulation platform and practical application are combined to verify the feasibility of the algorithm. The accuracy of trajectory control of the semi-solid magnesium alloy injection molding machine under high-speed injection is greatly improved.

[0093] The embodiments described above are merely descriptions of preferred implementations of the present invention and are not intended to limit the scope of the present invention. Without departing from the spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should fall within the scope of protection determined by the claims of the present invention.

Claims

1. A method for optimizing injection trajectory of a semi-solid magnesium alloy forming machine based on iterative learning, characterized by: It includes the following steps: S1. A control system capable of repeated injection is constructed based on the high-speed injection and precise braking control system of the injection process of a semi-solid magnesium alloy forming machine. The control system capable of repeated injection uses the control voltage for controlling the servo valve opening and the pressure-maintaining switching position as the control vector, the injection trajectory as the output vector, and the servo valve opening and the pressure-maintaining switching position as the state vector. S2. Construct a BP neural network model based on particle swarm optimization. The BP neural network model based on particle swarm optimization is used to predict the optimal pressure-maintaining switching position and servo valve opening under multiple initial positions, main accumulator pressure, brake position, and maximum injection speed required for a preset injection trajectory according to different working conditions. S3. The simulation determines the optimal control vector for the optimal pressure-maintaining switching position and the servo valve opening through multiple iterations. In each iteration, the control vector and control error of the previous iteration are obtained. A fractional-order PD controller is used to obtain a corrected error value, which is input into the controlled object as the control vector for this iteration for simulation. The control error and control vector of this iteration are corrected and used as the input value for the next iteration. The optimal control vector is obtained after multiple iterations. S4. Apply the optimal control vector to the injection hydraulic system to obtain the optimal pressure-maintaining switching position and servo valve opening at the maximum injection speed required to achieve the preset trajectory, so that the injection hydraulic system has the optimal injection trajectory.

2. The method for optimizing injection trajectory of a semi-solid magnesium alloy forming machine based on iterative learning according to claim 1, characterized in that: The control system capable of repeated injection in S1 is expressed as: Among them, f and g are vector functions with corresponding dimensions; x k (t),u k (t), y k (t) are the state vector, control vector and output vector of the system during the kth repeated injection, is the rate of change of the system state during the kth repeated injection.

3. The method for optimizing injection trajectory of a semi-solid magnesium alloy forming machine based on iterative learning according to claim 1, characterized in that: S2 specifically includes the following sub-steps: S21. Use a particle swarm optimization algorithm to adjust the weight connections in the neural network to obtain a weight distribution that optimizes the performance of the entire neural network; S22. Using the simulation platform, obtain data on the corresponding relationships among the main accumulator pressure, the servo valve control voltage, the starting injection position, and the maximum injection speed under various operating conditions; and obtain data on the corresponding relationships among the main accumulator pressure, the starting injection position, the brake position, the servo valve control voltage, and the pressure-maintaining switching position under various operating conditions; S23, randomly divide the data into a data set and a training set, input the BP neural network algorithm based on particle swarm optimization for training, and output the predicted data. The output predicted data is the optimal servo valve opening and pressure holding switching position at the maximum injection speed and is defined as the expected initial state x k (0); state vector x k (t) is defined as the desired state, the output vector y k (t) is defined as the desired injection trajectory that can be achieved; S24, based on the expected initial state x k (0) and the output vector can be the desired injection trajectory y k (t) High-speed injection and precise braking control can achieve the desired injection trajectory y k (t) refers to the controlled object in the control vector u k (t) reaches the desired state x k (t), t∈[0,T].

4. The method for optimizing injection trajectory of a semi-solid magnesium alloy forming machine based on iterative learning according to claim 1, characterized in that: The specific iterative process in S3 is as follows: building an iterative learning controller based on MATLAB and AMESim, using the joint simulation interface of MATLAB and AMESim to realize the communication between the iterative learning controller and the AMESim simulation platform of the high-speed injection hydraulic system, obtaining the output control vector through simulation, and finally reading the control vector and control error of the previous round of iteration in the MATLAB working range, using the fractional-order PD controller to calculate the corrected error value, and input it into the controlled object as the control vector for simulation, and obtain the control vector and control error of this time and correct them as the input value for the next time.

5. The method for optimizing injection trajectory of a semi-solid magnesium alloy forming machine based on iterative learning according to claim 3, characterized in that: The initial conditions remain the same in each iteration of S3.

6. The method for optimizing injection trajectory of a semi-solid magnesium alloy forming machine based on iterative learning according to claim 2, characterized in that: The control error in S3 is processed by limiting and used as the correction error value of the learning parameter L of the iterative control of the fractional-order PD controller.

7. The method for optimizing injection trajectory of a semi-solid magnesium alloy forming machine based on iterative learning according to claim 2, characterized in that: In the S21 particle swarm optimization algorithm, the position and velocity of the particles are restricted to the interval [-X max , X max ], [-V max , V max ], where X max ,V max are the maximum position and velocity of the particle respectively.

8. The method for optimizing injection trajectory of a semi-solid magnesium alloy forming machine based on iterative learning according to claim 2, characterized in that: The particle velocity and position update formulas in the S21 particle swarm optimization algorithm are: in, is the velocity component of the i-th particle in the N-th dimension after the t+1-th iteration process; is the velocity component of the i-th particle in the N-th dimension after the t-th iteration process; is the position component of the i-th particle in the N-th dimension after the t+1-th iteration process; is the position component of the i-th particle in the N-th dimension after the t-th iteration; ω is the inertia weight factor; c1 is the individual learning factor of each particle; c2 is the social learning factor of each particle, also known as the social acceleration constant; r1 and r2 are random numbers uniformly distributed in [0, 1]; is the best position currently found by the i-th particle after the t-th iteration process; is the best position found by all particles after the current t-th iteration process; N is the number of samples in the training set.

9. The method for optimizing injection trajectory of a semi-solid magnesium alloy forming machine based on iterative learning according to claim 8, characterized in that: Fitness function of particle swarm optimization algorithm: Among them, J is the fitness function, N is the number of samples in the training set; is the ideal output value of the nth sample control rate; u n is the actual output value of the nth sample control rate.

10. The method for optimizing injection trajectory of a semi-solid magnesium alloy forming machine based on iterative learning according to claim 4, characterized in that: After the iteration in S3 is completed, the position curve in the Simlink simulation result is used to determine whether the error is less than the set value. If it is less than the set value, the iteration ends. If the error is greater than the set value, the iteration continues until the error between the position curve in the simulation result and the target position curve is less than the set value, and the calculation ends.