Stepping motor control method and device based on load torque

By real-time detection and feedback of the current and voltage signals of the stepper motor, the load torque is calculated using timing data and dynamically adjusting the current, the problem of stepper loss in the stepper motor when the load changes is solved, the working stability and positioning accuracy are improved, and the system complexity and cost are reduced.

CN119543715AActive Publication Date: 2025-02-28SOLNENG SEMICON

Patent Information

Application Number
CN202510110814.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-02-28
Estimated Expiration
2045-01-23

AI Technical Summary

Technical Problem

Stepper motors are prone to failure of steps and lag in system control responses when load changes, and high sensor dependence in the prior art leads to increased system cost and complexity.

Method used

By real-time detection and feedback of the current and voltage signals of the stepper motor winding, the load torque is calculated using the timing data of the current zero point and the voltage commutation point, and the current is dynamically adjusted to optimize the working efficiency.

Benefits of technology

It realizes accurate estimation of load torque without adding additional sensors, improves the working stability and positioning accuracy of stepper motors, and reduces system hardware complexity and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119543715A_ABST
    Figure CN119543715A_ABST
Patent Text Reader

Abstract

The invention relates to a stepping motor control method and device based on load torque, which mainly performs closed-loop control on a stepping motor by collecting current and voltage signals so as to optimize the working efficiency of the motor. According to the method, firstly, a current signal is filtered and compared with a target reference value, a current deviation is calculated, and if the deviation exceeds a threshold value, a target PWM signal is generated to adjust the current until the deviation is reduced to be within a preset range. When the current meets the requirement, a voltage commutation point and a current zero point are determined based on the voltage signal, the current load state and torque value are calculated by combining the time interval between the voltage commutation point and the current zero point with preset no-load time and out-of-step time, and the working current is adjusted according to the information, so that the working efficiency of the stepping motor is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a stepper motor control method and device based on load torque. Background Art

[0002] As a device that can achieve high-precision positioning and stable output torque, stepper motors are widely used in CNC machine tools, robots and automation equipment. However, since stepper motors are easily affected by load changes during operation, when the load increases and the torque demand exceeds the rated range of the stepper motor, the motor will lose steps, affecting the normal operation of the equipment. Traditional stepper motor control methods mostly rely on fixed current or voltage parameter adjustment, lack accurate feedback on real-time load conditions, and it is difficult to achieve accurate estimation and dynamic adjustment of load torque. Therefore, it is particularly important to develop a motor control method based on load torque detection to address the risk of motor loss of steps caused by load changes.

[0003] Existing load torque detection schemes usually rely on additional sensors to directly measure the mechanical force or torque generated by load changes. Although this method can improve the accuracy of load monitoring to a certain extent, it requires additional hardware support, increases the cost and complexity of the system, and is difficult to implement in small spaces or extreme environments. At the same time, these additional sensors are usually affected by environmental factors such as temperature and humidity, which may lead to a decrease in measurement accuracy and fail to meet the needs of complex industrial environments. Therefore, without increasing the complexity of the hardware, real-time detection of load torque through existing current and voltage signals has become a key research direction. However, the technical difficulty in implementing this scheme lies in how to infer the load torque through the current zero point and voltage commutation point of the motor winding, and dynamically adjust the current under different load conditions to ensure the stability of the stepper motor. Summary of the invention

[0004] The main purpose of the present invention is to provide a stepper motor control method and device based on load torque to solve the technical problems that the stepper motor is prone to losing steps when the load changes, the system control response is delayed, and the high sensor dependence in the prior art leads to increased system cost and complexity.

[0005] To achieve the above-mentioned object, the present invention provides a stepper motor control method based on load torque, comprising: collecting current signals and voltage signals of a stepper motor winding, and converting the current signals and the voltage signals from analog signals into digital signals respectively; performing digital filtering on the collected current signals, and comparing them with a preset target sinusoidal current reference value to calculate the current deviation; when the current deviation is greater than a preset threshold, generating a target PWM signal according to the current deviation, and adjusting the current of the stepper motor winding based on the target PWM signal until the current deviation of the stepper motor winding is less than or equal to the preset threshold; when the current deviation is less than or equal to the preset threshold, determining a first timestamp of a voltage commutation point and a second timestamp corresponding to a zero point position of the winding current according to the collected voltage signal; determining a time interval between winding voltage commutation and current zero point based on the first timestamp and the second timestamp; calculating and processing the time interval in combination with a preset no-load time and a step-out time to obtain a current load state and a load torque value of the stepper motor; adjusting the working current of the stepper motor according to the current load state and the load torque value of the stepper motor to optimize the working efficiency of the stepper motor.

[0006] The present invention also provides a stepper motor control device based on load torque, comprising: an acquisition unit, used to acquire the current signal and the voltage signal of the stepper motor winding, and convert the current signal and the voltage signal from analog signals into digital signals respectively; a comparison unit, used to digitally filter the acquired current signal, and compare it with a preset target sinusoidal current reference value to calculate the current deviation; a first adjustment unit, used to generate a target PWM signal according to the current deviation when the current deviation is greater than a preset threshold, and adjust the current of the stepper motor winding based on the target PWM signal until the current deviation of the stepper motor winding is less than or equal to the preset threshold; a first determination unit, used to When the current deviation is less than or equal to the preset threshold value, a first timestamp of the voltage commutation point and a second timestamp corresponding to the zero point position of the winding current are determined according to the collected voltage signal; a second determination unit is used to determine the time interval between the winding voltage commutation and the current zero point based on the first timestamp and the second timestamp; an acquisition unit is used to calculate and process the time interval in combination with the preset no-load time and out-of-step time to obtain the current load state and load torque value of the stepper motor; a second adjustment unit is used to adjust the working current of the stepper motor according to the current load state and load torque value of the stepper motor to optimize the working efficiency of the stepper motor.

[0007] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0008] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any of the above-mentioned methods are implemented.

[0009] The load torque-based stepper motor control method and device provided by the present invention can accurately estimate the load torque without adding additional sensors by real-time detection and feedback of the current and voltage signals of the stepper motor windings, and realize efficient monitoring and dynamic adjustment of the stepper motor operation state, thereby improving the working stability and positioning accuracy of the stepper motor. In addition, the present invention ensures that the stepper motor can adapt to changes under different load conditions and avoid the phenomenon of losing steps through digital filtering and PWM signal adjustment, thereby greatly improving the reliability and service life of the stepper motor.

[0010] The significant advantage of this invention is that it determines the load torque by relying only on the current and voltage signals inside the stepper motor and combining the timing data of the current zero point and the voltage reversal point, thus realizing the function of accurately estimating the load change without the need for additional sensors. Therefore, while reducing the hardware complexity and cost of the system, the invention improves the control accuracy and adaptability, and is particularly suitable for use in complex industrial environments. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 1 is a schematic diagram of the steps of a stepping motor control method based on load torque in one embodiment of the present invention; Figure 2 is a structural block diagram of a stepping motor control device based on load torque in one embodiment of the present invention; Figure 3 It is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.

[0011] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0012] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0013] Reference Figure 1 , an embodiment of the present invention provides a stepper motor control method based on load torque, comprising the following steps: S1, collecting current signals and voltage signals of the stepper motor windings, and converting the current signals and the voltage signals from analog signals into digital signals respectively.

[0014] S2, digitally filter the collected current signal, compare it with the preset target sinusoidal current reference value, and calculate the current deviation.

[0015] S3, when the current deviation is greater than a preset threshold, generating a target PWM signal according to the current deviation, and adjusting the current of the stepper motor winding based on the target PWM signal until the current deviation of the stepper motor winding is less than or equal to the preset threshold.

[0016] S4, when the current deviation is less than or equal to the preset threshold, determine a first timestamp of the voltage reversal point and a second timestamp corresponding to the zero point position of the winding current according to the collected voltage signal.

[0017] S5. Determine the time interval between winding voltage commutation and current zero point based on the first timestamp and the second timestamp.

[0018] S6, calculating and processing the time interval in combination with the preset no-load time and out-of-step time to obtain the current load state and load torque value of the stepping motor.

[0019] S7, adjusting the operating current of the stepper motor according to the current load state and load torque value of the stepper motor to optimize the operating efficiency of the stepper motor.

[0020] The stepper motor control method of the present invention realizes high-precision control of the stepper motor by real-time acquisition of the current and voltage signals of the winding and converting the analog signals into digital signals for processing. The core advantage of this method is that it does not require additional sensors, but directly adjusts and estimates the load torque through the existing current and voltage signals, thereby reducing the complexity and cost of the system.

[0021] By converting current and voltage signals into digital signals, the system can use modern digital control methods to accurately control the motor in real time. Compared with traditional analog control, digital processing provides higher accuracy and faster response speed, which is crucial for the control of stepper motors when the load changes. In addition, digital filtering of current signals can effectively remove external noise and interference, making the calculation of current deviation more accurate and ensuring the stable operation of the system.

[0022] The adjustment of the winding current is not only to respond to changes in the load, but also to determine the occurrence time of the voltage commutation point and the zero point position of the winding current based on the voltage signal when the current deviation is less than or equal to the preset threshold. This is very critical because only when the current deviation meets the preset threshold can the accurate zero point position be obtained, thereby ensuring the accuracy of the timing data of the voltage commutation point. This approach enables the system to reliably calculate the load torque and ensure that the stepper motor compensates in time when facing load changes, avoiding the phenomenon of loss of step caused by sudden increase in load. Compared with the traditional control method using fixed current or voltage parameters, real-time adjustment significantly improves the adaptability and stability of the motor under variable working conditions.

[0023] After the current deviation is adjusted to meet the preset threshold, it is an innovative method to infer the load torque through the timing data of the voltage commutation point and the current zero point. This method indirectly obtains the load condition by analyzing the internal electrical characteristics of the motor, without directly measuring the mechanical torque, avoiding the influence of physical space limitations and environmental factors. Only when the current deviation meets the preset threshold can the accuracy of the zero point position be guaranteed, thereby ensuring accurate voltage commutation point timing data. Combined with the preset no-load time and out-of-step time, the time interval is processed to more accurately judge the load changes of the motor under different working conditions, effectively avoid the risk of out-of-step and improve system stability.

[0024] According to the current load status and load torque, the system dynamically adjusts the motor operating current to ensure that the motor can maintain optimal operating efficiency under any load conditions. For example, when the load increases, the system automatically increases the winding current to meet the torque requirements; when the load decreases, the current is reduced accordingly to save energy and reduce motor heating. This intelligent adjustment mechanism significantly improves the energy efficiency and service life of the stepper motor, and effectively reduces the risk of loss of step due to load changes.

[0025] In summary, this load torque-based control method optimizes the control strategy of the stepper motor, reduces the dependence on external hardware, and enhances the robustness of the system. Compared with the traditional fixed control method, the dynamic adjustment strategy based on real-time feedback can adapt to the changing working conditions and ensure the efficient and stable operation of the stepper motor. The key to implementing this solution lies in the precise acquisition and processing of current and voltage signals, as well as the indirect calculation of load torque through timing data, so as to achieve comprehensive control and optimization of the stepper motor without increasing the complexity of the hardware.

[0026] In one example, the collected current signal is digitally filtered and compared with a preset target sinusoidal current reference value to calculate the current deviation, including: performing wavelet transform processing on the collected current signal, selecting multiple wavelet basis functions, decomposing the current signal into multi-scale components, and performing noise reduction processing on each component to remove high-frequency noise introduced during the acquisition process to obtain a first current signal; identifying signal transformation data of the first current signal by a recursive least squares algorithm, and adaptively filtering and adjusting the first current signal according to the signal change data to reduce the lag response to signal mutations to obtain a second current signal; using a Kalman filter to adjust the signal transformation data of the first current signal according to the second current signal; A filtering algorithm is used to predict the future signal state, and fuse the predicted data after the prediction processing with the second current signal to obtain a third current signal; the operating frequency and dynamic working condition of the stepper motor are obtained, and the frequency of the preset target sinusoidal current reference value is dynamically adjusted based on the operating frequency and the dynamic working condition to obtain a dynamic sinusoidal reference value that is compatible with the collected current signal; the third current signal is compared with the dynamic sinusoidal reference value to calculate an initial current deviation, and the initial current deviation is classified and processed through a fuzzy logic control algorithm to reduce the deviation error caused by nonlinear working conditions to obtain the final current deviation.

[0027] In this example, the collected current signal is first digitally filtered to reduce the noise introduced by environmental interference during the acquisition process, especially high-frequency noise, to ensure accurate analysis and control of the stepper motor state. Wavelet transform processing is used to decompose the current signal into multi-scale components through a variety of wavelet basis functions, and the signal characteristics can be analyzed at different scales to better identify and reduce noise. The advantage of this method is that the multi-resolution characteristics of the wavelet transform can simultaneously process the low-frequency and high-frequency components of the signal, ensuring the refined processing of each component and effectively removing the noise introduced during the acquisition process. Traditional filtering methods may only be applicable to the processing of a single frequency band, while wavelet transform can retain more signal feature information, making subsequent control more precise.

[0028] Next, the signal transformation data of the first current signal is identified by the recursive least squares algorithm, and adaptive filtering is adjusted based on these data. The purpose of this step is to reduce the hysteresis response to signal mutations, so as to respond to current changes more quickly. This processing method takes into account the possible mutations of the current signal when the stepper motor changes load, and conventional filtering may have a response lag problem. The recursive least squares algorithm can update the filter parameters in real time, making the system more responsive to signal changes. The advantage of this adaptive filtering is that the system parameters can be adjusted at any time to adapt to changes in signal characteristics, which is especially suitable for occasions such as stepper motors where the working conditions change rapidly.

[0029] Subsequently, the second current signal is predicted and processed using the Kalman filter algorithm, and then fused with the second current signal to obtain the third current signal. The advantage of this process is that the Kalman filter can not only smooth the signal, but also predict the future signal state based on the current information, so as to respond to the dynamic changes of the stepper motor in advance. This is particularly important in complex dynamic environments, because the load changes of stepper motors are unpredictable. The introduction of Kalman filtering can reduce control lag and enable the system to better cope with these changes. Compared with traditional filtering methods, the advantage of Kalman filtering lies in its predictive ability based on state estimation, which makes it suitable for estimating future states and adjusting control strategies.

[0030] Furthermore, according to the operating frequency and dynamic working condition of the stepper motor, the frequency of the preset target sinusoidal current reference value is dynamically adjusted to obtain a dynamic sinusoidal reference value that is compatible with the collected current signal. The purpose of this step is to ensure that the control signal can closely follow the actual operating state of the motor, rather than using a fixed reference signal. The working state of the stepper motor is constantly changing. If the reference value is fixed, it may cause excessive deviation and fail to accurately control the load torque. Therefore, dynamically adjusting the reference value makes the system more adaptable, especially when the operating frequency and working conditions change greatly. This dynamic adjustment can significantly improve the control accuracy and system stability.

[0031] Finally, the third current signal is compared with the dynamic sinusoidal reference value, the initial current deviation is calculated, and the initial current deviation is classified and processed by the fuzzy logic control algorithm to reduce the deviation error caused by nonlinear working conditions. The advantage of the fuzzy logic control algorithm in this case is that it can handle the fuzziness and uncertainty in nonlinear systems. The working conditions of stepper motors have complex nonlinear characteristics. Fuzzy logic can better handle these uncertainties and reduce deviation errors by classifying deviations and reasoning with rules. This method is particularly suitable for complex industrial applications.

[0032] In one example, a target PWM signal is generated according to the current deviation, and the current of the stepper motor winding is adjusted based on the target PWM signal, including: performing real-time analysis on the current deviation to determine the amplitude and change rate of the current deviation; using a preset adaptive PWM adjustment strategy to perform data processing on the amplitude and change rate of the current deviation to generate the target PWM signal, wherein a current deviation change rate factor is introduced into the preset adaptive PWM adjustment strategy, and the current deviation change rate factor is used to dynamically adjust the frequency of the PWM signal, and when the amplitude of the current deviation is greater than a first threshold and the change rate of the current deviation is greater than a second threshold, a first frequency is used as the frequency value of the PWM signal, and when the amplitude of the current deviation is less than the first threshold and / or the change rate of the current deviation is less than the second threshold, a second frequency is used as the frequency value of the PWM signal, and the first frequency is higher than the second frequency; the target PWM signal is applied to the stepper motor winding to adjust the current of the stepper motor winding.

[0033] In this example, the current deviation is used to generate a target PWM signal, and the current of the stepper motor winding is adjusted based on this signal, in order to control the current more accurately and help determine the zero point position of the winding current. This process first analyzes the current deviation in real time to determine the amplitude and rate of change of the current deviation, and then dynamically adjusts it through an adaptive PWM adjustment strategy to ensure the stability and response speed of the current regulation process.

[0034] In the control process of stepper motors, determining the position of the current zero point is crucial for subsequent timing analysis, especially when estimating the load torque through the timing data of the voltage commutation point and the current zero point position. The accuracy of the zero point directly affects the accuracy of load estimation. In the current control process of the motor winding, the rapid change and adjustment of the current can easily introduce lag and instability factors, making it difficult to accurately capture the zero point position.

[0035] In order to better ensure the determination of the current zero point position, this example adopts an adaptive PWM adjustment strategy to process the amplitude and change rate of the current deviation and generate a target PWM signal. In this strategy, a current deviation change rate factor is introduced to dynamically adjust the frequency of the PWM signal to adapt to the changing characteristics of the current. Specifically, when the amplitude of the current deviation is large and the change rate is fast, a higher frequency PWM signal is used to quickly respond and adjust the current so that the current can reach the ideal state faster. This fast response is of great significance in avoiding large hysteresis, which can enable the winding current to stabilize in the shortest time, thereby ensuring the accuracy of the zero point position.

[0036] On the contrary, when the current deviation is small or the rate of change is slow, the system selects a lower frequency PWM signal to maintain the stability of the current. This method of reducing the frequency helps to reduce the high-frequency fluctuations of the current, thereby reducing the impact of high-frequency noise on the zero point position during the control process. This method of dynamically adjusting the PWM signal frequency can ensure that the current has sufficient response speed when it changes rapidly, and avoid the introduction of unnecessary fluctuations and noise when it tends to be stable, thereby providing strong support for the accurate determination of the zero point position.

[0037] The generation and application of the target PWM signal is to stabilize the stepper motor winding current on the expected trajectory under different loads and working conditions. In particular, when the current needs to respond quickly, the adaptively adjusted PWM signal makes the winding current more in line with the ideal change curve. This not only ensures that the current reaches the target value as quickly as possible during the change process, but also reduces the error accumulation caused by hysteresis, which is conducive to accurately capturing the zero point position of the winding current.

[0038] In summary, the adaptive PWM control strategy in this example has a direct benefit for the determination of the zero position. By responding to large current deviations with high-frequency response, the hysteresis is reduced, and the accuracy of the zero position determination is improved; and by reducing the PWM frequency when the current change tends to be stable, the influence of high-frequency noise is reduced, thereby further ensuring the accuracy of the zero position. The accurate determination of the zero position is the basis for the entire stepper motor load estimation and dynamic control. Only by ensuring the accuracy of the zero position can reliable data be provided for subsequent timing analysis, thereby achieving higher-precision control and load state estimation.

[0039] In one example, the time interval is calculated and processed in combination with the preset no-load time and out-of-step time to obtain the current load state and load torque value of the stepper motor, including: acquiring the historical operation data and current operation data of the stepper motor, and using a clustering algorithm to classify and model the motor no-load characteristics and out-of-step characteristics in the historical operation data, and obtaining dynamic no-load time data and out-of-step time data in combination with the current operation data; fuzzifying the time interval, the dynamic no-load time data and the dynamic out-of-step time data, and mapping them into a fuzzy set, and performing data processing on the fuzzy set through a fuzzy neural network to infer the current load state of the stepper motor; performing nonlinear fitting processing on the relationship between different load states and time intervals, and bringing the current load state of the stepper motor into the result of the nonlinear fitting processing to obtain the current load torque value of the stepper motor.

[0040] In this example, the current load state and load torque value of the stepper motor are calculated by combining the preset no-load time and step-out time, with the aim of more accurately judging the motor's operating state and making reasonable control decisions. By introducing the concepts of no-load time and step-out time, it can help better evaluate the state of the stepper motor under different working conditions, especially in high-frequency load changes and complex operating environments. These two time parameters provide crucial reference data.

[0041] First, the introduction of dead time helps to accurately identify the characteristics of the motor when it is not loaded, especially to determine whether the current load condition of the stepper motor is consistent with the dead time characteristics. When the motor is in a dead time state, the change of dead time has a great influence on the current and voltage characteristics of the motor. Therefore, dynamic modeling of dead time helps to more accurately identify the operating state of the motor. The out-of-step time indicates the time when the motor loses steps due to excessive load during operation. These data can be used to determine whether the motor can no longer keep up with the requirements of load changes, thereby providing a more effective protection mechanism. The introduction of these two time characteristics can better help distinguish whether the motor is in normal operation, no-load, or about to lose steps. Compared with the traditional method that relies only on current and voltage signals, the introduction of dead time and out-of-step time can provide more operating status information and improve the accuracy and robustness of system identification.

[0042] The process of specifically determining the current load state and load torque value is completed by combining historical data with current data. First, the historical operation data of the stepper motor is obtained. These historical data include the no-load characteristics and out-of-step characteristics of the motor under different load conditions, which are usually manifested as changes in current, voltage, speed, etc. over time. By classifying and modeling these historical data through clustering algorithms, standard characteristics of the no-load and out-of-step states of the motor can be established. For example, the K-means clustering algorithm can be used to group the current and voltage characteristics to find typical characteristic values ​​when no-load and out-of-step. Assume that in the historical data, the average no-load current is 0.8A and the voltage is 24V, while in the out-of-step case, the current increases significantly to 2.0A and the voltage drops to 22V. These characteristic values ​​can be used as a standard for judging the current state.

[0043] Combined with the current operating data, the no-load time and the out-of-step time are dynamically adjusted, so that the no-load time and the out-of-step time corresponding to the current state of the motor can be dynamically obtained. For example, if the current current of the motor is between 0.75A and 0.85A, and the duration is close to the average no-load time of the historical no-load state, it can be inferred that the motor may be in a no-load state; if the current exceeds 1.8A and the duration is close to the out-of-step time, it is possible that the motor is about to lose step. By dynamically adjusting these time parameters, the system can adapt to changes in working conditions.

[0044] Subsequently, the data of the time interval, dynamic no-load time and out-of-step time are fuzzified to form a fuzzy set. For example, the no-load time can be fuzzified into three fuzzy sets of "short", "medium" and "long", and the out-of-step time can also be fuzzified. By reasoning these fuzzy sets through fuzzy neural networks, the current load state of the stepper motor can be inferred. The role of fuzzy neural networks is to be able to handle such nonlinear and uncertain inputs and perform effective classification. For example, if the current no-load time is short and the out-of-step time is long, fuzzy reasoning can conclude that the motor is in a "heavy load but stable" state; if both the no-load time and the out-of-step time are at a high level, it may be inferred that the motor is in an "overloaded and about to lose step" state.

[0045] Next, the characteristic curve of the motor load torque is obtained by performing nonlinear fitting on the relationship between different load states and time intervals. Nonlinear fitting can be performed using polynomial fitting or neural network fitting to fit the complex relationship between the motor load state and torque. For example, using cubic polynomial fitting, the load torque T can be expressed as: T=a1*(no-load time)^3+a2*(out-of-step time)^2+a3*(time interval)+a4 Among them, a1, a2, a3 and a4 are coefficients determined by fitting, and the specific coefficient values ​​can be obtained by fitting historical experimental data. When the current load state of the motor has been determined by the fuzzy neural network, the state can be brought into the fitting model to obtain the current load torque value. For example, assuming that the current no-load time is 1.5 seconds, the out-of-step time is 0.8 seconds, and the time interval is 0.2 seconds, the coefficients obtained by the fitting model are a1=0.5, a2=0.3, a3=0.2, and a4=1.0, then the current load torque is: T=0.5*(1.5)^3+0.3*(0.8)^2+0.2*(0.2)+1.0=2.837Nm In this way, the current load torque value of the motor can be calculated very accurately.

[0046] This whole set of methods, by introducing no-load time and out-of-step time, enables the system to more accurately judge the motor's operating status and load torque under variable working conditions. It not only improves the control accuracy and response speed, but also greatly increases the system's adaptability to complex operating environments.

[0047] In one example, a clustering algorithm is used to classify and model the motor no-load characteristics and out-of-step characteristics in the historical operation data, and dynamic no-load time data and out-of-step time data are obtained in combination with the current operation data, including: determining clustering parameters, wherein the clustering parameters at least include: initial categories and initial center positions corresponding to each initial category, the categories are no-load initial category, out-of-step initial category and intermediate transition initial category, and the initial center position of each category is determined by adding or subtracting a preset offset from the mean value of the historical data characteristics of the category; performing initial clustering iterative processing on the historical operation data based on the clustering parameters, wherein , during the clustering iteration process, the distance value between each data point and all the initial center points is calculated, and the data point is assigned to the category to which the initial center point corresponding to the minimum distance value belongs; after completing the initial clustering iteration processing, the average value of all data points in each category is taken as the new center point of the category, and the step of "initial clustering iteration processing of the historical operation data based on the clustering parameters" is repeated until the center point tends to converge; a classification model is constructed based on the clustering results, and the current operation data is brought into the classification model to obtain the dynamic idle time data and out-of-step time data.

[0048] In this example, a clustering algorithm is used to process the historical operating data of the stepper motor. The purpose is to distinguish the no-load characteristics and out-of-step characteristics of the motor through classification modeling, so as to better identify the different operating states of the motor, especially under complex working conditions. The key to the whole process is to use historical data to build a classification model so as to judge the state of the motor in real time in the future.

[0049] First, the clustering parameters need to be determined. The clustering parameters include at least the initial category and the initial center position corresponding to each initial category. Here, the categories are divided into three types: no-load initial category, out-of-step initial category, and intermediate transition initial category. The initial center position of each category is determined by the historical data feature mean of the category plus or minus a preset offset. For example, if the current mean under no-load state in the historical data is 0.8A and the voltage mean is 24V, the center position of the no-load initial category can be set to 0.8A current and 24V voltage, plus or minus an offset, such as 0.1A and 0.5V, so that the center point range is (0.7A-0.9A, 23.5V-24.5V). Similarly, for the out-of-step category, assuming that the current mean under out-of-step state is 2.0A and the voltage is 22V, the initial center position can be determined by the same method. The intermediate transition category can be set between the two, such as 1.5A current and 23V voltage, plus or minus an appropriate offset.

[0050] The next step is to perform initial clustering iterations on the historical operation data. The core of this process is to calculate the distance between each data point and all initial center points, and then assign the data point to the category to which the center point with the smallest distance belongs. In this example, assume that there are 1,000 sets of historical operation data, each of which contains two parameters: current and voltage. Use the Euclidean distance formula to calculate the distance from each data point to each center point: Distance = sqrt((current difference)^2+(voltage difference)^2) For example, if a set of data points has a current of 1.7A and a voltage of 23.8V, then the distances to the three initial center points are: Distance to no-load center point (0.8A, 24V) = sqrt((1.7-0.8)^2+(23.8-24)^2)=sqrt(0.81+0.04)=sqrt(0.85)≈0.92 Distance to the intermediate transition center point (1.5A, 23V) = sqrt((1.7-1.5)^2+(23.8-23)^2)=sqrt(0.04+0.64)=sqrt(0.68)≈0.83 The distance to the center point of the step loss (2.0A, 22V) = sqrt((1.7-2.0)^2+(23.8-22)^2)=sqrt(0.09+3.24)=sqrt(3.33)≈1.83 It can be seen that the minimum distance of this data point is the distance to the center point of the intermediate transition, so this data point is assigned to the intermediate transition category.

[0051] After completing the assignment of each data point, the next step is to take the average of all data points in each category as the new center point of the category. For example, assuming there are 300 data points in the no-load category, the average current is calculated to be 0.82A, and the average voltage is calculated to be 24.1V, then the new center point of the no-load category is (0.82A, 24.1V). The new center points of the out-of-step category and the intermediate transition category are also calculated.

[0052] Each data point is then reassigned to the category to which the new center point belongs, and the process is repeated until the change of the center point converges, that is, the position of the center point no longer changes significantly. In general, after 5 to 10 iterations, the position of the center point will tend to stabilize.

[0053] When the clustering results converge, a classification model can be built based on these results. The model describes different categories of no-load, out-of-step, and transition states through historical data, so that the current operating data of the motor can be quickly classified in the future. By bringing the current operating data into the classification model, the current state of the motor can be determined. For example, assuming that the current operating data is 1.6A current and 23.5V voltage, the model determines that this data point best fits the intermediate transition category. Combined with the historical characteristics of this category, it can be inferred that the motor may currently be in a partial load state.

[0054] Once the current state of the motor is determined, the dynamic no-load time and out-of-step time data can be further obtained based on the classification model. For example, if the current state belongs to the out-of-step category, and the average out-of-step time of this category is 0.8 seconds according to historical data analysis, the current out-of-step time data of the motor can be obtained as 0.8 seconds. The no-load time is similar, and the corresponding dynamic time data is inferred based on the current state.

[0055] In one example, the time interval, the dynamic idle time data, and the dynamic loss time data are fuzzified and mapped into a fuzzy set, and the fuzzy set is processed through a fuzzy neural network to infer the current load state of the stepper motor, including: automatically adjusting the shape of the fuzzy membership function according to the historical operation data of the stepper motor, and mapping the time interval, the dynamic idle time data, and the dynamic loss time data into a fuzzy set based on the adjusted fuzzy membership function; using a preset fuzzy rule database and the fuzzy set, the current load state of the stepper motor is inferred through a fuzzy neural network to obtain the final current load state of the stepper motor, wherein the fuzzy rule database is established by the staff according to the operation data of the stepper motor under different loads.

[0056] In this example, fuzzy processing and fuzzy neural network are used to infer the current load state of the stepper motor, mainly to deal with the uncertainty and nonlinear factors in the operation of the stepper motor. This method can process the time interval, dynamic no-load time data and dynamic step-out time data in the form of fuzzy sets, so as to more accurately describe the operating state of the stepper motor under different working conditions.

[0057] First, the time interval, dynamic no-load time data, and dynamic out-of-step time data are fuzzified. The key to this step is to use fuzzy membership functions to map these precise numerical data into fuzzy sets. In order to ensure the accuracy of the fuzzification results, it is necessary to automatically adjust the shape of the fuzzy membership function according to the historical operation data of the stepper motor. For example, assuming that the time interval ranges from 0.1 seconds to 1.0 seconds, three fuzzy membership functions can be set, such as "short time interval", "medium time interval", and "long time interval". These membership functions may take the form of triangles or trapezoids to represent the membership values ​​of each time range in different states. For example, 0.2 seconds can have a higher membership belonging to "short time interval", while 0.8 seconds belongs more to "long time interval".

[0058] Automatically adjusting the shape of the membership functions means dynamically optimizing the definition and range of these functions based on historical data. For example, historical data may show that in most no-load conditions, the values ​​of the time interval are concentrated between 0.3 seconds and 0.5 seconds, so the system will automatically adjust the membership function of the "short time interval" to have a higher membership for the values ​​in this interval, and a lower membership for other time ranges. This adjustment is to make the fuzzified data more consistent with the actual working conditions, thereby improving the accuracy of fuzzy reasoning.

[0059] Once these data are fuzzified, they are mapped into fuzzy sets. For example, the time interval is fuzzified into "short time interval = 0.8, medium time interval = 0.2, long time interval = 0.0", and the dynamic dead time may be fuzzified into "short dead time = 0.6, medium dead time = 0.4, long dead time = 0.0". These fuzzy sets can comprehensively reflect the state of the stepper motor in an uncertain environment.

[0060] Next, these fuzzy sets are processed and inferred through fuzzy neural networks. Fuzzy neural networks combine the advantages of fuzzy logic and neural networks. They can process fuzzy inputs and optimize weights and rules through learning, thereby achieving accurate modeling of complex nonlinear systems. In this process, the fuzzy rule database plays a vital role. This database is established by staff based on the operating data of stepper motors under different loads. For example, fuzzy rules may include "if the time interval is short and the no-load time is long, then the current state is a light-load state", "if the time interval is long and the out-of-step time is short, then the current state is a out-of-step risk state", etc. These rules are summarized from expert experience and experimental data, covering the characteristics of stepper motors under various operating conditions.

[0061] When the fuzzy set is input into the fuzzy neural network, the system will infer the current load state according to the fuzzy rule database. For example, if the fuzzification result of the current time interval is "short time interval = 0.7, medium time interval = 0.3", the fuzzification result of the no-load time is "medium no-load time = 0.9", and the fuzzification result of the out-of-step time is "short out-of-step time = 0.8", the fuzzy neural network will use these inputs and, according to the preset rules, conclude that the current motor is in a state of "medium load and there is a risk of out-of-step".

[0062] The advantage of using fuzzy neural network for inference is that it has the ability to learn and adapt. Unlike traditional deterministic control, fuzzy neural network can handle uncertainty and ambiguity in input, especially when the load change of stepper motor has uncertainty and mutation characteristics, it can make effective inferences on various nonlinear and complex input signals. For example, when the motor load suddenly increases and causes the time interval and step-out time to change rapidly, the fuzzy neural network can make corresponding adjustments based on the input of these fuzzy sets and quickly determine the current operating status of the motor so as to further adopt appropriate control strategies.

[0063] In general, this method can effectively deal with the nonlinearity, uncertainty and complexity of the motor operation process by fuzzifying the time interval, dynamic no-load time and out-of-step time of the motor, and then using the fuzzy neural network to infer the fuzzy set, ensuring that the current load state of the motor can be accurately judged under different working conditions. This control method based on the combination of fuzzy logic and neural network not only takes advantage of the fuzzy logic's ability to handle uncertainty, but also takes advantage of the powerful self-learning and nonlinear fitting capabilities of neural networks, which significantly improves the system's adaptability to complex working conditions.

[0064] In one example, a nonlinear fitting process is performed on the relationship between different load states and time intervals, and the current load state of the stepper motor is substituted into the result of the nonlinear fitting process to obtain the current load torque value of the stepper motor, including: using a polynomial fitting model to fit data points of different load states and time intervals to obtain an initial fitting function between time intervals and torque under different load states; using the least squares method to determine and calculate coefficients of the initial fitting function to obtain a final fitting function; and substituting the current load state and corresponding time interval data into the final fitting function to calculate the current load torque value of the stepper motor.

[0065] In this example, the relationship between different load states and time intervals is processed by nonlinear fitting, with the goal of providing a more accurate torque estimate for the stepper motor under different load states. The entire process involves fitting the historical data to a polynomial and using the least squares method to calculate the coefficients of the fitting function, which is ultimately used to infer the current load torque value. The key to this approach is to build a mathematical model that can describe the nonlinear relationship between different load states and time intervals, so that the torque of the stepper motor can be quickly calculated during operation.

[0066] First, a polynomial fitting model is used to fit the data points of different load states and time intervals. The historical operation data includes the time intervals and corresponding load torque values ​​under different load states (such as no-load, partial load, heavy load, etc.). For example, in the no-load state, there may be multiple sets of data points, where the time interval is 0.2 seconds and the corresponding torque value is 0.5Nm; in the heavy load state, the time interval is 0.8 seconds and the corresponding torque value is 2.5Nm. By collecting these data points, a polynomial fitting model can be established, with the time interval as the independent variable and the torque as the dependent variable, and the functional relationship between the time interval and the torque under different load states can be obtained by fitting.

[0067] The polynomial fitting process can select polynomials of different orders, usually quadratic or cubic polynomials, to better capture nonlinear relationships. For example, assuming that the cubic polynomial fitting form is: T=a*(time interval)^3+b*(time interval)^2+c*(time interval)+d.

[0068] Among them, T represents the load torque, the time interval is the data recorded during the operation of the stepper motor, and a, b, c, and d are the coefficients of the fitting function. The fitting function at this time is called the initial fitting function because its coefficients have not yet been determined.

[0069] Next, the least squares method is used to determine the coefficients of these initial fitting functions. The basic principle of the least squares method is to find the optimal coefficients by minimizing the sum of square errors between the fitting function and the data points, so that the fitting function is as close to all data points as possible. For example, there are multiple data points (time interval, torque): (0.2 seconds, 0.5Nm), (0.5 seconds, 1.0Nm), (0.8 seconds, 2.5Nm). The least squares method will minimize the overall error of the fitting curve by calculating the sum of squares of deviations between these points and the fitting curve, and finally obtain the optimal coefficients a, b, c, d. After these coefficients are determined, the fitting function becomes a specific mathematical expression, called the final fitting function.

[0070] Then, the current load state of the stepper motor and the corresponding time interval data are brought into the final fitting function to calculate the current load torque. For example, if the current load state is "heavy load state" and the time interval is 0.7 seconds, through the final fitting function: T=a*(0.7)^3+b*(0.7)^2+c*(0.7)+d.

[0071] Substituting the previously determined coefficients a, b, c, and d, the load torque value of the current stepper motor can be calculated. Assuming that the final fitting function coefficients are a=1.2, b=-0.8, c=2.5, and d=0.3, then: T=1.2*(0.7)^3+(-0.8)*(0.7)^2+2.5*(0.7)+0.3 ≈1.2*0.343-0.8*0.49+2.5*0.7+0.3 ≈0.4116-0.392+1.75+0.3 ≈2.0696Nm Thus, the current load torque value is 2.07Nm.

[0072] This polynomial fitting and least squares calculation method can accurately determine the torque value of the stepper motor based on the time interval and load state. The advantage of this method is that it can provide torque estimation in real time with less computing resources, without the need to obtain the torque value through direct measurement in each operation. The fitted mathematical model is based on historical data and fully considers the complex relationship between different load states and time intervals, ensuring high-precision estimation of the stepper motor torque under different operating conditions, thus providing an important reference for the control of the stepper motor.

[0073] Reference Figure 2 , an embodiment of the present invention provides a stepper motor control device based on load torque, comprising: The acquisition unit 1 is used to acquire the current signal and the voltage signal of the stepper motor winding, and convert the current signal and the voltage signal from analog signals to digital signals respectively; Comparison unit 2, used for digitally filtering the collected current signal, and comparing it with a preset target sinusoidal current reference value to calculate the current deviation; A first adjustment unit 3 is used to generate a target PWM signal according to the current deviation when the current deviation is greater than a preset threshold, and adjust the current of the stepper motor winding based on the target PWM signal until the current deviation of the stepper motor winding is less than or equal to the preset threshold; A first determining unit 4 is used to determine, when the current deviation is less than or equal to the preset threshold, a first timestamp of the voltage commutation point and a second timestamp corresponding to the zero point position of the winding current according to the collected voltage signal; A second determining unit 5, configured to determine a time interval between a winding voltage commutation and a current zero point based on the first timestamp and the second timestamp; An acquisition unit 6 is used to calculate and process the time interval in combination with a preset no-load time and a step-out time to obtain a current load state and a load torque value of the stepping motor; The second adjustment unit 7 is used to adjust the operating current of the stepper motor according to the current load state and load torque value of the stepper motor to optimize the working efficiency of the stepper motor.

[0074] In this embodiment, for the specific implementation of each unit in the above device embodiment, please refer to the above method embodiment, which will not be repeated here.

[0075] Reference Figure 3 In an embodiment of the present invention, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a display screen, an input device, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.

[0076] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.

[0077] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0078] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided by the present invention and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM.

[0079] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0080] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A stepper motor control method based on load torque, characterized in that: The following steps are involved: Collecting current signals and voltage signals of the stepper motor windings, and converting the current signals and voltage signals from analog signals into digital signals respectively; The collected current signal is digitally filtered and compared with the preset target sinusoidal current reference value to calculate the current deviation; In the case where the current deviation is greater than a preset threshold, a target PWM signal is generated according to the current deviation, and the current of the stepper motor winding is adjusted based on the target PWM signal until the current deviation of the stepper motor winding is less than or equal to the preset threshold; When the current deviation is less than or equal to the preset threshold, determining a first timestamp of a voltage reversal point and a second timestamp corresponding to a zero position of the winding current according to the collected voltage signal; Determine a time interval between winding voltage commutation and current zero point based on the first timestamp and the second timestamp; The time interval is calculated and processed in combination with the preset no-load time and out-of-step time to obtain the current load state and load torque value of the stepping motor; According to the current load state and load torque value of the stepper motor, the operating current of the stepper motor is adjusted to optimize the operating efficiency of the stepper motor.

2. The stepper motor control method according to claim 1, characterized in that: The collected current signal is digitally filtered and compared with the preset target sinusoidal current reference value to calculate the current deviation, including: Performing wavelet transform processing on the collected current signal, selecting multiple wavelet basis functions, decomposing the current signal into multi-scale components, and performing noise reduction processing on each component to remove high-frequency noise introduced during the collection process, thereby obtaining a first current signal; Identifying signal transformation data of the first current signal by a recursive least squares algorithm, and adaptively filtering and adjusting the first current signal according to the signal transformation data to reduce a hysteresis response to a signal mutation, thereby obtaining a second current signal; Using a Kalman filter algorithm according to the second current signal, predicting the future signal state, and fusing the predicted data after the prediction processing with the second current signal to obtain a third current signal; Acquiring the operating frequency and dynamic working condition of the stepper motor, and dynamically adjusting the frequency of the preset target sinusoidal current reference value based on the operating frequency and the dynamic working condition to obtain a dynamic sinusoidal reference value adapted to the collected current signal; The third current signal is compared with the dynamic sinusoidal reference value to calculate an initial current deviation, and the initial current deviation is classified and processed by a fuzzy logic control algorithm to reduce the deviation error caused by nonlinear working conditions and obtain the final current deviation.

3. The stepper motor control method according to claim 1, characterized in that: Generating a target PWM signal according to the current deviation, and adjusting the current of the stepper motor winding based on the target PWM signal, comprising: Performing real-time analysis on the current deviation to determine the magnitude and change rate of the current deviation; Adopting a preset adaptive PWM adjustment strategy, performing data processing on the amplitude and change rate of the current deviation, and generating the target PWM signal, wherein a current deviation change rate factor is introduced into the preset adaptive PWM adjustment strategy, and the current deviation change rate factor is used to dynamically adjust the frequency of the PWM signal, and when the amplitude of the current deviation is greater than a first threshold and the change rate of the current deviation is greater than a second threshold, a first frequency is adopted as the frequency value of the PWM signal, and when the amplitude of the current deviation is less than the first threshold and / or the change rate of the current deviation is less than the second threshold, a second frequency is adopted as the frequency value of the PWM signal, and the first frequency is higher than the second frequency; The target PWM signal is applied to the winding of the stepper motor to adjust the current of the winding of the stepper motor.

4. The stepper motor control method according to claim 1, characterized in that: Combined with the preset no-load time and out-of-step time, the time interval is calculated and processed to obtain the current load state and load torque value of the stepping motor, including: Acquire historical operation data and current operation data of the stepper motor, and use a clustering algorithm to classify and model the motor no-load characteristics and out-of-step characteristics in the historical operation data, and obtain dynamic no-load time data and out-of-step time data in combination with the current operation data; The time interval, the dynamic dead time data and the dynamic loss time data are fuzzified and mapped into a fuzzy set, and the current load state of the stepping motor is inferred by performing data processing on the fuzzy set through a fuzzy neural network; A nonlinear fitting process is performed on the relationship between different load states and time intervals, and the current load state of the stepper motor is brought into the result of the nonlinear fitting process to obtain the current load torque value of the stepper motor.

5. The stepper motor control method according to claim 4, characterized in that: A clustering algorithm is used to classify and model the motor no-load characteristics and out-of-step characteristics in the historical operation data, and the dynamic no-load time data and out-of-step time data are obtained in combination with the current operation data, including: Determine clustering parameters, wherein the clustering parameters at least include: initial categories and initial center positions corresponding to each initial category, the categories are no-load initial category, out-of-step initial category and intermediate transition initial category, and the initial center position of each category is determined by adding or subtracting a preset offset from the mean value of historical data features of the category; Performing initial clustering iteration processing on the historical operation data based on the clustering parameters, wherein, during the clustering iteration process, the distance value between each data point and all initial center points is calculated, and the data point is assigned to the category to which the initial center point corresponding to the minimum distance value belongs; After completing the initial clustering iteration process, taking the average value of all data points in each category as the new center point of the category, and repeatedly executing the step of "performing initial clustering iteration process on the historical operation data based on the clustering parameters" until the center point tends to converge; A classification model is constructed based on the clustering result, and the current operation data is introduced into the classification model to obtain the dynamic idle time data and out-of-step time data.

6. The stepper motor control method according to claim 4, characterized in that: The time interval, the dynamic dead time data and the dynamic loss time data are fuzzified and mapped into a fuzzy set, and the fuzzy set is processed by a fuzzy neural network to infer the current load state of the stepping motor, including: Automatically adjusting the shape of the fuzzy membership function according to the historical operation data of the stepping motor, and mapping the time interval, the dynamic dead time data and the dynamic missing time data into a fuzzy set based on the adjusted fuzzy membership function; The preset fuzzy rule database and the fuzzy set are used to infer the current load state of the stepper motor through a fuzzy neural network to obtain the final current load state of the stepper motor, wherein the fuzzy rule database is established by the staff based on the operating data of the stepper motor under different loads.

7. The stepper motor control method according to claim 4, characterized in that: The relationship between different load states and time intervals is subjected to nonlinear fitting processing, and the current load state of the stepper motor is brought into the result of the nonlinear fitting processing to obtain the current load torque value of the stepper motor, including: Use a polynomial fitting model to fit data points of different load states and time intervals to obtain an initial fitting function between time interval and torque under different load states; The coefficients of the initial fitting function are determined and calculated using the least square method to obtain a final fitting function; The current load state and the corresponding time interval data are brought into the final fitting function to calculate the current load torque value of the stepper motor.

8. A stepper motor control device based on load torque, characterized in that: include: A collection unit, used for collecting current signals and voltage signals of the stepper motor windings, and converting the current signals and voltage signals from analog signals into digital signals respectively; A comparison unit, used to digitally filter the collected current signal, compare it with a preset target sinusoidal current reference value, and calculate the current deviation; A first adjustment unit, configured to generate a target PWM signal according to the current deviation when the current deviation is greater than a preset threshold, and adjust the current of the stepper motor winding based on the target PWM signal until the current deviation of the stepper motor winding is less than or equal to the preset threshold; A first determining unit, configured to determine, when the current deviation is less than or equal to the preset threshold, a first timestamp of a voltage commutation point and a second timestamp corresponding to a zero point position of a winding current according to the collected voltage signal; A second determining unit, configured to determine a time interval between a winding voltage commutation and a current zero point based on the first timestamp and the second timestamp; An acquisition unit, configured to calculate and process the time interval in combination with a preset no-load time and a step-out time, so as to obtain a current load state and a load torque value of the stepping motor; The second adjustment unit is used to adjust the operating current of the stepper motor according to the current load state and load torque value of the stepper motor to optimize the working efficiency of the stepper motor.

9. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Apparatus and method for driving rotary machine

    CN101789736A

  • Method and circuit assembly for sensorless load detection in stepper motors

    CN112970190A

  • Synchronous motor control method and device, and medium

    CN117674649A

  • Motor driving device

    CN1641995A

  • Air conditioner

    JP2011033214A

Cited By

  • Optical focusing system driven by stepping motor

    CN120972337A

  • Optical focusing system driven by a stepper motor

    CN120972337B

  • Load motor control method and system

    CN121124682A

  • Milling machine protection control method, device, equipment and medium

    CN121635244A