CN118100708A - Load detection method of motor, stepping motor driver and computer device - Google Patents

Load detection method of motor, stepping motor driver and computer device Download PDF

Info

Publication number
CN118100708A
CN118100708A CN202410328112.3A CN202410328112A CN118100708A CN 118100708 A CN118100708 A CN 118100708A CN 202410328112 A CN202410328112 A CN 202410328112A CN 118100708 A CN118100708 A CN 118100708A
Authority
CN
China
Prior art keywords
voltage
point
value
current
motor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410328112.3A
Other languages
Chinese (zh)
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xhorse Electronics Co Ltd
Original Assignee
Shenzhen Xhorse Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Xhorse Electronics Co Ltd filed Critical Shenzhen Xhorse Electronics Co Ltd
Priority to CN202410328112.3A priority Critical patent/CN118100708A/en
Publication of CN118100708A publication Critical patent/CN118100708A/en
Pending legal-status Critical Current

Links

Landscapes

  • Control Of Stepping Motors (AREA)

Abstract

The application relates to a load detection method of a motor, a stepping motor driver, a computer device and a storage medium. The method comprises the following steps: acquiring an induced voltage value corresponding to the current speed of the motor; performing induced voltage compensation processing on the voltage of the motor based on the induced voltage value to obtain a compensated voltage point; acquiring a reference current point on a current signal of the motor; determining a reference phase difference between the reference current point and the compensated voltage point; and detecting the load of the motor based on the reference phase difference. The method can accurately reflect the load of the motor.

Description

Load detection method of motor, stepping motor driver and computer device
Technical Field
The present application relates to the field of computer technology, and in particular, to a load detection method for a motor, a stepper motor driver, a computer device, and a storage medium.
Background
The principle of the stepping motor driver is that the magnitude and the direction of the current flowing through the motor coil are controlled by controlling the on-off state of the H bridge, so that the current of the phase A and the phase B of the motor is in sinusoidal change with the phase difference of 90 degrees. Under the same rotation speed, the larger the load is, the smaller the phase difference between the counter electromotive force and the current is, namely, when the load is 0, the phase difference is 90 degrees, and when the load is larger, the phase difference is 0, and the principle of load detection is adopted. The conventional method is to measure the phase difference between the voltage and the current at two ends of the coil to perform load detection. However, the conventional method generates a large error in load detection, and thus erroneous judgment occurs.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a load detection method of a motor, a stepping motor driver, a computer device, and a storage medium, which can accurately reflect the load of the motor.
A method of load detection of an electric machine, the method comprising:
Acquiring an induced voltage value corresponding to the current speed of the motor;
performing induced voltage compensation processing on the voltage of the motor based on the induced voltage value to obtain a compensated voltage point;
Acquiring a reference current point on a current signal of the motor;
determining a reference phase difference between the reference current point and the compensated voltage point;
And detecting the load of the motor based on the reference phase difference.
A stepper motor driver for carrying out the steps of an embodiment of a method for load detection of each motor.
A computer device comprising a memory storing a computer program and a processor implementing the steps of a load detection method embodiment of each motor when the computer program is executed.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of an embodiment of a load detection method for each motor.
According to the motor load detection method, the stepping motor driver, the computer equipment and the storage medium, the voltage of the motor is subjected to induction voltage compensation processing based on the induction voltage value, and the influence of the induction voltage is removed from the compensated voltage point; and then, the reference phase difference between the reference current point and the compensated voltage point is determined, the influence of the induced voltage on the phase difference is reduced to the greatest extent, only the influence of back electromotive force on the phase difference is reserved, the compensated reference phase difference can accurately reflect the load of the motor, especially the out-of-step and locked-rotor of the motor, and the accuracy of load detection is improved.
Drawings
FIG. 1 is an application environment diagram of a load detection method of a motor in one embodiment;
FIG. 2 is a schematic diagram of motor phase differences in one embodiment;
FIG. 3 is a schematic diagram of a motor circuit in one embodiment;
FIG. 4 is a schematic diagram of the Europe voltage, back EMF, and inductively induced voltage relationship in one embodiment;
FIG. 5 is a flow chart of a load detection method according to an embodiment;
FIG. 6 is a schematic diagram of a charge-discharge cycle (chopping cycle) in one embodiment;
FIG. 7 is a schematic diagram of a hollow time-varying phase difference measurement according to an embodiment;
FIG. 8 is a schematic diagram of a scenario corresponding to each current measurement state in one embodiment;
FIG. 9 is a schematic diagram of a load detection module in one embodiment;
fig. 10 is an internal structural view of a computer device in one embodiment.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without any inventive effort, are intended to be within the scope of the application.
It should be noted that, in the embodiments of the present application, all directional indicators (such as up, down, left, right, front, and rear … …) are merely used to explain the relative positional relationship, movement conditions, and the like between the components in a specific posture (as shown in the drawings), if the specific posture is changed, the directional indicators correspondingly change, and the connection may be a direct connection or an indirect connection.
Furthermore, descriptions such as those referred to as "first," "second," and the like, are provided for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implying an order of magnitude of the indicated technical features in the present disclosure. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present application.
The terms "first," "second," and the like, as used herein, may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one data element from another. For example, the first current measurement state may be referred to as a second current measurement state, and similarly, the second current measurement state may be referred to as a first current measurement state, without departing from the scope of the present application. Both the first current measurement state and the second current measurement state are current measurement states, but they are not the same current measurement state.
It is to be understood that in the following embodiments, "connected" is understood to mean "electrically connected", "communicatively connected", etc., if the connected circuits, modules, units, etc., have electrical or data transfer between them.
The load detection method of the motor provided by the application can be applied to the application environment as shown in fig. 1. Fig. 1 is an application environment diagram of a load detection method of a motor in one embodiment. Fig. 1 includes a motor drive 110, an H-bridge 120, and a motor 130. The load detection method in the embodiments of the application is applied to the motor driver. The motor in the embodiments of the application is specifically a stepper motor. Fig. 2 is a schematic diagram of voltage and current signals of a motor in one embodiment. The voltage signal of the motor refers to the voltage signal at two ends of the motor, and the current signal of the motor refers to the current signal flowing through the motor. Fig. 2 is a schematic diagram of motor phase differences in one embodiment. As shown in fig. 2, the phase of the voltage signal leads the current signal. The phase difference pd between the two can be used to represent the load of the motor. The voltage rising stage is a stage in which the absolute value of the voltage increases, and the voltage falling stage is a stage in which the absolute value of the voltage decreases. The reference voltage point typically used for phase difference detection is a voltage zero point or a voltage peak point. After the induced voltage compensation processing is carried out on the voltage, the position of the compensated voltage point relative to the original reference voltage point is right.
Specific load detection principle: the rotor of the stepping motor is magnetic, so that magnetic induction lines can be generated, and when the stepping motor rotates, the coil on the stator is equivalent to cutting the magnetic induction lines, and therefore counter electromotive force can be generated in the coil, and the higher the rotating speed is, the larger the counter electromotive force is, and the counter electromotive force also changes sinusoidally.
Due to the existence of back electromotive force, coil self inductance and the like, a phase difference is generated between the voltage and the current at the two ends of the coil, and when a load changes, the phase shift is generated by the back electromotive force, so that the phase difference between the voltage and the current at the two ends of the coil is changed. Measuring the phase difference change can thus also detect a change in load.
When the motor rotates, the voltages at two ends of the H bridge are simplified to comprise ohmic voltage RI, back electromotive force U emf and inductance induction voltage U L. In the current rising and falling stages, the directional relation between ohmic voltage and back electromotive force and inductance induced voltage is shown in fig. 3. Fig. 3 is a schematic diagram of a motor circuit in one embodiment. The left diagram of fig. 3 shows the current rising phase, and the right diagram shows the current falling phase. Motor terminal voltage u=ri+u emf+UL during the current rise phase and motor terminal voltage u=ri-U emf-UL during the current fall phase. In the current drop phase, when RI is equal to the sum of U emf and U L, the voltage U is 0. Fig. 4 is a schematic diagram of the ohm voltage, back emf, and inductively induced voltage relationship in one embodiment. The phase of the inductive voltage is always 90 degrees out of phase with the phase of the current. When the rotating speed is not particularly high, the amplitude of the induced voltage is smaller than the counter electromotive force, so that the influence of the inductive induced voltage on the phase difference is smaller when the motor rotates. However, when the motor is locked, the back electromotive force is small, and the inductive voltage still exists and has larger influence; at this time, the voltage and the current still have a phase difference, and the faster the current changes, the larger the phase difference. Because of the influence of the inductive voltage, the phase difference between the voltage and the current cannot accurately reflect the load size and whether the load is locked or not. At this time, the compensation processing of the induced voltage is needed, the influence of the induced voltage on the phase difference is reduced to the greatest extent, only the influence of the back electromotive force on the phase difference is reserved, and the compensated phase difference can accurately reflect the load size and whether the rotation is blocked or not.
In the right diagram of fig. 3, in the current falling stage, the counter electromotive force direction is taken as the positive direction, and when the motor rotates normally, the voltages at the two ends of the coil are as follows:
Uwork=Uemf+UL-RI
When the motor is locked, the voltages at the two ends of the coil are as follows:
Ustall=UL-RI
It is thus considered that during the current drop phase, a back emf exists when the voltage across the coil is greater than U L -RI. And because the inductive voltage and ohmic voltage are varied:
UL-RI=wLImaxcoswt-RImaxsinwt
During the current drop phase, the value of U L -RI is increased, the maximum value is the peak value U Lmax=wLImax of the induced voltage, here U Lmax represents the changed value of U L -RI, and when the voltage across the coil is greater than U Lmax, back electromotive force exists. And at this time, it can be considered that the phase difference from the compensated voltage zero point to the current zero point (or from the compensated voltage peak point to the current peak point) is only generated by the influence of back electromotive force, and the larger the phase difference is, the smaller the load is represented by the phase difference being able to reflect the size of the load; the smaller the phase difference, the larger the load; when the phase difference is close to 0, the locked rotor is indicated.
Through the above analysis, a load detection method in an embodiment of the present application is provided, as shown in fig. 5, which is a schematic flow chart of the load detection method in an embodiment, where the load detection method is applied to a motor driver, and includes the following steps:
step 502, obtaining an induced voltage value corresponding to the current speed of the motor.
The current speed of the motor refers to the speed of the motor in the running process, and specifically can be the current angular speed of the motor and the like. The induced voltage value includes an induced voltage of the motor coil inductance, which may refer to an induced voltage maximum value. The induced voltage value may also include a self-induced voltage, a mutual inductance voltage, and the like.
Specifically, the motor driver obtains a current angular velocity of the motor, and determines an inductance induction voltage corresponding to the current angular velocity based on the current angular velocity of the motor, the coil inductance, and a target current value of the motor.
And 504, performing induced voltage compensation processing on the voltage of the motor based on the induced voltage value to obtain a compensated voltage point.
The induced voltage compensation process for the voltage of the motor means subtracting the effect of the induced voltage from the voltage.
Specifically, the motor driver performs induced voltage compensation processing on the voltage of the motor, removes the voltage influence caused by the induced voltage value, and obtains a compensated voltage point. For example, after the voltage reference point is selected, for example, umax is subtracted by the induced voltage value, and the point corresponding to the compensated voltage value on the voltage signal is the compensated voltage point.
Step 506, obtaining a reference current point on a current signal of the motor.
Specifically, the current signal of the motor refers to the current signal flowing through the motor. The reference current point refers to a point for measuring a phase difference between a voltage and a current across the motor. The reference current point may be a current zero point, a current peak point, or the like.
Step 508, determining a reference phase difference between the reference current point and the compensated voltage point.
Specifically, the voltage signal leads the current signal. Thus, the motor driver can start timing from the compensated voltage point to the reference current point, thereby obtaining the reference phase difference.
Alternatively, the motor driver may make a measurement of the reference phase difference through the comparator. Setting the threshold value of the comparator as a compensated voltage value, and turning over the comparator when the compensated voltage value is reached to start timing; stopping timing when the reference current value corresponding to the reference current point is reached, and obtaining the reference phase difference between the reference current point and the compensated voltage point.
Step 510, load detection of the motor is performed based on the reference phase difference.
Specifically, the motor driver performs load detection of the motor based on the reference phase difference, and obtains a load detection result. The load detection result may be normal, locked rotor, out of step, etc. And when the reference phase difference is smaller than the stalling threshold, determining that the motor stalls. Under the condition of motor locked-rotor, the motor driver can execute power-off operation and the like to ensure the safety of the motor. And determining that the motor is out of step when the fluctuation between the reference phase differences exceeds a fluctuation threshold. In the case of motor step-out, the motor driver may adjust a target current value of the motor, etc.
In the embodiment, the voltage of the motor is subjected to induction voltage compensation processing based on the induction voltage value, and the influence of the induction voltage is removed from the compensated voltage point; and then, by determining the reference phase difference between the reference current point and the compensated voltage point, the influence of the induced voltage on the phase difference is reduced to the greatest extent, only the influence of back electromotive force on the phase difference is reserved, the compensated reference phase difference can more accurately reflect the load of the motor, especially correctly reflect the step-out and locked-rotor of the motor, and the accuracy of load detection is improved.
In one embodiment, performing an induced voltage compensation process on a voltage of a motor based on an induced voltage value to obtain a compensated voltage point, including:
in the current chopper mode, determining a time compensation value based on the induced voltage value;
And in the current falling stage of the motor, taking the voltage point, which corresponds to the time compensation value, of the difference between the discharging time and the charging time in the chopping period as the compensated voltage point.
Specifically, in order to enable the current in the coil to change sinusoidally, one of the regulation modes is to use a current chopper, a sampling circuit samples the current in a loop, and the H bridge is turned off when the sampled current is larger than the target current through a comparator. However, the direct current regulation mode makes current fluctuation larger, and the resultant torque has fluctuation, so that the motor has noise in the rotating process, and the higher the rotating speed is, the larger the noise is. In the current chopper mode, according to the bipolar SPWM (Sine pulse width modulation, sinusoidal pulse width modulation) principle, half of the time in the PWM (Pulse width modulation ) period is charged, and the equivalent voltage is 0 when the other half is fast-discharged. As shown in fig. 6, a schematic diagram of a charge-discharge cycle (chopping cycle) in one embodiment is shown. The current chopper charges and discharges in a period of fast charge-slow discharge-fast discharge-slow discharge, the charging reaches a target value, the comparator stops charging after turning over, then the current chopper enters a slow discharge stage of fixed time, then enters a fast discharge stage, the current chopper stops after turning over the comparator, and finally enters the slow discharge stage of fixed time. And the electric quantity in the slow-release stage is small and can be ignored. The charge-discharge period in fig. 6 can be regarded as a special PWM period, and is a voltage zero point when the charge and the fast-discharge time are equal (corresponding to a duty ratio of 0).
As shown in fig. 7, a schematic diagram of a hollow phase change measurement in one embodiment is shown. The period corresponding to one peak in fig. 7 corresponds to one period in fig. 6. In fig. 7, the sine wave is a current curve, and the square wave indicates a phase difference. In the current falling stage, when the charging time is equal to the fast discharging time, the square wave is pulled up to indicate that the voltage zero point is reached, and the voltage zero point is pulled down again. Then, during the induced voltage compensation, the induced voltage value compensation can be converted into a time compensation value for compensation within the period. On the left side of the voltage zero point, the charging time is longer than the discharging time; on the right side of the voltage zero, the discharge time is longer than the charge time. When at the voltage zero point, the charge time is equal to the discharge time. And in the current falling stage of the motor, the voltage point corresponding to the discharging time-charging time=time compensation value in the chopping period is taken as the compensated voltage point at the right side of the voltage zero point.
In this embodiment, in the current chopper mode, the current value is directly adjusted, so that the current value can be directly determined, but the voltage at both ends of the coil cannot be determined without a voltage measurement circuit on hardware, so that a voltage point which can be used for load detection is determined by setting a time compensation value, thereby determining a reference phase difference, the influence of inductive voltage is reduced to the greatest extent by the reference phase difference, the load condition of the motor can be accurately determined, and the voltage value measurement is performed without an additional setting circuit, thereby saving the cost.
In one embodiment, determining the time compensation value based on the induced voltage value includes determining the time compensation value based on a product of the induced voltage value and the chopping period, a ratio of the product to the supply voltage.
Specifically, the induced voltage value is converted into a time compensation value Δt by:
wherein U Lmax is an induced voltage value, T is a chopping period (in a chopping mode), and U is a power supply voltage.
In this embodiment, the time compensation value is determined based on the product of the induced voltage value and the chopping period, and the ratio of the product to the power supply voltage, which is equivalent to the compensation of the corresponding time of the duty ratio, and the finally obtained reference phase difference reduces the influence of the induced voltage of the inductor to the maximum extent, so that the load condition of the motor can be determined correctly.
In one embodiment, determining the time compensation value based on a product of the induced voltage value and the chopping period, a ratio of the product to the supply voltage, includes:
Acquiring a speed correlation coefficient related to the current speed;
a time compensation value is determined based on the velocity correlation coefficient, the product of the induced voltage value and the chopping period, and the ratio of the product to the power supply voltage.
Specifically, in the working process of the motor, besides the counter electromotive force, the self inductance, mutual inductance, magnetic field and other factors of the A-phase and B-phase coils can influence the voltage and current phase difference, and particularly under the high-speed condition, larger errors can be generated in load detection, so that the locked rotation and normal rotation are erroneously judged. Therefore, a velocity correlation coefficient is introduced, and the self-induced voltage, the mutual inductance voltage, and the like are represented by the velocity correlation coefficient K v multiplied by the induced voltage value U Lmax. The range of the velocity correlation coefficient can be 1-2, and the coefficient is used for compensating the influence of coil self inductance, mutual inductance, magnetic field and the like on phase difference measurement. The greater the current motor speed, the greater the speed-related coefficient.
The method for converting the induced voltage value into a time compensation value comprises the following steps:
In the embodiment, the time compensation value is determined based on the product of the speed correlation coefficient, the induced voltage value and the chopping period, and the ratio of the product to the power supply voltage, and the time compensation value can be used for compensating the influence of coil self inductance, mutual inductance and magnetic field on phase difference measurement by introducing the speed correlation coefficient, so that the influence of the induced voltage of the inductor is reduced to the greatest extent, and the load condition of the motor can be obtained correctly.
In one embodiment, performing an induced voltage compensation process on a voltage of a motor based on an induced voltage value to obtain a compensated voltage point, including:
In the mute mode, and in a voltage rising stage of the voltage signal, when a voltage point where the target value is equal to a value determined based on the induced voltage value is obtained, the voltage point is taken as a compensated voltage point.
In order to make the current in the coil change sinusoidally, one of the regulation modes is a voltage type PWM regulation mode (i.e. mute mode): the method indirectly adjusts the current to change in a sine way through adjusting the voltage, the current fluctuation is small, no noise is generated basically in the rotation process of the motor, but the response speed of the device is low, and the method is suitable for medium-low speed conditions.
The target value may be a voltage value or a duty ratio value. When the target value is a voltage value, the value determined based on the induced voltage value is the induced voltage value itself or a speed correlation coefficient multiplied by the induced voltage value; when the target value is the duty ratio value, the value determined based on the induced voltage value is the duty ratio value. The point corresponding to the compensated voltage point is the voltage zero point.
Specifically, in the mute mode, in the voltage rising stage of the voltage signal, when a voltage point at which the voltage value U cur is equal to the induced voltage value U Lmax is obtained, the voltage point is taken as the compensated voltage point:
Ucur=Kv·ULmax
Or the voltage value is equal to the induced voltage value, and can be specifically represented by a time compensation value, for example:
Optionally, in the mute mode, in a voltage rising stage of the voltage signal, when a voltage point where the duty ratio duty 0 of the current voltage is equal to the induced voltage value U Lmax/the power supply voltage U is detected, the voltage point is taken as a compensated voltage point:
Or in particular also by a time compensation value, such as:
Alternatively, the reference phase difference may be directly determined based on the compensated voltage point and the current zero point. Or determining the phase difference between the compensated voltage point and the current peak point, and subtracting a quarter period value from the phase difference to obtain a reference phase difference.
In this embodiment, in the mute mode, when a voltage point with a target value equal to a value determined based on an induced voltage value is obtained in a voltage rising stage of a voltage signal, the voltage point is used as a compensated voltage point, so that a compensation point corresponding to an original voltage zero point can be obtained, that is, compensation is performed for the voltage, and the influence of an inductance voltage is removed, so that the determined phase difference can accurately reflect the load of the motor.
In one embodiment, performing an induced voltage compensation process on a voltage signal of a motor based on an induced voltage value to obtain a compensated voltage point, includes:
in a mute mode, obtaining a voltage maximum value of a voltage signal of the motor;
In a voltage drop stage of the voltage signal, and when a voltage point where the target value is equal to the maximum value of the voltage minus a value determined based on the induced voltage value is obtained, the voltage point is taken as a compensated voltage point.
The target value may be a voltage value or a duty ratio value. The voltage maximum manifestation may be a voltage peak. When the target value is a voltage value, the value determined based on the induced voltage value is the induced voltage value itself; when the target value is the duty ratio value, the value determined based on the induced voltage value is the duty ratio value. The point corresponding to the compensated voltage point is the voltage peak point.
Specifically, in the mute mode, in the voltage drop stage of the voltage signal, when a voltage point is obtained at which the voltage value U cur is equal to the voltage maximum value U work_max minus the induced voltage value U Lmax, the voltage point is taken as the compensated voltage point:
Ucur=Uwork_max-Kv·ULmax
Or the voltage value is equal to the induced voltage value, and can be specifically represented by a time compensation value, for example:
Optionally, in the mute mode, in a voltage drop stage of the voltage signal, when the duty max of the current voltage is detected to be equal to the voltage point where the induced voltage value U Lmax/the power supply voltage U is subtracted from the voltage maximum value U work_max, the voltage point is taken as the compensated voltage point:
Or in particular also by a time compensation value, such as:
Alternatively, the reference phase difference may be directly determined based on the compensated voltage point and the current peak point. Or determining the phase difference between the compensated voltage point and the current zero point, and subtracting a quarter period value from the phase difference to obtain a reference phase difference.
In this embodiment, in the mute mode, when a voltage point where the target value is equal to the maximum voltage minus the value determined based on the induced voltage value is obtained in the voltage drop stage of the voltage signal, the voltage point is used as a compensated voltage point, so that a compensation point corresponding to the original voltage peak point can be obtained, that is, the voltage is compensated, the influence of the inductance voltage is removed, and the determined phase difference can accurately reflect the load of the motor.
In one embodiment, obtaining a reference current point on a current signal of a motor includes: in the mute mode, when in a first current measurement state, taking a current zero point as a reference current point; when in the second current measurement state, the current peak point is taken as a reference current point.
In the mute mode, the voltage value is determined, so that the actual voltage peak value and the voltage zero point can be known, and the current peak value and the current zero point are difficult to determine. Also, since a single sampling resistor connected to the motor is used, the current flowing through the sampling resistor is measured by the comparator to reflect the current flowing through the motor, the current signal has a current non-measurable region when the voltage of the motor is zero. The current non-measurable area means that the current in the area cannot be displayed correctly. Fig. 8 is a schematic diagram of a scenario corresponding to each current measurement state in one embodiment. (a) is a first scene diagram, (b) is a second scene diagram, (c) is a third scene diagram, and (d) is a fourth scene diagram.
First scene: the point S 0 can be seen, and then the point S 1 can be seen before the current non-variable region (t-blank region) is entered, and the current peak point can be obtained through the point S 0 and the point S 1. The phase difference can be measured from Umax and Imax at this time. Thus, the first scenario refers to the fact that two points up to the comparator threshold can be obtained within a half-wave period.
The second scenario: the point S 0 can be seen and then the point S 1 is not seen before entering the t-blank region, and the current zero must be seen in this scenario. The phase difference is measured at this time from u=0 and i=0. The second scenario refers to obtaining a point and current zero that reach the comparator threshold in one half-wave period.
Third scenario: only point S 0 can be seen, the t-blank region covering point S 1 and the current zero. At this time, the time of entering the t-blank region is taken as the point S 1, and an approximate current peak point can be obtained through calculation, and the phase difference is measured according to Umax and Imax. The third scenario refers to obtaining one point in one half-wave period up to the comparator threshold but not the second point and the current zero.
Fourth scenario: point S 0 is not visible, when if the current zero can be seen, the phase difference is measured according to u=0 and i=0; if neither S 0、S1 nor zero is visible, the last measurement is maintained. The fourth scenario refers to a scenario in which all three current points are within the current non-controllable region or a scenario in which only the current zero point is not within the current non-controllable region.
In the final phase difference measurement, the situation that the phase difference is determined by the voltage zero point and the current zero point is preferential, and the current zero point can be measured basically and accurately in the first scene, the second scene and the fourth scene. When the third scenario occurs (high voltage, high load, low rotational speed conditions are more likely to occur), the phase difference determined based on the voltage zero and the current zero is discarded. Thus, the first current measurement state includes states corresponding to the second scenario and the fourth scenario, and the second current measurement state includes states corresponding to the third scenario. The first scenario may be categorized in a first current measurement state or in a second current measurement state.
In this embodiment, in order to save cost in the mute mode, a mode of sampling the motor current by using a single resistor is adopted, and a current non-measurable area occurs when the voltage is zero, so that the selection of the reference current point should be determined based on each current scene; when the motor is in the first current measurement state, the current zero point is used as a reference current point, and when the motor is in the second current measurement state, the current peak point is used as a reference current point, so that the value of a current non-measurable area can be avoided as much as possible, a more accurate current point can be obtained, and the load condition of the motor can be accurately represented through the reference phase difference.
In one embodiment, load detection of a motor based on a reference phase difference includes: and when the reference phase difference is lower than the stall threshold, determining that the motor stalls.
Wherein the stall threshold is pre-stored in the motor drive. The rotation blocking threshold is also expressed in terms of a phase difference. The reference phase difference may be expressed in micro-steps, and likewise, the stall threshold may be expressed in micro-steps.
In particular, the phase difference may characterize the relative magnitude of the load. When the reference phase difference is far greater than the stalling threshold p, the current load is smaller; when the load is slowly increased, the reference phase difference is slowly close to the locked-rotor threshold value; and judging that the rotation is blocked when the reference phase difference is lower than the rotation blocking threshold value.
In this embodiment, after the influence of the induced voltage is removed, when the reference phase difference is lower than the stall threshold, the stall of the motor is determined, so that the stall of the motor can be correctly determined, and measures are taken accordingly to ensure the normal operation of the motor.
In one embodiment, load detection of a motor based on a reference phase difference includes: and when the fluctuation of the reference phase difference is larger than a fluctuation threshold value, determining that the motor is out of step.
Specifically, the motor driver detects the fluctuation condition of the phase difference, and when the fluctuation is large, the motor is indicated to be out of step, and the higher the out-of-step degree is, the larger the phase difference fluctuation is. When the fluctuation of the reference phase difference exceeds the fluctuation threshold Δp, a step-out signal is generated.
In this embodiment, after the influence of the inductance voltage is removed, when the fluctuation of the reference phase difference is greater than the fluctuation threshold, it is determined that the motor is out of step, so that the motor can be correctly judged to be out of step, and measures are taken accordingly to ensure the normal operation of the motor.
In one embodiment, a load detection method of an electric machine includes:
And (a 1) obtaining an induced voltage value corresponding to the current speed of the motor.
Step (a 2), obtaining a speed correlation coefficient related to the current speed while in the current chopper mode.
And (a 3) determining a time compensation value based on the velocity correlation coefficient, the product of the induced voltage value and the chopping period, and the ratio of the product to the power supply voltage.
And (a 4) in the current falling stage of the motor, taking the voltage point with the difference between the discharging time and the charging time in the chopping period as the voltage point corresponding to the time compensation value as the compensated voltage point.
And (a 5) in the mute mode, and in a voltage rising stage of the voltage signal, and performing phase difference measurement using a voltage zero point, when a voltage point having a target value equal to a value determined based on the induced voltage value is obtained, taking the voltage point as a compensated voltage point.
And (a 6) in the mute mode, performing phase difference measurement by adopting a voltage peak point, and obtaining the voltage maximum value of the voltage signal of the motor.
And (a 7) taking the voltage point as the compensated voltage point in a voltage drop stage of the voltage signal and when the voltage point where the target value is equal to the maximum value of the voltage minus the value determined based on the induced voltage value is obtained.
And (a 8) in the mute mode, acquiring the voltage maximum value of the voltage signal of the motor.
And (a 9) taking the voltage point as the compensated voltage point in a voltage drop stage of the voltage signal and when the voltage point where the target value is equal to the maximum value of the voltage minus the value determined based on the induced voltage value is obtained.
And (a 10) acquiring a reference current point on a current signal of the motor.
And (a 11) determining a reference phase difference between the reference current point and the compensated voltage point.
And (a 12) determining that the motor is locked when the reference phase difference is lower than the locked threshold value.
And (a 13) determining that the motor is out of step when the fluctuation of the reference phase difference is greater than a fluctuation threshold.
In this embodiment, based on the induced voltage value and the reference phase difference, the load of the motor can be determined in both the chopper mode and the mute mode, the related parameters are the same, the cost is low, the influence of the induced voltage on the phase difference is reduced to the greatest extent, only the influence of the back electromotive force on the phase difference is reserved, the load size can be accurately reflected by the compensated reference phase difference, and the accuracy of load detection is improved.
In one embodiment, a load detection method without using a sensor is provided, in which load detection is achieved by measuring a phase difference between voltage and current in a current chopper and in a mute mode, and meanwhile, in order to improve load detection accuracy, a compensation value Δt is set, and effects of factors such as self inductance, mutual inductance and magnetic field of a compensation coil on phase difference measurement are compensated at different rotation speeds, as follows:
1. Load detection principle
Under the condition of higher speed, the influence of the mutual inductance voltage and the magnetic field of the A-phase and B-phase coils is not negligible except for the self-inductance voltage U L, so that a speed-dependent coefficient K v is introduced, and the self-inductance voltage, the mutual inductance voltage and the like are represented by K vULmax. The value range can be 1-2, the coefficient is used for compensating the influence of coil self inductance, mutual inductance, magnetic field and the like on phase difference measurement, and the K v value can be increased when the speed is increased. After adding the K v coefficient, the zero point of the compensated voltage is K vULmax, and the peak point of the voltage is U work_max-KvULmax.
The conversion of the voltage compensation K vULmax into the time compensation value Δt is:
ULmax=wLImax
in the above formula, L is a coil inductance, I max is a current peak, w is an angular velocity, T is a chopping period (in chopping mode) or a PWM period (in mute mode), and U is a power supply voltage.
2. Phase difference measurement under current chopper
In the current chopper mode, since the current value is directly regulated, the current peak value and the current 0 point are known. However, the voltage across the coil cannot be determined without a voltage measurement circuit on hardware (in this mode, the embodiment of the present invention determines an approximate voltage zero by setting Δt to measure the phase difference between voltage and current), and the voltage peak point is not well determined, so the phase difference is measured according to u=0 and i=0. According to the bipolar SPWM modulation principle, half of the time in the PWM period is charged, and the equivalent voltage is 0 when the other half of the time is rapidly discharged. In chopper mode, the charge-discharge cycle shown in fig. 6 can be regarded as a special PWM cycle, and is a voltage zero point when the charge and the fast-discharge time are equal (corresponding to a duty ratio of 0). The compensated voltage zero is: in the current falling stage, the fast amplifying time is larger than the voltage point of the charging time delta t. The phase difference from the zero point of the compensated voltage to the zero point of the current reduces the influence of the inductive voltage to the greatest extent, and can more accurately reflect the load size and whether the load is locked or not.
3. Phase difference measurement in silent mode
In the mute mode, the voltage peak and the voltage zero are known, and only the current peak or the current zero needs to be determined. The current peak or current zero is measured by setting a threshold S and a zero value.
First scene: the point S 0 can be seen, and then the point S 1 can be seen before entering the current non-viable area, and the peak point of the current can be obtained through the points S 0 and S 1. The phase difference can be measured from Umax and Imax at this time.
The second scenario: the point S 0 can be seen and then the point S 1 is not seen before entering the t-blank region, and the current zero must be seen in this scenario. The phase difference is measured at this time from u=0 and i=0.
Third scenario: only point S 0 can be seen, the t-blank region covering point S 1 and the current zero. At this time, the time of entering the t-blank region is taken as the point S 1, and an approximate current peak point can be obtained through calculation, and the phase difference is measured according to Umax and Imax.
Fourth scenario: point S 0 is not visible, when if the current zero can be seen, the phase difference is measured according to u=0 and i=0; if none of the zeros is visible at S 0,S1, the last measurement is maintained.
Similarly, in order to reduce the influence of coil self inductance, mutual inductance and magnetic field on phase difference measurement, on the basis of the measured current peak point and the measured current 0 point, a compensated voltage 0 point and a compensated voltage peak point Umax are determined according to Δt, and finally, a compensated phase difference value is determined, so that the accuracy of load detection is improved.
In the mute mode, the phase difference between Umax and Imax is sometimes measured, and the phase difference between u=0 and i=0 is sometimes measured, as compared with the phase difference measured in the current chopper mode. In case Umax and Imax determine the phase difference, the compensated voltage peak point can be determined from Δt: the duty max=(Uwork_max/U)-Δt/Tpwm, i.e. when the duty max is equal to the PWM duty cycle applied, the voltage point corresponding to the duty max is the compensated voltage peak point Umax.
In the case where u=0 and i=0 determine the phase difference, one duty ratio value can be determined from Δt: and the duty 0=Δt/Tpwm determines the voltage point corresponding to the duty 0 as the compensated voltage zero point when the duty 0 is equal to the applied PWM duty ratio, so as to realize the compensation of the phase difference measurement.
In the final phase difference measurement, the phase difference is determined by u=0 and i=0 preferentially, and the first scene, the second scene and the fourth scene can basically accurately measure the i=0 point. When the third scenario occurs (high voltage, high load, low rotation speed conditions are more likely to occur), the phase difference determined by u=0 and i=0 is discarded, and the phase difference determined by the voltage peak point and the current peak point is taken.
4. Load detection implementation
Fig. 9 is a schematic diagram of a load detection module according to an embodiment. The phase difference is subjected to a sliding average, and a compensated phase difference pd value can be output according to the time compensation value delta t, wherein the phase difference is expressed in the form of the number of micro steps. The value of the phase difference value can represent the relative size of the load, and when the pd value is far greater than the phase difference threshold value p, the load is smaller; as the load increases slowly, the pd value will slowly approach the p value; and when the pd value is lower than the p value, judging that the motor is locked, and generating a locked signal. And detecting the fluctuation condition of the pd value, when the fluctuation is large, indicating that the motor is out of step, and the higher the out-of-step degree is, the larger the fluctuation of the pd value is, and when the fluctuation exceeds a phase difference fluctuation threshold delta p, generating an out-of-step signal.
The judgment conditions of the locked rotor are as follows: the phase difference is lower than the stalling threshold p;
the judging conditions of the step-out are as follows: the phase difference fluctuation exceeds a threshold Δp.
In this embodiment, in the working process of the motor, besides the counter electromotive force, the self inductance, mutual inductance, magnetic field and other factors of the coil can affect the voltage and current phase difference, especially under the high-speed condition, a larger error can be generated in the load detection, so that the locked rotor and normal rotation can be erroneously judged. According to the technical scheme, the compensation value delta t is set, and the influence of factors such as self inductance, mutual inductance and magnetic field of the compensation coil on phase difference measurement is compensated at different rotating speeds, so that the load detection accuracy is improved.
In addition, in the traditional mode, different schemes are adopted to realize locked rotor detection under a current chopper mode and a mute mode respectively, parameter configuration is required to be adjusted according to different modes in practical application, and the process is complicated; according to the embodiment of the application, the implementation schemes of load detection in two modes are unified, the phase difference measurement is performed, the required parameters are the same, and the efficiency is improved. The scheme in each embodiment of the application has been verified on board, the measured result accords with theoretical analysis, and the load condition of the motor can be correctly reflected.
It should be understood that, although the steps in the flowchart of fig. 5 are shown in sequence as indicated by the arrows, and the steps in steps (a 1) to (a 13) are shown in sequence as indicated by the numerals, these steps are not necessarily performed in sequence as indicated by the arrows or numerals. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a portion of the steps in fig. 5 may include a plurality of steps or stages that are not necessarily performed at the same time, but may be performed at different times, and the order of execution of the steps or stages is not necessarily sequential, but may be performed in rotation or alternatively with at least a portion of the steps or stages in other steps or other steps.
In one embodiment, a computer device is provided, which may be a terminal device, and an internal structure diagram thereof may be as shown in fig. 10. The computer device includes a processor, a memory, a communication interface, a display screen, and an input stepper motor driver connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program, when executed by a processor, implements a method of load detection of an electric machine. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, the input stepping motor driver of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 10 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, the stepper motor driver is an actuator that converts electrical pulses into angular displacements. The stepper motor and stepper motor driver constitute a stepper motor drive system. The stepper motor driver comprises a power driving unit and a microcomputer control unit, wherein the microcomputer control unit is used for realizing the steps of the method in each embodiment of the application.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the method embodiments described above.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the steps of the method embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods in accordance with the embodiments may be accomplished by way of a computer program stored in a non-transitory computer readable storage medium, which when executed may comprise the steps of the above described embodiments of the methods. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the application, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application or directly or indirectly applied to other related technical fields are included in the scope of the application.

Claims (12)

1. A method of load detection for an electric machine, the method comprising:
Acquiring an induced voltage value corresponding to the current speed of the motor;
performing induced voltage compensation processing on the voltage of the motor based on the induced voltage value to obtain a compensated voltage point;
Acquiring a reference current point on a current signal of the motor;
determining a reference phase difference between the reference current point and the compensated voltage point;
And detecting the load of the motor based on the reference phase difference.
2. The method according to claim 1, wherein the performing an induced voltage compensation process on the voltage of the motor based on the induced voltage value to obtain a compensated voltage point includes:
determining a time compensation value based on the induced voltage value in a current chopper mode;
and in the current falling stage of the motor, taking the difference between the discharging time and the charging time in the chopping period as a voltage point corresponding to the time compensation value as a compensated voltage point.
3. The method of claim 2, wherein said determining a time compensation value based on said induced voltage value comprises:
a time compensation value is determined based on a product of the induced voltage value and the chopping period, the product being compared to a supply voltage.
4. A method according to claim 3, wherein said determining a time compensation value based on a product of said induced voltage value and said chopping period, a ratio of said product to a supply voltage, comprises:
acquiring a speed correlation coefficient related to the current speed;
A time compensation value is determined based on a product of the speed-related coefficient, the induced voltage value, and the chopping period, the product being compared to a supply voltage.
5. The method according to claim 1, wherein the performing an induced voltage compensation process on the voltage of the motor based on the induced voltage value to obtain a compensated voltage point includes:
in the mute mode, and in a voltage rising stage of the voltage signal, when a voltage point whose target value is equal to a value determined based on the induced voltage value is obtained, the voltage point is taken as a compensated voltage point.
6. The method according to claim 1, wherein the performing an induced voltage compensation process on the voltage signal of the motor based on the induced voltage value to obtain a compensated voltage point includes:
in a mute mode, obtaining a voltage maximum value of a voltage signal of the motor;
in a voltage drop stage of the voltage signal, and when a voltage point where a target value is equal to the maximum voltage value minus a value determined based on the induced voltage value is obtained, the voltage point is taken as a compensated voltage point.
7. The method according to claim 5 or 6, wherein said obtaining a reference current point on a current signal of the motor comprises:
In the mute mode, when in a first current measurement state, taking a current zero point as a reference current point;
And when the current measuring device is in the second current measuring state, taking a current peak point as the reference current point.
8. The method according to any one of claims 1 to 6, wherein the load detection of the motor based on the reference phase difference comprises:
and when the reference phase difference is lower than a locked rotor threshold value, determining that the motor is locked.
9. The method according to any one of claims 1 to 6, wherein the load detection of the motor based on the reference phase difference comprises:
And when the fluctuation of the reference phase difference is larger than a fluctuation threshold value, determining that the motor is out of step.
10. A stepper motor driver for implementing the steps of the method of any of claims 1 to 9.
11. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1to 9 when the computer program is executed.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 9.
CN202410328112.3A 2024-03-20 2024-03-20 Load detection method of motor, stepping motor driver and computer device Pending CN118100708A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410328112.3A CN118100708A (en) 2024-03-20 2024-03-20 Load detection method of motor, stepping motor driver and computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410328112.3A CN118100708A (en) 2024-03-20 2024-03-20 Load detection method of motor, stepping motor driver and computer device

Publications (1)

Publication Number Publication Date
CN118100708A true CN118100708A (en) 2024-05-28

Family

ID=91149436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410328112.3A Pending CN118100708A (en) 2024-03-20 2024-03-20 Load detection method of motor, stepping motor driver and computer device

Country Status (1)

Country Link
CN (1) CN118100708A (en)

Similar Documents

Publication Publication Date Title
JP4665735B2 (en) Synchronous motor drive system and synchronous motor drive method
US8278849B2 (en) Controller for calculating electric power consumption of industrial machine
US7170263B2 (en) Method and apparatus for controlling on-vehicle generator
US6694287B2 (en) Phase angle diagnostics for sinusoidal controlled electric machine
US8796974B2 (en) PMSM initial position detection system and method
US6392418B1 (en) Torque current comparison for current reasonableness diagnostics in a permanent magnet electric machine
US8258732B2 (en) Drive system of synchronous motor
EP2127065B1 (en) Indirect rotor resistance estimation system and method
CN107086835B (en) Permanent magnet synchronous motor rotation initial zero-potential angle calibration system and calibration method
US10211770B2 (en) Motor drive control device and control method thereof
US20060119309A1 (en) Apparatus and method for controlling velocity of motor
CN107408908B (en) Reliable control of a multi-rotor pole switched reluctance machine
CN108111082B (en) IF control stall detection method and system for permanent magnet synchronous motor
JP5666025B2 (en) Method and apparatus for calibrating a positioning system having an electronic commutation type servo drive
EP3751725A1 (en) Controller for direct current shunt motor and motor unit
CN108429425B (en) DC brushless motor and control method thereof
CN118100708A (en) Load detection method of motor, stepping motor driver and computer device
JP7414436B2 (en) Motor control device and its control method
CN115528964A (en) Motor parameter measuring device and method
KR20190036667A (en) Motor Speed Estimation Apparatus and Motor Speed Estimation Method
JP4127000B2 (en) Motor control device
JP4884434B2 (en) Electric motor drive
JP5288957B2 (en) Electric motor control device with resistance compensation function
CN114079410B (en) Synchronous motor starting state detection device and method
JP2003509997A (en) Torque current comparison for current validity diagnosis in permanent magnet electric machines

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination