Dynamic grading early warning method and system for servo driver following error

By constructing a trend-based error detection model and a dynamic threshold adjustment mechanism in the servo driver, hierarchical early warning and protection of the servo system are realized, which solves the shortcomings of error early warning in the existing technology and improves the system's security and intelligence.

CN121578732APending Publication Date: 2026-02-27GUANGDONG XINDEZHONG INTELLIGENT EQUIP CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511743782.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing error warning methods for servo drives use fixed thresholds for judgment, which cannot adapt to dynamic error changes, leading to false alarms, missed alarms, or delayed alarms. They also lack a graded response mechanism and cannot meet the safety, continuity, and flexible control requirements of complex industrial sites.

Method used

A prediction model based on trend error detection is adopted, combined with the state vector and dynamic threshold model of the servo system, to adjust the error warning threshold in real time, and to implement corresponding protection measures through a graded response control strategy, including minor, moderate and severe warning levels.

Benefits of technology

It enables dynamic perception and intelligent protection of errors in the servo system, significantly reducing false alarms and delayed response, improving system operation safety and intelligence, and adapting to error changes under complex working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121578732A_ABST
    Figure CN121578732A_ABST
Patent Text Reader

Abstract

The invention provides a dynamic grading early warning method and system for servo driver following errors, and the method comprises the steps: collecting the position and speed data of a main shaft and a slave shaft of a servo system in real time, and calculating a position following error and a speed following error; constructing a state vector in combination with the normalized position following error and the speed following error, inputting the state vector into a constructed prediction model based on trend error detection, and outputting error state estimation of a next period; combining the error state estimation and the error growth trend index to construct a dynamic threshold value model so as to dynamically adjust an error early warning threshold value, and determining a graded early warning grade according to a comparison result of the position error prediction value and the error early warning threshold value; and executing a corresponding grading response control strategy according to the grading early warning grade to obtain an adjusted speed set quantity and an execution flag bit. According to the invention, the phenomena of false alarm and lagging response can be obviously reduced, and the operation safety and the intelligent level of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of servo drives, and particularly relates to a dynamic hierarchical early warning method and system for following errors of a servo drive. BACKGROUND

[0002] A servo drive is a core component for high-precision motion control in modern automation equipment, and is widely used in fields such as numerical control machine tools, robots, printing and packaging, and high-speed mounting equipment. The control goal is to ensure that the speed and position between the master shaft and the slave shaft are strictly synchronized. However, in actual operation, the servo system will be affected by various dynamic factors such as load changes, transmission chain clearances, mechanical inertia, external vibrations, and temperature drifts, resulting in following errors between the master and slave shafts that fluctuate over time. When the system cannot timely perceive and correct this error trend, not only will it cause position deviation and precision decline, but it may also cause equipment vibration, overshoot, and even shutdown failure, seriously affecting production efficiency and equipment life. Existing error warning methods usually use a fixed threshold judgment method, which triggers an alarm or shutdown when the detected error exceeds a certain set value. However, this fixed threshold method has obvious shortcomings when dealing with different working conditions. When the device is running at high speed, the periodic load changes, or the acceleration and deceleration switching stages, the dynamic characteristics of the error will change significantly, and the fixed threshold cannot adapt to this nonlinear fluctuation, easily causing false alarms, missed alarms, or delayed alarms. At the same time, the alarm structure of traditional systems is generally single, i.e., the rigid logic of "error exceeding limit - shutdown protection", lacking a hierarchical response mechanism for error development trend and severity, and unable to meet the parallel requirements of safety, continuity, and flexible control in complex industrial sites.

[0003] Therefore, there is an urgent need for a multi-level response warning method that can perceive error change patterns in real time, predict error growth trends, and dynamically adjust thresholds based on system state, enabling the servo drive system to have the ability of proactive prediction, flexible response, and adaptive protection. SUMMARY

[0004] The purpose of the present application is to provide a dynamic hierarchical early warning method and system for following errors of a servo drive, which solves the above problems.

[0005] In order to achieve the above purpose, in the first aspect of the present application, a dynamic hierarchical early warning method for following errors of a servo drive is provided, which comprises the following steps: S1, real-time acquisition of position and speed data of the master shaft and the slave shaft of the servo system, calculation of the original position following error and the original speed following error, and normalization processing to obtain the normalized position following error and the normalized speed following error; S2. Construct a state vector by combining the normalized position following error and velocity following error, input the state vector into the constructed prediction model based on trend error detection, and output the error state estimate for the next period; and calculate the error growth trend index based on the error state estimate for the next period to describe the growth trend of the position error; wherein, the error state estimate includes the predicted value of the position error and the predicted value of the velocity error; the error growth trend index is calculated based on the predicted value of the position error; S3. Construct a dynamic threshold model by combining the error state estimation and error growth trend index to dynamically adjust the error warning threshold, and determine the graded warning level based on the comparison result between the predicted position error value and the error warning threshold. S4. Based on the aforementioned graded warning level, execute the corresponding graded response control strategy to obtain the adjusted speed setting and execution flag bit; wherein, the execution flag bit is 1 or 0, when the value is 1, it indicates that the system has met the judgment conditions for emergency stop protection and needs to immediately enter the deceleration and shutdown process; otherwise, it indicates that the system is currently in the speed limit response stage.

[0006] Furthermore, the method also includes: S5. When the execution flag is 1, the emergency stop protection is triggered, and the flexible deceleration and shutdown control is executed. The protection action is confirmed to be completed based on the servo driver status register status, the controller's own logic and external auxiliary signals.

[0007] Furthermore, the constructed prediction model based on trend error detection adopts a state recursion structure that is structurally similar to that of Kalman filtering, and is generated by combining state transfer terms, drift term compensation, and trend correction terms. The state transition term is the product of the current state vector and the state transition matrix, assuming that the error change trend has a linear acceleration structure. The drift term compensation uses the existing bus current change rate in the servo driver to approximate the load disturbance, thereby enhancing the system's response to insignificant disturbances. The trend correction term is calculated based on the rate of change of position error and is used to reflect the sensitivity to the speed of error change.

[0008] Furthermore, the step of constructing a dynamic threshold model by combining the error state estimation and the error growth trend index to dynamically adjust the error early warning threshold specifically involves: Obtain the initial basic threshold of the device; A dynamic threshold model is constructed by combining the initial base threshold of the device with a dynamic adjustment factor. The dynamic adjustment factor is calculated by combining the baseline level of the basic threshold, the error growth trend index, the speed error prediction value, and the servo inertia compensation term. The dynamic threshold model is used to indicate that when the error growth trend indicator rises significantly or the response lags, i.e. the speed error prediction value is large, the dynamic adjustment factor approaches 1, causing the error warning threshold to decrease sharply, thereby activating the warning mechanism in advance; while when the error is stable or changes slowly, the dynamic adjustment factor approaches 0, and the error warning threshold returns to the baseline level.

[0009] Furthermore, the servo inertia compensation term is used to reflect the accumulation of transient errors caused by the mechanical inertia and periodic loads of the servo system, providing a near-terminal error compensation. The mean square value of the rate of change of position error within each sampling period.

[0010] Furthermore, the tiered early warning levels include minor warning, moderate warning, and severe warning.

[0011] Further, S4 includes: Obtain the currently issued speed command or current target, which corresponds to the speed loop or current loop control mode, respectively; The current speed command or current target is adjusted based on the current graded early warning level and error growth trend indicator to generate the adjusted speed setting or current setting.

[0012] Furthermore, if the current warning level is a severe warning and the situation continues to occur for more than the set number of cycles, a forced shutdown protection action will be triggered, and an execution flag will be generated.

[0013] Furthermore, the joint determination based on the servo driver status register state, the controller's own logic, and external auxiliary signals specifically includes: The servo driver periodically acquires the current status and checks if the speed is zero; the controller internally needs to confirm whether the current motion command has been cleared; if the buffer is empty, it means that all current control tasks have been aborted; if the system is equipped with external safety circuits, it needs to confirm that these safety feedbacks have been responded to correctly. The speed, the motion commands inside the controller, and the external safety circuit are sampled separately, and Boolean logic is used internally to determine whether all conditions are met simultaneously. Once the speed has been reduced to within the allowable range, all movement commands have been cleared, and the safety circuit status has been confirmed, the protection action is confirmed to be complete.

[0014] A second aspect of the present invention provides a dynamic hierarchical early warning system for servo driver following error, the system comprising: The data acquisition and processing module is used to acquire the position and speed data of the master and slave axes of the servo system in real time, calculate the original position following error and the original speed following error, and perform normalization processing to obtain the normalized position following error and speed following error. The error trend prediction module is used to construct a state vector by combining the normalized position following error and velocity following error, input the state vector into the constructed prediction model based on trend error detection, and output the error state estimate for the next period; and calculate the error growth trend index based on the error state estimate for the next period to describe the growth trend of the position error; wherein, the error state estimate includes the predicted value of the position error and the predicted value of the velocity error; the error growth trend index is calculated based on the predicted value of the position error. The dynamic threshold and early warning module is used to construct a dynamic threshold model by combining the error state estimation and the error growth trend index, so as to dynamically adjust the error early warning threshold and determine the graded early warning level based on the comparison result between the predicted position error value and the error early warning threshold. The intelligent response decision module is used to execute the corresponding graded response control strategy according to the graded warning level, and obtain the adjusted speed setpoint and execution flag bit; wherein, the execution flag bit is 1 or 0, when the value is 1, it means that the system has met the judgment condition of emergency stop protection and needs to immediately enter the deceleration and stop process; otherwise, it means that the system is currently in the speed limit response stage.

[0015] The beneficial technical effects of the present invention are at least as follows: This invention addresses the shortcomings of existing fixed threshold early warning methods for servo drives, which cannot adapt to dynamic error changes. It proposes a dynamic early warning method and system for servo drive following errors based on error trend prediction and dynamic hierarchical response. The method first acquires real-time speed and position data of the master and slave axes through the servo system's built-in encoder and bus signal channels. After normalization, a standardized following error vector is obtained, providing a unified scale for subsequent modeling. Then, a state recursive model with time-varying drift compensation and error slope regularization terms is constructed to predict the short-term development trend of the error and calculate the error growth index, enabling early identification of potential error amplification. Based on this, a multi-factor dynamic threshold optimization mechanism is established, combining error trend, speed response lag, and servo inertia compensation terms to adjust the threshold range in real time, thus forming an error tolerance boundary that can adaptively change according to the system's operating state. When the error gradually approaches or exceeds the dynamic threshold, the system automatically executes a hierarchical response strategy, including different levels of protection measures such as mild speed limiting, moderate speed limiting, and gradual shutdown. An exponential soft-stop function is introduced to control the actual deceleration curve, ensuring a smooth transition during protection execution and avoiding mechanical shock and excessive vibration.

[0016] Meanwhile, this invention also designs a protection completion feedback mechanism based on three-condition joint judgment, which confirms in real time whether the motor has completely stopped, whether the motion buffer has been cleared, and whether the safety circuit has been closed, ensuring that the entire protection process is closed-loop and controllable. This scheme, through the overall logic of "monitoring—prediction—threshold adaptation—tiered execution—closed-loop feedback," achieves dynamic perception and intelligent protection of servo system errors, significantly reducing false alarms and delayed response phenomena, and improving the system's operational safety and intelligence level. Attached Figure Description

[0017] The present invention will be further described with reference to the accompanying drawings, but the embodiments in the drawings do not constitute any limitation on the present invention. For those skilled in the art, other drawings can be obtained based on the following drawings without creative effort.

[0018] Figure 1 This is a flowchart of a dynamic hierarchical early warning method for servo driver following error according to the present invention. Detailed Implementation

[0019] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0020] like Figure 1 As shown in the figure, an embodiment of the present invention provides a dynamic hierarchical early warning method for servo driver following error, the method comprising: S1. Real-time acquisition of position and speed data of the servo system's spindle and slave axis, calculation of raw position following error and raw speed following error, and normalization processing to obtain normalized position following error and speed following error.

[0021] Specifically, this step aims to construct the core input variables upon which dynamic hierarchical early warning relies: the position and velocity tracking errors between the master and slave axes of the servo system. All collected data must originate from the servo system's natively readable real-time signal channels; external sensors or redundant measuring devices cannot be introduced to ensure its suitability for the field deployment environment. Simultaneously, considering the significant differences in error ranges between different tasks and systems, error values ​​must be normalized to construct a standard-scale error vector, ensuring the model's transferability and universality in subsequent use. Input data is provided in real-time by existing components of the servo drive system and mainly includes four types of quantities: master axis target position... The actual position of the axis is periodically transmitted from the host motion control system via EtherCAT or CANopen bus. The spindle target speed is fed back in real time by the encoder of the slave axis motor. The encoder is usually a 17-bit or 23-bit incremental or absolute structure. The actual speed of the axis is generated by the host controller (such as a PLC or CNC system) and sent via the communication bus; The speed is calculated by the speed loop module inside the driver, based on the encoder displacement differential or direct feedback speed channel. The data sampling period is generally [missing information]. Once per millisecond.

[0022] Furthermore, the four raw data points mentioned above are first read from the communication bus and encoder, and then the raw error (units are not standardized) is constructed: ; in, Indicates the current position error. This indicates the current speed error. and These represent the target position sent by the main spindle and the actual feedback position from the slave axis, respectively, in angles or millimeters. and These are the target speed and the actual speed, respectively, and the units can be rpm or mm / s, depending on the control system configuration.

[0023] Furthermore, to ensure consistency in error representation across systems, error normalization is required. The normalization factor is the maximum permissible error value set by the system, denoted as […]. and Its value comes from the equipment's factory calibration or is set by engineers in a configuration file. For example, the maximum position error might be set to... The maximum speed error is 100 rpm. The normalization formula is: ; in, To normalize the position following error, This is for normalizing the speed following error. The error value after normalization generally falls within the range of... The interval ensures that subsequent processing logic does not depend on specific units and will not lose consistency due to differences in equipment models.

[0024] To illustrate with a typical example, at a certain moment, the data read is... , ,but ;like ,but Similarly, if rpm rpm rpm rpm, then These two dimensionless error vectors will be used for subsequent error trend modeling.

[0025] The entire normalization process can be implemented in the edge processing unit of the driver. Common methods include periodic task calls from the PLC or direct implementation of the processing logic in systems where the driver supports scripting languages ​​(such as Codesys or TwinCATPLC). All data interfaces are standard interfaces found in existing industrial systems, eliminating the need for additional sensors.

[0026] S2. Construct a state vector by combining the normalized position following error and velocity following error, input the state vector into the constructed prediction model based on trend error detection, and output the error state estimate for the next period; and calculate the error growth trend index based on the error state estimate for the next period to describe the growth trend of the position error; wherein, the error state estimate includes the predicted value of the position error and the predicted value of the velocity error; the error growth trend index is calculated based on the predicted value of the position error.

[0027] Specifically, the core task of this step is to utilize the two key variables output from the previous step—normalized position following error. With normalized speed following error A dynamic analysis mechanism with trend prediction capabilities is constructed to predict the direction and magnitude of error changes in the servo drive within a short period. This prediction is not only a logical prerequisite for realizing dynamic threshold adjustment, but also a key technical support for the "dynamic hierarchical early warning" in this invention, directly determining the activation timing and sensitivity of the subsequent response mechanism.

[0028] In servo systems, the following error between the master and slave axes is not random but often exhibits a non-linear trend of error drift, influenced by system load changes, path acceleration / deceleration phases, and mechanical wear. This is particularly problematic in periodic load systems like rotary screen printing equipment, where errors tend to accumulate over multiple cycles, resulting in "hysteresis amplification." If this trend cannot be identified in advance, the system can only respond when the error exceeds a threshold, leading to problems such as protection lag, equipment jitter, or misaligned printing. Therefore, it is essential to introduce a predictive model for trend error detection and optimize its design in conjunction with the characteristics of the servo control structure itself.

[0029] Furthermore, to achieve high real-time performance, low computational cost, and the ability to dynamically respond to trend changes, this step adopts a state recursion structure that is structurally similar to a Kalman filter, and introduces a time-varying drift term and an error slope regularization term designed specifically for the scenario of this invention to enhance the ability to identify nonlinear trends. This model does not employ traditional machine learning models to avoid introducing large amounts of data and training burdens; instead, it completes short-term predictions through real-time recursion.

[0030] The state vector is defined as follows: ; in This represents the system's following error state at time t, with a sampling period of . In the implementation of this invention, generally take ms.

[0031] To make predictions, the recursive state update equation is constructed as follows: ; in: To simplify the state transition matrix, it is assumed that the error change trend follows a linear acceleration structure; It is a drift term control matrix that matches the scenario of this invention. This represents the time-varying disturbance factor provided by the load estimation module, reflecting the short-term impact of load abrupt changes or process cycle time on the error. The value is estimated by the rate of change of the driver bus current. The unit amplitude disturbance vector controls the direction of drift injection; The rate of change of positional error is a core indicator for trend judgment. The slope regularization factor controls the strength of the influence of the error growth trend on state recursion, and its value is in... The range is adjustable; an initial setting of 0.4 is recommended.

[0032] It is important to note that: Drift term compensation The introduction of this: This is a structure designed specifically for servo drive systems. It uses the existing bus current change rate in the servo drive to approximate the load disturbance (such as changes in fabric tension or roller pressure), and dynamically corrects the error state through this estimate, thereby enhancing the system's response to insignificant disturbances.

[0033] Trend correction item The introduction of this feature: This feature reflects the sensitivity to the rate of error change. It will not be activated when the error is stable, but once the error begins to grow continuously, this feature will push up the predicted value, making subsequent warnings more sensitive. Compared to using the error value itself, this strategy can capture the "starting point of the trend" rather than waiting for the error to accumulate to a dangerous level before issuing a warning.

[0034] Furthermore, the predicted output serves as the error state estimate for the next period. It contains two elements: This is the predicted position error value for the next cycle. This is the predicted value for speed error. Simultaneously, the error growth trend index is calculated. Used to describe the growth trend of position error: ; in The absolute value represents the magnitude of the error increase, and the sign indicates the direction of increase. To improve system robustness, a minimum judgment threshold can be set. ,when consecutive occurrences Next (such as) When the system judges that it has "entered the error amplification trend stage", it will be considered that the system has entered the error amplification trend stage.

[0035] The entire prediction module runs within an interrupt task of the control cycle, resulting in low computational complexity. It can be written using the IEC 61131 standard language and embedded within the driver edge controller (such as the Beckhoff CX series and Inovance AM600 series), leading to extremely low deployment costs. (Drift estimation term) It can be estimated by the sliding window differentiation of the driver feedback current, without the need for additional hardware.

[0036] S3. Construct a dynamic threshold model by combining the error state estimation and error growth trend index to dynamically adjust the error warning threshold, and determine the graded warning level based on the comparison result between the predicted position error value and the error warning threshold.

[0037] Specifically, the task of this step is to base the error prediction results from the previous stage on... With trend indicators This approach enables dynamic error threshold optimization and tiered early warning for servo systems. This step directly combines trend information with system response status to construct a constantly changing error tolerance boundary, allowing the system to achieve sensitive and stable early warning judgments under different operating conditions. Compared to traditional fixed thresholds, the innovation of this solution lies in the fact that the threshold is no longer a static value, but rather dynamically adjusted by multiple sub-items reflecting actual operating conditions, including load disturbance compensation, trend adaptive regularization, and servo dynamic inertia. The result not only improves early warning accuracy but also maintains the system's anti-jitter capability in high-speed, periodic disturbance scenarios.

[0038] The input to this step comes from the output of the previous step: the error prediction state. and error growth rate . This represents the normalized position error predicted in the next sampling period; This represents the predicted speed error value, reflecting the response delay or overshoot of the servo system. These are error trend indicators, describing the direction and magnitude of error changes. All three quantities were obtained in the previous stage through state recursion equations and trend analysis; therefore, this step does not require recalculating the basic error, but only performs real-time optimization of the threshold adjustment mechanism.

[0039] Furthermore, to adapt to the error fluctuation characteristics under dynamic working conditions (such as rotary screen printing or multi-axis synchronous processing), this step introduces a trend-driven threshold self-adjustment mechanism to construct a dynamic threshold function. Considering the system's error state and There is a coupling relationship (velocity fluctuations can lead to the accumulation of position deviations), and this function must take into account the influence of both, while also considering the error growth trend indicator. Nonlinear suppression is applied to avoid false alarms triggered by short-term fluctuations. The final dynamic threshold model design is as follows: ; in, The threshold is dynamically adjusted at the predicted time. 1 is the dynamic adjustment factor; 1 is the baseline level for the basic threshold. The initial basic threshold for the device (e.g., normalized error tolerance of 0.8). This is the trend response coefficient, used to control the sensitivity of threshold tightening; The velocity error coupling factor reflects the impact of system velocity response hysteresis on the tolerance boundary; It is a dynamic inertia compensation factor used to correct short-term error amplification caused by the mechanical inertia of the system; The newly added servo inertia compensation term is a special item designed in this invention. It is used to reflect the accumulation of transient errors caused by the mechanical inertia of the servo system and the periodic load. Its definition is as follows: ; Wherein in the formula In essence, it is close. The mean square value of the rate of change of position error within each sampling period can be calculated in real time through the built-in loop of the driver, reflecting the energy level of the system error change. Its engineering significance lies in the fact that when the system frequently accelerates or decelerates (such as during printing roller reversal or fabric pulling on a loom), mechanical inertia can cause the error to fluctuate more strongly in the short term. However, such fluctuations are often normal transient processes and should not immediately trigger an alarm. By introducing... The term is assigned a positive coefficient. The threshold will be moderately relaxed during this inertial disturbance phase, thereby reducing the false alarm rate.

[0040] It should be noted that in the formula The term exhibits nonlinear contraction characteristics, and the error growth trend... Significant increase or system response lag ( When the value is relatively large, this term approaches 1, making the overall threshold smaller. The threshold decreases sharply, thus triggering an early warning mechanism; when the error stabilizes or changes slowly, the threshold approaches 0, and the threshold returns to the baseline level. This allows for real-time adaptation to actual dynamic changes.

[0041] In actual operation, this calculation can be implemented in the PLC's periodic tasks, with each sampling cycle executed sequentially by the controller: Obtain from the trend prediction module , , ; Calculate the inertia compensation term (Window length) Generally, 5 to 10 sampling periods are used. Updated in real time according to the above formula. ; Current error and Compare and implement tiered early warning judgments.

[0042] The tiered early warning system uses a three-segment logical interval division: Level I (Minor Warning): ; Level II (Moderate Warning): ; Level III (Severe Warning): .

[0043] The threshold range for each level changes dynamically over time, achieving "flexible hierarchical early warning." To avoid frequent level jumps, this step incorporates a delayed confirmation mechanism into the logical judgment: that is, continuous... Only after the conditions for advancement are met in each cycle will it switch to a higher level. ~ (This is a suitable approach). If the error recovers, the system immediately drops one level. This bidirectional asymmetric switching logic is particularly important in practical servo systems, as it effectively prevents the device from being in an "alarm flashing" state.

[0044] For example, in rotary screen printing equipment, when the printing roller just enters the contact stage, the system will experience a short-term speed difference caused by a sudden increase in load, but during this stage... The system will automatically relax the restrictions if the requirements are too high. It will not generate false alarms; if continuous load imbalance causes... If the value is continuously positive, the system tightens the threshold and triggers an early warning, enabling early intervention. Actual testing shows that this dynamic hierarchical early warning method can issue warnings approximately 7–10 control cycles earlier than a fixed threshold system, significantly reducing false alarm rates and response delays.

[0045] Through this dynamic threshold optimization mechanism, the system achieves agile response to error trends and adaptive handling of mechanical inertial disturbances, fundamentally improving the intelligence and safety of the servo drive under complex working conditions. This method integrates trend nonlinearity and inertial regularization terms in the formula design, constructing a dynamic hierarchical early warning control core that can react in advance and has anti-interference capabilities.

[0046] S4. Based on the aforementioned graded warning level, execute the corresponding graded response control strategy to obtain the adjusted speed setting and execution flag bit; wherein, the execution flag bit is 1 or 0, when the value is 1, it indicates that the system has met the judgment conditions for emergency stop protection and needs to immediately enter the deceleration and shutdown process; otherwise, it indicates that the system is currently in the speed limit response stage.

[0047] Specifically, the goal of this step is to... (The sentence is incomplete and requires more context to translate accurately.) With warning level Based on this, the drive system executes response actions, constructing a hierarchical, adjustable, and real-time error protection mechanism. This allows the servo system to intervene and provide protection responses at each level without interrupting critical control tasks when error deviations occur. This mechanism is particularly suitable for applications requiring "uninterrupted, steady-state response," such as rotary screen printing, dual-axis synchronous feeding, and electronic placement. The core idea is not simply to stop the machine or issue an alarm, but to design a progressive response chain "from software to hardware" by combining the error change trend, duration, and dynamic characteristics of the control system. This ensures stable system operation while improving the intelligence of error handling.

[0048] The input variable for this step is the dynamic error threshold output from the previous stage. and the current warning level . It is based on the error trend index Speed ​​error and historical error variation energy term The derived dynamic tolerance boundary typically has values ​​between the normalized range [0.3, 1.2]. These are tiered early warning signals, with values ​​ranging from 0 to 3, corresponding to no warning, minor, moderate, and severe warning levels, respectively. The controller reads these two values ​​in each control cycle and uses them as decision-making conditions to initiate response actions.

[0049] In actual servo control systems, the controller typically controls the motor by issuing speed commands. or current target This is implemented in two modes: speed loop and current loop control, respectively. To achieve a graded response, this invention requires limiting adjustments based on these original control commands. Specifically, within each cycle, the control system uses a function to dynamically scale down the current control command, resulting in the actual command issued. This adjustment ratio is based on and The latter can access the RAM buffer in real time during this control cycle. and The calculation is performed automatically, requiring no additional data acquisition. When executing this calculation logic, the controller can embed this process into a periodic task using a standard PLC programming language (such as IEC61131ST). The entire calculation is completed within 1-2 ms, without compromising the real-time performance of the main control thread.

[0050] The actual control quantity adjustment adopts the following structure: ; in and These are the penalty coefficients for graded response and trend response, respectively, and it is recommended to initially set them to [value missing]. , For example, in a typical dual-axis synchronous drive system, if the current speed command... rpm , ,but: ; This control logic can be implemented using a speed command limiting module in a PLC such as the Huichuan AM600 or Schneider M241 series. By outputting a penalty factor to the speed setting command terminal through an internal intermediate variable, the PLC or motion control card can complete the speed limiting process in the control flow.

[0051] On the other hand, for error level 1 (Serious Warning) If this continues for more than the set number of cycles, this step will also trigger a forced shutdown protection action. To avoid repeated system start-ups and shutdowns due to momentary false alarms, the system has a sliding window-style "error level confirmation mechanism," meaning that only if there have been consecutive errors in the past... In each cycle Each cycle satisfies A response signal is triggered only when the specified time is reached. The determination logic is as follows: ; in This is the action response flag. To observe the window length, The minimum number of times the protection is triggered. This is a logical judgment function. In most scenarios, , This already satisfies the balance between immunity and responsiveness. For example, in a printing system, a momentary fluctuation in ink thickness causes the error to briefly rise to a severe level, but if it quickly recovers to a moderate level within three cycles, then... The system does not perform a shutdown action, thus effectively avoiding continuous interference from "accidental shutdown-restart".

[0052] like The controller will immediately execute an emergency stop procedure, including but not limited to: Forcefully clear the motion trajectory cache (call function blocks such as MC_Reset and MC_Stop); Send a zero-speed target to the driver to activate the built-in rapid deceleration function; Power off the hardware relay to activate the mechanical brake (if configured). The system notifies the host system to issue an audible and visual alarm or send an interrupt signal.

[0053] In specific projects, such as when an electronic placement machine uses a Panasonic A5 series servo drive, the Pn400 register value can be controlled by calling the PANATERM parameter register, setting the "speed command cutoff" to 1 to achieve emergency stop control. The entire action response delay is less than 20ms, meeting industrial safety control standards.

[0054] Ultimately, this step outputs two variables: one is the adjusted speed setpoint. The first function is to send control commands from the controller to the servo driver; the second function is to execute the flag bit. Its value is 0 or 1, which determines whether to enter the emergency protection process. All judgment logic, calculation process and response behavior are embedded in the control cycle process, and the edge execution mode is adopted. It does not rely on the cloud or external platform, and has high real-time performance and high reliability.

[0055] Furthermore, the method also includes: S5. When the execution flag is 1, the emergency stop protection is triggered, and the flexible deceleration and shutdown control is executed. The protection action is confirmed to be completed based on the servo driver status register status, the controller's own logic and external auxiliary signals.

[0056] Specifically, this step aims to truly apply the protection signals and adjustment control quantities output in the previous stage to the servo system, completing the actual response and protection execution after error warning. It is the final link in the "perception-decision-execution" closed loop of this invention. Unlike the traditional "stop when error exceeds limit" mode, this step introduces a phased control strategy, combined with dynamic speed limiting and gradual shutdown mechanisms, enabling the servo system to respond flexibly when errors amplify, avoiding secondary damage to the equipment caused by sudden actions. It is particularly suitable for servo scenarios of "uninterrupted continuous operation" such as high-speed printing and electronic mounting.

[0057] The input for this step comes from the two output variables of step 4, namely and .in To determine the error level in the current period and error trend The dynamically calculated speed limit command usually originates from the motion control unit of the PLC or the speed planning module of the upper control system, and the original speed has been set according to the safety policy. Perform compression. Variables In response to the trigger signal, a value of 1 indicates that the system has met the emergency stop protection criteria and must immediately enter the deceleration and shutdown process. The controller will use these two inputs in the current control cycle to determine the next control command and physical action.

[0058] To achieve a balance between real-time performance and flexibility in protection control, this step employs an exponentially decreasing protection strategy. In practical engineering, speed control commands are typically written to the servo driver's "speed setting" register via a periodic data packet (PDO) through a servo bus (such as EtherCAT or CANopen). For example, in Beckhoff control systems, this register is DriveObj.X.CommandVelocity, corresponding to Pn101 or Pn200 in the Huichuan IS620N. The PLC's periodic task writes the calculated speed to this register before the end of each 1ms cycle, thus driving the motor to execute in the next PWM update cycle.

[0059] when This indicates that the system is currently in the rate-limiting response phase, at which point the controller will directly... Write the speed register, and the servo system will run at this speed. If The system enters an emergency stop preparation state, but instead of immediately sending the signal at zero speed, it constructs a descent function to exponentially decay the speed, ensuring a smooth transition of the mechanical system and reducing the accumulation of position errors that could interfere with subsequent alignment.

[0060] The final control quantity issued is determined by the following formula: ; in This is the speed command for the final write to the drive; From The cumulative time (in seconds) that triggers the start of the countdown is achieved through the PLC's internal clock or timer module; This is the exponential decay coefficient, typically set to 5–10, depending on the equipment's inertia. This method allows the system to smoothly transition from the current speed to zero speed within 1–2 seconds. For example, in a rotary screen printing system, , ,exist The system speed will decrease to This means that the soft shutdown has been basically completed.

[0061] On the other hand, to ensure a complete closed loop of the protection action, this step incorporates a state feedback quantity. This indicates whether the current condition meets the "protection complete" requirement. This variable is generated by the controller through a joint assessment from three sources: The servo driver status register reads the "speed is 0" or "in position" status bit. The controller itself determines whether the motion trajectory buffer has been cleared (e.g., by calling MC_Reset or the buffer zeroing instruction). External auxiliary signals, such as brake feedback or safety relay status.

[0062] The above three protection conditions are comprehensively judged by the PLC's internal logic. The controller reads them separately in each cycle and combines them to form a unified protection completion signal. The specific judgment logic is as follows: First, the servo drive periodically reports its current status, including whether the speed is zero. This information is typically reflected in a specific value in the status word register (e.g., "motor stopped" or "target reached"), which can be directly obtained by reading variables such as StatusVelocityIsZero in Beckhoff TwinCAT or Codesys systems.

[0063] Secondly, the controller needs to confirm whether the current motion commands have been cleared. The PLC program typically maintains a "track buffer status" variable to record whether there are any unexecuted motion commands. When this buffer is empty, it indicates that all current control tasks have been aborted. This status can be obtained through the motion control module or a dedicated flag (such as MotionBufferCleared).

[0064] Finally, if the system is equipped with external safety circuits such as safety relays and brake release detection, it is necessary to confirm that these safety feedbacks have responded correctly. For example, the common SafetyRelayActive signal indicates that the safety hardware has completed its operation, the electrical circuit is closed, and it meets the requirements for entering the static protection state.

[0065] Within a control cycle, the controller samples the status of the three conditions mentioned above and internally uses Boolean logic to determine whether they are simultaneously met. A protection completion flag is generated only when all three conditions—servo feedback speed reduced to within allowable limits, all motion commands cleared, and safety circuit status confirmed as true. Its value is 1. This flag is then fed back to the host system (such as SCADA or MES) via the fieldbus to trigger protection logging, allow reset operations, or notify operator intervention.

[0066] In actual engineering deployment, and The control signal path needs to be processed by the speed limiting module and transient function module inside the PLC. For example, in the TwinCAT system, standard motion control function blocks such as MC_LimitVelocity or MC_SlewRateLimiter can be called, and speed commands that meet the soft stop requirements can be dynamically generated in conjunction with periodically calculated exponential decay coefficients. and The generation of this is accomplished through the coordinated action of the trigger edge detection logic and the internal TON timer. State feedback variables. The formation of this depends on the parsing of the status word in the PDO input area of ​​the driver, the monitoring of the motion module status, and the real-time reading of safety signals in the I / O mapping.

[0067] Through the generation of control commands and the logical judgment of states, the system realizes a fully closed-loop control chain from error detection and response triggering to action implementation and state feedback. This step ultimately outputs two variables: one is... This indicates the actual speed command issued during the current control cycle, integrating speed limiting logic and soft-stop strategy; secondly... This indicates whether the entire protection action process has been completed in the current cycle, and is a decision signal for whether the system can resume normal operation.

[0068] This mechanism, through the combination of uninterrupted speed limiting control, exponential slow-stop strategy and closed-loop state feedback, significantly enhances the dynamic self-protection capability of the servo system, and has extremely high feasibility and practical application value in industrial high real-time control scenarios.

[0069] A second aspect of the present invention provides a dynamic hierarchical early warning system for servo driver following error, the system comprising: The data acquisition and processing module is used to acquire the position and speed data of the master and slave axes of the servo system in real time, calculate the original position following error and the original speed following error, and perform normalization processing to obtain the normalized position following error and speed following error. The error trend prediction module is used to construct a state vector by combining the normalized position following error and velocity following error, input the state vector into the constructed prediction model based on trend error detection, and output the error state estimate for the next period; and calculate the error growth trend index based on the error state estimate for the next period to describe the growth trend of the position error; wherein, the error state estimate includes the predicted value of the position error and the predicted value of the velocity error; the error growth trend index is calculated based on the predicted value of the position error. The dynamic threshold and early warning module is used to construct a dynamic threshold model by combining the error state estimation and the error growth trend index, so as to dynamically adjust the error early warning threshold and determine the graded early warning level based on the comparison result between the predicted position error value and the error early warning threshold. The intelligent response decision module is used to execute the corresponding graded response control strategy according to the graded warning level, and obtain the adjusted speed setpoint and execution flag bit; wherein, the execution flag bit is 1 or 0, when the value is 1, it means that the system has met the judgment condition of emergency stop protection and needs to immediately enter the deceleration and stop process; otherwise, it means that the system is currently in the speed limit response stage.

[0070] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0071] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of apparatuses or units may be electrical, mechanical, or other forms.

[0072] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0073] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. A dynamic hierarchical warning method for servo driver to follow error, characterized in that, The method comprises: S1, real-time acquisition of position and speed data of the master shaft and the slave shaft of the servo system, calculation of original position following error and original speed following error, and normalization processing to obtain normalized position following error and speed following error; S2, combination of the normalized position following error and speed following error to construct a state vector, input of the state vector into a constructed prediction model based on trend error detection, output of error state estimation of the next period, and calculation of an error growth trend index based on the error state estimation of the next period, which is used to describe the growth trend of the position error; wherein the error state estimation comprises a position error prediction value and a speed error prediction value; the error growth trend index is obtained based on the position error prediction value; S3, combination of the error state estimation and the error growth trend index to construct a dynamic threshold model to dynamically adjust the error warning threshold, and determination of a hierarchical warning level according to the comparison result of the position error prediction value and the error warning threshold; S4, execution of a corresponding hierarchical response control strategy according to the hierarchical warning level to obtain an adjusted speed setting and an execution flag; wherein the execution flag is 1 or 0, and the value 1 indicates that the system has met the judgment condition of emergency stop protection and needs to enter the deceleration stop process immediately, otherwise, it indicates that the system is currently in the speed limiting response stage.

2. The dynamic hierarchical warning method for servo driver following error according to claim 1, characterized in that, The method further comprises: S5, when the execution flag is 1, triggering the emergency stop protection, and executing the flexible deceleration stop control based on the state register state of the servo driver, the logic of the controller itself and the external auxiliary signal to jointly determine and confirm the completion of the protection action.

3. The dynamic hierarchical warning method for servo driver following error according to claim 1, characterized in that, The constructed prediction model based on trend error detection adopts a state recursive structure similar to Kalman filtering in structure, and is calculated and generated by combining a state transfer term, a drift term compensation and a trend correction term; The state transfer term is the product of the current state vector and the state transition matrix, and it is assumed that the error change trend presents a linear acceleration structure; The drift term compensation uses the existing bus current rate in the servo driver to approximately estimate the load disturbance, so as to enhance the response ability of the system to non-explicit disturbances; The trend correction term is obtained based on the position error change rate, and is used to reflect the sensitivity to the error change speed.

4. The dynamic hierarchical warning method for servo driver following error according to claim 1, characterized in that, The combination of the error state estimation and the error growth trend index to construct the dynamic threshold model to dynamically adjust the error warning threshold is specifically: obtaining an initial basic threshold of the equipment; constructing a dynamic threshold model from the initial basic threshold of the equipment in combination with a dynamic adjustment factor; wherein the dynamic adjustment factor is calculated based on the reference level of the basic threshold, the error growth trend index, the speed error prediction value and a servo inertia compensation term; The dynamic threshold model is used to indicate that when the error growth trend index rises obviously or the response lags, that is, the speed error prediction value is large, the dynamic adjustment factor tends to 1, so that the error warning threshold is sharply reduced, thereby starting the warning mechanism in advance; and when the error is stable or changes slowly, the dynamic adjustment factor tends to 0, and the error warning threshold returns to the reference level.

5. The dynamic hierarchical warning method of servo drive following error according to claim 4, characterized in that, The servo inertia compensation term is used to reflect the accumulation of transient errors caused by the mechanical inertia and periodic loads of the servo system, providing a near-terminal error compensation. The mean square value of the rate of change of position error within each sampling period.

6. The dynamic hierarchical warning method for servo driver following error according to claim 1, characterized in that, The hierarchical early warning level includes a slight early warning, a moderate early warning and a serious early warning.

7. The method of claim 1, wherein the method further comprises: The S4 comprises: Obtaining a current issued speed instruction or a current issued current target corresponding to a speed loop or a current loop control mode respectively; Adjusting the current issued speed instruction or the current issued current target according to the current hierarchical early warning level and the error growth trend index to generate an adjusted speed setting or an adjusted current setting.

8. A dynamic staging of warning method of servo drive following error according to any one of claims 6 or 7, characterized in that, When the current hierarchical early warning level is the serious early warning and the condition of continuously occurring for more than a set period of time is met, a forced shutdown protection action is triggered to generate an execution flag.

9. The dynamic hierarchical warning method of servo drive following error according to claim 2, characterized in that, The joint determination is based on a state register state of a servo driver, a logic of a controller itself and an external auxiliary signal, and specifically comprises: The servo driver periodically obtains a current state to determine whether the speed is zero; the controller itself needs to confirm whether a current motion instruction has been cleared; if a buffer is empty, it indicates that all current control tasks have been suspended; If the system is configured with an external safety circuit, it needs to confirm that these safety feedbacks have been correctly responded; The state sampling is performed on the speed, the motion instruction of the controller itself and the external safety circuit respectively, and the Boolean logic combination is used to determine whether the following conditions are met simultaneously: The speed has been reduced to a permitted range, all motion instructions have been cleared and the safety circuit state has been confirmed, and then it is confirmed that the protection action is completed.

10. A dynamic staging warning system for servo drive following errors, characterized by, The system comprises: A data acquisition and processing module, configured to acquire position and speed data of a main shaft and a slave shaft of a servo system in real time, calculate original position following errors and original speed following errors, and perform normalization processing to obtain normalized position following errors and speed following errors; An error trend prediction module, configured to construct a state vector in combination with the normalized position following errors and the speed following errors, input the state vector into a constructed prediction model based on trend error detection, and output an error state estimation of a next period; and calculate an error growth trend index based on the error state estimation of the next period, to describe a growth trend of a position error; wherein the error state estimation comprises a position error prediction value and a speed error prediction value; and the error growth trend index is obtained based on the position error prediction value; A dynamic threshold and early warning module, configured to construct a dynamic threshold model in combination with the error state estimation and the error growth trend index, to dynamically adjust an error early warning threshold, and determine a hierarchical early warning level according to a comparison result of the position error prediction value and the error early warning threshold; An intelligent response decision module, configured to execute a corresponding hierarchical response control strategy according to the hierarchical early warning level, to obtain an adjusted speed setting and an execution flag; wherein the execution flag is 1 or 0, and when the value is 1, it indicates that the system has met a condition for determining an emergency stop protection, and needs to immediately enter a deceleration shutdown process, otherwise, it indicates that the system is currently in a speed limiting response stage.

Citation Information

Patent Citations

  • Feedback servo control method, device and equipment and readable storage medium

    CN116578125A

  • Electrical energy monitoring method and system

    CN119561254A

  • Numerical control machine tool parameter optimization method and related device and program

    CN119596838A

  • Intelligent control system of current transformer

    CN120049370A

  • Anomaly detection system, anomaly detection method, and anomaly detection program

    JP2024119480A