A Stepper Motor Control Method and Device Based on Load Torque
By collecting and processing the current and voltage signals of the stepper motor, combining time sequence data to estimate the load torque in real time and adjust the current dynamically, the problem of stepper failure 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.
Patent Information
- Application Number
- CN202510110814.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-01-23
AI Technical Summary
Stepper motors are prone to failures in load changes and system control response lags, and high sensor dependence in the prior art leads to increased system cost and complexity.
By collecting the current and voltage signals of the stepper motor winding, digital filtering and PWM signal adjustment, combining the timing data of the current zero point and the voltage commutation point, the load torque is estimated in real time and the current is dynamically adjusted to optimize the working efficiency of the motor.
It realizes accurate estimation of load torque without adding additional sensors, improves the working stability and positioning accuracy of stepper motors, and reduces the hardware complexity and cost of the system.
Smart Images

Figure CN119543715B_ABST
Abstract
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 object, the present invention provides a stepping motor control method based on load torque, including: collecting current signals and voltage signals of the stepping motor windings, and respectively converting the current signals and the voltage signals from analog signals into digital signals; performing digital filtering on the collected current signals, comparing with a preset target sinusoidal current reference value, and calculating a current deviation; in the case where 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 stepping motor windings based on the target PWM signal until the current deviation of the stepping motor windings is less than or equal to the preset threshold; in the case where the current deviation is less than or equal to the preset threshold, determining a first timestamp at which a voltage commutation point occurs and a second timestamp corresponding to the zero position of the winding current according to the collected voltage signal; determining a time interval between the winding voltage commutation and the current zero point based on the first timestamp and the second timestamp; combining a preset no-load time and a loss-of-step time, performing calculation processing on the time interval to obtain the current load state and load torque value of the stepping motor; and adjusting the working current of the stepping motor according to the current load state and load torque value of the stepping motor to optimize the working efficiency of the stepping motor.
[0006] The present invention also provides a stepping motor control device based on load torque, including: a collection unit for collecting current signals and voltage signals of the stepping motor windings, and respectively converting the current signals and the voltage signals from analog signals into digital signals; a comparison unit for performing digital filtering on the collected current signals, comparing with a preset target sinusoidal current reference value, and calculating a current deviation; a first adjustment unit for, in the case where 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 stepping motor windings based on the target PWM signal until the current deviation of the stepping motor windings is less than or equal to the preset threshold; a first determination unit for, in the case where the current deviation is less than or equal to the preset threshold, determining a first timestamp at which a voltage commutation point occurs and a second timestamp corresponding to the zero position of the winding current according to the collected voltage signal; a second determination unit for determining a time interval between the winding voltage commutation and the current zero point based on the first timestamp and the second timestamp; an acquisition unit for combining a preset no-load time and a loss-of-step time, performing calculation processing on the time interval to obtain the current load state and load torque value of the stepping motor; and a second adjustment unit for adjusting the working current of the stepping motor according to the current load state and load torque value of the stepping motor to optimize the working efficiency of the stepping motor.
[0007] The present invention also provides a computer device, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps of any one of the above methods are implemented.
[0008] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in any one of the above are implemented.
[0009] The load torque-based stepping motor control method and device provided by the present invention can accurately estimate the load torque without adding additional sensors by detecting and feeding back the current and voltage signals of the stepping motor windings in real time. The present invention can realize the efficient monitoring and dynamic adjustment of the operating state of the stepping motor, thereby improving the working stability and positioning accuracy of the stepping motor. In addition, the present invention ensures that the stepping motor can adapt to changes under different load conditions and avoid out-of-step phenomena by means of digital filtering and PWM signal adjustment, thereby greatly improving the reliability and service life of the stepping motor.
[0010] The significant advantage of this invention is that by relying only on the current and voltage signals inside the stepping motor and combining the timing data of the current zero point and the voltage commutation point to determine the load torque, the function of accurately estimating the load change without additional sensors is realized. Therefore, while reducing the complexity and cost of the system hardware, the present invention improves the control accuracy and adaptability, and is especially suitable for use in complex industrial environments. Description of the Drawings
[0011] Figure 1 is a schematic diagram of the steps of the load torque-based stepping motor control method in an embodiment of the present invention;
[0012] Figure 2 is a block diagram of the structure of the load torque-based stepping motor control device in an embodiment of the present invention;
[0013] Figure 3 is a schematic block diagram of the structure of a computer device in an embodiment of the present invention.
[0014] The realization, functional characteristics, and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. Detailed Embodiments
[0015] In order to make the object, technical solution, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to 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 used to limit the present invention.
[0016] Refer to Figure 1, an embodiment of the present invention provides a stepping motor control method based on load torque, including the following steps:
[0017] S1, Collect the current signal and voltage signal of the stepping motor winding, and convert the current signal and the voltage signal from analog signals to digital signals respectively.
[0018] S2, Perform digital filtering on the collected current signal, compare it with a preset target sinusoidal current reference value, and calculate the current deviation.
[0019] S3, When the current deviation is greater than a preset threshold, generate a target PWM signal according to the current deviation, and adjust the current of the stepping motor winding based on the target PWM signal until the current deviation of the stepping motor winding is less than or equal to the preset threshold.
[0020] S4, When the current deviation is less than or equal to the preset threshold, determine the first timestamp when the voltage commutation point occurs and the second timestamp corresponding to the zero position of the winding current according to the collected voltage signal.
[0021] S5, Based on the first timestamp and the second timestamp, determine the time interval between winding voltage commutation and current zero.
[0022] S6, Combine the preset no-load time and out-of-step time, perform calculation processing on the time interval, and obtain the current load state and load torque value of the stepping motor.
[0023] S7, Adjust the working current of the stepping motor according to the current load state and load torque value of the stepping motor to optimize the working efficiency of the stepping motor.
[0024] The stepping motor control method of the present invention realizes high-precision control of the stepping motor by collecting the current and voltage signals of the winding in real time and converting the analog signals into digital signals for processing. The core advantage of this method is that no additional sensors are required, but the existing current and voltage signals are directly used to adjust and estimate the load torque, thereby reducing the complexity and cost of the system.
[0025] By converting the current and voltage signals into digital signals, the system can use modern digital control means to perform precise real-time control on the motor. Compared with traditional analog control, digital processing provides higher precision and faster response speed, which is crucial for the control of stepping motors when the load changes. In addition, digital filtering of the current signal can effectively remove external noise and interference, making the calculation of current deviation more accurate and ensuring the stable operation of the system.
[0026] The adjustment of the winding current is not only to respond to the change of the load, but more importantly, when the current deviation is less than or equal to the preset threshold, it is necessary to determine the occurrence time of the voltage commutation point and the zero position of the winding current based on the voltage signal. This is very crucial because only when the current deviation meets the preset threshold can an accurate zero position be obtained, thus ensuring the accuracy of the timing data of the voltage commutation point. This approach enables the system to reliably calculate the load torque, ensuring that the stepper motor compensates in a timely manner in the face of load changes and avoiding out-of-step phenomena caused by sudden increases 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 operating conditions.
[0027] After adjusting the current deviation to meet the preset threshold, calculating the load torque through the timing data of the voltage commutation point and the current zero point is an innovative method. 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 position be guaranteed, thus ensuring the acquisition of accurate voltage commutation point timing data. Combining the preset no-load time and out-of-step time to process the time interval can more accurately judge the load changes of the motor under different working conditions, effectively avoiding the risk of out-of-step and improving the system stability.
[0028] According to the current load state and load torque, the system dynamically adjusts the working current of the motor to ensure that the motor can maintain the best working efficiency under any load condition. For example, when the load increases, the system will automatically increase the winding current to meet the torque requirement; while when the load decreases, the current will be correspondingly reduced to save energy consumption 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 out-of-step caused by load changes.
[0029] In summary, this control method based on load torque 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 requirements of variable operating conditions, ensuring the efficient and stable operation of the stepper motor. The key to implementing this solution lies in the accurate acquisition and processing of current and voltage signals, as well as the indirect calculation of load torque through timing data, so as to achieve the comprehensive control and optimization of the stepper motor without increasing the hardware complexity.
[0030] In one example, the acquired 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 acquired 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 the signal transformation data of the first current signal through the 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; adopting the Kalman filter algorithm according to the second current signal to perform prediction processing on the future signal state, and performing fusion processing on the predicted data after the prediction processing and the second current signal to obtain a third current signal; obtaining the operating frequency and dynamic working conditions of the stepping motor, and dynamically adjusting the frequency of the preset target sinusoidal current reference value based on the operating frequency and the dynamic working conditions to obtain a dynamic sinusoidal reference value adapted to the acquired current signal; comparing the third current signal with the dynamic sinusoidal reference value, calculating to obtain an initial current deviation, and classifying the initial current deviation through a fuzzy logic control algorithm to reduce the deviation error caused by non-linear working conditions to obtain the final current deviation.
[0031] In this example, first, the acquired current signal is 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 stepping motor state. By using wavelet transform processing and decomposing the current signal into multi-scale components through multiple wavelet basis functions, the signal characteristics can be analyzed at different scales, thereby better identifying and reducing noise. The advantage of this method is that the multi-resolution characteristic of wavelet transform can simultaneously process the low-frequency and high-frequency components of the signal, ensuring 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 characteristic information, making subsequent control more precise.
[0032] Next, the signal transformation data of the first current signal is identified through the recursive least squares algorithm, and adaptive filtering adjustment is performed based on these data. The purpose of this step is to reduce the lag response to signal mutations, so as to respond to current changes more quickly. This processing method takes into account the mutations that may occur in the current signal when the load of the stepping motor changes, while conventional filtering may have a problem of lag response. The recursive least squares algorithm can update the filtering parameters in real time, making the system more sensitive to signal changes. The advantage of this adaptive filtering is that it can adjust the system parameters at any time to adapt to the changes in signal characteristics, especially suitable for occasions where the working conditions of the stepping motor change relatively quickly.
[0033] Subsequently, the Kalman filtering algorithm is used to predict the second current signal and fuse it with the second current signal to obtain the third current signal. The advantage of this processing 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 react in advance to the dynamic changes of the stepper motor. This is particularly important in a complex dynamic environment because the load changes of the stepper motor are unpredictable. The introduction of the Kalman filter can reduce the control lag, enabling the system to better cope with these changes. Compared with traditional filtering methods, the advantage of the Kalman filter lies in its prediction ability based on state estimation, which makes it suitable for estimating the future state and adjusting the control strategy.
[0034] Furthermore, according to the operating frequency and dynamic working conditions of the stepper motor, the preset target sinusoidal current reference value is dynamically adjusted in frequency to obtain a dynamic sinusoidal reference value adapted to 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 lead to too large a deviation and the accurate control of the load torque cannot be achieved. Therefore, dynamically adjusting the reference value makes the system have better adaptability, especially when the operating frequency and working conditions change greatly. This dynamic adjustment can significantly improve the control accuracy and system stability.
[0035] Finally, the third current signal is compared with the dynamic sinusoidal reference value to calculate the initial current deviation, and the initial current deviation is classified by the fuzzy logic control algorithm to reduce the deviation error caused by non-linear working conditions. The advantage of the fuzzy logic control algorithm in this case is its ability to handle the ambiguity and uncertainty in non-linear systems. The working conditions of the stepper motor have complex non-linear characteristics. Fuzzy logic can better handle these uncertainties and reduce the deviation error by classifying the deviation and rule reasoning. This method is particularly suitable for complex industrial application scenarios.
[0036] In one example, generating a target PWM signal according to the current deviation and adjusting the current of the stepping motor winding based on the target PWM signal includes: analyzing the current deviation in real time to determine the amplitude and change rate of the current deviation; using a preset adaptive PWM adjustment strategy to process 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. 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. 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; applying the target PWM signal to the stepping motor winding to adjust the current of the stepping motor winding.
[0037] In this example, by generating a target PWM signal based on the current deviation and adjusting the current of the stepping motor winding based on this signal, the aim is to control the current more precisely to help determine the zero position of the winding current. This process first analyzes the current deviation in real time to determine the amplitude and change rate of the current deviation, and then dynamically adjusts through the adaptive PWM adjustment strategy to ensure the smoothness and response speed during the current adjustment process.
[0038] During the control process of the stepping motor, 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 the load estimation. However, during the current control process of the motor winding, factors such as hysteresis and instability are easily introduced during the rapid change and adjustment of the current, making it difficult to accurately capture the zero point position.
[0039] 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 to 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 change characteristics of the current. Specifically, when the amplitude of the current deviation is large and the change rate is fast, a PWM signal with a higher frequency is used to quickly respond to and adjust the current, enabling the current to reach the ideal state faster. This rapid response is of great significance for avoiding large - scale hysteresis, which can enable the winding current to stabilize in the shortest time, thus ensuring the accuracy of the zero point position.
[0040] Conversely, when the magnitude of the current deviation is small or the rate of change is slow, the system selects a PWM signal with a lower frequency to maintain the stability of the current. This way of reducing the frequency helps to reduce the high-frequency fluctuations of the current, thereby reducing the impact of high-frequency noise in the control process on the zero position. This dynamic adjustment of the PWM signal frequency enables the current to have sufficient response speed during rapid changes and avoid introducing unnecessary fluctuations and noise when approaching stability, thus providing strong support for the accurate determination of the zero position.
[0041] The generation and application of the target PWM signal aim to make the current in the stepping motor winding stable on the expected trajectory under different loads and operating conditions. Especially when the current needs to respond quickly, the winding current can better fit the ideal change curve through the adaptively adjusted PWM signal. This not only ensures that the current reaches the target value as soon as possible during the change process but also reduces the error accumulation caused by hysteresis, thus facilitating the accurate capture of the zero position of the winding current.
[0042] In summary, the adaptive PWM control strategy in this example has direct benefits for the determination of the zero position. By responding with a high frequency to a large current deviation, reducing hysteresis, it improves the accuracy of zero position determination; while by reducing the PWM frequency when the current change tends to be stable, it reduces the impact of high-frequency noise, thus further ensuring the accuracy of the zero position. The accurate determination of the zero position is the basis for the entire stepping 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.
[0043] In one example, by combining 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: obtaining the historical operation data and current operation data of the stepping 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; performing fuzzification processing on the time interval, the dynamic no-load time data, and the dynamic out-of-step time data, and mapping them into fuzzy sets, and inferring the current load state of the stepping motor through data processing of the fuzzy sets by a fuzzy neural network; performing non-linear fitting processing on the relationship between different load states and time intervals, and substituting the current load state of the stepping motor into the result of the non-linear fitting processing to obtain the current load torque value of the stepping motor.
[0044] In this example, the preset no-load time and out-of-step time are combined to calculate the current load status and load torque value of the stepper motor, aiming to more accurately judge the operating state of the motor and thus make reasonable control decisions. By introducing the concepts of no-load time and out-of-step time, it is possible to better evaluate the state of the stepper motor under different working conditions. Especially in the case of high-frequency load changes and complex operating environments, these two time parameters provide crucial reference data.
[0045] First of all, the introduction of no-load time helps to accurately identify the characteristics of the motor under unloaded conditions, especially to judge whether the current load situation of the stepper motor matches the no-load characteristics. When the motor is in the no-load state, the change of no-load time has a great impact on the current and voltage characteristics of the motor. Therefore, dynamically modeling the no-load time helps to more accurately identify the operating state of the motor. The out-of-step time represents the time when the motor loses steps due to excessive load during operation. These data can be used to judge whether the motor can no longer meet the requirements of load changes, thus providing a more effective protection mechanism. The introduction of these two time characteristics can better help to distinguish whether the motor is in a normal operating, no-load, or about-to-lose-step state. Compared with the traditional method that only relies on current and voltage signals, introducing no-load and out-of-step times can provide more operating state information, improving the accuracy and robustness of system identification.
[0046] The process of specifically determining the current load status and load torque value is completed by combining historical data and 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, usually manifested as the changes of current, voltage, speed, etc. over time. By using a clustering algorithm to classify and model these historical data, the 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 the typical characteristic values during no-load and out-of-step. Suppose in the historical data, the average no-load current is 0.8 A and the voltage is 24 V, while in the out-of-step case, the current increases significantly to 2.0 A and the voltage drops to 22 V. These characteristic values can be used as the criteria for judging the current state.
[0047] Combined with the current operation data, the no-load time and out-of-step time are dynamically adjusted, so that the no-load time and out-of-step time corresponding to the current state of the motor can be dynamically obtained. For example, if the current of the motor is between 0.75 A and 0.85 A 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 the no-load state; if the current exceeds 1.8 A and the duration is close to the out-of-step time, it is possible that the motor is about to lose steps. By dynamically adjusting these time parameters, the system can adapt to the changes in working conditions.
[0048] Subsequently, the data of the time interval, dynamic no-load time, and out-of-step time are fuzzified to form fuzzy sets. For example, the no-load time can be fuzzified into three fuzzy sets: "short", "medium", and "long", and the out-of-step time can also be fuzzified. By performing inference processing on these fuzzy sets through a fuzzy neural network, the current load state of the stepping motor can be inferred. The role of the fuzzy neural network is to be able to process this non-linear and uncertain input for effective classification. For example, if the current no-load time is short and the out-of-step time is long, fuzzy inference 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 relatively high level, it may be inferred that the motor is in an "overloaded and about to lose step" state.
[0049] Next, by performing non-linear fitting on the relationship between different load states and time intervals, the characteristic curve of the motor load torque is obtained. Non-linear fitting can be carried out in the form of 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:
[0050] T = a1*(no-load time)^3 + a2*(out-of-step time)^2 + a3*(time interval) + a4
[0051] Where 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 through the fuzzy neural network, this state can be substituted into the fitting model to obtain the current load torque value. For example, assuming the current no-load time is 1.5 seconds, the out-of-step time is 0.8 seconds, the time interval is 0.2 seconds, and the coefficients obtained through the fitting model are a1 = 0.5, a2 = 0.3, a3 = 0.2, and a4 = 1.0, then the current load torque is:
[0052] T = 0.5*(1.5)^3 + 0.3*(0.8)^2 + 0.2*(0.2) + 1.0 = 2.837 Nm
[0053] In this way, the current load torque value of the motor can be calculated very precisely.
[0054] This whole set of methods, by introducing the no-load time and out-of-step time, enables the system to more accurately judge the operating state and load torque of the motor under variable working conditions. It not only improves the control accuracy and response speed but also greatly enhances the system's adaptability to complex operating environments.
[0055] In one example, a clustering algorithm is used to classify and model the 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 by combining the current operation data, including: determining clustering parameters, where the clustering parameters at least include: initial categories and the initial center positions corresponding to each initial category, and the categories are respectively the no-load initial category, the out-of-step initial category, and the intermediate transition initial category, and the initial center position of each category is determined by adding and subtracting a preset offset from the mean value of the historical data characteristics of its category; performing initial clustering iteration processing on the historical operation data based on the clustering parameters, where, during the clustering iteration process, the distance values between each data point and all the initial center points are 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 the data points in each category is taken as the new center point of the category, and the step of "performing initial clustering iteration processing on the historical operation data based on the clustering parameters" is repeated until the center points tend to a convergence state; constructing a classification model based on the clustering result, and bringing the current operation data into the classification model to obtain the dynamic no-load time data and out-of-step time data.
[0056] In this example, a clustering algorithm is used to process the historical operation data of the stepper motor. The purpose is to distinguish the no-load characteristics and out-of-step characteristics of the motor through classification and modeling, so as to better identify different operating states of the motor, especially under complex working conditions. The key to the whole process lies in using historical data to construct a classification model for real-time judgment of the motor state in the future.
[0057] First, the clustering parameters need to be determined. The clustering parameters at least include the initial categories and the initial center positions corresponding to each initial category. Here, the categories are divided into three types: the no-load initial category, the out-of-step initial category, and the intermediate transition initial category. The initial center position of each category is determined by adding and subtracting a preset offset from the mean value of the historical data characteristics of the category. For example, if the mean value of the current in the no-load state in the historical data is 0.8 A and the mean value of the voltage is 24 V, the center position of the no-load initial category can be set as the current 0.8 A and the voltage 24 V, plus or minus an offset, such as 0.1 A and 0.5 V, so as to obtain the center point range of (0.7 A - 0.9 A, 23.5 V - 24.5 V). Similarly, for the out-of-step category, assuming that the mean value of the current in the out-of-step state is 2.0 A and the voltage is 22 V, the initial center position can be determined by the same method. The intermediate transition category can be set between the two, such as the current 1.5 A and the voltage 23 V, plus or minus an appropriate offset.
[0058] Next, initial clustering iteration processing is performed on the historical operation data. The core of this process is to calculate the distance values 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 minimum distance belongs. In this example, assume there are 1000 sets of historical operation data, and each set of data contains two parameters: current and voltage. The Euclidean distance formula is used to calculate the distance from each data point to each center point:
[0059] Distance = sqrt((Current difference)^2 + (Voltage difference)^2)
[0060] For example, if the current of a certain set of data points is 1.7A and the voltage is 23.8V, then the distances to the three initial center points are as follows:
[0061] 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
[0062] Distance to 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
[0063] Distance to out-of-step center point (2.0A, 22V) = sqrt((1.7 - 2.0)^2 + (23.8 - 22)^2) = sqrt(0.09 + 3.24) = sqrt(3.33) ≈ 1.83
[0064] It can be seen that the minimum distance of this data point is the distance to the intermediate transition center point, so this data point is assigned to the intermediate transition category.
[0065] After completing the assignment of each data point, next, the average value of all data points in each category is taken as the new center point of that category. For example, assume there are 300 data points in the no-load category. The average value of the current is calculated as 0.82A, and the average value of the voltage is calculated as 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 in the same way.
[0066] Then each data point is assigned to the category to which the new center point belongs again, and this process is repeated until the change of the center point tends to a convergent state, that is, the position of the center point no longer changes significantly. Generally, after 5 to 10 iterations, the position of the center point will tend to be stable.
[0067] When the clustering results converge, a classification model can be constructed based on these results. This model describes the no-load, out-of-step, and transition states of different categories through historical data, enabling the rapid classification of the current operating data of the motor in the future. By bringing the current operating data into this classification model, the current state of the motor can be determined. For example, assume the current operating data is a current of 1.6 A and a voltage of 23.5 V. By judging through the model, this data point best fits the intermediate transition category, and based on the historical characteristics of this category, it can be inferred that the motor may currently be in a partial load state.
[0068] Once the current state of the motor is determined, the dynamic no-load time and out-of-step time data can be further obtained according to the classification model. For example, if the current state belongs to the out-of-step category, and according to the historical data analysis, the average out-of-step time of this category is 0.8 seconds, then 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 can be inferred based on the current state.
[0069] In an example, the time interval, the dynamic no-load time data, and the dynamic out-of-step time data are fuzzified, mapped into fuzzy sets, and the current load state of the stepper motor is inferred through a fuzzy neural network, including: automatically adjusting the shape of the fuzzy membership function according to the historical operating data of the stepper motor, and mapping the time interval, the dynamic no-load time data, and the dynamic out-of-step time data into fuzzy sets based on the adjusted fuzzy membership function; using a preset fuzzy rule database and the fuzzy sets, and inferring the current load state of the stepper motor through a fuzzy neural network to obtain the final current load state of the stepper motor, where the fuzzy rule database is established by the staff according to the operating data of the stepper motor under different loads.
[0070] In this example, fuzzification and a fuzzy neural network are used to infer the current load state of the stepper motor, mainly to cope with the uncertainties and non-linear factors during the operation of the stepper motor. This method can process the time interval, dynamic no-load time data, and dynamic out-of-step time data in the form of fuzzy sets, so as to be able to more accurately describe the operating state of the stepper motor under different working conditions.
[0071] First, fuzzify the time interval, dynamic no-load time data, and dynamic out-of-step time data. The key to this step is to use the fuzzy membership function to map these precise numerical data into fuzzy sets. To ensure the accuracy of the fuzzification result, 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 the time interval ranges from 0.1 second to 1.0 second, three fuzzy membership functions can be set, such as "short time interval", "medium time interval", and "long time interval". These membership functions may adopt triangular or trapezoidal forms to represent the membership values of each time range in different states. For example, 0.2 second may have a high membership belonging to the "short time interval", while 0.8 second belongs more to the "long time interval".
[0072] Automatically adjusting the shape of the membership function means dynamically optimizing the definition and range of these functions according to historical data. For example, historical data may indicate that during most no-load states, the numerical values of the time interval are relatively concentrated between 0.3 second and 0.5 second. Therefore, the system will automatically adjust the membership function of the "short time interval" to make it have a higher membership for the numerical values within this interval, while having a lower membership in other time ranges. This adjustment is to make the fuzzified data more in line with the actual working conditions, thereby improving the accuracy of fuzzy inference.
[0073] Once these data are fuzzified, they will be mapped into fuzzy sets. For example, the time interval is fuzzified as "short time interval = 0.8, medium time interval = 0.2, long time interval = 0.0", and the dynamic no-load time may be fuzzified as "short no-load time = 0.6, medium no-load time = 0.4, long no-load time = 0.0". These fuzzy sets can comprehensively reflect the state of the stepper motor in an uncertain environment.
[0074] Next, process and infer these fuzzy sets through a fuzzy neural network. The fuzzy neural network combines the advantages of fuzzy logic and neural networks. It can not only process fuzzy inputs but also optimize weights and rules through learning, thus achieving accurate modeling of complex nonlinear systems. In this process, the fuzzy rule database plays a crucial role. This database is established by the staff according to the operation data of the stepper motor under different loads. For example, the 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 state of out-of-step risk", and so on. These rules are summarized from expert experience and experimental data and cover the characteristics of the stepper motor in various operating states.
[0075] When the fuzzy set is input into the fuzzy neural network, the system will infer the current load status according to the fuzzy rule database. For example, if the fuzzification results for the current time interval are "short time interval = 0.7, medium time interval = 0.3", the fuzzification result for the no-load time is "medium no-load time = 0.9", and the fuzzification result for the out-of-step time is "short out-of-step time = 0.8", the fuzzy neural network will, based on these inputs and according to the preset rules, obtain the state that the current motor is in "medium load and at risk of out-of-step".
[0076] The advantage of using a fuzzy neural network for inference is that it has the ability to learn and adapt. Different from traditional deterministic control, the fuzzy neural network can handle the uncertainty and fuzziness in the input. Especially when the load change of the stepper motor has uncertainty and mutation characteristics, it can make effective inferences for various non-linear and complex input signals. For example, when the motor load suddenly increases, resulting in rapid changes in the time interval and out-of-step time, the fuzzy neural network can make corresponding adjustments based on these fuzzy set inputs and quickly determine the current operating state of the motor, so as to further adopt appropriate control strategies.
[0077] Generally speaking, this method can effectively cope with the non-linearity, uncertainty and complexity in 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 status of the motor can be accurately judged under different working conditions. This control method combining fuzzy logic and neural network not only utilizes the advantage of fuzzy logic in dealing with uncertainty, but also utilizes the powerful self-learning and non-linear fitting ability of the neural network, significantly improving the adaptability of the system to complex working conditions.
[0078] In one example, non-linear fitting processing 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 non-linear fitting processing to obtain the current load torque value of the stepper motor, including: using a polynomial fitting model to fit the data points of different load states and time intervals to obtain an initial fitting function between the time interval and torque under different load states; using the least squares method to determine the coefficients for calculating the initial fitting function to obtain the final fitting function; bringing the current load state and the corresponding time interval data into the final fitting function to calculate the current load torque value of the stepper motor.
[0079] In this example, through non-linear fitting of the relationship between different load states and time intervals, the aim is to provide more accurate torque estimation for the stepper motor under different load states. The whole process involves polynomial fitting of historical data and using the least squares method to calculate the coefficients of the fitting function, which are ultimately used to infer the current load torque value. The key to this method lies in establishing a mathematical model that can describe the non-linear relationship between different load states and time intervals, so as to quickly calculate the torque of the stepper motor during operation.
[0080] First, use a polynomial fitting model 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.5 Nm; in the heavy-load state, the time interval is 0.8 seconds and the corresponding torque value is 2.5 Nm. 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 torque under different load states is obtained through fitting.
[0081] The process of polynomial fitting can select polynomials of different orders, usually quadratic or cubic polynomials, in order to better capture the non-linear relationship. For example, assume the form of cubic polynomial fitting is: T = a*(time interval)^3 + b*(time interval)^2 + c*(time interval) + d.
[0082] 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, d are the coefficients of the fitting function. At this time, the fitting function is called the initial fitting function because its coefficients have not been determined.
[0083] 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 the squared errors between the fitting function and the data points, so that the fitting function can approximate all the data points as closely as possible. For example, there are multiple data points (time interval, torque): (0.2 seconds, 0.5 Nm), (0.5 seconds, 1.0 Nm), (0.8 seconds, 2.5 Nm). The least squares method will calculate the sum of the squared deviations between these points and the fitting curve to minimize the overall error of 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.
[0084] Then, bring the current load state of the stepper motor and the corresponding time interval data into this 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.
[0085] Substitute the previously determined coefficients a, b, c, and d, and the current load torque value of the stepper motor can be calculated. Assume the coefficients of the final fitting function are a = 1.2, b = -0.8, c = 2.5, and d = 0.3, then:
[0086] T = 1.2*(0.7)^3 + (-0.8)*(0.7)^2 + 2.5*(0.7) + 0.3
[0087] ≈ 1.2*0.343 - 0.8*0.49 + 2.5*0.7 + 0.3
[0088] ≈ 0.4116 - 0.392 + 1.75 + 0.3
[0089] ≈ 2.0696 Nm
[0090] In this way, the current load torque value is 2.07 Nm.
[0091] Through this method of polynomial fitting and least squares calculation, the torque value of the stepper motor can be accurately determined according to 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 obtaining the torque value through direct measurement in each run. The fitted mathematical model is based on historical data, fully considering 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 basis for the control of the stepper motor.
[0092] Refer to Figure 2 , an embodiment of the present invention provides a stepper motor control device based on load torque, including:
[0093] A collection unit 1, configured to collect the current signal and voltage signal of the stepper motor winding, and convert the current signal and the voltage signal from analog signals into digital signals respectively;
[0094] A comparison unit 2, configured to perform digital filtering on the collected current signal, compare it with a preset target sinusoidal current reference value, and calculate the current deviation;
[0095] The first adjustment unit 3 is configured to, when the current deviation is greater than a preset threshold, generate a target PWM signal according to the current deviation, and adjust the current of the stepping motor winding based on the target PWM signal until the current deviation of the stepping motor winding is less than or equal to the preset threshold;
[0096] The first determination unit 4 is configured to, when the current deviation is less than or equal to the preset threshold, determine a first timestamp at which a voltage commutation point occurs and a second timestamp corresponding to a zero position of the winding current according to the collected voltage signal;
[0097] The second determination unit 5 is configured to determine a time interval between the winding voltage commutation and the current zero point based on the first timestamp and the second timestamp;
[0098] The acquisition unit 6 is configured to perform calculation processing on the time interval by combining a preset no-load time and a loss-of-step time to obtain the current load state and load torque value of the stepping motor;
[0099] The second adjustment unit 7 is configured to adjust the operating current of the stepping motor according to the current load state and load torque value of the stepping motor to optimize the operating efficiency of the stepping motor.
[0100] In this embodiment, for the specific implementation of each unit in the above device embodiment, please refer to that described in the above method embodiment, and details are not described herein again.
[0101] Refer to Figure 3 , and in the embodiment of the present invention, a computer device is further provided. The computer device may be a server, and its internal structure may be as Figure 3 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 of the computer design 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.
[0102] Those skilled in the art can understand that Figure 3 the structure shown in
[0103] 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.
[0104] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. 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 above method embodiments. Among them, any reference to a memory, storage, database, or other medium provided by the present invention and used in the embodiments can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM, etc.
[0105] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, device, article or method. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, device, article or method including that element.
[0106] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally 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 stepper motor winding to adjust the current of the stepper motor winding.
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 step-out 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; 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.
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 of the clustering iteration tends to converge; A classification model is constructed based on the clustering result, and the current operation data is substituted 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 step-out 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 out-of-step 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 substituted 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 substituted 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