Motor control method and system
Technical Field
The invention relates to a motor control method and system, and belongs to the technical field of motor control.
Background
The ultrasonic motor has wide application prospect in the fields of automobile electronics, precision instruments, robots, aerospace and the like. The PI controller has simple structure, mature engineering design method and fixed parameter PI controlThe device is widely applied (here, the fixed parameter refers to two control parameters of the PI controller, namely a proportionality coefficient KPAnd integral coefficient KIFixed and not changed). The adoption of the PI controller to control the ultrasonic motor is a popular research, but the ultrasonic motor is a complex controlled object and a time-varying object, and the fixed parameter PI controller is difficult to realize good control performance on the ultrasonic motor. Therefore, the online adjustment method of the parameter of the PI controller is widely researched, and the methods for automatically adjusting and controlling the parameter of the PI controller online are mainly provided in two types, one is based on an expert system, and the other is based on a fuzzy logic method. Although the two modes can realize the adjustment of the parameters of the PI controller, the process is complex, and the real-time performance of the control of the ultrasonic motor is influenced.
Disclosure of Invention
The invention aims to provide a motor control method and a motor control system, which aim to solve the problems that the PI parameter adjustment is complex and the motor control instantaneity is influenced in the process of controlling a motor by adopting a PI controller at present.
The present invention provides a method for controlling a motor to solve the above-mentioned technical problems, the method comprising the steps of:
obtaining the actual rotating speed of the motor, taking the difference value between the actual rotating speed of the motor and the given rotating speed value as the rotating speed error of the motor, carrying out PI control on the motor by taking the rotating speed error as the basis, wherein the PI parameter in the PI control process is adjusted by adopting the output of an iterative learning controller, and the formula is as follows:
KP(i)、KI(i) respectively is a proportional coefficient and an integral coefficient after the time i is adjusted; kP0、KI0Respectively, the initial values of the proportional coefficient and the integral coefficient in the PI control, Deltayrk(i) For the iterative learning controller output quantity at time i in the k-th iterative control process, ek(i) The input quantity of the iterative learning controller and the rotating speed of the motor are provided for the rotating speed error at the moment i in the k iterative control processThe fixed value and the output quantity of the previous iteration learning controller are related to the actual rotating speed of the motor.
In the process of controlling the motor by using the PI controller, the rotating speed set value of the motor, the actual rotating speed of the motor and the output quantity of the previous iterative learning controller are used as the input quantity of the iterative learning controller, and the parameters of the PI controller are adjusted according to the output quantity of the iterative learning controller, so that the control parameters of the PI controller can be adaptively adjusted according to the actual rotating speed and the rotating speed set value of the motor, the motor is better controlled, the adjustment mode is simple to realize, the parameter adjustment of the PI controller can be quickly completed, and the real-time requirement of motor control is met.
To further reduce the complexity of parameter adjustment, the iterative learning controller is:
Δyrk(i)=Δyr(k-1)(i)+λPem(k-1)(i+1)+λD(em(k-1)(i+1)-em(k-1)(i))
λPa proportional learning gain; lambda [ alpha ]DIs a differential learning gain; Δ yr(k-1)(i) For the output value, e, of the iterative learning controller at time i in the (k-1) th iterative control processm(k-1)(i +1) and em(k-1)(i) Input error values at the i +1 moment and the i moment in the k-1 iteration control process respectively, wherein the input error values are related to the given value of the rotating speed and the actual rotating speed of the motor, and delta yrk(i) And the output quantity of the iterative learning controller at the time i in the k-th iterative control process.
Further, the input error value in the iterative learning control process is the difference value between the given rotating speed value and the actual rotating speed of the motor.
Further, in order to limit the response speed of the motor rotating speed at the initial stage, the input error value in the iterative learning control process is the difference value between the output quantity of the reference model and the actual rotating speed of the motor, and the input of the reference model is the rotating speed set value of the motor.
Further, to quickly achieve convergence of the iterative controller, the reference model is:
ymk(i)=(1-βi)yrk(i)
yrk(i) the given value of the rotating speed at the moment i in the kth iterative control process is the input quantity of the reference model; y ismk(i) Is the output of the reference model, β is a constant, 0<β<The larger the value of 1, β, the more gradual the change in the reference model output signal.
The invention also provides a control system of the motor, which comprises a PI controller and an iterative learning controller;
the PI controller is used for carrying out PI control on the motor according to the rotating speed error of the motor, the input quantity of the PI controller is the rotating speed error of the motor, and the rotating speed error is equal to the difference value between the real-time rotating speed of the motor and the rotating speed given value;
the iterative learning controller is used for adjusting the parameters of the PI controller according to the given value of the rotating speed of the motor and the output quantity of the previous iterative learning controller, and the adopted adjustment formula is as follows:
KP(i)、KI(i) respectively is a proportional coefficient and an integral coefficient after the time i is adjusted; kP0、KI0Respectively, the initial values of the proportional coefficient and the integral coefficient in the PI control, Deltayrk(i) For the iterative learning controller output quantity at time i in the k-th iterative control process, ek(i) And the input quantity of the iterative learning controller is related to the given value of the rotating speed of the motor, the output quantity of the previous iterative learning controller and the actual rotating speed of the motor for the rotating speed error at the moment i in the kth iterative control process.
In the process of controlling the motor by using the PI controller, the rotating speed set value of the motor, the actual rotating speed of the motor and the output quantity of the previous iterative learning controller are used as the input quantity of the iterative learning controller, and the parameters of the PI controller are adjusted according to the output quantity of the iterative learning controller, so that the control parameters of the PI controller can be adaptively adjusted according to the actual rotating speed and the rotating speed set value of the motor, the motor is better controlled, the adjustment mode is simple to realize, the parameter adjustment of the PI controller can be quickly completed, and the real-time requirement of motor control is met.
To further reduce the complexity of parameter adjustment, the iterative learning controller is:
Δyrk(i)=Δyr(k-1)(i)+λPem(k-1)(i+1)+λD(em(k-1)(i+1)-em(k-1)(i))
λPa proportional learning gain; lambda [ alpha ]DIs a differential learning gain; Δ yr(k-1)(i) For the output value, e, of the iterative learning controller at time i in the (k-1) th iterative control processm(k-1)(i +1) and em(k-1)(i) Input error values of the iterative controller at the i +1 moment and the i moment in the k-1 iteration control process respectively, wherein the input error values are related to the given rotating speed value and the actual rotating speed of the motor, and delta yrk(i) And the output quantity of the iterative learning controller at the time i in the k-th iterative control process.
Further, the input error value of the iterative learning controller is the difference value between the given value of the rotating speed of the motor and the actual rotating speed of the motor.
Further, in order to limit the response speed of the motor rotating speed in the initial stage, the control system further comprises a reference model, the input quantity of the reference model is a rotating speed set value of the motor, and the difference value between the output quantity of the reference model and the actual rotating speed of the motor is an input error value of the iterative learning controller.
Further, to quickly achieve convergence of the iterative controller, the reference model is:
ymk(i)=(1-βi)yrk(i)
yrk(i) the given value of the rotating speed at the moment i in the kth iterative control process is the input quantity of the reference model; y ismk(i) Is the output of the reference model, β is a constant, 0<β<The larger the value of 1, β, the more gradual the change in the reference model output signal.
Drawings
FIG. 1 is a block diagram of the ultrasonic motor control system of the present invention;
FIG. 2-a is a schematic view of a speed step response curve according to an embodiment of the present invention;
FIG. 2-b shows a PI controller K according to an embodiment of the present inventionPA graph of the variation of the values;
FIG. 2-c shows a PI controller K according to an embodiment of the present inventionPGraph of the change in value.
Detailed Description
The following further describes embodiments of the present invention with reference to the drawings.
Embodiments of the control System
The motor control system of the present invention can be applied to various types of motors, and is described in detail below by taking an ultrasonic motor as an example, and for the ultrasonic motor, the corresponding ultrasonic motor control system is shown in fig. 1, the system is a rotational speed closed-loop control system of the ultrasonic motor, a closed-loop controller of the rotational speed of the motor is a PI controller, the ultrasonic motor and a driving circuit thereof jointly form a controlled object of the PI controller, and a reference model and an iterative learning controller are used for adjusting parameters of the PI controller, wherein y isrk(i)、Δyrk(i)、yk(i)、ek(i)、ymk(i)、emk(i) Respectively is a given value of the rotating speed at the moment i, the output quantity of the iterative learning controller, the rotating speed error, the output quantity of the reference model and the reference model error in the kth iterative control process, and the method comprises the following steps:
ek(i)=yrk(i)-yk(i) (1)
emk(i)=ymk(i)-yk(i) (2)
in the case of digital control with discrete sampling, the PI controller in fig. 1 can be written as:
in the formula, KPIs a proportionality coefficient, KIIs an integral coefficient.
In the digital control system, the specific implementation form of the PI controller can also be an incremental form
uk(i)=uk(i-1)+KP(ek(i)-ek(i-1))+KIek(i) (4)
In the formula ukAnd (i-1) is the control quantity at the time of i-1 in the k-th iteration control process.
Iterative learning controllers do not achieve the desired convergence for all forms of a given signal. For example, given the inertia that a practical system must have, the motor speed may not track a step-given signal completely, i.e. the speed tracking error during one step response may not always be 0. In the motor motion control system, it is sometimes necessary to artificially limit the response speed of the motor rotation speed at the initial stage in order to limit the impact applied to the mechanical component as the motor load within a suitable range. That is, due to the inherent inertia of the system, full tracking of the given signal for a step is not possible and is often unnecessary, and the control state that is desired in a practical application is not fully tracked. Thus, the present invention utilizes the reference model to reflect the desired response process and enables iterative learning of the convergence status of the controller. The reference model here is designed as:
ymk(i)=(1-βi)yrk(i) (5)
in the formula, ymk(i) Is the output of the reference model, β is a constant, 0<β<The larger the value of 1 and β, the more gradual the change of the output signal of the reference model, here, β -0.5 can be taken, the corresponding step response curve has no overshoot, and the adjusting time is about 0.1 s.ymk(i) Subtracting the feedback value of the motor rotating speed to obtain a reference model error e shown in a formula (2)mk(i) As an input signal to the iterative learning controller.
As another embodiment, the control system of the present invention may not have a reference model, and directly use the difference between the given value of the motor rotation speed and the actual motor rotation speed as an input of the iterative learning controller.
The iterative learning controller can adopt a P-type iterative learning controller, an improved P-type iterative learning controller and the like, and in order to further reduce the complexity of control, the iterative learning controller adopted is as follows:
Δyrk(i)=Δyr(k-1)(i)+λPem(k-1)(i+1)+λD(em(k-1)(i+1)-em(k-1)(i)) (6)
in the formula, the coefficient λPA proportional learning gain; lambda [ alpha ]DIs a differential learning gain; Δ yr(k-1)(i) For the output value, e, of the iterative learning controller at time i in the (k-1) th iterative control processm(k-1)(i +1) and em(k-1)(i) And respectively the input error values (namely the reference error) of the iterative learning controller at the i +1 moment and the i moment in the k-1 th iterative control process.
In the normal control process, as the iterative learning process is carried out, the control performance is gradually improved, and the error em(k-1)(i) And decreases as the number of iterations increases. When e ism(k-1)(i)、em(k-1)When (i +1) decreases toward 0, Δ yrk(i) The iterative learning control process does not change any more and reaches a convergence state.
Here, the addition of the error differential term enables the iterative learning controller to keep the current output unchanged when the previous error was not 0 but was approaching 0 at a reasonable speed, that is, to make the new increment of the control parameter of the PI controller 0.
The dashed line in fig. 1 indicates that the information of the error, the given value increment, and the like of the previous (i.e., k-1) iteration control process is stored in the memory and used for the iteration learning controller calculation in the current control process (k times), as shown in equation (6). Output Δ y of the iterative learning controller shown in equation (6)rk(i) Is used to adjust K in real timeP、KIIs a value, the regulation formula is
In the formula, KP(i)、KI(i) The current values (i time) of the proportional coefficient and the integral coefficient; kP0、KI0Is a proportional coefficient, integral systemThe initial value of the number, i.e. the parameter value of the start time "fixed parameter PI controller".
The online adaptive adjustment method using the PI controller parameter in the present embodiment is applicable to both the absolute PI controller formula (3) and the incremental PI controller formula (4).
Method embodiment
The control method comprises the steps of firstly obtaining the actual rotating speed of the ultrasonic motor, taking the difference value between the actual rotating speed and the rotating speed set value of the ultrasonic motor as the rotating speed error of the ultrasonic motor, and carrying out PI control on the ultrasonic motor by taking the rotating speed error as the basis, wherein PI parameters in the PI control process are adjusted by adopting the output of an iterative learning controller. The specific control process has been described in detail in the embodiment of the control system, and is not described herein again.
To verify the effectiveness of the present invention, the following experiments were performed. The motor for the experiment is a Shinsei USR60 type traveling wave ultrasonic motor, the driving circuit is of a two-phase H-bridge structure, a phase shift PWM control mode is adopted, a PI controller, a reference model and an iterative learning controller in a control system can be realized by programming of a DSP chip, and initial parameter values of the PI controller are as follows: coefficient of proportionality K P1, integral coefficient K I2. Proportional learning gain λ for iterative learning controller P1, differential learning gain λDSet the given speed step y as 2rkThe rotation speed response curve is shown in figure 2-a, and K is shown in figure 2-b and figure 2-cP、KIAnd (3) a change curve which is self-adaptively adjusted in the control process.
As can be seen in FIGS. 2-b and 2-c, as the iterative learning process proceeds from time to time, KP、KIThe motor is continuously and automatically adjusted, so that the control performance of the rotating speed of the motor is better and better, the response speed is faster and faster, and overshoot is avoided. This shows that the present invention is effective in adaptively adjusting PI control parameters through iterative learning.