Double-inertia system position control method based on fusion of model and data driving
Technical Field
The invention belongs to the technical field of motor control, and particularly relates to a double-inertia system position control method based on a fusion model and data driving.
Background
In the field of robotics, machine tools, etc., a dual inertia system (Two MASS SYSTEM, TMS) is a common model describing the connection of a motor shaft and a flexible drive mechanism with a load, such as a gearbox, a reducer, a belt, etc. The TMS becomes a four-order underactuated system by the flexible transmission mechanism, and resonance points appear in the system, so that the positioning accuracy of a load side is seriously affected. In addition, unknown disturbance caused by modeling errors, external interference and load change can have a large influence on the positioning accuracy of the under-actuated TMS load side. How to design a reasonable controller, and effectively inhibit system vibration while timely compensating unknown disturbance is a key for researching TMS position control problem.
In recent years, the singular perturbation method has been widely applied to the controller design of TMS, and the core idea is to separate the time scale of system dynamics, so as to obtain a quasi-steady-state model for tracking control and a boundary layer model for vibration suppression. The active disturbance rejection control (Active Disturbance Rejection Control, ADRC) has the characteristics of stronger disturbance rejection capability and no dependence on an accurate model, so that the active disturbance rejection control becomes a practical control method for replacing classical PID control, and can be used in the design of a controller aiming at an accurate steady-state model. As the core part of ADRC, the extended state observer (Extended State Observer, ESO) uniformly and equivalently observes and compensates the internal disturbance and the external disturbance of the system as lumped disturbance, so that the disturbance suppression performance of the system is improved, while the traditional position loop ADRC controller belongs to a degree-of-freedom controller, and the tracking performance and the disturbance rejection performance of the system are coupled.
The active damping method is a simple and effective method in the design of a boundary layer model controller, the method improves the damping ratio of a boundary layer model based on feedback compensation of system transmission torque differentiation so as to inhibit vibration of the system, the method depends on accurate acquisition of transmission torque, and in a scene of using a double encoder without a torque sensor, the method depends on accurate acquisition of rigidity of a flexible mechanism, however in an actual application scene, the rigidity calibration of the system is often difficult, and the rigidity of the flexible mechanism is inevitably changed due to ageing of the system. Therefore, the difficulty in obtaining accurate stiffness parameters limits the application of active damping methods.
Disclosure of Invention
In view of the above, the invention provides a dual-inertia system position control method integrating a model and data driving, which can compensate unknown disturbance under the condition that the tracking performance and the disturbance rejection performance of a system are completely decoupled, realize high-precision position control, and effectively inhibit system vibration without knowing the rigidity parameters of the system.
A method for controlling the position of a double-inertia system by fusing a model and data driving comprises the following steps:
(1) Reducing the order of the double-inertia system into a slow-change subsystem and a fast-change subsystem by a singular perturbation method;
(2) Reconstructing the slow-change subsystem and the fast-change subsystem;
(3) On the basis of the reconstructed slow-change subsystem, the controller is designed into a two-degree-of-freedom ADRC controller based on DESO (Decoupling Extended State Observer, decoupled state observer);
(4) On the basis of the reconstructed fast-changing subsystem, designing a controller of the fast-changing subsystem as a PD (proportional differential) controller based on data driving and a neural network;
(5) The output torque u s of the slow-change subsystem controller and the output torque u f of the fast-change subsystem controller are added to obtain a reference torque u, and the load side position is subjected to closed-loop control through the double-inertia system according to the reference torque u.
Further, the model expression of the slow-varying subsystem is as follows:
;
;
Wherein J m and J L are rotational inertia of the motor side and the load side of the dual-inertia system, B m and B L are damping coefficients of the motor side and the load side of the dual-inertia system, T L is load torque, As a quasi-steady state value of the transmission torque,AndSecond-order differential and first-order differential of θ L and θ L are the positions of the load side of the dual-inertia system, and δ is an intermediate variable.
Further, the model expression of the fast-changing subsystem is as follows:
Wherein k 0=Ksε2,Ks is the spring rate, epsilon is singular perturbation parameter (0 < epsilon < 1), eta is the transmission torque error, namely T r is the drive torque, i.e., T r=Ks(θm-θL),θm is the position on the motor side of the dual inertia system,AndSecond-order and first-order differentiation of η at a fast-varying time scale t ε, respectively, and dt ε/dt=1/epsilon, t representing time.
Further, the specific implementation mode of the step (2) is that the flexible compensation gain is unified into the controller parameter designs of the slow-changing subsystem and the fast-changing subsystem respectively, meanwhile, the flexible compensation item is used as a part of the fast-changing subsystem and is combined with the damping compensation item to form a PD controller taking transmission torque as input, and the controller outputs of the slow-changing subsystem and the fast-changing subsystem after reconstruction are expressed as follows:
Wherein θ d is a given reference position instruction, k sp and k sd are respectively the proportional coefficient and the differential coefficient of the reconstructed slow-change subsystem controller, k fp and k fd are respectively the proportional coefficient and the differential coefficient of the reconstructed fast-change subsystem controller, 、、The first differential of θ d、θm、θL, respectively.
Further, the two-degree-of-freedom ADRC controller in the step (3) comprises a tracking differentiator, a PD controller and a DESO, wherein the tracking differentiator is used for converting a step-jump reference position command into a smoothly-varying reference position signal and providing the reference position signal and a differentiated reference speed signal thereof to the PD controller, the PD controller uses a load side position and a speed estimated by the DESO as feedback signals to adjust the motor output torque to enable the load side position to follow the reference position command, the DESO is used for estimating the load side position, the speed and the lumped disturbance, the suppression of internal and external disturbance is realized by compensating the lumped disturbance, and a discrete equation of the DESO is as follows:
Wherein: And Load side position estimates for the k+1 control period and the k control period respectively,AndLoad side speed estimates for the k+1 control period and the k control period respectively,AndThe lumped disturbance estimates for the k +1 control period and the k control period respectively,H 1、h2、h3 is a DESO adjustment parameter, z represents a z transformation operator, T s is a control period duration, θ L (k) is a load side position actual value of a kth control period, u s (k) is an output torque of a kth control period slow-change subsystem controller, and J n=Jm+JL and k are natural numbers.
Further, the output of the two-degree-of-freedom ADRC controller is expressed as follows:
Wherein u s (k) is the output torque of the slow-varying subsystem controller in the kth control period, and θ ref (k) and ω ref (k) are the reference position signal and the reference speed signal, respectively, in the kth control period.
Further, the PD controller in the step (4) updates the neural network weight online according to the input/output information of the dual inertia system, so as to realize rapid suppression of system vibration, and the output of the PD controller is expressed as follows:
Wherein u f (k) is the output torque of the kth control period quick-change subsystem controller, X and a are respectively an input layer and a hidden layer of the neural network, a=VX= [ a 1(k),a2(k)]T, V is the weight of the hidden layer W i (k) is the actual load side position values of the output layer weights ,X=[e(k),e(k-1)]T,e(k-1)=θL(k-1)-θm(k-1),e(k)=θL(k)-θm(k),θL(k-1) and θ L (k) corresponding to a i (k) and are the actual motor side position values of the k-1 control period and the k control period, respectively, θ m (k-1) and θ m (k) are the k-1 control period and the k control period, respectively, T represents transposition.
Further, the neural network has a loss function as follows:
where L represents the loss function.
A computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to implement the method for controlling the position of the dual inertia system by fusing a model and data.
A computer readable storage medium storing a computer program which when executed by a processor implements the above-described fusion model and data-driven dual inertia system position control method.
Based on the technical scheme, the invention has the following beneficial technical effects:
1. According to the method for controlling the self-disturbance-rejection position of the slow-variation subsystem in decoupling two degrees of freedom, the reference tracking performance and the disturbance rejection performance of the system can be independently optimized by adjusting the parameters of the controller and the parameters of the disturbance observer.
2. The PD control strategy of the fast-changing subsystem neural network is model-free control based on data driving, and can update the parameters of a controller on line to effectively inhibit system vibration under variable rigidity.
3. The invention fully utilizes the known model parameters and the acquired data information, is a control method for fusing the model and the data drive, and has simpler structure and fewer parameters to be set compared with the conventional intelligent algorithm.
Drawings
FIG. 1 is a schematic diagram of a position-current dual closed loop control of a dual inertia system in an embodiment of the present invention.
FIG. 2 is a block diagram of a dual inertia system and a slow and fast subsystem controller for controlling the position of the dual inertia system in accordance with an embodiment of the present invention.
FIG. 3 is a schematic diagram of experimental waveforms of a conventional ADRC and a decoupling two-degree-of-freedom ADRC according to the present invention under a position command step in a verification example of the present invention, wherein (a) corresponds to the conventional ADRC and (b) corresponds to the decoupling two-degree-of-freedom ADRC according to the present invention.
Fig. 4 is a schematic diagram of experimental waveforms of a conventional ADRC and a decoupling two-degree-of-freedom ADRC according to the present invention under a sudden load torque change in an experimental example of the present invention, where (a) corresponds to the conventional ADRC and (b) corresponds to the decoupling two-degree-of-freedom ADRC according to the present invention.
Fig. 5 is a schematic diagram of experimental waveforms of the neural network PD controller of the present invention under a position command step in a verification example of the present invention.
Detailed Description
In order to more particularly describe the present invention, the following detailed description of the technical scheme of the present invention is provided with reference to the accompanying drawings and the specific embodiments.
In the embodiment, a tested motor with inertia of 1.2 multiplied by 10 -4kg·m2 is connected with a load motor with inertia of 0.8 multiplied by 10 - 4kg·m2, and a double-inertia system is simulated by means of an elastic coupling with rigidity of 5Nm/rad, so that closed-loop control is performed on the load side position.
As shown in fig. 1, the dual-inertia system adopts a dual-loop control framework based on a magnetic field directional control strategy, and generally comprises a position loop and a current loop dual-loop control structure, wherein the position loop generates a desired reference torque U according to a reference position signal theta d, a motor side position feedback theta m and a load side position feedback theta L, the reference torque U is converted into a reference input i ref of the current loop through a torque coefficient K T, the current loop controls and outputs a reference voltage through sampling a motor stator current i, and then the output voltage of an inverter is regulated through a SVPWM (Space Vector Pulse Width Modulation ) modulation technology to drive a motor, and U DC is the direct current voltage of the inverter. When the current loop bandwidth is sufficiently high, the output torque T m can track the reference torque u completely in a very short time, so the dynamics of the current loop are ignored when designing the position loop, and u=t m is considered.
In order to realize closed-loop control of the load side position of the dual-inertia system, the embodiment provides a dual-inertia system position control method based on fusion of a model and data driving, which comprises the following specific processes:
(1) The dual inertia system is reduced to a slow-change subsystem and a fast-change subsystem through a singular perturbation method.
1.1 The dynamic model of the double-inertia system is established as follows:
Wherein, theta m and theta L are the positions of the motor side and the load side respectively, J m and B m are the rotational inertia and the damping coefficient of the motor side respectively, J L and B L are the rotational inertia and the damping coefficient of the load side respectively, T m is the motor output torque, T L is the load torque, K s is the spring rate coefficient, AndSecond and first order differentials of theta L respectively,AndThe second and first differential of θ m, respectively.
1.2 Defining the transmission torque T r=Ks(θm-θL) so as to convert the dynamic model of the double-inertia system into a singular perturbation form as follows:
where u is the reference torque that is desired to be generated, AndSecond-order and first-order differentials of T r, respectively, ε is a singular perturbation parameter (0 < ε < 1), k 0=Ksε2.
Let ε=0 to make the dual inertia system in slow time scale to obtain quasi-steady state value of transmission torqueThe slow-varying subsystem quasi-steady state model is as follows:
;
Wherein J n=Jm+JL,Bn=Bm+BL,us is the output of the slow-varying subsystem controller.
1.3 The transformation of the singular perturbation form of the dual inertia system dynamics model into a form free of θ L is expressed as follows:
Wherein: A new scale variable t ε is defined and let dt ε/dt=1/epsilon. At the time scale of this fast-varying time scale, Is regarded as a constant, defines a variableAnd hasThe singular perturbation form of the dual inertia system model can be expressed as:
Order the I.e., η=0, the slow-varying subsystem model at the slow-varying time scale is obtained as follows:
subtracting the slow-change subsystem model from the dual-inertia system model in the singular perturbation form to obtain a fast-change subsystem boundary layer model as follows:
wherein u f is the output of the fast-changing subsystem controller.
(2) And reconstructing the structure of the traditional singular perturbation method.
The controller of the traditional singular perturbation method slow-change subsystem is of a PD control law structure, and the fast-change subsystem is designed to obtain a D controller according to a damping compensation method. In this embodiment, the flexible compensation gains are unified into the controller parameter designs of the slow and fast-changing subsystems respectively, and meanwhile, the flexible compensation term is received as a part of the fast-changing subsystem, and the flexible compensation term and the damping compensation term are combined into a PD controller with transmission torque as input, so as to obtain the following expression of the output u s、uf of the slow and fast-changing subsystem after reconstruction:
The method comprises the steps of enabling theta d to be a reference position instruction, enabling k sp、ksd to be parameters of a reconstructed slow-change subsystem PD controller, and enabling k fp、kfd to be parameters of a reconstructed fast-change subsystem PD controller.
(3) On the basis of the reconstructed singular perturbation method structure, the two-degree-of-freedom self-interference rejection controller ADRC which is completely decoupled is designed for the slow-variation subsystem.
The decoupling two-degree-of-freedom ADRC consists of three parts including a tracking differentiator, a PD controller, and a decoupling extended state observer DESO. The PD controller takes the estimated position signal and the estimated speed signal of the DESO as feedback, adjusts the output torque of the motor to enable the position of the load side to follow the reference position instruction, and the DESO is used for estimating the position, the speed and the lumped disturbance of the system and realizing the inhibition of internal and external disturbance by compensating the lumped disturbance, wherein the discrete equation is as follows:
Wherein: 、、 The estimated values of the load side position, the load side speed and the lumped disturbance in the kth control period are respectively shown, T s is the control period, and h 1、h2、h3 is the adjustment parameter of the DESO. In this embodiment, T s=5×10-5 designs the observer bandwidth based on the bandwidth parameter tuning method ωo=600,h1=3ωo,h2=3ωo 2,h3=ωo 3.
The expression of decoupling the two degrees of freedom ADRC output is:
wherein k sp、ksd is a parameter of the PD controller, J n=Jm+JL=2×10-4, and k sp=2,ksd =0.2 in this embodiment.
The tracking performance of the decoupling two-degree-of-freedom ADRC is only related to the PD controller, the decoupling two-degree-of-freedom ADRC is not related to the DESO, the immunity performance is only related to the DESO, the decoupling two-degree-of-freedom ADRC is not related to the PD controller, the complete decoupling of the tracking performance and the immunity performance is realized, and the tracking performance and the immunity performance of the system position instruction can be independently optimized respectively by adjusting the parameters of the PD controller and the DESO.
(4) On the basis of the reconstructed singular perturbation method structure, a neural network PD controller based on data driving is designed for the fast-changing subsystem.
The neural network PD controller based on data driving is improved on the basis of the original quick-change subsystem PD controller, the neural network weight is updated on line according to the input and output information of the system, the quick suppression of the system vibration is realized, accurate model parameters are not relied on, and the expression of the neural network PD controller is as follows:
Wherein x= [ e (k), e (k-1) ] T is an input to the neural network, e (k) =θ L(k)-θm (k) represents a position difference between the load side and the motor side of the kth control period, For the weight of the hidden layer, a=vx is the output of the hidden layer, W is the weight of the output layer, and the initial value W (0) = [ k fp,kfd ]; in this embodiment, k fp=10,kfd =0.2.
The neural network PD controller based on data driving adopts an online training mode, in each control period, a loss function of the neural network is calculated according to the error between the actual position and the reference position, the neural network is reversely propagated through a gradient descent method, and the weight of a network output layer is further increased until the loss function reaches the minimum, wherein the online training formula of the neural network PD controller is as follows:
;
;
;
Where P (k) represents the loss function of the kth iteration, For fitting the pseudo partial derivative of the output and input relation of the controlled system, Y (k) =θ m(k)-θL (k), ρ is a given learning rate coefficient, and ρ=0.01 in this embodiment.
After the design of the slow-speed-change subsystem controller and the fast-speed-change subsystem controller is completed, the dual-inertia system position control structure integrating the model and the data drive is shown in fig. 2, the tracking differentiator generates a transition process for a position instruction, the PD controller takes the output of the tracking differentiator as a reference, the position and the speed signals estimated by the observer are used as feedback to determine the tracking performance of the controller, the lumped disturbance estimated by the observer is used as disturbance compensation to determine the disturbance rejection performance of the controller.
FIG. 3 shows experimental waveforms for a conventional ADRC decoupled from the present invention in two degrees of freedom ADRC given a position command comprising a 150ms transition time amplitude pi rad. In a practical scenario, unknown disturbances such as friction force, system parameter perturbation and the like are necessarily existed in the dual-inertia system in the motion process, and as can be seen from fig. 3 (a), although the ESO of the conventional ADRC can inhibit the disturbance occurring when the system tracks the reference position, the disturbance information is transmitted to the estimationAnd (3) withAnd thus affects the tracking performance of the PD controller. It can be seen from FIG. 3 (b) that the DESO, while effectively suppressing system disturbances, is estimatedAnd (3) withDoes not contain unknown disturbance information, and the quality of the disturbance suppression effect can not be influencedAnd (3) withTherefore, the disturbance suppression performance has no influence on the tracking performance under the decoupling two-degree-of-freedom ADRC structure.
Fig. 4 shows experimental waveforms of a conventional ADRC decoupled from the present invention in two degrees of freedom ADRC at a sudden load torque of 0.3 Nm. It can be seen from FIG. 4 (a) that due to ESO estimationAnd (3) withThe PD controller participates in the disturbance suppression process in order to eliminate disturbance, so that the PD controller and the ESO have certain coupling on the disturbance suppression performance of the traditional ADRC. As can be seen from fig. 4 (b), the PD controller is estimated in DESOAnd (3) withWhen the method is used as feedback, any disturbance information is not received, the output after disturbance appears is kept unchanged, and the disturbance suppression process is not participated at all, so that the tracking performance under the decoupling two degrees of freedom ADRC can be explained not to influence the disturbance suppression performance. The coupling of the conventional ADRC reference tracking performance and the disturbance rejection performance is proved through step giving and load mutation experiments, and the decoupling two-degree-of-freedom ADRC performance is decoupled.
Fig. 5 shows the PD controller position tracking effect and the neural network PD parameter convergence process of the present invention under a step position command of three consecutive magnitudes pi rad. When the initial value of k fd is 0, that is, the PD controller does not perform damping compensation at all, it can be seen that the first position command tracking under the initial value cannot well inhibit system vibration, then the neural network PD quickly adjusts k fd to about 0.18 according to the vibration information of the system, vibration of a load side position is quickly inhibited, vibration generated by the position change of the last two times is effectively inhibited, and k fd tends to converge.
The embodiments described above are described in order to facilitate the understanding and application of the present invention to those skilled in the art, and it will be apparent to those skilled in the art that various modifications may be made to the embodiments described above and that the general principles described herein may be applied to other embodiments without the need for inventive faculty. Therefore, the present invention is not limited to the above-described embodiments, and those skilled in the art, based on the present disclosure, should make improvements and modifications within the scope of the present invention.