Motor control method and system

By adopting a control method based on torque information and a position update mechanism in motor control, the problem of reducing the motor return to zero accuracy is solved, and higher accuracy and stability are achieved, and cost and error are reduced.

CN118449410BActive Publication Date: 2025-01-14BYD CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410896565.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2025-01-14
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

The accuracy of the existing motors is reduced due to the reduction in position detection accuracy caused by changes in gear or bearing structure gaps, which cannot effectively ensure the accurate operation of automation equipment.

Method used

Adopt a control method based on torque information, quickly move to the near-zero position through the first control method, and then use the second control method to accurately return to zero based on the torque value, and update the zero position position with position control, and perform zero position deviation detection when necessary program to generate alarm information to ensure accuracy.

Benefits of technology

It improves the accuracy and reliability of the motor back-zero, reduces the use and error of sensors, reduces control costs, avoids step loss and collision problems caused by poor mechanical structure, and improves the stability of automation equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118449410B_ABST
    Figure CN118449410B_ABST
Patent Text Reader

Abstract

The present application discloses a motor control method and system, belonging to the field of automatic control technology. The method comprises: controlling a target motor to move to a target position by a first control method; controlling the target motor to return to zero by a second control method, wherein the second control method is based on the torque information of the target motor. The method improves the accuracy of the motor returning to zero.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of automatic control technology, and in particular, relates to a motor control method and system. Background Art

[0002] With the continuous development of automation and intelligent manufacturing, automation equipment has become extremely popular, among which the focus is on the control of motors. The zero return accuracy of motors is related to whether the automation equipment can operate accurately.

[0003] At present, during the process of the motor returning to zero, a sensor is set to collect data on the position of the motor to determine the position of the motor until it returns to zero.

[0004] However, as the motor runs, the clearance of the gears or bearings of the motor changes, which reduces the zero return accuracy of the motor. Summary of the invention

[0005] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a motor control method and system to improve the accuracy of the motor return to zero.

[0006] In a first aspect, the present application provides a motor control method, the method comprising:

[0007] Controlling the target motor to move to the target position by a first control method;

[0008] The target motor is controlled to return to zero by a second control method, and the second control method is controlled based on torque information of the target motor.

[0009] According to the motor control method of the present application, the target motor can be controlled to move quickly to a target position close to the zero position through the first control method, leaving control space for the second control method. Through the second control method based on the torque value, the target motor can be controlled to return to zero accurately, effectively improving the return to zero accuracy of the target motor.

[0010] According to an embodiment of the present application, the target position is arranged adjacent to the zero position of the target motor, and the zero position of the target motor is used to represent a state where the target motor returns to zero.

[0011] According to an embodiment of the present application, the first control mode is characterized as position control.

[0012] According to an embodiment of the present application, the target motor is a servo motor.

[0013] According to an embodiment of the present application, controlling the target motor to return to zero by a second control method includes:

[0014] When it is determined that the target motor is at the target position, acquiring the torque information;

[0015] Based on the torque information, the target motor is torque controlled to control the target motor to return to zero until the torque value of the target motor reaches a preset value.

[0016] According to an embodiment of the present application, after determining that the target motor returns to zero, the method further includes:

[0017] The target motor is position controlled to update the zero point position of the target motor.

[0018] According to an embodiment of the present application, after controlling the target motor to return to zero by the second control method, the method further includes:

[0019] Obtaining the number of zero returns of the target motor;

[0020] When it is determined that the number of zero return times is greater than or equal to the preset number of times, a zero point position deviation detection procedure is executed for the target motor.

[0021] According to one embodiment of the present application, the zero point position deviation detection procedure comprises the following steps:

[0022] Controlling the target motor to move to the target position by the first control method;

[0023] Controlling the target motor to return to zero by the second control mode to obtain the zero point position to be measured of the target motor;

[0024] When it is determined that the zero point position to be measured is outside a preset range, it is determined that the target motor is in a position deviation state, and an alarm message is generated.

[0025] According to an embodiment of the present application, after determining that the target motor is in a position deviation state and generating alarm information, the method further includes:

[0026] The target motor is position controlled, and the zero point position is updated by the zero point position to be measured.

[0027] In a second aspect, the present application provides a motor control system, the system comprising:

[0028] Target motor;

[0029] An induction device, wherein an induction sheet of the induction device is arranged at a target position of the target motor;

[0030] A controller is connected to the target motor and the induction device, and is used to execute the motor control method as described in the first aspect above.

[0031] In a third aspect, the present application provides a motor control device, the device comprising:

[0032] A first control module, used for controlling the target motor to move to a target position through a first control method;

[0033] The second control module is used to control the target motor to return to zero through a second control method, and the second control method is based on the torque information of the target motor.

[0034] In a fourth aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the motor control method as described in the first aspect above is implemented.

[0035] In a fifth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the motor control method as described in the first aspect above is implemented.

[0036] In a sixth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the motor control method as described in the first aspect.

[0037] In a seventh aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the motor control method as described in the first aspect above.

[0038] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0040] Figure 1 It is one of the flow charts of the motor control method provided in the embodiment of the present application;

[0041] Figure 2 is a schematic diagram of the position relationship of the target motor returning to zero provided in an embodiment of the present application;

[0042] Figure 3This is the second flow chart of the motor control method provided in the embodiment of the present application;

[0043] Figure 4 This is the third flow chart of the motor control method provided in the embodiment of the present application;

[0044] Figure 5 is a schematic diagram of the structure of a motor control device provided in an embodiment of the present application;

[0045] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0047] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0048] The motor control method, motor control system, motor control device, electronic device and readable storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0049] The motor control method may be applied to a terminal, and may be specifically executed by hardware or software in the terminal.

[0050] The terminal includes, but is not limited to, a portable communication device such as a mobile phone or a tablet computer having a touch-sensitive surface (e.g., a touch screen display and / or a touch pad). It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer having a touch-sensitive surface (e.g., a touch screen display and / or a touch pad).

[0051] In the following various embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse and a joystick.

[0052] The motor control method provided in the embodiment of the present application may be executed by an electronic device or a functional module or functional entity in the electronic device that can implement the motor control method. The electronic devices mentioned in the embodiment of the present application include but are not limited to mobile phones, tablet computers, computers, cameras, and wearable devices. The motor control method provided in the embodiment of the present application is described below using the electronic device as an example of the execution subject.

[0053] like Figure 1 As shown, the motor control method includes: step 110 and step 120.

[0054] Step 110 : Control the target motor to move to the target position by a first control method.

[0055] The target motor may be a servo motor, a stepper motor or a brushless motor.

[0056] It can be understood that the target position may be an offset relative to the zero position of the target motor, so as to assist the target motor to return to the vicinity of the zero position.

[0057] When the movement of the target motor is a circumferential rotation along the shaft, the target position is used to represent a certain rotation angle of the motor.

[0058] In the case where the movement of the target motor is a linear forward and backward movement along the extension direction of the rotation shaft, the target position is used to represent a certain position in the extension direction of the rotation shaft of the target motor.

[0059] It should be noted that the first control mode may include one or more of position control, speed control or torque control.

[0060] Among them, in the process of position control of the target motor, the rotation speed of the rotor of the target motor can be determined by the frequency of external input pulses such as JOG signals, and the rotation angle of the rotor can be determined by the number of pulses to achieve position control of the target motor.

[0061] In the process of speed control of the target motor, the rotation speed of the target motor can be controlled by analog input or pulse frequency.

[0062] In the process of torque control of the target motor, the output torque of the shaft of the target motor can be set by external analog input or direct address assignment. The set torque can be changed by changing the analog setting in real time. The torque control can also be achieved by changing the value of the corresponding address through communication.

[0063] In this step, in the process of controlling the target motor to move toward the target position by the first control method, the position of the target motor can be detected by the sensing device and data can be continuously collected until it is determined that the target motor reaches the target position.

[0064] The sensing device may be an encoder or a sensor.

[0065] Step 120 : Control the target motor to return to zero through a second control method, where the second control method is to perform control based on torque information of the target motor.

[0066] It can be understood that returning to zero is the operation of restoring the target motor to its initial position. The zero point position corresponding to the motor returning to zero is the initial zero position or zero position of the target motor, which is used to return the position of the target motor to zero and align the actual position of the target motor with the reference position of the control system. The zero point position can be any one or more of the mechanical zero point, electrical zero point and encoder zero point.

[0067] The torque information may include information such as continuous torque values ​​and torque directions in the time dimension, shaft position or shaft angle during the movement of the target motor, and is used to characterize the torque applied to the shaft by the target motor during operation.

[0068] Among them, when the target motor is a stepper motor or a brushless motor that cannot directly output a torque value, the torque value can be obtained by collecting the torque of the target motor through a torque sensor, and the second control method can include torque control.

[0069] In this step, when it is determined that the shaft of the target motor has reached the target position, the torque information of the target motor is obtained, and the target motor is controlled to move from the target position toward the zero position through a second control method. When it is determined that the torque information of the target motor meets the set return to zero condition, it is determined that the target motor has returned to the zero position.

[0070] For example, the set zero return condition may be that the torque value in the torque information reaches a set value.

[0071] According to the motor control method provided in the embodiment of the present application, the target motor can be controlled to move quickly to a target position close to the zero position through the first control method, leaving control space for the second control method. Through the second control method based on the torque value, the target motor can be controlled to return to zero accurately, effectively improving the return to zero accuracy of the target motor.

[0072] In some embodiments, the target position is set adjacent to the zero position of the target motor, and the zero position of the target motor is used to represent the state of the target motor returning to zero.

[0073] The target position may be a near-origin position, which is set near the zero position of the target motor, and the target position may be adjusted according to actual needs.

[0074] In the control of the target motor, the near-origin position is a position where the rotor of the target motor stops during startup or operation.

[0075] For example, the target position may be set at a position 4 to 6 mm away from the zero point position of the target motor along the extension direction of the rotation axis of the target motor.

[0076] In this embodiment, by setting the target position adjacent to the zero position, the torque control time of the target motor can be shortened, the return-to-zero accuracy is improved, and the target motor can be quickly returned to zero.

[0077] In some embodiments, the first control method is position control.

[0078] like Figure 2 As shown, the sensing device may be a slot-type photoelectric sensor, and the sensing piece of the sensing device is arranged at the target position of the rotating shaft of the target motor. When the target motor moves toward the target position, the target motor gradually approaches the limit block.

[0079] The correspondence between the limit block and the zero position of the target motor is used to limit the moving range of the target motor. The limit block can be mechanically installed at one end of the moving range of the target motor to limit the moving range of the target motor, thereby protecting the target motor.

[0080] like Figure 2 and Figure 3 As shown, a slot-type photoelectric sensor is added in the direction of the target motor returning to zero as the signal input of the target position. The sensing piece of the slot-type photoelectric sensor can be set at the target position. The programmable logic controller (PLC) determines whether the target motor is at the target position according to the motor position of the target motor. When there is no signal input at the target position, it is determined that the target motor is not at the target position, and the electric signal (JOG signal) is started to control the target motor to quickly reach the target position.

[0081] Among them, position control can be achieved through a JOG signal, which triggers the target motor to move at a set speed and usually continues to move before receiving a stop signal. For example, the target motor can be fine-tuned or moved quickly through the JOG signal.

[0082] In actual execution, when it is determined that the target information is not at the target position, the target motor is triggered by a JOG signal to move toward the zero position at a set speed until the target motor reaches the target position.

[0083] It should be noted that, through the position control of the JOG signal, the target motor can be controlled to reach the target position quickly and safely. Compared with the whole-process torque control of the motor in the related technology, it has the characteristic of controlling the rapid movement of the target motor.

[0084] In this embodiment, the target motor is position controlled to greatly improve its return-to-zero speed. Position control is combined with a second control method based on torque information to overcome the time-consuming problem of single torque control, allowing the target motor to return to zero quickly and accurately.

[0085] In some embodiments, the target motor is a servo motor.

[0086] It can be understood that, when the target motor is a servo motor, the torque information can be directly output by the servo motor.

[0087] In related technologies, the motor returns to zero mainly through the following two methods:

[0088] First, use the limit signal, near-origin signal and origin signal to confirm the mechanical origin, control the driver to drive the motor through the PLC, start the driver to return to the origin, and the driver uses different combinations of limit signals, near-origin signals and origin signals to make a return-to-origin detection signal to realize automatic detection of the return-to-origin signal, control the start and stop of the motor, stop the motor after detecting the return-to-origin signal, clear the encoder feedback position, and clear the current value of the instruction after receiving the driver's return-to-origin completion signal, so that the motor returns to zero.

[0089] Secondly, through the origin preset and the return to origin instruction (MC_Home axis instruction) in the PLC, the encoder feedback position and the current value of the instruction are cleared to determine the mechanical origin.

[0090] However, the near-origin signal and origin signal in the above method are received by installing sensors, and the accuracy of the sensors decreases with the increase of usage time. Selecting only the near-origin sensor signal to determine the mechanical origin will cause deviations in the motor during multiple returns to the origin.

[0091] And because the installation position of the sensor is uncertain, the locking of the coupling will affect the physical position of the motor's origin, as well as the artificially preset origin, etc. These factors will lead to uncertainty in the actual origin position of the motor.

[0092] In this embodiment, when the target motor is a servo motor, the zero point position is determined by the torque information output by the servo motor. Compared with the existing method of determining the motor zero point based on photoelectric sensors, the use of sensors can be reduced, the control cost of the target motor is reduced, and the zero point position error caused by the sensitivity difference of the sensor is reduced.

[0093] In some embodiments, controlling the target motor to return to zero by a second control method includes:

[0094] When it is determined that the target motor is at the target position, torque information is obtained;

[0095] Based on the torque information, the target motor is torque controlled to control the target motor to return to zero until the torque value of the target motor reaches a preset value.

[0096] In actual implementation, Figure 3 As shown, when there is a signal input at the target position, it is determined that the target motor is currently at the target position, and the target motor switches from position control to torque control, controls the output torque of the target motor, and drives the target motor to start moving in the direction of the zero position until the target motor hits the upper limit block. When it is determined that the torque value of the target motor reaches the preset value based on the torque information, the target motor reaches the zero position.

[0097] From the above, it can be seen that the present application does not need to rely on the installation of sensors and the preset origin to confirm the zero position. When the target motor is a servo motor, the motor is automatically returned to zero only by the torque value controlled by the PLC in the torque control mode, thereby improving the zero return accuracy and reliability of the target motor.

[0098] In this embodiment, the target motor at the target position is subjected to torque control, thereby improving the zero return accuracy and reliability of the target motor.

[0099] In some embodiments, after determining that the target motor returns to zero, the method further includes:

[0100] Perform position control on the target motor and update the zero position of the target motor.

[0101] It is understandable that the target motor has an encoder, which is used to provide real-time feedback of parameters such as position, speed and direction during the operation of the target motor, and is also used to set the zero position of the target motor.

[0102] When it is determined that the rotating shaft of the target motor has reached the target position, the torque information of the target motor is obtained, and the target motor is controlled to move from the target position toward the zero position through a second control method. After it is determined that the torque information of the target motor meets the set return to zero condition, it is determined that the target motor has returned to the zero position.

[0103] In actual execution, when it is determined based on the torque information that the torque value of the target motor reaches a preset value, the target motor is determined to return to zero, the feedback position of the encoder of the target motor is cleared, and the current position of the target motor at this time is used as the new zero position.

[0104] like Figure 3 As shown, when it is determined that the torque value of the target motor reaches the preset value according to the torque information, it is determined that the target motor has reached the zero position. After a delay of 0.2 seconds, the target motor stops moving, and then the target motor is switched from torque control to position control, the current encoder feedback position of the target motor is cleared, and the current position of the target motor is set to the new zero position, so as to update the zero position of the target motor.

[0105] In this embodiment, the zero point position is updated by returning the target motor to zero, which can reduce the error of the zero point position caused by the operation of the target motor.

[0106] In some embodiments, after controlling the target motor to return to zero by the second control method, the method further includes:

[0107] Get the number of times the target motor returns to zero;

[0108] When it is determined that the number of zero return times is greater than or equal to the preset number of times, a zero point position deviation detection procedure for the target motor is executed.

[0109] Among them, the preset number of times can be personalized for the target motor, and factors affecting the preset number of times may include: whether the target motor often loses steps, the structure and power of the target motor, whether the synchronous belt is tightened, whether the coupling is locked, etc.

[0110] The number of zero returns can be used to represent the number of single-axis cycle completions of the target motor. In a single-axis cycle, the target motor completes a complete cycle action, and the cycle action includes the motor zero return.

[0111] It is understandable that each update of the zero position of the target motor will be recorded in the operation log of the target motor.

[0112] The zero point position deviation detection program can be used to detect the zero point deviation related information such as the relative position deviation and absolute position deviation of the zero point position of the target motor.

[0113] For example, in the operation log of the target motor, the number of times the zero position returns to zero is read. When it is determined that the number of times the zero position returns to zero is ≥ the preset number, the zero position of each update is read in the operation log, the absolute position deviation between each zero position and the reference zero position is calculated, and the relative position deviation between each zero position is calculated. When the absolute position deviation and the relative position deviation are both within the allowable deviation range, the deviation detection is determined to be qualified. When either the absolute position deviation or the relative position deviation is not within the allowable deviation range, the deviation detection is determined to be unqualified, and it can be determined that the target motor may have lost steps.

[0114] During the operation of the target motor, it fails to move at the expected position or speed, resulting in the target motor losing steps and inaccurate position control of the target motor. Overload, excessive load inertia, incorrect motor driver settings, power supply problems, mechanical problems, encoder problems, and control system problems may all lead to the target motor losing steps.

[0115] In this embodiment, the deviation of the zero position of the target motor is detected by the number of times the zero position returns to zero, which can effectively avoid the deviation of the zero position caused by faults such as loss of steps of the target motor, meet the operating accuracy and performance requirements of the target motor, and periodically return the target motor to zero under preset conditions. The target motor is maintained in a controllable and safe state, thereby improving the stability of machine production.

[0116] In some embodiments, the zero position deviation detection procedure includes the following steps:

[0117] Controlling the target motor to move to the target position by a first control method;

[0118] The target motor is controlled to return to zero by the second control mode to obtain the zero point position to be measured of the target motor;

[0119] When it is determined that the zero point position to be measured is outside the preset range, it is determined that the target motor is in a position deviation state, and an alarm message is generated.

[0120] The preset range may be a fixed numerical range. When the zero point position to be measured is within the preset range, the zero point position of the target motor is normal and does not need to be calibrated.

[0121] It can be understood that the position deviation state is used to indicate that, when the zero point position of the target motor to be measured is outside a preset range, it is determined that the zero point position of the target motor has a position deviation and needs to be recalibrated.

[0122] In the process of executing the zero point position deviation detection program, the PLC controls the driver to perform position control on the target motor, drives the target motor to move toward the target position, and performs position detection on the target motor through the sensing device and continuously collects data until it is determined that the target motor has reached the target position. The PLC controls the driver to perform torque control on the target motor, drives the target motor to automatically return to zero, and when it is determined that the torque value of the target motor has reached the preset value based on the torque information of the target motor, the current position fed back by the encoder of the target motor is the zero point position to be measured, and the PLC judges the zero point position to be measured. When it is determined that the zero point position to be measured is within the preset range, there is no deviation in the zero point position to be measured, and the target motor executes the next single-axis cycle; when the zero point position to be measured is outside the preset range, it is determined that the target motor is in a position deviation state, and alarm information in the form of sound, light and electricity is generated to realize automatic zero return detection of position deviation and alarm of the target motor.

[0123] In the related technology, when the motor loses steps due to factors such as loose coupling or belt slippage, there is no fixed physical reference point, and it is impossible to automatically determine whether there is a position deviation through the encoder position and reference point, resulting in increasing position deviation during operation. When the position deviation exceeds a certain range, there is a risk of machine collision. In severe cases, the mechanical structure and electrical components are damaged, increasing maintenance time and cost.

[0124] In this embodiment, the zero point position to be measured is obtained through position control and torque control of the target motor, and whether there is a position deviation in the zero point position to be measured is detected based on a preset range. This can minimize the step loss caused by poor mechanical structure and avoid the problem of collision of the target motor.

[0125] In some embodiments, after determining that the target motor is in a position deviation state and generating an alarm message, the method further includes:

[0126] The target motor is position controlled and the zero position is updated by the zero position to be measured.

[0127] It can be understood that when it is determined that the target motor is in a position deviation state, if a stop command is received, the target motor is controlled to stop, the target motor is in a mechanical locking state, and the protection device is released, providing a basis for troubleshooting and zero point calibration of the target motor.

[0128] In actual execution, when it is determined that the target motor is in a position deviation state, if no control command is received, the axis command MC_Home is executed, the encoder feedback position of the target motor is cleared, the zero point position to be measured is used as the new zero point position, and the next single-axis cycle is run.

[0129] In this embodiment, the zero point position is updated by the zero point position to be measured, so that the target motor can be ensured to start running from the known zero point position to be measured, thereby improving the stability and accuracy of the motor.

[0130] The present application also provides an embodiment.

[0131] like Figure 3 As shown, a return to zero start button and an axis zero reset button can be set on the human-machine interaction interface.

[0132] Among them, the human-computer interaction interface can be a touch screen.

[0133] When the start button of the return to zero is triggered, the PLC begins to determine whether the motor position currently fed back by the target motor is at the target position. If the target motor is not at the target position, the PLC first controls the driver to drive the target motor to the target position.

[0134] When the target motor is at the target position, the PLC starts executing the motor homing procedure.

[0135] The motor return to zero program uses the signal input of the target position as the start signal of the axis instruction MC_TorqueControl. At this time, the target motor is switched from position control to torque control, the torque control of the driver is started, the output torque of the target motor is controlled, and the target motor is driven to start moving in the direction of the zero position. The target motor moves in the set direction with the output torque. When the torque value of the target motor reaches the preset value, the target motor stops moving, and the torque value in the axis instruction Mc_TorqueControl reaches the variable InTorque and starts to output. The delay device is started with the output signal. After a delay of 0.2 seconds, the output signal of the delay device is used as the start signal of the axis instruction MC_Stop in the PLC, and the axis instruction MC_Stop starts to execute. At this time, the motion state of the target motor is cleared and reset, and the control state of the target motor is switched from torque control to position control. Press the axis reset button in the human-computer interaction interface, and the axis instruction MC_Home in the PLC starts to execute, the encoder feedback position of the current target motor is cleared, and the motor return to zero program is completed.

[0136] like Figure 4 As shown, after the target motor completes a single-axis cycle, it starts to automatically detect whether the preset number of times corresponding to the number of single-axis cycle completions is 0.

[0137] The number of times a single axis cycle is completed is equal to the number of times the zero position is returned to zero.

[0138] When the preset number is 0, it is determined that the target motor has not enabled the automatic position deviation detection function, and the target motor continues to run the next single-axis cycle; when the preset number is not 0, the number of zero returns to the zero position is counted and compared with the preset number, and when the number of zero returns is less than the preset number, the next single-axis cycle is continued; when the number of zero returns is greater than or equal to the preset number, the automatic position deviation detection function is enabled, and the zero position deviation detection procedure of the zero position is executed.

[0139] In the zero position deviation detection procedure of the zero position, the number of zero returns is greater than or equal to the preset number, and the target motor is driven to quickly reach the target position through position control. After reaching the target position, the target motor is switched to torque control. When the torque value of the target motor reaches the preset value, the drive is stopped. At this time, it is determined whether the zero position to be measured fed back by the current encoder is within the preset range (0 to 1mm). When the zero position to be measured is within the preset range, it indicates that there is no deviation in the zero position to be measured, and the target continues to run the next single-axis cycle.

[0140] When the zero point position to be measured exceeds the preset range, it means that there is a deviation in the zero point position to be measured, and an alarm prompt (warning information) is issued. Enter the next step to select whether to automatically zero the deviation position.

[0141] If the position deviation alarm prompts for more than 3s without any shutdown operation, the deviation position is automatically marked to zero, and the current motor encoder feedback position is cleared by executing the axis command MC_Home, and the zero position is updated by the zero position to be measured, and the next single-axis cycle is continued. If the deviation position is not automatically marked to zero, within 3s after the position deviation alarm prompt is issued, the target motor is stopped, the cause of the deviation of the zero position to be measured of the target motor is checked and repaired, and the target motor is restarted after the repair is completed, and the next single-axis cycle is run.

[0142] In the related art, since the corresponding position parameters of multiple machines on the same axis are not unified, it is impossible to set upper and lower limits of the parameters to prevent mistakes, there are safety risks, and the stability of different machines is not uniform.

[0143] In this embodiment, the target motor is controlled to move quickly to a target position close to the zero position through motor position control, and the target motor is controlled to return to zero accurately according to the torque information, so as to unify the parameters of the motor zero position, and avoid the problem of inconsistent corresponding position parameters of multiple machines on the same axis. The upper and lower limits of the zero position are controlled by preset ranges to reduce the risk of machine collision due to incorrect parameter settings. The zero position is updated by returning the target motor to zero, which effectively improves the accuracy and stability of the target motor returning to zero. No human intervention is required, which saves manpower. By detecting whether there is a position deviation in the zero position to be measured based on the preset range, the step loss caused by poor mechanical structure can be minimized, and the problem of collision between different mechanisms can be avoided.

[0144] The present application also provides a motor control system, which includes:

[0145] Target motor;

[0146] An induction device, wherein an induction sheet of the induction device is arranged at a target position of the target motor;

[0147] A controller is connected to the target motor and the induction device, and is used to execute the motor control method as described in the above embodiment.

[0148] The sensing device may be a slot-type photoelectric sensor, which is disposed at a target position of a rotating shaft of a target motor, and the controller may be a PLC.

[0149] The controller drives the target motor through the driver to achieve more precise control of the target motor, improve the driving efficiency and performance, and realize complex functions.

[0150] According to the motor control system provided in the embodiment of the present application, the target motor can be controlled to move quickly to a target position close to the zero position through the first control method, leaving control space for the second control method. Through the second control method based on the torque value, the target motor can be controlled to return to zero accurately, effectively improving the return to zero accuracy of the target motor.

[0151] The motor control method provided in the embodiment of the present application can be executed by a motor control device. In the embodiment of the present application, the motor control device provided in the embodiment of the present application is described by taking the motor control method executed by the motor control device as an example.

[0152] The embodiment of the present application also provides a motor control device.

[0153] like Figure 5 As shown, the motor control device includes: a first control module 510 and a second control module 520 .

[0154] A first control module 510, configured to control the target motor to move to a target position by a first control method;

[0155] The second control module 520 is used to control the target motor to return to zero through a second control method, where the second control method is to perform control based on torque information of the target motor.

[0156] According to the motor control device provided in the embodiment of the present application, the target motor can be controlled to move quickly to a target position close to the zero position through the first control method, leaving control space for the second control method. Through the second control method based on the torque value, the target motor can be controlled to return to zero accurately, effectively improving the return to zero accuracy of the target motor.

[0157] In some embodiments, the target position is set adjacent to the zero position of the target motor, and the zero position of the target motor is used to represent the state of the target motor returning to zero.

[0158] In some embodiments, the first control mode is characterized as position control.

[0159] In some embodiments, the target motor is a servo motor.

[0160] In some embodiments, the second control module 520 is further configured to:

[0161] When it is determined that the target motor is at the target position, torque information is obtained;

[0162] Based on the torque information, the target motor is torque controlled to control the target motor to return to zero until the torque value of the target motor reaches a preset value.

[0163] In some embodiments, the first control module 510 is further configured to:

[0164] Perform position control on the target motor and update the zero position of the target motor.

[0165] In some embodiments, the second control module 520 is further configured to:

[0166] Get the number of times the target motor returns to zero;

[0167] When it is determined that the number of zero return times is greater than or equal to the preset number of times, a zero point position deviation detection procedure for the target motor is executed.

[0168] In some embodiments, the zero position deviation detection procedure includes the following steps:

[0169] Controlling the target motor to move to the target position by a first control method;

[0170] The target motor is controlled to return to zero by the second control mode to obtain the zero point position to be measured of the target motor;

[0171] When it is determined that the zero point position to be measured is outside the preset range, it is determined that the target motor is in a position deviation state, and an alarm message is generated.

[0172] In some embodiments, the second control module 520 is further configured to:

[0173] The target motor is position controlled and the zero position is updated by the zero position to be measured.

[0174] The motor control device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than the terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (Augmented Reality, AR) / virtual reality (Virtual Reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (Ultra-Mobile Personal Computer, UMPC), a netbook or a personal digital assistant (Personal Digital Assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (Personal Computer, PC), a television (Television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0175] The motor control device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0176] The motor control device provided in the embodiment of the present application can achieve Figures 1 to 4 To avoid repetition, the various processes implemented in the motor control method embodiment are not described here.

[0177] In some embodiments, Figure 6 As shown, an embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and a computer program stored in the memory 602 and executable on the processor 601. When the program is executed by the processor 601, each process of the above-mentioned motor control method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0178] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

[0179] An embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned motor control method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0180] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0181] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned motor control method when executed by a processor.

[0182] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0183] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned motor control method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0184] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0185] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0186] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the motor control method of each embodiment of the present application.

[0187] In the description of this application, "first feature" or "second feature" may include one or more of the features.

[0188] In the description of the present application, “plurality” means two or more.

[0189] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0190] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0191] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.

Claims

1. A motor control method, characterized in that: The method comprises: Controlling the target motor to move to the target position by a first control method; Controlling the target motor to return to zero by a second control method, wherein the second control method is based on torque information of the target motor; After controlling the target motor to return to zero by the second control method, the method further includes: Obtaining the number of zero returns of the target motor; When it is determined that the number of zero return times is greater than or equal to a preset number, executing a zero point position deviation detection procedure for the target motor; The zero position deviation detection procedure comprises the following steps: Controlling the target motor to move to the target position by the first control method; Controlling the target motor to return to zero by the second control mode to obtain the zero point position to be measured of the target motor; When it is determined that the zero point position to be measured is outside a preset range, it is determined that the target motor is in a position deviation state, and an alarm message is generated.

2. The motor control method according to claim 1, characterized in that: The target position is arranged adjacent to the zero position of the target motor, and the zero position of the target motor is used to represent a state where the target motor returns to zero.

3. The motor control method according to claim 1, characterized in that: The first control mode is characterized as position control.

4. The motor control method according to claim 1, characterized in that: The target motor is a servo motor.

5. The motor control method according to any one of claims 1 to 4, characterized in that: The step of controlling the target motor to return to zero by a second control method includes: When it is determined that the target motor is at the target position, acquiring the torque information; Based on the torque information, the target motor is torque controlled to control the target motor to return to zero until the torque value of the target motor reaches a preset value.

6. The motor control method according to claim 5, characterized in that: After determining that the target motor returns to zero, the method further includes: The target motor is position controlled to update the zero point position of the target motor.

7. The motor control method according to claim 1, characterized in that: After determining that the target motor is in a position deviation state and generating an alarm message, the method further includes: The target motor is position controlled, and the zero point position is updated by the zero point position to be measured.

8. A motor control system, characterized in that: include: Target motor; An induction device, wherein an induction sheet of the induction device is arranged at a target position of the target motor; A controller is connected to the target motor and the induction device, and is used to execute the motor control method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Machine tool torque zero returning method

    CN114296402A