Self-tuning control method for control parameters of servo motor

文档序号:1314211 发布日期:2020-07-10 浏览:39次 中文

阅读说明:本技术 一种伺服电机控制参数自整定控制方法 (Self-tuning control method for control parameters of servo motor ) 是由 韦鲲 张建政 于 2020-04-10 设计创作,主要内容包括:本发明提供了一种伺服电机控制参数自整定控制方法,包括:S1:判断AutoTune是否为1,若是进入S2,否则结束方法;S2:串联所述继电器函数与控制对象;S3:初始化继电器函数的输入初始值e<Sub>0</Sub>、输出初始值h<Sub>0</Sub>、输入增量步长值△e、输出增量步长值△h;S4:判断所述速度误差e<Sub>t</Sub>是否超过继电器函数门限值e<Sub>0</Sub>,若是进入S6,否则进入S5;S5:调整所述e<Sub>0</Sub>、所述h<Sub>0</Sub>、所述△e、所述△h并回到S4;S6:判断速度波是否出现等幅振荡,若是,进入S7,否则进入S5;S7:获取基波幅值和基波周期;S8:根据所述基波幅度和所述基波周期获取并设置速度环参数。本发明的有益效果是:简易并快速进行伺服电机控制参数设置。(The invention provides a self-tuning control method for control parameters of a servo motor, which comprises the following steps: s1: judging whether the AutoTune is 1, if so, entering S2, and if not, ending the method; s2: connecting the relay function and a control object in series; s3: initializing input initial value e of relay function 0 Outputting an initial value h 0 Inputting an increment step value △ e, outputting an increment step value △ h, S4, judging the speed error e t Whether the threshold value e of the relay function is exceeded 0 If yes, entering S6, otherwise entering S5; s5: adjust said e 0 H is described 0 △ e, △ h and back to S4, S6 judging whether the velocity wave has constant amplitude oscillation or not, if so, entering S7, otherwise, entering S5, S7 acquiring fundamental wave amplitude and fundamental wave period, S8 acquiring and setting velocity ring parameters according to the fundamental wave amplitude and the fundamental wave period, and the servo motor control parameter setting method has the advantages that servo motor control parameter setting is simply and rapidly carried out。)

1. A self-tuning control method for control parameters of a servo motor is characterized by comprising the following steps: the method comprises the following steps:

s1: judging whether the AutoTune is 1, if so, entering S2, and if not, ending the method;

s2: connecting the relay function and a control object in series;

s3: initializing input initial value e of relay function0Outputting an initial value h0An input increment step value △ e, an output increment step value △ h;

s4: judging the speed error etWhether the threshold value e of the relay function is exceeded0If yes, entering S6, otherwise entering S5;

s5: adjusting the input initial value e0The output initial value h0The input increment step value △ e, the output increment step value △ h, and back to S4;

s6: judging whether the velocity wave has constant amplitude oscillation, if so, entering S7, otherwise, entering S5;

s7: obtaining a fundamental wave amplitude and a fundamental wave period;

s8: and acquiring and setting a speed loop parameter and setting the autotune to be 0 according to the fundamental wave amplitude and the fundamental wave period.

2. The servo motor control parameter self-tuning control method according to claim 1, characterized in that: also comprises

S9: setting autoverify to 1;

s10: judging whether the motor is allowed to rotate or not, and ending the method if the motor is not allowed to rotate;

s11: executing a user-defined test;

s12: setting the autoverify to 0.

3. The servo motor control parameter self-tuning control method according to claim 2, characterized in that: the user-defined test is selected from one of a speed step test and a speed bandwidth test;

the speed step test comprises:

S11A-1: disconnecting the relay function and connecting the control loop PI in series;

S11A-2: the internal MCU records speed change data and calculates to obtain overshoot of step response;

S11A-3: the internal MCU judges whether the overshoot is too large, and if the overshoot is too large, the internal MCU enters S11A-5;

S11A-4: returning to S11A-2;

the speed bandwidth test comprises the following steps:

S11B-1: the internal MCU samples the given speed and the actual motor speed and carries out Fourier analysis to obtain frequency components;

S11B-2: judging whether the amplitude attenuation amplitude reaches 3dB, if so, entering S11B-3, otherwise, returning to S11B-1;

S11B-3: and outputting the sine frequency of the given speed as the bandwidth of the speed loop to an upper computer program.

4. The servo motor control parameter self-tuning control method according to claim 3, characterized in that: the judgment standard for judging whether the overshoot is too large is as follows: whether the overshoot is greater than 20% of a default value.

5. The self-tuning control method for the control parameters of the servo motor according to any one of claims 1 to 4, characterized in that: the relay function is a hysteresis relay function.

6. The self-tuning control method for the control parameter of the servo motor as claimed in claim 5, wherein the hysteresis relay function is selected from a function including a Z-N method, a modified Z-N method, a Tyreus-L uyben method, and a damped oscillation method.

7. The self-tuning control method for the control parameters of the servo motor according to any one of claims 1 to 4, characterized in that: the process for judging whether the constant amplitude oscillation occurs to the velocity wave comprises the following steps:

SX 1: carrying out Fourier analysis on the speed signal to obtain a fundamental wave signal;

SX 2: dividing the speed signal into a first waveform string and a second waveform string according to a certain period; the first waveform string and the second waveform string are separated by a plurality of periods;

SX 3: and comparing the first waveform string with the second waveform string, and if the amplitudes and the frequencies of the first waveform string and the second waveform string are in a state of approximate equality, judging that the velocity wave has constant-amplitude oscillation.

8. The servo motor control parameter self-tuning control method according to claim 7, characterized in that: the first waveform string and the second waveform string have a length of 3-5 sinusoidal cycles.

Technical Field

The invention relates to the field of servo motor control, in particular to a self-tuning control method for a servo motor control parameter.

Background

The determination of the servo motor control parameters is necessary in practice and is a difficulty, and improper control parameter setting can cause the reduction of system performance and can not meet production requirements.

The traditional parameter determination method is that the load inertia of the system is estimated firstly, and then the corresponding speed loop control parameter is calculated according to the inertia value; determining the inertia value firstly requires a driver to drive a motor to carry out certain acceleration and deceleration movement, and then calculating the system inertia value by an algorithm embedded in the driver; and then obtains the control parameters according to the data.

However, in an industrial application place, when a servo system and a load are installed, the motor is not necessarily allowed to perform acceleration and deceleration operation to identify the load inertia in actual conditions, which brings difficulty to parameter setting, and an engineer can only perform parameter setting and debugging according to experience.

Therefore, the market needs a self-tuning control method for servo motor control parameters, which enables engineers to perform parameter fine tuning based on the initial parameters so as to achieve the optimal performance of the system.

Disclosure of Invention

In order to solve the technical problem, the invention discloses a self-tuning control method for control parameters of a servo motor, and the technical scheme of the invention is implemented as follows:

a self-tuning control method for control parameters of a servo motor is characterized by comprising the following steps: s1: judging whether the AutoTune is 1, if so, entering 2, and if not, ending the method; s2: connecting the relay function and a control object in series; s3: initializing input initial value e of relay function0Outputting an initial value h0Inputting an increment step value △ e, outputting an increment step value △ h, S4, judging the speed error etWhether the threshold value e of the relay function is exceeded0If yes, entering S6, otherwise entering S5; s5: adjusting the input initial value e0The output initial value h0The method comprises the steps of inputting an increment step value △ e, outputting an increment step value △ h, returning to S4, judging whether constant amplitude oscillation occurs to the speed wave or not at S6, entering S7 if the constant amplitude oscillation occurs to the speed wave, entering S5 if the constant amplitude oscillation occurs to the speed wave does not occur to the speed wave, obtaining a fundamental wave amplitude and a fundamental wave period at S7, and obtaining and setting speed loop parameters according to the fundamental wave amplitude and the fundamental wave period at S8.

Preferably, further comprising, S9: setting autoverify to 1; s10: judging whether the motor is allowed to rotate or not, and ending the method if the motor is not allowed to rotate; s11: executing a user-defined test; s12: setting the autoverify to 0; s13: setting the autotune to 0.

Preferably, the user-defined test is selected from one of a speed step test and a speed bandwidth test; the speed step test comprises: S11A-1: disconnecting the relay function and connecting the control loop PI in series; S11A-2: the internal MCU records speed change data and calculates to obtain overshoot of step response; S11A-3: the internal MCU judges whether the overshoot is too large, and if the overshoot is too large, the internal MCU enters S11A-5; S11A-4: set autotune 1 and go back to S2; (ii) a The speed bandwidth test comprises the following steps: S11B-1: the internal MCU samples the given speed and the actual motor speed and carries out Fourier analysis to obtain frequency components; S11B-2: judging whether the amplitude attenuation amplitude reaches 3dB, if so, entering S11B-3, otherwise, returning to S11B-1; S11B-3: and outputting the sine frequency of the given speed as the bandwidth of the speed loop to an upper computer program.

Preferably, the criterion for determining whether the overshoot is too large is: whether the overshoot is greater than 20% of a default value.

Preferably, the relay function is a hysteresis relay function.

Preferably, the hysteresis relay function is selected from one of the functions including a Z-N based method, a modified Z-N method, a Tyreus-L uyben method, a damped oscillation method.

Preferably, the process of determining whether the velocity wave has constant amplitude oscillation includes: SX 1: carrying out Fourier analysis on the speed signal to obtain a fundamental wave signal; SX 2: dividing the speed signal into a first waveform string and a second waveform string according to a certain period; the first waveform string and the second waveform string are separated by a plurality of periods; SX 3: and comparing the first waveform string with the second waveform string, and if the amplitudes and the frequencies of the first waveform string and the second waveform string are in a state of approximate equality, judging that the velocity wave has constant-amplitude oscillation.

Preferably, the first waveform train and the second waveform train have a length of 3-5 sinusoidal cycles.

By implementing the technical scheme of the invention, the technical problem that the system inertia needs to be measured first and then the control parameter can be set in the prior art can be solved; by implementing the technical scheme of the invention, the appropriate control parameters can be obtained on the premise of not measuring the system inertia in advance and not requiring to know the control loop principle.

Drawings

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

FIG. 1 is a flow diagram of a particular embodiment of a servo motor control parameter self-tuning control method;

FIG. 2 is a flow chart of a speed step test of a servo motor control parameter self-tuning control method;

FIG. 3 is a flow chart of a speed bandwidth test of a servo motor control parameter self-tuning control method.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

In a specific embodiment, as shown in fig. 1, the method for self-tuning control of the servo motor control parameters is characterized in that S1, whether the AutoTune is 1 or not is judged, if yes, S2 is carried out, otherwise, the method is ended, S2, the relay function and a control object are connected in series, S3, an input initial value e0, an output initial value h0, an input increment step length value △ e and an output increment step length value △ h of the relay function are initialized, and S4, the speed error e is judgedtWhether the threshold value e of the relay function is exceeded0If yes, proceed to S6, otherwiseThe method comprises the steps of S5, S5, adjusting the input initial value e0, the output initial value h0, the input increment step value △ e, the output increment step value △ h and returning to S4, S6, judging whether constant amplitude oscillation occurs to a velocity wave, if so, entering S7, otherwise, entering S5, S7, obtaining the amplitude and the period of a fundamental wave, S8, obtaining and setting velocity loop parameters according to the amplitude and the period of the fundamental wave, SX1, conducting Fourier analysis on the velocity signal to obtain a fundamental wave signal, SX2, dividing the velocity signal into a first waveform string and a second waveform string according to a certain period, wherein a plurality of periods are arranged between the first waveform string and the second waveform string, SX3, comparing the first waveform string with the second waveform string, and judging that the constant amplitude oscillation occurs to the velocity wave if the amplitude and the frequency of the first waveform string and the second waveform string are approximately equal, wherein the length of the first waveform string and the second waveform string are 3-5 periods.

In this specific embodiment, a relay function is added to the conventional servo control loop, and before S1, the original speed loop is in an open state, the relay function is in an on state, and an input initial value e of the relay function is initialized0I.e. speed error threshold value, output initial value h0Namely, the relay amplitude value, the input increment step value △ e and the output increment step value △ h;

obtaining a velocity error et=wr-wtThen, judge etWhether or not it is greater than e0If not, proceed to e0、h0△ e, △ h, more specifically, h is judged<hlimitIf true, let e0=e0△ e, judging e again0<elimitIf it is true, if e0<elimitIs established, e is reset0、h0△ e, △ h, if h<hlimitIs established such that h0=h0△ h, thereby completing the adjustment process, and continuously repeating the above process until obtaining stable fundamental wave.

In the above description, h is the relay amplitude, e is the hysteresis width, the waveform period of the constant amplitude oscillation is Tu, and the amplitude α isCritical oscillation gain of KuCritical frequency of ωuIf in the constant amplitude oscillation state, there is Ku=4h/

π,ωu=2π/Tu

During the whole relay feedback setting period, the relay function outputs a square wave signal, the signal is used as the input of a controlled object, the output of the signal can generate periodic oscillation with a certain frequency, when an error is fed back to a relay link, a system can generate a stable limit ring, a relevant oscillation parameter is obtained from an updated oscillation waveform, and a system critical parameter is calculated according to the relevant oscillation parameter;

however, to generate a stable limit loop, the system must satisfy the following condition, the control object outputs and inputs at least-pi radian phase in a high-frequency region, and after the system critical parameter is obtained, the speed loop control parameter can be obtained according to the damped oscillation method, specifically as follows: k is a radical ofp=ku/2.2,kp=Tu/1.2;

In the specific judgment process, the speed signal is subjected to Fourier analysis to obtain a fundamental wave signal, and the amplitude and the frequency of the fundamental wave signal are analyzed. The speed signal is divided into a first waveform string and a second waveform string, when the amplitude of the fundamental wave obtained by the first waveform string is approximately equal to the amplitude of the fundamental wave of the second waveform string, and the frequency is approximately equal to the first waveform string, the system is considered to enter a constant amplitude oscillation state, and the waveform periodic signal and the amplitude signal at the moment can be used as the basis of subsequent calculation. The first waveform string and the second waveform string can sample a plurality of periodic signals, such as 3-5 periodic signals; the first waveform string and the second waveform string are spaced apart by a number of periods.

In a preferred embodiment, as shown in fig. 2 and 3, further includes, S9: setting autoverify to 1; s10: judging whether the motor is allowed to rotate or not, and ending the method if the motor is not allowed to rotate; s11: executing a user-defined test; s12: setting the autoverify to 0; s13: setting the autotune to 0;

the user-defined test is selected from one of a speed step test and a speed bandwidth test;

the speed step test comprises: S11A-1: disconnecting the relay function and connecting the control loop PI in series; S11A-2: the internal MCU records speed change data and calculates to obtain overshoot of step response; S11A-3: the internal MCU judges whether the overshoot is too large, and if the overshoot is too large, the internal MCU enters S11A-5; S11A-4: set autotune 1 and go back to S2;

the speed bandwidth test comprises the following steps: S11B-1: the internal MCU samples the given speed and the actual motor speed and carries out Fourier analysis to obtain frequency components; S11B-2: judging whether the amplitude attenuation amplitude reaches 3dB, if so, entering S11B-3, otherwise, returning to S11B-1; S11B-3: outputting the sine frequency of the given speed as the bandwidth of the speed loop to an upper computer program;

the judgment standard for judging whether the overshoot is too large is as follows: whether the overshoot is greater than 20% of a default value.

In this preferred embodiment, the autoverify value of 1 indicates that the user-defined test is allowed to be executed, that is, the self-verification step starts to be executed, the test enables speed PI control by using the new parameter setting obtained by the previous parameter setting, the relay function is disabled, and the speed step test or the speed bandwidth test is selected to be executed according to the user setting.

If the execution of speed step response is selected, the servo drive motor carries out speed step test at a given speed, the internal MCU records speed change data and calculates overshoot of the step response, the overshoot amount specified by the system exceeds 20% of a default value, which indicates that the overshoot is too large, and the system needs to carry out parameter self-setting again until the condition is met, wherein the default value can be customized by a user. In the actual driver setting, the overshoot index can be modified, when the index is higher than 20%, the system is easier to reach the target, and the self-tuning time is shorter; an excessively small overshoot index setting may increase the risk of system self-tuning failure.

When the speed bandwidth is set to be selected for testing, under the setting, the given speed is based on the principle that the sine frequency is continuously increased, the system samples the given speed and the actual motor speed, performs Fourier analysis to obtain frequency components, compares the attenuation degree of the actual speed amplitude, and when the amplitude attenuation amplitude reaches 3dB, indicates that the sine frequency at the moment is the speed loop bandwidth which is used as a self-setting parameter result for a user to refer to. Meanwhile, the given speed and the actual speed data are transmitted to an upper computer program, and a speed ring Bode diagram of the system can be directly obtained in the upper computer program for analysis by a user.

In a preferred embodiment, the relay function is a hysteresis relay function selected from a group consisting of functions based on a Z-N method, a modified Z-N method, a Tyreus-L uyben method, and a ringing method.

It should be understood that the above-described embodiments are merely exemplary of the present invention, and are not intended to limit the present invention, and that any modification, equivalent replacement, or improvement made without departing from the spirit and principle of the present invention shall fall within the protection scope of the present invention.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种永磁同步电机的有限集模型预测直接速度控制方法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!