Stepping motor stalling detection method, device and equipment
By detecting the angle generated by the phase or specific value of the current and the mapping relationship between the current, the existing stepper motor blocking detection requires turning off the drive output, real-time detection of blocking conditions is realized, the requirements for sensors are reduced, and the safety of the motor and control system is protected.
Patent Information
- Application Number
- CN202510367255.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-06-17
AI Technical Summary
The existing stepper motor blocking detection requires the drive output to be turned off, which is limited by the sensor, which affects the control accuracy and dynamic performance.
By detecting the angle generated by the phase or specific value of the current and the current mapping relationship, it is necessary to determine whether the stepper motor is blocked without relying on a specific sensor type or accuracy.
It realizes real-time detection of blockage during motor operation, without turning off the drive output, reduces the requirements for sensors, expands the application range, and protects the safety of the motor and control system.
Smart Images

Figure CN120161341A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of stepper motor detection, and particularly to a stepper motor stall detection method, device, and equipment. Background Art
[0002] In the control and application of traditional three-phase stepper motors, determining whether the motor is stalled is an important technical aspect.
[0003] On the one hand, using a motor angle sensor or Hall position sensing device to obtain the true position information of the motor can effectively judge the stall situation. However, this method requires additional sensor hardware, which undoubtedly increases the cost and complexity of the system. On the other hand, detecting the back electromotive force by turning off the drive output during the operation of the motor to judge the stall has a certain feasibility, but it requires interrupting the normal operation of the motor, which has an adverse impact on the control accuracy and dynamic performance, and frequent operations may also damage the drive circuit.
[0004] Therefore, the existing stepper motor stall detection has technical problems such as the need to turn off the drive output and being restricted by sensors. Summary of the Invention
[0005] The main purpose of this application is to provide a stepper motor stall detection method, device, and equipment, aiming to solve the technical problems of the existing stepper motor stall detection that requires turning off the drive output and being restricted by sensors.
[0006] To achieve the above object, this application proposes a stepper motor stall detection method, and the stepper motor stall detection method includes: generating an angle output value of the stepper motor based on a target motor angle; generating a current output value of the stepper motor based on the angle output value; detecting the output quality of the current output value; when the output quality of the current output value is qualified, generating a first mapping relationship according to the angle output value and the current output value; when the offset value between the first mapping relationship and the standard mapping relationship exceeds a preset range, it is determined that the stepper motor is stalled.
[0007] In an embodiment, the step of generating an angle output value of the stepper motor based on a target motor angle includes: detecting the working state of the stepper motor; when the working state of the stepper motor is an angle forced output state, obtaining the target motor angle and the target speed; obtaining an angle increment based on the target speed; generating an angle output value of the stepper motor based on the angle increment and the target motor angle.
[0008] In one embodiment, the step of generating a current output value of the stepper motor based on the angle output value includes: collecting three-phase currents of the stepper motor based on the angle output value; generating a target torque of the stepper motor based on the three-phase currents and a target phase current amplitude; and generating a current output value of the stepper motor based on the target torque.
[0009] In one embodiment, after the step of determining that the stepper motor is stalled when the offset value between the first mapping relationship and the standard mapping relationship exceeds a preset range, the following steps are further included: when the output quality of the current output value is unqualified, obtaining a space vector pulse width modulation waveform of the stepper motor; obtaining a pulse width relationship between any two-phase pulse widths based on the space vector pulse width modulation waveform; and determining that the stepper motor is stalled when the pulse width relationship does not match a preset pulse width relationship.
[0010] In one embodiment, the step of determining that the stepper motor is stalled when the pulse width relationship does not match a preset pulse width relationship includes: analyzing the pulse width relationship to obtain the action time of the two-phase pulse widths at the current zero-crossing point; performing a mapping comparison based on the action time and the preset pulse width relationship; and determining that the stepper motor is stalled when the action time does not overlap with the preset pulse width relationship.
[0011] In one embodiment, after the step of determining that the stepper motor is stalled when the phase offset value between the first mapping relationship and the standard mapping relationship exceeds a preset range, the following steps are further included: when the output quality of the current output value is unqualified, obtaining a direct-axis current and a quadrature-axis current of the stepper motor; generating a voltage output value of the stepper motor based on the direct-axis current and the quadrature-axis current; and determining that the stepper motor is stalled when the offset value between the voltage output value and a calibrated voltage value exceeds a preset range.
[0012] In addition, to achieve the above object, the present application further provides a stepper motor stall detection device, where the stepper motor stall detection device includes: an operation module configured to generate an angle output value of the stepper motor based on a target motor angle and generate a current output value of the stepper motor based on the angle output value; a detection module configured to detect the output quality of the current output value; and a control module configured to generate a first mapping relationship based on the angle output value and the current output value when the output quality of the current output value is qualified, and determine that the stepper motor is stalled when the offset value between the first mapping relationship and a standard mapping relationship exceeds a preset range.
[0013] In addition, to achieve the above object, the present application further provides a stepper motor stall detection device, where the device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the stepper motor stall detection method as described above.
[0014] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the above-described stepping motor stall detection method are implemented.
[0015] In addition, to achieve the above object, the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the above-described stepping motor stall detection method are implemented.
[0016] One or more technical solutions proposed by the present application have at least the following technical effects:
[0017] By detecting the mapping relationship between the angle and current generated by the phase or specific value of the current, it does not depend on a specific sensor type or accuracy. As long as the sensor can accurately measure the current and work in coordination with the control system, stall detection can be achieved. This reduces the requirements for the sensor and expands the application range. At the same time, since the detection is performed in real time during the operation of the motor without shutting down the drive output, the stall situation can be detected in a timely manner and measures can be taken. This helps prevent the motor from overheating or being damaged due to long-term stall, protecting the safety of the motor and the control system. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0019] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0020] Figure 1 It is a driving block diagram of a stepping motor provided for the first embodiment of the stepping motor stall detection method of the present application;
[0021] Figure 2 It is a flow schematic diagram provided for the first embodiment of the stepping motor stall detection method of the present application;
[0022] Figure 3 It is a first mapping relationship schematic diagram provided for the first embodiment of the stepping motor stall detection method of the present application;
[0023] Figure 4 It is a flow schematic diagram provided for the second embodiment of the stepping motor stall detection method of the present application;
[0024] Figure 5 It is the space vector pulse width modulation waveform diagram of the step motor stall detection method provided in the second embodiment of the present application;
[0025] Figure 6 It is the schematic flow chart provided in the third embodiment of the step motor stall detection method of the present application;
[0026] Figure 7 It is the module structure diagram of the step motor stall detection device in the embodiment of the present application;
[0027] Figure 8 It is the device structure diagram of the hardware operating environment involved in the step motor stall detection method in the embodiment of the present application.
[0028] The realization of the purpose, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. Detailed Embodiments
[0029] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0030] In order to better understand the technical solutions of the present application, the following will be described in detail with reference to the accompanying drawings of the specification and specific embodiments.
[0031] Currently, the commonly used stall judgment methods mainly rely on external sensors or specific detection means, including the following two main methods: using a motor angle sensor or a position sensing device such as Hall, and detecting the back electromotive force by turning off the drive output during the operation of the motor.
[0032] The former obtains the real position information of the motor by installing a motor angle sensor (such as a resolver, an encoder, etc.) or a Hall position sensor. By monitoring the position change of the motor in real time, it can be judged whether the motor rotates in the expected manner, thereby indirectly judging whether the motor is stalled. However, this method requires additional sensor hardware, increasing the cost and complexity of the system. At the same time, the installation and debugging of the sensor may also have a certain impact on the operating performance of the motor.
[0033] The latter is to temporarily turn off the drive output during the operation of the motor, and then detect the back electromotive force of the motor to judge whether it is stalled. The back electromotive force is the electromotive force generated by the motor during rotation, and its magnitude is related to the rotation speed and magnetic field strength of the motor. When the motor is stalled, the back electromotive force will change or disappear. But this method requires interrupting the normal operation of the motor for detection, which may affect the control accuracy and dynamic performance of the motor. At the same time, frequently turning off and on the drive output may also damage the drive circuit of the motor.
[0034] Based on this, an embodiment of the present application provides a method for detecting the stall of a stepping motor. It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a stepping motor stall detection device, etc. that can implement the above functions. Hereinafter, taking the stepping motor stall detection device as an example, this embodiment and the following embodiments will be described.
[0035] In this embodiment, please refer to Figure 1 and Figure 2 , Figure 1 which is the drive block diagram of the stepping motor provided in the first embodiment of the stepping motor stall detection method of the present application; Figure 2 which is the process schematic diagram provided in the first embodiment of the stepping motor stall detection method of the present application.
[0036] Here, a brief introduction to the content of Figure 1 is as follows: The inputs of the automatic current regulator ACR are the reference currents iq* and id*, and the actual currents iq and id. The outputs are the voltage commands ud* and uq*. The outputs of the automatic current regulator ACR pass through two PI controllers (proportional-integral controllers) to generate ud and uq. The ud and uq are converted into voltage commands in the dq / αβ coordinate system through the inverse Park transform (invPark).
[0037] It should be noted that the space vector pulse width modulation SVPWM receives the output of the inverse Park transform and generates a PWM signal to control the switching state of the inverter. The voltage source inverter VSI receives the output of the space vector pulse width modulation SVPWM and converts the DC voltage into an AC voltage to drive the permanent magnet synchronous motor.
[0038] Among them, the Park transform converts the current signals in the αβ / dq coordinate system back to the abc coordinate system. The Clark transform converts the current signals in the αβ coordinate system back to the abc coordinate system.
[0039] The permanent magnet synchronous motor PMSM receives the three-phase voltage from the voltage source inverter VSI and outputs the three-phase current and the motor speed. The entire system realizes the closed-loop regulation of the current through feedback control, thereby controlling the speed and output of the permanent magnet synchronous motor.
[0040] The stepping motor stall detection method includes steps S10 to S50: Step S10, generating an angle output value of the stepping motor based on the target motor angle.
[0041] It should be noted that stepper motors are usually used to drive mechanical components to specific positions or angles. Therefore, it is first necessary to determine the target motor angle, which is usually determined according to system requirements, user input, or preset program logic. The target motor angle can be an absolute value (representing the specific angle to which the motor should rotate) or a relative value (representing the angle by which the motor should rotate relative to its current position).
[0042] It can be understood that once the target motor angle is determined, a corresponding angle output value needs to be generated. This output value is usually a digital signal, which is sent to the stepper motor driver to control the rotation of the motor. The process of generating the angle output value may involve converting the target angle into a format that the motor driver can understand (such as a pulse signal, digital encoding, etc.). In addition, parameters such as the motor resolution and step angle may also need to be considered to ensure that the generated output value can accurately control the rotation of the motor.
[0043] It can be understood that the generated angle output value needs to be sent to the stepper motor driver. The driver will control the rotation of the motor according to the received output value to make it reach the target angle.
[0044] In a specific embodiment, the step of generating the angle output value of the stepper motor based on the target motor angle includes: detecting the working state of the stepper motor; when the working state of the stepper motor is the angle forced output state, obtaining the target motor angle and the target speed; obtaining the angle increment based on the target speed; and generating the angle output value of the stepper motor based on the angle increment and the target motor angle.
[0045] It can be understood that the purpose of real-time monitoring of the working state of the stepper motor is to determine whether it is in a state where it can receive and execute the angle output instruction. Generally speaking, the working state may include various states, such as standby, running, angle forced output, etc. In this embodiment, special attention is paid to the angle forced output state, which is the prerequisite for generating the angle output value.
[0046] It can be understood that when the stepper motor is in the angle forced output state, the system needs to obtain the target motor angle and the target speed from the upper-level control or user input. The target motor angle is the specific position or angle to which the motor should rotate, and the target speed is the desired rotation speed for the motor to reach that position.
[0047] It should be noted that in many applications, the target speed may be a preset value, which is set in advance according to the system requirements or process requirements. For example, in some automated production lines or mechanical equipment, the speed of the motor may need to be precisely controlled according to the production rhythm or process parameters. These speed values can be determined during the system design phase and stored in the parameters of the controller. In some scenarios where the motor speed needs to be flexibly adjusted, the target speed may be directly input by the user through the operation interface or programming interface. For example, on some experimental equipment or test platforms, researchers or engineers may need to dynamically adjust the motor speed according to experimental requirements or test conditions.
[0048] In addition, in some more complex control systems, the target speed may be dynamically obtained through sensor feedback and algorithm calculation to provide conditions for stall detection in industry. For example, in some applications that require precise control of the motor position and speed, the system may use feedback components such as encoders or Hall sensors to continuously monitor the actual speed of the motor and dynamically adjust the target speed through algorithm calculation to achieve a more precise control effect.
[0049] It can be understood that according to the target speed, the system can calculate the angle increment that the motor should rotate within each control cycle or time step. The magnitude of the angle increment directly affects the smoothness and accuracy of the motor rotation, so it needs to be reasonably set according to the dynamic performance and control accuracy of the system.
[0050] It can be understood that after obtaining the angle increment, the system adds it to the current angle output value or adjusts the angle output value according to the difference between the target motor angle and the current angle. The generated angle output value should take into account parameters such as the resolution and step angle of the motor to ensure that the motor can accurately rotate to the target position.
[0051] Step S20: Generate a current output value for the stepper motor based on the angle output value.
[0052] It can be understood that the angle output value is obtained from step S10, which represents the target angle or position that the stepper motor should rotate to. This angle output value is the basis for controlling the rotation of the stepper motor and determines the direction and magnitude of the torque that the motor needs to generate.
[0053] It is understandable that in a stepper motor, current is the direct cause of torque generation. By controlling the current flowing through the motor windings, the torque output of the motor can be controlled. The magnitude and direction of the current determine the magnitude and direction of the motor torque, thereby affecting the rotation speed and direction of the motor. Based on the angle output value, the control system needs to calculate the current output value that the stepper motor needs to generate in order to reach this target angle. This process may involve converting the angle output value into a current command, taking into account the electrical characteristics of the motor (such as resistance, inductance, etc.) and control strategies (such as microstep drive, constant current drive, etc.).
[0054] It should be noted that different current control strategies can be adopted according to different application requirements and motor characteristics. For example, in applications that require precise control of the motor position, a microstep drive strategy may be adopted to improve the position resolution and reduce vibration by subdividing the steps. In applications that require a constant torque output, a constant current drive strategy may be adopted to ensure a stable torque output of the motor throughout the rotation process.
[0055] It is understandable that once the current output value is calculated, the control system will output this value as a current command to the driver of the stepper motor. The driver controls the current flowing through the motor windings according to the received current command, thereby driving the motor to rotate to the target angle.
[0056] In a specific embodiment, the step of generating the current output value of the stepper motor based on the angle output value includes: collecting the three-phase current of the stepper motor based on the angle output value; generating the target torque of the stepper motor based on the three-phase current and the target phase current amplitude; generating the current output value of the stepper motor based on the target torque.
[0057] It is understandable that first, the system needs to determine the current working state and target position of the stepper motor according to the angle output value. Then, the system collects the three-phase current of the stepper motor, which are the current values flowing through each phase winding during the actual operation of the motor. Collecting the three-phase current is to understand the current electrical state of the motor and provide basic data for subsequent current control and torque calculation.
[0058] It is understandable that the system sets a target phase current amplitude, which is the ideal amplitude that each phase current should reach during the normal operation of the motor. By comparing the collected three-phase current with the target phase current amplitude, the system can calculate the difference between the actual torque generated by the motor and the ideal torque. Based on this difference, the system generates the target torque of the stepper motor, that is, the torque that the motor needs to generate in order to reach the target position or angle.
[0059] It is understandable that once the target torque is determined, the system needs to generate the corresponding current output value according to the electrical characteristics and control strategy of the motor. This process may involve converting the target torque into a current command, considering parameters such as the torque constant, resistance, and inductance of the motor. The generated current output value will be used as the input signal of the stepper motor driver to control the current flowing through the motor windings, thereby driving the motor to generate the required torque and rotate to the target position.
[0060] Specifically, the system can use a current closed-loop to collect the phase A current Ia and phase B current Ib of the motor. The target value of the direct-axis current Id is generally set to 0, and the target value of the quadrature-axis current Iq is set to the amplitude of the target phase current of the system, corresponding to the torque required by the motor. Under the above conditions of angle open-loop and current closed-loop, the system will output at a determined speed and phase current magnitude.
[0061] Step S30, detect the output quality of the current output value.
[0062] It should be noted that detecting the output quality of the current output value is to ensure that the current value output by the stepper motor control system meets the preset requirements. This is because in scenarios with large interference, it is indeed possible that the current output value is inaccurate due to current glitches. Specifically, a multimeter, oscilloscope, data acquisition system, or logic analyzer can be used.
[0063] It should be noted that current glitches are usually caused by factors such as electromagnetic interference, power supply noise, equipment failures, or measurement errors. These factors will cause short-term and irregular fluctuations in the current waveform, thereby affecting the accuracy of current sampling. Thus, to ensure the normal operation and precise control of the motor.
[0064] It is understandable that after obtaining the waveform of the current output value, it is possible to determine whether there are glitches by detecting the parameters of the waveform. Digital Signal Processing (DSP) technology can be used to automatically detect and identify glitches. For example, based on the fact that glitches usually manifest as sudden increases or decreases in amplitude, measure the peak and valley values of the waveform and the change range between them; for example, based on the fact that glitches may be periodic or random, analyze the periodicity and repeatability of the waveform; and based on the fact that glitches usually have a very fast rise or fall time, measure the time required for the waveform to change from low to high or from high to low. If a certain parameter (such as amplitude, rise time) exceeds the preset threshold, it may indicate the presence of glitches, that is, the output quality is low.
[0065] Step S40, when the output quality of the current output value is qualified, generate a first mapping relationship according to the angle output value and the current output value.
[0066] It should be noted that the qualified current output quality means that before generating the mapping relationship, it is necessary to ensure that the output quality of the current output value is qualified. This means that the current value is stable, accurate and consistent, without being affected by interference or spikes.
[0067] It can be understood that the purpose of generating the first mapping relationship is to establish the corresponding relationship between the angle output value and the current output value. This relationship can help us understand the current magnitude required by the motor at different angles, so as to provide data support for subsequent control strategies. The first mapping relationship can be used for fault diagnosis. When the current and angle relationship in actual operation does not match the mapping relationship, it may indicate that there is a fault or abnormality in the system.
[0068] Specifically, first, during the operation of the motor, record the angle output value and the current output value simultaneously. Ensure that the data is collected when the motor is running stably and the load conditions are relatively constant. Secondly, clean the collected data to remove outliers or noise. Normalize or standardize the data for subsequent analysis and modeling. Finally, use a suitable mathematical model or algorithm (such as linear regression, polynomial fitting, neural network, etc.) to fit the relationship between the angle output value and the current output value. Select the most suitable model according to the characteristics of the data and the requirements of the system to generate the mapping relationship.
[0069] In addition, an independent data set can also be used to verify the accuracy and reliability of the generated mapping relationship. Through actual operation tests, observe the performance of the motor when controlled according to the mapping relationship to further verify the effectiveness of the mapping relationship.
[0070] Step S50, when the offset value between the first mapping relationship and the standard mapping relationship exceeds the preset range, it is determined that the stepper motor is blocked.
[0071] It should be noted that during the operation of the motor, blocking is a common fault phenomenon, which means that the motor cannot rotate normally due to excessive load, mechanical jamming or other reasons. The purpose of step S50 is to judge whether the motor is blocked by comparing the first mapping relationship (the angle-current relationship in actual operation) and the standard mapping relationship (the theoretical or expected angle-current relationship).
[0072] It can be understood that the first mapping relationship reflects the angle-current characteristics of the motor in actual operation. The standard mapping relationship is established based on the theoretical model, design parameters or historical operation data of the motor, representing the angle-current relationship of the motor in the ideal state. The offset value refers to the difference or deviation between the first mapping relationship and the standard mapping relationship. It can be obtained by calculating the difference, ratio or other metric indicators between the two.
[0073] Specifically, this embodiment gives a specific implementation manner. Please refer toFigure 3 , Figure 3 This is a schematic diagram of the first mapping relationship provided by the first embodiment of the step motor stall detection method of this application. The triangular straight line is the given angle of the motor, and the dotted sine wave is the current when the motor is running normally, that is, the triangular straight line and the dotted sine wave form a standard mapping relationship; the solid sine wave is the current when the motor is stalled, that is, the triangular straight line and the solid sine wave form the first mapping relationship.
[0074] It should be noted that the zero crossing point of the sine does not necessarily coincide with the zero crossing point of the angle, but the current during normal operation undergoes a phase shift. By detecting this phase shift of the current, it can be determined whether the motor is stalled.
[0075] Therefore, the current phase can be detected when the angle passes through zero, as Figure 3 shown. When the motor is running normally, a certain phase relationship is maintained between the angle and the current.
[0076] At the zero crossing point of the angle (i.e., the inflection point of the triangular straight line), the current usually does not happen to be zero exactly, but has a specific value, which is much less than 0 (in the case of the sine wave shown in the figure, it means that the current is negative near the zero crossing point, but the absolute value is small). This is because during the operation of the motor, due to the action of inertia and electromagnetic force, the current will generate certain fluctuations and phase offsets when the angle changes, but generally maintains a coordinated change with the angle.
[0077] When the motor is stalled, due to reasons such as excessive load or mechanical jamming, the motor cannot rotate normally. This causes the current waveform to change. Especially at the zero crossing point of the angle, the value of the current will approach 0 (or decrease significantly compared to normal operation). This is because when stalled, the motor attempts to rotate but is hindered, and the electromagnetic force cannot be effectively converted into mechanical energy, resulting in a significant difference in the performance of the current at the zero crossing point of the angle compared to normal operation.
[0078] It can be understood that in this embodiment, the offset value can be the phase difference between the first mapping relationship and the standard mapping relationship, or the difference in current at the zero crossing point of the angle, which can be intuitively judged.
[0079] This embodiment provides a step motor stall detection method. By detecting the phase or specific value of the current when the angle passes through zero to generate a mapping relationship, it does not depend on a specific sensor type or accuracy. As long as the sensor can accurately measure the current and work in coordination with the control system, stall detection can be achieved. This reduces the requirements for the sensor and expands the application range.
[0080] At the same time, since the detection is carried out in real time during the operation of the motor without shutting down the drive output, the locked-rotor situation can be detected in a timely manner and measures can be taken. This helps prevent the motor from overheating or being damaged due to long-term locked-rotor, protecting the safety of the motor and the control system.
[0081] Compared with methods that rely on other indirect indicators (such as temperature, noise, etc.), this method is more direct and reliable. No additional hardware or complex algorithms are required to implement locked-rotor detection. Just add a current detection module and corresponding judgment logic to the existing motor control system, which simplifies the system design and reduces costs.
[0082] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar content as in the above-mentioned first embodiment can be referred to the above introduction and will not be elaborated hereinafter. On this basis, in the case where the output quality of the current output value is unqualified, how to determine whether the stepping motor is locked-rotor is given. Please refer to Figure 4 , Figure 4 which is a schematic flowchart provided for the second embodiment of the locked-rotor detection method of the stepping motor of the present application. After step S50, the locked-rotor detection method of the stepping motor further includes steps A10 to A30:
[0083] Step A10, when the output quality of the current output value is unqualified, obtain the space vector pulse width modulation waveform of the stepping motor.
[0084] It can be understood that when the output quality of the current output value is unqualified, it indicates that the operating state of the motor may have been abnormal, and at this time, other methods need to be used to determine the locked-rotor. Space vector pulse width modulation (SVPWM) is a commonly used motor control strategy that controls the output of the motor by adjusting the pulse width of the three-phase inverter. In this step, the system obtains the SVPWM waveform of the stepping motor as the basis for subsequent analysis.
[0085] Step A20, based on the space vector pulse width modulation waveform, obtain the pulse width relationship of any two phases.
[0086] It can be understood that the SVPWM waveform is composed of the pulse widths of three phases, and there is a certain relationship between them, which is stable when the motor is operating normally. In this step, the system analyzes the SVPWM waveform, extracts the pulse widths of any two phases such as the U phase and the V phase, and calculates the relationship between them such as ratio, difference, etc.
[0087] Step A30, when the pulse width relationship does not match the preset pulse width relationship, it is determined that the stepping motor has a locked-rotor.
[0088] It can be understood that the preset pulse width relationship is obtained based on historical data or theoretical calculations during the normal operation of the motor, representing the pulse width relationship of the motor under ideal conditions. When the actually measured pulse width relationship does not match the preset pulse width relationship, it indicates that the operating state of the motor has changed significantly, which may be caused by stalling, excessive load, or other faults. In this case, the system determines that the stepper motor has stalled and triggers corresponding alarm or protection measures.
[0089] In one embodiment, step A30 includes: parsing the pulse width relationship to obtain the action time of the two-phase pulse widths at the current zero-crossing point; performing a mapping comparison based on the action time and the preset pulse width relationship; and when the action time does not coincide with the preset pulse width relationship, determining that the stepper motor has stalled.
[0090] It can be understood that after obtaining the pulse width relationship of any two phases (such as phase U and phase V), it is necessary to further analyze the specific action time of these pulse widths within the motor operating cycle. In particular, attention should be paid to the action time of the pulse widths at the current zero-crossing point, because the current zero-crossing point is a key node in the motor operating cycle, and the pulse width relationship at this time can reflect the operating state of the motor. Through precise measurement and calculation, the specific action time of the two-phase pulse widths at the current zero-crossing point is obtained.
[0091] It can be understood that the preset pulse width relationship describes what the action time of the two-phase pulse widths should be at the current zero-crossing point under ideal conditions for the motor. Performing a mapping comparison between the actually measured action time and the preset pulse width relationship, that is, comparing the difference between the actually measured value and the ideal value. If the actually measured action time does not coincide with the preset pulse width relationship, it indicates that the operating state of the motor has deviated from the ideal state. In this case, the system determines that the stepper motor has stalled.
[0092] Specifically, please refer to Figure 5 , Figure 5 which is the space vector pulse width modulation waveform diagram of the stepper motor stall detection method provided in the second embodiment of the present application.
[0093] It can be understood that the three lines respectively represent the SVPWM output waveforms of the three phases U, V, and W of the motor. Demux3 / 1 represents the current waveform of the motor, which reflects the current change situation of the motor during operation. The current waveform is an important indicator of the motor operating state, and the operating state of the motor can be judged by analyzing the characteristics of the current waveform.
[0094] In Figure 5As can be seen, at the current zero-crossing point, for two phases of the motor, namely the first line 1 (U-phase) and the third line 3 (W-phase), there is a special chopping coincidence phenomenon near the current zero-crossing point. This means that near the current zero-crossing point, the pulse widths of these two phases are almost equal, and their switching states change almost simultaneously. At the same time, before the current zero-crossing, the pulse width of the first line 1 (U-phase) is less than that of the third line 3 (W-phase); after the current zero-crossing, the pulse width of the first line 1 is greater than that of the third line 3.
[0095] Furthermore, at 0° of the motor, the pulse widths of the first line 1 (U-phase) and the third line 3 (W-phase) of the two-phase waveform are judged. Under normal circumstances, the pulse width of the first line 1 is less than that of the third line 3. If the motor is blocked, the pulse widths of the first line 1 and the third line 3 of the output are judged again at 0° of the motor. At this time, since the motor cannot rotate, the control strategy changes, resulting in the pulse width of the first line 1 being greater than that of the third line 3.
[0096] Among them, when the motor is blocked, since the motor cannot rotate, its load will increase sharply. The control strategy will detect this load change and try to overcome the blockage by adjusting the pulse widths of each phase. At 0°, since the motor is in a blocked state, the control strategy will adjust the pulse widths of the U-phase and the W-phase to generate a greater electromagnetic torque and try to make the motor rotate. This will result in the pulse width of the U-phase being greater than that of the W-phase because the control strategy tries to overcome the blockage by increasing the current of the U-phase.
[0097] In this embodiment, based on the SVPWM control strategy, judging the running state of the motor by analyzing the change of the pulse width relationship supplements the judgment of blockage in the case where the current output value is interfered. This method can be executed under this judgment condition or can be carried out simultaneously with the mapping relationship judgment in the first embodiment to achieve a comprehensive judgment of blockage, improving the accuracy and reliability of the blockage judgment.
[0098] Based on the above content of the present application, in the third embodiment of the present application, for the same or similar content as the above embodiment, reference can be made to the above introduction and will not be elaborated hereinafter. On this basis, when the output quality of the current output value is unqualified, in addition to the above method, how to judge whether the stepping motor is blocked is given. Please refer to Figure 6 , Figure 6 is the flow diagram provided for the third embodiment of the stepping motor blockage detection method of the present application. After step S50, the stepping motor blockage detection method further includes steps B10 to B30:
[0099] Step B10, when the output quality of the current output value is unqualified, obtain the direct-axis current and the quadrature-axis current of the stepping motor.
[0100] It is understandable that first, the direct-axis current (Id) and quadrature-axis current (Iq) of the stepper motor need to be obtained. These two current components can be obtained through the current sensors of the motor controller or estimation algorithms. The direct-axis current and quadrature-axis current are important parameters in motor control. They reflect the current distribution of the motor in the d-q coordinate system and are closely related to the performance of the motor such as torque and power factor.
[0101] Step B20: Generate a voltage output value for the stepper motor based on the direct-axis current and quadrature-axis current.
[0102] It is understandable that by using the obtained direct-axis current and quadrature-axis current, combined with the control strategy and parameters of the motor (such as motor inductance, resistance, etc.), a voltage output value for the stepper motor can be generated. This voltage output value is calculated based on the current state of the motor and the control strategy, and it reflects the expected voltage output of the motor under the given current.
[0103] It is understandable that when the motor is blocked, due to the existence of the current closed-loop control system, the dynamic behavior of the motor will be significantly affected, especially the parameters related to the d-axis (direct axis), such as magnetic flux linkage, current, and voltage.
[0104] It is understandable that when the motor is operating normally, a back electromotive force (Back EMF) will be generated, which is proportional to the speed of the motor. When the motor is blocked, the speed drops to zero, and the back electromotive force also disappears or decreases significantly. The change in the back electromotive force will directly affect the magnetic flux linkage of the motor, especially the d-axis magnetic flux linkage. The magnetic flux linkage is a measure of the magnetic field strength of the motor and is related to the current and inductance. In the case of blocking, due to the decrease in the back electromotive force, the d-axis magnetic flux linkage will change.
[0105] It is understandable that when the d-axis magnetic flux linkage changes, in order to maintain the stability of the magnetic flux, the current closed-loop control system will adjust the d-axis current. In the current closed-loop control system, voltage is used to adjust the current to reach the expected value. When the d-axis current changes, the current controller will adjust the d-axis voltage output voltage Ud to maintain the stability of the current.
[0106] It should be noted that the calculation formula for the voltage output value of the stepper motor is:
[0107]
[0108] The system can generate the voltage output value of the stepper motor according to the above formula.
[0109] Step B30: When the offset value between the voltage output value and the calibrated voltage value exceeds the preset range, it is determined that the stepper motor is blocked.
[0110] It can be understood that the calibrated voltage value is the expected voltage value preset according to the design parameters and control strategy of the motor when the motor is running normally. Calculate the offset value between the calculated voltage output value and the calibrated voltage value, and determine whether this offset value exceeds the preset range. If the offset value exceeds the preset range, it indicates that there is a significant difference between the actual voltage output of the motor and the expected voltage output, which may be caused by the motor being blocked. Therefore, it can be determined that the stepper motor has a stall.
[0111] In this embodiment, by introducing the monitoring and analysis of the direct-axis (D-axis) current and related voltage output of the stepper motor, the accuracy of judging the stall state of the motor is effectively improved when the quality of the current output value is unqualified. Similarly, this method can be executed under this judgment condition or simultaneously with the judgment methods of Embodiment 1 or Embodiment 2 to achieve a comprehensive judgment of the stall, improving the accuracy and reliability of the stall judgment.
[0112] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the stepper motor stall detection method of this application. Based on this technical concept, more forms of simple transformations are within the protection scope of this application.
[0113] This application also provides a stepper motor stall detection device. Please refer to Figure 7 The stepper motor stall detection device includes: an operation module 10 that generates an angle output value of the stepper motor based on the target motor angle; generates a current output value of the stepper motor based on the angle output value; a detection module 20 that detects the output quality of the current output value; a control module 30 that generates a first mapping relationship according to the angle output value and the current output value when the output quality of the current output value is qualified; and determines that the stepper motor has a stall when the offset value between the first mapping relationship and the standard mapping relationship exceeds the preset range.
[0114] The stepper motor stall detection device provided by this application adopts the stepper motor stall detection method in the above embodiment, which can solve the technical problem that the existing stepper motor stall detection needs to turn off the drive output and is restricted by sensors. Compared with the prior art, the beneficial effects of the stepper motor stall detection device provided by this application are the same as those of the stepper motor stall detection method provided by the above embodiment, and the other technical features in the stepper motor stall detection device are the same as the features disclosed in the above embodiment method, so they will not be elaborated here.
[0115] The present application provides a stepping motor stall detection device. The stepping motor stall detection device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the stepping motor stall detection method in Embodiment 1 above.
[0116] Reference is made below Figure 8 to, which shows a schematic structural diagram of a stepping motor stall detection device suitable for implementing the embodiments of the present application. The stepping motor stall detection device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions: tablet computers), PMPs (Portable Media Players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The stepping motor stall detection device shown is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0117] As Figure 8 shown, the stepping motor stall detection device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can execute various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. In the random access memory 1004, various programs and data required for the operation of the stepping motor stall detection device are also stored. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. An input / output interface 1006 is also connected to the bus. Generally, the following systems may be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the stepping motor stall detection device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a stepping motor stall detection device having various systems, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems may be alternatively implemented or had.
[0118] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by a processing device 1001, the above functions defined in the methods of the embodiments disclosed in the present application are executed.
[0119] The step motor stall detection device provided by the present application adopts the step motor stall detection method in the above embodiment, and can solve the technical problems that the stall detection of the existing step motor requires the drive output to be turned off and is limited by sensors. Compared with the prior art, the beneficial effects of the step motor stall detection device provided by the present application are the same as those of the step motor stall detection method provided by the above embodiment, and other technical features in the step motor stall detection device are the same as the features disclosed in the method of the previous embodiment, which will not be elaborated here.
[0120] It should be understood that the various parts disclosed in the present application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0121] As described above, only the specific embodiments of the present application are provided, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, and all should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0122] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the step motor stall detection method in the above embodiment.
[0123] The computer-readable storage medium provided by the present application may, for example, be a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium can be transmitted by any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0124] The above computer-readable storage medium may be included in the stepping motor stall detection device; or it may exist separately without being assembled into the stepping motor stall detection device.
[0125] The above computer-readable storage medium carries one or more programs. When the one or more programs are executed by the stepping motor stall detection device, the stepping motor stall detection device is caused to: generate an angle output value of the stepping motor based on a target motor angle; generate a current output value of the stepping motor based on the angle output value; detect the output quality of the current output value; generate a first mapping relationship according to the angle output value and the current output value when the output quality of the current output value is qualified; and determine that the stepping motor is stalled when the offset value between the first mapping relationship and the standard mapping relationship exceeds a preset range.
[0126] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, by connecting through the Internet using an Internet service provider).
[0127] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of the code, and this module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutively represented blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0128] The modules described in the embodiments of this application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation to the unit itself in some cases.
[0129] The readable storage medium provided by this application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for performing the above-mentioned stepping motor stall detection method, and can solve the technical problem that the stall detection of the existing stepping motor requires turning off the drive output and is restricted by sensors. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by this application are the same as those of the stepping motor stall detection method provided by the above embodiments, and will not be elaborated here.
[0130] The present application also provides a computer program product, including a computer program which, when executed by a processor, implements the steps of the above-described stepping motor stall detection method.
[0131] The computer program product provided by the present application can solve the technical problem that the stall detection of the existing stepping motor requires the closing of the drive output and is restricted by sensors. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the stepping motor stall detection method provided by the above embodiments, and will not be elaborated here.
[0132] The above are only partial embodiments of the present application, and thus do not limit the patent scope of the present application. Any equivalent structural transformation made under the technical concept of the present application by using the content of the specification and drawings of the present application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.
Claims
1. A stepper motor stall detection method, characterized in that: The stepper motor stall detection method comprises: Based on the target motor angle, generate the angle output value of the stepper motor; Based on the angle output value, generating a current output value of the stepper motor; detecting an output quality of the current output value; When the output quality of the current output value is qualified, generating a first mapping relationship according to the angle output value and the current output value; When the offset value between the first mapping relationship and the standard mapping relationship exceeds a preset range, it is determined that the stepper motor is stalled.
2. The stepper motor stall detection method according to claim 1, characterized in that: The step of generating the angle output value of the stepper motor based on the target motor angle includes: Detect the working status of the stepper motor; When the working state of the stepper motor is an angle forced output state, obtaining a target motor angle and a target speed; Based on the target rotation speed, obtaining an angle increment; Based on the angle increment and the target motor angle, an angle output value of the stepper motor is generated.
3. The stepper motor stall detection method according to claim 1, characterized in that: The step of generating the current output value of the stepper motor based on the angle output value comprises: Based on the angle output value, collecting the three-phase current of the stepper motor; generating a target torque of the stepper motor based on the three-phase current and the target phase current amplitude; Based on the target torque, a current output value of the stepper motor is generated.
4. The stepper motor stall detection method according to claim 3, characterized in that: After the step of determining that the stepper motor is stalled when the offset value between the first mapping relationship and the standard mapping relationship exceeds a preset range, the method further includes: When the output quality of the current output value is unqualified, obtaining a space vector pulse width modulation waveform of the stepper motor; Based on the space vector pulse width modulation waveform, obtaining a pulse width relationship between any two phase pulse widths; When the pulse width relationship does not match the preset pulse width relationship, it is determined that the stepper motor is stalled.
5. The stepper motor stall detection method according to claim 4, characterized in that: When the pulse width relationship does not match the preset pulse width relationship, the step of determining that the stepper motor is stalled includes: Analyze the pulse width relationship to obtain the action time of the two-phase pulse width when the current passes through the zero point; Performing mapping comparison based on the relationship between the action time and the preset pulse width; When the action time does not coincide with the preset pulse width, it is determined that the stepper motor is stalled.
6. The stepper motor stall detection method according to claim 1, characterized in that: After the step of determining that the stepper motor is stalled when the phase offset value between the first mapping relationship and the standard mapping relationship exceeds a preset range, the method further includes: When the output quality of the current output value is unqualified, obtaining the direct-axis current and the quadrature-axis current of the stepper motor; Based on the direct-axis current and the quadrature-axis current, generating a voltage output value of the stepper motor; When the offset value between the voltage output value and the calibrated voltage value exceeds a preset range, it is determined that the stepper motor is stalled.
7. A stepper motor stall detection device, characterized in that: The stepper motor stall detection device comprises: A calculation module, based on the target motor angle, generates an angle output value of the stepper motor; based on the angle output value, generates a current output value of the stepper motor; A detection module, detecting the output quality of the current output value; The control module generates a first mapping relationship according to the angle output value and the current output value when the output quality of the current output value is qualified; and determines that the stepper motor is blocked when the offset value between the first mapping relationship and the standard mapping relationship exceeds a preset range.
8. A stepper motor stall detection device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the stepper motor stall detection method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the stepper motor stall detection method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the stepper motor stall detection method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Air valve driving method, controller and air valve driving device
CN120650498A