Shaft locking method for servo motor

文档序号:786442 发布日期:2021-04-09 浏览:10次 中文

阅读说明:本技术 一种伺服电机锁轴方法 (Shaft locking method for servo motor ) 是由 颉友强 于 2020-11-02 设计创作,主要内容包括:本发明提供了一种伺服电机锁轴方法,包括:获取伺服电机的旋转位置信息;基于所述旋转位置信息在起始位置和结束位置中间预设第一阈值;所述位置信息没有落入第一阈值范围内采用第一位置环、第一电流环和第一速度环控制伺服电机的运动;所述位置信息落入第一阈值范围内采用第二位置环和第二电流环控制所述伺服电机的运动;所述第二位置环比例积分调节方式包括比例和微分控制;可以在硬件资源比较薄弱的情况下尽可能地做好伺服的中低端控制,实用性很高;改造的位置环响应速度更快,控制更有力度;可以使用于定位精度要求不高而的锁轴刚性要大场合。(The invention provides a shaft locking method for a servo motor, which comprises the following steps: acquiring rotation position information of a servo motor; presetting a first threshold value in the middle of the starting position and the ending position based on the rotation position information; the position information does not fall into the range of a first threshold value, and a first position ring, a first current ring and a first speed ring are adopted to control the movement of the servo motor; the position information falls into a first threshold range, and a second position loop and a second current loop are adopted to control the movement of the servo motor; the second position loop proportional-integral adjusting mode comprises proportional control and differential control; the middle-low end control of the servo can be made as much as possible under the condition that hardware resources are weak, and the practicability is high; the improved position loop has higher response speed and more control strength; the method can be used in occasions with low positioning precision requirements and high lock shaft rigidity.)

1. A servo motor shaft locking method is characterized by comprising the following steps:

acquiring rotation position information of a servo motor;

presetting a first threshold value in the middle of the starting position and the ending position based on the rotation position information;

the position information does not fall into the range of a first threshold value, and a first position ring, a first current ring and a first speed ring are adopted to control the movement of the servo motor;

the position information falls into a first threshold range, and a second position loop and a second current loop are adopted to control the movement of the servo motor;

the second position loop proportional-integral adjustment mode comprises proportional and derivative control.

2. The method as claimed in claim 1, further comprising obtaining current information of the servo motor, and setting an integral parameter corresponding to the velocity loop to zero when determining the distortion of the current loop control.

3. The servo motor shaft locking method according to claim 1, wherein a first speed threshold is preset;

acquiring speed information of a first speed ring;

determining whether the first speed value is less than a first speed threshold based on the speed information;

when the current is not less than the preset value, the first position loop, the first current loop and the first speed loop are continuously adopted to control the motion of the servo motor;

and when the current is smaller than the preset value, the second position loop and the second current loop are adopted to control the motion of the servo motor.

4. The servo motor shaft locking method according to claim 3, further comprising obtaining a position loop current loop output value calculated by a front stage speed loop and a position loop current loop output value calculated by a rear stage position loop;

performing smoothing processing on the IQ calculated by the front-stage speed loop and the IQ calculated by the rear-stage position loop;

calculating the output value of the position loop current loop when the switching point is input, wherein the processing formula is as follows:

IQfront section+IQRear section=IQSwitching point+ KP × pos _ err, where KP position loop control coefficients; pos _ err position loop offset value; IQSwitching pointOutputting a loop current loop output value for the position of the switching point; IQFront sectionA position loop current loop output value calculated for the front segment velocity loop; IQRear sectionAnd the position loop current loop output value calculated by the rear-section position loop.

5. The servo motor shaft locking method according to claim 1, wherein the acquiring of the current data and the position data of the servo motor specifically comprises:

acquiring current data and position data of the servo motor according to a preset acquisition structure;

wherein the collection structure comprises: a single sampling resistor for collecting the current data, and a position collector for collecting the position data.

6. The servo motor shaft locking method according to claim 1, wherein whether a current loop controls distortion or not is judged according to the position of the servo motor acquired in real time, and the method specifically comprises the following steps: judging whether the first distance is smaller than a preset second threshold value or not; the second threshold is greater than the first threshold; if so, determining the current loop control distortion; and if not, determining that the current loop control is not distorted.

7. The servo motor shaft locking method of claim 1, wherein the integration parameter comprises: the velocity ring corresponds to an accumulated integral value and an integral coefficient.

8. The servo motor shaft locking method according to claim 1, further comprising: when the first distance is judged to be not smaller than the first threshold value, adjusting a gain coefficient corresponding to the position ring according to the first distance and a preset adjusting rule; and controlling the servo motor to continue moving according to the current data and the position data which are acquired again, the adjusted gain coefficient and the proportion adjustment processing mode.

9. The servo motor shaft locking method according to claim 1, wherein the adjustment rule comprises: when the current position of the servo motor is larger than the target position, subtracting the gain coefficient and the gain coefficient variable quantity corresponding to the position ring; or, when the current position of the servo motor is smaller than the target position, adding the gain coefficient corresponding to the position loop and the gain coefficient variable quantity; wherein the gain coefficient variation is: and finding the gain coefficient variable quantity corresponding to the first distance in the corresponding relation between the preset distance and the gain coefficient variable quantity.

10. The servo motor shaft locking method according to claim 1, wherein when it is determined that the current loop control is not distorted according to the position of the servo motor acquired in real time, the method further comprises: and when the preset reconstruction condition is met, controlling the servo motor to continue to move according to the current data and the position data which are acquired again and the proportional-integral adjustment processing mode.

11. The servo motor shaft locking method according to claim 1, wherein the reconfiguration condition comprises: to the acquisition period of the current data, and/or to the acquisition period of the position data.

12. A control apparatus of a servo motor, characterized by comprising:

a memory for storing program instructions;

a processor for calling the program instructions stored in the memory, and executing according to the obtained program:

controlling the servo motor to move according to the acquired current data and position data of the servo motor and a preset proportional-integral adjustment processing mode;

in the motion process of the servo motor, if the current loop control distortion is judged according to the position of the servo motor acquired in real time, setting an integral parameter corresponding to a speed loop to zero;

in the process of controlling the servo motor to continue moving according to the current data, the position data and a preset proportion adjusting and processing mode, if the first distance is judged to be smaller than a preset first threshold value, controlling the servo motor to stop moving; wherein the first distance is: and the distance between the current position of the servo motor and a preset target position in the position ring.

13. A control system for a servo motor, comprising: the control device of claim 12, and an acquisition structure;

wherein the collection structure comprises: the servo motor position detection device comprises a single sampling resistor and a position collector, wherein the single sampling resistor is used for collecting current data of the servo motor;

the acquisition structure is configured to: the current data and the position data are collected, and the collected current data and the collected position data are transmitted to the control equipment, so that the control equipment controls the servo motor to move according to the current data and the position data.

Technical Field

The invention relates to the field of intelligent robots, in particular to a shaft locking method for a servo motor.

Background

When the servo motor is controlled, the control can be performed through at least one of a current loop, a position loop and a speed loop, wherein the current loop can be understood as a control link using a current signal as a feedback signal, the position loop can be understood as a control link using a position signal as a feedback signal, and the speed loop can be understood as a control link using a speed signal as a feedback signal.

For a closed-loop system composed of a current loop, a position loop and a speed loop, a plurality of sampling resistors are usually collected to sample the current of the servo motor, so that the manufacturing cost of a collection structure is increased, and the control error of the closed-loop system is easily caused, thereby causing the oscillation and the jitter of the servo motor.

A simple and practical motor shaft locking mode is introduced, in some application occasions with low requirement precision, if a high-grade servo-driven standard control chip (DSP + FPGA) is used, the cost is too high, so that the method is not very suitable, and a practical skill is provided, so that the method can be used in occasions with low requirement on positioning precision and high shaft locking rigidity.

Disclosure of Invention

One of the purposes of the invention is to provide a motor lock shaft with high rigidity.

In order to achieve the above object, the present invention provides a shaft locking method for a servo motor, comprising:

acquiring rotation position information of a servo motor;

presetting a first threshold value in the middle of the starting position and the ending position based on the rotation position information;

the rotation position information does not fall into a first threshold range, and a first position ring, a first current ring and a first speed ring are adopted to control the movement of the servo motor;

the rotation position information falls into a first threshold range, and a second position ring and a second current ring are adopted to control the movement of the servo motor;

the second position loop proportional-integral adjustment mode comprises proportional and derivative control.

And further, acquiring current information of the servo motor, and setting an integral parameter corresponding to the speed loop to be zero when the control distortion of the current loop is judged.

Further, presetting a first speed threshold; acquiring speed information of a first speed ring; determining whether the first speed value is less than a first speed threshold based on the speed information; when the current is not less than the preset value, the first position loop, the first current loop and the first speed loop are continuously adopted to control the motion of the servo motor; and when the current is smaller than the preset value, the second position loop and the second current loop are adopted to control the motion of the servo motor.

Further, the method also comprises the steps of obtaining a position loop current loop output value calculated by a front-stage speed loop and a position loop current loop output value calculated by a rear-stage position loop;

performing smoothing processing on the IQ calculated by the front-stage speed loop and the IQ calculated by the rear-stage position loop;

calculating the output value of the position loop current loop when the switching point is input, wherein the processing formula is as follows:

IQfront section+IQRear section=IQSwitching point+ KP × pos _ err, where KP position loop control coefficients; pos _ err position loop offset value; IQSwitching pointOutputting a loop current loop output value for the position of the switching point; IQFront sectionA position loop current loop output value calculated for the front segment velocity loop; IQRear sectionAnd the position loop current loop output value calculated by the rear-section position loop.

Further, acquiring current data and position data of the servo motor specifically includes:

acquiring current data and position data of the servo motor according to a preset acquisition structure;

wherein the collection structure comprises: a single sampling resistor for collecting the current data, and a position collector for collecting the position data.

Further, according to the position of the servo motor acquired in real time, whether the current loop controls distortion or not is judged, and the method specifically comprises the following steps: judging whether the first distance is smaller than a preset second threshold value or not; the second threshold is greater than the first threshold; if so, determining the current loop control distortion; and if not, determining that the current loop control is not distorted.

Further, the integration parameters include: the velocity ring corresponds to an accumulated integral value and an integral coefficient.

Further, still include: when the first distance is judged to be not smaller than the first threshold value, adjusting a gain coefficient corresponding to the position ring according to the first distance and a preset adjusting rule; and controlling the servo motor to continue moving according to the current data and the position data which are acquired again, the adjusted gain coefficient and the proportion adjustment processing mode.

Further, the adjustment rule includes: when the current position of the servo motor is larger than the target position, subtracting the gain coefficient and the gain coefficient variable quantity corresponding to the position ring; or, when the current position of the servo motor is smaller than the target position, adding the gain coefficient corresponding to the position loop and the gain coefficient variable quantity; wherein the gain coefficient variation is: and finding the gain coefficient variable quantity corresponding to the first distance in the corresponding relation between the preset distance and the gain coefficient variable quantity.

Further, when the current loop control is judged not to be distorted according to the position of the servo motor acquired in real time, the method further comprises the following steps: and when the preset reconstruction condition is met, controlling the servo motor to continue to move according to the current data and the position data which are acquired again and the proportional-integral adjustment processing mode.

Further, the reconstruction condition includes: to the acquisition period of the current data, and/or to the acquisition period of the position data.

To achieve the above object, the present invention provides a control apparatus of a servo motor, comprising:

a memory for storing program instructions;

a processor for calling the program instructions stored in the memory, and executing according to the obtained program:

controlling the servo motor to move according to the acquired current data and position data of the servo motor and a preset proportional-integral adjustment processing mode;

in the motion process of the servo motor, if the current loop control distortion is judged according to the position of the servo motor acquired in real time, setting an integral parameter corresponding to a speed loop to zero;

in the process of controlling the servo motor to continue moving according to the current data, the position data and a preset proportion adjusting and processing mode, if the first distance is judged to be smaller than a preset first threshold value, controlling the servo motor to stop moving; wherein the first distance is: and the distance between the current position of the servo motor and a preset target position in the position ring.

To achieve the above object, a control system for a servo motor includes: the control apparatus, and acquisition structure described in the preceding paragraphs;

wherein the collection structure comprises: the servo motor position detection device comprises a single sampling resistor and a position collector, wherein the single sampling resistor is used for collecting current data of the servo motor;

the acquisition structure is configured to: the current data and the position data are collected, and the collected current data and the collected position data are transmitted to the control equipment, so that the control equipment controls the servo motor to move according to the current data and the position data.

Compared with the prior art, the invention has the following technical effects:

presetting a first threshold value between the starting position and the ending position based on the rotation position information; the rotation position information does not fall into a first threshold range, and a first position ring, a first current ring and a first speed ring are adopted to control the movement of the servo motor; the position information falls into the range of the first threshold value, the method for controlling the motion of the servo motor by adopting the second position loop and the second current loop is adopted, and after the traditional three-loop control is modified by the method, the middle-low-end control of the servo motor can be made as much as possible under the condition of relatively weak hardware resources, so that the practicability is very high; the improved position loop has higher response speed and more control strength; the method can be used in occasions with low positioning precision requirements and high lock shaft rigidity.

Drawings

In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.

Fig. 1 is a flowchart of a method for locking a shaft of a servo motor according to an embodiment of the present invention;

FIG. 2 is a static error map of a generic position loop provided by an embodiment of the present invention;

FIG. 3 is a static error map of the advanced and retracted position ring provided by an embodiment of the present invention.

Detailed Description

To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings. Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings, in which like numerals in different drawings represent the same or similar elements, unless otherwise specified. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with aspects of the present application, detailed in the claims of the drawings.

In some embodiments, the present invention provides a servo motor shaft locking method, shown in fig. 1, comprising:

acquiring rotation position information of a servo motor;

presetting a first threshold value in the middle of the starting position and the ending position based on the rotation position information;

the rotation position information does not fall into a first threshold range, and a first position ring, a first current ring and a first speed ring are adopted to control the movement of the servo motor;

the position information falls into a first threshold range, and a second position loop and a second current loop are adopted to control the movement of the servo motor;

the second position loop proportional-integral adjustment mode includes Proportional and Derivative (PD) control.

In some embodiments, the method further includes obtaining current information of the servo motor, and setting an integral parameter corresponding to the velocity loop to zero when the current loop control distortion is determined.

In some embodiments, shown in fig. 2, a first speed threshold is preset; acquiring speed information of a first speed ring; determining whether the first speed value is less than a first speed threshold based on the speed information; when the current is not less than the preset value, the first position loop, the first current loop and the first speed loop are continuously adopted to control the motion of the servo motor; and when the current is smaller than the preset value, the second position loop and the second current loop are adopted to control the motion of the servo motor. Illustratively, there is only a requirement at the instant of switching that the speed must be less than a fixed value, such as 20RPM in the case of a maximum speed of 3000 RPM. And the position difference is smaller than a fixed value, for example, a 1000-line encoder is practical, and 4000 is obtained after 4 times, so that the fixed value is generally 100. This minimizes jitter problems.

In some embodiments, obtaining a position loop current loop output value calculated by the front stage speed loop and a position loop current loop output value calculated by the rear stage position loop;

performing smoothing processing on the IQ calculated by the front-stage speed loop and the IQ calculated by the rear-stage position loop;

calculating the output value of the position loop current loop when the switching point is input, wherein the processing formula is as follows:

IQfront section+IQRear section=IQSwitching point+ KP × pos _ err, where KP position loop control coefficients; pos _ err position loop offset value; IQSwitching pointOutputting a loop current loop output value for the position of the switching point; IQFront sectionA position loop current loop output value calculated for the front segment velocity loop; IQRear sectionAnd the position loop current loop output value calculated by the rear-section position loop.

The proportional parameter is relatively large. Schematically: for example, the coefficient KP of the proportional link is 30-50 times that of the proportional link under normal conditions, so that the rigidity of the lock shaft is a little higher, and the static difference cannot be eliminated.

As shown in fig. 2-3, the resulting modified position loop has a faster response speed and more control dynamics.

In some embodiments, acquiring the current data and the position data of the servo motor specifically includes:

acquiring current data and position data of the servo motor according to a preset acquisition structure;

wherein the collection structure comprises: a single sampling resistor for collecting the current data, and a position collector for collecting the position data.

In some embodiments, determining whether the current loop controls distortion according to the position of the servo motor acquired in real time specifically includes: judging whether the first distance is smaller than a preset second threshold value or not; the second threshold is greater than the first threshold; if so, determining the current loop control distortion; and if not, determining that the current loop control is not distorted.

In some embodiments, the integration parameters include: the velocity ring corresponds to an accumulated integral value and an integral coefficient.

In some embodiments, further comprising: when the first distance is judged to be not smaller than the first threshold value, adjusting a gain coefficient corresponding to the position ring according to the first distance and a preset adjusting rule; and controlling the servo motor to continue moving according to the current data and the position data which are acquired again, the adjusted gain coefficient and the proportion adjustment processing mode.

In some embodiments, the adjustment rule comprises: when the current position of the servo motor is larger than the target position, subtracting the gain coefficient and the gain coefficient variable quantity corresponding to the position ring; or, when the current position of the servo motor is smaller than the target position, adding the gain coefficient corresponding to the position loop and the gain coefficient variable quantity; wherein the gain coefficient variation is: and finding the gain coefficient variable quantity corresponding to the first distance in the corresponding relation between the preset distance and the gain coefficient variable quantity.

In some embodiments, when it is determined that the current loop control is not distorted according to the position of the servo motor acquired in real time, the method further includes: and when the preset reconstruction condition is met, controlling the servo motor to continue to move according to the current data and the position data which are acquired again and the proportional-integral adjustment processing mode.

In some embodiments, the reconstruction conditions include: to the acquisition period of the current data, and/or to the acquisition period of the position data.

In some embodiments, a control apparatus of a servo motor includes:

a memory for storing program instructions;

a processor for calling the program instructions stored in the memory, and executing according to the obtained program:

controlling the servo motor to move according to the acquired current data and position data of the servo motor and a preset proportional-integral adjustment processing mode;

in the motion process of the servo motor, if the current loop control distortion is judged according to the position of the servo motor acquired in real time, setting an integral parameter corresponding to a speed loop to zero;

in the process of controlling the servo motor to continue moving according to the current data, the position data and a preset proportion adjusting and processing mode, if the first distance is judged to be smaller than a preset first threshold value, controlling the servo motor to stop moving; wherein the first distance is: and the distance between the current position of the servo motor and a preset target position in the position ring.

In some embodiments, there is provided a control system of a servo motor, comprising: the control device and acquisition structure of the preceding paragraphs;

wherein the collection structure comprises: the servo motor position detection device comprises a single sampling resistor and a position collector, wherein the single sampling resistor is used for collecting current data of the servo motor;

the acquisition structure is configured to: the current data and the position data are collected, and the collected current data and the collected position data are transmitted to the control equipment, so that the control equipment controls the servo motor to move according to the current data and the position data.

After the traditional three-loop control is modified by the method, the middle-low-end control of the servo can be made as much as possible under the condition that hardware resources are weak, and the practicability is high.

A computer-readable storage medium, having stored thereon a computer program, the computer program being for implementation by a processor. On which a computer program is stored which, when being executed by a processor, implements the robot self-test control method described above from the dispatch server side.

A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.

Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.

The laser-based people stream detection method and device provided by the application are introduced in detail, specific examples are applied in the description to explain the principle and the implementation of the application, and the description of the above embodiments is only used to help understand the method and the core idea of the application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种多自由度球形电机驱动控制装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!