A method and system for real-time speed control of injection in a die casting machine
The real-time speed control method for die casting machine injection, which integrates multi-sensor fusion and online parameter identification, solves the problems of multi-stage control differences and unstable switching in existing technologies. It achieves high-precision, robust, and safe die casting machine injection control, adapts to complex working conditions, and improves batch consistency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN ARCUCHI TECH CO LTD
- Filing Date
- 2026-05-12
- Publication Date
- 2026-06-09
AI Technical Summary
Existing die-casting machine injection control systems suffer from several problems, including multi-stage control differences, simplistic stage switching decisions, disconnect between adaptive control and stage operating conditions, weak anti-disturbance compensation capabilities, significant contradictions in optimization control computing power, poor speed feedback anti-interference capabilities, lack of dynamic identification of hydraulic channels before injection, reliance on single indicators for process optimization, and a lack of hardware-level interlocking mechanisms. These issues result in insufficient control precision and stability, making it difficult to meet the demands of high-end die-casting production.
Employing multi-sensor fusion technology, real-time speed control of the injection process is achieved through FPGA high-speed execution unit and MCU controller. Multi-stage precise control is achieved by combining position sensor, pressure sensor and temperature sensor. Hydraulic parameters are identified online using recursive least squares method. Disturbance compensation is performed by combining expansion state observer. A stage authorization token mechanism is set to ensure safe switching. A multi-source residual matrix is constructed for fault detection and reconstruction.
It improves the speed and pressure control accuracy throughout the injection process, reduces the impact and overshoot during stage switching, enhances the adaptability to complex working conditions, improves the robustness and reliability of the equipment, ensures the consistency of batch-level injection curves and the accuracy of process self-tuning, prevents logic conflicts, and improves the safety of the equipment.
Smart Images

Figure CN122164882A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of die-casting machine control technology, specifically to a method and system for real-time speed control of die-casting machine injection. Background Technology
[0002] Die casting is a precision casting process in which molten metal is injected into a mold cavity under high pressure and high speed, and then rapidly solidifies under pressure. It is mainly divided into three stages: slow venting, high-speed filling, and pressurization and densification. Each stage has different control requirements for injection speed, pressure, switching timing, mechanism response, and system stability.
[0003] During the slow venting stage, the plunger needs to run smoothly at low speed to fully expel the gas from the mold cavity. Abnormal speed can easily cause the molten metal to entangle and roll over, reducing the internal quality of the casting. During the high-speed filling stage, rapid acceleration and precise tracking of the set speed are required to ensure complete filling of the molten metal. Response lag and speed fluctuations can easily cause molding defects such as under-casting and cold shuts. During the pressurization and densification stage, pressure needs to be built up quickly and maintained stably to compensate for the solidification shrinkage of the metal. Pressure overshoot and fluctuations can cause problems such as flash, shrinkage cavities, and dimensional deviations.
[0004] The existing die-casting machine injection control system consists of a human-machine interface, controller, sensors, servo pump, hydraulic valve group, and injection cylinder. After the operator presets the process parameters, the controller, relying on sensor feedback, drives the hydraulic actuator to complete the entire injection action. Current conventional control methods include segmented speed control, PID, feedforward control, and simple adaptive correction. Although high-end equipment combines servo closed-loop and parameter optimization to improve stability, the injection process has characteristics such as strong nonlinearity, multi-condition coupling, frequent stage switching, and complex external disturbances. Conventional control strategies cannot simultaneously meet the requirements of stability, speed, and pressure stability at each stage.
[0005] In actual production, variations in hydraulic oil temperature, mold conditions, and casting parameters can cause load fluctuations; valve lag, servo response delay, internal leakage in cylinders, and friction changes can continuously induce deviations in speed and pressure control. Fixed control parameters cannot adapt to dynamic operating conditions, resulting in poor consistency of injection curves across different batches and operating conditions. Furthermore, the industry generally relies on single position thresholds to complete stage switching without considering speed, pressure, and mechanism status, which can easily lead to sudden speed changes and hydraulic shocks, hindering casting quality and production efficiency.
[0006] As the requirements for precision, density, and batch consistency of die-cast products gradually increase, control systems need to possess capabilities such as real-time closed-loop control, adaptive correction under operating conditions, and fault classification processing. Existing technologies can only achieve basic feedback control and lack full-process data iteration and active disturbance rejection design, making them unable to meet the production needs of high-end die casting.
[0007] The existing technology has the following shortcomings : 1. Fixed parameters are difficult to adapt to differences in multi-stage control. Existing control systems mostly employ fixed PID controllers, feedforward coefficients, and preset curves. The control objectives differ significantly across stages, and uniform parameters cannot meet the control requirements of each stage. Even when parameters are set in stages, they rely solely on mechanical switching of position and time, without online identification of changes in oil temperature, load, and hydraulic conditions. This makes them prone to tracking deviations, response lags, and control oscillations when operating conditions fluctuate.
[0008] 2. The single-stage switching judgment is prone to shock and pressure overshoot. The switching between fast and slow speeds and the pressurization input are mostly determined solely by the plunger position, without taking into account the speed error, pressure gradient, and valve group operating status at the moment of switching. This can easily cause sudden changes in control commands, leading to problems such as hydraulic shock, air entrapment, and abnormal pressure build-up, making it difficult to balance molding quality and filling efficiency.
[0009] 3. Adaptive control is disconnected from stage operating conditions and lacks closed-loop linkage. Existing adaptive and fuzzy control systems only make local adjustments to a single parameter, failing to establish a complete control closed loop encompassing stage identification, model recognition, parameter scheduling, and switching optimization. Parameter adjustments rely solely on deviation feedback, lacking the support of a precise operating condition model, making them susceptible to sensor noise and resulting in parameter oscillations and insufficient control stability.
[0010] 4. Weak disturbance rejection and compensation capabilities, and lagging dynamic control. Disturbances such as oil temperature drift, hydraulic leakage, and sudden load changes cannot be effectively monitored and actively compensated for in real time by relying solely on empirical compensation and post-event feedback adjustments. Under high-speed and booster conditions, the short control cycle and rapid pressure changes further amplify control errors due to the lag in feedback correction.
[0011] 5. The conflict between optimized control and computing power is prominent, and the effect of switching suppression is limited. Advanced control algorithms such as model prediction have excellent dynamic performance, but the computational load is large throughout the entire process, making it difficult to meet the real-time control requirements of short cycles in die casting and injection. Conventional PID control has sufficient computational power, but it cannot constrain the control increment during the stage switching process, making it difficult to effectively suppress the impact problem.
[0012] 6. Poor anti-interference capability of speed feedback and lack of multi-source fusion mechanism. Injection velocity is often calculated by differentiating position signals, which easily amplifies measurement noise; strong filtering introduces phase lag, affecting dynamic response at high speeds. The system lacks multi-sensor fusion and verification logic, making it impossible to dynamically adjust the weights of each detection signal, which can easily mislead control decisions when sensors malfunction.
[0013] 7. Lack of dynamic identification step for hydraulic channels before injection. Existing control systems only passively correct deviations during the injection process, failing to proactively detect dynamic characteristics of the hydraulic system such as response delay, damping, and hysteresis in the early stages of operation. The control algorithms and compensation strategies rely on fixed preset parameters, making them unable to adapt to performance deviations caused by equipment aging and changes in oil conditions.
[0014] 8. Process optimization relies solely on a single indicator, with insufficient curve calibration and directional correction. Existing equipment adjusts parameters based on single indicators such as peak pressure and speed deviation, without aligning the standard curve with the actual curve at key nodes. This makes it impossible to accurately locate the causes of defects in each process segment, resulting in poor parameter tuning and limited long-term optimization effects.
[0015] 9. Lack of hardware-level interlocking mechanism poses security risks to stage instructions. The logical mutual exclusion of each operation stage is implemented solely through software programs, without hardware authorization or interlock verification design. When communication, computing, or sensing malfunctions, multi-stage instruction conflicts and valve group malfunctions are likely to occur, resulting in insufficient safety and reliability of equipment operation.
[0016] Therefore, existing technologies have shortcomings and need further improvement. Summary of the Invention
[0017] To address the problems existing in the prior art, this invention provides a method and system for real-time speed control of die casting machine injection.
[0018] To achieve the above objectives, the specific solution of the present invention is as follows: This invention provides a real-time speed control method for injection in a die-casting machine, applicable to an injection control system for a die-casting machine including a human-machine interface, an Ethernet communication interface, an MCU controller, an FPGA high-speed execution unit, a sensor group, and an actuator. The sensor group includes a position sensor, a pressure sensor, a temperature sensor, a servo pump speed acquisition unit, and a valve group opening feedback unit. The position sensor and pressure sensor may employ a dual-channel redundant structure. The actuator includes a servo pump, a hydraulic valve group, and an injection cylinder. The method includes the following steps: S1. Configure the process parameters of the slow exhaust section, high-speed filling section and pressurization and compaction section through the human-machine interface. The process parameters include at least the target speed, target pressure, switching position, switching interval, switching window, PID parameter group, feedforward coefficient, expansion state observer bandwidth, model predictive control weight and safety threshold for each stage, and send them to the MCU controller through the Ethernet communication interface. S2. The FPGA high-speed execution unit acquires the injection plunger position, injection chamber pressure, oil temperature, servo pump speed, and hydraulic valve group opening feedback signals at a first sampling frequency of 1-2kHz. After preprocessing the acquired signals by limiting amplitude, removing burrs, and aligning timestamps, the signals are transmitted to the MCU controller. The MCU controller performs multi-sensor fusion based on the injection plunger position, servo pump speed, and the injection chamber pressure change rate obtained by differential filtering of the injection chamber pressure to obtain the injection speed feedback value. S3, the MCU controller divides the injection process into a slow exhaust section, a high-speed filling section, and a pressurization and compaction section, and identifies the current injection stage based on the composite triggering conditions consisting of the injection plunger position, injection speed error, and injection chamber pressure gradient. S4. The MCU controller establishes a discrete model of the controlled object for the current injection stage, and updates the discrete model of the controlled object according to the equivalent parameter vector obtained online. The fast dynamic state variables of the discrete model of the controlled object include at least the injection speed and the injection chamber pressure. The oil temperature is used as a slow variable scheduling parameter to participate in the candidate model selection, viscosity compensation and equivalent parameter correction. The equivalent parameter vector includes at least the hydraulic equivalent bulk elastic modulus, leakage coefficient and friction parameters. S5. The MCU controller uses a recursive least squares method with a forgetting factor to update the equivalent parameter vector online, and selects the current matching model based on the residual comparison results of the candidate model group, and calls the corresponding PID parameter group and feedforward coefficients according to the current matching model. S6. The MCU controller estimates the total disturbance caused by oil temperature and viscosity drift, hydraulic leakage, friction changes, gas entrainment and unmodeled dynamics through an extended state observer, and compensates the total disturbance into the speed outer loop control quantity. S7. When the current moment is within the switching window from the slow exhaust section to the high-speed filling section, or within the switching window from the high-speed filling section to the pressurization and compaction section, the MCU controller enables short-time domain model predictive control and generates target pressure command, target flow command, or target valve opening command based on the discrete model of the controlled object, the injection speed feedback value, the injection chamber pressure, and preset constraints. When the current moment is outside the switching window, the MCU controller uses multi-stage PID control, feedforward control, and total disturbance compensation corresponding to the current injection stage to generate target pressure command, target flow command, or target valve opening command. S8. The MCU controller sends the target pressure command, target flow command, or target valve opening command to the FPGA high-speed execution unit. The FPGA high-speed execution unit performs pressure / flow inner loop control, amplitude limiting processing, and slope constraint processing at a second sampling frequency of 1 to 2 kHz, and drives the servo pump and hydraulic valve group in parallel to control the injection cylinder to drive the injection plunger to complete the injection action. S9. After a pressure injection cycle ends, the MCU controller calculates the quality proxy index based on the characteristics of the pressure injection cycle, and performs self-tuning on the target speed, switching window width, extended state observer bandwidth, model predictive control weights or feedforward coefficients for the slow segment of the next pressure injection cycle based on the quality proxy index. S10. When the sensor deviation exceeds the threshold, the recursive least squares residual exceeds the limit continuously, the model predictive control solution times out, the communication watchdog times out, or the injection chamber pressure or injection speed exceeds the limit, the short-time domain model predictive control and online model switching are stopped, and the control degenerates into conservative parameter PID control, and unloading or oil return protection is executed.
[0019] Furthermore, in step S3, the composite triggering conditions for switching from the slow exhaust section to the high-speed filling section include: the injection plunger position enters the preset switching range [xs-Δx, xs+Δx], where Δx is the switching position tolerance obtained by trial molding calibration and takes a value of 1mm to 6mm; the absolute value of the injection speed error is not greater than the preset speed error threshold; and the pressure gradient of the injection chamber is not less than the first pressure gradient threshold. The composite triggering conditions for switching from the high-speed filling section to the pressurized compaction section include: the injection plunger position enters the high-speed to pressurized switching interval, the injection chamber pressure enters the preset pressure range, the injection chamber pressure gradient is not greater than the second pressure gradient threshold, and the absolute value of the difference between the injection speed feedback value and the preset end speed is not greater than the end speed approach threshold, wherein the end speed approach threshold is 0.05m / s to 0.50m / s; During stage switching, the MCU controller maps and limits the integral state of the speed outer loop, and works with the output ramp limiter and hysteresis interval to ensure that the control quantity before and after the switching is continuous.
[0020] Further, in steps S4 and S5, the discrete model of the controlled object is represented as follows: x(k+1)=A_i(θ(k))x(k)+B_i(θ(k))u(k)+E_i d(k); The above discrete model is obtained by discretizing the continuous hydraulic equivalent model with zero-order hold input. When the Euler approximation is used, A_i, B_i and E_i are obtained by multiplying the corresponding continuous model matrix by the outer loop control period h_m, and the amplitude is limited by the factory calibration table and the online identification results.
[0021] Where k represents the k-th MCU outer loop control cycle, i represents the current injection stage, A_i(θ(k)) is the state transition matrix of the current injection stage, B_i(θ(k)) is the control input matrix, E_i is the disturbance input matrix matching the dimension of the fast dynamic state variable, x(k) includes the injection speed v(k) and the injection chamber pressure p(k), u(k) is the target flow command, target pressure command or target valve opening command, d(k) is the total disturbance, and θ(k) is the equivalent parameter vector; oil temperature T(k) is not used as a fast dynamic state variable in x(k), but is used as a slow variable scheduling parameter to participate in the correction of A_i(θ(k)), B_i(θ(k)) or θ(k); The MCU controller constructs a regression vector φ(k) = [v(k), p(k), u(k), T(k), 1]^T, and updates the intermediate model coefficient vector η(k) corresponding to the dimension of the regression vector using a recursive least squares method with a forgetting factor; where T(k) is the slow variable of oil temperature, and the constant term 1 corresponds to the bias coefficient of sensor zero bias, valve dead zone, or unmodeled quasi-static bias; then, the equivalent parameter vector θ(k) is corrected according to η(k) and a preset mapping relationship or calibration table, and the forgetting factor ranges from 0.97 to 0.995, with T in the upper right corner indicating transpose; The candidate model group includes a low-temperature model, a normal-temperature model, a high-temperature model, a light-load model, and a heavy-load model. The low-temperature model, normal-temperature model, and high-temperature model correspond to operating conditions with oil temperatures below 35℃, 35℃~55℃, and above 55℃, respectively. The light-load model and heavy-load model correspond to operating conditions with peak injection chamber pressure below 60MPa and above 80MPa, respectively. The MCU controller calculates the residuals of each candidate model according to the following residual evaluation formula: J_m(k)=αJ_m(k-1)+(1-α)|y(k)- _m(k)|; Where J_m(k) is the residual of the m-th candidate model in the k-th MCU outer loop control cycle, and α is the residual smoothing coefficient with a value of 0.80 to 0.98; in the slow exhaust section and the high-speed filling section, y(k) is the measured output of the injection speed. _m(k) represents the predicted injection velocity output of the m-th candidate model; in the pressurization and compaction section, y(k) represents the measured pressure output of the injection chamber. _m(k) is the predicted output of the injection chamber pressure of the m-th candidate model; N is the number of consecutive control cycles used to confirm the current matching model and takes a value of 3 to 8. When the residual of the same candidate model is minimized over N consecutive control cycles, the MCU controller determines the candidate model as the current matching model and switches to the PID parameter group and feedforward coefficients corresponding to the current matching model.
[0022] Further, in step S6, the extended state observer is a third-order discrete extended state observer, whose state variables include the estimated output, the estimated derivative, and the total disturbance estimate; the MCU controller compensates the basic control quantity according to the total disturbance estimate to obtain the compensated speed outer loop control quantity, and uses a boundary layer function or a saturation function to suppress high-frequency chattering caused by disturbance compensation; In step S7, the switching window is a 20ms to 80ms time window centered on the stage switching point, and is executed by converting the MCU outer loop control cycle h_m into an integer number of control cycles; the prediction step size of the short-time domain model predictive control is 5 to 10, and the control step size is 2 to 4, with each step corresponding to one MCU outer loop control cycle h_m, where h_m is 2ms to 5ms; the objective function of the short-time domain model predictive control includes at least an injection velocity tracking error term, an injection cavity pressure tracking error term, a control increment penalty term, and an impact penalty term, where the impact is the rate of change of injection acceleration jerk(k) = [a(k) - a(k-1)] / h_m between adjacent control cycles; and at least two of the following constraints are applied: control increment constraint, injection cavity pressure gradient constraint, impact constraint, upper limit constraint of control quantity, and lower limit constraint of control quantity.
[0023] Further, in step S2, the position sensor acquires the position of the injection plunger at a sampling frequency of 1 to 2 kHz. The MCU controller first filters the injection plunger position using a Savitzky-Golay filter, and then differentiates the filtered injection plunger position to obtain the initial velocity estimate. The Savitzky-Golay filter has a filtering window length of 17 to 41 points and a polynomial order of 2 to 4. The MCU controller synchronously acquires the servo pump speed and the pressure change rate of the injection chamber, constructs a Kalman state model with the injection plunger position, injection speed, and injection acceleration as state variables, and uses the injection plunger position measurement, the pump speed conversion value obtained based on the servo pump displacement and the effective area of the injection cylinder, and the pressure conversion value obtained based on the continuity relationship v_p(k)=[Q_p(k)-C_t p(k)-V_c / β_e·dp(k) / dt] / A_c as measurement variables. The injection speed feedback value is obtained by adjusting the process noise and measurement noise online; where Q_p(k) is the pump-side equivalent flow rate, C_t is the equivalent leakage coefficient, V_c is the effective volume of the injection chamber, β_e is the hydraulic equivalent bulk modulus, and A_c is the effective area of the injection cylinder.
[0024] Further, in step S9, the injection cycle characteristics include maximum velocity deviation, switching overshoot, pressure build-up time, end pressure fluctuation, injection curve area deviation, pump power peak, and cycle time; the MCU controller calculates a quality proxy index based on the weighted sum of each injection cycle characteristic. When the quality proxy index exceeds a preset quality threshold, the MCU controller performs at least one of the following directional corrections based on the dominant error type: correcting the target velocity in the slow segment, correcting the switching window width, correcting the bandwidth of the extended state observer, correcting the model predictive control weight matrix, and correcting the feedforward coefficients; After one injection cycle is completed, the MCU controller also performs an injection curve multi-anchor point superposition calibration step, which includes: Multiple injection curve anchor points are extracted from the current injection cycle. The injection curve anchor points include at least the following: a first anchor point where the injection plunger position reaches the switching position from the slow exhaust section to the high-speed filling section; a second anchor point where the injection speed first reaches 90% of the target speed of the high-speed filling section; a third anchor point where the injection chamber pressure first reaches 50% of the target pressure of the pressurization and compaction section; a fourth anchor point where the injection chamber pressure first reaches 90% of the target pressure of the pressurization and compaction section; and a fifth anchor point where the injection plunger reaches the preset endpoint position. The MCU controller uses the curve segment between two adjacent injection curve anchor points as a unit to perform piecewise time normalization alignment of the speed curve and pressure curve of the current injection cycle with the standard injection curve, respectively. The MCU controller generates an overlay error matrix based on the aligned current injection cycle curve and the standard injection curve. The overlay error matrix includes the time deviation, position deviation, velocity deviation, and pressure deviation calculated within the time window of the corresponding anchor point for each injection curve anchor point. The MCU controller determines the dominant error type based on the superimposed error matrix, and corrects at least one of the following in the next injection cycle: target speed in the slow segment, slow-to-high speed switching position, high-speed-to-boost switching position, switching window width, model predictive control weight matrix, or feedforward coefficients, based on the dominant error type. Specifically, when the time deviation of the second anchor point is greater than 8ms and the speed deviation is greater than 0.12m / s, the MCU controller determines that the speed establishment in the high-speed filling section is lagging, and increases the speed error weight or feedforward coefficient in the slow-to-high-speed switching window; when the pressure deviation of the fourth anchor point is greater than 3MPa and the absolute value of the time deviation is greater than 5ms, the MCU controller determines that there is a pressure superposition error in the pressurization stage, and selects at least one of the following according to the positive or negative direction of the time deviation: reducing the pressure weight in the high-speed to pressurization switching window, increasing the control increment weight, increasing the width of the high-speed to pressurization switching window, or reducing the feedforward coefficient of the pressurization section; after a single injection cycle, the correction amount for the switching position does not exceed ±2mm, the correction amount for the switching window width does not exceed ±10ms, and the correction ratio for any weight in the model predictive control weight matrix does not exceed ±15%.
[0025] Furthermore, in the low-speed safety pre-push interval before the injection cycle enters the slow venting section, or in the safety detection interval at the beginning of the slow venting section before the molten metal front enters the gate or mold cavity, the MCU controller performs the hydraulic actuation channel pilot identification step, and no pilot perturbation is superimposed after entering the relevant slow venting main section of the cavity filling. The hydraulic actuation channel pilot identification step includes: When the position of the injection plunger is less than the preset safe displacement threshold and the pressure in the injection chamber is less than the preset safe pressure threshold, the MCU controller generates a pseudo-random binary pilot sequence. The FPGA high-speed execution unit converts the pseudo-random binary pilot sequence into a perturbation flow signal, and superimposes the perturbation flow signal onto the current target flow command to obtain a target flow detection command; During the output of the target flow rate detection command, the FPGA high-speed execution unit simultaneously acquires the injection plunger position, injection chamber pressure, injection speed feedback value, and servo pump speed. The MCU controller obtains the input delay, low-frequency gain, rise time, damping index, and hysteresis index of the hydraulic actuation channel based on the cross-correlation results between the perturbation flow signal and the pressure response of the injection chamber, and the cross-correlation results between the perturbation flow signal and the injection speed response. The MCU controller corrects the input delay compensation term in the short-time domain model predictive control based on the input delay, corrects the feedforward coefficient of the current stage based on the low-frequency gain, and corrects the control increment constraint, slope limit constraint, or impact weight in the stage switching window based on the damping index and hysteresis index. The pseudo-random binary pilot sequence has a length of 31, 63, or 127 bits, a pilot symbol period of 1 ms to 2 ms, and the amplitude of the perturbation flow signal is 0.3% to 1.5% of the rated flow. The superimposed target flow command does not exceed 8% of the rated flow. When the change in injection speed relative to the reference speed at the start of the pilot exceeds 0.03 m / s, or the change in injection chamber pressure relative to the reference pressure at the start of the pilot exceeds 1.5 MPa, or the deviation of the dual channels of the position sensor exceeds a preset threshold, the MCU controller stops the hydraulic execution channel pilot identification, cancels the perturbation flow signal, and switches the control mode back to conservative parameter PID control of the slow exhaust section.
[0026] Furthermore, a stage authorization token mechanism is established between the MCU controller and the FPGA high-speed execution unit. The stage authorization tokens include a slow exhaust authorization token, a high-speed filling authorization token, a pressurization and densification authorization token, and a load shedding protection token. Only one stage authorization token is allowed to be valid at any given time. The stage authorization token mechanism includes: The MCU controller sends a stage authorization request to the FPGA high-speed execution unit based on the current injection stage identification result; The FPGA high-speed execution unit determines whether the stage authorization request is allowed to take effect based on a preset hardware interlock table; When the slow exhaust authorization token is valid, the FPGA high-speed execution unit allows the servo pump to output low flow and prohibits the high-speed valve from being fully open and the booster valve from being open. When the high-speed charging authorization token is valid, the FPGA high-speed execution unit allows the servo pump to output high flow and the high-speed valve to open, and prohibits the booster valve from opening prematurely; When the pressurized dense authorization token is valid, the FPGA high-speed execution unit allows the pressurized valve to open and limits the high-speed valve opening to no more than the preset drop-off opening. When the unloading protection token is valid, the FPGA high-speed execution unit prevents the high-speed valve and the booster valve from opening, and allows the return oil passage to open. When the MCU controller requests to switch from a slow exhaust authorization token to a high-speed filling authorization token, it must simultaneously meet the composite triggering conditions from the slow exhaust section to the high-speed filling section, the pressure booster valve being closed, the high-speed valve drive current not exceeding the limit, the servo pump speed feedback being valid, and the pressure sensor dual-channel difference not exceeding the threshold. When the MCU controller requests to switch from the high-speed filling authorization token to the pressurized compaction authorization token, it must simultaneously meet the composite triggering conditions from the high-speed filling stage to the pressurized compaction stage, the high-speed valve opening must have fallen back to below the preset safe opening, and the injection chamber pressure must not exceed the safe pressure limit. When switching between stage authorization tokens, the FPGA high-speed execution unit sets a transition lockout state and lockout time. During the transition lockout state, the previous stage authorization token remains valid and executes the slope limiting output. The next stage authorization token only becomes effective after the hardware interlock table, sensor validity, and stage composite triggering conditions are all met. During the lockout time, the FPGA high-speed execution unit refuses to execute control commands that are inconsistent with the currently valid stage authorization token. The lockout time for switching from a slow exhaust authorization token to a high-speed filling authorization token is 3ms to 8ms, and the lockout time for switching from a high-speed filling authorization token to a pressurized compaction authorization token is 5ms to 12ms.
[0027] Furthermore, the MCU controller constructs a multi-source residual matrix and performs fault detection, fault isolation, and control reconfiguration based on the multi-source residual matrix; the multi-source residual matrix includes at least: The first residual between the position velocity obtained by filtering and differentiating the position sensor and the pump speed calculated from the servo pump speed; The second residual between the position velocity obtained by filtering and differentiating the position sensor and the pressure conversion velocity obtained by converting the pressure change rate of the injection chamber; The third residual between the predicted pressure obtained from the discrete model of the controlled object and the measured pressure measured by the pressure sensor; The fourth residual between the target speed of the servo pump and the measured speed of the servo pump; The fifth residual between the target opening degree of the hydraulic valve assembly and the feedback opening degree of the hydraulic valve assembly; The sixth residual between the equivalent parameter vector obtained through online identification and the corresponding parameters of the current matching model; The MCU controller normalizes the first to sixth residuals according to the corresponding sensing range, noise standard deviation, or calibration residual upper limit to obtain the corresponding normalized residuals. Based on the combination relationship of different normalized residuals, it distinguishes between position sensor anomalies, pressure sensor anomalies, servo pump response anomalies, hydraulic valve group jamming, oil temperature drift, and model mismatch. Among them, when the position sensor and pressure sensor adopt dual-channel redundancy, if the difference between the two channels exceeds the corresponding deviation threshold for 5ms for a continuous period of time, the channel with a larger deviation from the fusion estimate will be downweighted or removed, and the other channel will be used as a temporary reliable channel. When the position sensor is determined to be abnormal, the MCU controller reduces the weight of the position sensor in the multi-sensor fusion speed estimation and increases the weight of the servo pump speed and the rate of change of the injection chamber pressure. When a pressure sensor malfunction is detected, the MCU controller exits the short-time-domain model predictive control of the pressurization and compaction phase and adopts conservative pressure limiting. When the servo pump response is determined to be abnormal, the MCU controller reduces the ramp rate of the target flow command. When the hydraulic valve group is determined to be stuck, the MCU controller will prevent the high-speed filling section from being entered or trigger the return oil protection. When a model mismatch is detected, the MCU controller freezes online parameter identification and model switching, and reverts to the default model parameter group; Specifically, when any normalized residual exceeds the preset residual threshold for 2 to 4 consecutive MCU outer loop control cycles, fault detection is triggered. When the same fault type is identified twice consecutively, fault isolation is triggered, and control reconfiguration is completed within 20ms after triggering fault isolation. During control reconfiguration, the target flow rate does not exceed 40% of the rated flow rate, and the target pressure does not exceed 60% of the rated pressure.
[0028] The present invention also provides a real-time speed control system for die casting machine injection, for implementing the above method, including a human-machine interface, an Ethernet communication interface, an MCU controller, an FPGA high-speed execution unit, a sensor group, and an execution mechanism; The human-machine interface is used to configure the process parameters for the slow exhaust section, the high-speed filling section, and the pressurization and densification section. The Ethernet communication interface is used to realize the exchange of process parameters, status feedback and diagnostic information between the human-machine interface and the MCU controller, and to perform CRC verification, communication watchdog monitoring and abnormal retransmission. The communication refresh cycle of the Ethernet communication interface is 10ms to 20ms. Each frame of control data includes frame sequence number, timestamp and parameter version number. The MCU controller only writes the current process parameter area when the CRC verification is successful and the frame sequence number is consecutive. The sensor group includes a position sensor, a pressure sensor, a temperature sensor, a servo pump speed acquisition unit, and a valve group opening feedback unit. The position sensor and pressure sensor can adopt a dual-channel redundant structure. The position sensor is used to acquire the position of the injection plunger, the pressure sensor is used to acquire the pressure of the injection chamber, the temperature sensor is used to acquire the oil temperature, the servo pump speed acquisition unit is used to acquire the servo pump speed, and the valve group opening feedback unit is used to acquire the hydraulic valve group opening. The MCU controller is used to perform speed outer-loop control at an outer-loop scheduling frequency of 200-500Hz, and to perform stage identification, disturbance-free switching, discrete modeling of the controlled object, online parameter identification using recursive least squares method, candidate model residual selection, total disturbance compensation of the extended state observer, short-time domain model predictive control of the switching window, multi-sensor fusion speed estimation, batch-level quality back-inference self-tuning, hydraulic actuation channel pilot identification, multi-anchor point superposition calibration of the injection curve, multi-source residual fault isolation and control reconstruction, and safety degradation processing. Among these, the short-time domain model predictive control is solved within a single outer-loop control cycle, while the recursive least squares parameter writing, batch-level self-tuning, and curve calibration are performed according to a cycle or loop end event at a frequency lower than the outer-loop scheduling frequency. The FPGA high-speed execution unit is used to perform pressure / flow inner loop control, high-speed signal acquisition and preprocessing, control quantity limiting, control quantity slope constraint, stage authorization token verification, hardware interlocking, and multi-actuator parallel drive at a sampling frequency of 1 to 2 kHz. The actuator includes a servo pump, a hydraulic valve group, and an injection cylinder. The servo pump and hydraulic valve group, driven by the FPGA high-speed execution unit, adjust the pressure or flow of the injection cylinder to drive the injection plunger to complete slow exhaust, high-speed filling, and pressurization compaction actions.
[0029] The technical solution of this invention Beneficial effects 1. Improve the speed and pressure control accuracy throughout the injection process. This invention divides the injection process into three stages: slow degassing, high-speed filling, and pressurization and compaction. Multi-dimensional precise control is implemented for each stage, eliminating reliance on single parameters or position thresholds, achieving stable control at each stage, and improving the accuracy of speed and pressure control.
[0030] 2. Reduce shocks and overshoots during stage switching. Employ a composite stage identification method based on position, velocity error, and pressure gradient. Perform multiple optimization controls during switching to avoid forced switching when velocity or pressure is abnormal, thereby reducing velocity shocks, molten metal entrainment, pressure build-up shocks, and pressure overshoot.
[0031] 3. Enhance adaptability to complex operating conditions. Key hydraulic parameters are identified online using the recursive least squares method. Combined with a multi-condition candidate model residual selection mechanism, control parameters are dynamically corrected to avoid performance degradation of fixed PID parameters due to oil temperature drift, leakage, friction, and load fluctuations.
[0032] 4. Enhance the ability to actively compensate for total disturbances. Treat all types of disturbances as a total disturbance, and estimate and compensate for them in advance to the control quantity in real time through an extended state observer, thereby achieving active disturbance rejection and improving the robustness and repeatability of the injection process.
[0033] 5. Balancing real-time performance with constraint optimization effectiveness. Short-time-domain model predictive control is enabled only during critical window transitions, while efficient control methods are employed outside these windows. This achieves constraint optimization in critical stages while avoiding the computational burden of full-process optimization, making it suitable for high-speed real-time control scenarios.
[0034] 6. Obtain high-quality injection velocity feedback. By fusing multi-source velocity signals and dynamically adjusting noise parameters, the influence of position derivative noise is reduced, phase lag caused by over-filtering is avoided, and the reliability and applicability of velocity feedback are improved.
[0035] 7. Actively identify hydraulic actuator characteristics before injection. Detect hydraulic channels using pseudo-random pilot perturbation, extract key dynamic indicators, and adjust control parameters accordingly to improve the matching degree between control and the current hydraulic state.
[0036] 8. Improve batch-level injection profile consistency and process self-tuning accuracy. Extract multiple types of injection profile anchor points in each cycle, normalize and align them with the standard curve to generate an error matrix, and then specifically correct the parameters for the next cycle to avoid coarse adjustments and improve batch consistency.
[0037] 9. Prevent logical conflicts during the injection stage. Implement a stage authorization token mechanism, combined with FPGA hardware interlocks, to ensure that only one stage is valid at any given time, preventing abnormal valve group operation and improving switching and protection safety.
[0038] 10. Accurately identify the source of faults and reconfigure controls accordingly. Construct a multi-source residual matrix to distinguish various fault types, implement differentiated control reconfiguration measures, and improve the accuracy of fault handling and equipment availability.
[0039] 11. Improve equipment safety and traceability under abnormal operating conditions. In case of an anomaly, the system degrades to conservative PID control and triggers protection, while simultaneously recording complete fault and operational data to support fault diagnosis and process traceability.
[0040] 12. Establish a dedicated collaborative closed-loop control system for die casting. Integrate various control modules to form a seamless control chain around the entire injection process, simultaneously improving control accuracy, stability, adaptability, consistency, and reliability, rather than simply adding up algorithms. Attached Figure Description
[0041] Figure 1 This is the overall architecture diagram of the real-time speed control system for die-casting machine injection according to the present invention; Figure 2 This is the overall flowchart of the real-time speed control method for die casting machine injection according to the present invention; Figure 3 This is a flowchart of the multi-sensor fusion speed estimation and online parameter identification process of the present invention; Figure 4 This is a schematic diagram of the hydraulic actuator channel pilot identification and multi-anchor point superposition calibration of the present invention; Figure 5 This is a flowchart of the phase authorization token and multi-source residual fault isolation and reconstruction process of the present invention. Detailed Implementation
[0042] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, only the parts related to the present invention are shown in the accompanying drawings, and not all of them.
[0043] Example 1 This embodiment provides a real-time speed control method and system for injection in a die-casting machine, applied to the injection control process of a cold chamber die-casting machine. The cold chamber die-casting machine includes an injection cylinder, an injection plunger, a servo pump, a hydraulic valve group, an injection chamber, a mold cavity, and a control system for controlling the injection process. The control system includes a human-machine interface, an Ethernet communication interface, an MCU controller, an FPGA high-speed execution unit, position sensors, pressure sensors, temperature sensors, a servo pump speed acquisition unit, a valve group opening feedback unit, and an actuator. The actuator includes the servo pump, the hydraulic valve group, and the injection cylinder.
[0044] In this embodiment, the human-machine interface (HMI) is used for operators to input injection process parameters; the Ethernet communication interface is used to send the injection process parameters to the MCU controller and to send back the control status, fault status, and injection curve to the HMI; the MCU controller is used to perform outer-loop control of injection speed, stage identification, online parameter identification, model selection, expansion state observer disturbance compensation, switching window short-time domain model predictive control, multi-sensor fusion speed estimation, batch-level quality back-inference self-tuning, and safety degradation processing; the FPGA high-speed execution unit is used to perform inner-loop control of pressure / flow, high-speed sensor acquisition, signal preprocessing, control quantity limiting, control quantity slope constraint, stage authorization token verification, hardware interlocking, and parallel drive of multiple actuators. The online parameter identification, model switching, and short-time domain model predictive control in the MCU controller are all constrained by the outer-loop control cycle and solution timeout; if they are not completed within the specified time, conservative parameter PID control takes over.
[0045] In this embodiment, the speed outer loop control cycle of the MCU controller is set to 2.5ms, corresponding to an outer loop scheduling frequency of 400Hz; the pressure / flow inner loop control cycle of the FPGA high-speed execution unit is set to 0.5ms, corresponding to an inner loop control frequency of 2kHz. The MCU controller and the FPGA high-speed execution unit adopt a master-slave hierarchical control architecture. The fast dynamic pressure / flow closed loop, amplitude limiting and slope limiting, and parallel valve and pump drive are handled by the FPGA high-speed execution unit. The MCU controller outputs target pressure command, target flow command, or target valve opening command, and completes the solution of speed outer loop control and switching window short-time domain model predictive control within a single outer loop control cycle. If the solution times out, multi-stage PID and feedforward compensation are used to take over.
[0046] I. System Initialization and Process Parameter Settings Before the injection cycle begins, the operator inputs the injection process parameters for this batch through the human-machine interface. Taking aluminum alloy cold chamber die castings as an example, the following parameters are used in this embodiment: The target speed for the slow exhaust section is set at 0.18 m / s, with an allowable speed deviation of ±0.025 m / s; the target speed for the high-speed filling section is set at 3.2 m / s, with an allowable speed deviation of ±0.15 m / s; and the target pressure for the pressurization and compaction section is set at 82 MPa, with an allowable pressure fluctuation range of ±3 MPa.
[0047] The switching position xs1 from the slow exhaust section to the high-speed filling section is set at 145mm, and the switching interval width Δx1 is set at 4mm, meaning the first switching interval is 141mm to 149mm. The switching position xs2 from the high-speed filling section to the pressurization and compaction section is set at 268mm, and the switching interval width Δx2 is set at 3mm, meaning the second switching interval is 265mm to 271mm. The switching window from the slow exhaust section to the high-speed filling section is set at 50ms, and the switching window from the high-speed filling section to the pressurization and compaction section is set at 60ms.
[0048] In this embodiment, the system pre-stores three sets of stage PID parameters and corresponding feedforward coefficients. For the slow exhaust stage, the speed outer loop proportional coefficient Kp1 is set to 1.20, the integral coefficient Ki1 to 0.18, the derivative coefficient Kd1 to 0.015, and the feedforward coefficient Kff1 to 0.72; for the high-speed filling stage, the speed outer loop proportional coefficient Kp2 is set to 2.85, the integral coefficient Ki2 to 0.08, the derivative coefficient Kd2 to 0.020, and the feedforward coefficient Kff2 to 1.10; for the pressurization and compaction stage, the pressure outer loop proportional coefficient Kp3 is set to 2.10, the integral coefficient Ki3 to 0.12, the derivative coefficient Kd3 to 0.010, and the feedforward coefficient Kff3 to 0.95.
[0049] After the above parameters are sent to the MCU controller via the Ethernet communication interface, the MCU controller performs a CRC check. If the check passes, the parameters are written to the current process parameter area; if the check fails, the injection cycle is refused to start, and a "parameter check error" message is displayed on the human-machine interface. The Ethernet communication interface also has a communication watchdog timer with a communication refresh period of 20ms. If no valid communication frame is received for 100ms consecutively, the MCU controller determines that the communication watchdog timer has timed out and prohibits entry into the high-speed filling section.
[0050] The MCU controller and the FPGA high-speed execution unit adopt a control data synchronization mechanism with timestamps. The target pressure command, target flow command or target valve opening command issued by the MCU all contain the outer loop cycle number. The FPGA high-speed execution unit only executes control commands with consecutive sequence numbers that do not exceed the current synchronization window, so as to avoid stage control misalignment caused by communication jitter.
[0051] II. Sensor Acquisition and Fusion Speed Estimation After injection begins, the FPGA high-speed execution unit synchronously acquires data from the position sensor, pressure sensor, temperature sensor, servo pump speed acquisition unit, and valve group opening feedback unit at a sampling frequency of 2kHz. Specifically, the position sensor outputs the injection plunger position 's', the pressure sensor outputs the injection chamber pressure 'p', the temperature sensor outputs the hydraulic oil temperature 'T', the servo pump speed acquisition unit outputs the servo pump speed 'ω', and the valve group opening feedback unit outputs the hydraulic valve group opening 'u_valve'.
[0052] The FPGA high-speed execution unit first performs amplitude limiting verification and glitch removal on the position and pressure signals. Specifically, when the position change between two adjacent sampling points exceeds 2.5 mm and this change cannot be explained by the current maximum allowable speed, the FPGA high-speed execution unit marks the sampling point as an anomaly and replaces it with the linear interpolation value of the previous and next valid sampling points. When the single-cycle abrupt change in the pressure signal exceeds 8 MPa, the FPGA high-speed execution unit also performs glitch removal processing.
[0053] The MCU controller reads preprocessed data from the FPGA high-speed execution unit every 2.5ms and performs Savitzky-Golay filtering on the injection plunger position s. In this embodiment, the Savitzky-Golay filter window length is set to 25 points, and the polynomial order is set to 3. The MCU controller differentiates the filtered injection plunger position to obtain the position velocity vpos, which serves as the initial velocity estimate for the position channel.
[0054] To mitigate the noise amplification issue caused by simple position differentiation, this embodiment further incorporates servo pump speed and injection chamber pressure change rate for fused speed measurement. The MCU controller establishes a Kalman state model: X_k=[s(k), v(k), a(k)]^T; Where s(k) is the position of the injection plunger in the kth control cycle, v(k) is the injection velocity, and a(k) is the injection acceleration. The measurement vector is set as: Y_k=[s_meas(k),αω(k),γ·dp(k) / dt]^T; Where s_meas(k) is the position of the injection plunger measured by the position sensor, ω(k) is the servo pump speed, dp(k) / dt is the pressure change rate of the injection chamber, α is the conversion factor from pump speed to injection speed, and γ is the conversion factor from pressure change rate to speed change trend. γ is determined based on the pressure-flow continuity relationship established by the effective area of the injection cylinder, the hydraulic equivalent volumetric elastic modulus, and the effective volume of the injection chamber, and can be identified or corrected by the pilot frequency identification or calibration parameters of the hydraulic actuation channel. The upper right corner T indicates transposition. In this embodiment, α is set to 0.0018 and γ is set to 0.0006.
[0055] When the hydraulic oil temperature T is between 35℃ and 55℃ and the pressure sensor signal is stable, the MCU controller reduces the noise weight corresponding to the pressure change rate in the measurement noise matrix Rk by 20% to enhance the contribution of the pressure change rate to the speed trend judgment. When the pressure signal fluctuation is greater than 5MPa, the noise weight corresponding to the pressure change rate is increased by 50% to avoid pressure noise interfering with the speed feedback. The speed value obtained after Kalman fusion is used as the injection speed feedback value vf, which is also used for speed outer loop control, stage identification, online parameter identification, and expansion state observer disturbance estimation.
[0056] III. Identification and Seamless Switching During Injection Phase This embodiment divides the injection process into a slow exhaust stage, a high-speed filling stage, and a pressurization and compaction stage. The MCU controller does not switch stages solely based on the injection plunger position, but instead uses the injection plunger position, speed error, and pressure gradient together to form a composite triggering condition.
[0057] In the slow exhaust phase, the target speed vref1 is 0.18 m / s. The MCU controller continuously calculates the speed error ev: ev=vref1-vf.
[0058] When the injection plunger position s enters the first switching range of 141mm to 149mm, and the absolute value of the velocity error |ev| is not greater than 0.025m / s, while the pressure gradient dp / dt in the injection chamber is not less than 0.8MPa / ms, the MCU controller determines that the slow exhaust section meets the switching conditions and allows entry into the high-speed filling section. If the injection plunger position has already entered the first switching range, but the absolute value of the velocity error is greater than 0.025m / s, the MCU controller delays the switching and gradually increases the target flow rate through a slope limiting method to avoid impact caused by direct switching before the velocity has stabilized.
[0059] In the high-speed filling section, the target velocity vref2 is 3.2 m / s. The MCU controller continuously monitors the injection chamber pressure p, pressure gradient dp / dt, and injection velocity vf. When the injection plunger position s enters the second switching range of 265 mm to 271 mm, and the injection chamber pressure p reaches 65 MPa to 78 MPa, while the pressure gradient dp / dt is not greater than 0.35 MPa / ms, and the injection velocity vf drops below 0.35 m / s, the MCU controller determines that the high-speed filling section meets the switching conditions and allows entry into the pressurization and compaction section.
[0060] During phase switching, the MCU controller maps and limits the integral state of the outer speed loop from the previous phase. The integral state update method is as follows: I_new=clamp(I_old,I_min,I_max)+κ(u_ref,new-u_ref,old); Where I_old represents the integral state before switching, I_new represents the integral state after switching, I_min is set to -20%, I_max is set to 20%, clamp(·) represents the amplitude limiting function that restricts the input quantity to the interval [I_min, I_max], κ is set to 0.15, u_ref,new is the reference control quantity after switching, and u_ref,old is the reference control quantity before switching. This integral state mapping avoids sudden zeroing or accumulation of the integral term during switching, which could cause a jump in the control quantity.
[0061] Simultaneously, the MCU controller applies slope constraints to the target pressure command, target flow command, or target valve opening command output to the FPGA high-speed execution unit. When switching from the slow exhaust section to the high-speed filling section, the maximum rise slope of the target flow rate is set to 18% / ms of the rated flow rate; when switching from the high-speed filling section to the pressurization and compaction section, the maximum rise slope of the target pressure is set to 2.5 MPa / ms. Through integral state mapping, amplitude limiting, slope limiting, and hysteresis judgment, the control quantity during the stage switching process can be kept continuous, reducing injection speed shock and pressure overshoot.
[0062] IV. Discrete Model of Controlled Object and Online Parameter Identification Within each MCU control cycle, the MCU controller establishes a discrete model of the controlled object based on the current injection stage. The discrete model of the controlled object is represented as: x(k+1)=A_i(θ(k))x(k)+B_i(θ(k))u(k)+E_i d(k); Where k represents the k-th MCU outer loop control cycle, i represents the current injection stage, A_i(θ(k)) is the state transition matrix of the current injection stage, B_i(θ(k)) is the control input matrix, E_i is the disturbance input matrix matching the dimension of the fast dynamic state variable, x(k) is the fast dynamic state vector, x(k)=[v(k), p(k)]^T; v(k) is the injection speed, p(k) is the injection chamber pressure; u(k) is the target flow command, target pressure command, or target valve opening command; d(k) is the total disturbance; θ(k) is the equivalent parameter vector; the hydraulic oil temperature T(k) is used as a slow variable scheduling parameter to participate in the correction of A_i(θ(k)), B_i(θ(k)) or θ(k), and the upper right corner T indicates transpose.
[0063] In this embodiment, the equivalent parameter vector is set as follows: θ(k)=[β_e(k),k_leak(k),f_c(k),f_v(k)]^T; Where β_e(k) is the hydraulic equivalent bulk modulus, k_leak(k) is the leakage coefficient, f_c(k) is the Coulomb friction parameter, and f_v(k) is the viscous friction parameter.
[0064] The MCU controller constructs a regression vector: φ(k)=[v(k), p(k), u(k), T(k), 1]^T; and constructs an intermediate model coefficient vector corresponding to the dimensions of the regression vector: η(k)=[a_v(k), a_p(k), a_u(k), a_T(k), a_0(k)]^T; where T(k) is the slow variable of oil temperature, and a_0(k) corresponds to the sensor zero bias, valve dead zone, or unmodeled quasi-static bias; The intermediate model coefficient vector η(k) is identified online using a recursive least squares method with a forgetting factor. In this embodiment, the forgetting factor λ is set to 0.985, and the initial value of the parameter covariance matrix P(0) is set to 100I, where I is the identity matrix. The recursive update process is as follows: K(k)=P(k-1)φ(k) / [λ+φ^T(k)P(k-1)φ(k)]; η(k)=η(k-1)+K(k)[y(k)-φ^T(k)η(k-1)]; P(k)=1 / λ·[P(k-1)-K(k)φ^T(k)P(k-1)].
[0065] Where K(k) is the gain vector and y(k) is the actual output. In this embodiment, the slow exhaust section and the high-speed filling section use the injection speed as the main output y(k), and the pressurization and compaction section uses the injection chamber pressure as the main output y(k). The update result of the intermediate model coefficient vector η(k) does not directly change the fast dynamic of oil temperature, but is used to correct viscosity compensation, leakage coefficient or candidate model scheduling.
[0066] The MCU controller corrects the equivalent parameter vector θ(k) based on the intermediate model coefficient vector η(k) and the hydraulic actuation channel calibration table or a preset mapping relationship. β_e(k), k_leak(k), f_c(k), and f_v(k) are obtained from coefficients such as a_p(k), a_u(k), a_v(k), and a_T(k) after dimensional conversion, amplitude limiting, and smoothing. To avoid frequent jumps in model parameters due to high-frequency noise, the MCU controller does not directly switch model parameters in every control cycle. Instead, it performs a parameter stability check every 10ms. Only when the rate of change of four consecutive parameter updates is less than 8%, and the residual does not exceed the preset residual upper limit, does the MCU controller allow the corrected equivalent parameter vector to be written into the current controlled object's discrete model.
[0067] V. Candidate Model Residual Selection and Gain Scheduling In this embodiment, the MCU controller pre-stores five types of candidate models: low-temperature model, normal-temperature model, high-temperature model, light-load model, and heavy-load model. The low-temperature model corresponds to operating conditions where the hydraulic oil temperature is below 35°C; the normal-temperature model corresponds to operating conditions where the hydraulic oil temperature is between 35°C and 55°C; the high-temperature model corresponds to operating conditions where the hydraulic oil temperature is above 55°C; the light-load model corresponds to operating conditions where the peak pressure in the injection chamber is below 60 MPa; and the heavy-load model corresponds to operating conditions where the peak pressure in the injection chamber is above 80 MPa.
[0068] For intermediate load conditions of 60MPa to 80MPa, the MCU controller prioritizes keeping the current matching model unchanged and selects the light load model or heavy load model according to the principle of minimum residual and hysteresis criterion to prevent frequent switching near the boundary.
[0069] The MCU controller calculates the residual of the m-th candidate model as follows: J_m(k)=αJ_m(k-1)+(1-α)|y(k)- _m(k)|; Where J_m(k) is the residual of the m-th candidate model in the k-th control period, α is the residual smoothing coefficient with a value of 0.80 to 0.98, and y(k) is the actual output. _m(k) represents the predicted output of the m-th candidate model. In this embodiment, α is set to 0.85.
[0070] When the residual of the same candidate model is at its minimum for six consecutive MCU control cycles, the MCU controller determines that candidate model as the current matching model and calls the corresponding PID parameter group and feedforward coefficient. For example, when the hydraulic oil temperature rises from 42℃ to 58℃, and the residual of the high-temperature model is smaller than that of other candidate models for six consecutive control cycles, the MCU controller switches the current matching model to the high-temperature model, while appropriately increasing the feedforward coefficient and decreasing the integral coefficient to compensate for the viscosity change and increased leakage caused by the increase in oil temperature.
[0071] If the residual from the recursive least squares method exceeds the preset residual limit for 12 consecutive control cycles, the MCU controller freezes the model switching and reverts to the default room temperature model parameter group to prevent abnormal data from causing incorrect switching of control parameters.
[0072] VI. Expansion State Observer Disturbance Compensation During the injection process, hydraulic oil viscosity drift, leakage changes, friction changes, load fluctuations, gas entrainment, and unmodeled dynamics can all cause injection speed deviations or pressure fluctuations. To improve disturbance rejection capability, this embodiment treats all of the above factors as a total disturbance d, and estimates it using a third-order discrete extended state observer.
[0073] The state variables of the third-order discrete extended state observer include z1, z2, and z3, where z1 is the estimated output, z2 is the estimated derivative, and z3 is the estimated total perturbation. The observer update method is as follows: z1(k+1)=z1(k)+h[z2(k)-β1(z1(k)-y(k))]; z2(k+1)=z2(k)+h[z3(k)-β2fal(z1(k)-y(k))+b0u(k)]; z3(k+1)=z3(k)-hβ3fal(z1(k)-y(k)).
[0074] Where h is the MCU control cycle, in this embodiment h=0.0025s; b0 is the estimated control gain; β1, β2 and β3 are observer parameters; fal(·) is the nonlinear error feedback function with a boundary layer, which can be implemented using a piecewise power function or a saturation function, and the boundary layer width δ is set according to the sensor noise level; when the absolute value of the error is less than δ, it is output as a linear term, and when the absolute value of the error is not less than δ, it is output as a limiting term or a power function term, which is used to suppress high-frequency chattering caused by measurement noise. In the slow exhaust section, β1 is set to 180, β2 is set to 10800, and β3 is set to 216000; in the high-speed filling section, β1 is set to 260, β2 is set to 20280, and β3 is set to 527280; in the pressurization and compaction section, β1 is set to 220, β2 is set to 14520, and β3 is set to 319440.
[0075] The MCU controller compensates the basic control quantity u0(k) based on the total disturbance estimate z3(k) to obtain the compensated control quantity u(k): u(k) = u0(k) - z3(k) / b0.
[0076] To prevent high-frequency chattering, this embodiment uses a saturation function instead of an ideal switching function. The boundary layer width of the saturation function is set to 0.03. When the absolute value of the error is less than the boundary layer width, the compensation amount is output according to a linear relationship; when the absolute value of the error is greater than the boundary layer width, the compensation amount is limited to a preset upper limit. The disturbance compensation upper limit for the slow exhaust section is set to 12% of the rated control amount, for the high-speed filling section it is set to 18% of the rated control amount, and for the pressurization and compaction section it is set to 15% of the rated control amount.
[0077] VII. Switching Window Short-Time Domain Model Predictive Control In this embodiment, the short-time-domain model predictive control does not operate continuously throughout the entire injection process, but is only activated during the switching windows between the slow exhaust phase and the high-speed filling phase, and between the high-speed filling phase and the pressurization and compaction phase. The switching window from the slow exhaust phase to the high-speed filling phase is set to a 50ms time window centered on the first switching position; the switching window from the high-speed filling phase to the pressurization and compaction phase is set to a 60ms time window centered on the second switching position.
[0078] Within the switching window, the MCU controller performs short-time domain model predictive control based on the discrete model of the currently controlled object, the current injection speed feedback value, the current injection chamber pressure, and the target trajectory. In this embodiment, the prediction step size Np is set to 8, and the control step size Nc is set to 3. Each prediction step corresponds to one MCU outer loop control cycle h_m, where h_m is 2.5ms. Therefore, Np covers a 20ms prediction time domain, and Nc covers a 7.5ms control time domain. The objective function of the model predictive control is: J=Σ_{j=1}^{N_p}[q_v(v_ref(j)-v(j))²+q_p(p_ref(j)-p(j))²+r_u(Δu(j))²+r_j(jerk(j))²].
[0079] Where N_p is the prediction step size, v_ref(j) is the target velocity of the j-th prediction step, v(j) is the predicted velocity of the j-th prediction step, p_ref(j) is the target pressure of the j-th prediction step, p(j) is the predicted pressure of the j-th prediction step, Δu(j) is the control increment of the j-th prediction step, jerk(j) is the impact of the j-th prediction step and jerk(j)=[a(j)-a(j-1)] / h_m, q_v is the velocity error weight, q_p is the pressure error weight, r_u is the control increment weight, and r_j is the impact weight.
[0080] When switching from the slow exhaust section to the high-speed filling section, q_v is set to 1.00, q_p to 0.25, r_u to 0.12, and r_j to 0.30 to prioritize a smooth speed increase; when switching from the high-speed filling section to the pressurization and compaction section, q_v is set to 0.45, q_p to 1.20, r_u to 0.18, and r_j to 0.40 to prioritize limiting pressure overshoot and pressure build-up shock.
[0081] The model predictive control applies the following hard constraints: control increment |Δu| is not greater than 10% of the rated control quantity; pressure gradient dp / dt in the injection chamber is not greater than 2.5 MPa / ms; impact jerk is not greater than 80 m / s³; target flow command is not less than 0 and not greater than the rated flow; target pressure command is not less than 0 and not greater than 90 MPa.
[0082] When model predictive control completes the solution within a single MCU control cycle of 2.5ms, the MCU controller uses the first step control quantity output by model predictive control as the target pressure command, target flow command, or target valve opening command, and sends it to the FPGA high-speed execution unit. When model predictive control fails to complete the solution within 2.5ms, the MCU controller immediately exits model predictive control and is replaced by multi-stage PID control, feedforward control, and extended state observer disturbance compensation in the current stage to ensure the real-time performance of injection control.
[0083] The MCU controller divides the switching window length by the outer loop control cycle h_m and rounds down to obtain the number of executable MPC cycles within the window. When the window boundary is not aligned with the outer loop cycle as an integer, the first complete outer loop cycle whose timestamp falls within the window is taken as the MPC start cycle, and the previous complete outer loop cycle whose timestamp exceeds the window is taken as the MPC end cycle.
[0084] 8. FPGA pressure / flow inner loop control and actuator drive After receiving the target pressure command, target flow command, or target valve opening command from the MCU controller, the FPGA high-speed execution unit performs pressure / flow inner-loop control at a frequency of 2kHz. For the target flow command, the FPGA high-speed execution unit adjusts the servo pump speed and hydraulic valve group opening based on servo pump speed feedback and valve group opening feedback; for the target pressure command, the FPGA high-speed execution unit adjusts the servo pump output pressure and hydraulic valve group flow area based on pressure sensor feedback; for the target valve opening command, the FPGA high-speed execution unit performs opening closed-loop verification and amplitude limiting output based on the feedback value from the valve group opening feedback unit.
[0085] The FPGA high-speed execution unit performs amplitude limiting and slope constraint processing on the target control quantity. The upper limit of the target flow rate command is set to 100% of the rated flow rate, and the lower limit is set to 0; the upper limit of the target pressure command is set to 90MPa, and the lower limit is set to 0. If the target control quantity exceeds the upper limit, the FPGA high-speed execution unit limits it to the upper limit value; if it is lower than the lower limit, it limits it to the lower limit value. If the change in the target control quantity between two adjacent control cycles exceeds the allowable slope, the FPGA high-speed execution unit gradually approaches the target value according to the maximum allowable slope.
[0086] In the slow exhaust section, the FPGA high-speed actuator prioritizes ensuring stable flow, allowing the injection plunger to advance smoothly at low speed. In the high-speed filling section, the FPGA high-speed actuator improves the servo pump response speed and valve opening, enabling the injection plunger to quickly reach the high-speed filling target speed. In the pressurization and densification section, the FPGA high-speed actuator prioritizes ensuring that the injection chamber pressure is quickly established and maintained to improve the density of the casting.
[0087] IX. Batch-level quality back-engineering self-tuning After each injection cycle is completed, the MCU controller extracts the feature vector F of that injection cycle: F = [maximum speed deviation, switching overshoot, pressure build-up time, end pressure fluctuation, injection curve area deviation, pump power peak, cycle time].
[0088] In this embodiment, the maximum speed deviation is the maximum absolute difference between the actual injection speed curve and the target speed curve; the switching overshoot is the maximum extent by which the injection speed or injection chamber pressure exceeds the target value within 80ms after the stage switching; the pressure build-up time is the time required from the end of the high-speed filling section to the injection chamber pressure reaching 82MPa; the end pressure fluctuation is the difference between the maximum and minimum pressure values within the last 100ms of the pressurization and compaction section; the injection curve area deviation is the deviation between the integral area of the actual speed curve and the integral area of the target speed curve; the pump power peak value is the maximum power of the servo pump in the current injection cycle; and the cycle time is the total time from the start of injection to the end of pressurization and pressure holding.
[0089] The MCU controller calculates the quality proxy index Q as follows: Q = Σw_iF_i.
[0090] In this embodiment, F_i represents the normalized i-th injection cycle feature, and w_i represents the corresponding weight; the weight for maximum velocity deviation is set to 0.25, the weight for switching overshoot is set to 0.20, the weight for pressure build-up time is set to 0.15, the weight for end pressure fluctuation is set to 0.15, the weight for injection curve area deviation is set to 0.10, the weight for pump power peak value is set to 0.10, and the weight for cycle time is set to 0.05. All feature quantities are normalized to 0 to 1 before being included in the calculation.
[0091] When the quality performance index Q is not greater than 0.35, the MCU controller keeps the process parameters unchanged for the next injection cycle; when Q is greater than 0.35 but not greater than 0.55, the MCU controller performs mild self-tuning; when Q is greater than 0.55, the MCU controller performs enhanced self-tuning and prompts the human-machine interface to pay attention to the stability of the operating conditions.
[0092] When the dominant error type is speed fluctuation in the slow exhaust section, the MCU controller will reduce the target speed of the slow section in the next cycle by 3% to 5% and appropriately reduce the proportional coefficient of the slow section; when the dominant error type is the switching shock from slow to high speed, the MCU controller will increase the width of the first switching window by 5ms to 10ms and increase the impact weight in the model predictive control; when the dominant error type is excessive pressure build-up time, the MCU controller will increase the pressure weight in the high-speed to boost stage and appropriately increase the feedforward coefficient; when the dominant error type is end pressure fluctuation, the MCU controller will reduce the integral coefficient of the boost and compaction stage and increase the bandwidth of the expansion state observer.
[0093] Through the batch-level quality back-tuning described above, the system does not simply and roughly adjust a single injection parameter, but rather judges the source of the dominant error based on the characteristics of the injection cycle and adjusts the control parameters of the next injection cycle accordingly, thereby improving the injection repeatability under different batches, different molds and different oil temperature conditions.
[0094] 10. Safety Degradation and Fault Handling This embodiment sets up a multi-level safety degradation mechanism to ensure that the die-casting machine will not perform dangerous actions due to abnormal high-order control algorithms under abnormal operating conditions.
[0095] When the difference between the two channels of the position sensor exceeds 1.5 mm for 5 consecutive ms, or the difference between the two channels of the pressure sensor exceeds 3 MPa for 5 consecutive ms, the MCU controller determines that the sensor deviation exceeds the threshold, reduces the weight of or removes the channels that deviate more from the fused estimate, and immediately stops model predictive control and online model switching when there are insufficient remaining reliable channels, switches to conservative parameter PID control, and limits the maximum injection speed to no more than 0.25 m / s.
[0096] When the recursive least squares residual exceeds the preset residual limit for 12 consecutive MCU control cycles, the MCU controller freezes the online parameter update, reverts to the default room temperature model parameter group, and displays "Model residual abnormal" on the human-machine interface.
[0097] When the model predictive control solution time exceeds 2.5ms, the MCU controller directly discards the model predictive control result within the current control cycle and generates the control quantity by multi-stage PID control, feedforward control, and extended state observer disturbance compensation.
[0098] If the Ethernet communication interface does not receive a valid communication frame for 100ms, the MCU controller maintains the current safe state and does not allow entry into the high-speed filling stage; if it is already in the high-speed filling stage or the pressurization and compaction stage, it instructs the FPGA high-speed execution unit to perform fast unloading or oil return protection.
[0099] When the pressure in the injection chamber exceeds 90MPa or the injection speed exceeds 120% of the target speed for the current stage, the MCU controller immediately sends limiting and unloading commands to the FPGA high-speed execution unit. The FPGA high-speed execution unit shuts down the boost output and opens the return oil channel, causing the pressure in the injection cylinder to drop to a safe range.
[0100] Upon the occurrence of any safety degradation event, the MCU controller records the fault code, current injection stage, injection plunger position, injection speed, injection chamber pressure, hydraulic oil temperature, servo pump speed, current model number, sensor data from the last 200 sampling points, and control commands from the last 50 MCU control cycles. This data is used for subsequent fault tracing and process parameter correction.
[0101] XI. Example of a complete injection cycle In a complete injection cycle, after the operator inputs process parameters through the human-machine interface, the system completes communication verification, sensor self-test, and default model loading. After injection begins, the FPGA high-speed execution unit acquires sensor signals at 2kHz and performs pressure / flow inner loop control, while the MCU controller performs fusion speed measurement, stage identification, online parameter identification, model selection, disturbance compensation, and speed outer loop control at 400Hz.
[0102] In the slow exhaust section, the MCU controller controls the injection plunger to advance smoothly at a target speed of 0.18 m / s, and suppresses position derivative noise through fused speed feedback. When the injection plunger enters the first switching range of 141 mm to 149 mm, and the speed error and pressure gradient meet the composite triggering conditions, the MCU controller enables short-time domain model predictive control with a 50 ms switching window, so that the injection plunger smoothly transitions from the slow exhaust section to the high-speed filling section.
[0103] In the high-speed filling section, the MCU controller calls the corresponding PID parameter group and feedforward coefficients according to the current matching model, and compensates for the total disturbance caused by changes in hydraulic oil temperature, leakage, and load fluctuations through the expanded state observer, so that the injection plunger tracks the target speed of 3.2 m / s. When the injection plunger enters the second switching range of 265 mm to 271 mm, and the injection chamber pressure, pressure gradient, and end speed threshold meet the composite triggering conditions, the MCU controller enables short-time domain model predictive control with a 60 ms switching window, so that the high-speed filling section smoothly transitions to the pressurization and compaction section.
[0104] During the pressurization and compaction phase, the FPGA high-speed execution unit adjusts the servo pump and hydraulic valve group according to the target pressure command output by the MCU controller, so that the injection chamber pressure quickly reaches 82MPa and remains stable. After the injection cycle ends, the MCU controller calculates the quality proxy index and makes targeted corrections to the control parameters of the next injection cycle based on characteristics such as maximum speed deviation, switching overshoot, pressure build-up time, and end pressure fluctuation.
[0105] Example 2 This embodiment provides an enhanced real-time speed control method and system for injection in a die-casting machine. This embodiment is applicable to the injection process of a cold chamber die-casting machine, which includes an injection cylinder, an injection plunger, a servo pump, a hydraulic valve group, an injection chamber, a mold cavity, and a control system. The control system includes a human-machine interface, an Ethernet communication interface, an MCU controller, an FPGA high-speed execution unit, position sensors, pressure sensors, temperature sensors, a servo pump speed acquisition unit, a valve group opening feedback unit, and an actuator. The position and pressure sensors can employ a dual-channel redundant structure. The actuator includes a servo pump, a low-speed inlet valve, a high-speed valve, a booster valve, a return valve, and the injection cylinder.
[0106] In this embodiment, the speed outer loop control frequency of the MCU controller is set to 400Hz, and the control period is 2.5ms; the pressure / flow inner loop control frequency of the FPGA high-speed execution unit is set to 2kHz, and the control period is 0.5ms. The MCU controller is used to perform injection stage identification, discrete modeling of the controlled object, online parameter identification, expansion state observer disturbance compensation, switching window short-time domain model predictive control, multi-sensor fusion speed estimation, hydraulic execution channel pilot identification, injection curve multi-anchor point superposition calibration, multi-source residual fault isolation, and control reconstruction. The short-time domain model predictive control is completed within the 2.5ms outer loop period, and online parameter writing and curve calibration are performed at a lower frequency or at the end of the loop. The FPGA high-speed execution unit is used to perform high-speed sampling, signal preprocessing, pressure / flow inner loop, amplitude limiting and slope limiting, hardware interlocking, and parallel valve and pump drive.
[0107] In this embodiment, the target velocity for the slow exhaust section is set to 0.18 m / s, the target velocity for the high-speed filling section is set to 3.2 m / s, and the target pressure for the pressurization and compaction section is set to 82 MPa. The switching position xs1 from the slow exhaust section to the high-speed filling section is set to 145 mm, with a switching range of 141 mm to 149 mm; the switching position xs2 from the high-speed filling section to the pressurization and compaction section is set to 268 mm, with a switching range of 265 mm to 271 mm; and the endpoint position send of the injection plunger is set to 285 mm. The switching window from the slow exhaust section to the high-speed filling section is set to 50 ms, and the switching window from the high-speed filling section to the pressurization and compaction section is set to 60 ms.
[0108] I. Pilot Identification of Hydraulic Actuation Channel In this embodiment, the MCU controller is equipped with a hydraulic actuator channel pilot identification module. This module is used to superimpose pseudo-random perturbation flow signals onto the hydraulic actuator channel in a small-amplitude, short-duration, and interruptible manner during the low-speed safety pre-push interval before the formal high-speed injection, or during the initial slow venting section and before the molten metal front enters the gate or mold cavity. This allows for the identification of the dynamic characteristics of the hydraulic actuator channel formed by the servo pump, hydraulic valve group, injection cylinder, oil compressibility, and mechanical friction. After entering the relevant slow venting main section of the cavity filling, the pilot perturbation is no longer superimposed.
[0109] After each injection cycle begins, the system first enters a ready state. The MCU controller reads the initial values from the position sensor, pressure sensor, temperature sensor, and servo pump speed acquisition unit. The MCU controller allows the hydraulic actuator channel pilot identification to be initiated when all of the following conditions are met: First, the position s of the injection plunger is less than the preset safe displacement threshold s0, which is set to 30mm in this embodiment; Second, the pressure p in the injection chamber is less than the preset safety pressure threshold p0, which is set to 5MPa in this embodiment; Third, the injection velocity feedback value vf is less than 0.08 m / s; Fourth, the booster valve is closed, the high-speed valve is closed, and the return valve is controllable. Fifth, the dual-channel deviations of the position sensor and pressure sensor did not exceed the preset threshold.
[0110] After the above conditions are met, the MCU controller generates a pseudo-random binary pilot sequence b(k). In this embodiment, the pseudo-random binary pilot sequence uses a 63-bit m-sequence, and the generator polynomial is: G(x) = x^6 + x + 1.
[0111] Each symbol in this sequence takes a value of 0 or 1, and the pilot symbol period Tc is set to 1 ms. The MCU controller converts the pseudo-random binary pilot sequence into a bipolar perturbation flow signal: q_probe(k)=A_probe·[2b(k)-1].
[0112] Where A_probe is the amplitude of the perturbation flow rate. In this embodiment, A_probe is set to 1.0% of the rated flow rate. If the rated flow rate is 100 L / min, then A_probe is 1.0 L / min. Therefore, q_probe(k) switches between +1.0 L / min and -1.0 L / min according to a pseudo-random sequence.
[0113] The FPGA high-speed execution unit receives q_probe(k) from the MCU controller and superimposes this perturbation flow signal onto the initial target flow q_base(k) of the slow exhaust section to form a target flow detection command: q_cmd(k)=q_base(k)+q_probe(k).
[0114] In this embodiment, q_base(k) corresponds to a low-speed pre-push velocity of 0.08 m / s, and q_cmd(k), after being limited by the FPGA high-speed execution unit, must not exceed 8% of the rated flow rate. During pilot identification, the FPGA high-speed execution unit synchronously acquires the injection plunger position s(k), injection chamber pressure p(k), servo pump speed ω(k), valve group opening u_valve(k), and the injection velocity feedback value v_f(k) obtained by fusion velocity measurement at 2kHz.
[0115] The pilot identification process lasts for 63 ms. After pilot identification is complete, the MCU controller calculates the cross-correlation function between the perturbation flow signal and the injection chamber pressure response: R_{qp}(τ)=Σ_{k=1}^{L-τ}q_probe(k)·Δp(k+τ); And calculate the cross-correlation function between the perturbation flow signal and the injection velocity response: R_{qv}(τ)=Σ_{k=1}^{L-τ}q_probe(k)·Δv_f(k+τ).
[0116] Where L is the pilot sequence length, Δp(k) is the increment of the injection chamber pressure relative to the baseline pressure during pilot identification, Δv_f(k) is the increment of the injection velocity relative to the baseline velocity during pilot identification, and τ is the delay sampling point. The MCU controller extracts the hydraulic actuation channel input delay τ_d, low-frequency gain K_q, rise time t_r, damping index ζ_h, and hysteresis index H_h based on R_{qp}(τ) and R_{qv}(τ).
[0117] Specifically, the input delay τ_d is the delay time corresponding to the first time R_{qv}(τ) reaches 15% of its peak value; the low-frequency gain K_q is the integral area of R_{qv}(τ) in the range of 0 to 40 ms; the rise time t_r is the time required for R_{qv}(τ) to rise from 10% of its peak value to 90% of its peak value; the damping index ζ_h is calculated based on the attenuation ratio within 20 ms after the peak value of R_{qv}(τ); and the hysteresis index H_h is calculated based on the difference between the positive perturbation response area and the negative perturbation response area.
[0118] When τ_d is greater than 6ms, the MCU controller adds an input delay compensation term to the short-time domain model predictive control in the switching window and shifts the input action time in the MPC predictive model backward by τ_d; when K_q is lower than 85% of the standard hydraulic channel gain, the MCU controller increases the feedforward coefficient of the high-speed filling section of the current injection cycle by 3% to 6%; when t_r is greater than 18ms, the MCU controller reduces the maximum rise slope of the target flow command so that it does not exceed 14% / ms of the rated flow; when H_h is greater than 0.18, the MCU controller increases the impact weight r_j in the MPC objective function of the switching window, and the increase ratio is 10% in this embodiment.
[0119] To ensure that pilot identification does not introduce injection risks, this embodiment sets pilot identification termination conditions. When the injection velocity change exceeds 0.03 m / s, the injection chamber pressure change exceeds 1.5 MPa, the dual-channel deviation of the position sensor exceeds 1.0 mm, or the injection plunger position exceeds the preset safe displacement threshold s0 during pilot identification, the MCU controller immediately stops pilot identification, the FPGA high-speed execution unit cancels q_probe(k), and switches the control mode to conservative parameter PID control for the slow exhaust section. If pilot identification fails, the current loop can still continue execution, but the MCU controller does not use the pilot identification result of this loop to correct the MPC parameters and feedforward coefficients; instead, it continues to use the pilot identification result saved from the previous successful loop or the factory default value.
[0120] II. Pressure Curve Multi-Anchor Point Overlay Calibration In this embodiment, the MCU controller includes a multi-anchor point superposition calibration module for the injection curve. This module operates after each injection cycle to align the velocity and pressure curves of the current cycle with the standard injection curve using multiple anchor points, and to perform directional correction of the control parameters for the next injection cycle based on the error type of different anchor points.
[0121] In this embodiment, the standard injection curve is obtained by averaging the velocity curve and pressure curve of 10 consecutive qualified injection cycles, and is stored in the non-volatile memory area of the MCU controller. The standard injection curve includes the standard velocity curve v_ref,std(t), the standard pressure curve p_ref,std(t), and the standard anchor point set A_std.
[0122] After each injection cycle, the MCU controller extracts five injection curve anchor points from the current cycle data: The first anchor point A1 is the moment when the injection plunger position s first reaches the switching position xs1 from the slow exhaust section to the high-speed filling section, which is 145mm. The second anchor point A2 is the moment when the injection velocity vf first reaches 90% of the target velocity in the high-speed filling section. In this embodiment, it is the moment when vf first reaches 2.88 m / s. The third anchor point A3 is the moment when the pressure p in the injection chamber first reaches 50% of the target pressure in the pressurization and compaction section. In this embodiment, it is the moment when p first reaches 41 MPa. The fourth anchor point A4 is the moment when the pressure p in the injection chamber first reaches 90% of the target pressure in the pressurization and compaction section. In this embodiment, it is the moment when p first reaches 73.8 MPa. The fifth anchor point A5 is the moment when the injection plunger position s first reaches the preset endpoint position send, which is 285mm.
[0123] The MCU controller matches the current set of loop anchor points A_cur with the standard set of anchor points A_std. For the curve segment between two adjacent anchor points, the MCU controller establishes a piecewise time normalized mapping: τ=(t-t_{A,i}) / (t_{A,i+1}-t_{A,i}).
[0124] Where t_{A,i} is the time of the i-th anchor point in the current loop, t_{A,i+1} is the time of the (i+1)-th anchor point in the current loop, and τ is the normalized time, with a value ranging from 0 to 1. The MCU controller takes 20 equally spaced normalized sampling points within each anchor point interval, resamples the current loop velocity curve v_f(t) and pressure curve p(t), and compares them with the standard velocity curve v_ref,std(t) and standard pressure curve p_ref,std(t). The MCU controller generates the superposition error matrix E_ovl: E_ovl= [ Δt_A1, Δs_A1, Δv_A1, Δp_A1; Δt_A2, Δs_A2, Δv_A2, Δp_A2; Δt_A3, Δs_A3, Δv_A3, Δp_A3; Δt_A4, Δs_A4, Δv_A4, Δp_A4; Δt_A5, Δs_A5, Δv_A5, Δp_A5 ].
[0125] Where Δt_Ai = t_cur,Ai - t_std,Ai; Δs_Ai = s_cur,Ai - s_std,Ai; Δv_Ai = v_std,Ai - v_cur,Ai; Δp_Ai = p_avg,cur,Ai - p_avg,std,Ai; p_avg,cur,Ai and p_avg,std,Ai are the average value of the current cycle pressure and the average value of the standard pressure within a neighborhood time window centered on the i-th anchor point and with a width of 10ms, respectively. In other words, a positive Δt_Ai indicates that the current cycle anchor point lags behind the standard anchor point; a positive Δv_Ai indicates that the current cycle speed is lower than the standard speed; and a positive Δp_Ai indicates that the pressure of the current cycle within the neighborhood of that anchor point is higher than the standard pressure.
[0126] The MCU controller determines the dominant error type based on the superposition error matrix and corrects the parameters for the next injection cycle.
[0127] When the second anchor point A2 satisfies ΔtA2 greater than 8ms and ΔvA2 greater than 0.12m / s, the MCU controller determines that the high-speed filling section speed establishment is lagging. At this time, the MCU controller increases the speed error weight qv within the switching window from the slow exhaust section to the high-speed filling section in the next injection cycle by 10%, and increases the feedforward coefficient of the high-speed filling section by 4%. If this situation occurs in three consecutive injection cycles, the switching position xs1 from the slow exhaust section to the high-speed filling section is advanced by 1mm, but the cumulative correction of xs1 does not exceed ±2mm.
[0128] When the fourth anchor point A4 satisfies Δp_A4 greater than 3MPa and |Δt_A4| greater than 5ms, the MCU controller determines that there is a pressure superposition error in the pressurization stage. If Δt_A4 is less than -5ms, it indicates that the pressure build-up is too early and the pressure is too high. The MCU controller reduces the pressure error weight q_p in the switching window from the high-speed filling stage to the pressurization compaction stage of the next injection cycle by 8% and increases the control increment weight r_u by 10%. If Δt_A4 is greater than 5ms, it indicates that the pressure build-up is lagging and the pressure is too high. The MCU controller prioritizes increasing the width of the high-speed to pressurization switching window by 5ms and reduces the feedforward coefficient of the pressurization stage by 3% to prevent pressure overshoot due to overcompensation.
[0129] When the third anchor point A3 satisfies Δt_A3 greater than 10ms and Δp_A3 less than -2MPa, the MCU controller determines that the pressure build-up is lagging. At this time, the MCU controller increases the pressure error weight q_p within the high-speed to boost switching window by 10% and increases the feedforward coefficient of the boost segment by 3%. When the first anchor point A1 satisfies Δt_A1 greater than 8ms and Δs_A1 less than -1mm, the MCU controller determines that the slow segment advance is insufficient and increases the target speed of the slow segment in the next cycle by 3%, but the increased target speed of the slow segment must not exceed 0.22m / s.
[0130] To avoid drastic changes in process parameters due to a single abnormal data point, this embodiment sets an upper limit on the self-tuning correction amount. After a single injection cycle, the switching position correction amount does not exceed ±2mm, the switching window width correction amount does not exceed ±10ms, the correction ratio of any weight in the MPC weight matrix does not exceed ±15%, and the correction ratio of the feedforward coefficient does not exceed ±6%. When a sensor malfunction, pilot identification failure, or safety degradation event occurs, the MCU controller does not perform the multi-anchor point superposition calibration correction for this cycle, but only records the data of this cycle for fault analysis.
[0131] III. Stage Authorization Tokens and Hardware Interlocks In this embodiment, a stage authorization token mechanism is established between the MCU controller and the FPGA high-speed execution unit. Stage authorization tokens include a slow exhaust authorization token, a high-speed filling authorization token, a pressurization and compaction authorization token, and a load shedding protection token. Only one stage authorization token is allowed to be active at any given time.
[0132] In this embodiment, the stage authorization token consists of a 2-bit token code and a CRC checksum field. Specifically, 00 represents a slow exhaust authorization token, 01 represents a high-speed filling authorization token, 10 represents a pressurization and compaction authorization token, and 11 represents a load shedding protection token. The MCU controller sends a stage authorization request frame to the FPGA high-speed execution unit. This frame includes the token code, cycle number, stage request timestamp, current injection plunger position, current injection chamber pressure, current injection speed feedback value, and a CRC16 checksum. Upon receiving the stage authorization request frame, the FPGA high-speed execution unit first checks the CRC16, then reads the hardware interlock table to determine whether token switching is allowed.
[0133] The hardware interlock table is pre-stored in the FPGA high-speed execution unit and includes the following interlock rules.
[0134] When the slow exhaust authorization token is valid, the FPGA high-speed execution unit allows the servo pump to output low flow, the target flow must not exceed 25% of the rated flow, allows the low-speed oil inlet valve to open, prohibits the high-speed valve from opening fully, prohibits the booster valve from opening, and allows the return oil valve to remain closed or slightly open according to the slow section control logic.
[0135] When the high-speed charging authorization token is valid, the FPGA high-speed actuator allows the servo pump to output high flow, with the target flow not exceeding 100% of the rated flow. It allows the high-speed valve to open, prohibits the booster valve from opening, and keeps the return valve closed. If the booster valve feedback opening is greater than 2%, the FPGA high-speed actuator rejects the high-speed charging authorization token.
[0136] When the pressurization and density authorization token is valid, the FPGA high-speed actuator allows the pressurization valve to open, with the target pressure not exceeding 90 MPa. Simultaneously, it limits the high-speed valve opening to no more than 15% and performs inner-loop pressure control based on pressure sensor feedback. If the high-speed valve feedback opening is greater than 15% and lasts for more than 3 ms, the FPGA high-speed actuator revoks the pressurization and density authorization token and switches to the unloading protection token.
[0137] When the unloading protection token is valid, the FPGA high-speed execution unit prohibits the high-speed valve from opening, prohibits the booster valve from opening, the oil return valve opening is not less than 80%, the target flow of the servo pump is reduced to less than 10% of the rated flow, and the injection cylinder performs oil return or unloading actions.
[0138] During the transition from the slow exhaust section to the high-speed filling section, the MCU controller will only request a high-speed filling authorization token from the FPGA high-speed execution unit if the following software and hardware conditions are met simultaneously: The software-side conditions include: the injection plunger position s enters the first switching range of 141mm to 149mm; the absolute value of the speed error in the slow section |ev| is not greater than 0.025m / s; and the pressure gradient dp / dt in the injection chamber is not less than 0.8MPa / ms.
[0139] Hardware requirements include: the booster valve feedback opening is less than 2%; the high-speed valve drive current does not exceed 110% of the rated drive current; the servo pump speed feedback is effective; the pressure sensor dual-channel difference is not greater than 3MPa; and the position sensor dual-channel difference is not greater than 1.5mm.
[0140] When all the above conditions are met, the FPGA high-speed execution unit allows the token to switch from a slow exhaust authorization token to a high-speed charging authorization token, and sets a 5ms latch-up time. During the 5ms latch-up time, the FPGA high-speed execution unit rejects booster valve opening commands and reverse stage commands other than unloading commands that are inconsistent with the high-speed charging authorization token.
[0141] During the switch from the high-speed filling stage to the pressurization compaction stage, the MCU controller will only request a pressurization compaction authorization token from the FPGA high-speed execution unit if the following conditions are met simultaneously: The injection plunger position s enters the second switching range of 265mm to 271mm; the injection chamber pressure p is within the range of 65MPa to 78MPa; the pressure gradient dp / dt is not greater than 0.35MPa / ms; the injection speed feedback value vf is not greater than 0.35m / s; the high-speed valve opening has dropped to below 15%; and the injection chamber pressure has not exceeded the safe pressure limit of 90MPa.
[0142] When all the above conditions are met, the FPGA high-speed execution unit allows the token to switch from a high-speed filling authorization token to a pressurized compact authorization token, and sets an 8ms latch-up time. During the 8ms latch-up time, the FPGA high-speed execution unit refuses to execute the high-speed valve fully open command again, and at the same time applies a slope constraint to the pressurized valve opening, so that the increase in the pressurized valve opening per millisecond does not exceed 12%.
[0143] When any safety degradation condition is triggered, including pressure exceeding 90 MPa, injection speed exceeding 120% of the current stage target speed, communication watchdog timeout, sensor dual-channel deviation exceeding the threshold, and model predictive control solution timeout with two consecutive failures to recover, the MCU controller immediately requests an unloading protection token. For the unloading protection token, the FPGA high-speed execution unit does not wait for the combined software trigger conditions but prioritizes executing the hardware action corresponding to the unloading protection token to ensure the safety of the injection system.
[0144] Through the aforementioned stage authorization tokens and hardware interlocks, the stage identification result of the MCU controller must be verified by the hardware interlock table of the FPGA high-speed execution unit before the actuator can be driven, thus avoiding logical conflicts between slow, high-speed, pressurization and unloading actions.
[0145] IV. Multi-source residual fault isolation and control reconfiguration In this embodiment, the MCU controller is equipped with a multi-source residual fault isolation and control reconfiguration module. This module is used to distinguish different fault sources during the injection process and select the corresponding control reconfiguration method according to the fault type, rather than simply treating all anomalies as the same type of fault.
[0146] The MCU controller calculates six types of residuals within each 2.5ms control cycle.
[0147] The first residual r1 is the residual between the position velocity and the pump speed converted to velocity: r1 = vpos - vpump.
[0148] Where vpos is the speed obtained by differentiating the position sensor after Savitzky-Golay filtering, and vpump is the speed calculated from the servo pump speed.
[0149] The second residual r2 is the residual between position velocity and pressure converted velocity: r2 = vpos - vpress.
[0150] Where vpress is the velocity trend quantity calculated from the rate of change of pressure in the injection chamber.
[0151] The third residual r3 is the residual between the model-predicted pressure and the measured pressure: r3 = ppred - pmeas.
[0152] Where ppred is the injection chamber pressure predicted by the discrete model of the controlled object, and pmeas is the injection chamber pressure measured by the pressure sensor.
[0153] The fourth residual r4 is the residual between the target speed of the servo pump and the measured speed of the servo pump: r4=ωcmd-ωmeas.
[0154] Where ωcmd is the target speed of the servo pump, and ωmeas is the measured speed of the servo pump.
[0155] The fifth residual r5 is the residual between the target opening degree of the hydraulic valve group and the feedback opening degree of the hydraulic valve group: r5=uvalve_cmd-uvalve_fb.
[0156] Where uvalve_cmd is the target opening degree of the hydraulic valve group, and uvalve_fb is the feedback opening degree of the hydraulic valve group.
[0157] The sixth residual r6 is the residual between the online identification parameters and the current matching model parameters: r6=||θRLS-θmodel|| / ||θmodel||.
[0158] Where θRLS is the equivalent parameter vector obtained by online identification using the recursive least squares method, and θmodel is the equivalent parameter vector corresponding to the current matching model.
[0159] To unify residuals of different dimensions, the MCU controller performs normalization processing on six types of residuals: ρi=|ri| / σi.
[0160] In this embodiment, σ1 is set to 0.08 m / s, σ2 to 0.10 m / s, σ3 to 2.0 MPa, σ4 to 80 r / min, σ5 to 3% of the full-scale opening of the valve assembly, and σ6 to 0.15. ρi is the i-th type of normalized residual.
[0161] When any normalized residual ρi is greater than 3 for 5 consecutive MCU control cycles, the MCU controller triggers fault detection; when the same fault type is identified 3 times consecutively, the MCU controller triggers fault isolation and completes control reconfiguration within 20ms.
[0162] In this embodiment, the rules for determining different fault types are as follows.
[0163] When ρ1 is greater than 3, ρ2 is greater than 3, and ρ3 is not greater than 3, the MCU controller determines that the position sensor is malfunctioning. The logic is as follows: the speed obtained from the position sensor deviates from both the pump speed conversion speed and the pressure conversion speed, but the model-predicted pressure remains consistent with the measured pressure, indicating that there are no obvious anomalies in pressure measurement and model prediction; the position sensor is more likely the source of the fault. At this time, the MCU controller reduces the measurement weight corresponding to the position sensor in the Kalman fusion speed estimation by 70%, increases the weights corresponding to the servo pump speed and pressure change rate by 35% respectively, and limits the maximum injection speed to 80% of the target speed for the current stage.
[0164] When ρ2 is greater than 3, ρ3 is greater than 3, and ρ1 is not greater than 3, the MCU controller determines that the pressure sensor is abnormal. The logic is as follows: the position velocity and pump speed conversion speed are consistent, but the pressure conversion speed and measured pressure deviate from the model prediction, indicating that the pressure measurement link is more likely to be abnormal. At this time, the MCU controller exits the short-time domain model predictive control of the pressurization and compaction phase, adopts conservative pressure limiting, and restricts the target pressure to 60% of the rated pressurization target pressure. If the pressurization and compaction phase has not yet been entered at this time, applying for a pressurization and compaction authorization token is prohibited.
[0165] When ρ4 is greater than 3, and the measured speed of the servo pump is continuously lower than 85% of the target speed for 10ms, the MCU controller determines that the servo pump response is abnormal. At this time, the MCU controller reduces the rise slope of the target flow command to ensure that it does not exceed 8% / ms of the rated flow, and reduces the target speed of the high-speed filling section by 10%. If the servo pump response abnormality continues for more than 50ms, the FPGA high-speed execution unit switches to the unloading protection token.
[0166] When ρ5 is greater than 3, and the deviation between the hydraulic valve group's feedback opening and the target opening continues for more than 10ms, the MCU controller determines that the hydraulic valve group is stuck. If the hydraulic valve group is stuck in the slow exhaust section, it is prohibited to enter the high-speed filling section; if it occurs in the high-speed filling section or the pressurization and compaction section, the return oil protection is immediately triggered, and the valve group stuck fault code is recorded.
[0167] When ρ6 is greater than 3 and the hydraulic oil temperature change rate exceeds 0.5℃ / min, or when the recursive least squares residual exceeds the upper limit of the residual for 12 consecutive MCU control cycles, the MCU controller determines that the model is mismatched. At this time, the MCU controller freezes online parameter identification and model switching, reverts to the default normal temperature model parameter group, and reduces the upper limit of the expanded state observer disturbance compensation to 10% of the rated control quantity to prevent erroneous model parameters from amplifying the control output.
[0168] During control reconfiguration, the MCU controller and FPGA high-speed execution unit jointly enforce conservative limits. The target flow rate must not exceed 40% of the rated flow rate, and the target pressure must not exceed 60% of the rated pressure; pilot identification is prohibited; automatic writing of parameters for multi-anchor point superposition calibration of the injection curve is prohibited; data recording is allowed, but automatic increase of the high-speed filling target speed and boosted target pressure is not allowed.
[0169] After each fault isolation is completed, the MCU controller records the fault code, fault type, current stage authorization token, six types of normalized residuals, current injection plunger position, injection speed feedback value, injection chamber pressure, hydraulic oil temperature, servo pump speed, valve group target opening, valve group feedback opening, and 200 FPGA sampling points before and after the fault trigger. This data is transmitted back to the human-machine interface via Ethernet for subsequent fault tracing and process adjustment.
[0170] V. Complete Execution Process of Example 2 In a complete injection cycle, the operator inputs target speed, target pressure, switching position, switching window, PID parameter set, feedforward coefficient, extended state observer (ESO) bandwidth, model predictive control (MPC) weights, and safety thresholds through the human-machine interface for the slow exhaust section, high-speed filling section, and pressurization and compaction section. After the parameters are sent to the MCU controller via the Ethernet communication interface, the MCU controller completes CRC verification, communication watchdog initialization, sensor self-test, and default model loading.
[0171] After the injection cycle begins, if the injection plunger position is less than 30mm and the injection chamber pressure is less than 5MPa, the MCU controller first initiates pilot identification of the hydraulic actuation channel. The FPGA high-speed actuator superimposes a pseudo-random perturbation flow signal of 1.5% of the rated flow rate under low-speed safety conditions. The MCU controller calculates the input delay, low-frequency gain, rise time, damping index, and hysteresis index of the hydraulic actuation channel through cross-correlation, and accordingly corrects the feedforward coefficient, MPC input delay compensation term, control increment constraint, and impact weight for this cycle.
[0172] The system then enters the slow exhaust phase. The FPGA high-speed execution unit keeps the slow exhaust authorization token valid, prevents the booster valve from opening, and limits the target flow rate to no more than 25% of the rated flow rate. The MCU controller generates the target flow command based on the fusion speed feedback, online identification results, and ESO disturbance compensation, so that the injection plunger advances smoothly at the target speed of 0.18 m / s.
[0173] When the injection plunger enters the first switching range of 141mm to 149mm, and the speed error and pressure gradient meet the composite triggering conditions, the MCU controller requests a high-speed filling authorization token. The FPGA high-speed execution unit checks the pressure booster valve's closed state, the high-speed valve drive current, the servo pump speed feedback, the dual-channel deviation of the pressure sensor, and the dual-channel deviation of the position sensor. When both software and hardware conditions are met, the FPGA high-speed execution unit allows the high-speed filling authorization token to take effect and sets a 5ms latch-up time. Within the 50ms switching window, the MCU controller enables short-time domain model predictive control, allowing the injection plunger to smoothly transition to the high-speed filling target speed of 3.2m / s.
[0174] During the high-speed filling stage, the MCU controller continuously calculates the multi-source residual matrix. If all residuals are within the normal range, online identification, model selection, ESO disturbance compensation, and MPC switching optimization continue. If any residual triggers fault detection, the MCU controller determines the source of the fault based on the residual combination and performs corresponding control reconfiguration after completing fault isolation.
[0175] When the injection plunger enters the second switching range of 265mm to 271mm, and the injection chamber pressure, pressure gradient, terminal velocity, and high-speed valve return status all meet the conditions, the MCU controller requests a pressurization and sealing authorization token. The FPGA high-speed actuator confirms that the high-speed valve opening does not exceed 15%, the injection chamber pressure does not exceed 90MPa, and the pressure sensor is valid, then allows the pressurization and sealing authorization token to take effect and sets an 8ms lockout time. Within a 60ms switching window, the MCU controller enables short-time-domain model predictive control to smoothly build up the injection chamber pressure to 82MPa.
[0176] After the injection cycle ends, the MCU controller extracts the five injection curve anchor points of the current cycle and aligns the current cycle's speed curve, pressure curve, and standard injection curve using piecewise time normalization to generate an overlay error matrix. If no sensor malfunction, pilot identification failure, or unloading protection event occurs in the current cycle, the MCU controller performs limited-amplitude directional corrections to the target speed, switching position, switching window width, MPC weight matrix, and feedforward coefficients for the slow segment of the next injection cycle based on the overlay error matrix. If a safety degradation event occurs in the current cycle, the MCU controller only saves the curves and fault data and does not perform automatic parameter writing.
[0177] Through the above process, this embodiment further enhances the injection control system's capabilities compared to Embodiment 1 by enabling it to: identify the dynamic characteristics of the hydraulic actuation channel before injection; correct the next cycle parameters based on the multi-anchor point curve superposition error after injection; prevent actuator action conflicts during injection using stage authorization tokens; and perform control reconfiguration after differentiating the fault source using a multi-source residual matrix when an anomaly occurs. These four enhancement modules operate respectively in the pre-injection, injection, post-injection, and anomaly handling stages, are logically independent, and collectively improve injection speed control accuracy, stage switching safety, batch consistency, and fault controllability.
[0178] The above description is merely a preferred embodiment of the present invention and does not limit the implementation of the present invention. Any equivalent structural transformations made based on the content of the present invention's specification and drawings, or equivalent solutions directly or indirectly applied to other related technical fields, under the concept of the present invention, should be understood as falling within the scope of the technical solutions described in the present invention's application documents.
Claims
1. A method for real-time speed control of injection in a die-casting machine, characterized in that, The method includes the following steps: S1. Configure the process parameters of the slow exhaust section, high-speed filling section and pressurization and compaction section through the human-machine interface. The process parameters include the target speed, target pressure, switching position, switching interval, switching window, PID parameter group, feedforward coefficient, expansion state observer bandwidth, model predictive control weight and safety threshold for each stage, and send them to the MCU controller through the Ethernet communication interface. S2. The FPGA high-speed execution unit collects the injection plunger position, injection chamber pressure, oil temperature, servo pump speed and hydraulic valve group opening feedback signals at a first sampling frequency of 1 to 2 kHz. After the collected signals are preprocessed by limiting amplitude, removing burrs and aligning timestamps, they are transmitted to the MCU controller. The MCU controller performs multi-sensor fusion based on the injection plunger position, servo pump speed, and injection chamber pressure change rate obtained by differential filtering of the injection chamber pressure to obtain the injection speed feedback value; S3, the MCU controller divides the injection process into a slow exhaust section, a high-speed filling section, and a pressurization and compaction section, and identifies the current injection stage based on the composite triggering conditions consisting of the injection plunger position, injection speed error, and injection chamber pressure gradient. S4. The MCU controller establishes a discrete model of the controlled object for the current injection stage, and updates the discrete model of the controlled object according to the equivalent parameter vector obtained online. The fast dynamic state variables of the discrete model of the controlled object include the injection speed and the injection chamber pressure. The oil temperature is used as a slow variable scheduling parameter to participate in the candidate model selection, viscosity compensation and equivalent parameter correction. The equivalent parameter vector includes the hydraulic equivalent bulk elastic modulus, leakage coefficient and friction parameters. S5. The MCU controller uses a recursive least squares method with a forgetting factor to update the equivalent parameter vector online, and selects the current matching model based on the residual comparison results of the candidate model group, and calls the corresponding PID parameter group and feedforward coefficients according to the current matching model. S6. The MCU controller estimates the total disturbance caused by oil temperature and viscosity drift, hydraulic leakage, friction changes, gas entrainment and unmodeled dynamics through an extended state observer, and compensates the total disturbance into the speed outer loop control quantity. S7. When the current moment is within the switching window from the slow exhaust section to the high-speed filling section, or within the switching window from the high-speed filling section to the pressurization and compaction section, the MCU controller enables short-time domain model predictive control and generates target pressure command, target flow command, or target valve opening command based on the discrete model of the controlled object, the injection speed feedback value, the injection chamber pressure, and preset constraints. When the current moment is outside the switching window, the MCU controller uses multi-stage PID control, feedforward control, and total disturbance compensation corresponding to the current injection stage to generate target pressure command, target flow command, or target valve opening command. S8. The MCU controller sends the target pressure command, target flow command, or target valve opening command to the FPGA high-speed execution unit. The FPGA high-speed execution unit performs pressure / flow inner loop control, amplitude limiting processing, and slope constraint processing at a second sampling frequency of 1 to 2 kHz, and drives the servo pump and hydraulic valve group in parallel to control the injection cylinder to drive the injection plunger to complete the injection action. S9. After a pressure injection cycle ends, the MCU controller calculates the quality proxy index based on the characteristics of the pressure injection cycle, and performs self-tuning on the target speed, switching window width, extended state observer bandwidth, model predictive control weights or feedforward coefficients for the slow segment of the next pressure injection cycle based on the quality proxy index. S10. When the sensor deviation exceeds the threshold, the recursive least squares residual exceeds the limit continuously, the model predictive control solution times out, the communication watchdog times out, or the injection chamber pressure or injection speed exceeds the limit, the short-time domain model predictive control and online model switching are stopped, and the control degenerates into conservative parameter PID control, and unloading or oil return protection is executed.
2. The real-time speed control method for injection in a die-casting machine according to claim 1, characterized in that, In step S3, the composite triggering conditions for switching from the slow exhaust section to the high-speed filling section include: the injection plunger position enters the preset switching range [xs-Δx, xs+Δx], where Δx is the switching position tolerance obtained by trial molding calibration and takes a value of 1mm to 6mm; the absolute value of the injection speed error is not greater than the preset speed error threshold; and the pressure gradient of the injection chamber is not less than the first pressure gradient threshold. The composite triggering conditions for switching from the high-speed filling section to the pressurized compaction section include: the injection plunger position enters the high-speed to pressurized switching interval, the injection chamber pressure enters the preset pressure range, the injection chamber pressure gradient is not greater than the second pressure gradient threshold, and the absolute value of the difference between the injection speed feedback value and the preset end speed is not greater than the end speed approach threshold, wherein the end speed approach threshold is 0.05m / s to 0.50m / s; During stage switching, the MCU controller maps and limits the integral state of the speed outer loop, and works with the output ramp limiter and hysteresis interval to ensure that the control quantity before and after the switching is continuous.
3. The real-time speed control method for injection in a die-casting machine according to claim 1, characterized in that, In step S4, the discrete model of the controlled object is represented as follows: x(k+1)=A_i(θ(k))x(k)+B_i(θ(k))u(k)+E_i d(k); The above discrete model is obtained by discretizing the continuous hydraulic equivalent model with zero-order hold input. When the Euler approximation is used, A_i, B_i and E_i are obtained by multiplying the corresponding continuous model matrix by the outer loop control period h_m, and the amplitude is limited by the factory calibration table and the online identification results. Where k represents the k-th MCU outer loop control cycle, i represents the current injection stage, A_i(θ(k)) is the state transition matrix of the current injection stage, B_i(θ(k)) is the control input matrix, E_i is the disturbance input matrix matching the dimension of the fast dynamic state variable, x(k) includes the injection speed v(k) and the injection chamber pressure p(k), u(k) is the target flow command, target pressure command or target valve opening command, d(k) is the total disturbance, and θ(k) is the equivalent parameter vector; oil temperature T(k) is not used as a fast dynamic state variable in x(k), but is used as a slow variable scheduling parameter to participate in the correction of A_i(θ(k)), B_i(θ(k)) or θ(k); The MCU controller constructs a regression vector φ(k) = [v(k), p(k), u(k), T(k), 1]^T, and updates the intermediate model coefficient vector η(k) corresponding to the dimension of the regression vector using a recursive least squares method with a forgetting factor; where T(k) is the slow variable of oil temperature, and the constant term 1 corresponds to the bias coefficient of sensor zero bias, valve dead zone, or unmodeled quasi-static bias; then, the equivalent parameter vector θ(k) is corrected according to η(k) and a preset mapping relationship or calibration table, and the forgetting factor ranges from 0.97 to 0.995, with T in the upper right corner indicating transpose; The candidate model group includes a low-temperature model, a normal-temperature model, a high-temperature model, a light-load model, and a heavy-load model. The low-temperature model, normal-temperature model, and high-temperature model correspond to operating conditions with oil temperatures below 35℃, 35℃~55℃, and above 55℃, respectively. The light-load model and heavy-load model correspond to operating conditions with peak injection chamber pressure below 60MPa and above 80MPa, respectively. The MCU controller calculates the residuals of each candidate model according to the following residual evaluation formula: J_m(k)=αJ_m(k-1)+(1-α)|y(k)- _m(k)|; Where J_m(k) is the residual of the m-th candidate model in the k-th MCU outer loop control cycle, and α is the residual smoothing coefficient with a value of 0.80 to 0.98; in the slow exhaust section and the high-speed filling section, y(k) is the measured output of the injection speed. _m(k) represents the predicted injection velocity output of the m-th candidate model; in the pressurization and compaction section, y(k) represents the measured pressure output of the injection chamber. _m(k) is the predicted output of the injection chamber pressure of the m-th candidate model; N is the number of consecutive control cycles used to confirm the current matching model and takes a value of 3 to 8. When the residual of the same candidate model is minimized over N consecutive control cycles, the MCU controller determines the candidate model as the current matching model and switches to the PID parameter group and feedforward coefficients corresponding to the current matching model.
4. The real-time speed control method for injection in a die-casting machine according to claim 1, characterized in that, In step S6, the extended state observer is a third-order discrete extended state observer, whose state variables include the estimated output, the estimated derivative, and the total disturbance estimate; the MCU controller compensates the basic control quantity according to the total disturbance estimate to obtain the compensated speed outer loop control quantity, and uses a boundary layer function or a saturation function to suppress high-frequency chattering caused by disturbance compensation; In step S7, the switching window is a 20ms to 80ms time window centered on the stage switching point, and is executed by converting the MCU outer loop control cycle h_m into an integer number of control cycles; the prediction step size of the short-time domain model predictive control is 5 to 10, and the control step size is 2 to 4, with each step corresponding to one MCU outer loop control cycle h_m, where h_m is 2ms to 5ms; the objective function of the short-time domain model predictive control includes at least an injection velocity tracking error term, an injection cavity pressure tracking error term, a control increment penalty term, and an impact penalty term, where the impact is the rate of change of injection acceleration jerk(k) = [a(k) - a(k-1)] / h_m between adjacent control cycles; and at least two of the following constraints are applied: control increment constraint, injection cavity pressure gradient constraint, impact constraint, upper limit constraint of control quantity, and lower limit constraint of control quantity.
5. The real-time speed control method for injection in a die-casting machine according to claim 1, characterized in that, In step S2, the position sensor acquires the position of the injection plunger at a sampling frequency of 1 to 2 kHz. The MCU controller first filters the injection plunger position using a Savitzky-Golay filter, and then differentiates the filtered injection plunger position to obtain the initial velocity estimate. The Savitzky-Golay filter has a filtering window length of 17 to 41 points and a polynomial order of 2 to 4. The MCU controller synchronously acquires the servo pump speed and the pressure change rate of the injection chamber, constructs a Kalman state model with the injection plunger position, injection speed, and injection acceleration as state variables, and uses the injection plunger position measurement, the pump speed conversion value based on the servo pump displacement and the effective area of the injection cylinder, and the pressure conversion value based on the continuity relationship v_p(k)=[Q_p(k)-C_tp(k)-V_c / β_e·dp(k) / dt] / A_c as measurement variables. The injection speed feedback value is obtained by adjusting the process noise and measurement noise online; where Q_p(k) is the pump-side equivalent flow rate, C_t is the equivalent leakage coefficient, V_c is the effective volume of the injection chamber, β_e is the hydraulic equivalent bulk modulus, and A_c is the effective area of the injection cylinder.
6. The real-time speed control method for injection in a die-casting machine according to claim 1, characterized in that, In step S9, the injection cycle characteristics include maximum velocity deviation, switching overshoot, pressure build-up time, end pressure fluctuation, injection curve area deviation, pump power peak, and cycle time. The MCU controller calculates a quality proxy index based on the weighted sum of each injection cycle characteristic. When the quality proxy index exceeds a preset quality threshold, the MCU controller performs at least one of the following directional corrections based on the dominant error type: correcting the target velocity in the slow segment, correcting the switching window width, correcting the extended state observer bandwidth, correcting the model predictive control weight matrix, and correcting the feedforward coefficients. After one injection cycle is completed, the MCU controller also performs an injection curve multi-anchor point superposition calibration step, which includes: Multiple injection curve anchor points are extracted from the current injection cycle. The injection curve anchor points include: the first anchor point where the injection plunger position reaches the switching position from the slow exhaust section to the high-speed filling section; the second anchor point where the injection speed first reaches 90% of the target speed of the high-speed filling section; the third anchor point where the injection chamber pressure first reaches 50% of the target pressure of the pressurization and compaction section; the fourth anchor point where the injection chamber pressure first reaches 90% of the target pressure of the pressurization and compaction section; and the fifth anchor point where the injection plunger reaches the preset endpoint position. The MCU controller uses the curve segment between two adjacent injection curve anchor points as a unit to perform piecewise time normalization alignment of the speed curve and pressure curve of the current injection cycle with the standard injection curve, respectively. The MCU controller generates an overlay error matrix based on the aligned current injection cycle curve and the standard injection curve. The overlay error matrix includes the time deviation, position deviation, velocity deviation, and pressure deviation calculated within the time window of the corresponding anchor point for each injection curve anchor point. The MCU controller determines the dominant error type based on the superimposed error matrix, and corrects at least one of the following in the next injection cycle: target speed in the slow segment, slow-to-high speed switching position, high-speed-to-boost switching position, switching window width, model predictive control weight matrix, or feedforward coefficients, based on the dominant error type. Specifically, when the time deviation of the second anchor point is greater than 8ms and the speed deviation is greater than 0.12m / s, the MCU controller determines that the speed establishment in the high-speed filling section is lagging, and increases the speed error weight or feedforward coefficient in the slow-to-high-speed switching window; when the pressure deviation of the fourth anchor point is greater than 3MPa and the absolute value of the time deviation is greater than 5ms, the MCU controller determines that there is a pressure superposition error in the pressurization stage, and selects at least one of the following according to the positive or negative direction of the time deviation: reducing the pressure weight in the high-speed to pressurization switching window, increasing the control increment weight, increasing the width of the high-speed to pressurization switching window, or reducing the feedforward coefficient of the pressurization section; after a single injection cycle, the correction amount for the switching position does not exceed ±2mm, the correction amount for the switching window width does not exceed ±10ms, and the correction ratio for any weight in the model predictive control weight matrix does not exceed ±15%.
7. The real-time speed control method for injection in a die-casting machine according to claim 1, characterized in that, In the low-speed safety pre-push interval before the injection cycle enters the slow venting section, or in the safety detection interval at the beginning of the slow venting section and before the molten metal front enters the gate or mold cavity, the MCU controller performs the hydraulic actuation channel pilot identification step, and no pilot perturbation is superimposed after entering the relevant slow venting main section of the cavity filling. The hydraulic actuation channel pilot identification step includes: When the position of the injection plunger is less than the preset safe displacement threshold and the pressure in the injection chamber is less than the preset safe pressure threshold, the MCU controller generates a pseudo-random binary pilot sequence. The FPGA high-speed execution unit converts the pseudo-random binary pilot sequence into a perturbation flow signal, and superimposes the perturbation flow signal onto the current target flow command to obtain a target flow detection command; During the output of the target flow detection command, the FPGA high-speed execution unit simultaneously acquires the injection plunger position, injection chamber pressure, injection speed feedback value, and servo pump speed. The MCU controller obtains the input delay, low-frequency gain, rise time, damping index, and hysteresis index of the hydraulic actuation channel based on the cross-correlation results between the perturbation flow signal and the pressure response of the injection chamber, and the cross-correlation results between the perturbation flow signal and the injection speed response. The MCU controller corrects the input delay compensation term in the short-time domain model predictive control based on the input delay, corrects the feedforward coefficient of the current stage based on the low-frequency gain, and corrects the control increment constraint, slope limit constraint, or impact weight in the stage switching window based on the damping index and hysteresis index. The pseudo-random binary pilot sequence has a length of 31, 63, or 127 bits, a pilot symbol period of 1 ms to 2 ms, and the amplitude of the perturbation flow signal is 0.3% to 1.5% of the rated flow. The superimposed target flow command does not exceed 8% of the rated flow. When the change in injection speed relative to the reference speed at the start of the pilot exceeds 0.03 m / s, or the change in injection chamber pressure relative to the reference pressure at the start of the pilot exceeds 1.5 MPa, or the deviation of the dual channels of the position sensor exceeds a preset threshold, the MCU controller stops the hydraulic execution channel pilot identification, cancels the perturbation flow signal, and switches the control mode back to conservative parameter PID control of the slow exhaust section.
8. The real-time speed control method for injection in a die-casting machine according to claim 1, characterized in that, A stage authorization token mechanism is set between the MCU controller and the FPGA high-speed execution unit. The stage authorization tokens include a slow exhaust authorization token, a high-speed filling authorization token, a pressurization and densification authorization token, and an unloading protection token. Only one stage authorization token is allowed to be valid at any given time. The phase authorization token mechanism includes: The MCU controller sends a stage authorization request to the FPGA high-speed execution unit based on the current injection stage identification result. The FPGA high-speed execution unit determines whether the stage authorization request is allowed to take effect based on a preset hardware interlock table; When the slow exhaust authorization token is valid, the FPGA high-speed execution unit allows the servo pump to output low flow and prohibits the high-speed valve from being fully open and the booster valve from being open. When the high-speed charging authorization token is valid, the FPGA high-speed execution unit allows the servo pump to output high flow and the high-speed valve to open, and prohibits the booster valve from opening prematurely; When the pressurized dense authorization token is valid, the FPGA high-speed execution unit allows the pressurized valve to open and limits the high-speed valve opening to no more than the preset drop-off opening. When the unloading protection token is valid, the FPGA high-speed execution unit prevents the high-speed valve and the booster valve from opening, and allows the return oil passage to open. When the MCU controller requests to switch from a slow exhaust authorization token to a high-speed filling authorization token, it must simultaneously meet the composite triggering conditions from the slow exhaust section to the high-speed filling section, the pressure booster valve being closed, the high-speed valve drive current not exceeding the limit, the servo pump speed feedback being valid, and the pressure sensor dual-channel difference not exceeding the threshold. When the MCU controller requests to switch from the high-speed filling authorization token to the pressurized compaction authorization token, it must simultaneously meet the composite triggering conditions from the high-speed filling stage to the pressurized compaction stage, the high-speed valve opening must have fallen back to below the preset safe opening, and the injection chamber pressure must not exceed the safe pressure limit. When switching between stage authorization tokens, the FPGA high-speed execution unit sets a transition lockout state and lockout time. During the transition lockout state, the previous stage authorization token remains valid and executes the slope limiting output. The next stage authorization token only becomes effective after the hardware interlock table, sensor validity, and stage composite triggering conditions are all met. During the lockout time, the FPGA high-speed execution unit refuses to execute control commands that are inconsistent with the currently valid stage authorization token. The lockout time for switching from a slow exhaust authorization token to a high-speed filling authorization token is 3ms to 8ms, and the lockout time for switching from a high-speed filling authorization token to a pressurized compaction authorization token is 5ms to 12ms.
9. The real-time speed control method for injection in a die-casting machine according to claim 1, characterized in that, The MCU controller constructs a multi-source residual matrix and performs fault detection, fault isolation, and control reconfiguration based on the multi-source residual matrix; The multi-source residual matrix includes: The first residual between the position velocity obtained by filtering and differentiating the position sensor and the pump speed calculated from the servo pump speed; The second residual between the position velocity obtained by filtering and differentiating the position sensor and the pressure conversion velocity obtained by converting the pressure change rate of the injection chamber; The third residual between the predicted pressure obtained from the discrete model of the controlled object and the measured pressure measured by the pressure sensor; The fourth residual between the target speed of the servo pump and the measured speed of the servo pump; The fifth residual between the target opening degree of the hydraulic valve assembly and the feedback opening degree of the hydraulic valve assembly; The sixth residual between the equivalent parameter vector obtained through online identification and the corresponding parameters of the current matching model; The MCU controller normalizes the first to sixth residuals according to the corresponding sensing range, noise standard deviation, or calibration residual upper limit to obtain the corresponding normalized residuals. Based on the combination relationship of different normalized residuals, it distinguishes between position sensor anomalies, pressure sensor anomalies, servo pump response anomalies, hydraulic valve group jamming, oil temperature drift, and model mismatch. Among them, when the position sensor and pressure sensor adopt dual-channel redundancy, if the difference between the two channels exceeds the corresponding deviation threshold for 5ms for a continuous period of time, the channel with a larger deviation from the fusion estimate will be downweighted or removed, and the other channel will be used as a temporary reliable channel. When the position sensor is determined to be abnormal, the MCU controller reduces the weight of the position sensor in the multi-sensor fusion speed estimation and increases the weight of the servo pump speed and the rate of change of the injection chamber pressure. When a pressure sensor malfunction is detected, the MCU controller exits the short-time-domain model predictive control of the pressurization and compaction phase and adopts conservative pressure limiting. When the servo pump response is determined to be abnormal, the MCU controller reduces the ramp rate of the target flow command. When the hydraulic valve group is determined to be stuck, the MCU controller will prevent the high-speed filling section from being entered or trigger the return oil protection. When a model mismatch is detected, the MCU controller freezes online parameter identification and model switching, and reverts to the default model parameter group; Specifically, when any normalized residual exceeds the preset residual threshold for 2 to 4 consecutive MCU outer loop control cycles, fault detection is triggered. When the same fault type is identified twice consecutively, fault isolation is triggered, and control reconfiguration is completed within 20ms after triggering fault isolation. During control reconfiguration, the target flow rate does not exceed 40% of the rated flow rate, and the target pressure does not exceed 60% of the rated pressure.
10. A real-time speed control system for injection in a die-casting machine, used to implement the method described in any one of claims 1 to 9, characterized in that, It includes a human-machine interface, an Ethernet communication interface, an MCU controller, an FPGA high-speed execution unit, a sensor group, and an actuator; The human-machine interface is used to configure the process parameters for the slow exhaust section, the high-speed filling section, and the pressurization and densification section. The Ethernet communication interface is used to realize the exchange of process parameters, status feedback and diagnostic information between the human-machine interface and the MCU controller, and to perform CRC verification, communication watchdog monitoring and abnormal retransmission. The communication refresh cycle of the Ethernet communication interface is 10ms to 20ms. Each frame of control data includes frame number, timestamp and parameter version number. The MCU controller only writes the current process parameter area when the CRC verification is successful and the frame number is consecutive. The sensor group includes a position sensor, a pressure sensor, a temperature sensor, a servo pump speed acquisition unit, and a valve group opening feedback unit. The position sensor and pressure sensor can adopt a dual-channel redundant structure. The position sensor is used to acquire the position of the injection plunger, the pressure sensor is used to acquire the pressure of the injection chamber, the temperature sensor is used to acquire the oil temperature, the servo pump speed acquisition unit is used to acquire the servo pump speed, and the valve group opening feedback unit is used to acquire the hydraulic valve group opening. The MCU controller is used to perform speed outer-loop control at an outer-loop scheduling frequency of 200-500Hz, and to perform stage identification, disturbance-free switching, discrete modeling of the controlled object, online parameter identification using recursive least squares method, candidate model residual selection, total disturbance compensation of the extended state observer, short-time domain model predictive control of the switching window, multi-sensor fusion speed estimation, batch-level quality back-inference self-tuning, hydraulic actuation channel pilot identification, multi-anchor point superposition calibration of the injection curve, multi-source residual fault isolation and control reconstruction, and safety degradation processing. Among these, the short-time domain model predictive control is solved within a single outer-loop control cycle, while the recursive least squares parameter writing, batch-level self-tuning, and curve calibration are performed according to a cycle or loop end event at a frequency lower than the outer-loop scheduling frequency. The FPGA high-speed execution unit is used to perform pressure / flow inner loop control, high-speed signal acquisition and preprocessing, control quantity limiting, control quantity slope constraint, stage authorization token verification, hardware interlocking, and multi-actuator parallel drive at a sampling frequency of 1 to 2 kHz. The actuator includes a servo pump, a hydraulic valve group, and an injection cylinder. The servo pump and hydraulic valve group, driven by the FPGA high-speed execution unit, adjust the pressure or flow of the injection cylinder to drive the injection plunger to complete slow exhaust, high-speed filling, and pressurization compaction actions.