Servo driving system and speed ring parameter setting system thereof
Technical Field
The invention belongs to the technical field of automatic control, and particularly relates to a servo driving system and a speed loop parameter setting system thereof.
Background
A servo drive system refers to a feedback control system that is capable of accurately following or reproducing a certain process. With the increasingly mature control theory of the alternating current motor, the development of the alternating current servo motor in the technical fields of microelectronics, computers, power electronics and the like is realized, and vector control and some complex control algorithms are realized in engineering application, so that the alternating current servo drive system is widely applied in the fields of numerical control machines, robots and the like.
Current servo drive systems employ a control architecture combining vector control with PID control, typically a three-loop control of a current loop, a velocity loop and a position loop. The current loop control can inhibit the interference of power supply fluctuation and improve the response speed of the system; the speed loop control can enhance the capacity of resisting load disturbance and inhibit the speed fluctuation caused by the load disturbance; the position loop control ensures the positioning precision and the dynamic tracking capability. The current loop and the speed loop are respectively controlled by PI, and the position loop is controlled by P. Fig. 1 illustrates the principle of a speed loop and a current loop in a servo drive system provided by the prior art, including a control object; a first comparing unit for comparing the speed setting value with the speed feedback value fed back by the control object and outputting a speed deviation value; a speed loop regulator for performing PI control on a control object according to the speed deviation value and outputting a given amount of current; a second comparing unit for comparing the given current amount with the current feedback amount fed back from the control object and outputting a current deviation value; and a current loop regulator for performing PI control on the control object according to the current deviation value.
Because the control parameter of the current loop is determined by the electrical parameter of the motor, the control parameter is generally set before the servo drive system leaves a factory and does not need to be changed. The control parameters of the speed ring are influenced by load inertia and motion friction, so that the speed change parameter setting is generally finished by manual debugging of an operator on site, the setting process is complicated, time-consuming and labor-consuming, the process depends on the experience of the debugging personnel, and the setting precision is limited.
Disclosure of Invention
The embodiment of the invention aims to provide a servo drive system, and solves the problems that in the servo drive system provided by the prior art, the control parameters of a speed ring need to be manually debugged on site by an operator to complete the setting of speed change parameters, the setting process is complicated and complicated, and the setting precision is limited.
The embodiment of the invention is realized in such a way that a servo driving system comprises a control object, a first comparison unit, a speed loop regulator, a second comparison unit and a current loop regulator, and the system also comprises a speed loop parameter setting system of the servo driving system, wherein the speed loop parameter setting system of the servo driving system comprises:
a sequence generating unit for generating and outputting a sequence signal of a given amount as a velocity loop of the servo drive system;
the speed detection unit is used for acquiring a speed feedback value fed back by the control object;
and a parameter calculation unit for calculating a proportional gain and an integral time as the speed loop parameters from the sequence signal and the speed feedback value.
The speed loop parameter setting system of the servo driving system may further include:
and the parameter updating unit is used for writing the speed loop parameters into a servo parameter table of the servo driving system.
When the speed loop regulator adopts proportional control, the parameter calculation unit comprises:
the data acquisition module is used for acquiring the sequence signal output by the sequence generation unit and the speed feedback value fed back by the speed detection unit corresponding to the sequence signal;
the Z transformation parameter calculation module is used for calculating the Z transformation parameter of the speed loop by adopting a recursive least square method according to the sequence signal acquired by the data acquisition module and the speed feedback value corresponding to the sequence signal;
and the speed loop parameter calculation module is used for converting the Z conversion pulse transfer function of the speed loop into a closed loop continuous transfer function of the speed loop according to the Z conversion parameter calculated by the Z conversion parameter calculation module, then combining a prestored proportional gain to obtain an equivalent inertia time constant of the current loop and an open loop gain of the speed loop, and then calculating a setting value of the speed loop parameter according to a speed loop parameter relation of a second-order transfer function in a PID setting table of a symmetric optimization method.
The step of calculating, by the Z conversion parameter calculation module, the Z conversion parameter of the velocity loop by using a recursive least square method according to the sequence signal acquired by the data acquisition module and the velocity feedback value corresponding to the sequence signal may include the following steps:
the Z transformation parameter calculation module takes the sequence signal obtained by the previous sampling of the data acquisition module and the corresponding speed feedback value thereof to calculate the previous Z transformation parameter estimation;
the Z transformation parameter calculation module calculates the correction value of the current Z transformation parameter estimation by taking the sequence signal obtained by the current sampling of the data acquisition module and the corresponding speed feedback value;
and calculating the current Z transformation parameter estimation according to the corrected values of the previous Z transformation parameter estimation and the current Z transformation parameter estimation.
The step of calculating the correction value of the current Z transformation parameter estimation by the Z transformation parameter calculation module may be represented as:
the step of calculating the current Z transformation parameter estimation from the correction values of the previous Z transformation parameter estimation and the current Z transformation parameter estimation calculated by the Z transformation parameter calculation module may be represented as:
wherein,for the previous estimation of the Z-transform parameters,for the current Z-transform parameter estimation,for a correction value of current Z transformation parameter estimation, y '(N) is a speed feedback value acquired by the data acquisition module at the previous time, U (N) is a sequence signal corresponding to the y' (N) at the previous time, N is the sampling frequency, and N is a natural number; α is a forgetting factor with a value range of 0.95-1,and the initial value of the Z transform parameter estimationInitial valueM is the amount of data contained in the pulse sequence used to calculate the Z-transform parameter estimate;
the setting value of the proportional gain can be expressed as:the integration time TiThe setting value of (a) can be expressed as: t isi=4T0Wherein, K isnIs the open loop gain, T, of the velocity loop0Is the equivalent inertia time constant, K 'of the current loop'PAnd setting the proportional gain.
The invention also provides a speed loop parameter setting system of the servo driving system, which comprises the following components:
a sequence generating unit for generating and outputting a sequence signal of a given amount as a velocity loop of the servo drive system;
the speed detection unit is used for acquiring a speed feedback value fed back by the control object;
and a parameter calculation unit for calculating a proportional gain and an integral time as the speed loop parameters from the sequence signal and the speed feedback value.
The parameter calculation unit may include:
the data acquisition module is used for acquiring the sequence signal output by the sequence generation unit and the speed feedback value fed back by the speed detection unit corresponding to the sequence signal;
the Z transformation parameter calculation module is used for calculating the Z transformation parameter of the speed loop by adopting a recursive least square method according to the sequence signal acquired by the data acquisition module and the speed feedback value corresponding to the sequence signal;
and the speed loop parameter calculation module is used for converting a Z conversion pulse transfer function of the speed loop into a closed loop continuous transfer function of the speed loop according to the Z conversion parameter calculated by the Z conversion parameter calculation module, then obtaining an equivalent inertia time constant of the current loop and an open loop gain of the speed loop by combining a prestored proportional gain, and then calculating a setting value of the speed loop parameter according to a speed loop parameter relation of a second-order transfer function in a PID setting table of a symmetric optimization method.
The invention also provides a setting method of the speed loop parameter setting system of the servo driving system, which comprises the following steps:
a sequence generation unit generates and outputs a sequence signal as a given amount of the speed loop;
the speed detection unit acquires a speed feedback value fed back by a control object of the servo driving system;
the parameter calculating unit calculates a speed loop parameter according to the sequence signal and the speed feedback value.
The step of the parameter calculation unit calculating the speed loop parameter from the sequence signal and the speed feedback value may include the steps of:
the parameter calculation unit acquires the sequence signal output by the sequence generation unit and the speed feedback value fed back by the speed detection unit corresponding to the sequence signal;
the parameter calculation unit calculates the Z conversion parameter of the speed loop by adopting a recursive least square method according to the collected sequence signal and the corresponding speed feedback value;
the parameter calculation unit converts the Z conversion pulse transfer function of the speed ring into a closed loop continuous transfer function of the speed ring according to the calculated Z conversion parameter, then obtains an equivalent inertia time constant of a current ring of the servo drive system and an open loop gain of the speed ring by combining a proportional gain, and then calculates the setting value of the speed ring parameter according to a speed ring parameter relational expression of a second-order transfer function in a PID setting table of a symmetric optimization method.
The step of calculating, by the parameter calculation unit, the Z conversion parameter of the velocity loop by using a recursive least square method according to the acquired sequence signal and the velocity feedback value corresponding thereto may include the following steps:
the parameter calculation unit takes the sequence signal obtained by the previous sampling of the parameter calculation unit and the corresponding speed feedback value thereof to calculate the previous Z transformation parameter estimation;
the parameter calculation unit calculates a correction value of the current Z transformation parameter estimation according to the sequence signal sampled by the parameter calculation unit currently and the corresponding speed feedback value;
and the parameter calculation unit calculates the current Z conversion parameter estimation according to the corrected values of the previous Z conversion parameter estimation and the current Z conversion parameter estimation.
The servo drive system injects a sequence signal into the speed ring of the existing servo drive system through the speed ring parameter setting system of the servo drive system, and calculates the speed ring parameter K of the servo drive system by using the sequence signal and the speed value of the control object under the condition that the sequence signal is used as the given speed quantitypAnd TiThe self-setting of the method is simple in setting process, time-saving and labor-saving, the process does not depend on experience of debugging personnel, and setting precision is high.
Drawings
The present invention will be described in detail below with reference to the accompanying drawings and specific examples.
FIG. 1 is a schematic diagram of a speed loop and a current loop in a servo drive system provided in the prior art;
FIG. 2 is a block diagram of FIG. 1;
FIG. 3 is a schematic diagram of a servo drive system provided by the present invention;
FIG. 4 is a waveform diagram of a sequence signal of FIG. 3;
FIG. 5 is a block diagram of FIG. 2 without regard to the speed loop regulator integral control;
FIG. 6 is a block diagram of a parameter calculation unit in FIG. 3;
FIG. 7 is a flow chart of a setting method of a speed loop parameter setting system of a servo drive system according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Fig. 2 shows the structure of fig. 1. Wherein,proportional gain K being the transfer function of the speed loop regulatorpAnd integration time TiCollectively as a speed loop parameter;is a transfer function of an equivalent control link of a current loop, T0Is the equivalent inertial time constant of the current loop; kmIs the electromagnetic torque coefficient; t is1Is a load disturbance; j is the moment of inertia of the mechanical mechanism. In order to realize the speed loop parameter K in the servo drive systempAnd TiFig. 3 shows the principle of the servo drive system provided by the present invention.
The servo driving system provided by the invention also comprises a speed loop parameter setting system of the servo driving system on the existing basis, wherein the speed loop parameter setting system of the servo driving system comprises: a sequence generating unit 11 for generating and outputting a sequence signal as a given amount of the speed loop, a waveform of which is shown in fig. 4, in which a rising edge of the pulse X1 to a falling edge of the pulse X2 are one cycle period; the speed detection unit 12 is used for acquiring a speed feedback value fed back by the control object, and the speed detection unit 12 is preferably an encoder of a servo drive system; a parameter calculating unit 13 for calculating a speed loop parameter K according to the sequence signal and the speed feedback valuepAnd TiCalculated velocity loop parameter KpAnd TiThe parameter setting method can be used for displaying the parameters to field operators through a display terminal and automatically setting the parameters of the speed ring of the servo driving system. When using the calculated speed loop parameter KpAnd TiWhen the parameter setting is automatically realized for the speed ring of the servo driving system, in the invention, the speed ring parameter setting system of the servo driving system may further include: a parameter updating unit 14 for updating the speed loop parameter KpAnd TiAnd writing a servo parameter table of the servo drive system.
The servo drive system injects a sequence signal into the speed ring of the existing servo drive system through the speed ring parameter setting system of the servo drive system, and calculates the speed ring parameter K of the servo drive system by using the sequence signal and the speed value of the control object under the condition that the sequence signal is used as the given speed quantitypAnd TiThe self-setting of the method is simple in setting process, time-saving and labor-saving, the process does not depend on experience of debugging personnel, and setting precision is high.
To obtain a speed loop parameter KpAnd TiThe present invention only considers the case where the speed loop regulator employs proportional control, when, as shown in FIG. 5, the transfer function of the speed loop regulator is now KpThen, the closed loop continuous transmission of the structure diagram shown in FIG. 5A transfer function ofWherein K isnThe open loop gain of the speed loop is determined by the load inertia and the electromagnetic torque coefficient, and the value isDiscretizing the continuous space transfer function, namely performing Z transformation on the closed-loop continuous transfer function to obtain a Z transformation pulse transfer function of the velocity loop, wherein the Z transformation pulse transfer function is as follows:
fig. 6 shows the structure of the parameter calculation unit 13 in fig. 3.
The parameter calculation unit 13 includes: the data acquisition module 131 is configured to acquire the sequence signal output by the sequence generation unit 11 and the speed feedback value fed back by the speed detection unit 12 corresponding to the sequence signal; a Z transformation parameter calculating module 132, configured to calculate a Z transformation parameter a by using a recursive least square method according to the sequence signal acquired by the data acquiring module 131 and the corresponding speed feedback value thereof1、a2、b0And b1(ii) a A speed loop parameter calculating module 133, configured to convert the Z transform pulse transfer function of the speed loop into a closed-loop continuous transfer function of the speed loop according to the Z transform parameter calculated by the Z transform parameter calculating module 132, and then combine with a pre-stored proportional gain KpObtaining the equivalent inertia time constant T of the current loop0And the open loop gain K of the velocity loopnThen according to the velocity ring parameter relational expression of the second order transfer function in the PID setting table of the symmetrical optimal methodCalculating to obtain a speed loop parameter setting value, wherein the proportional gain K'PThe setting value of (a) can be expressed as:integration time TiThe setting value of (a) can be expressed as: t isi=4T0。
The step of calculating the Z transformation parameter by the Z transformation parameter calculating module 132 using a recursive least square method according to the sequence signal acquired by the data acquiring module 131 and the corresponding velocity feedback value is specifically as follows: the Z transformation parameter calculation module 132 takes the sequence signal obtained by the previous sampling of the data acquisition module 131 and the corresponding speed feedback value thereof, and calculates the previous Z transformation parameter estimation; the Z transformation parameter calculation module 132 obtains a sequence signal currently sampled by the data acquisition module 131 and a corresponding speed feedback value thereof, and calculates a correction value of current Z transformation parameter estimation; and calculating the current Z transformation parameter estimation according to the corrected values of the previous Z transformation parameter estimation and the current Z transformation parameter estimation obtained by calculation, and repeating the steps until all the sampling data are calculated.
To facilitate understanding of the recursive least squares method, the present invention assumes that the Z transform parameter estimate θ ═ a1a2b0b1]T,For the previous estimation of the Z-transform parameters,for the current Z-transform parameter estimation,for the correction value of the current Z transformation parameter estimation, y '(N) is the speed feedback value acquired by the previous data acquisition module 131, u (N) is the sequence signal corresponding to the previous y' (N), N is the sampling number, and N is a natural number. The step of the Z transformation parameter calculation module 132 calculating the correction value of the current Z transformation parameter estimate can be expressed as:
the step of calculating the current Z transformation parameter estimate from the previous Z transformation parameter estimate and the correction value of the current Z transformation parameter estimate calculated by the Z transformation parameter calculation module 132 can be expressed as:
wherein, α is forgetting factor with value range of 0.95-1, and the initial value of Z transformation parameter estimationInitial valueM is the amount of data contained in the pulse sequence used to calculate the Z-transform parameter estimate.
The invention also provides a speed loop parameter setting system of the servo driving system.
The invention also provides a setting method of the speed loop parameter setting system of the servo drive system, and fig. 7 shows a flow of the setting method of the speed loop parameter setting system of the servo drive system provided by the invention.
In step S101, the sequence generation unit generates and outputs a sequence signal as a given amount of the speed loop.
In step S102, the speed detection unit acquires a speed feedback value fed back by the control object.
In step S103, the parameter calculation unit calculates a speed loop parameter from the sequence signal and the speed feedback value.
In the present invention, step S103 may further include the following steps: the parameter calculation unit acquires a sequence signal output by the sequence generation unit and a speed feedback value fed back by the corresponding speed detection unit; the parameter calculation unit calculates the Z transformation parameter a by adopting a recursive least square method according to the collected sequence signal and the corresponding speed feedback value thereof1、a2、b0And b1(ii) a The parameter calculation unit converts the Z conversion pulse transfer function of the speed ring into the closed loop continuous transfer function of the speed ring according to the calculated Z conversion parameter, and then combines the proportional gain KpObtaining the equivalent inertia time constant T of the current loop0And the open loop gain K of the velocity loopnAnd then calculating to obtain a speed loop parameter setting value according to a speed loop parameter relational expression of a second-order transfer function in a PID setting table of a symmetric optimization method. The steps of the recursive least squares method are as described above, and are not described herein again.
The servo drive system injects a sequence signal into the speed ring of the existing servo drive system through the speed ring parameter setting system of the servo drive system, and calculates the speed ring parameter K of the servo drive system by using the sequence signal and the speed value of the control object under the condition that the sequence signal is used as the given speed quantitypAnd TiThe self-setting of the method is simple in setting process, time-saving and labor-saving, the process does not depend on experience of debugging personnel, and setting precision is high.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.