CN115378315A - Method and device for compensating error of reverse clearance of stepping motor, household appliance and medium - Google Patents

Method and device for compensating error of reverse clearance of stepping motor, household appliance and medium Download PDF

Info

Publication number
CN115378315A
CN115378315A CN202211011779.8A CN202211011779A CN115378315A CN 115378315 A CN115378315 A CN 115378315A CN 202211011779 A CN202211011779 A CN 202211011779A CN 115378315 A CN115378315 A CN 115378315A
Authority
CN
China
Prior art keywords
stepping motor
angle
reverse
compensation
error value
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
CN202211011779.8A
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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202211011779.8A priority Critical patent/CN115378315A/en
Publication of CN115378315A publication Critical patent/CN115378315A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P8/00Arrangements for controlling dynamo-electric motors rotating step by step
    • H02P8/36Protection against faults, e.g. against overheating or step-out; Indicating faults

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Control Of Stepping Motors (AREA)

Abstract

The invention relates to the technical field of household appliances, in particular to a method and a device for compensating reverse gap error of a stepping motor, the household appliance and a storage medium, wherein the method comprises the following steps: when the stepping motor drives the carrier to perform angle adjustment operation, acquiring a preset compensation identification position, wherein the compensation identification position is used for identifying whether the stepping motor finishes reverse gap error value detection operation or not; judging whether the stepping motor completes the reverse gap error value detection operation or not according to the compensation identification position; if the compensation identification position marks that the stepping motor finishes the reverse gap error value detection operation, acquiring a corresponding reverse gap error value; and carrying out error compensation on the preset rotation angle corresponding to the angle adjustment operation according to the reverse clearance error value, and controlling the stepping motor to carry out angle adjustment according to the rotation angle after error compensation. The invention compensates the reverse clearance error generated when the stepping motor rotates reversely, and ensures that the carrier can be accurately positioned and aligned when the carrier is driven to rotate in an angle.

Description

Method and device for compensating reverse clearance error of stepping motor, household appliance and medium
Technical Field
The invention relates to the technical field of household appliances, in particular to a method and a device for compensating reverse gap error of a stepping motor, the household appliance and a storage medium.
Background
Among the household electrical appliance product, the function of shaking the head is liked by the consumer deeply, wherein has newly emerged aircraft nose angle fine setting function again, can realize the aircraft nose and rotate with unit small angle such as 5 or 10, and this type of technique is higher to the motor precision requirement of drive aircraft nose motion. The existing motor driving techniques mainly include the following classifications: the stepping motor is directly driven; the mechanical transmission structure drives: the micro-rotation of the motor is controlled through high and low levels, so that the mechanical transmission structure is driven to realize displacement adjustment with very high precision. Above-mentioned have among the prior art that there are factors that influence domestic appliance rotation accuracy such as step motor virtual position and transmission error, when leading to domestic appliance reversal rotation at every turn, can appear rotation angle deviation or aircraft nose fine setting deviation scheduling problem.
Because of manufacturing process errors, reverse gap errors generated by reverse rotation of the asynchronous stepping motors are inconsistent, and error compensation is very difficult to realize, so that the reverse gap error compensation of the stepping motor is not involved in the prior art, and the conventional stepping motor cannot accurately position and return when driving a carrier to rotate in an angle.
Disclosure of Invention
The invention provides a method and a device for compensating reverse gap error of a stepping motor, the stepping motor and a storage medium, and aims to solve the problem that the stepping motor cannot be accurately positioned and aligned when a driving carrier rotates in an angle in the prior art.
In a first aspect, the present invention provides a method for compensating a reverse gap error of a stepping motor, the method comprising:
when the stepping motor drives the carrier to perform angle adjustment operation, acquiring a preset compensation identification position, wherein the compensation identification position is used for identifying whether the current stepping motor completes reverse gap error value detection operation or not;
judging whether the current stepping motor completes the reverse gap error value detection operation or not according to the compensation identification position;
if the compensation identification position identifies that the current stepping motor finishes the reverse gap error value detection operation, acquiring a corresponding reverse gap error value;
and carrying out error compensation on a preset rotation angle corresponding to the angle adjustment operation according to the reverse clearance error value, and controlling the stepping motor to carry out angle adjustment according to the rotation angle after error compensation.
Further, the method further comprises:
and if the compensation identification position identifies that the current stepping motor does not finish the reverse gap error value detection operation, executing error detection operation.
Further, the error detection operation includes:
controlling a stepping motor to drive a carrier to rotate towards a second limit position at a preset first angle, and recording the starting time of the stepping motor to drive the carrier to rotate reversely from the second limit position to the first limit position, wherein the first angle is larger than the angle between the first limit position and the second limit position;
starting from the starting time, timing the rotation time when the stepper motor drives the carrier to rotate from the second limit position to the first limit position;
and calculating the reverse rotation angle of the stepping motor according to the rotation time and the rotation speed of the stepping motor, and determining a reverse clearance error value according to the difference value between the reverse rotation angle and the limit rotation angle.
Further, the timing, from the starting time, the rotation time when the stepper motor drives the carrier to rotate from the second limit position to the first limit position includes:
detecting whether a detection signal indicating that the stepper motor drives the carrier to rotate to the first limit position is received or not, wherein the detection signal is sent by a sensor arranged at the first limit position;
and stopping timing when the detection signal is received, and obtaining the rotation time.
Further, according to the reverse gap error value, performing error compensation on a preset rotation angle corresponding to an angle adjustment operation, and controlling the stepping motor to perform angle adjustment according to the rotation angle after error compensation, the method includes:
and determining the rotation angle after error compensation according to the sum of the reverse clearance error value and a preset rotation angle.
Further, after performing the error detection operation, the method further comprises:
and updating the compensation identification position to be the reverse gap error value detection operation of the current stepping motor, and storing the reverse gap error value.
Further, before controlling the stepping motor to perform angle adjustment according to the error-compensated rotation angle, the method further includes:
judging whether the angle rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the carrier driven by the stepping motor;
and if the difference is not consistent, executing the operation of controlling the stepping motor to adjust the angle according to the rotation angle after the error compensation.
In a second aspect, the present invention further provides a device for compensating a reverse gap error of a stepping motor, the device comprising:
the device comprises a first obtaining module, a second obtaining module and a control module, wherein the first obtaining module is used for obtaining a preset compensation identification position when the stepping motor drives a carrier to perform angle adjustment operation, and the compensation identification position is used for identifying whether the current stepping motor completes reverse gap error value detection operation or not;
the first judgment module is used for judging whether the current stepping motor finishes the reverse gap error value detection operation or not according to the compensation identification position;
the second obtaining module is used for obtaining a corresponding reverse gap error value if the compensation identification position identifies that the current stepping motor finishes the reverse gap error value detection operation;
and the control module is used for carrying out error compensation on a preset rotating angle corresponding to the angle adjustment operation according to the reverse gap error value and controlling the stepping motor to carry out angle adjustment according to the rotating angle after error compensation.
Further, the control module is further configured to execute an error detection operation when the compensation flag identifies that the current stepping motor does not complete the reverse gap error value detection operation;
the control module is specifically used for controlling the stepper motor to drive the carrier to rotate to the second limit position at a preset first angle, and recording the starting time of the stepper motor to drive the carrier to rotate reversely from the second limit position to the first limit position, wherein the first angle is larger than the angle between the first limit position and the second limit position; starting from the starting time, timing the rotation time when the stepper motor drives the carrier to rotate from the second limit position to the first limit position; calculating the reverse rotation angle of the stepping motor according to the rotation time and the rotation speed of the stepping motor; and determining a reverse clearance error value according to the difference value between the reverse rotation angle and the limit rotation angle.
Further, the apparatus further comprises: and the storage module is used for updating the compensation identification position to be the reverse clearance error value detection operation finished by the current stepping motor after the control module executes the error detection operation, and storing the reverse clearance error value.
Further, the apparatus further comprises: the second judgment module is used for judging whether the angle rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the carrier driven by the stepping motor;
and the control module is also used for controlling the stepping motor to carry out angle adjustment according to the rotation angle after error compensation when the angle rotation direction corresponding to the angle adjustment operation is not consistent with the historical rotation direction of the carrier driven by the stepping motor.
In a third aspect, the present invention provides a household appliance, comprising:
the stepping motor is arranged in the whole machine and drives the whole machine to rotate so as to realize the angle adjustment of the whole machine;
the device comprises a controller, a first limiting position and a second limiting position, wherein the controller is used for controlling the rotation of the whole machine, the first limiting position and the second limiting position are respectively provided with corresponding limiting structures, the limiting structures corresponding to the first limiting position are provided with sensors, and the sensors are used for sending detection signals to the controller when the fact that the whole machine rotates to the first limiting position is detected;
a controller comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method as described above when executing the computer program.
In a fourth aspect, the invention also provides a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method as described above.
The method and the device for compensating the reverse clearance error of the stepping motor, the stepping motor and the storage medium provided by the embodiment of the invention judge whether the current stepping motor finishes the reverse clearance error value detection operation according to the preset compensation identification bit, if so, obtain the corresponding reverse clearance error value, carry out error compensation on the preset rotation angle corresponding to the angle adjustment operation carried out by the carrier driven by the stepping motor according to the reverse clearance error value, and control the stepping motor to carry out angle adjustment according to the rotation angle after error compensation, so that the generated reverse clearance error can be uniformly compensated when the carrier is driven to reverse each time, and the problem that the stepping motor can not accurately position and return when the carrier is driven to rotate in the angle in the prior art is solved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart of a method for compensating a reverse gap error of a stepping motor according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for compensating a reverse gap error of a stepping motor according to a second embodiment of the present invention;
FIG. 3 is a schematic view of a rotating structure of the household appliance in the embodiment of the present invention;
fig. 4 is a structural diagram of a reverse gap error compensation device of a stepping motor according to a third embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
According to the method and the device for compensating the reverse clearance error of the stepping motor, provided by the invention, the reverse clearance error is detected when the stepping motor is electrified for the first time, the clearance error of the whole machine (namely the redundant angle during the rotation timing of the limit angle) can be obtained through one-time detection, and based on a reverse clearance error compensation algorithm, the unified compensation error value is realized when the machine head is reversed every time, so that the rotation error of each stepping motor is accurately controlled, and the accurate positioning and the correction can be ensured when the stepping motor rotates the angle.
Example one
Fig. 1 shows a method for compensating a reverse gap error of a stepping motor according to an embodiment of the present invention. As shown in fig. 1, a method for compensating a reverse gap error of a stepping motor according to an embodiment of the present invention includes the following steps:
s11, when the stepping motor drives the carrier to perform angle adjustment operation, a preset compensation identification position is obtained.
The compensation identification bit is used for identifying whether the current stepping motor completes the reverse gap error value detection operation or not, and the initial value of the compensation identification bit identifies that the current stepping motor does not complete the reverse gap error value detection operation.
The embodiment of the invention takes an electric fan as an example to explain the method for compensating the reverse clearance error of the stepping motor. Understandably. The compensation method can be applied to other products related to the adjustment of the steering or the angle of the stepping motor, such as an electric heater, an air conditioner and the like besides the application in the field of fans, and the invention is not particularly limited to this.
The electric fan comprises a machine head and a stepping motor arranged in the machine head, and the stepping motor drives the machine head to rotate so as to realize angle adjustment of the machine head. The first limit position and the second limit position of the rotation of the machine head are respectively provided with a corresponding limit structure, and the machine head rotates between the first limit position and the second limit position based on a limit angle a. The limit angle a of the fan is a known angle, which is determined by the oscillating angle of the fan itself, and may be an angle between the first limit position and the second limit position, typically between 0 ° and 360 °.
The fan is internally provided with a control unit which can be realized by a controller, and the control unit outputs pulses to the stepping motor to realize the rotation of the stepping motor so as to realize the angle adjustment of the machine head. Wherein the stepping motor rotational speed v is a known quantity.
In the embodiment of the present invention, the step motor drives the carrier to perform the angle adjustment operation, which may be a shaking function or an angle fine adjustment function of the electric fan, and may further include other functions related to the adjustment of the head angle, which is not specifically limited in the present invention.
Specifically, when the fan performs the nose angle adjustment operation for the first time, the reverse gap error detection is performed, and when the reverse gap error value is detected, the preset compensation flag is updated to the current reverse gap error value detection operation that the stepping motor has completed, and the obtained reverse gap error value is saved. When the fan starts the angle adjustment operation of the machine head, whether a reverse clearance error value is detected can be directly judged by acquiring a preset compensation identification position.
S12, judging whether the current stepping motor finishes the reverse gap error value detection operation or not according to the compensation identification position; if the reverse backlash error detection operation is completed, steps S13 to S14 are executed.
In the embodiment of the invention, whether the current stepping motor finishes the reverse gap error value detection operation or not is judged according to the compensation identification bit, if the reverse gap error value detection operation is finished, the corresponding compensation identification bit is identified as 1, which indicates that the reverse gap error value detection operation is finished, and when the subsequent stepping motor realizes the reverse gap compensation, the corresponding reverse gap error value can be directly obtained for compensation.
And S13, acquiring a corresponding reverse gap error value.
And S14, carrying out error compensation on a preset rotation angle corresponding to the angle adjustment operation according to the reverse gap error value, and controlling the stepping motor to carry out angle adjustment according to the rotation angle after error compensation.
It can be understood that the preset rotation angle corresponding to the angle adjustment operation of the carrier driven by the stepper motor may be a rotation angle preset according to actual application requirements or a rotation angle corresponding to an angle adjustment function selected by a user, which is not specifically limited in the present invention. Generally, the preset rotation angle corresponding to the angle fine adjustment function can be within the range of 5-10 degrees.
In the embodiment of the present invention, performing error compensation on a preset rotation angle corresponding to an angle adjustment operation according to the reverse gap error value, and controlling the stepping motor to perform angle adjustment according to the rotation angle after error compensation specifically includes: and determining the rotation angle after the error compensation according to the sum of the reverse clearance error value and a preset rotation angle, and controlling the stepping motor to adjust the angle according to the rotation angle after the error compensation.
The method for compensating the reverse clearance error of the stepping motor provided by the embodiment of the invention judges whether the current stepping motor finishes the reverse clearance error value detection operation according to the preset compensation identification bit, if so, obtains the corresponding reverse clearance error value, carries out error compensation on the preset rotating angle corresponding to the angle adjustment operation carried out by the carrier driven by the stepping motor according to the reverse clearance error value, and controls the stepping motor to carry out angle adjustment according to the rotating angle after error compensation, thereby realizing uniform compensation error value on the generated reverse clearance error when the carrier is driven to reverse every time, and solving the problem that the stepping motor can not accurately position and return when the carrier is driven to rotate in angle in the prior art.
Example two
Fig. 2 shows a method for compensating a reverse gap error of a stepping motor according to an embodiment of the present invention. As shown in fig. 2, a method for compensating a reverse gap error of a stepping motor according to an embodiment of the present invention includes the following steps:
s11, when the stepping motor drives the carrier to perform angle adjustment operation, a preset compensation identification position is obtained.
The compensation identification bit is used for identifying whether the current stepping motor completes the reverse gap error value detection operation or not, and the initial value of the compensation identification bit identifies that the current stepping motor does not complete the reverse gap error value detection operation.
The embodiment of the invention takes an electric fan as an example, and explains the method for compensating the reverse clearance error of the stepping motor. Understandably. The compensation method can be applied to other products related to the adjustment of the steering or the angle of the stepping motor, such as an electric heater, an air conditioner and the like besides the application in the field of fans, and the invention is not particularly limited to this.
The electric fan comprises a machine head and a stepping motor arranged in the machine head, and the stepping motor drives the machine head to rotate so as to realize angle adjustment of the machine head. As shown in fig. 3, corresponding limit structures are respectively arranged at a first limit position and a second limit position of the rotation of the head, and the head rotates between the first limit position and the second limit position based on a limit angle a. The limit angle a of the fan is a known angle, which is determined by the oscillating angle of the fan itself, and may be an angle between the first limit position and the second limit position, typically between 0 ° and 360 °.
S12, judging whether the current stepping motor finishes the reverse gap error value detection operation or not according to the compensation identification position; if the reverse gap error value detection operation is finished, executing the steps S13 to S14; if the reverse gap error detection operation is not completed, executing steps S15-S17 to execute the error detection operation;
in the embodiment of the invention, whether the current stepping motor finishes the reverse gap error value detection operation or not is judged according to the compensation identification bit, if the reverse gap error value detection operation is finished, the corresponding compensation identification bit is identified as 1, which indicates that the reverse gap error value detection operation is finished, and when the subsequent stepping motor realizes the reverse gap compensation, the corresponding reverse gap error value can be directly obtained for compensation; if the reverse gap error value detection operation is not completed, the corresponding compensation flag bit is marked as 0, which indicates that the reverse gap error value detection operation is not completed, and still further error detection needs to be performed, so that the stepping motor realizes the reverse gap compensation.
And S13, acquiring a corresponding reverse gap error value.
And S14, carrying out error compensation on a preset rotation angle corresponding to the angle adjustment operation according to the reverse gap error value, and controlling the stepping motor to carry out angle adjustment according to the rotation angle after error compensation. Specifically, the rotation angle after error compensation is the sum of the reverse backlash error value and a preset rotation angle.
S15, controlling the stepping motor to drive the carrier to rotate towards the second limit position at a preset first angle, and recording the starting time of the stepping motor to drive the carrier to reversely rotate towards the first limit position from the second limit position. Wherein the first angle is greater than an angle between a first extreme position and a second extreme position;
it can be understood that, in practical application, the stepping motor belongs to a driving structure in the carrier, when the motor drives the carrier to rotate reversely for a short time, the stepping motor operates, the carrier operates in a delayed manner, and the carrier operates in a delayed manner and does not rotate, so that the operating time is consumed, and the overall operating time is increased; when the motor drives the carrier to reversely rotate from the second limit position to the first limit position, the running time of the stepping motor is longer than that of the carrier, and the reverse rotation angle of the stepping motor is theoretically larger than that of the carrier in the same time; therefore, the stepping motor has a reverse gap error, i.e., a difference between an angle of reverse rotation of the motor and an angle of reverse rotation of the carrier. In order to accurately detect the reverse gap error, in this embodiment, a first angle is preset, where the first angle is greater than an angle between a first limit position and a second limit position, that is, a limit rotation angle of the fan, and the stepper motor is controlled to drive the carrier to rotate to the second limit position by the preset first angle, so as to ensure that the carrier can rotate to the second limit position, thereby facilitating further recording of the reverse rotation start time.
S16, starting to time the rotation time when the stepper motor drives the carrier to rotate from the second limit position to the first limit position from the starting time;
in the embodiment of the present invention, as shown in fig. 3, a sensor is disposed at the position of the limit structure corresponding to the first limit position, and the sensor is configured to send a detection signal to the controller when detecting that the carrier rotates to the first limit position. Further, the error detection method specifically comprises the steps that the moment when the motor drives the carrier to rotate to the second limit position at the preset first angle is recorded as the starting time, at the moment, the motor starts to drive the carrier to reversely rotate from the second limit position to the first limit position, and the reverse rotation time is timed; when the stepping motor drives the carrier to rotate to the first limit position, the sensor located at the first limit position sends a detection signal indicating that the carrier rotates to the first limit position, and the timing is stopped after the detection signal is received, so that the rotation time of the motor can be obtained.
Compared with the technical means of realizing position positioning detection by using feedback of a plurality of sensors in the prior art, the embodiment of the invention can carry out positioning detection by only arranging one sensor, and realizes accurate positioning and aligning when the stepping motor drives the carrier to carry out angle adjustment operation at low cost.
And S17, calculating a reverse rotation angle of the stepping motor according to the rotation time and the rotation speed of the stepping motor, and determining a reverse clearance error value according to a difference value between the reverse rotation angle and the limit rotation angle.
In an embodiment of the present invention, the calculating a reverse rotation angle of the stepping motor according to the rotation time and the rotation speed of the stepping motor specifically includes: and calculating the product of the rotation time and the rotation speed of the motor to obtain the reverse rotation angle of the stepping motor.
In a specific embodiment, as shown in fig. 3, the controller can collect a detection signal from the sensor by arranging the sensor at the position limiting structure of the first limit position where the stepper motor drives the carrier to rotate. Specifically, the stepping motor is controlled to drive the carrier to rotate to a second limit position by a first angle b, b is greater than a limit angle a, so that the stepping motor is ensured to drive the carrier to reach the second limit position, the carrier rotates in a reverse direction by an angle b, meanwhile, the control unit starts timing, when the stepping motor drives the carrier to rotate to the first limit position, the sensor arranged on the first limit position sends a detection signal to the controller, the controller stops timing, reverse rotation time is obtained, and a reverse gap error value is calculated. Specifically, a formula c = v × t1-a can be applied to calculate a reverse gap error value, c represents the reverse gap error value, v represents the rotation speed of the motor, t1 represents the rotation time of the motor, and a represents the limit rotation angle; wherein a is the structural limit angle of the carrier, is a known angle, such as the oscillating angle of a fan, and is determined by the oscillating angle of a fan motor, and is generally between 0 and 360 degrees; if v x t1 > a, indicating that a reverse lash error value exists; if v × t1= a, it indicates that there is no reverse gap error value, and the stepping motor rotates at a normal angle without performing rotation angle compensation. The sensor is positioned at the moving part (namely the moving terminal) of the machine head, and no matter how many transmission errors or virtual positions of the motor are in the middle, the final reverse gap error value can be accurately detected.
And S18, updating the compensation identification position to the state that the stepping motor finishes the reverse gap error value detection operation, and storing the reverse gap error value.
In the embodiment of the invention, after the error detection is executed, the compensation identification bit is updated to the reverse clearance error value detection operation of the current stepping motor, and the reverse clearance error value is stored, so that the reverse clearance error value obtained after the reverse clearance error value detection operation is finished can be stored and read for a long time, and the reverse clearance error value of the historical detection and the updated compensation identification bit can be directly obtained when the stepping motor is powered on every time.
In the embodiment of the invention, when the head shaking function is used for the first time, the reverse clearance error of the whole head shaking system is automatically detected through the sensor, the error value and the detection completion flag bit are stored in the ROM of the chip memory, the reverse clearance error and the detection completion flag bit are read after being electrified every time, and the reverse clearance error is only required to be compensated when the head shaking steering or the fine turning is controlled subsequently, so that the head shaking positioning and the fine turning of the whole machine are accurate, and the problem of inconsistent reverse clearance error values is solved at low cost.
In the embodiment of the present invention, before the step S14 is executed to control the stepping motor to perform the angle adjustment according to the rotation angle after the error compensation, the step S19, which is not shown in the attached drawings, is further included in the step S:
s19, judging whether the angle rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the carrier driven by the stepping motor; and if the angle rotation direction corresponding to the angle adjustment operation is not consistent with the historical rotation direction of the carrier driven by the stepping motor, executing the step S14 to control the stepping motor to perform angle adjustment according to the rotation angle after error compensation.
In this embodiment, after step S19 is executed, if the determination result is that the angular rotation direction corresponding to the angular adjustment operation is consistent with the historical rotation direction of the carrier driven by the stepper motor, the carrier may be rotated between the first limit position and the second limit position without performing the angular adjustment.
It can be understood that the determining whether the angular rotation direction corresponding to the angular adjustment operation is consistent with the historical rotation direction of the carrier driven by the stepper motor includes: judging whether the angle rotation direction corresponding to the angle adjustment operation is consistent with the current rotation direction of the carrier driven by the stepping motor, wherein the operation scene can be as follows: and when the carrier is driven by the stepping motor to rotate, a reverse rotation instruction is received, and the carrier starts to rotate reversely in the direction opposite to the current rotation direction.
In the embodiment of the invention, if the angle rotation direction corresponding to the angle adjustment operation is not consistent with the historical rotation direction of the carrier driven by the stepping motor and indicates that the stepping motor is in a reverse rotation running state, the error compensation is performed on the preset rotation angle corresponding to the angle adjustment operation according to the reverse gap error value, and the stepping motor is controlled to perform angle adjustment according to the rotation angle after the error compensation. If the angle rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the carrier driven by the stepping motor, the handpiece is not in a reverse rotation running state, namely, no reverse gap error is generated at the moment, and the reverse gap error compensation and the angle adjustment are not required to be executed.
The method for compensating the reverse gap error of the stepping motor provided by the embodiment of the invention has the following beneficial effects:
according to the invention, the single sensor is used for detecting the reverse clearance error, the redundant angle calculation of the limit angle rotation timing is carried out, and the accurate detection of the rotation error of the stepping motor is realized through the self-adaptive detection algorithm;
the invention adopts a reverse clearance error compensation algorithm to realize the program compensation error value when driving the carrier to rotate reversely each time, and realizes the control of the rotation error of each stepping motor;
the invention realizes that the error value can be stored and read for a long time by detecting and storing the reverse gap error once by the single sensor, thereby avoiding the repeated calculation and the waste of calculation resources during each error compensation.
EXAMPLE III
Fig. 4 shows a reverse gap error compensation apparatus for a stepping motor according to an embodiment of the present invention, and as shown in fig. 4, the reverse gap error compensation apparatus for a stepping motor according to an embodiment of the present invention includes:
a first obtaining module 201, configured to obtain a preset compensation flag when the stepping motor drives the carrier to perform an angle adjustment operation, where the compensation flag is used to identify whether the current stepping motor has completed a reverse gap error value detection operation;
the first judging module 202 is configured to judge whether the current stepping motor completes the reverse gap error value detection operation according to the compensation flag;
a second obtaining module 203, configured to obtain a corresponding reverse gap error value when the determination result of the first determining module 202 is that the compensation identification bit identifies that the current stepping motor has completed the reverse gap error value detection operation;
and the control module 204 is configured to perform error compensation on a preset rotation angle corresponding to the angle adjustment operation according to the reverse gap error value, and control the stepping motor to perform angle adjustment according to the rotation angle after error compensation. Specifically, the rotation angle after the error compensation is a sum of the reverse backlash error value and a preset rotation angle.
In this embodiment of the present invention, the control module 204 is further configured to execute an error detection operation when the compensation flag identifies that the current stepping motor does not complete the reverse gap error value detection operation.
Further, the control module 204 is specifically configured to control the stepper motor to drive the carrier to rotate to the second limit position by a preset first angle, and record starting time when the stepper motor drives the carrier to rotate reversely from the second limit position to the first limit position, where the first angle is greater than an angle between the first limit position and the second limit position; starting from the starting time, timing the rotation time when the stepper motor drives the carrier to rotate from the second limit position to the first limit position; calculating the reverse rotation angle of the stepping motor according to the rotation time and the rotation speed of the stepping motor; and determining a reverse clearance error value according to the difference value of the reverse rotation angle and the limit rotation angle. Wherein, starting from the starting time, the rotation time when the stepper motor drives the carrier to rotate from the second limit position to the first limit position is timed, specifically: detecting whether a detection signal indicating that the stepper motor drives the carrier to rotate to the first limit position is received or not, wherein the detection signal is sent by a sensor arranged at the first limit position; and stopping timing when the detection signal is received, and obtaining the rotation time.
Further, the apparatus provided in the embodiment of the present invention further includes: and the storage module is used for updating the compensation identification position to be the reverse clearance error value detection operation finished by the current stepping motor after the control module executes the error detection operation, and storing the reverse clearance error value.
Further, the device also comprises, not shown in the drawings: the second judgment module is used for judging whether the angle rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the carrier driven by the stepping motor;
correspondingly, the control module 204 is further configured to control the stepping motor to perform angle adjustment according to the rotation angle after the error compensation when the angle rotation direction corresponding to the angle adjustment operation is inconsistent with the historical rotation direction of the carrier driven by the stepping motor; and when the angle rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the carrier driven by the stepping motor, controlling the stepping motor not to adjust the angle and directly rotating between the first limit position and the second limit position.
In a specific embodiment of the device for compensating the reverse gap error of the stepping motor provided by the third embodiment of the present invention, the action can be performed according to the method provided in any one of the first to second embodiments, so that a uniform error value compensation can be performed on the generated reverse gap error each time the stepping motor drives the whole machine to rotate in the reverse direction, and the problem that the stepping motor cannot accurately position and return to the original position when the stepping motor drives the carrier to rotate in an angle in the prior art is solved.
Example four
An embodiment of the present invention provides a stepping motor, including:
the stepping motor is arranged in the whole machine and drives the whole machine to rotate so as to realize the angle adjustment of the whole machine;
as shown in fig. 3, corresponding limiting structures are respectively arranged at a first limiting position and a second limiting position of the rotation of the whole machine, and a sensor is arranged at the limiting structure corresponding to the first limiting position and used for sending a detection signal to the controller when the machine head rotates to the first limiting position.
A controller comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method for compensating for a backlash error of a stepper motor as described in the first to second embodiments.
In the embodiment of the invention, the sensor is arranged at the limiting structure at the first limit position, so that the controller can acquire a detection signal from the sensor. Specifically, the stepping motor is controlled to drive the carrier to rotate to a second limit position by a first angle b, b is greater than a limit angle a, so that the stepping motor is ensured to drive the carrier to reach the second limit position, the carrier rotates in a reverse direction by an angle b, meanwhile, the control unit starts timing, when the stepping motor drives the carrier to rotate to the first limit position, the sensor arranged on the first limit position sends a detection signal to the controller, the controller stops timing, reverse rotation time is obtained, and a reverse gap error value is calculated. Specifically, a formula c = v × t1-a can be applied to calculate a reverse gap error value, c represents the reverse gap error value, v represents the rotation speed of the motor, t1 represents the rotation time of the motor, and a represents the limit rotation angle; wherein a is the structural limit angle of the carrier, is a known angle, such as the oscillating angle of a fan, and is determined by the oscillating angle of a fan motor, and is generally between 0 and 360 degrees; if v x t1 > a, indicating that a reverse lash error value exists; if v × t1= a, it indicates that there is no reverse gap error value, and the stepping motor rotates at a normal angle without performing rotation angle compensation. The invention realizes the detection of the error value of the reverse clearance at one time with low cost by arranging the single sensor, further realizes the automatic compensation of the error value when the stepping motor drives the whole machine to rotate reversely each time, and realizes the control of the rotation error of each stepping motor. In practical applications, a plurality of sensors may be further provided to achieve more precise control of the position of the handpiece and the reverse rotation and alignment, which is not specifically limited by the present invention.
EXAMPLE five
The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is configured to implement the steps of the method for compensating for a backlash error of a stepping motor according to any one of the first to second embodiments when the computer program is executed by a processor.
In the embodiment of the invention, the method for compensating the reverse gap error of the stepping motor can be stored in a computer readable storage medium if the method is realized in the form of a software functional unit and is sold or used as an independent product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments described above may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer-readable medium may contain suitable additions or subtractions depending on the requirements of legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer-readable media may not include electrical carrier signals or telecommunication signals in accordance with legislation and patent practice.
Illustratively, the computer program may be partitioned into one or more modules/units, stored in the memory and executed by the processor, to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the formaldehyde removal control system of the purification equipment.
Those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than others, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (13)

1. A method for compensating a reverse gap error of a stepping motor is characterized by comprising the following steps:
when the stepping motor drives the carrier to perform angle adjustment operation, acquiring a preset compensation identification position, wherein the compensation identification position is used for identifying whether the current stepping motor finishes reverse gap error value detection operation or not;
judging whether the current stepping motor finishes the reverse gap error value detection operation or not according to the compensation identification position;
if the compensation identification position identifies that the current stepping motor finishes the reverse gap error value detection operation, acquiring a corresponding reverse gap error value;
and carrying out error compensation on a preset rotation angle corresponding to the angle adjustment operation according to the reverse gap error value, and controlling the stepping motor to carry out angle adjustment according to the rotation angle after error compensation.
2. The method of claim 1, further comprising:
and if the compensation identification position identifies that the current stepping motor does not finish the reverse gap error value detection operation, executing the error detection operation.
3. The method of claim 2, wherein the error detection operation comprises:
controlling a stepping motor to drive a carrier to rotate towards a second limit position at a preset first angle, and recording the starting time of the stepping motor to drive the carrier to rotate reversely from the second limit position to the first limit position, wherein the first angle is larger than the angle between the first limit position and the second limit position;
starting from the starting time, timing the rotation time when the stepper motor drives the carrier to rotate from the second limit position to the first limit position;
and calculating the reverse rotation angle of the stepping motor according to the rotation time and the rotation speed of the stepping motor, and determining a reverse clearance error value according to the difference value between the reverse rotation angle and the limit rotation angle.
4. The method of claim 3, wherein said timing a rotation time from said start time when said stepper motor drives said carrier from said second extreme position to said first extreme position comprises:
detecting whether a detection signal indicating that the stepper motor drives the carrier to rotate to the first limit position is received or not, wherein the detection signal is sent by a sensor arranged at the first limit position;
and stopping timing when the detection signal is received, and obtaining the rotation time.
5. The method of claim 1, wherein performing error compensation on a preset rotation angle corresponding to an angle adjustment operation according to the reverse gap error value, and controlling the stepping motor to perform angle adjustment according to the rotation angle after error compensation comprises:
and determining the rotation angle after error compensation according to the sum of the reverse clearance error value and a preset rotation angle.
6. The method of claim 2, wherein after performing the error detection operation, the method further comprises:
and updating the compensation identification position to be the reverse gap error value detection operation finished by the current stepping motor, and storing the reverse gap error value.
7. The method of claim 1, wherein prior to controlling the stepper motor to make an angular adjustment based on the error-compensated rotation angle, the method further comprises:
judging whether the angle rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the carrier driven by the stepping motor;
and if the difference is not consistent, executing the operation of controlling the stepping motor to adjust the angle according to the rotation angle after the error compensation.
8. The utility model provides a step motor reverse clearance error compensation arrangement which characterized in that includes:
the device comprises a first obtaining module, a second obtaining module and a control module, wherein the first obtaining module is used for obtaining a preset compensation identification position when the stepping motor drives a carrier to perform angle adjustment operation, and the compensation identification position is used for identifying whether the current stepping motor completes reverse gap error value detection operation or not;
the first judgment module is used for judging whether the current stepping motor finishes the reverse gap error value detection operation or not according to the compensation identification position;
the second obtaining module is used for obtaining a corresponding reverse gap error value if the compensation identification position identifies that the current stepping motor finishes the reverse gap error value detection operation;
and the control module is used for carrying out error compensation on a preset rotating angle corresponding to the angle adjustment operation according to the reverse gap error value and controlling the stepping motor to carry out angle adjustment according to the rotating angle after error compensation.
9. The apparatus of claim 8, wherein the control module is further configured to perform an error detection operation when the compensation flag identifies that the current stepping motor does not complete the reverse gap error value detection operation;
the control module is specifically used for controlling the stepper motor to drive the carrier to rotate to the second limit position at a preset first angle, and recording the starting time of the stepper motor to drive the carrier to rotate reversely from the second limit position to the first limit position, wherein the first angle is larger than the angle between the first limit position and the second limit position; starting from the starting time, timing the rotation time when the stepper motor drives the carrier to rotate from the second limit position to the first limit position; calculating the reverse rotation angle of the stepping motor according to the rotation time and the rotation speed of the stepping motor; and determining a reverse clearance error value according to the difference value between the reverse rotation angle and the limit rotation angle.
10. The apparatus of claim 9, further comprising:
and the storage module is used for updating the compensation identification position to be the reverse clearance error value detection operation finished by the current stepping motor after the control module executes the error detection operation, and storing the reverse clearance error value.
11. The apparatus of claim 8, further comprising:
the second judgment module is used for judging whether the angle rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the carrier driven by the stepping motor;
and the control module is also used for controlling the stepping motor to carry out angle adjustment according to the rotation angle after error compensation when the angle rotation direction corresponding to the angle adjustment operation is not consistent with the historical rotation direction of the carrier driven by the stepping motor.
12. A household appliance, characterized in that it comprises:
the stepping motor is arranged in the whole machine and drives the whole machine to rotate so as to realize angle adjustment of the whole machine;
the control device comprises a controller, a first limiting position and a second limiting position, wherein the controller is used for controlling the rotation of the whole machine, the first limiting position and the second limiting position are respectively provided with a corresponding limiting structure, the limiting structure corresponding to the first limiting position is provided with a sensor, and the sensor is used for sending a detection signal to the controller when the fact that the whole machine rotates to the first limiting position is detected;
a controller comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method according to any one of claims 1 to 7 when executing the computer program.
13. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202211011779.8A 2022-08-23 2022-08-23 Method and device for compensating error of reverse clearance of stepping motor, household appliance and medium Pending CN115378315A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211011779.8A CN115378315A (en) 2022-08-23 2022-08-23 Method and device for compensating error of reverse clearance of stepping motor, household appliance and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211011779.8A CN115378315A (en) 2022-08-23 2022-08-23 Method and device for compensating error of reverse clearance of stepping motor, household appliance and medium

Publications (1)

Publication Number Publication Date
CN115378315A true CN115378315A (en) 2022-11-22

Family

ID=84067373

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211011779.8A Pending CN115378315A (en) 2022-08-23 2022-08-23 Method and device for compensating error of reverse clearance of stepping motor, household appliance and medium

Country Status (1)

Country Link
CN (1) CN115378315A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117861090A (en) * 2024-03-12 2024-04-12 思澜科技(成都)有限公司 Reverse gap compensation method and system for focusing ultrasonic probe

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117861090A (en) * 2024-03-12 2024-04-12 思澜科技(成都)有限公司 Reverse gap compensation method and system for focusing ultrasonic probe
CN117861090B (en) * 2024-03-12 2024-05-31 思澜科技(成都)有限公司 Reverse gap compensation method and system for focusing ultrasonic probe

Similar Documents

Publication Publication Date Title
CN101651442B (en) Method and system for correcting electrical angle of motor rotor
US7436146B2 (en) Stepping motor speed control method and apparatus suitable for the same
CN115378315A (en) Method and device for compensating error of reverse clearance of stepping motor, household appliance and medium
CN111801883A (en) Position estimation method, position estimation device, and motor module
US5305447A (en) Multi-task operating system for a disc drive
EP0273052B1 (en) Device for detecting the rotational position of rotor of motor
JPS61150699A (en) Step motor controller
CN104052352A (en) Motor drive apparatus for driving stepping motor and control method therefor
US6515817B1 (en) Magnetic disk drive
JPH06284779A (en) Control circuit for brushless dc motor
EP0094492A2 (en) Multi-mode drive motor speed control for use in particular with information storage disks
CN112762623A (en) Method and device for stepping motor, thermostatic valve and water heater
CN110323975A (en) The control system and control method of hub motor
CN115296588B (en) Servo motor dynamic parameter adaptation method
JP4681130B2 (en) Stepping motor origin setting method
CN117118278A (en) Multi-path control method for stepping motor
CN113726250B (en) Synchronous motor cogging torque calibration method and device and electronic equipment
JPS6234210A (en) Detector for original point position
JP3060473U (en) Motor control device
CN114928297A (en) Motor speed detection method, device and medium based on multiple motors
CN116400641A (en) Cam processing precision compensation method, system, equipment and storage medium
CN115833661A (en) Feedback method and device for FG (FG) signal of brushless motor
CN115622453A (en) Stepping motor, control method thereof and storage medium
CN117191091A (en) Magnetic encoder, motor, elevator door motor and control device thereof
CN114499298A (en) Control method and control device of stepping motor, terminal device and storage medium

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