Stepping motor monitoring control method and system
By analyzing the timing sequence of the target pulse and feedback signal of the stepper motor, identifying the disturbance sections of voltage and current, adjusting the PWM signal boundaries, and constructing the drive rhythm, the problem of stepper motor control signal disconnection is solved, and the control accuracy and stability are improved.
Patent Information
- Application Number
- CN202511252162.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-03
- Publication Date
- 2025-12-02
AI Technical Summary
Existing stepper motor monitoring and control methods cannot reflect the instantaneous position offset trend in the feedback response during frequency changes or sudden changes, resulting in a disconnect between the control signal and the feedback signal, which affects the consistency of the control rhythm and the rhythm tracking effect during operation.
By acquiring the time sequence of the target pulse and the feedback signal, the time offset trend of the stepping state is analyzed, voltage change and current response intervals are identified, signal segments are divided, the time interval affected by disturbances is located, the boundary adjustment range of the PWM signal is extracted, and the driving operation rhythm interval is constructed to enhance the response capability to rhythm changes.
It alleviates the problem of interference fluctuations and control rhythm disconnect caused by misalignment of the timing, and improves the accuracy and stability of stepper motor monitoring and control.
Smart Images

Figure CN121055822A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motion control technology, and in particular to a stepper motor monitoring and control method and system. Background Technology
[0002] Motion control technology primarily focuses on regulating and controlling the displacement, velocity, and acceleration of actuators. Core aspects include pulse signal generation, motion parameter setting, feedback signal acquisition, and adjustment calculation. The control process typically involves setting a target displacement or velocity, using a controller to output control signals to drive the motor, and simultaneously acquiring feedback signals from sensors or encoders. Error judgment is then used to generate an adjustment amount, which is output to the actuator to form a closed-loop control. The control path encompasses three parts: pulse wave output, feedback signal conversion, and adjustment calculation. Control accuracy depends on the matching between the feedback response speed and the signal adjustment sensitivity. Traditional stepper motor monitoring and control methods use a microcontroller to output pulse waves to drive the motor, setting a control frequency to control the running speed, using encoder pulse signals as feedback, and statistically analyzing the difference between the number of pulses within a sampling period and the target speed as the adjustment basis. Typically, the encoder's dual-edge sampling is used to determine the phase sequence and obtain the rotation direction. The frequency adjustment is calculated using the ratio between the target speed and the number of sampled pulses, and the timer comparison value is corrected to adjust the pulse frequency. The control signal is output by the microcontroller, the drive is completed by the motor driver chip, and the feedback signal is processed through the timer channel.
[0003] Existing technologies use periodic pulse statistics to complete regulation and control, but lack the means to identify the specific time distribution of pulses within the period. When the control signal is in a phase of frequency change or abrupt change, the feedback response cannot reflect the instantaneous position shift trend, thus creating a delay in regulation judgment. In situations where the feedback signal fluctuates densely or the response rhythm changes, periodic sampling cannot reflect the continuity of the control rhythm, resulting in a mismatch between feedback characteristics and control boundaries. The coverage range of the periodic control boundary cannot be adjusted at any time, and the output signal and feedback rhythm become disconnected during continuous control. This manifests as problems such as difficulty in suppressing response position drift and inability to maintain a stable control rhythm, affecting the consistency of the control's beat and the rhythm tracking effect during operation. Summary of the Invention
[0004] To address the technical problems existing in the prior art, this invention provides a stepper motor monitoring and control method, comprising the following steps: To achieve the above objectives, the present invention adopts the following technical solution: a stepper motor monitoring and control method, comprising the following steps: S1: Obtain the time sequence of the rising edges of the target pulse and the feedback signal, analyze the time offset trend of the stepping state based on the direction of change of the relationship between adjacent cycles, and obtain the step offset trend marking information; S2: Based on the offset trend in the step offset trend marking information, select the voltage change period and current response interval of the sudden jump stage, divide the signal segment with the same direction, locate the trajectory corresponding to the fluctuating voltage and current, and obtain the disturbance influence time segment. S3: Based on the time distribution of the disturbance influence time segment within the PWM cycle, extract the time coordinates within the high and low level segments, locate the time position of the boundary signal, and cover it with the output segment to obtain the adjustment range of the PWM output signal boundary. S4: Based on the time position in the PWM boundary adjustment range, extract PWM segments of the same type in adjacent cycles, identify the overlapping sections of control boundaries and signal changes, and filter signal segments with consistent frequency characteristics in continuous cycles to obtain the drive operation rhythm interval. S5: Based on the time overlap relationship between the drive operation rhythm interval and the PWM boundary adjustment range, extract the timing sequence of mutually overlapping signals within the cycle, compare the start and rhythm sequence, and obtain the stepper motor monitoring and control execution behavior.
[0005] As a further aspect of the present invention, the step offset trend marking information includes the temporal sequence of the target pulse and the feedback pulse, the direction of change of the relationship between adjacent cycles, and the offset trend in time. The disturbance influence time segment includes the voltage change time period, the current response time interval, the continuous fluctuation interval, and the signal segment with consistent trend. The PWM output signal boundary adjustment range includes the boundary signal time position, the time coordinate in the high and low level control segment, and the output segment coverage time position. The drive operation rhythm interval includes the periodic control boundary overlap position, the repetitive sequence of signal types on the time axis, and the signal time period with consistent frequency characteristics. The stepper motor monitoring and control execution behavior includes the output signal timing, the rhythm structure sequence, and the signal output content.
[0006] As a further aspect of the present invention, the direction of change of the relationship before and after the cycle refers to analyzing whether the time relationship of the signals between the control cycles of the stepper motor changes, identifying the direction of change, comparing the order of the target pulse and the feedback pulse in the continuous cycle, and determining whether the signal shows a leading or lagging change. The stepping state time offset trend refers to analyzing the time difference between the target pulse and the feedback pulse, determining whether the stepper motor state has shifted in time, analyzing the time difference within a continuous period, and determining the direction of the stepping state offset of the motor. The rhythm sequence refers to the sequential arrangement of the start time and the rhythm of change of the stepper motor control signal on the time axis, which determines the consistency and coordination of the driving behavior and the feedback response in terms of timing.
[0007] As a further aspect of the present invention, the voltage change period refers to the period during which voltage signal changes are identified during the stepper motor control process, abnormal fluctuations of the motor during the period are analyzed, the impact of external interference and load fluctuations on the motor is assessed, and the change status of the control signal is monitored. The boundary signal time position refers to the extraction of the time node sequence of high and low level transitions within the PWM control cycle during the stepper motor control signal behavior recognition process. The time positions of the start and end points of the level changes in the sequence are analyzed, and the change process of the level state is tracked within the cycle to identify the transition points from high level to low level and from low level to high level. The rhythm interval refers to a continuous time period in which the PWM signal segment remains consistent in time and frequency and has a repetitive rhythmic characteristic in multiple control cycles.
[0008] As a further aspect of the present invention, the specific steps of S1 are as follows: S101: Obtain the rise time of the target step pulse in the stepper motor drive signal, extract the rise time of the actual displacement signal returned by the feedback device, call the time record at the corresponding time point in the same control cycle, analyze the order of the target pulse and the feedback pulse, and obtain the pulse time sequence of a single cycle. S102: Based on the single-cycle pulse time sequence, call the sequence state in adjacent cycles, identify the changes in the relationship between the target pulse and the feedback pulse, extract the direction of sequence change in adjacent cycles, and obtain the sequence change trend during the cycle. S103: Based on the sequential change trend during the period, analyze the direction of change of the time relationship between the target and the feedback pulse within the period, determine the continuous offset direction of the stepping state on the time axis, and obtain the stepping offset trend marking information.
[0009] As a further aspect of the present invention, the specific steps of S2 are as follows: S201: Based on the offset trend direction in the step offset trend marking information, extract the continuous change data of the driving voltage signal within the range, identify the continuous time period of amplitude change in the voltage curve, locate the boundary time point of the voltage change rate slowing down before and after the change, and obtain the voltage change duration interval. S202: Based on the voltage change duration interval, extract the current signal sampling sequence within the corresponding time period, identify the fluctuation segment in the current curve whose direction is consistent with the voltage change, filter the current interval with the same continuous fluctuation direction and varying amplitude, extract the continuous distribution range on the time axis, and obtain the time range corresponding to the voltage and current trends. S203: Based on the time range corresponding to the voltage and current trends, extract the voltage and current signal sequences within the continuous period, locate the intervals on the time axis where fluctuations occur continuously, analyze the positional relationship between the voltage and current signals that change simultaneously within the time period, and obtain the time segment affected by the disturbance.
[0010] As a further aspect of the present invention, the specific steps of S3 are as follows: S301: Based on the start and end times of the disturbance-affected time segment, compare the high-level and low-level segments within the current PWM output cycle, locate the corresponding position of the disturbance time segment in the control segment, extract the time coordinates of the time segment in the high and low level control segments, and obtain the control coordinates of the disturbance interval. S302: Based on the control coordinates of the disturbance interval, identify the edge time of the level change in the control segment within the PWM cycle, track the position of the boundary signal adjacent to the disturbance time, extract the time coordinates of the corresponding edge point in the segment, and obtain the edge time of the control segment. S303: Based on the edge time of the control segment, compare it with the output segment time range in the PWM periodic control structure, analyze the coverage relationship between the edge time and the output segment, filter the covered output time segment positions, and obtain the PWM output signal boundary adjustment range.
[0011] As a further aspect of the present invention, the specific steps of S4 are as follows: S401: Based on the time position within the boundary adjustment range of the PWM output signal, extract PWM control segments with the same signal type in the current cycle and the preceding and following cycles, match segments in order of time axis, and filter continuous time positions under the same signal type to obtain the time distribution of the same control segments. S402: Based on the time distribution of the same control segment, identify the signal change time period corresponding to the control boundary, determine the repeated part of the signal change area in the previous and next cycles on the periodic time axis, extract the start and end time interval of the overlapping segment, and obtain the periodic repetition time position. S403: Based on the periodic repetition time position, under the condition of continuous time, compare the frequency change amplitude, identify the signal time period in which the frequency change amplitude is in the same range in the period, and obtain the driving operation rhythm interval.
[0012] As a further aspect of the present invention, the specific steps of S5 are as follows: S501: Based on the frequency control segment in the drive operation rhythm interval and the signal segment time in the boundary adjustment range of the PWM output signal, compare the time segment of the drive signal in the current cycle, filter the signal segments that overlap with the occurrence time, and extract the corresponding signal sequence to obtain the signal timing within the coverage segment; S502: Based on the signal timing within the coverage area, extract the starting position of each signal segment on the time axis, arrange them in order, and compare them segment by segment with the time sequence in the rhythm structure to identify the positions of segments with the same sequence and obtain the sequence-matched time segments. S503: Based on the sequential matching time segment, extract the drive signal content at the corresponding position in the current cycle, compare it with the output rhythm set in the drive circuit control structure, identify the control behavior that maintains a corresponding relationship with the rhythm structure, and obtain the stepper motor monitoring and control execution behavior.
[0013] A stepper motor monitoring and control system, comprising: The pulse sequence recognition module acquires the rise time of the target step pulse and the feedback displacement signal, compares the time sequence relationship of the signals within the same cycle, analyzes the direction of the sequence change between adjacent cycles, analyzes the time offset state of the step control behavior within the cycle, and obtains the step offset trend marking information. The response time zone filtering module extracts the driving voltage mutation segment and current response interval based on the step offset trend marker information offset trend, filters the time segment with the same continuous fluctuation direction, and obtains the disturbance influence time segment by comparing the corresponding positions of voltage change and current response behavior on the time axis. Based on the position of the disturbance influence time segment in the PWM cycle, the signal boundary positioning module maps the segment to high-level and low-level control output segments respectively, analyzes the boundary distribution in the output structure, extracts the boundary time period of control adjustment, and obtains the boundary adjustment range of the PWM output signal. The frequency band rhythm comparison module extracts the same type of PWM signal segments in adjacent cycles based on the time information of the adjustment range of the boundary of the PWM output signal, compares the frequency control rhythm position on the time axis, filters the output segments with continuous repetitive rhythm of time structure, and obtains the driving operation rhythm interval. The control behavior output module extracts the control output signal within the current cycle based on the time overlap position between the drive operation rhythm interval and the PWM output signal boundary adjustment range, analyzes the positional correspondence between the output signal and the rhythm time segment in the starting sequence, outputs the rhythm state of the timing sequence, and obtains the stepper motor monitoring and control execution behavior.
[0014] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, by comparing the time sequence of the rising edges of the target and feedback signals, and combining the direction of periodic changes, the displacement trend is determined. The characteristics of voltage mutation and current fluctuation are used to identify interference sections. The control boundary is delineated according to their distribution in high and low levels. Signal segments with consistent frequency characteristics are extracted to construct the operating rhythm. The driving behavior is extracted by combining the signal timing and rhythm sequence, thereby enhancing the response capability to rhythm changes and alleviating the problem of interference fluctuations and control rhythm disconnection caused by misalignment of the beat. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a schematic diagram of the steps of the present invention; Figure 2 This is a detailed schematic diagram of S1 of the present invention; Figure 3 This is a detailed schematic diagram of S2 of the present invention; Figure 4 This is a detailed schematic diagram of S3 of the present invention; Figure 5 This is a detailed schematic diagram of S4 of the present invention; Figure 6 This is a detailed schematic diagram of S5 of the present invention; Figure 7 This is a system module diagram of the present invention. Detailed Implementation
[0017] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0018] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0019] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0020] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0021] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0022] Please see Figure 1 This invention provides a stepper motor monitoring and control method, comprising the following steps: S1: Obtain the rise time of the target step pulse in the stepper motor drive signal, and at the same time extract the rise time of the actual step displacement signal returned by the feedback device. Identify the time sequence of the target pulse and the feedback pulse within the same control cycle. Analyze the time offset trend of the stepping state by the direction of change of the relationship between the two pulses in adjacent cycles, and obtain the step offset trend marking information. S2: Based on the offset trend in the step offset trend marker information, select the time period of sudden change of driving voltage from the sudden jump stage, extract the time zone corresponding to the current change, divide the signal segment position with the same trend direction, select the interval of continuous fluctuation from the continuous period, locate the corresponding segment of voltage and current response trajectory in the time interval, and obtain the time interval of disturbance influence. S3: Based on the time distribution of the start and end times in the disturbance influence time segment within the current PWM output cycle, corresponding to the time coordinates in the high-level and low-level control segments, locate the time position of the boundary signal in the control segment, and compare the time position with the output segment of the periodic control structure to obtain the boundary adjustment range of the PWM output signal. S4: Based on the time position information in the boundary adjustment range of the PWM output signal, extract the same type of PWM control segment from the previous and next cycles, identify the repeated position of the cycle control boundary and the signal change time period, arrange the positions where the same signal type overlaps on the time axis in sequence, filter the signal time period with consistent frequency characteristics in the continuous cycle, and obtain the drive operation rhythm interval. S5: Based on the time overlap between the frequency control segment and the signal segment in the boundary adjustment range of the PWM output signal in the stable rhythm interval of the drive operation, select the signal timing that overlaps with the time segment from the drive output behavior in the current cycle, compare the starting order of the signal with the rhythm structure time order in the time period, extract the signal output content in the cycle, and obtain the stepper motor monitoring and control execution behavior according to the corresponding output rhythm of the drive circuit.
[0023] The stepper offset trend marking information includes the time sequence of the target pulse and the feedback pulse, the direction of change of the relationship between adjacent cycles, and the offset trend in time. The disturbance influence time segment includes the time period corresponding to voltage change, the current response time interval, the continuous fluctuation interval, and the signal segment with consistent trend. The PWM output signal boundary adjustment range includes the time position of the boundary signal, the time coordinate in the high and low level control segment, and the time position of the output segment coverage. The drive operation rhythm interval includes the overlapping position of the periodic control boundary, the repetitive sequence of signal types on the time axis, and the signal period with consistent frequency characteristics. The stepper motor monitoring and control execution behavior includes the output signal timing, rhythm structure sequence, and signal output content.
[0024] Please see Figure 2 The specific steps of S1 are as follows: S101: Obtain the rise time of the target step pulse in the stepper motor drive signal, extract the rise time of the actual displacement signal returned by the feedback device, call the time record at the corresponding time point in the same control cycle, analyze the order of the target pulse and the feedback pulse, and obtain the pulse time sequence of a single cycle. First, trigger point detection circuits are respectively set up for the target signal channel and the feedback signal channel, and synchronous sampling operations are started within one control cycle. The target step pulse signal serves as the reference on the driving side. During the signal transition process, when the level rises from low to high and reaches the set trigger threshold, the current sampling time point t1 is recorded. The signal generated by the feedback device is the position detection result. The rising edge of the feedback channel is set to be detected, and when the detected level meets the trigger requirement, the sampling time point t2 is recorded. The sampling frequency should meet the requirement of completely capturing the rising edge of the signal. A common setting is an interval at the microsecond level to avoid missing edge information caused by a pulse width less than the sampling period. In practice, if the stepper motor drive is a micro-stepping drive, multiple pulse signals may be generated per step. It is necessary to limit the detection target according to the set micro-stepping levels to avoid repeated identification of multiple rising edges corresponding to the same physical step. If the micro-stepping level of the target motor is set to 8 micro-steps, each full step corresponds to 8 drive pulses, and only the pulses at the starting position of the micro-stepping cycle are sampled. If the rising edge time t1 of the target pulse is set to 1450 and the rising edge time t2 of the feedback signal is set to 1620, the interval between the two is 170. According to the sequence relationship between t1 and t2, by judging t1 < t2, the target pulse is earlier than the feedback signal. If vice versa, the feedback is earlier. The front and back order is reflected by the positive and negative values of the difference between t1 and t2. In the processing logic, it is necessary to first call the starting time of the cycle as the comparison reference, and uniformly compare t1 and t2 with this reference for timing comparison, so as to identify the timing difference between the driving behavior and the feedback response. If there are pulse interference or pulse jitter phenomena, the sampling times within multiple consecutive cycles are processed by mean filtering to eliminate sudden jump points. For example, if a interfering pulse t2 deviates from the normal average value by more than 120 within a certain cycle, this time point is eliminated and not included in the sequence judgment. In this way, the judgment of t1 and t2 within each control cycle is continuously carried out, and the results are marked and stored in sequence to obtain the single-cycle pulse time sequence.
[0025] S102: Based on the single-cycle pulse time sequence, call the sequence states within adjacent cycles, identify the change in the front and back relationship between the target pulse and the feedback pulse, and extract the sequence change direction within adjacent cycles to obtain the sequence change trend between cycles; First, the judgment results within multiple cycles can be called sequentially according to the control cycle order. Assuming one judgment result is generated in each cycle, indicating whether the target pulse precedes the feedback pulse, this result is represented by a Boolean type, where "1" indicates the target pulse precedes the feedback pulse, and "0" indicates the feedback pulse precedes the target pulse. Multiple judgment values within consecutive cycles are grouped into a discrete sequence. For example, if the results for six consecutive cycles are 1, 1, 1, 0, 0, 1, the position of the change in sequence state between adjacent cycles needs to be identified. The Boolean values of two adjacent cycles are called to perform a difference judgment, and the state change is identified by a logical XOR operation. For example, if the first and second cycles are 1 and 1 respectively, the XOR result is 0, indicating no change in sequence. If the third cycle is 1 and the fourth cycle is 0, the XOR result is 1, indicating a change in sequence. This process is repeated for the entire cycle sequence, marking the positions where a value of 1 occurs as the points of change. Then, the relative positions of these points of change are determined. By comparison, we can determine whether the change is composed of "1 to 0" or "0 to 1". For example, in the above six-cycle sequence, the change from the third to the fourth cycle is 1 to 0, which means that the original target is in front, but the feedback is in front. The direction of change here is backward. If the opposite direction of change occurs, it is judged as forward. Then, by statistically analyzing the continuous distribution of the same direction of change on the time axis, we can judge its evolution trend. If the direction is consistent for three consecutive cycles, it is considered that the direction is dominant. If the direction alternates frequently, it is judged as an unstable state. In actual operation, if the direction change of the first to the sixth cycle is none, none, backward, none, forward, none, it means that there are repeated changes within the cycle and it is not continuous. If the first to the fifth cycle are all backward, the trend is considered stable. This kind of process does not involve numerical calculation. It only completes the trend extraction based on the logical comparison of Boolean order states. A new field can be added in each cycle to mark the direction of change and stored in the time series to obtain the sequential change trend during the cycle.
[0026] S103: Based on the sequential change trend during the period, analyze the change direction of the time relationship between the target and the feedback pulse within the period, determine the continuous offset direction of the stepping state on the time axis, and obtain the stepping offset trend marking information. First, the differences in the temporal order of the target pulse and feedback pulse within each control cycle are classified. Cycle segments exhibiting continuous directional changes in temporal order are designated as key judgment segments for continuous trend analysis. During operation, the pulses are initially categorized by the type of change in the sequential trend: Type A is a continuously advancing target pulse, Type B is a continuously advancing feedback pulse, and Type C is an alternating disordered state. Types A and B are further divided into time periods. It is observed whether they maintain the same direction for three or more consecutive cycles, and then it is determined whether they exhibit a stable distribution of advancing or retreating states on the time axis. If multiple consecutive cycles belong to the same direction, a stable offset trend can be identified. In this case, the time positions corresponding to the start and end points within these cycles need to be extracted. A time distribution interval is constructed using the sequential trend sequence, recording the temporal order of the target pulse and feedback pulse in each cycle. Mapped to the offset direction, when the consistency of the time direction exceeds a set threshold of the number of cycles, for example, if the direction of change does not reverse within five consecutive cycles, the continuous segment is determined to be an offset continuous segment. During the determination, the direction signs of adjacent cycles are accumulated. When the accumulated value is continuously positive or negative, it indicates that the direction is continuous. If the signs alternate repeatedly, it is a disordered stage. In practical applications, if the state of the target pulse in front continues for six times in eight cycles without any reverse insertion state in between, the eight-cycle interval can be considered as the target-dominated offset segment. Then, offset intervals are constructed using such data segments, and the time periods in which the offset direction is consistent are identified. The calculation of the rate of change of direction is added afterward. The stability of the direction is determined by the ratio between the number of cycles and the number of direction signs. If the number of cycles with a continuous and consistent offset direction exceeds two-thirds of the total cycle, the segment is marked as an effective trend segment. The determination result serves as the basis for the final offset direction, and the step offset trend marking information is obtained.
[0027] Please see Figure 3 The specific steps of S2 are as follows: S201: Based on the offset trend direction in the step offset trend marker information, extract the continuous change data of the driving voltage signal within the range, identify the continuous time period of amplitude change in the voltage curve, locate the boundary time point of the slowdown of voltage change rate before and after the change, and obtain the voltage change duration range. First, a continuous sampling sequence of the current signal is retrieved from the corresponding time period of the interval. This current signal sampling data is usually obtained through a current sensor installed in series with the drive circuit. The sampling frequency must be no less than the sampling accuracy consistent with the voltage signal to ensure the time accuracy of the fluctuation synchronization analysis. During data processing, the current data is first limited to the start and end points of the voltage change time according to the time axis. The current amplitude change curve within this interval is scanned point by point, and the direction of the current change difference between adjacent sampling points is calculated. Then, the direction of the difference is compared with the direction of voltage change. When the two change trends are consistent, the current point is retained and the search continues. If the directions are opposite, the expansion of this interval is terminated. The method for judging the consistency of direction is as follows: if the voltage is rising in the change segment, and the current value also rises point by point in the continuous sampling points, then the direction is consistent; if the voltage drops, the current value also drops continuously, then it is judged as consistent. In this way, the fluctuation segment in the current signal that is consistent with the voltage trend direction can be determined. After confirming that the fluctuation direction is consistent, the current signal wave is analyzed. The amplitude is calculated by moving the sampling point. The difference between two adjacent sampling points is considered as one amplitude change. When three or more consecutive points show changes in the same direction and the amplitude exceeds the set reference amplitude threshold, this continuous segment is included in the analysis interval. The reference amplitude threshold should be set according to the accuracy of the current sensor, generally between 0.02A and 0.10A (i.e., 3 to 5 times) of its smallest resolution unit. For example, if the sensor's smallest resolution unit is 0.02A, the amplitude threshold can be set to 0.08A. Let a certain continuous current sampling value be 1.2. 0A, 1.31A, 1.42A, 1.51A, 1.52A. The first three points are +0.11A, +0.11A, and +0.09A respectively, all higher than 0.08A, and are considered as valid continuous fluctuations. The range from 1.51A to 1.52A is +0.01A, which does not meet the requirements. Therefore, the valid segment is the first three points. The corresponding timestamps are read from them to locate the continuous distribution range of this fluctuation segment on the time axis, which serves as the input boundary for subsequent current response time zone analysis, and finally, the time range corresponding to the voltage and current trends is obtained.
[0028] S202: Based on the duration interval of voltage change, extract the current signal sampling sequence within the corresponding time period, identify the fluctuation segment in the current curve whose direction is consistent with the voltage change, filter the current interval with the same continuous fluctuation direction and varying amplitude, extract the continuous distribution range on the time axis, and obtain the time range corresponding to the voltage and current trends. First, a continuous sampling sequence of the current signal is retrieved from this interval. This current signal sampling data is usually obtained through a current sensor installed in series with the drive circuit. The sampling frequency must be no less than the sampling accuracy consistent with the voltage signal to ensure the time accuracy of the fluctuation synchronization analysis. During data processing, the current data is first limited to the start and end points of the voltage change time according to the time axis. The current amplitude change within this interval is scanned point by point, and the direction of current change at adjacent sampling points is determined and compared with the voltage change trend. When the voltage is rising, if the current value also rises continuously, it is determined that the direction is consistent. If the voltage is falling, and the current value also falls continuously, it is also considered that the direction is consistent. If the directions are opposite, the expansion of this segment is terminated. In this way, the current fluctuation segment consistent with the voltage trend direction can be extracted, forming an effective response time sub-interval. After confirming that the fluctuation direction is consistent, the amplitude of the current change within the segment is judged. When the current amplitude change between every two sampling points in a continuous fluctuation segment exceeds the set reference threshold, and this occurs continuously at three or more sampling points, it can be defined as an effective analysis segment. The reference threshold should be determined based on the accuracy of the current sensor, generally taken as 3 to 5 times its minimum resolution unit. For example, if the sensor's minimum resolution unit is 0.02A, it can be set to 0.08A. For instance, if a certain segment of current samples continuously measures 1.20A, 1.31A, 1.42A, 1.51A, and 1.52A, the current variation amplitudes at the first three points are 0.11A, 0.11A, and 0.09A respectively, all exceeding the reference threshold of 0.08A, and are considered continuous valid fluctuations. The change from 1.51A to 1.52A is only 0.01A, which does not meet the requirement. Therefore, this valid segment only includes the first three sampling points. Subsequently, the corresponding timestamps can be extracted from this valid fluctuation segment to locate its continuous distribution range on the time axis, serving as the input boundary for subsequent current response time zone analysis, ultimately obtaining the current response time range corresponding to the voltage signal trend.
[0029] S203: Based on the voltage and current trends corresponding to the time range, extract the voltage and current signal sequences within a continuous period, locate the intervals on the time axis where fluctuations occur continuously, analyze the positional relationship between the voltage and current signals that change simultaneously within a time period, and obtain the time intervals affected by disturbances. First, complete sampling sequences of voltage and current signals are extracted sequentially in multiple continuous control cycles. The time axis is then uniformly aligned, using the cycle start point as a reference baseline. The voltage and current signals within each cycle are mapped onto a unified time scale at equal sampling intervals, generating a two-dimensional sampling time matrix covering multiple cycles. Let this matrix be... each of the rows Indicates the first Sampled data sequence within a period, column index The corresponding time scale Each element in the matrix represents a time sampling point. For a voltage value at that time point and current value The voltage-current pairs represent the voltage and current values at the same time point in all cycles. Based on this, the fluctuation characteristics of the voltage and current curves in continuous cycles are identified. First, the fluctuating segments of the voltage signal need to be identified. This is done by performing a sliding window interpolation on the voltage sample value sequence for each cycle. With a window length of at least three sampling points, it is determined whether there are consecutive positive or negative differences within the current window whose amplitude exceeds a set jump threshold. If the condition is met, it is determined to be a fluctuating segment. In the example, the voltage values are 4.1, 4.3, 4.6, 4.2, 3.9, and 3.5 (in V), and the interpolation sequence is +0.2, +0.3, -0.4, -0.3, and -0.4. This segment changes direction twice, forming a fluctuating segment. The current signal is then synchronized to determine if there are amplitude changes in the current curve within the time period corresponding to the voltage fluctuation segment. This is done by checking if there are three or more consecutive points in the current sequence within that time period where the amplitude changes exceed the effective current fluctuation threshold (e.g., a continuous increase from 1.2A to 1.6A with a cumulative difference exceeding 0.3A). If the fluctuation direction is consistent with the voltage and the time periods completely overlap, the current response and voltage change are considered to occur simultaneously, and this type of event is marked as a bidirectional fluctuation event. Then, all signal sequences in the continuous cycle are traversed, accumulating and recording all time periods where fluctuations occur simultaneously. The start and end times of these fluctuations are located on the full-cycle time axis. Let the time boundary of each disturbance be represented as... ,in Indicates the first There are several perturbation segments. If multiple perturbation segments may exist in different periods, time-series merging is performed based on relative starting points, and the overlapping time portions are uniformly numbered. The segment interaction calculation used for subsequent segment matching can adopt a judgment method based on the time intersection length. Let the two segments to be matched be... and Define the time intersection interval ,in , ,when At this point, it is considered that there is a valid interaction between the two segments; a minimum intersection duration threshold can be further set. When the intersection duration When the segment is determined to be a valid matching segment, it is included in the subsequent rhythm alignment analysis, and finally the time segment affected by the disturbance is obtained.
[0030] Please see Figure 4 The specific steps of S3 are as follows: S301: Based on the start and end times of the disturbance impact time segment, compare the high-level and low-level segments in the current PWM output cycle, locate the corresponding position of the disturbance time segment in the control segment, extract the time coordinates of the time segment in the high and low level control segments, and obtain the control coordinates of the disturbance interval. First, the time range of each high-level and low-level control segment within the PWM control cycle is identified. The cycle start point is set as a unified reference position, and the cycle is divided into multiple continuous level segments, namely high-level segment, low-level segment, and high-level segment, etc. These segments are numbered and located according to the actual switching time of the level changes, constructing a complete segment time index sequence. Then, the start and end times of the disturbance-affected time segment are compared with the start and end times of each level segment within the cycle. During the comparison, if the disturbance start time is within a high-level segment and the end time is within a low-level segment following that high-level segment, it indicates that the disturbance spans two level segments. In this case, the disturbance time segment needs to be divided into two time periods according to the level boundaries. In practical applications, if the high-level segment range of a certain cycle is 100μs to 600μs, and the low-level segment range is... The disturbance duration is 600μs to 1100μs, with a start time of 450μs and an end time of 750μs. Therefore, the start time is determined to be in the high-level segment, and the end time to be in the low-level segment. The two time intervals, 450μs to 600μs and 600μs to 750μs, need to be labeled as the corresponding high-level and low-level segment intervals, respectively. Based on this, the position coordinates of the disturbance time within each segment are extracted, i.e., the offset distance relative to the start of each segment. For example, if the high-level segment starts at 100μs, the disturbance start coordinate is 350μs; if the low-level segment starts at 600μs, the disturbance end coordinate is 150μs. These two coordinates are recorded as reference time points for subsequent PWM boundary adjustments. Repeating this operation completes the level segment mapping of any disturbance time interval within the PWM cycle, ultimately obtaining the control coordinates of the disturbance interval.
[0031] S302: Based on the control coordinates of the disturbance interval, the edge time of the level change is identified according to the control segment within the PWM cycle, the position of the boundary signal adjacent to the disturbance time is tracked, and the time coordinates of the corresponding edge point are extracted in the segment to obtain the edge time of the control segment. First, within the PWM cycle, it's necessary to identify the reference positions of the high-low level switching edges corresponding to each control segment. The entire cycle is divided into a series of alternating high and low level segments, with the starting point of each segment being the level change edge. Then, the start and end coordinates of the disturbance interval are used to sequentially determine if they fall within the time range of a specific segment. During this determination, if the starting coordinate of the disturbance interval is within a high-level segment, the level transition edge time between that segment and the previous segment needs to be tracked; this time is the location of the rising edge signal of the high-level segment. If the ending coordinate of the disturbance is within a low-level segment, the switching point between that segment and the subsequent high-level segment is tracked; this time is the location of the falling edge signal. Based on this, the preceding and following boundaries of each control segment within the disturbance interval are identified sequentially. By comparing the start and end times of each segment with the start and end coordinates of the disturbance interval, the two time points closest to the coordinates and exhibiting level changes are selected as the boundary start and boundary end points, respectively, and labeled with the corresponding control segment type. In a real-world scenario, for example, if the disturbance control coordinates are from 150ms to 480ms, and the high-level segment time range in the current cycle is from 100ms to 300ms, and the low-level segment is from 300ms to 600ms, then the disturbance start point of 150ms can be located within the high-level segment, and its corresponding edge time is the end time of the previous low-level segment at 100ms. The disturbance end point of 480ms is located within the low-level segment, and its corresponding edge time is the start time of the next high-level segment at 600ms. Based on the above process, all level switching boundaries adjacent to the disturbance coordinates can be identified and located sequentially in the control segment to obtain the control segment edge time.
[0032] S303: Based on the edge time of the control segment, compare the output segment time range in the PWM periodic control structure, analyze the coverage relationship between the edge time and the output segment, filter the covered output time segment positions, and obtain the boundary adjustment range of the PWM output signal. First, the control output segments within each PWM cycle need to be decomposed. This decomposition process identifies the start and end times of the high and low level intervals to obtain the boundaries of each level control segment. Based on this, the next step is to determine the time range corresponding to the disturbance interval within the cycle using the control coordinates of the disturbance interval, and compare this time range with the edge times of the control segments. In this operation, assuming the disturbance start time is at the end of a high-level segment and the end time is at the beginning of a low-level segment, the disturbance start time is first compared with the high-level segment end time to determine if it falls on the level switching boundary of that segment. If it does, this time point is extracted as the edge time. Then, the disturbance end time is compared with the low-level segment start time in the same way. If the end time is near the low-level segment start time, this time point is further extracted as the edge time. If a level switch has not occurred at this point, a search for a valid level switch point within the segment needs to be performed until a valid time point is found. For example, if the high-level segment of a PWM cycle lasts from 0 to 5 ms, the low-level segment lasts from 5 ms to 10 ms, and the disturbance interval starts at 4 ms and ends at 6 ms, then the disturbance start time of 4 ms matches the end time of the high-level segment (5 ms), and the disturbance end time of 6 ms coincides with the start time of the low-level segment (5 ms). Therefore, the end time of the high-level segment (5 ms) and the start time of the low-level segment (5 ms) need to be extracted as edge times. Finally, based on these edge time points, the positions of all covered output time periods are identified, and these time periods are included in the control boundary adjustment range, ultimately obtaining the PWM output signal boundary adjustment range.
[0033] Please see Figure 5 The specific steps of S4 are as follows: S401: Based on the time position within the boundary adjustment range of the PWM output signal, extract PWM control segments with the same signal type in the current cycle and the preceding and following cycles, match segments in order of time axis, filter continuous time positions under the same signal type, and obtain the time distribution of the same control segments. First, it's necessary to identify PWM control segments with consistent signal types within the current cycle and the preceding and following cycles. To do this, control segments for each cycle are extracted, ensuring these segments coincide with or are close to the boundary times within the disturbance interval. Then, the level states within each cycle are compared to ensure all extracted segments are of the same type of PWM control segment. For example, if the high-level segment in the current cycle has a time range of 100ms to 200ms and the low-level segment has a time range of 200ms to 300ms, segments within this range are matched with control segments from adjacent cycles to ensure the timing of segments in adjacent cycles is consistent with the current cycle. Next, these segments are matched sequentially along the time axis, ensuring their continuity and avoiding timing discrepancies. After arranging the time series, continuous segments with consistent signal types and time constraints within all time periods are further filtered out. For example, if high-level segments appear consecutively in preceding and following cycles and their times match the current cycle, they are selected as target segments. Through this process of filtering and matching, the time distribution of identical control segments is finally obtained.
[0034] S402: Based on the time distribution of the same control segment, identify the signal change time period corresponding to the control boundary, determine the repeating part of the signal change area in the previous and next cycles on the periodic time axis, extract the start and end time interval of the overlapping segment, and obtain the periodic repetition time position. First, it's necessary to analyze the signal change time periods within the PWM cycle to identify the signal change positions corresponding to the control boundaries. First, extract the time range of the high-level and low-level segments in each cycle and compare them with the time distribution of the same control segments. For example, assuming the high-level segment in the current cycle lasts from 0ms to 50ms, and the low-level segment from 50ms to 100ms, analyze the signal changes in preceding and following cycles to identify their corresponding signal change intervals on the time axis. Next, on the cycle time axis, by comparing the signal change regions within preceding and following cycles, locate the overlapping parts. For example, if the high-level segments of preceding and following cycles overlap within the time interval, these overlapping parts are considered the same signal change region. In this way, the continuous time positions of the same control signal type within each cycle are identified, and finally, the start and end times of the control signal in each cycle are determined, resulting in the cycle repetition time positions.
[0035] S403: Based on the periodic repetition time position, under the condition of continuous time, compare the frequency change amplitude to identify the signal time period in which the frequency change amplitude is in the same range in the period, and obtain the driving operation rhythm interval. First, the signals within the PWM cycle need to be compared to extract the frequency change amplitude and determine its range. For example, within a continuous PWM cycle, the signal frequency change may fluctuate in amplitude, such as increasing from 10Hz to 12Hz and then decreasing to 11Hz. By comparing these frequency change amplitudes, signal time periods with the same frequency change amplitude within a given time interval are identified. For instance, when the frequency change amplitude remains continuously between 10Hz and 12Hz, these segments are considered to be within the same interval. Next, these signals are compared sequentially along the time axis to extract continuous time periods with the same frequency change amplitude, and the duration of these signals within the cycle is identified and recorded. A practical example is that if the signal frequency remains stable within a certain range within a cycle, and the same frequency change occurs in subsequent cycles, then these signals can be identified as belonging to the same control cycle, and their drive operation rhythm interval can be determined. Finally, by comparing the interval position and time span of the frequency change, the drive operation rhythm interval is obtained.
[0036] Please see Figure 6 The specific steps of S5 are as follows: S501: Based on the frequency control segment in the drive operation rhythm interval and the signal segment time in the boundary adjustment range of the PWM output signal, compare the time segment of the drive signal in the current cycle, filter the signal segments that overlap with the occurrence time, and extract the corresponding signal sequence to obtain the signal timing within the coverage segment; First, based on the time positions of the frequency control segment within the drive's operating rhythm interval and the signal segments within the PWM output signal boundary adjustment range, the time segments of the drive signal in the current cycle are compared. This involves detailed matching of the start and end times of the drive signal with the time periods of the boundary signal. In this process, the drive signal segments of the current cycle need to be identified first; these signals are continuously tracked according to the actual control process. For example, assuming the drive signal starts at 0.5 seconds and ends at 1 second, the PWM boundary signal might start at 0.7 seconds and end at 1.2 seconds. Next, signal segments that overlap with the occurrence time are filtered out; for example, in the above example, the portion from 0.7 seconds to 1 second is the overlapping segment. By comparing these signal time periods, the corresponding signal sequences can be extracted. These signal sequences have a clear correspondence on the time axis, such as the drive signal and boundary signal from 0.7 seconds to 1 second. Finally, the timing sequence of the signals within the covered segment is obtained.
[0037] S502: Based on the signal timing within the coverage area, extract the starting position of each signal segment on the time axis, arrange them in order, and compare them with the time sequence in the rhythm structure segment by segment to identify the positions of segments with the same sequence and obtain the sequence-matched time segments. First, based on the signal timing within the coverage area, the starting position of each signal segment is extracted from the time axis. In practice, this means that the signal sequence needs to be precisely time-stamped to ensure that the signal's time points are accurately recorded. For example, assuming that a signal transitions from a low level to a high level at a certain moment of 0.5 seconds, this moment is recorded as the signal's starting position. Next, these signal starting positions are arranged sequentially to ensure that the time sequence of each signal segment is normalized. By organizing these time points, continuous signal time segments can be formed. For example, if the signal changes between 0.5 seconds and 1 second, it can be considered a complete time segment. Next, these signal time sequences are compared segment by segment with the time sequence in the rhythm structure. This step requires analyzing the time nodes of the rhythm structure to ensure that the signal changes can be accurately matched on the time axis. For example, if the rhythm structure requires a rising edge signal change between 1 second and 1.5 seconds, then if the signal in that time segment meets this requirement, the signal segment is considered to have successfully matched within that time segment. Finally, based on the comparison, the positions of segments with consistent and similar order are identified. By comparing the actual signal with the time periods in the rhythm structure, it is possible to identify which signal segments match the signals in the rhythm structure and obtain the sequentially matched time segments.
[0038] S503: Based on sequential matching time segments, extract the drive signal content at the corresponding position in the current cycle, compare it with the output rhythm set in the drive circuit control structure, identify the control behavior that maintains a corresponding relationship with the rhythm structure, and obtain the stepper motor monitoring and control execution behavior. First, the drive signal content corresponding to these time segments is extracted within the current cycle. For example, between 0.5 seconds and 1 second in a cycle, a specific signal may change from low to high level; this change information is extracted as the drive signal content for that time segment. Next, the extracted drive signal content is compared with the output rhythm set in the drive circuit control structure. This means that the output rhythm of the control structure within the cycle has been predefined. For example, the signal between 1 second and 1.5 seconds should change with a rising edge and remain at a high level. During the comparison process, it is necessary to determine whether the extracted signal conforms to this rhythm requirement. For example, if the extracted signal does not have a rising edge within that time segment, or if other unexpected changes occur, then the signal does not conform to the set rhythm. Following this, the control behavior corresponding to the rhythm structure is identified through comparison. This behavior means that within the control cycle, the signal change is consistent with the predetermined rhythm structure, indicating that the signal's timing perfectly matches the time segment set in the control structure, and the behavior conforms to the predetermined control logic. For example, if the extracted signal changes from low level to high level between 1.2 and 1.3 seconds and remains high for 1.5 seconds, then the signal conforms to the rhythm set by the control structure and is ultimately identified as a qualified control behavior, thus obtaining the stepper motor monitoring and control execution behavior.
[0039] Please see Figure 7 A stepper motor monitoring and control system, comprising: The pulse sequence recognition module acquires the rise time of the target step pulse and the feedback displacement signal, compares the time sequence relationship of the signals within the same cycle, analyzes the direction of the sequence change between adjacent cycles, analyzes the time offset state of the step control behavior within the cycle, and obtains the step offset trend marking information. The response time zone filtering module extracts the driving voltage mutation segment and current response interval based on the step offset trend marker information offset trend, filters the time segment with the same continuous fluctuation direction, and obtains the time segment affected by the disturbance by comparing the corresponding positions of voltage change and current response behavior on the time axis. The signal boundary localization module maps the disturbance-affected time segment to the high-level and low-level control output segments based on the position of the segment in the PWM cycle. It then analyzes the boundary distribution in the output structure, extracts the boundary time segment of the control adjustment, and obtains the boundary adjustment range of the PWM output signal. The frequency band rhythm comparison module extracts the same type of PWM signal segments in adjacent cycles based on the time information of the adjustment range of the PWM output signal boundary. It compares the frequency control rhythm position on the time axis, filters the output segments with continuous repetitive rhythm in the time structure, and obtains the driving operation rhythm interval. The control behavior output module extracts the control output signal within the current cycle based on the time overlap position between the drive operation rhythm interval and the PWM output signal boundary adjustment range. It analyzes the positional correspondence between the output signal and the rhythm time segment in the starting sequence, outputs the rhythm state of the timing sequence, and obtains the stepper motor monitoring and control execution behavior.
[0040] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A stepper motor monitoring and control method, characterized in that, Includes the following steps: S1: Obtain the time sequence of the rising edges of the target pulse and the feedback signal, analyze the step state time offset trend based on the direction of change of the relationship between adjacent cycles, and obtain the step offset trend marking information; S2: Based on the offset trend in the step offset trend marking information, select the voltage change period and current response interval of the sudden jump stage, divide the signal segment with the same direction, locate the trajectory corresponding to the fluctuating voltage and current, and obtain the disturbance influence time segment. S3: Based on the time distribution of the disturbance influence time segment within the PWM cycle, extract the time coordinates within the high and low level segments, locate the time position of the boundary signal, and cover it with the output segment to obtain the adjustment range of the PWM output signal boundary. S4: Based on the time position in the PWM boundary adjustment range, extract PWM segments of the same type in adjacent cycles, identify the overlapping sections of control boundaries and signal changes, and filter signal segments with consistent frequency characteristics in continuous cycles to obtain the drive operation rhythm interval. S5: Based on the time overlap relationship between the drive operation rhythm interval and the PWM boundary adjustment range, extract the timing sequence of mutually overlapping signals within the cycle, compare the start and rhythm sequence, and obtain the stepper motor monitoring and control execution behavior.
2. The stepper motor monitoring and control method according to claim 1, characterized in that, The step offset trend marking information includes the time sequence of the target pulse and the feedback pulse, the direction of change of the relationship between adjacent cycles, and the offset trend in time. The disturbance influence time segment includes the time period corresponding to voltage change, the current response time interval, the continuous fluctuation interval, and the signal segment with consistent trend. The PWM output signal boundary adjustment range includes the time position of the boundary signal, the time coordinate in the high and low level control segment, and the time position of the output segment coverage. The drive operation rhythm interval includes the overlapping position of the periodic control boundary, the repetitive sequence of signal types on the time axis, and the signal time period with consistent frequency characteristics. The stepper motor monitoring and control execution behavior includes the output signal timing, the rhythm structure sequence, and the signal output content.
3. The stepper motor monitoring and control method according to claim 1, characterized in that, The direction of change in the relationship between the preceding and following cycles refers to whether the time relationship of the signals between the control cycles of the stepper motor changes, and to identify the direction of change. The order of the target pulse and the feedback pulse in the continuous cycle is compared to determine whether the signals show a leading or lagging change. The stepping state time offset trend refers to analyzing the time difference between the target pulse and the feedback pulse, determining whether the stepper motor state has shifted in time, analyzing the time difference within a continuous period, and determining the direction of the stepping state offset of the motor. The rhythm sequence refers to the sequential arrangement of the start time and the rhythm of change of the stepper motor control signal on the time axis, which determines the consistency and coordination of the driving behavior and the feedback response in terms of timing.
4. The stepper motor monitoring and control method according to claim 1, characterized in that, The voltage surge period refers to the time period during which voltage signal changes are identified during the stepper motor control process. Abnormal fluctuations in the motor during this period are analyzed to assess whether the motor is affected by external interference and load fluctuations, and to monitor the changes in the control signal. The boundary signal time position refers to the extraction of the time node sequence of high and low level transitions within the PWM control cycle during the stepper motor control signal behavior recognition process. The time positions of the start and end points of the level changes in the sequence are analyzed, and the change process of the level state is tracked within the cycle to identify the transition points from high level to low level and from low level to high level. The rhythm interval refers to a continuous time period in which the PWM signal segment remains consistent in time and frequency and has a repetitive rhythmic characteristic in multiple control cycles.
5. The stepper motor monitoring and control method according to claim 1, characterized in that, The specific steps of S1 are as follows: S101: Obtain the rise time of the target step pulse in the stepper motor drive signal, extract the rise time of the actual displacement signal returned by the feedback device, call the time record at the corresponding time point in the same control cycle, analyze the order of the target pulse and the feedback pulse, and obtain the pulse time sequence of a single cycle. S102: Based on the single-cycle pulse time sequence, call the sequence state in adjacent cycles, identify the changes in the relationship between the target pulse and the feedback pulse, extract the direction of sequence change in adjacent cycles, and obtain the sequence change trend during the cycle. S103: Based on the sequential change trend during the period, analyze the direction of change of the time relationship between the target and the feedback pulse within the period, determine the continuous offset direction of the stepping state on the time axis, and obtain the stepping offset trend marking information.
6. The stepper motor monitoring and control method according to claim 1, characterized in that, The specific steps of S2 are as follows: S201: Based on the offset trend direction in the step offset trend marking information, extract the continuous change data of the driving voltage signal within the range, identify the continuous time period of amplitude change in the voltage curve, locate the boundary time point of the voltage change rate slowing down before and after the change, and obtain the voltage change duration interval. S202: Based on the voltage change duration interval, extract the current signal sampling sequence within the corresponding time period, identify the fluctuation segment in the current curve whose direction is consistent with the voltage change, filter the current interval with the same continuous fluctuation direction and varying amplitude, extract the continuous distribution range on the time axis, and obtain the time range corresponding to the voltage and current trends. S203: Based on the time range corresponding to the voltage and current trends, extract the voltage and current signal sequences within the continuous period, locate the intervals on the time axis where fluctuations occur continuously, analyze the positional relationship between the voltage and current signals that change simultaneously within the time period, and obtain the time segment affected by the disturbance.
7. The stepper motor monitoring and control method according to claim 1, characterized in that, The specific steps for S3 are as follows: S301: Based on the start and end times of the disturbance influence time segment, compare the high-level and low-level segments in the current PWM output cycle, locate the corresponding position of the disturbance time segment in the control segment, extract the time coordinates of the time segment in the high and low level control segments, and obtain the control coordinates of the disturbance interval. S302: Based on the control coordinates of the disturbance interval, identify the edge time of the level change in the control segment within the PWM cycle, track the position of the boundary signal adjacent to the disturbance time, extract the time coordinates of the corresponding edge point in the segment, and obtain the edge time of the control segment. S303: Based on the edge time of the control segment, compare it with the output segment time range in the PWM periodic control structure, analyze the coverage relationship between the edge time and the output segment, filter the covered output time segment positions, and obtain the PWM output signal boundary adjustment range.
8. The stepper motor monitoring and control method according to claim 1, characterized in that, The specific steps of S4 are as follows: S401: Based on the time position within the boundary adjustment range of the PWM output signal, extract PWM control segments with the same signal type in the current cycle and the preceding and following cycles, match segments in order of time axis, and filter continuous time positions under the same signal type to obtain the time distribution of the same control segments. S402: Based on the time distribution of the same control segment, identify the signal change time period corresponding to the control boundary, determine the repeating part of the signal change area in the previous and next cycles on the periodic time axis, extract the start and end time interval of the overlapping segment, and obtain the periodic repetition time position. S403: Based on the periodic repetition time position, compare the frequency change amplitude under the condition of continuous time, identify the signal time period in which the frequency change amplitude is in the same range in the period, and obtain the driving operation rhythm interval.
9. The stepper motor monitoring and control method according to claim 1, characterized in that, The specific steps of S5 are as follows: S501: Based on the frequency control segment in the drive operation rhythm interval and the signal segment time in the boundary adjustment range of the PWM output signal, compare the time segment of the drive signal in the current cycle, filter the signal segments that overlap with the occurrence time, and extract the corresponding signal sequence to obtain the signal timing within the coverage segment; S502: Based on the signal timing within the coverage area, extract the starting position of each signal segment on the time axis, arrange them in order, and compare them segment by segment with the time sequence in the rhythm structure to identify the positions of segments with the same sequence and obtain the sequence-matched time segments. S503: Based on the sequential matching time segment, extract the drive signal content at the corresponding position in the current cycle, compare it with the output rhythm set in the drive circuit control structure, identify the control behavior that maintains a corresponding relationship with the rhythm structure, and obtain the stepper motor monitoring and control execution behavior.
10. A stepper motor monitoring and control system, characterized in that, The system is used to implement the stepper motor monitoring and control method according to any one of claims 1-9, the system comprising: The pulse sequence recognition module acquires the rise time of the target step pulse and the feedback displacement signal, compares the time sequence relationship of the signals within the same cycle, analyzes the direction of the sequence change between adjacent cycles, analyzes the time offset state of the step control behavior within the cycle, and obtains the step offset trend marking information. The response time zone filtering module extracts the driving voltage mutation segment and current response interval based on the step offset trend marker information offset trend, filters the time segment with the same continuous fluctuation direction, and obtains the disturbance influence time segment by comparing the corresponding positions of voltage change and current response behavior on the time axis. Based on the position of the disturbance influence time segment in the PWM cycle, the signal boundary positioning module maps the segment to high-level and low-level control output segments respectively, analyzes the boundary distribution in the output structure, extracts the boundary time period of control adjustment, and obtains the boundary adjustment range of the PWM output signal. The frequency band rhythm comparison module extracts the same type of PWM signal segments in adjacent cycles based on the time information of the adjustment range of the boundary of the PWM output signal, compares the frequency control rhythm position on the time axis, filters the output segments with continuous repetitive rhythm of time structure, and obtains the driving operation rhythm interval. The control behavior output module extracts the control output signal within the current cycle based on the time overlap position between the drive operation rhythm interval and the PWM output signal boundary adjustment range, analyzes the positional correspondence between the output signal and the rhythm time segment in the starting sequence, outputs the rhythm state of the timing sequence, and obtains the stepper motor monitoring and control execution behavior.
Citation Information
Cited By
Torque adaptive control method for multi-shaft servo motor
CN121770420A
Torque adaptive control method for multi-axis servo motor
CN121770420B