A method and system for multivariable collaborative control of a stepper drive
By using a multi-variable collaborative control method for stepper drivers, unified determination and synchronous activation of stepper driver parameters are achieved, solving the problems of unstable operation and inconsistent parameter versions in existing technologies, and improving the stability and reliability of stepper motors under complex loads and multi-axis control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-28
- Publication Date
- 2026-04-07
AI Technical Summary
The existing stepper driver parameter configuration method lacks a unified coordination relationship, which leads to unstable operation and inconsistent parameter versions. Especially in multi-axis control scenarios, it is easy to cause motion asynchrony or process deviation.
By introducing a multivariable collaborative control method, the receiving and transmitting channels between the programmable controller and the stepper driver are configured using an object dictionary. This enables unified determination, synchronous transmission, and consistent effectiveness of parameters such as microstep coefficients, phase current limiting, target speed, and target acceleration. Furthermore, the parameter consistency vector and atomic effectiveness rules ensure that the parameters work collaboratively under the same time reference.
It improves the operational stability of stepper motors under different loads and operating conditions, avoids inconsistencies caused by independent parameter configuration, and ensures the reliability of coordinated operation of each drive axis in a multi-axis system.
Smart Images

Figure CN121602881B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of stepper drive control technology, specifically relating to a multivariable cooperative control method and system for a stepper driver. Background Technology
[0002] Stepper motors are widely used in CNC equipment, automated production lines, and precision motion control due to their simple structure, high positioning accuracy, and ease of digital control. In practical applications, stepper drivers typically require the simultaneous configuration of multiple control parameters, such as step size, current limiting, speed, and acceleration, to adapt to different loads and operating conditions. However, existing stepper driver parameter configuration methods often rely on independent settings for single or grouped parameters, lacking a unified coordination relationship between these parameters. Furthermore, parameter updates are often asynchronous or sequential, which can easily lead to inconsistencies during parameter switching, thus affecting the stability and reliability of motor operation.
[0003] Furthermore, under micro-step control conditions, stepper motors exhibit a coupling relationship between their resolution, output torque, and current characteristics. If configured based on only a single parameter, issues may arise such as insufficient driving capability despite adequate resolution, or excessive driving capability but breached thermal safety boundaries. Current technologies largely rely on manual experience or offline tuning to address this coupling, lacking a mechanism for joint judgment and dynamic adjustment of multiple variable parameters during operation. In multi-axis control scenarios, multiple stepper drive axes typically need to operate collaboratively. However, in existing systems, the effective status of each axis's parameters is often managed independently, lacking unified parameter version confirmation and consistency control methods. This can easily lead to version inconsistencies when updating parameters across different axes, resulting in asynchronous motion or process deviations. Summary of the Invention
[0004] This invention provides a multivariable collaborative control method and system for stepper drivers, which solves the technical problems in related technologies where multiple control parameters of stepper drivers are configured independently, take effect asynchronously, and lack operational status linkage and multi-axis consistency management, resulting in unstable operation and inconsistent parameter versions.
[0005] This invention provides a multivariable cooperative control method for a stepper driver, comprising the following steps:
[0006] Step 1: Configure the receive and transmit channels between the programmable controller and the stepper driver using the object dictionary of the stepper driver;
[0007] Step 2: Determine the angular resolution and the number of pulses per revolution based on the microstepping coefficient, and convert the target position into a unique target position corresponding to the angular resolution;
[0008] Step 3: Based on the microstep coefficient, phase current limit, target velocity, and target acceleration, determine the legal parameter combination that satisfies the resolution constraint, thermal constraint, and torque margin requirements.
[0009] Step 4: Generate a parameter consistency vector based on the legal parameter combination, and send the parameter consistency vector through the receiving channel. The parameter consistency vector includes microstep coefficient, phase current limit, unique target position, target velocity, target acceleration and activation flag.
[0010] Step 5: Obtain the status word, actual position, and actual current effective value through the transmission channel; obtain the position following error based on the unique target position and the actual position; and obtain the current utilization rate based on the actual current effective value and the phase current limit.
[0011] Step 6: Based on the position following error, current utilization rate, and status word, update the phase current limit, target acceleration, target velocity, and microstep coefficient according to preset rules;
[0012] Step 7: When the preset judgment conditions are met, write the parameter consistency vector into non-volatile storage. In multi-axis scenarios, establish a commit consistency barrier based on the effective flag.
[0013] This invention provides a multivariable cooperative control system for a stepper driver, comprising:
[0014] The communication configuration module is used to configure the receive and transmit channels between the programmable controller and the stepper driver through the object dictionary of the stepper driver;
[0015] The position discretization module is used to determine the angular resolution and the number of pulses per revolution based on the microstep coefficient, and to convert the target position into a unique target position corresponding to the angular resolution.
[0016] The parameter coordination determination module is used to determine the legal parameter combinations that meet the requirements of resolution constraints, thermal constraints and torque margin based on the microstepping coefficient, phase current limit, target velocity and target acceleration.
[0017] The atomic delivery module is used to generate a parameter consistency vector based on the legal parameter combination, and to deliver the parameter consistency vector through the receiving channel. The parameter consistency vector includes microstep coefficient, phase current limit, unique target position, target velocity, target acceleration and activation flag.
[0018] The operation monitoring module is used to obtain status words, actual position and actual current effective value through the transmission channel, obtain position following error based on unique target position and actual position, and obtain current utilization rate based on actual current effective value and phase current limit.
[0019] The linkage adjustment module is used to update the phase current limit, target acceleration, target velocity and microstep coefficient according to preset rules based on position following error, current utilization rate and status word;
[0020] The consistency management module is used to write the parameter consistency vector into non-volatile storage when preset judgment conditions are met. In multi-axis scenarios, it establishes a commit consistency barrier based on the effective flag.
[0021] The beneficial effects of this invention are as follows: By introducing a multi-variable collaborative management mechanism into the stepper driver control process, this invention uniformly determines, synchronously issues, and consistently applies key control parameters such as microstep coefficients, current limits, speed, and acceleration. This enables all control parameters to work collaboratively under the same time reference, avoiding the inconsistency problems caused by independent parameter configuration and decentralized application in existing technologies. During the parameter issuance phase, through parameter consistency vectors and atomic application rules, it is ensured that multiple parameters are applied only once when conditions are met, reducing the impact of intermediate states on motor operational stability.
[0022] During operation, this invention constructs monitoring indicators such as position following error and current utilization rate based on the actual position and drive current, and adjusts the drive parameters accordingly to maintain a coordinated balance between drive capability, control accuracy, and electrical safety. This method avoids the mismatch risk caused by adjusting a single parameter and improves the operational stability of the stepper motor under different loads and operating conditions.
[0023] This invention achieves reliable storage of stable operating parameters through parameter solidification and effective marking mechanisms, and introduces a submission consistency barrier in multi-axis applications to ensure that each drive axis operates collaboratively under the same parameter version, thereby reducing the risk of motion deviation caused by inconsistent parameter effectiveness in multi-axis systems. Attached Figure Description
[0024] Figure 1 This is a flowchart of a multivariable cooperative control method for a stepper driver according to the present invention. Detailed Implementation
[0025] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, features described in some examples may be combined in other examples.
[0026] like Figure 1 As shown, a multivariable cooperative control method for a stepper driver includes the following steps:
[0027] Step 1: Configure the receive and transmit channels between the programmable controller and the stepper driver using the object dictionary of the stepper driver;
[0028] Step 2: Determine the angular resolution and the number of pulses per revolution based on the microstepping coefficient, and convert the target position into a unique target position corresponding to the angular resolution;
[0029] Step 3: Based on the microstep coefficient, phase current limit, target velocity, and target acceleration, determine the legal parameter combination that satisfies the resolution constraint, thermal constraint, and torque margin requirements.
[0030] Step 4: Generate a parameter consistency vector based on the legal parameter combination, and send the parameter consistency vector through the receiving channel. The parameter consistency vector includes microstep coefficient, phase current limit, unique target position, target velocity, target acceleration and activation flag.
[0031] Step 5: Obtain the status word, actual position, and actual current effective value through the transmission channel; obtain the position following error based on the unique target position and the actual position; and obtain the current utilization rate based on the actual current effective value and the phase current limit.
[0032] Step 6: Based on the position following error, current utilization rate, and status word, update the phase current limit, target acceleration, target velocity, and microstep coefficient according to preset rules;
[0033] Step 7: When the preset judgment conditions are met, write the parameter consistency vector into non-volatile storage. In multi-axis scenarios, establish a commit consistency barrier based on the effective flag.
[0034] In one embodiment of the present invention, configuring the receive channel and transmit channel between the programmable controller and the stepper driver through the object dictionary of the stepper driver includes:
[0035] In the object dictionary of the stepper driver, three channels are established: Receive Channel 1, Receive Channel 2, and Transmit Channel. Receive Channel 1 carries control parameters directly related to the motion trajectory, including the control word, target position, target speed, and target acceleration. Receive Channel 2 carries control parameters related to motor drive characteristics and parameter version management, including microstep coefficients, phase current limits, and activation flags. The control word indicates the driver's operating state switching; the target position represents the desired position command; the target speed and target acceleration represent the speed and acceleration constraints during motion, respectively; the microstep coefficient characterizes the parameters that the stepper motor divides into several equal parts within a full step cycle; the phase current limit limits the maximum allowable value of the single-phase drive current of the stepper motor; and the activation flag identifies the version number of parameters in the same batch. The transmit channel provides feedback on the driver's operating status, including the status word, actual position, actual speed, actual current RMS value, and activation flag echo. The status word characterizes the driver's current operating state, and the activation flag echo confirms the effective parameter version. For each of the above fields, its data type, physical unit, and allowed value range are set in the object dictionary to ensure that both communicating parties have a consistent understanding of the data meaning.
[0036] The system establishes a synchronization period and calibrates the cycle boundary of each control cycle using a synchronization signal. The synchronization period refers to a fixed time window for parameter interaction and status updates between the programmable controller (PLC) and the stepper driver. Based on the synchronization period, this invention specifies an atomic activation rule: the stepper driver applies the control word, target position, target velocity, target acceleration, microstep coefficient, and phase current limit all at the nearest cycle boundary only when data from receiving channel one and receiving channel two arrive simultaneously within the same control cycle, and the activation flags they carry are identical. Under this rule, if any channel data is missing or the activation flags are inconsistent, the driver does not perform parameter updates, thus avoiding intermediate instability caused by premature activation of some parameters. After atomic activation, the transmitting channel sends back its contained fields in the next control cycle, enabling the PLC to obtain the latest operating status and the version information of the activated parameters.
[0037] Through the aforementioned object dictionary configuration method, this invention establishes a clear multivariable parameter grouping mechanism at the stepper driver level. Combined with synchronization cycles and atomic activation rules, it achieves coordinated updates of motion parameters and drive parameters. This communication and activation method avoids the operational inconsistencies caused by the dispersed configuration and asynchronous activation of multiple parameters in existing technologies. It enables the stepper motor to maintain parameter version consistency and timing determinism at different operating stages, thus providing a stable and reliable foundation for subsequent operation monitoring, linkage adjustment, and multi-axis collaborative control.
[0038] In one embodiment of the present invention, determining the angular resolution and the number of pulses per revolution based on the microstepping coefficient, and converting the target position into a unique target position corresponding to the angular resolution, includes:
[0039] Step 11: Read the current microstep coefficient, multiply the base number of steps per revolution by the microstep coefficient to obtain the total number of control pulses required for the motor to rotate one full revolution under the current microstep coefficient condition, which is taken as the number of pulses per revolution. At the same time, determine the angular resolution by dividing the angular constant 2π corresponding to one mechanical revolution by the number of pulses per revolution. The angular resolution is used to represent the minimum angular displacement corresponding to a single control pulse under the current microstep coefficient.
[0040] Step 12: After obtaining the angular resolution, the system acquires the given target position and divides the target position by the angular resolution to obtain the position ratio value. The position ratio value represents the multiple relationship between the target position and the minimum control unit. Since the stepper driver can only accept pulse counting instructions in integer form, the position ratio value is rounded to obtain the discrete position count corresponding to the current microstep coefficient, thereby eliminating the uncertainty that may arise during the mapping process from continuous to discrete quantities.
[0041] Step 13: Multiply the discrete position count by the angular resolution to regenerate a target position that is strictly consistent with the current angular resolution. This target position is defined as a unique target position. A unique target position is a position command that can be uniquely and definitively executed by the stepper driver under the current microstep coefficient and angular resolution conditions, and its numerical value corresponds one-to-one with the discrete position count.
[0042] Through the above processing, this invention establishes a position discretization mechanism centered on microstep coefficients at the control level of the stepper driver, ensuring strict alignment between the target position and the driver's smallest control resolution unit. This mechanism effectively avoids position command ambiguity issues caused by microstep configuration changes or floating-point calculation errors in existing technologies, providing a unified position reference for the consistent issuance, atomic activation, and operational monitoring of subsequent multivariable parameters. This improves the consistency of position control and system stability of the stepper driver in complex control scenarios.
[0043] In one embodiment of the present invention, based on the microstepping coefficient, phase current limiting, target velocity, and target acceleration, a valid combination of parameters satisfying the requirements of resolution constraint, thermal constraint, and torque margin is determined, including:
[0044] Step 21: Since the angular resolution is determined as soon as the microstepping coefficient is determined, the angular resolution is locked according to the microstepping coefficient as the resolution constraint; the phase current limit is compared with the preset motor rated current and current safety factor. When the phase current limit is greater than the product of the motor rated current and current safety factor, the product is used as the new phase current limit to form a phase current limit that satisfies the thermal constraint.
[0045] Step 22: Determine the basic output torque based on the corrected phase current limit and the motor's torque constant. The torque constant characterizes the output torque that the motor can generate per unit current. Since the current distribution and magnetic field synthesis method corresponding to a single pulse change under microstep control conditions, the actual torque available for driving the load will be reduced compared to the full-step mode. Therefore, the basic output torque is corrected according to the torque reduction coefficient corresponding to the microstep coefficient to obtain the usable torque under the current microstep coefficient conditions. The torque reduction coefficient is a parameter used to characterize the proportion of the actual output torque of the stepper motor compared to the full-step control mode under microstep control conditions. Determine the torque required to drive the load based on the target acceleration and load characteristics. Specifically, the product of the rated load inertia and the target acceleration is used as the inertial torque required during acceleration, and this is summed with the load resistance torque and friction torque to obtain the torque required under the target acceleration conditions.
[0046] Step 23: After obtaining the available torque and the required torque, compare the two and make a judgment based on the preset torque margin requirement. The torque margin is used to characterize the safety margin of the available torque relative to the required torque, in order to resist the influence of load fluctuations or external disturbances. When the available torque meets the torque margin requirement and the resolution constraint condition is not violated, the current microstepping coefficient, phase current limit, target velocity, and target acceleration are determined to constitute a valid parameter combination. If the judgment result does not meet the torque margin requirement, the target acceleration is reduced according to the preset parameter adjustment sequence, and the required torque is recalculated after each adjustment until a valid parameter combination that meets the above constraints is formed.
[0047] Through the above-mentioned multivariate collaborative screening process, the present invention achieves unified constraints on resolution, electrical safety and torque capability in stepper driver control, so that kinematic parameters and drive parameters are coordinated and consistent under the same judgment framework, avoiding the mismatch problem caused by independent configuration of single parameters in the prior art, and helping to improve the operational stability and controllability of stepper drivers under complex loads and multiple operating conditions.
[0048] In one embodiment of the present invention, a parameter consistency vector is generated based on the legal parameter combination, and the parameter consistency vector is transmitted through a receiving channel. The parameter consistency vector includes a microstep coefficient, a phase current limit, a unique target position, a target velocity, a target acceleration, and an activation flag, including:
[0049] Step 31: Read the valid parameter combination and its corresponding activation flag, and generate a parameter consistency vector according to a pre-defined fixed field order. This fixed order is: microstep coefficient, phase current limit, unique target position, target velocity, target acceleration, and activation flag. Organizing the parameters by this fixed field order avoids ambiguity caused by inconsistent field arrangement during parsing between the communicating parties. When multiple feasible values satisfying the constraints exist in the valid parameter combination, a smaller microstep coefficient is prioritized to reduce control complexity, and a larger phase current limit is selected, provided it does not exceed the thermal constraint upper limit, to ensure driving capability.
[0050] Step 32: After generating the parameter consistency vector, the parameter consistency vector is split and loaded into different receiving channels according to the pre-established communication mapping relationship in the stepper driver object dictionary. Specifically, the unique target position, target velocity, and target acceleration, as parameters directly affecting the motion trajectory, are loaded into receiving channel one; the microstepping coefficient, phase current limit, and activation flag, as parameters affecting drive characteristics and parameter version consistency, are loaded into receiving channel two. Receiving channels one and two are synchronously transmitted within the same control cycle, and the activation flags carried by both are consistent. After receiving the data from the above channels, the stepper driver does not apply it immediately, but buffers the received data before reaching the cycle boundary to wait for the atomic activation condition to be met.
[0051] Step 33: When the cycle boundary defined by the synchronization signal is reached, the stepper driver verifies the buffered data of receiving channel one and receiving channel two. Only when the data from both channels arrive simultaneously within the same control cycle and the activation flags are consistent, are the microstep coefficients, phase current limits, unique target positions, target velocities, and target accelerations in the parameter consistency vector applied all at once at that cycle boundary. The synchronization signal is used to align the control cycles between the programmable controller and the stepper driver, ensuring that parameter activation, status updates, and confirmation feedback all occur within defined time boundaries. This atomic activation method avoids intermediate unstable states caused by the dispersed activation of multivariable parameters at different times. After parameter application is complete, the driver transmits the status word, actual position, actual velocity, actual current RMS value, and activation flag echo back in the next control cycle via the transmission channel. The host controller compares the echoed activation flag with the sent activation flag to confirm whether the parameter consistency vector has been successfully activated.
[0052] Through the aforementioned mechanism for generating and distributing consistent parameter vectors, this invention achieves unified encapsulation, synchronous transmission, and atomic application of multi-variable parameters in stepper driver control, enabling microstep configuration, current limiting, and kinematic parameters to take effect collaboratively under the same time reference. This control method overcomes the inconsistency problems caused by independent configuration and asynchronous updates of multiple parameters in existing technologies, providing a stable and predictable control foundation for stepper motors under complex operating conditions, and facilitating the reliable implementation of subsequent operation monitoring and linkage adjustment.
[0053] In one embodiment of the present invention, in order to deal with communication anomalies or device status anomalies that may occur during the synchronous submission of multivariable parameters, in addition to the atomic activation mechanism, a submission failure judgment and rollback process is further introduced to ensure that the stepper driver remains in the verified stable parameter state under abnormal conditions.
[0054] Specifically, during the process of issuing and awaiting confirmation of the parameter consistency vector, the period boundary defined by the synchronization signal is used as a unified time reference for parameter effectiveness and confirmation. If no confirmation flag echo matching the issued confirmation flag is received at the period boundary, the parameter submission is deemed unsuccessfully confirmed. To avoid misjudgments due to instantaneous communication fluctuations, the system counts unconfirmed cases. When the number of retries reaches the preset maximum number of retries, the submission process of the current parameter consistency vector is considered a failure. After confirming the submission failure, the control system first stops issuing new parameter consistency vectors to avoid introducing new parameter changes when the driver state is uncertain. Subsequently, the currently pending parameter consistency vector is rolled back to the most recently written non-volatile storage parameter consistency vector that has been confirmed by the confirmation flag echo. By rolling back the parameters to the solidified and confirmed effective parameter version, the stepper driver can continue to operate with a known and reliable parameter configuration, thereby avoiding operational anomalies caused by inconsistent parameter states. After completing the parameter rollback, a submission failure flag is further set in the status word. This flag allows the programmable controller to clearly detect parameter submission failures and take appropriate action based on the upper-level control logic, such as pausing the process or initiating manual intervention.
[0055] Through the aforementioned failure handling and parameter rollback mechanisms, this invention establishes a clear anomaly response path in the multi-variable collaborative control process of stepper drivers, enabling the parameter submission process to have detectable failures and rollback capabilities. This mechanism avoids the problem in existing technologies where parameter update failures lead to the driver being in an unknown configuration state, thus improving the reliability and maintainability of the stepper motor control system in complex operating environments.
[0056] In one embodiment of the present invention, a status word, actual position, and actual current effective value are obtained through a transmission channel; a position following error is obtained based on a unique target position and the actual position; and the current utilization rate is obtained based on the actual current effective value and phase current limiting. This includes:
[0057] Step 41: The control system periodically reads back the stepper driver's status word, actual position, actual current RMS value, and activation flag echo via the sending channel. By comparing the echoed activation flag with the most recently issued activation flag, the readback data for that period is considered valid only if the two match, thus avoiding data mixing across parameter versions.
[0058] Step 42: After confirming the validity of the readback data, in order to ensure the comparability between position-related quantities, the unique target position and the actual position are processed using the angular resolution and the number of pulses per revolution corresponding to the current microstep coefficient as a unified conversion benchmark, so that the unique target position and the actual position are uniformly mapped to the same metric domain, thereby providing a consistent dimensional basis for subsequent difference calculation.
[0059] Step 43: After unifying the metric domain, the difference between the unique target position and the actual position is determined as the position following error. The position following error characterizes the degree to which the stepper motor follows the target position under the current control parameters and is an important indicator reflecting the accuracy of motion control. Simultaneously, the ratio of the actual effective value of the current to the phase current limit is determined as the current utilization rate. The phase current limit sets the maximum allowable value of the single-phase drive current of the motor, while the current utilization rate reflects the degree to which the drive current is used relative to the allowable upper limit under the current operating conditions.
[0060] Step 44: After obtaining the position tracking error and current utilization rate, the position tracking error is further compared with a preset position allowable threshold. When the position tracking error exceeds the threshold, a position out-of-bounds event marker is generated. The current utilization rate is compared with a preset current threshold range. When the current utilization rate exceeds the threshold range, a current out-of-bounds event marker is generated. For the above two types of event markers, the number of out-of-bounds events is recorded to characterize the persistence and frequency of abnormal states, providing a basis for subsequent parameter linkage adjustment and anomaly handling.
[0061] Through the above-described process of acquiring operating status and calculating indicators, this invention establishes a unified and definite monitoring system in the multivariable collaborative control of stepper drivers. This enables motion error and current usage to be quantified and determined within the same control framework, providing a reliable data foundation for subsequent adaptive parameter adjustment based on error and current status. This helps improve the stability and controllability of the stepper motor control system under complex operating conditions.
[0062] In one embodiment of the present invention, based on position following error, current utilization rate, and status word, the phase current limit, target acceleration, target velocity, and microstep coefficient are updated according to preset rules, including:
[0063] Step 51: The control system first reads back the stepper driver's status word, actual position, actual current RMS value, and activation flag echo through the sending channel. It compares the activated flag echo with the most recently issued activation flag. Only when they match is the current position following error and current utilization rate received as valid input data, ensuring that the data used for parameter updates remains consistent with the currently active parameters. It also acquires the position allowance threshold, low current utilization rate threshold, energy-saving current threshold, minimum acceleration, minimum current, acceleration adjustment step size, speed adjustment step size, current adjustment step size, number of continuous monitoring cycles, and thermal constraint upper limit. These parameters limit the direction, amplitude, and safety boundaries of parameter adjustments, with the thermal constraint upper limit constraining the phase current amplitude to not exceed the motor's permissible thermal safety range.
[0064] Step 52: Execute the parameter update logic according to the single-entry priority rule. Single-entry priority means that only one parameter adjustment rule is allowed to be triggered within the same control cycle, thereby avoiding control conflicts caused by multiple rules taking effect simultaneously. When the position following error is greater than the position allowable threshold and the current utilization rate is lower than the low current utilization rate threshold, it indicates that the driving capability is insufficient but there is still current margin. Under the premise of not exceeding the thermal constraint upper limit, the phase current limit is increased by adjusting the current step size to enhance the output torque. When the position following error is greater than the position allowable threshold and the current utilization rate is not lower than the low current utilization rate threshold, it indicates that the driving current is close to the upper limit. At this time, the target acceleration is decreased by adjusting the acceleration step size to reduce the dynamic load demand. When the position following error is not greater than the position allowable threshold and the current utilization rate is lower than the energy-saving current threshold and continues to reach the number of continuous monitoring cycles, it indicates that the system has energy-saving space. Under the premise of not lowering the minimum current, the phase current limit is decreased by adjusting the current step size. When the position following error continues to exceed the position allowable threshold and reaches the number of continuous monitoring cycles, it indicates that the existing resolution is difficult to meet the control requirements. The position control accuracy is improved by increasing the microstep coefficient. By following the above sequence of rules, we can ensure that each parameter adjustment directly targets the current main operational bottleneck.
[0065] Step 53: After completing the parameter adjustment, the adjusted microstepping coefficient, phase current limit, target velocity, and target acceleration are replaced in the parameter consistency vector, and a new activation mark is added. Subsequently, within the same control cycle, the unique target position, target velocity, and target acceleration are transmitted through receiving channel one, and the microstepping coefficient, phase current limit, and activation mark are transmitted through receiving channel two. These parameters are applied all at once at the cycle boundary defined by the synchronization signal. After the parameters are applied, the stepper driver transmits the activation mark echo and status word back through the transmitting channel in the next control cycle. The host controller confirms the parameter update result by comparing the activation mark.
[0066] Through the aforementioned linkage parameter update mechanism, this invention achieves multi-variable coordinated adjustment based on operating state in stepper driver control, enabling phase current limiting, microstep coefficient, and kinematic parameters to dynamically and coordinately change with operating conditions. This approach avoids the performance imbalance problem caused by traditional fixed parameter configuration under different load and speed conditions, providing a more stable and controllable operating foundation for stepper motor control systems in complex application scenarios.
[0067] In one embodiment of the present invention, when a preset judgment condition is met, the parameter consistency vector is written to non-volatile storage. In a multi-axis scenario, a commit consistency barrier is established based on the effective flag, including:
[0068] Step 61: The system first performs a convergence determination on the operating status. This is achieved by continuously monitoring the aforementioned operating indicators, including the position tracking error, current utilization rate, status word, and active flag displayed back from the transmission channel. The system continuously checks whether the position tracking error does not exceed the allowable position threshold, whether the current utilization rate is within the preset current threshold range, and whether the status word is in a fault-free state, according to a preset convergence determination cycle. Only when all three conditions are met within multiple consecutive control cycles is the current operating status determined to satisfy the preset determination conditions. This continuous determination method avoids premature parameter solidification due to instantaneous fluctuations.
[0069] Step 62: After confirming that the preset judgment conditions are met, the currently effective parameter consistency vector, which is consistent with the effective flag echo, is written to non-volatile memory. The parameter consistency vector is stored in a fixed order: microstep coefficient, phase current limit, unique target position, target velocity, target acceleration, and effective flag. Non-volatile memory refers to a storage area that retains data content after power failure or restart, used to save stable parameter configurations verified through operation. By writing the parameter consistency vector to non-volatile memory, the stepper driver can directly load the stable parameter state upon power-on or reset, reducing the need for repeated parameter tuning.
[0070] Step 63: In multi-axis scenarios, to avoid operational deviations caused by inconsistent parameter activation progress between different axes, a submission consistency barrier is further established based on the activation flag. The submission consistency barrier indicates that the system is only allowed to continue operation after all axes confirm that the same batch of parameters has successfully taken effect. A multi-axis scenario refers to a situation where multiple stepper drive axes exist simultaneously in the same control system, and each axis has a synchronous or collaborative relationship during the process or motion. An independent activation flag and activation flag echo are maintained for each axis. By comparing the activation flag echo of each axis with its corresponding activation flag, the submission consistency barrier is only lifted when all axes confirm that their parameter consistency vector has successfully taken effect. If any axis fails to meet the consistency condition, the barrier state is maintained, preventing the system from entering the next step or linkage operation stage.
[0071] Through the aforementioned parameter convergence and solidification and multi-axis consistency control mechanism, this invention achieves reliable preservation of stable operating parameters in multi-variable collaborative control of stepper drivers, and ensures that each drive axis in a multi-axis system always operates collaboratively based on the same batch and version of parameters. This solution avoids the problems of unclear parameter solidification timing and inconsistent multi-axis parameter versions in existing technologies, improving the reliability and consistency of the system in complex motion control scenarios.
[0072] This invention provides a multivariable cooperative control system for a stepper driver, comprising:
[0073] The communication configuration module is used to configure the receive and transmit channels between the programmable controller and the stepper driver through the object dictionary of the stepper driver;
[0074] The position discretization module is used to determine the angular resolution and the number of pulses per revolution based on the microstep coefficient, and to convert the target position into a unique target position corresponding to the angular resolution.
[0075] The parameter coordination determination module is used to determine the legal parameter combinations that meet the requirements of resolution constraints, thermal constraints and torque margin based on the microstepping coefficient, phase current limit, target velocity and target acceleration.
[0076] The atomic delivery module is used to generate a parameter consistency vector based on the legal parameter combination, and to deliver the parameter consistency vector through the receiving channel. The parameter consistency vector includes microstep coefficient, phase current limit, unique target position, target velocity, target acceleration and activation flag.
[0077] The operation monitoring module is used to obtain status words, actual position and actual current effective value through the transmission channel, obtain position following error based on unique target position and actual position, and obtain current utilization rate based on actual current effective value and phase current limit.
[0078] The linkage adjustment module is used to update the phase current limit, target acceleration, target velocity and microstep coefficient according to preset rules based on position following error, current utilization rate and status word;
[0079] The consistency management module is used to write the parameter consistency vector into non-volatile storage when preset judgment conditions are met. In multi-axis scenarios, it establishes a commit consistency barrier based on the effective flag.
[0080] It should be noted that the interval and threshold sizes are set for ease of comparison. The size of the threshold depends on the amount of sample data and the base number set by those skilled in the art for each set of sample data, as long as it does not affect the proportional relationship between the parameter and the quantized value. Furthermore, the above formulas are all dimensionless calculations, and the formulas are derived from software simulations using a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0081] The embodiments of the present invention have been described above, but the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms based on the guidance of the present embodiments, all of which are within the protection scope of the present embodiments.
Claims
1. A multivariable cooperative control method for a stepper driver, characterized in that, Includes the following steps: Step 1: Configure the receive and transmit channels between the programmable controller and the stepper driver using the object dictionary of the stepper driver; Step 2: Determine the angular resolution and the number of pulses per revolution based on the microstepping coefficient, and convert the target position into a unique target position corresponding to the angular resolution; whereby the angular resolution is used to represent the minimum angular displacement corresponding to a single control pulse under the current microstepping coefficient; Step 3: Based on the microstepping coefficient, phase current limit, target velocity, and target acceleration, determine the legal parameter combination that satisfies the requirements of resolution constraint, thermal constraint, and torque margin; where the resolution constraint represents the constraint formed by the angular resolution locked by the microstepping coefficient. Step 4: Generate a parameter consistency vector based on the legal parameter combination, and send the parameter consistency vector through the receiving channel. The parameter consistency vector includes microstep coefficient, phase current limit, unique target position, target velocity, target acceleration and activation flag. Step 5: Obtain the status word, actual position, and actual current effective value through the transmission channel; obtain the position following error based on the unique target position and the actual position; and obtain the current utilization rate based on the actual current effective value and the phase current limit. Step 6: Based on the position following error, current utilization rate, and status word, update the phase current limit, target acceleration, target velocity, and microstep coefficient according to preset rules; Step 7: When the preset judgment conditions are met, write the parameter consistency vector into non-volatile storage. In multi-axis scenarios, establish a commit consistency barrier based on the effective flag.
2. The multivariable cooperative control method for a stepper driver according to claim 1, characterized in that, Configure the receive and transmit channels between the programmable controller and the stepper driver using the stepper driver's object dictionary, including: In the object dictionary of the stepper driver, establish receive channel one, receive channel two, and transmit channel. Receive channel one includes control word, target position, target speed, and target acceleration; receive channel two includes microstep coefficient, phase current limit, and activation flag; transmit channel includes status word, actual position, actual speed, actual current RMS value, and activation flag echo; and set the data type, unit, and value range for each field. A synchronization period is set and the period boundary is marked with a synchronization signal. The atomic activation rules are specified. Only when the data from receiving channel 1 and receiving channel 2 arrive simultaneously and the activation marks are consistent within the same control period, the control word, target position, target velocity, target acceleration, microstep coefficient and phase current limit are applied at the nearest period boundary at once. The transmitting channel transmits its contained fields back in the next control period.
3. The multivariable cooperative control method for a stepper driver according to claim 1, characterized in that, The angular resolution and pulses per revolution are determined based on the microstepping coefficient, and the target position is converted into a unique target position corresponding to the angular resolution, including: Step 11: Read the current microstep coefficient, calculate the product of the basic number of steps per revolution of the stepper motor and the microstep coefficient, and divide 2π by the product to determine the angular resolution, and use the product as the number of pulses per revolution; Step 12: Obtain the target position, divide the target position by the angular resolution to obtain the position ratio value, round the position ratio value to obtain the discrete position count corresponding to the microstep coefficient; Step 13: Multiply the discrete position count by the angular resolution to generate a unique target position corresponding to the angular resolution.
4. The multivariable cooperative control method for a stepper driver according to claim 1, characterized in that, Based on the microstepping coefficient, phase current limiting, target velocity, and target acceleration, legal parameter combinations that satisfy resolution constraints, thermal constraints, and torque margin requirements are determined, including: Step 21: Based on the microstep coefficient locking angle resolution as the resolution constraint, compare the phase current limit with the preset motor rated current and current safety factor. When the phase current limit is greater than the product of the motor rated current and current safety factor, use the product as the new phase current limit to form a phase current limit that satisfies the thermal constraint. Step 22: Obtain the basic output torque by multiplying the phase current limit and the torque constant; multiply the torque reduction factor corresponding to the microstep coefficient with the basic output torque to obtain the usable torque; sum the product of the rated load inertia and the target acceleration with the load resistance torque and the friction torque to obtain the required torque. Step 23: Compare the available torque with the required torque and determine according to the torque margin requirement. When the available torque meets the preset torque margin requirement relative to the required torque and the resolution constraint is met, determine the legal parameter combination consisting of microstep coefficient, phase current limit, target speed and target acceleration. When not met, reduce the target acceleration in a preset order and redetermine the required torque until a legal parameter combination is formed.
5. The multivariable cooperative control method for a stepper driver according to claim 1, characterized in that, A parameter consistency vector is generated based on the legal parameter combinations, and the parameter consistency vector is sent through the receiving channel, including: Step 31: Read the legal parameter combination and the effective flag, and generate a parameter consistency vector in a fixed order. The fixed order is: microstep coefficient, phase current limit, unique target position, target velocity, target acceleration, and effective flag. When there are multiple feasible values, select the smallest microstep coefficient and the maximum phase current limit that does not exceed the upper limit of the thermal constraint. Step 32: Based on the mapping of the object dictionary, load the unique target position, target velocity, and target acceleration into receiving channel one, and load the microstep coefficient, phase current limit, and activation flag into receiving channel two; send messages to both channels within the same control cycle, with the same activation flag, and buffer the driver before the cycle boundary; Step 33: At the period boundary defined by the synchronization signal, if the messages from both channels arrive simultaneously and the effective flags are consistent, the parameter consistency vector is applied once; then the status word, actual position, actual speed, actual current effective value and effective flag are returned through the sending channel, and the effective flag is compared and confirmed.
6. The multivariable cooperative control method for a stepper driver according to claim 5, characterized in that, When no echo consistent with the effective flag is received at the period boundary specified by the synchronization signal and the number of retries reaches the preset maximum number of retries, the issuance of new parameter consistency vectors is stopped, the parameter consistency vector is set to the parameter consistency vector that has been most recently written to non-volatile storage and confirmed by the effective flag echo, and the submission failure flag is set in the status word.
7. The multivariable cooperative control method for a stepper driver according to claim 1, characterized in that, The status word, actual position, and actual current RMS value are obtained through the transmission channel. The position following error is calculated based on the unique target position and the actual position. The current utilization rate is calculated based on the actual current RMS value and phase current limiting, including: Step 41: The status word, actual position, actual current effective value and effective flag are read back by sending the channel, and the effective readback data of this control cycle is confirmed by comparing with the effective flag. The unique target position and the actual position are unified into the same measurement domain by using the angular resolution and the number of pulses per revolution corresponding to the microstep coefficient as the conversion benchmark. Step 42: The difference between the unified target position and the actual position is taken as the position following error, and the ratio of the actual effective value of the current to the phase current limit is taken as the current utilization rate. Step 43: Compare the position following error with the position allowable threshold to generate a position out-of-bounds event marker; compare the current utilization rate with the current threshold range to generate a current out-of-bounds event marker; and record the number of out-of-bounds events for each.
8. The multivariable cooperative control method for a stepper driver according to claim 1, characterized in that, Based on position tracking error, current utilization rate, and status word, the phase current limit, target acceleration, target velocity, and microstep coefficient are updated according to preset rules, including: Step 51: Read back the status word, actual position, actual current effective value and effective flag echo through the sending channel; after comparing the effective flag echo with the effective flag, receive the current position tracking error and current utilization rate, and obtain the position allow threshold, low current utilization rate threshold, energy saving current threshold, minimum acceleration, minimum current, acceleration adjustment step size, speed adjustment step size, current adjustment step size, number of continuous monitoring cycles and thermal constraint upper limit; Step 52: Execute only one rule according to the single-entry priority order. When the position following error is greater than the position allowable threshold and the current utilization rate is lower than the low current utilization rate threshold, adjust the phase current limit by the current adjustment step size without exceeding the thermal constraint upper limit. Otherwise, if the position following error is greater than the position allowable threshold and the current utilization rate is not lower than the low current utilization rate threshold, the target acceleration is adjusted down by the acceleration adjustment step size, provided that it is not lower than the minimum acceleration. Otherwise, if the position following error is not greater than the position allowable threshold and the current utilization rate is lower than the energy saving current threshold and continues to reach the number of continuous monitoring cycles, the phase current limit is lowered according to the current adjustment step size, provided that it is not lower than the minimum current. Otherwise, when the position following error continues to exceed the position allowable threshold and reaches the number of consecutive monitoring cycles, the microstep coefficient should be increased; Step 53: Replace the adjusted microstep coefficient, phase current limit, target velocity and target acceleration in the parameter consistency vector, and mark the new effective flag. In the same control cycle, send the unique target position, target velocity and target acceleration through the receiving channel one, and send the microstep coefficient, phase current limit and effective flag through the receiving channel two. Apply it once at the cycle boundary calibrated by the synchronization signal, and send back the effective flag echo and status word through the sending channel in the next control cycle to complete the confirmation.
9. The multivariable cooperative control method for a stepper driver according to claim 1, characterized in that, When preset judgment conditions are met, the parameter consistency vector is written to non-volatile storage. In multi-axis scenarios, a commit consistency barrier is established based on the effective flag, including: Step 61: Read the position following error, current utilization rate, status word and active flag echo, and continuously check according to the convergence judgment cycle number: the position following error does not exceed the position allowable threshold, the current utilization rate is within the current threshold range and the status word has no fault bits; when the three conditions are met consecutively, it is determined that the preset judgment condition is satisfied. Step 62: Write the parameter consistency vector that matches the effective flag echo into non-volatile storage in the order of microstep coefficient, phase current limit, unique target position, target velocity, target acceleration, and effective flag; Step 63: In a multi-axis scenario, maintain independent effective flags and effective flag echoes for each axis, establish a commit consistency barrier, and remove the barrier only when the effective flag echoes of all axes are consistent with their respective effective flags; otherwise, maintain the barrier.
10. A multivariable cooperative control system for a stepper driver, characterized in that, The stepper driver multivariable cooperative control method according to any one of claims 1-9 includes: The communication configuration module is used to configure the receive and transmit channels between the programmable controller and the stepper driver through the object dictionary of the stepper driver; The position discretization module is used to determine the angular resolution and the number of pulses per revolution based on the microstep coefficient, and to convert the target position into a unique target position corresponding to the angular resolution. The parameter coordination determination module is used to determine the legal parameter combinations that meet the requirements of resolution constraints, thermal constraints and torque margin based on the microstepping coefficient, phase current limit, target velocity and target acceleration. The atomic delivery module is used to generate a parameter consistency vector based on the legal parameter combination, and to deliver the parameter consistency vector through the receiving channel. The parameter consistency vector includes microstep coefficient, phase current limit, unique target position, target velocity, target acceleration and activation flag. The operation monitoring module is used to obtain status words, actual position and actual current effective value through the transmission channel, obtain position following error based on unique target position and actual position, and obtain current utilization rate based on actual current effective value and phase current limit. The linkage adjustment module is used to update the phase current limit, target acceleration, target velocity and microstep coefficient according to preset rules based on position following error, current utilization rate and status word; The consistency management module is used to write the parameter consistency vector into non-volatile storage when preset judgment conditions are met. In multi-axis scenarios, it establishes a commit consistency barrier based on the effective flag.
Citation Information
Patent Citations
Microstep drive control device for stepping motor
CN103155404A
Multi-shaft stepping motor controller system based on FPGA chip
CN107124125A