A control method and device of a stepper motor, an electronic device, and a storage medium

CN117040323BActive Publication Date: 2026-10-20TOLL MICROELECTRONIC CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311047631.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-18
Publication Date
2026-10-20
Estimated Expiration
2043-08-18

AI Technical Summary

Technical Problem

但是固定时间比例的混合衰减模式不能保证步进电机电流纹波的一致性

Benefits of technology

[0045]本申请实施例提供的一种步进电机的控制方法、装置、电子设备及存储介质,控制方法包括:目标步进电机启动后,对目标步进电机的线圈电流进行实时采样;根据采样得到的目标步进电机的线圈电流,确定目标步进电机的当前工况以及确定是否需要对目标步进电机的线圈电流进行调节;当确定需要进行调节时,根据确定的目标步进电机的当前工况,确定当前工况对应的目标混合衰减模式;根据目标混合衰减模式对目标步进电机的线圈电流进行调节。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117040323B_ABST
    Figure CN117040323B_ABST
Patent Text Reader

Abstract

The application provides a control method and device of a stepper motor, electronic equipment and a storage medium. The control method comprises: after a target stepper motor is started, sampling a coil current of the target stepper motor in real time; determining a current working condition of the target stepper motor and determining whether the coil current of the target stepper motor needs to be adjusted according to the sampled coil current of the target stepper motor; when it is determined that the adjustment is needed, determining a target hybrid attenuation mode corresponding to the current working condition according to the determined current working condition of the target stepper motor; and adjusting the coil current of the target stepper motor according to the target hybrid attenuation mode. Through the scheme of the application, automatic switching of the optimal hybrid attenuation mode under different working conditions is realized, the current ripple controllability and current ripple consistency requirements of the stepper motor under full working conditions are guaranteed, and the experimental difficulty and complexity are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of motor control technology, and in particular to a control method, device, electronic equipment and storage medium for a stepper motor. Background Technology

[0002] Most stepper motor drivers on the market today achieve full-step and micro-step operation by controlling the stepper motor current. Precise control of the stepper motor current ripple can improve the positioning accuracy of micro-step operation and reduce torque pulsation and operating noise.

[0003] Based on the decay mode of stepper motors, current stepper motor current control schemes can be divided into slow decay schemes, fast decay schemes, and hybrid decay schemes. Hybrid decay combines slow and fast decay modes in a specific time ratio, accommodating both high and low speed operation of the stepper motor. A typical example is TRINAMIC's multi-segment time-ratio hybrid decay scheme. However, a fixed-time-ratio hybrid decay mode cannot guarantee the consistency of the stepper motor current ripple. Furthermore, accurate prediction of the time ratio in a hybrid decay mode requires additional controllers or observers, further increasing the complexity and implementation difficulty of the scheme. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a control method, device, electronic device and storage medium for a stepper motor, which realizes the automatic switching of the optimal mixed attenuation mode under different operating conditions, ensures the controllability and consistency of current ripple under all operating conditions of the stepper motor, and reduces the experimental difficulty and complexity.

[0005] This application provides a stepper motor control method, the control method including:

[0006] After the target stepper motor is started, the coil current of the target stepper motor is sampled in real time;

[0007] Based on the sampled coil current of the target stepper motor, determine the current operating condition of the target stepper motor and whether it is necessary to adjust the coil current of the target stepper motor.

[0008] When it is determined that adjustment is required, the target hybrid attenuation mode corresponding to the current operating condition of the target stepper motor is determined according to the current operating condition of the target stepper motor. The hybrid attenuation mode is different for different operating conditions. The hybrid attenuation mode is set with an attenuation execution order including at least one slow attenuation and at least one fast attenuation, as well as the start current threshold and end current threshold corresponding to each stage of attenuation.

[0009] The coil current of the target stepper motor is adjusted according to the target hybrid attenuation mode.

[0010] Optionally, the current operating conditions include: low-speed steady-state operation, high-speed steady-state operation, acceleration operation, and deceleration operation.

[0011] Optionally, when the target stepper motor is currently operating in a high-speed steady-state state, the target hybrid attenuation mode corresponding to the current operating condition is:

[0012] The execution order set in the target hybrid decay mode is slow decay first, then fast decay, and then slow decay executed consecutively.

[0013] The starting current threshold of the first stage of slow decay is higher than the preset target current value by a first multiple of the preset monitoring current value. The ending current threshold of the first stage of slow decay is higher than the preset target current value by a second multiple of the preset monitoring current value. The starting current threshold of the second stage of slow decay is lower than the preset target current value by a second multiple of the preset monitoring current value. The ending current threshold of the second stage of slow decay is lower than the preset target current value by a first multiple of the preset monitoring current value.

[0014] Optionally, when the target stepper motor is currently operating in a low-speed steady-state state, the target hybrid attenuation mode corresponding to the current operating condition is:

[0015] The execution order set in the target hybrid decay mode is slow decay first, then fast decay, and then slow decay executed consecutively.

[0016] The starting current threshold of the first stage of slow decay is higher than the second multiple of the preset target current value and the preset monitoring current value. The ending current threshold of the first stage of slow decay is higher than the first multiple of the preset target current value and the preset monitoring current value. The starting current threshold of the second stage of slow decay is lower than the first multiple of the preset target current value and the preset monitoring current value. The ending current threshold of the second stage of slow decay is lower than the second multiple of the preset target current value and the preset monitoring current value.

[0017] Optionally, when the target stepper motor is currently operating in an acceleration mode, the target hybrid attenuation mode corresponding to the current operating mode is:

[0018] The execution order set in the target hybrid decay mode is slow decay first, then fast decay, and then slow decay executed consecutively.

[0019] The starting current threshold of the first stage of slow decay is higher than the second multiple of the preset target current value and the preset monitoring current value. The ending current threshold of the first stage of slow decay is higher than the third multiple of the preset target current value and the preset monitoring current value. The starting current threshold of the second stage of slow decay is lower than the second multiple of the preset target current value and the preset monitoring current value. The ending current threshold of the second stage of slow decay is lower than the first multiple of the preset target current value and the preset monitoring current value.

[0020] Optionally, when the target stepper motor is currently operating in a deceleration mode, the target hybrid attenuation mode corresponding to the current operating mode is:

[0021] The execution order set in the target hybrid decay mode is slow decay first, then fast decay, and then slow decay executed consecutively.

[0022] The starting current threshold of the first stage of slow decay is higher than the preset target current value by a first multiple of the preset monitoring current value, and the ending current threshold of the first stage of slow decay is equal to the preset target current value. The starting current threshold of the second stage of slow decay is lower than the preset target current value by a first multiple of the preset monitoring current value, and the ending current threshold of the second stage of slow decay is lower than the preset target current value by a second multiple of the preset monitoring current value.

[0023] Optionally, after adjusting the coil current of the target stepper motor according to the target hybrid attenuation mode, the control method further includes: activating the drive mode of the target stepper motor, sampling the coil current of the target stepper motor in real time, re-determining the current operating condition of the target stepper motor, and determining whether the coil current of the target stepper motor needs to be adjusted.

[0024] This application embodiment also provides a stepper motor control device, the control device comprising:

[0025] The sampling module is used to sample the coil current of the target stepper motor in real time after the target stepper motor is started.

[0026] The first determining module is used to determine the current operating condition of the target stepper motor and whether the coil current of the target stepper motor needs to be adjusted based on the sampled coil current of the target stepper motor.

[0027] The second determining module is used to determine the target hybrid attenuation mode corresponding to the current operating condition of the target stepper motor when it is determined that adjustment is required; wherein, the hybrid attenuation mode is different for different operating conditions, and the hybrid attenuation mode is set with an attenuation execution order including at least one slow attenuation and at least one fast attenuation, as well as the starting current threshold and ending current threshold corresponding to each stage of attenuation.

[0028] An adjustment module is used to adjust the coil current of the target stepper motor according to the target hybrid attenuation mode.

[0029] Optionally, the current operating conditions include: low-speed steady-state operation, high-speed steady-state operation, acceleration operation, and deceleration operation.

[0030] Optionally, when the target stepper motor is currently operating in a high-speed steady-state state, the target hybrid attenuation mode corresponding to the current operating condition is:

[0031] The execution order set in the target hybrid decay mode is slow decay first, then fast decay, and then slow decay executed consecutively.

[0032] The starting current threshold of the first stage of slow decay is higher than the preset target current value by a first multiple of the preset monitoring current value. The ending current threshold of the first stage of slow decay is higher than the preset target current value by a second multiple of the preset monitoring current value. The starting current threshold of the second stage of slow decay is lower than the preset target current value by a second multiple of the preset monitoring current value. The ending current threshold of the second stage of slow decay is lower than the preset target current value by a first multiple of the preset monitoring current value.

[0033] Optionally, when the target stepper motor is currently operating in a low-speed steady-state state, the target hybrid attenuation mode corresponding to the current operating condition is:

[0034] The execution order set in the target hybrid decay mode is slow decay first, then fast decay, and then slow decay executed consecutively.

[0035] The starting current threshold of the first stage of slow decay is higher than the second multiple of the preset target current value and the preset monitoring current value. The ending current threshold of the first stage of slow decay is higher than the first multiple of the preset target current value and the preset monitoring current value. The starting current threshold of the second stage of slow decay is lower than the first multiple of the preset target current value and the preset monitoring current value. The ending current threshold of the second stage of slow decay is lower than the second multiple of the preset target current value and the preset monitoring current value.

[0036] Optionally, when the target stepper motor is currently operating in an acceleration mode, the target hybrid attenuation mode corresponding to the current operating mode is:

[0037] The execution order set in the target hybrid decay mode is slow decay first, then fast decay, and then slow decay executed consecutively.

[0038] The starting current threshold of the first stage of slow decay is higher than the second multiple of the preset target current value and the preset monitoring current value. The ending current threshold of the first stage of slow decay is higher than the third multiple of the preset target current value and the preset monitoring current value. The starting current threshold of the second stage of slow decay is lower than the second multiple of the preset target current value and the preset monitoring current value. The ending current threshold of the second stage of slow decay is lower than the first multiple of the preset target current value and the preset monitoring current value.

[0039] Optionally, when the target stepper motor is currently operating in a deceleration mode, the target hybrid attenuation mode corresponding to the current operating mode is:

[0040] The execution order set in the target hybrid decay mode is slow decay first, then fast decay, and then slow decay executed consecutively.

[0041] The starting current threshold of the first stage of slow decay is higher than the preset target current value by a first multiple of the preset monitoring current value, and the ending current threshold of the first stage of slow decay is equal to the preset target current value. The starting current threshold of the second stage of slow decay is lower than the preset target current value by a first multiple of the preset monitoring current value, and the ending current threshold of the second stage of slow decay is lower than the preset target current value by a second multiple of the preset monitoring current value.

[0042] Optionally, the control device further includes a startup module, which is used to: after adjusting the coil current of the target stepper motor according to the target hybrid attenuation mode, start the drive mode of the target stepper motor, and sample the coil current of the target stepper motor in real time, redetermine the current operating condition of the target stepper motor, and determine whether the coil current of the target stepper motor needs to be adjusted.

[0043] This application also provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the control method described above are performed.

[0044] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the control method described above.

[0045] This application provides a stepper motor control method, device, electronic device, and storage medium. The control method includes: after the target stepper motor starts, sampling the coil current of the target stepper motor in real time; determining the current operating condition of the target stepper motor and whether the coil current of the target stepper motor needs to be adjusted based on the sampled coil current; when it is determined that adjustment is needed, determining the target hybrid attenuation mode corresponding to the current operating condition based on the determined current operating condition of the target stepper motor; and adjusting the coil current of the target stepper motor according to the target hybrid attenuation mode.

[0046] In this way, by setting the same interval value for the target current threshold, this application ensures the symmetry of the target stepper motor current ripple and the control accuracy of the coil current of the target stepper motor. By automatically switching the optimal hybrid attenuation mode under different operating conditions, the controllability and consistency of the current ripple under all operating conditions of the stepper motor are guaranteed, and the experimental difficulty and complexity are reduced, thereby enabling accurate control of the target stepper motor current ripple within a short period of time.

[0047] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0048] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 A flowchart illustrating a stepper motor control method provided in this application embodiment;

[0050] Figure 2 A schematic diagram of the current path in the drive mode of a stepper motor during operation, provided in this application;

[0051] Figure 3 A schematic diagram of the current path in the slow decay mode of a stepper motor during operation, provided in this application;

[0052] Figure 4 A schematic diagram of the current path in the fast decay mode of a stepper motor during operation, provided in this application;

[0053] Figure 5 This application provides a schematic diagram of the current control waveform of a stepper motor during low-speed steady-state operation;

[0054] Figure 6 This application provides a schematic diagram of the current control waveform of a stepper motor during high-speed steady-state operation;

[0055] Figure 7 This application provides a schematic diagram of a stepper motor current control waveform during accelerated operation;

[0056] Figure 8 This application provides a schematic diagram of the current control waveform of a stepper motor during deceleration.

[0057] Figure 9 This application provides a schematic diagram of the control process of a stepper motor.

[0058] Figure 10 This is one of the structural schematic diagrams of the stepper motor control device provided in the embodiments of this application;

[0059] Figure 11 This is a second schematic diagram of the control device for the stepper motor provided in an embodiment of this application.

[0060] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0061] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this application.

[0062] Most stepper motor drivers on the market today achieve full-step and micro-step operation by controlling the stepper motor current. Precise control of the stepper motor current ripple can improve the positioning accuracy of micro-step operation and reduce torque pulsation and operating noise.

[0063] Based on the decay mode of stepper motors, current stepper motor current control schemes can be divided into slow decay schemes, fast decay schemes, and hybrid decay schemes. Hybrid decay combines slow and fast decay modes in a specific time ratio, accommodating both high and low speed operation of the stepper motor. A typical example is TRINAMIC's multi-segment time-ratio hybrid decay scheme. However, a fixed-time-ratio hybrid decay mode cannot guarantee the consistency of the stepper motor current ripple. Furthermore, accurate prediction of the time ratio in a hybrid decay mode requires additional controllers or observers, further increasing the complexity and implementation difficulty of the scheme.

[0064] Based on this, the embodiments of this application provide a stepper motor control method, device, electronic device and storage medium, which realizes automatic switching of the optimal hybrid attenuation mode under different operating conditions, ensures the controllability of current ripple and the consistency of current ripple under all operating conditions of the stepper motor, and reduces the experimental difficulty and complexity.

[0065] Please see Figure 1 , Figure 1 This is a flowchart illustrating a stepper motor control method provided in an embodiment of this application.

[0066] like Figure 1 As shown in the embodiments of this application, the control method includes:

[0067] S101. After the target stepper motor is started, the coil current of the target stepper motor is sampled in real time.

[0068] S102. Based on the sampled coil current of the target stepper motor, determine the current operating condition of the target stepper motor and determine whether the coil current of the target stepper motor needs to be adjusted.

[0069] S103. When it is determined that adjustment is required, the target hybrid attenuation mode corresponding to the current operating condition of the target stepper motor is determined according to the current operating condition of the target stepper motor.

[0070] S104. Adjust the coil current of the target stepper motor according to the target hybrid attenuation mode.

[0071] The stepper motor control method provided in this application sample the coil current of the target stepper motor in real time after it starts. Based on the sampled coil current, the current operating condition of the target stepper motor is determined, and the real-time coil current is adjusted to ensure normal and efficient operation. When adjustment is required, a corresponding hybrid attenuation mode is determined based on the operating condition, enabling automatic switching of the optimal hybrid attenuation mode under different operating conditions. This ensures controllable and consistent current ripple across all operating conditions, further reducing experimental difficulty and complexity.

[0072] The following description Figure 1 The execution method for each step is shown.

[0073] First, regarding step S101:

[0074] The target stepper motor is a motor used in equipment or fields such as 3D printers, robots, laser engraving machines, industrial robots, smart curtains, smart doors and windows, smart security equipment, surgical robots, radiotherapy machines, car seat control, car rearview mirror control, car window control, car headlight control, and car air conditioning damper control. The target stepper motor includes at least one set of coils.

[0075] The real-time sampling of the coil current of the target stepper motor can be achieved by sampling the current of each group of coils of the target stepper motor in real time, thereby enabling the adjustment of the current of each group of coils separately.

[0076] It should be noted that the target stepper motor is in drive mode when it is first started.

[0077] Then, regarding step S102:

[0078] Here, the current operating conditions include: low-speed steady-state operation, high-speed steady-state operation, acceleration operation, and deceleration operation. Based on the sampled coil current of the target stepper motor, the current operating condition of the target stepper motor is determined to be one of the above four types.

[0079] Specifically, the current operating condition of the target stepper motor is determined based on the sampled coil current. This can be achieved by determining the coil change rate based on the sampled coil current, and then determining the current operating condition of the target stepper motor based on the determined coil change rate.

[0080] The step of determining whether to adjust the coil current of the target stepper motor based on the sampled coil current can be achieved by: determining whether the real-time coil current of the target stepper motor is greater than a first current threshold; if it is greater, adjustment is required; otherwise, no adjustment is required. When no adjustment is required, the motor continues to operate in the current working mode, which is typically the drive mode.

[0081] For an example, please refer to Figure 2 , Figure 2 This is a schematic diagram illustrating the current path in the drive mode of a stepper motor during operation, as provided in this application. Figure 2 As shown, this circuit is the control circuit for one phase of a stepper motor. DC is a direct current voltage source, S1, S2, S3, and S4 are four power electronic switches in the H-bridge circuit, and L represents a phase winding of the stepper motor. In drive mode, switches S1 and S4 are turned on, and the actual current of the stepper motor increases rapidly to follow the externally given current value. The externally given current value can be either dynamic or static.

[0082] Then, regarding step S103:

[0083] Here, the hybrid attenuation mode is different for different operating conditions. The hybrid attenuation mode is set with an attenuation execution order including at least one slow attenuation and at least one fast attenuation, as well as the start current threshold and end current threshold corresponding to each stage of attenuation.

[0084] Specifically, the starting current threshold and ending current threshold corresponding to each stage of decay are: the starting current threshold and ending current threshold corresponding to each stage of fast decay and slow decay; the ending current threshold of the previous stage is the starting current threshold of the next stage.

[0085] Slow decay is equivalent to the voltage across the motor windings disappearing, then short-circuiting the positive and negative terminals of the motor. Fast decay is equivalent to the voltage across the motor windings disappearing, then quickly connecting a current opposite to the drive current to the motor. For an example, please refer to [link to example]. Figure 3 , Figure 4 , Figure 3 This application provides a schematic diagram of the current path in the slow decay mode of a stepper motor during operation. Figure 4 This application provides a schematic diagram of the current path in the fast decay mode of a stepper motor during operation, as shown below. Figure 3 As shown, when operating in slow decay mode, switches S2 and S4 are turned on, and the freewheeling current of the winding inductor causes the actual current of the stepper motor to change slowly, including a slow increase or a slow decrease. Figure 4As shown, when operating in fast decay mode, switches S2 and S3 are turned on, and the actual current of the stepper motor will decrease rapidly.

[0086] In step S103, the number of slow attenuation points and the number of fast attenuation points in the hybrid attenuation mode can be the same or different. This embodiment uses different settings.

[0087] For example, assuming the first preset quantity is 2 and the second preset quantity is 1, the execution order of slow decay and fast decay in the hybrid decay mode can be slow decay, fast decay, and slow decay. This combination mode can better guarantee the current control accuracy of the stepper motor driver when given any current value (including when given zero current value).

[0088] In each operating condition, the execution order of slow decay and fast decay is the same in the hybrid decay mode.

[0089] In step S103, for each hybrid attenuation mode, the end current threshold of the previous stage of attenuation in the hybrid attenuation mode is the start current threshold of the next stage of attenuation. The start current threshold and end current threshold of the same type of attenuation in different stages of the same hybrid attenuation mode are different.

[0090] In one embodiment provided in this application, when the target stepper motor is currently operating in a high-speed steady-state state, the target hybrid attenuation mode corresponding to the current operating state is as follows: the execution order set in the target hybrid attenuation mode is a sequence of slow attenuation, fast attenuation, and slow attenuation executed consecutively; the starting current threshold of the slow attenuation in the first stage is higher than a preset target current value by a first multiple of a preset monitoring current value, the ending current threshold of the slow attenuation in the first stage is higher than a preset target current value by a second multiple of a preset monitoring current value, the starting current threshold of the slow attenuation in the second stage is lower than a preset target current value by a second multiple of a preset monitoring current value, and the ending current threshold of the slow attenuation in the second stage is lower than a preset target current value by a first multiple of a preset monitoring current value.

[0091] In another embodiment provided in this application, when the target stepper motor is currently operating in a low-speed steady-state state, the target hybrid attenuation mode corresponding to the current operating state is as follows: the execution order set in the target hybrid attenuation mode is a sequence of slow attenuation, fast attenuation, and slow attenuation executed consecutively; the starting current threshold of the slow attenuation in the first stage is higher than the second multiple of the preset target current value and the ending current threshold of the slow attenuation in the first stage is higher than the first multiple of the preset target current value and the starting current threshold of the slow attenuation in the second stage is lower than the first multiple of the preset target current value and the ending current threshold of the slow attenuation in the second stage is lower than the second multiple of the preset target current value and the preset monitoring current value.

[0092] In another embodiment provided in this application, when the current operating condition of the target stepper motor is acceleration operation, the target hybrid decay mode corresponding to the current operating condition is as follows: the execution order set in the target hybrid decay mode is a sequence of slow decay, fast decay, and slow decay executed consecutively; the starting current threshold of the slow decay in the first stage is higher than the second multiple of the preset target current value and the ending current threshold of the slow decay in the first stage is higher than the third multiple of the preset target current value and the starting current threshold of the slow decay in the second stage is lower than the second multiple of the preset target current value and the ending current threshold of the slow decay in the second stage is lower than the first multiple of the preset target current value and the preset monitoring current value.

[0093] In another embodiment provided in this application, when the current operating condition of the target stepper motor is deceleration, the target hybrid attenuation mode corresponding to the current operating condition is as follows: the execution order set in the target hybrid attenuation mode is a sequence of slow attenuation, fast attenuation, and slow attenuation executed consecutively; the starting current threshold of the slow attenuation in the first stage is higher than the preset target current value by a first multiple of the preset monitoring current value, the ending current threshold of the slow attenuation in the first stage is equal to the preset target current value, the starting current threshold of the slow attenuation in the second stage is lower than the preset target current value by a first multiple of the preset monitoring current value, and the ending current threshold of the slow attenuation in the second stage is lower than the preset target current value by a second multiple of the preset monitoring current value.

[0094] Here, the preset target current value is determined by an external device, and can be either a dynamic or static value. The preset monitoring current value is determined based on the current ripple peak value and monitoring level required for the target stepper motor application scenario. For example, assuming the current ripple peak value is B and the monitoring level is 4, then the preset monitoring current value C = B ÷ 4. The first multiplier is set to 1, the second multiplier is set to 2, and the third multiplier is set to 3.

[0095] For an example, please refer to Figure 5 , Figure 6 , Figure 7 , Figure 8 , Figure 5 This application provides a schematic diagram of the current control waveform for a stepper motor during low-speed steady-state operation. Figure 6 This application provides a schematic diagram of the current control waveform for a stepper motor during high-speed steady-state operation. Figure 7 This application provides a schematic diagram of a stepper motor current control waveform during accelerated operation. Figure 8 This application provides a schematic diagram of a stepper motor current control waveform during deceleration. Among other things, Figures 5 to 8 The voltage corresponding to ④ in the figure is the preset target current value, and the current gap between the two gray lines is the preset monitoring current value, such as... Figures 5-8 As shown, solid lines represent drive modes, dashed lines represent slow decay modes, and single-dot dashed lines represent fast decay modes. It should be noted that due to the influence of the stepper motor's back EMF voltage on its current, the motor current during the slow decay phase does not always decrease slowly; it may also increase slowly. This phenomenon is more pronounced during high-speed operation. Therefore, using it alone... Figure 5 The hybrid attenuation method shown cannot guarantee controllable current ripple under all operating conditions of the stepper motor. Therefore, to address the situation where the motor current increases slowly during the slow attenuation phase, a different approach is needed. Figure 6 The hybrid attenuation mode shown also considers the frequent acceleration and deceleration conditions of stepper motors in many applications, therefore, it is also necessary to design something like... Figure 7 and Figure 8 The diagram shows the hybrid attenuation mode during the acceleration and deceleration of a stepper motor. This minimizes the current distortion of the stepper motor, improves the positioning accuracy of the micro-stepping operation, and reduces torque ripple and operating noise.

[0096] Finally, regarding step S104:

[0097] Here, for each phase of the target stepper motor, the coil current of that phase is adjusted according to the target hybrid attenuation mode. In this way, the target hybrid attenuation mode determined based on the operating conditions enables precise adjustment of the stepper motor coil current, ensuring that the stepper motor coil current follows the preset target current value.

[0098] In one embodiment provided in this application, after adjusting the coil current of the target stepper motor according to the target hybrid attenuation mode, the control method further includes: activating the drive mode of the target stepper motor, sampling the coil current of the target stepper motor in real time, re-determining the current operating condition of the target stepper motor, and determining whether the coil current of the target stepper motor needs to be adjusted.

[0099] For an example, please refer to Figure 9 , Figure 9 This application provides a schematic diagram of the control process of a stepper motor, wherein, Figure 9 Current in Figures 5 to 8 The current corresponds to, such as Figure 9As shown, 901: Start; 902: Real-time sampling of stepper motor current; 903: Has a stop command been received? If yes, proceed to step 905; if no, proceed to step 904; 904: Start drive mode; 905: End; 906: Determine if the current is greater than threshold ②; if yes, proceed to step 907; if no, continue to step 904; 907: Enable slow decay mode; simultaneously execute steps 908 and 909; 908: Determine if the current is less than threshold ③; if yes, proceed to step 910; if no, continue to step 906; 909: Determine if the current is greater than threshold ①; if yes, proceed to step 914; if no, continue to step 906; 910: Enable fast decay mode; 911: Determine if the current is less than threshold ⑤; if yes, proceed to step 912; if no, continue to step 910; 912: Enable slow decay mode; 913 914: Activate fast decay mode; 915: Activate fast decay mode; 916: Activate slow decay mode; 917: Activate slow decay mode; 918: Activate slow decay mode; 919: Activate slow decay mode; 920: Activate slow decay mode; 921: Activate slow decay mode; 922: Activate slow decay mode; 921: Activate slow decay mode; 922: Activate slow decay mode; 914: Activate fast decay mode; 915: Activate fast decay mode; 916: Activate fast decay mode; 916: Activate slow decay mode; 917: Activate fast decay mode; 918: Activate slow decay mode; 919: Activate slow decay mode; 920: Activate slow decay mode; 921: Activate slow decay mode; 92 ...

[0100] This application provides a stepper motor control method, which includes: after the target stepper motor is started, sampling the coil current of the target stepper motor in real time; determining the current operating condition of the target stepper motor and whether the coil current of the target stepper motor needs to be adjusted based on the sampled coil current; when it is determined that adjustment is needed, determining a target hybrid attenuation mode corresponding to the current operating condition based on the determined current operating condition of the target stepper motor; wherein, different operating conditions correspond to different hybrid attenuation modes, and the hybrid attenuation mode is configured with an attenuation execution sequence including at least one slow attenuation and at least one fast attenuation, as well as a start current threshold and an end current threshold corresponding to each stage of attenuation; and adjusting the coil current of the target stepper motor according to the target hybrid attenuation mode.

[0101] In this way, by setting the same interval value for the target current threshold, this application ensures the symmetry of the target stepper motor current ripple and the control accuracy of the coil current of the target stepper motor. By automatically switching the optimal hybrid attenuation mode under different operating conditions, the controllability and consistency of the current ripple under all operating conditions of the stepper motor are guaranteed, and the experimental difficulty and complexity are reduced, thereby enabling accurate control of the target stepper motor current ripple within a short period of time.

[0102] Please see Figure 10 , Figure 11 , Figure 10 This is one of the structural schematic diagrams of the stepper motor control device provided in the embodiments of this application. Figure 11 This is a second schematic diagram of the control device for the stepper motor provided in an embodiment of this application. Figure 10 As shown, the control device 1000 includes:

[0103] The sampling module 1010 is used to sample the coil current of the target stepper motor in real time after the target stepper motor is started.

[0104] The first determining module 1020 is used to determine the current operating condition of the target stepper motor and whether the coil current of the target stepper motor needs to be adjusted based on the sampled coil current of the target stepper motor.

[0105] The second determining module 1030 is used to determine the target hybrid attenuation mode corresponding to the current operating condition of the target stepper motor when it is determined that adjustment is required; wherein, the hybrid attenuation mode is different for different operating conditions, and the hybrid attenuation mode is set with an attenuation execution order including at least one slow attenuation and at least one fast attenuation, as well as the starting current threshold and ending current threshold corresponding to each stage of attenuation.

[0106] The adjustment module 1040 is used to adjust the coil current of the target stepper motor according to the target hybrid attenuation mode.

[0107] Optionally, the current operating conditions include: low-speed steady-state operation, high-speed steady-state operation, acceleration operation, and deceleration operation.

[0108] Optionally, when the target stepper motor is currently operating in a high-speed steady-state state, the target hybrid attenuation mode corresponding to the current operating condition is:

[0109] The execution order set in the target hybrid decay mode is slow decay first, then fast decay, and then slow decay executed consecutively.

[0110] The starting current threshold of the first stage of slow decay is higher than the preset target current value by a first multiple of the preset monitoring current value. The ending current threshold of the first stage of slow decay is higher than the preset target current value by a second multiple of the preset monitoring current value. The starting current threshold of the second stage of slow decay is lower than the preset target current value by a second multiple of the preset monitoring current value. The ending current threshold of the second stage of slow decay is lower than the preset target current value by a first multiple of the preset monitoring current value.

[0111] Optionally, when the target stepper motor is currently operating in a low-speed steady-state state, the target hybrid attenuation mode corresponding to the current operating condition is:

[0112] The execution order set in the target hybrid decay mode is slow decay first, then fast decay, and then slow decay executed consecutively.

[0113] The starting current threshold of the first stage of slow decay is higher than the second multiple of the preset target current value and the preset monitoring current value. The ending current threshold of the first stage of slow decay is higher than the first multiple of the preset target current value and the preset monitoring current value. The starting current threshold of the second stage of slow decay is lower than the first multiple of the preset target current value and the preset monitoring current value. The ending current threshold of the second stage of slow decay is lower than the second multiple of the preset target current value and the preset monitoring current value.

[0114] Optionally, when the target stepper motor is currently operating in an acceleration mode, the target hybrid attenuation mode corresponding to the current operating mode is:

[0115] The execution order set in the target hybrid decay mode is slow decay first, then fast decay, and then slow decay executed consecutively.

[0116] The starting current threshold of the first stage of slow decay is higher than the second multiple of the preset target current value and the preset monitoring current value. The ending current threshold of the first stage of slow decay is higher than the third multiple of the preset target current value and the preset monitoring current value. The starting current threshold of the second stage of slow decay is lower than the second multiple of the preset target current value and the preset monitoring current value. The ending current threshold of the second stage of slow decay is lower than the first multiple of the preset target current value and the preset monitoring current value.

[0117] Optionally, when the target stepper motor is currently operating in a deceleration mode, the target hybrid attenuation mode corresponding to the current operating mode is:

[0118] The execution order set in the target hybrid decay mode is slow decay first, then fast decay, and then slow decay executed consecutively.

[0119] The starting current threshold of the first stage of slow decay is higher than the preset target current value by a first multiple of the preset monitoring current value, and the ending current threshold of the first stage of slow decay is equal to the preset target current value. The starting current threshold of the second stage of slow decay is lower than the preset target current value by a first multiple of the preset monitoring current value, and the ending current threshold of the second stage of slow decay is lower than the preset target current value by a second multiple of the preset monitoring current value.

[0120] Optional, such as Figure 11 As shown, the control device 1000 further includes a startup module 1050, which is used to: after adjusting the coil current of the target stepper motor according to the target hybrid attenuation mode, start the drive mode of the target stepper motor, and sample the coil current of the target stepper motor in real time, redetermine the current operating condition of the target stepper motor and determine whether the coil current of the target stepper motor needs to be adjusted.

[0121] Please see Figure 12 , Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 12 As shown, the electronic device 1200 includes a processor 1210, a memory 1220, and a bus 1230.

[0122] The memory 1220 stores machine-readable instructions executable by the processor 1210. When the electronic device 1200 is running, the processor 1210 communicates with the memory 1220 via the bus 1230. When the machine-readable instructions are executed by the processor 1210, they can perform the operations described above. Figures 1 to 9 The steps in the method embodiment shown are specifically implemented in the method embodiment and will not be repeated here.

[0123] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described actions. Figures 1 to 9 The steps in the method embodiment shown are specifically implemented in the method embodiment and will not be repeated here.

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

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

[0126] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0127] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

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

[0129] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A control method for a stepper motor, characterized in that, The control method includes: After the target stepper motor is started, the coil current of the target stepper motor is sampled in real time; Based on the sampled coil current of the target stepper motor, determine the current operating condition of the target stepper motor and whether the coil current of the target stepper motor needs to be adjusted; the current operating condition includes: low-speed steady-state operation, high-speed steady-state operation, acceleration operation, and deceleration operation; When adjustment is required, a target hybrid attenuation mode is determined based on the current operating condition of the target stepper motor. Different operating conditions correspond to different hybrid attenuation modes. Each hybrid attenuation mode includes an attenuation execution order of at least one slow attenuation and at least one fast attenuation, as well as a starting current threshold and an ending current threshold for each attenuation stage. When the target stepper motor is currently operating in a high-speed steady-state state, the target hybrid attenuation mode for that stage is as follows: the execution order is slow attenuation followed by fast attenuation and then slow attenuation executed consecutively. The starting current threshold for the first stage of slow attenuation is higher than a first multiple of the preset target current value and a preset monitoring current value; the ending current threshold for the first stage of slow attenuation is higher than a second multiple of the preset target current value and a preset monitoring current value; the starting current threshold for the second stage of slow attenuation is lower than a second multiple of the preset target current value and a preset monitoring current value; the ending current threshold for the second stage of slow attenuation is lower than a first multiple of the preset target current value and a preset monitoring current value. The coil current of the target stepper motor is adjusted according to the target hybrid attenuation mode.

2. The control method according to claim 1, characterized in that, When the target stepper motor is currently operating in a low-speed steady-state state, the target hybrid attenuation mode corresponding to the current operating condition is: The execution order set in the target hybrid decay mode is slow decay first, then fast decay, and then slow decay executed consecutively. The starting current threshold of the first stage of slow decay is higher than the second multiple of the preset target current value and the preset monitoring current value. The ending current threshold of the first stage of slow decay is higher than the first multiple of the preset target current value and the preset monitoring current value. The starting current threshold of the second stage of slow decay is lower than the first multiple of the preset target current value and the preset monitoring current value. The ending current threshold of the second stage of slow decay is lower than the second multiple of the preset target current value and the preset monitoring current value.

3. The control method according to claim 1, characterized in that, When the target stepper motor is currently operating in an acceleration mode, the target hybrid attenuation mode corresponding to the current operating mode is: The execution order set in the target hybrid decay mode is slow decay first, then fast decay, and then slow decay executed consecutively. The starting current threshold of the first stage of slow decay is higher than the second multiple of the preset target current value and the preset monitoring current value. The ending current threshold of the first stage of slow decay is higher than the third multiple of the preset target current value and the preset monitoring current value. The starting current threshold of the second stage of slow decay is lower than the second multiple of the preset target current value and the preset monitoring current value. The ending current threshold of the second stage of slow decay is lower than the first multiple of the preset target current value and the preset monitoring current value.

4. The control method according to claim 1, characterized in that, When the target stepper motor is currently operating in a deceleration mode, the target hybrid attenuation mode corresponding to the current operating mode is: The execution order set in the target hybrid decay mode is slow decay first, then fast decay, and then slow decay executed consecutively. The starting current threshold of the first stage of slow decay is higher than the preset target current value by a first multiple of the preset monitoring current value, and the ending current threshold of the first stage of slow decay is equal to the preset target current value. The starting current threshold of the second stage of slow decay is lower than the preset target current value by a first multiple of the preset monitoring current value, and the ending current threshold of the second stage of slow decay is lower than the preset target current value by a second multiple of the preset monitoring current value.

5. The control method according to claim 1, characterized in that, After adjusting the coil current of the target stepper motor according to the target hybrid attenuation mode, the control method further includes: starting the drive mode of the target stepper motor, sampling the coil current of the target stepper motor in real time, re-determining the current operating condition of the target stepper motor, and determining whether the coil current of the target stepper motor needs to be adjusted.

6. A control device for a stepper motor, characterized in that, The control device includes: The sampling module is used to sample the coil current of the target stepper motor in real time after the target stepper motor is started. The first determining module is used to determine the current operating condition of the target stepper motor and whether the coil current of the target stepper motor needs to be adjusted based on the sampled coil current of the target stepper motor; the current operating condition includes: low-speed steady-state operation, high-speed steady-state operation, acceleration operation, and deceleration operation; The second determining module is used to determine the target hybrid attenuation mode corresponding to the current operating condition of the target stepper motor when it is determined that adjustment is required. Different operating conditions correspond to different hybrid attenuation modes. The hybrid attenuation mode is configured with an attenuation execution order including at least one slow attenuation and at least one fast attenuation, as well as a starting current threshold and an ending current threshold corresponding to each stage of attenuation. When the current operating condition of the target stepper motor is high-speed steady-state operation, the target hybrid attenuation mode corresponding to the current operating condition is as follows: the execution order set in the target hybrid attenuation mode is a sequence of slow attenuation followed by fast attenuation and then slow attenuation executed consecutively. The starting current threshold of the first stage of slow attenuation is higher than a first multiple of the preset target current value and a preset monitoring current value; the ending current threshold of the first stage of slow attenuation is higher than a second multiple of the preset target current value and a preset monitoring current value; the starting current threshold of the second stage of slow attenuation is lower than a second multiple of the preset target current value and a preset monitoring current value; the ending current threshold of the second stage of slow attenuation is lower than a first multiple of the preset target current value and a preset monitoring current value. An adjustment module is used to adjust the coil current of the target stepper motor according to the target hybrid attenuation mode.

7. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus, and the machine-readable instructions are executed by the processor to perform the steps of the control method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the control method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Image forming apparatus

    JP2016127630A