WO2022012156A1 - Iterative feedback tuning control for rotating inverted pendulum and robust optimisation method therefor - Google Patents

Iterative feedback tuning control for rotating inverted pendulum and robust optimisation method therefor Download PDF

Info

Publication number
WO2022012156A1
WO2022012156A1 PCT/CN2021/094746 CN2021094746W WO2022012156A1 WO 2022012156 A1 WO2022012156 A1 WO 2022012156A1 CN 2021094746 W CN2021094746 W CN 2021094746W WO 2022012156 A1 WO2022012156 A1 WO 2022012156A1
Authority
WO
WIPO (PCT)
Prior art keywords
pendulum
inverted pendulum
rod
rotating
arm
Prior art date
Application number
PCT/CN2021/094746
Other languages
French (fr)
Chinese (zh)
Inventor
陶洪峰
庄志和
周龙辉
刘巍
沈凌志
Original Assignee
江南大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 江南大学 filed Critical 江南大学
Publication of WO2022012156A1 publication Critical patent/WO2022012156A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B13/00Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
    • G05B13/02Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
    • G05B13/04Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators
    • G05B13/042Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators in which a parameter or coefficient is automatically adjusted to optimise the performance

Definitions

  • the invention relates to the field of robot optimization control, in particular to an iterative feedback tuning control of a rotating inverted pendulum and a robust optimization method thereof.
  • the rotating inverted pendulum As a typical underactuated nonlinear system, the rotating inverted pendulum has the characteristics of instability, multi-variable, strong coupling, etc., and integrates the three basic disciplines of mathematics, electricity and mechanics well. Therefore, the control of the inverted pendulum system is not only of great significance, but also extremely challenging, and is highly valued by experts and scholars in control disciplines all over the world.
  • the rotating inverted pendulum as the simplest model of many control objects such as robots and rocket flight attitudes, is an ideal experimental platform to verify the correctness of various control theory strategies, and builds a bridge between control theory and practical engineering applications. At the same time, as an experimental device, the structure is simple and the control effect is intuitive, and it is an ideal experimental platform for verifying various control methods.
  • the type in which the pivot is rotationally moved is also called a rotary inverted pendulum.
  • the pendulum is controlled by the movement of the trolley, and the swing arm drives the pendulum to rotate to maintain the upright state, and the nonlinearity is stronger.
  • the rotating inverted pendulum as the controlled object, it is possible to test whether the iterative feedback tuning algorithm has the optimization ability for multi-state, nonlinear and absolutely unstable control systems.
  • the control research of the rotating inverted pendulum system involves almost most of the control methods, among which the traditional control fields mainly include state feedback control, synovial control and PID control.
  • the state feedback control must have an accurate model of the controlled system, and it is difficult to realize the stable control of the inverted pendulum, especially the high-order inverted pendulum under the condition of insufficient model accuracy.
  • the chattering caused by the switching state of the rotating inverted pendulum restricts its application; PID control is still the most common control method.
  • the multi-closed-loop PID has a good control effect on the rotary inverted pendulum with a lower order, but the multi-closed-loop PID has a better control effect than the multi-closed-loop PID.
  • the basic PID its parameter tuning is more complicated.
  • the inventor proposes an iterative feedback tuning control of a rotating inverted pendulum and its robust optimization method.
  • a rotating inverted pendulum experimental platform based on double closed-loop control is established, and on this basis, iterative The feedback tuning algorithm optimizes the angle PD controller of the rotating inverted pendulum system.
  • An iterative feedback tuning control of a rotating inverted pendulum and its robust optimization method comprising the following steps:
  • Step 1 Establish the Lagrangian and state space models of the rotating inverted pendulum
  • the rotating inverted pendulum system includes a base, a transmission device, a swing rod and a swing arm.
  • the base is used to ensure the stability of the mechanical structure when the swing rod swings; the end of the swing arm is connected to the swing rod, and the rotation of the DC motor drives the movement of the swing rod through the transmission device;
  • the angle and angular velocity of the arm are obtained through the incremental rotary encoder that comes with the DC motor; the incremental rotary encoder and the pendulum rod are connected through the coupling, and the incremental rotary encoder is driven to rotate to obtain the angle and the angle of the pendulum rod.
  • r 1 is the distance from the rotation center of the arm to the connection point with the pendulum rod, is the angular velocity when the arm rotates;
  • L is the length of the pendulum rod, is the angular velocity when the pendulum rod rotates;
  • the kinetic energy of the pendulum rod includes the rotational kinetic energy generated by rotation and the kinetic energy generated by moving in the horizontal direction.
  • the overall kinetic energy of the rotating inverted pendulum system also includes the kinetic energy of the arm driven by the DC motor, so the overall kinetic energy V of the rotating inverted pendulum system is obtained.
  • H the overall potential energy of the rotating inverted pendulum system
  • E the Lagrangian function
  • the Lagrangian function E is:
  • Equation (8) is brought into equations (9) and (10) to obtain the nonlinear model of the rotating inverted pendulum:
  • the nonlinear model of the inverted pendulum needs to be linearized. It is noted that the pendulum rod is in an upright state in the stable pendulum control, so the angle of the pendulum rod is small, and sin ⁇ , cos ⁇ exists at this time ⁇ 1, then the linear model of the rotating inverted pendulum is obtained as:
  • the moment of inertia J 1 , J 2 can be obtained as follows:
  • r 2 is the length of the arm
  • M is the mass of the arm
  • is the density of the arm and the pendulum
  • Step 2 Design a rotating inverted pendulum iterative feedback tuning double closed-loop controller
  • a double closed-loop controller is designed for the state space model of the rotating inverted pendulum, and the iterative feedback tuning algorithm is used to optimize the parameters of the angle PD controller.
  • G is the transfer function of the controlled object
  • u(t) is the controller output
  • r(t) is the reference input
  • y(t) is the output of the rotating inverted pendulum system
  • v(t) is an external random disturbance with a mean value of zero
  • the response output under the action of the feedback control system is:
  • T 0 ( ⁇ ) and S 0 ( ⁇ ) are abbreviated as T 0 and S 0
  • y d is defined as a given expected input signal
  • the Gauss–Newton algorithm is used to calculate the ⁇ i+1 for the next iteration update:
  • Step 3 Convergence analysis of iterative feedback setting angle PD controller
  • condition 1 is to ensure that the estimated gradient of the performance optimization index function is unbiased
  • condition 2 is that the step size sequence ⁇ i is required to converge to zero.
  • the fourth step further optimization of the robust iterative feedback setting angle PD controller
  • the IFT algorithm relies on experience to select weight values such as ⁇ .
  • weight values
  • the physical meanings of various performance metrics are not the same, and the operating environments are not consistent, the value ranges between them are very different.
  • the same system relying on experience performance metric selected weighting factors do not have universal ⁇ , considering the range between the various performance metrics, build a cofactor L i, L i is a co-factor performance metric taken between Ratio of value ranges:
  • the iterative feedback tuning algorithm obtains the Gauss–Newton gradient through three closed-loop experiments to update the parameters, which enables the control system to respond quickly to changes in the input signal and has better robustness sex.
  • the invention combines the idea of iterative design and numerical optimization, links the performance index function with the I/O data, does not need to obtain the parameters of the model itself, and avoids the accuracy of the controlled object and the disturbance characteristic model in the optimization process. estimated requirements.
  • a model-free method for calculating the unbiased gradient of the indicator function to the controller parameters that is, the unbiased signal of the system output differential
  • Figure 1 is a schematic diagram of the swing model of the rotating inverted pendulum.
  • Figure 2 is a block diagram of the double closed-loop control structure for iterative feedback tuning of the rotating inverted pendulum.
  • Figure 3 is the mechanical structure diagram of the rotating inverted pendulum experimental platform.
  • Figure 4 is the hardware structure diagram of the rotating inverted pendulum experimental platform.
  • Figure 5 is the overall program design diagram of DSPACE.
  • FIG. 6 is a schematic diagram of the trajectory of the rotating inverted pendulum pendulum rod, the criterion function and the change of the controller parameters in the iterative process.
  • FIG 7 is a factor L i before and after the introduction of the auxiliary rotation inverted pendulum schematic tracking error.
  • the present application discloses an iterative feedback tuning control of a rotating inverted pendulum and a robust optimization method thereof
  • Step 1 Establish the Lagrangian and state space model of the rotating inverted pendulum based on the mechanical and hardware structure of the inverted pendulum;
  • FIG. 1 is a schematic diagram of the swing model of the rotating inverted pendulum.
  • the rotating inverted pendulum system includes a base, a transmission device, a swing rod and a swing arm.
  • the base is used to ensure the mechanical structure of the swing rod.
  • the end of the arm is connected to the pendulum rod, and the rotation of the DC motor drives the movement of the pendulum rod through the transmission device; the angle and angular velocity of the arm are obtained through the incremental rotary encoder that comes with the DC motor; the incremental rotation is connected through the coupling
  • the rotary encoder and the pendulum rod are used to drive the incremental rotary encoder to rotate to obtain the angle and angular velocity of the pendulum rod; in the dynamic model of the rotating inverted pendulum, air resistance, friction force and tiny items are ignored to simplify the modeling process , the swing arm and the pendulum rod are regarded as a uniform long rod, and the potential energy of the rotating inverted pendulum system is set to zero when the pendulum rod is in a stable erection.
  • r 1 is the distance from the rotation center of the arm to the connection point with the pendulum rod, is the angular velocity when the arm rotates;
  • L is the length of the pendulum rod, is the angular velocity when the pendulum rod rotates;
  • the kinetic energy of the pendulum rod includes the rotational kinetic energy generated by rotation and the kinetic energy generated by moving in the horizontal direction.
  • the overall kinetic energy of the rotating inverted pendulum system also includes the kinetic energy of the arm driven by the DC motor, so the overall kinetic energy V of the rotating inverted pendulum system is obtained.
  • H the overall potential energy of the rotating inverted pendulum system
  • E the Lagrangian function
  • the Lagrangian function E is:
  • Equation (8) is brought into equations (9) and (10) to obtain the nonlinear model of the rotating inverted pendulum:
  • the nonlinear model of the inverted pendulum needs to be linearized. It is noted that the pendulum rod is in an upright state in the stable pendulum control, so the angle of the pendulum rod is small, and sin ⁇ , cos ⁇ exists at this time ⁇ 1, then the linear model of the rotating inverted pendulum is obtained as:
  • the moment of inertia J 1 , J 2 can be obtained as follows:
  • r 2 is the length of the arm
  • M is the mass of the arm
  • is the density of the arm and the pendulum.
  • the state space model it can be obtained from the Lyapunov criterion and the rank criterion that the rotating inverted pendulum is an unstable but completely controllable and observable system. Therefore, the angle, angular velocity and The angle and angular velocity of the pendulum are controlled, and these parameters are completely observable.
  • Step 2 Design a rotating inverted pendulum iterative feedback tuning double closed-loop controller
  • T 0 ( ⁇ ) and S 0 ( ⁇ ) are abbreviated as T 0 and S 0
  • y d is defined as a given expected input signal
  • the Gauss–Newton algorithm is used to calculate the ⁇ i+1 for the next iteration update:
  • the stable pendulum controller In order to design the stable pendulum controller to keep the pendulum rod upright and stable, first design a closed loop for the pendulum rod angle, the upright state is used as a dynamic balance, and integral control is not required, but the differential control is added to improve the control speed when the angle change rate is large, and finally the pendulum is reversed.
  • the rod angle adopts PD controller; when the pendulum rod is stable and upright, the arm should remain stationary, so a closed loop is added to control the position of the arm, based on the integral of the speed, the speed of the arm adopts a PI controller; due to the closed loop of the speed It is an interference quantity of angle control, and the influence of PI controller on angle control needs to be reduced. Therefore, iterative feedback tuning algorithm is used for the tuning optimization of the PD controller parameters of the rotating inverted pendulum angle during the stable pendulum process.
  • the angle IFT-PD controller is used to output the DC motor voltage.
  • the swing control of the rotary inverted pendulum is realized by the position feedback of the swing arm and the speed feedback of the swing rod.
  • the position feedback of the swing arm restricts the swing rod from swinging around the desired position, and the speed feedback of the swing rod makes the swing rod The swing angle is gradually increased.
  • Step 3 Convergence analysis of iterative feedback setting angle PD controller
  • condition 1 is to ensure that the estimated gradient of the performance optimization index function is unbiased, and condition 2 is that the step size sequence ⁇ i is required to converge to zero. ) get for:
  • Step 4 Introduce auxiliary factors to further optimize the robust iterative feedback setting angle PD controller
  • the IFT algorithm relies on experience to select weight values such as ⁇ .
  • weight values
  • the physical meanings of various performance metrics are not the same, and the operating environments are not consistent, the value ranges between them are very different.
  • the same system relying on experience performance metric selected weighting factors do not have universal ⁇ , considering the range between the various performance metrics, build a cofactor L i, L i is a co-factor performance metric taken between Ratio of value ranges:
  • FIG 3 is the mechanical structure of the rotating inverted pendulum experimental platform, including the base, transmission device, DC motor, pendulum and arm and other parts
  • Figure 4 is the hardware structure diagram of the rotating inverted pendulum experimental platform, the hardware structure of the rotating inverted pendulum can be obtained by DSPACE It consists of programming controller, IR2104 DC motor driver board, ETS25 absolute rotary encoder, 50V/4.9A DC motor and STM32 board for SPI communication with ETS25. DSPACE sends a PWM signal to the IR2104 DC motor driver board, and the IR2104 DC motor driver board controls the voltage and direction of the DC motor according to PWM, and further DSPACE reads the position and speed of the motor, and the motor drives the rotating arm to rotate through the transmission belt.
  • the shaft drives the rotary encoder to rotate, and finally the position and speed of the pendulum rod are read by the STM32 minimum system through SPI, and sent to DSPACE through the serial port.
  • the DSPACE real-time simulation system is a development and testing work platform for a control system based on MATLAB/Simulink in a real-time environment developed by the German DSPACE company. It can be seamlessly connected with MATLAB/Simulink.
  • the model of DSPACE used is DS1104, which is a real-time control system based on PowerPC603 floating-point processor, and the operating frequency can reach 250MHz.
  • this model includes a slave DSP subsystem based on the TMS320F204DSP microcontroller.
  • RCP Rapid Control Prototyping
  • specific interface connectors and connector panels provide easy access to all DSPACE input and output signals.
  • This application also provides the specific design of software and hardware based on DSPACE rotating inverted pendulum:
  • this patent adopts the typical control circuit of the DC motor, the H-bridge drive circuit. By controlling the on and off of the MOS tube, the magnitude of the motor voltage and the direction of the current are changed to realize the control of the DC motor.
  • the angle and speed of the pendulum rod in the rotary inverted pendulum system are collected through a rotary encoder ETS25 that transmits data through an SPI signal.
  • a STM32 minimum system is used as an intermediary, that is, it communicates with ETS25 through the STM32 board, and then sends the encoder signal to DSPACE through RS232 serial communication.
  • the sensor it is a slave device, so it is connected to the MOSI of the STM32 microcontroller.
  • the acquisition of the arm angle and speed is detected by the Hall sensor that comes with the DC motor. Since the reading program of this type of sensor is integrated on DSPACE, the reading of the angle and speed of the arm is relatively simple.
  • Figure 5 is the overall program design diagram of DSPACE.
  • the initial angle ⁇ 0 of the pendulum of the inverted pendulum is 0.1rad
  • the trajectory sampling data of the pendulum rod is obtained, and these data are processed offline in MATLAB to update the PD controller.
  • the optimization effect of the IFT algorithm is tested on this basis.

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Feedback Control In General (AREA)

Abstract

Disclosed in the present invention are iterative feedback tuning control for a rotating inverted pendulum and a robust optimisation method therefor, relating to the field of robot optimised control, the method comprising: establishing Lagrangian and state-space mathematical models of a rotating inverted pendulum on the basis of an inverted pendulum machine and a hardware structure; designing a rotating inverted pendulum iterative feedback tuning dual closed loop controller; and performing algorithmic convergence analysis for the iterative feedback tuning PD controller; the introduction of an auxiliary factor further optimises the robust iterative feedback tuning angle PD controller, enabling the rotating inverted pendulum system to implement rapid, high-precision tracking of the desired motion trajectory; the control algorithm of the method of the present application is simple and efficient, does not require the acquisition of the parameters of the model itself, and drives the calculation of the unbiased gradient of the indicator function to the controller parameters by means of I/O data; and the algorithm introduces an auxiliary factor, enabling the control system to respond better to changes in the input signal and thereby have better robustness.

Description

一种旋转倒立摆的迭代反馈整定控制及其鲁棒优化方法An Iterative Feedback Tuning Control of Rotating Inverted Pendulum and Its Robust Optimization Method 技术领域technical field
本发明涉及机器人优化控制领域,尤其是一种旋转倒立摆的迭代反馈整定控制及其鲁棒优化方法。The invention relates to the field of robot optimization control, in particular to an iterative feedback tuning control of a rotating inverted pendulum and a robust optimization method thereof.
背景技术Background technique
旋转倒立摆作为一个典型的欠驱动非线性系统,具有不稳定、多变量、强耦合等特点,并很好的将数学、电学和力学这三门基础学科融合起来。因此,对于倒立摆系统的控制不仅意义重大,而且极具挑战,深受世界各地控制学科的专家学者的重视。除此之外,旋转倒立摆作为机器人、火箭飞行姿态等许多控制对象的最简单模型,是验证各种控制理论策略正确性的理想实验平台,并为控制理论和工程实际应用搭建了一个桥梁。同时作为一种实验装置,结构简单并且控制效果直观,是验证各种控制方法的理想实验平台。其中枢轴为旋转移动的类型又被称为旋转倒立摆,相比于直线型倒立摆通过小车运动控制摆杆,其通过旋臂带动摆杆旋转来保持直立状态,非线性更强。将旋转倒立摆作为被控对象,能够检验迭代反馈整定算法是否具有针对多状态、非线性和绝对不稳定控制系统的优化能力。As a typical underactuated nonlinear system, the rotating inverted pendulum has the characteristics of instability, multi-variable, strong coupling, etc., and integrates the three basic disciplines of mathematics, electricity and mechanics well. Therefore, the control of the inverted pendulum system is not only of great significance, but also extremely challenging, and is highly valued by experts and scholars in control disciplines all over the world. In addition, the rotating inverted pendulum, as the simplest model of many control objects such as robots and rocket flight attitudes, is an ideal experimental platform to verify the correctness of various control theory strategies, and builds a bridge between control theory and practical engineering applications. At the same time, as an experimental device, the structure is simple and the control effect is intuitive, and it is an ideal experimental platform for verifying various control methods. The type in which the pivot is rotationally moved is also called a rotary inverted pendulum. Compared with the linear inverted pendulum, the pendulum is controlled by the movement of the trolley, and the swing arm drives the pendulum to rotate to maintain the upright state, and the nonlinearity is stronger. Taking the rotating inverted pendulum as the controlled object, it is possible to test whether the iterative feedback tuning algorithm has the optimization ability for multi-state, nonlinear and absolutely unstable control systems.
作为一种典型的被控模型,对旋转倒立摆系统的控制研究几乎涉及到了绝大部分的控制方法,其中在传统控制领域主要有状态反馈控制、滑膜控制和PID控制等。但这些方法都存在一些局限性,例如状态反馈控制必须要有被控系统的精确模型,在模型精确度不足的情况下难以实现对倒立摆尤其是高阶倒立摆的稳定控制;而滑膜控制在旋转倒立摆切换状态时引起的抖振制约了其应用;PID控制依然是最为普遍的控制方式,其中多闭环PID对阶次较低的旋转倒立摆的控制效果良好,但多闭环PID相比于基础的PID,其参数整定较为复杂。As a typical controlled model, the control research of the rotating inverted pendulum system involves almost most of the control methods, among which the traditional control fields mainly include state feedback control, synovial control and PID control. However, these methods all have some limitations. For example, the state feedback control must have an accurate model of the controlled system, and it is difficult to realize the stable control of the inverted pendulum, especially the high-order inverted pendulum under the condition of insufficient model accuracy. The chattering caused by the switching state of the rotating inverted pendulum restricts its application; PID control is still the most common control method. Among them, the multi-closed-loop PID has a good control effect on the rotary inverted pendulum with a lower order, but the multi-closed-loop PID has a better control effect than the multi-closed-loop PID. Compared with the basic PID, its parameter tuning is more complicated.
发明内容SUMMARY OF THE INVENTION
本发明人针对上述问题及技术需求,提出了一种旋转倒立摆的迭代反馈整定控制及其鲁棒优化方法,首先建立起基于双闭环控制的旋转倒立摆实验平台,并再此基础上使用迭代反馈整定算法优化旋转倒立摆系统的角度PD控制器, 在PD控制策略框架下,基于IFT算法的基本原理、参数最优化理论和实验整定方法,根据闭环系统的性能准则函数和输入、输出信号自动整定PID控制器参数,运用Gauss-Newton算法得到PID控制器参数的最优值,引入辅助因子不断迭代性能准则函数的权重因子达到改善系统鲁棒性的目的,最终实现对旋转倒立摆的稳定控制。In view of the above problems and technical requirements, the inventor proposes an iterative feedback tuning control of a rotating inverted pendulum and its robust optimization method. First, a rotating inverted pendulum experimental platform based on double closed-loop control is established, and on this basis, iterative The feedback tuning algorithm optimizes the angle PD controller of the rotating inverted pendulum system. Under the PD control strategy framework, based on the basic principle of the IFT algorithm, the parameter optimization theory and the experimental tuning method, according to the performance criterion function of the closed-loop system and the input and output signals automatically Tuning the PID controller parameters, using the Gauss-Newton algorithm to obtain the optimal value of the PID controller parameters, introducing auxiliary factors to continuously iterate the weight factor of the performance criterion function to improve the robustness of the system, and finally realize the stable control of the rotating inverted pendulum .
本发明的技术方案如下:The technical scheme of the present invention is as follows:
一种旋转倒立摆的迭代反馈整定控制及其鲁棒优化方法,包括如下步骤:An iterative feedback tuning control of a rotating inverted pendulum and its robust optimization method, comprising the following steps:
第一步:建立旋转倒立摆的拉格朗日和状态空间模型;Step 1: Establish the Lagrangian and state space models of the rotating inverted pendulum;
旋转倒立摆系统包括底座、传动装置、摆杆及旋臂,底座用于保证摆杆摆动时机械结构的稳定;旋臂末端连接摆杆,直流电机的旋转通过传动装置带动摆杆的运动;旋臂的角度及角速度则通过直流电机自带的增量式旋转编码器获取;通过联轴器连接增量式旋转编码器与摆杆,带动增量式旋转编码器旋转从而获取摆杆的角度及角速度;在构建旋转倒立摆的动力学模型中,忽略空气阻力、摩擦力及微小项以简化建模过程,把旋臂及摆杆视为均匀的长杆,设摆杆处于稳定竖立时旋转倒立摆系统的势能为零;The rotating inverted pendulum system includes a base, a transmission device, a swing rod and a swing arm. The base is used to ensure the stability of the mechanical structure when the swing rod swings; the end of the swing arm is connected to the swing rod, and the rotation of the DC motor drives the movement of the swing rod through the transmission device; The angle and angular velocity of the arm are obtained through the incremental rotary encoder that comes with the DC motor; the incremental rotary encoder and the pendulum rod are connected through the coupling, and the incremental rotary encoder is driven to rotate to obtain the angle and the angle of the pendulum rod. Angular velocity; in the dynamic model of the rotating inverted pendulum, air resistance, frictional force and tiny items are ignored to simplify the modeling process, the arm and the pendulum rod are regarded as uniform long rods, and the rotating inverted pendulum is set when the pendulum rod is stable and erect The potential energy of the pendulum system is zero;
摆杆偏离直立位置角度α时,旋臂通过旋转β带动摆杆趋于直立位置,因此旋臂末端速度v m为: When the pendulum rod deviates from the upright position angle α, the swing arm drives the pendulum rod to the upright position by rotating β, so the speed v m of the end of the arm is:
Figure PCTCN2021094746-appb-000001
Figure PCTCN2021094746-appb-000001
其中,r 1为旋臂旋转中心到与摆杆连接点的距离,
Figure PCTCN2021094746-appb-000002
为旋臂旋转时角速度;
Among them, r 1 is the distance from the rotation center of the arm to the connection point with the pendulum rod,
Figure PCTCN2021094746-appb-000002
is the angular velocity when the arm rotates;
由于摆杆为均匀长杆,视摆杆为一质点则得到摆杆转动速度为v z为: Since the pendulum rod is a uniform long rod, considering the pendulum rod as a mass point, the rotation speed of the pendulum rod v z is obtained as:
Figure PCTCN2021094746-appb-000003
Figure PCTCN2021094746-appb-000003
其中,L为摆杆长度,
Figure PCTCN2021094746-appb-000004
为摆杆旋转时角速度;
Among them, L is the length of the pendulum rod,
Figure PCTCN2021094746-appb-000004
is the angular velocity when the pendulum rod rotates;
将摆杆转动速度v z在旋臂末端速度v m垂直方向进行分解,并以摆杆旋转平面与地面水平方向速度v r所指方向为正方向,得到: Decompose the rotation speed v z of the pendulum rod in the vertical direction of the speed v m at the end of the arm, and take the direction of the rotation plane of the pendulum rod and the horizontal direction speed v r of the ground as the positive direction, we get:
Figure PCTCN2021094746-appb-000005
Figure PCTCN2021094746-appb-000005
Figure PCTCN2021094746-appb-000006
Figure PCTCN2021094746-appb-000006
在旋臂末端速度v m和地面水平方向速度v r的共同作用下,摆杆在水平方向上的速度v b为: Under the combined action of the velocity v m at the end of the arm and the velocity v r in the horizontal direction of the ground , the velocity v b of the pendulum rod in the horizontal direction is:
Figure PCTCN2021094746-appb-000007
Figure PCTCN2021094746-appb-000007
摆杆的动能包含有旋转产生的转动动能以及在水平方向上移动产生的动能,另 外旋转倒立摆系统整体动能还包含有直流电机带动的旋臂的动能,因此得到旋转倒立摆系统的整体动能V,令J 1为摆杆的转动惯量,J 2为旋臂的转动惯量,m为摆杆质量,并将式(4)及(5)带入得到: The kinetic energy of the pendulum rod includes the rotational kinetic energy generated by rotation and the kinetic energy generated by moving in the horizontal direction. In addition, the overall kinetic energy of the rotating inverted pendulum system also includes the kinetic energy of the arm driven by the DC motor, so the overall kinetic energy V of the rotating inverted pendulum system is obtained. , let J 1 be the moment of inertia of the pendulum rod, J 2 be the moment of inertia of the swing arm, m is the mass of the pendulum rod, and bring equations (4) and (5) into:
Figure PCTCN2021094746-appb-000008
Figure PCTCN2021094746-appb-000008
摆杆直立时设为零势能点,H为旋转倒立摆系统整体势能,E为拉格朗日函数,则偏转α角度后势能降为:When the pendulum is upright, it is set as the zero potential energy point, H is the overall potential energy of the rotating inverted pendulum system, E is the Lagrangian function, then the potential energy is reduced to:
Figure PCTCN2021094746-appb-000009
Figure PCTCN2021094746-appb-000009
拉格朗日函数E为:The Lagrangian function E is:
Figure PCTCN2021094746-appb-000010
Figure PCTCN2021094746-appb-000010
可知旋臂旋转带动摆杆运动,无外界能力输入,令T output为电机输出转矩,B eq为等效粘性摩擦,得到拉格朗日方程为: It can be seen that the rotation of the swing arm drives the movement of the pendulum rod, and there is no external power input. Let T output be the output torque of the motor, B eq is the equivalent viscous friction, and the Lagrangian equation can be obtained as:
Figure PCTCN2021094746-appb-000011
Figure PCTCN2021094746-appb-000011
Figure PCTCN2021094746-appb-000012
Figure PCTCN2021094746-appb-000012
式(8)带入式(9)及(10)得到旋转倒立摆的非线性模型:Equation (8) is brought into equations (9) and (10) to obtain the nonlinear model of the rotating inverted pendulum:
Figure PCTCN2021094746-appb-000013
Figure PCTCN2021094746-appb-000013
Figure PCTCN2021094746-appb-000014
Figure PCTCN2021094746-appb-000014
从在式(11)得到的旋转倒立摆的非线性模型中,其输入为直流电机转矩,但通常情况下以直流电机电压为控制输入,因此接下来对直流电机进行建模,最终建立以直流电机电压为输入的倒立摆非线性模型;From the nonlinear model of the rotating inverted pendulum obtained in equation (11), its input is the DC motor torque, but usually the DC motor voltage is used as the control input, so the next step is to model the DC motor, and finally establish a Inverted pendulum nonlinear model with DC motor voltage as input;
令I d为直流电机电流,E d为反电动势,并考虑传动装置的效率和齿轮比值,K T为电机转矩系数,K E为电机转速系数,K g为旋臂与直流电机的齿轮比,η g为齿轮传动效率,η d为电机效率,U为直流电机电压,R为电枢电阻,得到: So as DC current I d, E d is the counter electromotive force, and taking into account the efficiency of the transmission gear ratio, K T is the motor torque coefficient, K E of the motor-speed coefficient, K g is the DC motor with gear arm ratio , η g is the gear transmission efficiency, η d is the motor efficiency, U is the DC motor voltage, R is the armature resistance, we get:
Figure PCTCN2021094746-appb-000015
Figure PCTCN2021094746-appb-000015
T output=η dη gK gK TI d          (13) T output = η d η g K g K T I d (13)
将式(12)、(13)带入式(11)中,得到以直流电机电压为输入的倒立摆非线性模型为:Putting equations (12) and (13) into equation (11), the nonlinear model of the inverted pendulum with the DC motor voltage as the input can be obtained as:
Figure PCTCN2021094746-appb-000016
Figure PCTCN2021094746-appb-000016
Figure PCTCN2021094746-appb-000017
Figure PCTCN2021094746-appb-000017
为了进一步建立旋转倒立摆的状态空间模型,需要将倒立摆非线性模型进行线性化,注意到摆杆在稳摆控制中处于直立状态,因此摆杆角度较小,此时存在sinα≈α,cosα≈1,则得到旋转倒立摆线性模型为:In order to further establish the state space model of the rotating inverted pendulum, the nonlinear model of the inverted pendulum needs to be linearized. It is noted that the pendulum rod is in an upright state in the stable pendulum control, so the angle of the pendulum rod is small, and sinα≈α, cosα exists at this time ≈1, then the linear model of the rotating inverted pendulum is obtained as:
Figure PCTCN2021094746-appb-000018
Figure PCTCN2021094746-appb-000018
Figure PCTCN2021094746-appb-000019
Figure PCTCN2021094746-appb-000019
接下来以旋转倒立摆线性模型为基础来建立旋转倒立摆的状态空间模型,为了简化书写设置如下定义:Next, the state space model of the rotating inverted pendulum is established based on the linear model of the rotating inverted pendulum. In order to simplify the writing settings, the following definitions are made:
Figure PCTCN2021094746-appb-000020
Figure PCTCN2021094746-appb-000020
b=J 2+mr 1 2        (17) b=J 2 +mr 1 2 (17)
Figure PCTCN2021094746-appb-000021
Figure PCTCN2021094746-appb-000021
Figure PCTCN2021094746-appb-000022
Figure PCTCN2021094746-appb-000022
Figure PCTCN2021094746-appb-000023
Figure PCTCN2021094746-appb-000023
Figure PCTCN2021094746-appb-000024
Figure PCTCN2021094746-appb-000024
将式(16)至(21)带入式(15)解得
Figure PCTCN2021094746-appb-000025
Figure PCTCN2021094746-appb-000026
为:
Substituting equations (16) to (21) into equation (15) to solve
Figure PCTCN2021094746-appb-000025
and
Figure PCTCN2021094746-appb-000026
for:
Figure PCTCN2021094746-appb-000027
Figure PCTCN2021094746-appb-000027
Figure PCTCN2021094746-appb-000028
Figure PCTCN2021094746-appb-000028
选取状态向量
Figure PCTCN2021094746-appb-000029
其中β为旋臂旋转角度,输入为直流电机电压U,得到旋转倒立摆的状态空间模型为:
select state vector
Figure PCTCN2021094746-appb-000029
Where β is the rotation angle of the arm, the input is the DC motor voltage U, and the state space model of the rotating inverted pendulum is obtained as:
Figure PCTCN2021094746-appb-000030
Figure PCTCN2021094746-appb-000030
其中由于摆杆及旋臂视为均匀长杆,则其转动惯量J 1、J 2可以得出: Among them, since the pendulum rod and the arm are regarded as uniform long rods, the moment of inertia J 1 , J 2 can be obtained as follows:
Figure PCTCN2021094746-appb-000031
Figure PCTCN2021094746-appb-000031
Figure PCTCN2021094746-appb-000032
Figure PCTCN2021094746-appb-000032
其中,r 2为旋臂长度,M旋臂质量,ρ为旋臂和摆杆的密度; Among them, r 2 is the length of the arm, M is the mass of the arm, and ρ is the density of the arm and the pendulum;
第二步:设计旋转倒立摆迭代反馈整定双闭环控制器;Step 2: Design a rotating inverted pendulum iterative feedback tuning double closed-loop controller;
针对旋转倒立摆的状态空间模型设计双闭环控制器,使用迭代反馈整定算法优化角度PD控制器参数,若C(ρ)=[C r(ρ) C y(ρ)],C r(ρ)、C y(ρ)是线性时不变传递函数,G是被控对象的传递函数,u(t)是控制器输出,r(t)是参考输入,y(t)是旋转倒立摆系统输出,v(t)是均值为零的外部随机扰动,PID控制器参数为ρ=[K p K d],在此基础上反馈控制系统作用下的响应输出为: A double closed-loop controller is designed for the state space model of the rotating inverted pendulum, and the iterative feedback tuning algorithm is used to optimize the parameters of the angle PD controller. If C(ρ)=[C r (ρ) C y (ρ)], C r (ρ) , C y (ρ) is the linear time-invariant transfer function, G is the transfer function of the controlled object, u(t) is the controller output, r(t) is the reference input, and y(t) is the output of the rotating inverted pendulum system , v(t) is an external random disturbance with a mean value of zero, the PID controller parameter is ρ=[K p K d ], and the response output under the action of the feedback control system is:
Figure PCTCN2021094746-appb-000033
Figure PCTCN2021094746-appb-000033
为了简化书写,将T 0(ρ)、S 0(ρ)简写为T 0、S 0,定义y d是给定的期望输入信号,则期望输出与实际输出之间的跟踪误差为: In order to simplify the writing, T 0 (ρ) and S 0 (ρ) are abbreviated as T 0 and S 0 , and y d is defined as a given expected input signal, then the tracking error between the expected output and the actual output is:
Figure PCTCN2021094746-appb-000034
Figure PCTCN2021094746-appb-000034
对于控制器参数为ρ的固定结构PID控制器,通过最小化
Figure PCTCN2021094746-appb-000035
以改善反馈控制系统的跟踪控制效果,定义性能优化指标函数J(ρ)为:
For a fixed-structure PID controller with controller parameter ρ, by minimizing
Figure PCTCN2021094746-appb-000035
In order to improve the tracking control effect of the feedback control system, the performance optimization index function J(ρ) is defined as:
Figure PCTCN2021094746-appb-000036
Figure PCTCN2021094746-appb-000036
其中L y、L u表示基于时间序列的滤波器,通常L y=L u=1,采样点个数为N,性能度量的权重因子为λ;IFT算法是通过最小化性能优化指标函数J(ρ)直接求得系统的PID控制器参数ρ,然后通过i次迭代逐步获取PID控制器参数ρ的最优值,ρ i为ρ在第i次迭代中的值,在每个迭代批次中,变量y(ρ i)和u(ρ i)关于控制器参数ρ i的偏导数为: Among them, Ly and Lu represent filters based on time series, usually Ly = Lu = 1, the number of sampling points is N, and the weight factor of performance measurement is λ; the IFT algorithm optimizes the index function by minimizing the performance J( ρ) directly obtain the PID controller parameter ρ of the system, and then gradually obtain the optimal value of the PID controller parameter ρ through i iterations, ρ i is the value of ρ in the ith iteration, and in each iteration batch , the partial derivatives of the variables y(ρ i ) and u(ρ i ) with respect to the controller parameter ρ i are:
Figure PCTCN2021094746-appb-000037
Figure PCTCN2021094746-appb-000037
Figure PCTCN2021094746-appb-000038
Figure PCTCN2021094746-appb-000038
IFT算法通过在自由度控制系统中进行三次实验,以获得T 0r,T 0(r-y)的估计值,在三次实验中,前两次用来估计信号T 0,首先在第i次迭代中,第一次实验以r i (1)=r为输入的参考信号,y (1)i)为采样得到的控制系统的输出值;其次,以该两信号差值r-y (1)i)为第二次实验输入的参考信号r i (2),采样得到y (2)i): The IFT algorithm obtains an estimate of T 0 r, T 0 (ry) by conducting three experiments in a degree-of-freedom control system, in which the first two are used to estimate the signal T 0 , first in the ith iteration , in the first experiment, r i (1) = r is the input reference signal, y (1)i ) is the output value of the control system obtained by sampling; secondly, the difference between the two signals ry (1) ( ρ i) for the second reference input signal experiment r i (2), obtained by sampling y (2) (ρ i) :
Figure PCTCN2021094746-appb-000039
Figure PCTCN2021094746-appb-000039
Figure PCTCN2021094746-appb-000040
Figure PCTCN2021094746-appb-000040
第三次实验用来估计信号T 0r,以r i (3)=r作为输入的参考信号: The third test signal used to estimate T 0 r, to r i (3) = r as the reference signal input:
Figure PCTCN2021094746-appb-000041
Figure PCTCN2021094746-appb-000041
根据三次实验的控制器输出值以及旋转倒立摆系统输出值得到
Figure PCTCN2021094746-appb-000042
的无偏估计,同理
Figure PCTCN2021094746-appb-000043
可以也得到:
According to the controller output value of the three experiments and the output value of the rotating inverted pendulum system, the
Figure PCTCN2021094746-appb-000042
unbiased estimate of
Figure PCTCN2021094746-appb-000043
You can also get:
Figure PCTCN2021094746-appb-000044
Figure PCTCN2021094746-appb-000044
Figure PCTCN2021094746-appb-000045
Figure PCTCN2021094746-appb-000045
基于实验数据的第i次迭代的性能优化指标函数J(ρ i)的估计梯度为: The estimated gradient of the performance optimization index function J(ρ i ) for the ith iteration based on experimental data is:
Figure PCTCN2021094746-appb-000046
Figure PCTCN2021094746-appb-000046
根据性能优化指标函数J(ρ i)的估计梯度以及上一次迭代的PID控制器参数ρ i使用Gauss–Newton算法计算下一次迭代更新的ρ i+1According to the estimated gradient of the performance optimization index function J(ρ i ) and the PID controller parameters ρ i of the previous iteration, the Gauss–Newton algorithm is used to calculate the ρ i+1 for the next iteration update:
Figure PCTCN2021094746-appb-000047
Figure PCTCN2021094746-appb-000047
其中γ i>0表示步长,R i为正定Hessian矩阵表示优化搜索方向: Where γ i > 0 represents the step size, and R i is a positive definite Hessian matrix to represent the optimization search direction:
Figure PCTCN2021094746-appb-000048
Figure PCTCN2021094746-appb-000048
第三步:迭代反馈整定角度PD控制器的收敛性分析;Step 3: Convergence analysis of iterative feedback setting angle PD controller;
为保证算法的收敛性,条件1是保证性能优化指标函数的估计梯度是无偏的,条件2是步长序列γ i要求能够收敛到零,为了保证条件1,由式(18)到(20)得到
Figure PCTCN2021094746-appb-000049
为:
In order to ensure the convergence of the algorithm, condition 1 is to ensure that the estimated gradient of the performance optimization index function is unbiased, and condition 2 is that the step size sequence γ i is required to converge to zero. )get
Figure PCTCN2021094746-appb-000049
for:
Figure PCTCN2021094746-appb-000050
Figure PCTCN2021094746-appb-000050
Figure PCTCN2021094746-appb-000051
Figure PCTCN2021094746-appb-000051
基于IFT算法的实验中设定三次实验的v i (m),m=1,2,3是同一系统相互独立的零均值有界随机噪声,即|v i (m)|<C,其中假设三次实验中界限值C和随机噪声的均方值保持不变,则得到式(21)和(22)的无偏估计; IFT experiments set of three experiments algorithm based on v i (m), m = 1,2,3 is the same system independent zero-mean random noise bounded, i.e. | v i (m) | < C, where it is assumed In the three experiments, the limit value C and the mean square value of random noise remain unchanged, then the unbiased estimates of equations (21) and (22) are obtained;
条件2需要保证算法收敛的条件通常要求步长序列γ i的所有元素满足: Condition 2 The conditions that need to ensure the convergence of the algorithm usually require that all elements of the step sequence γ i satisfy:
Figure PCTCN2021094746-appb-000052
Figure PCTCN2021094746-appb-000052
第四步:鲁棒迭代反馈整定角度PD控制器的进一步优化;The fourth step: further optimization of the robust iterative feedback setting angle PD controller;
IFT算法依靠经验选择如λ一类的权重值,但由于各个性能度量之间的物理意义并不相同,运行环境也不尽一致,它们之间的取值范围相差巨大,因此若同时控制多个相同系统,依靠经验选择的性能度量的权重因子λ并不具有普适性,考虑各个性能度量之间的取值范围,构建了一个辅助因子L i,辅助因子L i为性能度量之间的取值范围之比: The IFT algorithm relies on experience to select weight values such as λ. However, because the physical meanings of various performance metrics are not the same, and the operating environments are not consistent, the value ranges between them are very different. the same system, relying on experience performance metric selected weighting factors do not have universal λ, considering the range between the various performance metrics, build a cofactor L i, L i is a co-factor performance metric taken between Ratio of value ranges:
Figure PCTCN2021094746-appb-000053
Figure PCTCN2021094746-appb-000053
在此基础上准则函数J(θ)修改为:On this basis, the criterion function J(θ) is modified as:
Figure PCTCN2021094746-appb-000054
Figure PCTCN2021094746-appb-000054
其中,
Figure PCTCN2021094746-appb-000055
为跟踪误差,u(θ i)为控制器输出,
in,
Figure PCTCN2021094746-appb-000055
is the tracking error, u(θ i ) is the controller output,
Figure PCTCN2021094746-appb-000056
和近似Hessian矩阵R i修改为:
and
Figure PCTCN2021094746-appb-000056
And the approximate Hessian matrix R i is modified as:
Figure PCTCN2021094746-appb-000057
Figure PCTCN2021094746-appb-000057
Figure PCTCN2021094746-appb-000058
Figure PCTCN2021094746-appb-000058
式中y d,max和y d,min为期望输出的最大值与最小值,u max和u min表示第i次迭代过程中控制信号在所有N个采样点中的最大值与最小值;由于这些值都是在每次迭代结束时给出,所有的采样点都会被考虑在内,因而引入辅助因子L i使得权重因子λ在不同系统中都代表了当前迭代优化后
Figure PCTCN2021094746-appb-000059
与u(θ i)权重比的最佳范围。
where y d,max and y d,min are the maximum and minimum values of the expected output, and u max and u min represent the maximum and minimum values of the control signal in all N sampling points during the ith iteration; since these values are given at the end of each iteration, all the sample points will be taken into account, and thus the introduction of co-factors L i such that the weighting factor λ in different systems are optimized represents the current iteration
Figure PCTCN2021094746-appb-000059
Optimal range of weight ratios to u(θ i ).
本发明的有益技术效果是:The beneficial technical effects of the present invention are:
针对旋转倒立摆实验平台角度PD控制器参数进行优化,迭代反馈整定算法通过三次闭环实验求取Gauss–Newton梯度进行参数更新,能够使得控制系统能够快速响应输入信号的变化从而具有较好的鲁棒性。本发明将迭代设计与数值优化的的思想相结合,将性能指标函数与I/O数据联系了起来,不需要获取模型本身的参数,避免了优化过程中对被控对象以及扰动特性模型的精确估计的要求。同时贡献出了一种计算指标函数对控制器参数的无偏梯度(也即系统输出微分的无偏信号)的无模型方法,提高了算法在复杂系统控制上的适用性。To optimize the parameters of the angle PD controller of the rotating inverted pendulum experimental platform, the iterative feedback tuning algorithm obtains the Gauss–Newton gradient through three closed-loop experiments to update the parameters, which enables the control system to respond quickly to changes in the input signal and has better robustness sex. The invention combines the idea of iterative design and numerical optimization, links the performance index function with the I/O data, does not need to obtain the parameters of the model itself, and avoids the accuracy of the controlled object and the disturbance characteristic model in the optimization process. estimated requirements. At the same time, a model-free method for calculating the unbiased gradient of the indicator function to the controller parameters (that is, the unbiased signal of the system output differential) is presented, which improves the applicability of the algorithm in the control of complex systems.
附图说明Description of drawings
图1为旋转倒立摆摆动模型示意图。Figure 1 is a schematic diagram of the swing model of the rotating inverted pendulum.
图2为旋转倒立摆迭代反馈整定双闭环控制结构框图。Figure 2 is a block diagram of the double closed-loop control structure for iterative feedback tuning of the rotating inverted pendulum.
图3为旋转倒立摆实验平台机械结构图。Figure 3 is the mechanical structure diagram of the rotating inverted pendulum experimental platform.
图4为旋转倒立摆实验平台硬件结构图。Figure 4 is the hardware structure diagram of the rotating inverted pendulum experimental platform.
图5为DSPACE总体程序设计图。Figure 5 is the overall program design diagram of DSPACE.
图6为迭代过程中旋转倒立摆摆杆轨迹、准则函数及控制器参数变化示意图。FIG. 6 is a schematic diagram of the trajectory of the rotating inverted pendulum pendulum rod, the criterion function and the change of the controller parameters in the iterative process.
图7为引入辅助因子L i前后旋转倒立摆跟踪误差示意图。 FIG 7 is a factor L i before and after the introduction of the auxiliary rotation inverted pendulum schematic tracking error.
具体实施方式detailed description
下面结合附图对本发明的具体实施方式做进一步说明。The specific embodiments of the present invention will be further described below with reference to the accompanying drawings.
本申请公开了一种旋转倒立摆的迭代反馈整定控制及其鲁棒优化方法,The present application discloses an iterative feedback tuning control of a rotating inverted pendulum and a robust optimization method thereof,
第一步:基于倒立摆机械和硬件结构建立旋转倒立摆的拉格朗日和状态空间模型;Step 1: Establish the Lagrangian and state space model of the rotating inverted pendulum based on the mechanical and hardware structure of the inverted pendulum;
图1为旋转倒立摆摆动模型示意图,在此基础上进行旋转倒立摆数学模型的构建,旋转倒立摆系统包括底座、传动装置、摆杆及旋臂,底座用于保证摆杆摆动时机械结构的稳定;旋臂末端连接摆杆,直流电机的旋转通过传动装置带动摆杆的运动;旋臂的角度及角速度则通过直流电机自带的增量式旋转编码器获取;通过联轴器连接增量式旋转编码器与摆杆,带动增量式旋转编码器旋转从而获取摆杆的角度及角速度;在构建旋转倒立摆的动力学模型中,忽略空气阻力、摩擦力及微小项以简化建模过程,把旋臂及摆杆视为均匀的长杆,设摆杆处于稳定竖立时旋转倒立摆系统的势能为零。结合表1所示,旋转倒立摆各物理量的含义为:Figure 1 is a schematic diagram of the swing model of the rotating inverted pendulum. On this basis, the mathematical model of the rotating inverted pendulum is constructed. The rotating inverted pendulum system includes a base, a transmission device, a swing rod and a swing arm. The base is used to ensure the mechanical structure of the swing rod. Stable; the end of the arm is connected to the pendulum rod, and the rotation of the DC motor drives the movement of the pendulum rod through the transmission device; the angle and angular velocity of the arm are obtained through the incremental rotary encoder that comes with the DC motor; the incremental rotation is connected through the coupling The rotary encoder and the pendulum rod are used to drive the incremental rotary encoder to rotate to obtain the angle and angular velocity of the pendulum rod; in the dynamic model of the rotating inverted pendulum, air resistance, friction force and tiny items are ignored to simplify the modeling process , the swing arm and the pendulum rod are regarded as a uniform long rod, and the potential energy of the rotating inverted pendulum system is set to zero when the pendulum rod is in a stable erection. Combined with Table 1, the meanings of the physical quantities of the rotating inverted pendulum are:
表1 旋转倒立摆各物理量意义Table 1 Significance of each physical quantity of rotating inverted pendulum
Figure PCTCN2021094746-appb-000060
Figure PCTCN2021094746-appb-000060
摆杆偏离直立位置角度α时,旋臂通过旋转β带动摆杆趋于直立位置,因此旋臂末端速度v m为: When the pendulum rod deviates from the upright position angle α, the swing arm drives the pendulum rod to the upright position by rotating β, so the speed v m of the end of the arm is:
Figure PCTCN2021094746-appb-000061
Figure PCTCN2021094746-appb-000061
其中,r 1为旋臂旋转中心到与摆杆连接点的距离,
Figure PCTCN2021094746-appb-000062
为旋臂旋转时角速度;
Among them, r 1 is the distance from the rotation center of the arm to the connection point with the pendulum rod,
Figure PCTCN2021094746-appb-000062
is the angular velocity when the arm rotates;
由于摆杆为均匀长杆,视摆杆为一质点则得到摆杆转动速度为v z为: Since the pendulum rod is a uniform long rod, considering the pendulum rod as a mass point, the rotation speed of the pendulum rod v z is obtained as:
Figure PCTCN2021094746-appb-000063
Figure PCTCN2021094746-appb-000063
其中,L为摆杆长度,
Figure PCTCN2021094746-appb-000064
为摆杆旋转时角速度;
Among them, L is the length of the pendulum rod,
Figure PCTCN2021094746-appb-000064
is the angular velocity when the pendulum rod rotates;
将摆杆转动速度v z在旋臂末端速度v m垂直方向进行分解,并以摆杆旋转平面与地面水平方向速度v r所指方向为正方向,得到: Decompose the rotation speed v z of the pendulum rod in the vertical direction of the speed v m at the end of the arm, and take the direction of the rotation plane of the pendulum rod and the horizontal direction speed v r of the ground as the positive direction, we get:
Figure PCTCN2021094746-appb-000065
Figure PCTCN2021094746-appb-000065
Figure PCTCN2021094746-appb-000066
Figure PCTCN2021094746-appb-000066
在旋臂末端速度v m和地面水平方向速度v r的共同作用下,摆杆在水平方向上的速度vb为: Under the combined action of the velocity v m at the end of the boom and the velocity v r in the horizontal direction of the ground, the velocity vb of the pendulum in the horizontal direction is:
Figure PCTCN2021094746-appb-000067
Figure PCTCN2021094746-appb-000067
摆杆的动能包含有旋转产生的转动动能以及在水平方向上移动产生的动能,另外旋转倒立摆系统整体动能还包含有直流电机带动的旋臂的动能,因此得到旋 转倒立摆系统的整体动能V,令J 1为摆杆的转动惯量,J 2为旋臂的转动惯量,m为摆杆质量,并将式(4)及(5)带入得到: The kinetic energy of the pendulum rod includes the rotational kinetic energy generated by rotation and the kinetic energy generated by moving in the horizontal direction. In addition, the overall kinetic energy of the rotating inverted pendulum system also includes the kinetic energy of the arm driven by the DC motor, so the overall kinetic energy V of the rotating inverted pendulum system is obtained. , let J 1 be the moment of inertia of the pendulum rod, J 2 be the moment of inertia of the swing arm, m is the mass of the pendulum rod, and bring equations (4) and (5) into:
Figure PCTCN2021094746-appb-000068
Figure PCTCN2021094746-appb-000068
摆杆直立时设为零势能点,H为旋转倒立摆系统整体势能,E为拉格朗日函数,则偏转α角度后势能降为:When the pendulum is upright, it is set as the zero potential energy point, H is the overall potential energy of the rotating inverted pendulum system, E is the Lagrangian function, then the potential energy is reduced to:
Figure PCTCN2021094746-appb-000069
Figure PCTCN2021094746-appb-000069
拉格朗日函数E为:The Lagrangian function E is:
Figure PCTCN2021094746-appb-000070
Figure PCTCN2021094746-appb-000070
可知旋臂旋转带动摆杆运动,无外界能力输入,令T output为电机输出转矩,B eq为等效粘性摩擦,得到拉格朗日方程为: It can be seen that the rotation of the swing arm drives the movement of the pendulum rod, and there is no external power input. Let T output be the output torque of the motor, B eq is the equivalent viscous friction, and the Lagrangian equation can be obtained as:
Figure PCTCN2021094746-appb-000071
Figure PCTCN2021094746-appb-000071
Figure PCTCN2021094746-appb-000072
Figure PCTCN2021094746-appb-000072
式(8)带入式(9)及(10)得到旋转倒立摆的非线性模型:Equation (8) is brought into equations (9) and (10) to obtain the nonlinear model of the rotating inverted pendulum:
Figure PCTCN2021094746-appb-000073
Figure PCTCN2021094746-appb-000073
Figure PCTCN2021094746-appb-000074
Figure PCTCN2021094746-appb-000074
从在式(11)得到的旋转倒立摆的非线性模型中,其输入为直流电机转矩,但通常情况下以直流电机电压为控制输入,因此接下来对直流电机进行建模,最终建立以直流电机电压为输入的倒立摆非线性模型;From the nonlinear model of the rotating inverted pendulum obtained in equation (11), its input is the DC motor torque, but usually the DC motor voltage is used as the control input, so the next step is to model the DC motor, and finally establish a Inverted pendulum nonlinear model with DC motor voltage as input;
令I d为直流电机电流,E d为反电动势,并考虑传动装置的效率和齿轮比值,K T为电机转矩系数,K E为电机转速系数,K g为旋臂与直流电机的齿轮比,η g为齿轮传动效率,η d为电机效率,U为直流电机电压,R为电枢电阻,得到: So as DC current I d, E d is the counter electromotive force, and taking into account the efficiency of the transmission gear ratio, K T is the motor torque coefficient, K E of the motor-speed coefficient, K g is the DC motor with gear arm ratio , η g is the gear transmission efficiency, η d is the motor efficiency, U is the DC motor voltage, R is the armature resistance, we get:
Figure PCTCN2021094746-appb-000075
Figure PCTCN2021094746-appb-000075
T output=η dη gK gK TI d          (13) 将式(12)、(13)带入式(11)中,得到以直流电机电压为输入的倒立摆非线性模型为: T output = η d η g K g K T I d (13) Putting equations (12) and (13) into equation (11), the nonlinear model of the inverted pendulum with the DC motor voltage as input is:
Figure PCTCN2021094746-appb-000076
Figure PCTCN2021094746-appb-000076
Figure PCTCN2021094746-appb-000077
Figure PCTCN2021094746-appb-000077
为了进一步建立旋转倒立摆的状态空间模型,需要将倒立摆非线性模型进行线性化,注意到摆杆在稳摆控制中处于直立状态,因此摆杆角度较小,此时存在sinα≈α,cosα≈1,则得到旋转倒立摆线性模型为:In order to further establish the state space model of the rotating inverted pendulum, the nonlinear model of the inverted pendulum needs to be linearized. It is noted that the pendulum rod is in an upright state in the stable pendulum control, so the angle of the pendulum rod is small, and sinα≈α, cosα exists at this time ≈1, then the linear model of the rotating inverted pendulum is obtained as:
Figure PCTCN2021094746-appb-000078
Figure PCTCN2021094746-appb-000078
Figure PCTCN2021094746-appb-000079
Figure PCTCN2021094746-appb-000079
接下来以旋转倒立摆线性模型为基础来建立旋转倒立摆的状态空间模型,为了简化书写设置如下定义:Next, the state space model of the rotating inverted pendulum is established based on the linear model of the rotating inverted pendulum. In order to simplify the writing settings, the following definitions are made:
Figure PCTCN2021094746-appb-000080
Figure PCTCN2021094746-appb-000080
b=J 2+mr 1 2             (17) b=J 2 +mr 1 2 (17)
Figure PCTCN2021094746-appb-000081
Figure PCTCN2021094746-appb-000081
Figure PCTCN2021094746-appb-000082
Figure PCTCN2021094746-appb-000082
Figure PCTCN2021094746-appb-000083
Figure PCTCN2021094746-appb-000083
Figure PCTCN2021094746-appb-000084
Figure PCTCN2021094746-appb-000084
将式(16)至(21)带入式(15)解得
Figure PCTCN2021094746-appb-000085
Figure PCTCN2021094746-appb-000086
为:
Substituting equations (16) to (21) into equation (15) to solve
Figure PCTCN2021094746-appb-000085
and
Figure PCTCN2021094746-appb-000086
for:
Figure PCTCN2021094746-appb-000087
Figure PCTCN2021094746-appb-000087
Figure PCTCN2021094746-appb-000088
Figure PCTCN2021094746-appb-000088
选取状态向量
Figure PCTCN2021094746-appb-000089
其中β为旋臂旋转角度,输入为直流电机电压U,得到旋转倒立摆的状态空间模型为:
select state vector
Figure PCTCN2021094746-appb-000089
where β is the rotation angle of the arm, the input is the DC motor voltage U, and the state space model of the rotating inverted pendulum is obtained as:
Figure PCTCN2021094746-appb-000090
Figure PCTCN2021094746-appb-000090
其中由于摆杆及旋臂视为均匀长杆,则其转动惯量J 1、J 2可以得出: Among them, since the pendulum rod and the arm are regarded as uniform long rods, the moment of inertia J 1 , J 2 can be obtained as follows:
Figure PCTCN2021094746-appb-000091
Figure PCTCN2021094746-appb-000091
Figure PCTCN2021094746-appb-000092
Figure PCTCN2021094746-appb-000092
其中,r 2为旋臂长度,M旋臂质量,ρ为旋臂和摆杆的密度。 where r 2 is the length of the arm, M is the mass of the arm, and ρ is the density of the arm and the pendulum.
将如表2所示的倒立摆实际参数值带入式(16)至(25),得到旋转倒立摆的具体状态空间模型如下所示:Substituting the actual parameter values of the inverted pendulum shown in Table 2 into equations (16) to (25), the specific state space model of the rotating inverted pendulum is obtained as follows:
Figure PCTCN2021094746-appb-000093
Figure PCTCN2021094746-appb-000093
根据该状态空间模型,由李雅普诺夫判据及秩判据可以得到旋转倒立摆是一个不稳定的但完全能控能观的系统,因此能够通过控制直流电动机电压对旋臂的角度、角速度和摆杆的角度、角速度进行控制,并且这些参数是完全可以观测的。According to the state space model, it can be obtained from the Lyapunov criterion and the rank criterion that the rotating inverted pendulum is an unstable but completely controllable and observable system. Therefore, the angle, angular velocity and The angle and angular velocity of the pendulum are controlled, and these parameters are completely observable.
表2:旋转倒立摆各实际参数Table 2: The actual parameters of the rotating inverted pendulum
Figure PCTCN2021094746-appb-000094
Figure PCTCN2021094746-appb-000094
第二步:设计旋转倒立摆迭代反馈整定双闭环控制器;Step 2: Design a rotating inverted pendulum iterative feedback tuning double closed-loop controller;
结合图2所示,针对旋转倒立摆的状态空间模型设计双闭环控制器,使用迭 代反馈整定算法优化角度PD控制器参数,若C(ρ)=[C r(ρ) C y(ρ)],C r(ρ)、C y(ρ)是线性时不变传递函数,G是被控对象的传递函数,u(t)是控制器输出,r(t)是参考输入,y(t)是旋转倒立摆系统输出,v(t)是均值为零的外部随机扰动,PID控制器参数为ρ=[K p K d],在此基础上反馈控制系统作用下的响应输出为: Combined with Fig. 2, a double closed-loop controller is designed for the state space model of the rotating inverted pendulum, and the iterative feedback tuning algorithm is used to optimize the parameters of the angle PD controller, if C(ρ)=[C r (ρ) C y (ρ)] , C r (ρ), C y (ρ) are linear time-invariant transfer functions, G is the transfer function of the controlled object, u(t) is the controller output, r(t) is the reference input, y(t) is the output of the rotating inverted pendulum system, v(t) is the external random disturbance with zero mean, the PID controller parameter is ρ=[K p K d ], and the response output under the action of the feedback control system is:
Figure PCTCN2021094746-appb-000095
Figure PCTCN2021094746-appb-000095
为了简化书写,将T 0(ρ)、S 0(ρ)简写为T 0、S 0,定义y d是给定的期望输入信号,则期望输出与实际输出之间的跟踪误差为: In order to simplify the writing, T 0 (ρ) and S 0 (ρ) are abbreviated as T 0 and S 0 , and y d is defined as a given expected input signal, then the tracking error between the expected output and the actual output is:
Figure PCTCN2021094746-appb-000096
Figure PCTCN2021094746-appb-000096
对于控制器参数为ρ的固定结构PID控制器,通过最小化
Figure PCTCN2021094746-appb-000097
以改善反馈控制系统的跟踪控制效果,定义性能优化指标函数J(ρ)为:
For a fixed-structure PID controller with controller parameter ρ, by minimizing
Figure PCTCN2021094746-appb-000097
In order to improve the tracking control effect of the feedback control system, the performance optimization index function J(ρ) is defined as:
Figure PCTCN2021094746-appb-000098
Figure PCTCN2021094746-appb-000098
其中L y、L u表示基于时间序列的滤波器,通常L y=L u=1,采样点个数为N,性能度量的权重因子为λ;IFT算法是通过最小化性能优化指标函数J(ρ)直接求得系统的PID控制器参数ρ,然后通过i次迭代逐步获取PID控制器参数ρ的最优值,ρ i为ρ在第i次迭代中的值,在每个迭代批次中,变量y(ρ i)和u(ρ i)关于控制器参数ρ i的偏导数为: Among them, Ly and Lu represent filters based on time series, usually Ly = Lu = 1, the number of sampling points is N, and the weight factor of performance measurement is λ; the IFT algorithm optimizes the index function by minimizing the performance J ( ρ) directly obtain the PID controller parameter ρ of the system, and then gradually obtain the optimal value of the PID controller parameter ρ through i iterations, ρ i is the value of ρ in the ith iteration, and in each iteration batch , the partial derivatives of the variables y(ρ i ) and u(ρ i ) with respect to the controller parameter ρ i are:
Figure PCTCN2021094746-appb-000099
Figure PCTCN2021094746-appb-000099
Figure PCTCN2021094746-appb-000100
Figure PCTCN2021094746-appb-000100
IFT算法通过在自由度控制系统中进行三次实验,以获得T 0r,T 0(r-y)的估计值,在三次实验中,前两次用来估计信号T 0,首先在第i次迭代中,第一次实验以r i (1)=r为输入的参考信号,y (1)i)为采样得到的控制系统的输出值;其次,以该两信号差值r-y (1)i)为第二次实验输入的参考信号r i (2),采样得到y (2)i): The IFT algorithm obtains an estimate of T 0 r, T 0 (ry) by conducting three experiments in a degree-of-freedom control system, in which the first two are used to estimate the signal T 0 , first in the ith iteration , in the first experiment, r i (1) = r is the input reference signal, y (1)i ) is the output value of the control system obtained by sampling; secondly, the difference between the two signals ry (1) ( ρ i) for the second reference input signal experiment r i (2), obtained by sampling y (2) (ρ i) :
Figure PCTCN2021094746-appb-000101
Figure PCTCN2021094746-appb-000101
Figure PCTCN2021094746-appb-000102
Figure PCTCN2021094746-appb-000102
第三次实验用来估计信号T 0r,以r i (3)=r作为输入的参考信号: The third test signal used to estimate T 0 r, to r i (3) = r as the reference signal input:
Figure PCTCN2021094746-appb-000103
Figure PCTCN2021094746-appb-000103
根据三次实验的控制器输出值以及旋转倒立摆系统输出值得到
Figure PCTCN2021094746-appb-000104
的无偏估计,同理
Figure PCTCN2021094746-appb-000105
可以也得到:
According to the controller output value of the three experiments and the output value of the rotating inverted pendulum system, the
Figure PCTCN2021094746-appb-000104
unbiased estimate of
Figure PCTCN2021094746-appb-000105
You can also get:
Figure PCTCN2021094746-appb-000106
Figure PCTCN2021094746-appb-000106
Figure PCTCN2021094746-appb-000107
Figure PCTCN2021094746-appb-000107
基于实验数据的第i次迭代的性能优化指标函数J(ρ i)的估计梯度为: The estimated gradient of the performance optimization index function J(ρ i ) for the ith iteration based on experimental data is:
Figure PCTCN2021094746-appb-000108
Figure PCTCN2021094746-appb-000108
根据性能优化指标函数J(ρ i)的估计梯度以及上一次迭代的PID控制器参数ρ i使用Gauss–Newton算法计算下一次迭代更新的ρ i+1According to the estimated gradient of the performance optimization index function J(ρ i ) and the PID controller parameters ρ i of the previous iteration, the Gauss–Newton algorithm is used to calculate the ρ i+1 for the next iteration update:
Figure PCTCN2021094746-appb-000109
Figure PCTCN2021094746-appb-000109
其中γ i>0表示步长,R i为正定Hessian矩阵表示优化搜索方向: Where γ i > 0 represents the step size, and R i is a positive definite Hessian matrix to represent the optimization search direction:
Figure PCTCN2021094746-appb-000110
Figure PCTCN2021094746-appb-000110
为了设计稳摆控制器以维持摆杆稳定直立,首先对摆杆角度设计一个闭环,直立状态作为动态平衡,不需要积分控制,但加入微分控制提高角度变化率大时的调控速度,最终对摆杆角度采用PD控制器;摆杆稳定直立时旋臂应该保持静止,因此再次添加一个闭环对旋臂位置进行控制,基于位置是速度的积分,因此旋臂速度采用PI控制器;由于速度的闭环是角度控制的一个干扰量,PI控制器对角度控制的影响需要降低,因此迭代反馈整定算法被用于稳摆过程中旋转倒立摆角度PD控制器参数的整定优化。In order to design the stable pendulum controller to keep the pendulum rod upright and stable, first design a closed loop for the pendulum rod angle, the upright state is used as a dynamic balance, and integral control is not required, but the differential control is added to improve the control speed when the angle change rate is large, and finally the pendulum is reversed. The rod angle adopts PD controller; when the pendulum rod is stable and upright, the arm should remain stationary, so a closed loop is added to control the position of the arm, based on the integral of the speed, the speed of the arm adopts a PI controller; due to the closed loop of the speed It is an interference quantity of angle control, and the influence of PI controller on angle control needs to be reduced. Therefore, iterative feedback tuning algorithm is used for the tuning optimization of the PD controller parameters of the rotating inverted pendulum angle during the stable pendulum process.
将推导出来的式(26)旋转倒立摆具体状态空间模型作为控制系统未知的不确定被控对象,通过获得增量式旋转编码器采集到的摆杆实际角度与给定角度的跟踪误差,设计角度IFT-PD控制器用以输出直流电机电压。Taking the specific state space model of the rotary inverted pendulum derived from equation (26) as the unknown unknown controlled object of the control system, and by obtaining the tracking error between the actual angle of the pendulum rod collected by the incremental rotary encoder and the given angle, the design The angle IFT-PD controller is used to output the DC motor voltage.
本申请中,旋转倒立摆的起摆控制采用旋臂位置反馈以及摆杆的速度反馈实现,旋臂的位置反馈限制摆杆在期望位置周边进行摆动,而摆杆的速度反馈则使摆杆的摆角幅度逐渐变大。In the present application, the swing control of the rotary inverted pendulum is realized by the position feedback of the swing arm and the speed feedback of the swing rod. The position feedback of the swing arm restricts the swing rod from swinging around the desired position, and the speed feedback of the swing rod makes the swing rod The swing angle is gradually increased.
第三步:迭代反馈整定角度PD控制器的收敛性分析;Step 3: Convergence analysis of iterative feedback setting angle PD controller;
为保证算法的收敛性,条件1是保证性能优化指标函数的估计梯度是无偏的,条件2是步长序列γ i要求能够收敛到零,为了保证条件1,由式(18)到(20) 得到
Figure PCTCN2021094746-appb-000111
为:
In order to ensure the convergence of the algorithm, condition 1 is to ensure that the estimated gradient of the performance optimization index function is unbiased, and condition 2 is that the step size sequence γ i is required to converge to zero. ) get
Figure PCTCN2021094746-appb-000111
for:
Figure PCTCN2021094746-appb-000112
Figure PCTCN2021094746-appb-000112
Figure PCTCN2021094746-appb-000113
Figure PCTCN2021094746-appb-000113
基于IFT算法的实验中设定三次实验的v i (m),m=1,2,3是同一系统相互独立的零均值有界随机噪声,即|v i (m)|<C,其中假设三次实验中界限值C和随机噪声的均方值保持不变,则得到式(21)和(22)的无偏估计; IFT experiments set of three experiments algorithm based on v i (m), m = 1,2,3 is the same system independent zero-mean random noise bounded, i.e. | v i (m) | < C, where it is assumed In the three experiments, the limit value C and the mean square value of random noise remain unchanged, then the unbiased estimates of equations (21) and (22) are obtained;
条件2需要保证算法收敛的条件通常要求步长序列γ i的所有元素满足: Condition 2 The conditions that need to ensure the convergence of the algorithm usually require that all elements of the step sequence γ i satisfy:
Figure PCTCN2021094746-appb-000114
Figure PCTCN2021094746-appb-000114
这些收敛条件的基本要求是在整个优化迭代过程中参考输入信号r(t)始终保持有界。虽然确定更新方向的矩阵R i不会影响IFT的收敛能力,但理想选择是通过Gauss–Newton方向来加速收敛速度。因此使用Gauss–Newton优化算法可以保证算法的收敛性,使得设计的IFT算法能够很快覆盖到一个固定的优化点。该结论除了时不变性条件外,对系统的性质没有任何假设,因此结论适用于简单的PID控制器或者更复杂的控制器。 The basic requirement of these convergence conditions is that the reference input signal r(t) remains bounded throughout the optimization iteration. Although the matrix R i that determines the update direction does not affect the convergence ability of IFT, the ideal choice is to speed up the convergence speed through the Gauss–Newton direction. Therefore, using the Gauss-Newton optimization algorithm can ensure the convergence of the algorithm, so that the designed IFT algorithm can quickly cover a fixed optimization point. This conclusion does not make any assumptions about the nature of the system except for the time-invariant condition, so the conclusion is applicable to simple PID controllers or more complex controllers.
第四步:引入辅助因子对鲁棒迭代反馈整定角度PD控制器的进一步优化;Step 4: Introduce auxiliary factors to further optimize the robust iterative feedback setting angle PD controller;
IFT算法依靠经验选择如λ一类的权重值,但由于各个性能度量之间的物理意义并不相同,运行环境也不尽一致,它们之间的取值范围相差巨大,因此若同时控制多个相同系统,依靠经验选择的性能度量的权重因子λ并不具有普适性,考虑各个性能度量之间的取值范围,构建了一个辅助因子L i,辅助因子L i为性能度量之间的取值范围之比: The IFT algorithm relies on experience to select weight values such as λ. However, because the physical meanings of various performance metrics are not the same, and the operating environments are not consistent, the value ranges between them are very different. the same system, relying on experience performance metric selected weighting factors do not have universal λ, considering the range between the various performance metrics, build a cofactor L i, L i is a co-factor performance metric taken between Ratio of value ranges:
Figure PCTCN2021094746-appb-000115
Figure PCTCN2021094746-appb-000115
在此基础上准则函数J(θ)修改为:On this basis, the criterion function J(θ) is modified as:
Figure PCTCN2021094746-appb-000116
Figure PCTCN2021094746-appb-000116
其中,
Figure PCTCN2021094746-appb-000117
为跟踪误差,u(θ i)为控制器输出,
in,
Figure PCTCN2021094746-appb-000117
is the tracking error, u(θ i ) is the controller output,
Figure PCTCN2021094746-appb-000118
和近似Hessian矩阵R i修改为:
and
Figure PCTCN2021094746-appb-000118
And the approximate Hessian matrix R i is modified as:
Figure PCTCN2021094746-appb-000119
Figure PCTCN2021094746-appb-000119
Figure PCTCN2021094746-appb-000120
Figure PCTCN2021094746-appb-000120
式中y d,max和y d,min为期望输出的最大值与最小值,u max和u min表示第i次迭代过程中控制信号在所有N个采样点中的最大值与最小值;由于这些值都是在每次迭代结束时给出,所有的采样点都会被考虑在内,因而引入辅助因子L i使得权重因子λ在不同系统中都代表了当前迭代优化后
Figure PCTCN2021094746-appb-000121
与u(θ i)权重比的最佳范围。
where y d,max and y d,min are the maximum and minimum values of the expected output, and u max and u min represent the maximum and minimum values of the control signal in all N sampling points during the ith iteration; since these values are given at the end of each iteration, all the sample points will be taken into account, and thus the introduction of co-factors L i such that the weighting factor λ in different systems are optimized represents the current iteration
Figure PCTCN2021094746-appb-000121
Optimal range of weight ratios to u(θ i ).
图3是旋转倒立摆实验平台的机械结构,包含底座、传动装置、直流电机、摆杆及旋臂等部分,图4为旋转倒立摆实验平台硬件结构图,旋转倒立摆的硬件结构由DSPACE可编程控制器、IR2104直流电机驱动板、ETS25绝对式旋转编码器、50V/4.9A的直流电机及与ETS25进行SPI通信的STM32板组成。DSPACE发出PWM信号给IR2104直流电机驱动板,而IR2104直流电机驱动板根据PWM控制直流电机的电压及转向,进一步DSPACE读取电机的位置及转速且电机通过传动带带动旋臂进行旋转,摆杆通过联轴器带动旋转编码器旋转,最后摆杆的位置及速度通过SPI由STM32最小系统读取,并通过串口发送至DSPACE。Figure 3 is the mechanical structure of the rotating inverted pendulum experimental platform, including the base, transmission device, DC motor, pendulum and arm and other parts, Figure 4 is the hardware structure diagram of the rotating inverted pendulum experimental platform, the hardware structure of the rotating inverted pendulum can be obtained by DSPACE It consists of programming controller, IR2104 DC motor driver board, ETS25 absolute rotary encoder, 50V/4.9A DC motor and STM32 board for SPI communication with ETS25. DSPACE sends a PWM signal to the IR2104 DC motor driver board, and the IR2104 DC motor driver board controls the voltage and direction of the DC motor according to PWM, and further DSPACE reads the position and speed of the motor, and the motor drives the rotating arm to rotate through the transmission belt. The shaft drives the rotary encoder to rotate, and finally the position and speed of the pendulum rod are read by the STM32 minimum system through SPI, and sent to DSPACE through the serial port.
DSPACE实时仿真系统是由德国DSPACE公司开发的一套基于MATLAB/Simulink的控制系统在实时环境下的开发及测试工作平台,它可以和MATLAB/Simulink进行无缝衔接。在本申请中,所采用的DSPACE的型号为DS1104,它是一个基于PowerPC603浮点处理器的实时控制系统,运行频率可达250MHz。为了满足对于一些高级I/O口的需求,该型号包括了一个基于TMS320F204DSP微控制器的从DSP子系统。为了快速控制原型(RCP),特定的接口连接器和连接器面板可以方便地访问DSPACE的所有输入和输出信号。The DSPACE real-time simulation system is a development and testing work platform for a control system based on MATLAB/Simulink in a real-time environment developed by the German DSPACE company. It can be seamlessly connected with MATLAB/Simulink. In this application, the model of DSPACE used is DS1104, which is a real-time control system based on PowerPC603 floating-point processor, and the operating frequency can reach 250MHz. In order to meet the demand for some advanced I/O ports, this model includes a slave DSP subsystem based on the TMS320F204DSP microcontroller. For Rapid Control Prototyping (RCP), specific interface connectors and connector panels provide easy access to all DSPACE input and output signals.
本申请还提供了基于DSPACE旋转倒立摆软件和硬件的具体设计:This application also provides the specific design of software and hardware based on DSPACE rotating inverted pendulum:
基于迭代反馈整定的旋转倒立摆双闭环控制具体的鲁棒优化方案如下:The specific robust optimization scheme of rotating inverted pendulum double closed-loop control based on iterative feedback tuning is as follows:
1)针对旋转倒立摆线性模型(15),设定该摆杆初始角度θ 0,初始控制信号Δu 0,期望轨迹y d,采样周期ΔT。 1) For the rotating inverted pendulum linear model (15), set the initial angle θ 0 of the pendulum rod, the initial control signal Δu 0 , the desired trajectory y d , and the sampling period ΔT.
2)选择角度PD控制器最初的参数ρ 1并根据式(17)设计性能优化指标J(ρ i),给定一个阈值J max2) Select the initial parameter ρ 1 of the angle PD controller and design the performance optimization index J(ρ i ) according to formula (17), and give a threshold value J max .
3)进行三次旋转倒立摆摆动实验,实验的三次输入分别为:r i (1)=y d、r i (2)=y (1)i)、r i (3)=y d,第一次实验所得y (1)i)作为第二次实验的参考输入,第二次和第三次 实验获取控制器输入值u (2)i)、u (3)i)和系统输出值y (2)i)、y (3)i)来计算控制器参数的梯度。 3) times of rotation inverted pendulum swings After three experiments were: r i (1) = y d, r i (2) = y (1) (ρ i), r i (3) = y d, The y (1)i ) obtained in the first experiment is used as the reference input for the second experiment, and the second and third experiments obtain the controller input values u (2)i ), u (3)i ) and the system output values y (2)i ), y (3)i ) to calculate the gradient of the controller parameters.
4)运用第二、三次实验的结果根据式(21)和(22)计算估计梯度
Figure PCTCN2021094746-appb-000122
引入因子K i获取权重因子λ的值并在式(30)基础上求取Hessian阵R i
4) Calculate the estimated gradient according to equations (21) and (22) using the results of the second and third experiments
Figure PCTCN2021094746-appb-000122
The factor K i is introduced to obtain the value of the weight factor λ and the Hessian matrix R i is obtained on the basis of formula (30).
5)判断系统性能优化指标J(ρ i)是否小于J max,若小于则转6)结束,否则重新执行步骤3)。 5) Determine whether the system performance optimization index J(ρ i ) is smaller than J max , if it is smaller, go to 6) to end, otherwise perform step 3).
6)结束;6) end;
为了实现直流电机的调速及正反转,本专利采用了直流电机的典型控制电路——H桥式驱动电路。通过控制MOS管的导通及关断,改变电机电压的大小及电流的方向,实现对于直流电机的控制。In order to realize the speed regulation and forward and reverse rotation of the DC motor, this patent adopts the typical control circuit of the DC motor, the H-bridge drive circuit. By controlling the on and off of the MOS tube, the magnitude of the motor voltage and the direction of the current are changed to realize the control of the DC motor.
旋转倒立摆系统中的摆杆角度及速度的采集通过一款SPI信号发送数据的旋转编码器ETS25。在本次设计中,采用一块STM32最小系统作为中介,即通过STM32板与ETS25通信,再通过RS232串口通信将编码器信号发送给DSPACE。旋转编码器ETS25所使用的SPI信号数据线仅有一根,并需要5V进行上拉以提供高电平,而对于传感器来说属于从设备,因此与STM32单片机的MOSI相连。旋臂角度及速度的获取通过直流电机自带的霍尔传感器进行检测。由于DSPACE上集成了此类传感器的读取程序,因此,对于旋臂角度及速度的读取相对简单。The angle and speed of the pendulum rod in the rotary inverted pendulum system are collected through a rotary encoder ETS25 that transmits data through an SPI signal. In this design, a STM32 minimum system is used as an intermediary, that is, it communicates with ETS25 through the STM32 board, and then sends the encoder signal to DSPACE through RS232 serial communication. There is only one SPI signal data line used by the rotary encoder ETS25, and it needs 5V to be pulled up to provide a high level. For the sensor, it is a slave device, so it is connected to the MOSI of the STM32 microcontroller. The acquisition of the arm angle and speed is detected by the Hall sensor that comes with the DC motor. Since the reading program of this type of sensor is integrated on DSPACE, the reading of the angle and speed of the arm is relatively simple.
图5为DSPACE总体程序设计图,本申请中倒立摆的摆杆初始角度θ 0为0.1rad,PD控制器增益为θ=[150 45],将其作为θ 1,导入基于DSPACE的旋转倒立摆双闭环控制系统中以获取摆杆的轨迹采样数据,并将这些数据在MATLAB中进行离线运算进而更新PD控制器。随着迭代次数逐步增加,在此基础上来检验IFT算法的优化效果。其中迭代数i=1、i=3及i=20的旋转倒立摆摆杆的轨迹如图6(a)所示,并在这些迭代次数下准则函数J(θ i)、k P以及k D的变化情况如图6(b)、(c)、(d)所示,看出随着IFT算法的不断迭代,摆杆角度的控制效果得到了明显的改善,对应的准则函数J(θ i)的变化趋势表明输入输出误差随着迭代进行逐渐减小,PD控制器参数θ i也最终收敛至θ 20=[325 45.7]。进一步为此分别选取λ 1=10 -4和λ 2=10 -5,然后引入随批次变化的辅助因子L i,引入辅助因子L i前后旋转倒立摆跟踪误差为图7所示,旋转倒立摆跟踪误差随着迭代过程的进行稳步下降,并且在引入辅助因子L i后,跟踪误差进一步减小,表明系统 的整体控制性能进一步提升。 Figure 5 is the overall program design diagram of DSPACE. In this application, the initial angle θ 0 of the pendulum of the inverted pendulum is 0.1rad, and the gain of the PD controller is θ=[150 45], which is taken as θ 1 and imported into the rotating inverted pendulum based on DSPACE In the double closed-loop control system, the trajectory sampling data of the pendulum rod is obtained, and these data are processed offline in MATLAB to update the PD controller. As the number of iterations increases gradually, the optimization effect of the IFT algorithm is tested on this basis. The trajectories of the rotating inverted pendulum rod with iteration numbers i=1, i=3 and i=20 are shown in Fig. 6(a), and the criterion functions J(θ i ), k P and k D under these iteration numbers The changes of , are shown in Figure 6(b), (c), (d). It can be seen that with the continuous iteration of the IFT algorithm, the control effect of the pendulum angle has been significantly improved, and the corresponding criterion function J(θ i ) shows that the input and output errors gradually decrease as the iteration progresses, and the PD controller parameter θ i finally converges to θ 20 =[325 45.7]. We were selected for this further [lambda] 1 = 10-4 and λ 2 = 10 -5, and with the introduction of co-factors L i batch change, before and after the introduction of co-factors L i rotary inverted pendulum tracking error is shown in Figure 7, rotation inverted as the pendulum tracking error iterative process steadily decreased, and after the introduction of cofactors L i, to further reduce the tracking error, the control shows that the overall performance of the system is further improved.
以上所述的仅是本申请的优选实施方式,本发明不限于以上实施例。可以理解,本领域技术人员在不脱离本发明的精神和构思的前提下直接导出或联想到的其他改进和变化,均应认为包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present application, and the present invention is not limited to the above embodiments. It can be understood that other improvements and changes directly derived or thought of by those skilled in the art without departing from the spirit and concept of the present invention should be considered to be included within the protection scope of the present invention.

Claims (1)

  1. 一种旋转倒立摆的迭代反馈整定控制及其鲁棒优化方法,其特征在于,所述方法包括:An iterative feedback tuning control of a rotating inverted pendulum and a robust optimization method thereof, characterized in that the method comprises:
    第一步:建立旋转倒立摆的拉格朗日和状态空间模型;Step 1: Establish the Lagrangian and state space models of the rotating inverted pendulum;
    旋转倒立摆系统包括底座、传动装置、摆杆及旋臂,所述底座用于保证所述摆杆摆动时机械结构的稳定;旋臂末端连接所述摆杆,直流电机的旋转通过所述传动装置带动所述摆杆的运动;所述旋臂的角度及角速度则通过所述直流电机自带的增量式旋转编码器获取;通过联轴器连接所述增量式旋转编码器与所述摆杆,带动所述增量式旋转编码器旋转从而获取所述摆杆的角度及角速度;在构建所述旋转倒立摆的动力学模型中,忽略空气阻力、摩擦力及微小项以简化建模过程,把所述旋臂及摆杆视为均匀的长杆,设所述摆杆处于稳定竖立时所述旋转倒立摆系统的势能为零;The rotating inverted pendulum system includes a base, a transmission device, a swing rod and a swing arm. The base is used to ensure the stability of the mechanical structure when the swing rod swings; the end of the swing arm is connected to the swing rod, and the rotation of the DC motor passes through the transmission. The device drives the movement of the pendulum rod; the angle and angular velocity of the arm are obtained through the incremental rotary encoder that comes with the DC motor; the incremental rotary encoder is connected with the The pendulum rod drives the incremental rotary encoder to rotate to obtain the angle and angular velocity of the pendulum rod; in constructing the dynamic model of the rotating inverted pendulum, air resistance, friction force and tiny items are ignored to simplify the modeling In the process, the swing arm and the pendulum rod are regarded as a uniform long rod, and the potential energy of the rotating inverted pendulum system is set to zero when the pendulum rod is in a stable erection;
    所述摆杆偏离直立位置角度α时,所述旋臂通过旋转β带动所述摆杆趋于直立位置,因此旋臂末端速度v m为: When the pendulum rod deviates from the upright position angle α, the swing arm drives the pendulum rod to the upright position by rotating β, so the speed v m of the end of the arm is:
    Figure PCTCN2021094746-appb-100001
    Figure PCTCN2021094746-appb-100001
    其中,r 1为旋臂旋转中心到与摆杆连接点的距离,
    Figure PCTCN2021094746-appb-100002
    为旋臂旋转时角速度;
    Among them, r 1 is the distance from the rotation center of the arm to the connection point with the pendulum rod,
    Figure PCTCN2021094746-appb-100002
    is the angular velocity when the arm rotates;
    由于所述摆杆为均匀长杆,视所述摆杆为一质点则得到摆杆转动速度为v z为: Since the pendulum rod is a uniform long rod, considering the pendulum rod as a mass point, the rotation speed of the pendulum rod v z is obtained as:
    Figure PCTCN2021094746-appb-100003
    Figure PCTCN2021094746-appb-100003
    其中,L为摆杆长度,
    Figure PCTCN2021094746-appb-100004
    为摆杆旋转时角速度;
    Among them, L is the length of the pendulum rod,
    Figure PCTCN2021094746-appb-100004
    is the angular velocity when the pendulum rod rotates;
    将所述摆杆转动速度v z在所述旋臂末端速度v m垂直方向进行分解,并以摆杆旋转平面与地面水平方向速度v r所指方向为正方向,得到: Decompose the rotation speed v z of the swing rod in the vertical direction of the speed v m at the end of the arm, and take the direction of the rotation plane of the swing rod and the speed v r in the horizontal direction of the ground as the positive direction to obtain:
    Figure PCTCN2021094746-appb-100005
    Figure PCTCN2021094746-appb-100005
    Figure PCTCN2021094746-appb-100006
    Figure PCTCN2021094746-appb-100006
    在所述旋臂末端速度v m和地面水平方向速度v r的共同作用下,所述摆杆在水平方向上的速度v b为: Under the combined action of the speed v m at the end of the boom and the speed v r in the horizontal direction of the ground , the speed v b of the pendulum rod in the horizontal direction is:
    Figure PCTCN2021094746-appb-100007
    Figure PCTCN2021094746-appb-100007
    所述摆杆的动能包含有旋转产生的转动动能以及在水平方向上移动产生的动能,另外所述旋转倒立摆系统整体动能还包含有所述直流电机带动的所述旋臂 的动能,因此得到所述旋转倒立摆系统的整体动能V,令J 1为摆杆的转动惯量,J 2为旋臂的转动惯量,m为摆杆质量,并将式(4)及(5)带入得到: The kinetic energy of the pendulum rod includes the rotational kinetic energy generated by rotation and the kinetic energy generated by moving in the horizontal direction. In addition, the overall kinetic energy of the rotating inverted pendulum system also includes the kinetic energy of the arm driven by the DC motor. Therefore, we obtain The overall kinetic energy V of the rotating inverted pendulum system, let J 1 be the moment of inertia of the pendulum rod, J 2 be the moment of inertia of the swing arm, m is the mass of the pendulum rod, and the equations (4) and (5) are brought in to obtain:
    Figure PCTCN2021094746-appb-100008
    Figure PCTCN2021094746-appb-100008
    所述摆杆直立时设为零势能点,H为所述旋转倒立摆系统整体势能,E为拉格朗日函数,则偏转α角度后势能降为:The pendulum rod is set as the zero potential energy point when it is upright, H is the overall potential energy of the rotating inverted pendulum system, E is the Lagrangian function, then the potential energy after the deflection angle α is reduced to:
    Figure PCTCN2021094746-appb-100009
    Figure PCTCN2021094746-appb-100009
    拉格朗日函数E为:The Lagrangian function E is:
    Figure PCTCN2021094746-appb-100010
    Figure PCTCN2021094746-appb-100010
    可知旋臂旋转带动所述摆杆运动,无外界能力输入,令T output为电机输出转矩,B eq为等效粘性摩擦,得到拉格朗日方程为: It can be seen that the rotation of the swing arm drives the movement of the pendulum rod, and there is no external power input, let T output be the output torque of the motor, and B eq be the equivalent viscous friction, and the Lagrangian equation can be obtained as:
    Figure PCTCN2021094746-appb-100011
    Figure PCTCN2021094746-appb-100011
    Figure PCTCN2021094746-appb-100012
    Figure PCTCN2021094746-appb-100012
    式(8)带入式(9)及(10)得到旋转倒立摆的非线性模型:Equation (8) is brought into equations (9) and (10) to obtain the nonlinear model of the rotating inverted pendulum:
    Figure PCTCN2021094746-appb-100013
    Figure PCTCN2021094746-appb-100013
    从在式(11)得到的所述旋转倒立摆的非线性模型中,其输入为直流电机转矩,但通常情况下以直流电机电压为控制输入,因此接下来对所述直流电机进行建模,最终建立以所述直流电机电压为输入的倒立摆非线性模型;In the nonlinear model of the rotating inverted pendulum obtained from equation (11), its input is the DC motor torque, but usually the DC motor voltage is used as the control input, so the DC motor is modeled next , and finally establish an inverted pendulum nonlinear model with the DC motor voltage as the input;
    令I d为直流电机电流,E d为反电动势,并考虑所述传动装置的效率和齿轮比值,K T为电机转矩系数,K E为电机转速系数,K g为旋臂与直流电机的齿轮比,η g为齿轮传动效率,η d为电机效率,U为所述直流电机电压,R为电枢电阻,得到: So as DC current I d, E d is the counter electromotive force, and taking into account the efficiency of the transmission gear ratio, K T is the motor torque coefficient, K E of the motor-speed coefficient, K g is the arm with the DC motor Gear ratio, η g is the gear transmission efficiency, η d is the motor efficiency, U is the voltage of the DC motor, R is the armature resistance, obtain:
    Figure PCTCN2021094746-appb-100014
    Figure PCTCN2021094746-appb-100014
    T output=η dη gK gK TI d  (13) T output = η d η g K g K T I d (13)
    将式(12)、(13)带入式(11)中,得到以所述直流电机电压为输入的所述倒立摆非线性模型为:Putting equations (12) and (13) into equation (11), the nonlinear model of the inverted pendulum with the DC motor voltage as the input is obtained as:
    Figure PCTCN2021094746-appb-100015
    Figure PCTCN2021094746-appb-100015
    为了进一步建立旋转倒立摆的状态空间模型,需要将所述倒立摆非线性模型进行线性化,注意到所述摆杆在稳摆控制中处于直立状态,因此摆杆角度较小,此时存在sinα≈α,cosα≈1,则得到旋转倒立摆线性模型为:In order to further establish the state space model of the rotating inverted pendulum, the nonlinear model of the inverted pendulum needs to be linearized. It is noted that the pendulum rod is in an upright state in the stable pendulum control, so the angle of the pendulum rod is small, and sinα exists at this time. ≈α, cosα≈1, then the linear model of the rotating inverted pendulum is obtained as:
    Figure PCTCN2021094746-appb-100016
    Figure PCTCN2021094746-appb-100016
    接下来以所述旋转倒立摆线性模型为基础来建立所述旋转倒立摆的状态空间模型,为了简化书写设置如下定义:Next, the state space model of the rotating inverted pendulum is established based on the linear model of the rotating inverted pendulum. In order to simplify the writing settings, the following definitions are made:
    Figure PCTCN2021094746-appb-100017
    Figure PCTCN2021094746-appb-100017
    Figure PCTCN2021094746-appb-100018
    Figure PCTCN2021094746-appb-100018
    Figure PCTCN2021094746-appb-100019
    Figure PCTCN2021094746-appb-100019
    Figure PCTCN2021094746-appb-100020
    Figure PCTCN2021094746-appb-100020
    Figure PCTCN2021094746-appb-100021
    Figure PCTCN2021094746-appb-100021
    Figure PCTCN2021094746-appb-100022
    Figure PCTCN2021094746-appb-100022
    将式(16)至(21)带入式(15)解得
    Figure PCTCN2021094746-appb-100023
    Figure PCTCN2021094746-appb-100024
    为:
    Substituting equations (16) to (21) into equation (15) to solve
    Figure PCTCN2021094746-appb-100023
    and
    Figure PCTCN2021094746-appb-100024
    for:
    Figure PCTCN2021094746-appb-100025
    Figure PCTCN2021094746-appb-100025
    Figure PCTCN2021094746-appb-100026
    Figure PCTCN2021094746-appb-100026
    选取状态向量
    Figure PCTCN2021094746-appb-100027
    其中β为旋臂旋转角度,输入为所述直流电机电压U,得到所述旋转倒立摆的状态空间模型为:
    select state vector
    Figure PCTCN2021094746-appb-100027
    Where β is the rotation angle of the arm, the input is the DC motor voltage U, and the state space model of the rotating inverted pendulum is obtained as:
    Figure PCTCN2021094746-appb-100028
    Figure PCTCN2021094746-appb-100028
    其中由于所述摆杆及旋臂视为均匀长杆,则其转动惯量J 1、J 2可以得出: Since the pendulum rod and the swing arm are regarded as uniform long rods, the moment of inertia J 1 and J 2 can be obtained as follows:
    Figure PCTCN2021094746-appb-100029
    Figure PCTCN2021094746-appb-100029
    其中,r 2为旋臂长度,M旋臂质量,ρ为旋臂和摆杆的密度; Among them, r 2 is the length of the arm, M is the mass of the arm, and ρ is the density of the arm and the pendulum;
    第二步:设计旋转倒立摆迭代反馈整定双闭环控制器;Step 2: Design a rotating inverted pendulum iterative feedback tuning double closed-loop controller;
    针对所述旋转倒立摆的状态空间模型设计所述双闭环控制器,使用迭代反馈整定算法优化角度PD控制器参数,若C(ρ)=[C r(ρ) C y(ρ)],C r(ρ)、C y(ρ)是线性时不变传递函数,G是被控对象的传递函数,u(t)是控制器输出,r(t)是参考输入,y(t)是所述旋转倒立摆系统输出,v(t)是均值为零的外部随机扰动,PID控制器参数为ρ=[K p K d],在此基础上反馈控制系统作用下的响应输出为: The double closed-loop controller is designed according to the state space model of the rotating inverted pendulum, and the parameters of the angle PD controller are optimized using an iterative feedback tuning algorithm. If C(ρ)=[C r (ρ) C y (ρ)], C r (ρ), C y (ρ) are linear time-invariant transfer functions, G is the transfer function of the controlled object, u(t) is the controller output, r(t) is the reference input, and y(t) is the The output of the rotating inverted pendulum system, v(t) is an external random disturbance with a mean value of zero, and the PID controller parameter is ρ=[K p K d ]. On this basis, the response output under the action of the feedback control system is:
    Figure PCTCN2021094746-appb-100030
    Figure PCTCN2021094746-appb-100030
    为了简化书写,将T 0(ρ)、S 0(ρ)简写为T 0、S 0,定义y d是给定的期望输入信号,则期望输出与实际输出之间的跟踪误差为: In order to simplify the writing, T 0 (ρ) and S 0 (ρ) are abbreviated as T 0 and S 0 , and y d is defined as a given expected input signal, then the tracking error between the expected output and the actual output is:
    Figure PCTCN2021094746-appb-100031
    Figure PCTCN2021094746-appb-100031
    对于控制器参数为ρ的固定结构PID控制器,通过最小化
    Figure PCTCN2021094746-appb-100032
    以改善所述反馈控制系统的跟踪控制效果,定义性能优化指标函数J(ρ)为:
    For a fixed-structure PID controller with controller parameter ρ, by minimizing
    Figure PCTCN2021094746-appb-100032
    In order to improve the tracking control effect of the feedback control system, the performance optimization index function J(ρ) is defined as:
    Figure PCTCN2021094746-appb-100033
    Figure PCTCN2021094746-appb-100033
    其中L y、L u表示基于时间序列的滤波器,通常L y=L u=1,采样点个数为N,性能度量的权重因子为λ;IFT算法是通过最小化所述性能优化指标函数J(ρ)直接求得系统的所述PID控制器参数ρ,然后通过i次迭代逐步获取所述PID控制器参数ρ的最优值,ρ i为ρ在第i次迭代中的值,在每个迭代批次中,变量y(ρ i)和u(ρ i)关于控制器参数ρ i的偏导数为: Wherein Ly and Lu represent filters based on time series, usually Ly = Lu =1, the number of sampling points is N, and the weight factor of the performance measurement is λ; the IFT algorithm is to optimize the index function by minimizing the performance J(ρ) directly obtains the PID controller parameter ρ of the system, and then gradually obtains the optimal value of the PID controller parameter ρ through i iterations, where ρ i is the value of ρ in the ith iteration, where In each iteration batch, the partial derivatives of the variables y(ρ i ) and u(ρ i ) with respect to the controller parameter ρ i are:
    Figure PCTCN2021094746-appb-100034
    Figure PCTCN2021094746-appb-100034
    Figure PCTCN2021094746-appb-100035
    Figure PCTCN2021094746-appb-100035
    所述IFT算法通过在自由度控制系统中进行三次实验,以获得T 0r,T 0(r-y)的估计值,在三次实验中,前两次用来估计信号T 0,首先在第i次迭代中,第一次实验以r i (1)=r为输入的参考信号,y (1)i)为采样得到的控制系统的输出值;其次,以两信号差值r-y (1)i)为第二次实验输入的参考信号r i (2),采样得到y (2)i): The IFT algorithm is obtained by conducting three experiments in the DOF control system to obtain the estimated value of T 0 r, T 0 (ry), in the three experiments, the first two are used to estimate the signal T 0 , first in the ith time In the iteration, the first experiment takes r i (1) = r as the input reference signal, y (1)i ) is the output value of the control system obtained by sampling; secondly, the difference between the two signals ry (1)i) for the second reference input signal experiment r i (2), obtained by sampling y (2) (ρ i) :
    Figure PCTCN2021094746-appb-100036
    Figure PCTCN2021094746-appb-100036
    Figure PCTCN2021094746-appb-100037
    Figure PCTCN2021094746-appb-100037
    第三次实验用来估计信号T 0r,以r i (3)=r作为输入的参考信号: The third test signal used to estimate T 0 r, to r i (3) = r as the reference signal input:
    Figure PCTCN2021094746-appb-100038
    Figure PCTCN2021094746-appb-100038
    根据三次实验的控制器输出值以及所述旋转倒立摆系统输出值得到
    Figure PCTCN2021094746-appb-100039
    的无偏估计,同理
    Figure PCTCN2021094746-appb-100040
    可以也得到:
    According to the controller output value of the three experiments and the output value of the rotating inverted pendulum system, the
    Figure PCTCN2021094746-appb-100039
    unbiased estimate of
    Figure PCTCN2021094746-appb-100040
    You can also get:
    Figure PCTCN2021094746-appb-100041
    Figure PCTCN2021094746-appb-100041
    基于实验数据的第i次迭代的所述性能优化指标函数J(ρ i)的估计梯度为: The estimated gradient of the performance optimization index function J(ρ i ) based on the ith iteration of the experimental data is:
    Figure PCTCN2021094746-appb-100042
    Figure PCTCN2021094746-appb-100042
    根据所述性能优化指标函数J(ρ i)的估计梯度以及上一次迭代的所述PID控制器参数ρ i使用Gauss–Newton算法计算下一次迭代更新的ρ i+1According to the estimated gradient of the performance optimization index function J(ρ i ) and the PID controller parameters ρ i of the previous iteration, the Gauss-Newton algorithm is used to calculate the updated ρ i+1 of the next iteration:
    Figure PCTCN2021094746-appb-100043
    Figure PCTCN2021094746-appb-100043
    其中γ i>0表示步长,R i为正定Hessian矩阵表示优化搜索方向: where γ i > 0 represents the step size, and R i is a positive definite Hessian matrix to represent the optimization search direction:
    Figure PCTCN2021094746-appb-100044
    Figure PCTCN2021094746-appb-100044
    第三步:迭代反馈整定角度PD控制器的收敛性分析;Step 3: Convergence analysis of iterative feedback setting angle PD controller;
    为保证算法的收敛性,条件1是保证所述性能优化指标函数的估计梯度是无偏的,条件2是步长序列γ i要求能够收敛到零,为了保证条件1,由式(18)到(20)得到
    Figure PCTCN2021094746-appb-100045
    为:
    In order to ensure the convergence of the algorithm, Condition 1 is to ensure that the estimated gradient of the performance optimization index function is unbiased, and Condition 2 is that the step sequence γ i is required to converge to zero. In order to ensure Condition 1, from equation (18) to (20) get
    Figure PCTCN2021094746-appb-100045
    for:
    Figure PCTCN2021094746-appb-100046
    Figure PCTCN2021094746-appb-100046
    基于所述IFT算法的实验中设定三次实验的v i (m),m=1,2,3是同一系统相互独立的零均值有界随机噪声,即|v i (m)|<C,其中假设三次实验中界限值C和随机噪声的均方值保持不变,则得到式(21)和(22)的无偏估计; The set of three experiments IFT experiments based algorithm v i (m), m = 1,2,3 is the same system independent zero-mean random noise bounded, i.e. | v i (m) | < C, Assuming that the limit value C and the mean square value of random noise in the three experiments remain unchanged, the unbiased estimates of equations (21) and (22) are obtained;
    条件2需要保证算法收敛的条件通常要求所述步长序列γ i的所有元素满足: Condition 2 The conditions that need to ensure the convergence of the algorithm usually require that all elements of the step sequence γ i satisfy:
    Figure PCTCN2021094746-appb-100047
    Figure PCTCN2021094746-appb-100047
    第四步:鲁棒迭代反馈整定角度PD控制器的进一步优化;The fourth step: further optimization of the robust iterative feedback setting angle PD controller;
    所述IFT算法依靠经验选择如λ一类的权重值,但由于各个所述性能度量之间的物理意义并不相同,运行环境也不尽一致,它们之间的取值范围相差巨大,因此若同时控制多个相同系统,依靠经验选择的所述性能度量的权重因子λ并不具有普适性,考虑各个所述性能度量之间的取值范围,构建了一个辅助因子L i,所述辅助因子L i为所述性能度量之间的取值范围之比: The IFT algorithm relies on experience to select weight values such as λ. However, because the physical meanings of the performance metrics are not the same, and the operating environments are not consistent, the value ranges between them vary greatly. Therefore, if simultaneously controlling a plurality of the same system, the right to rely on the experience of the selected performance metric is not weighting factor λ is universal, considering the range between each of the performance metric to build a cofactor L i, the auxiliary factor L i is the ratio between the range of performance metrics:
    Figure PCTCN2021094746-appb-100048
    Figure PCTCN2021094746-appb-100048
    在此基础上准则函数J(θ)修改为:On this basis, the criterion function J(θ) is modified as:
    Figure PCTCN2021094746-appb-100049
    Figure PCTCN2021094746-appb-100049
    其中,
    Figure PCTCN2021094746-appb-100050
    为跟踪误差,u(θ i)为控制器输出,
    in,
    Figure PCTCN2021094746-appb-100050
    is the tracking error, u(θ i ) is the controller output,
    Figure PCTCN2021094746-appb-100051
    和近似Hessian矩阵R i修改为:
    and
    Figure PCTCN2021094746-appb-100051
    And the approximate Hessian matrix R i is modified as:
    Figure PCTCN2021094746-appb-100052
    Figure PCTCN2021094746-appb-100052
    Figure PCTCN2021094746-appb-100053
    Figure PCTCN2021094746-appb-100053
    式中y d,max和y d,min为期望输出的最大值与最小值,u max和u min表示第i次迭代过程中控制信号在所有N个采样点中的最大值与最小值;由于这些值都是在每次迭代结束时给出,所有的采样点都会被考虑在内,因而引入所述辅助因子L i使得所述权重因子λ在不同系统中都代表了当前迭代优化后
    Figure PCTCN2021094746-appb-100054
    与u(θ i)权重比的最佳范围。
    where y d,max and y d,min are the maximum and minimum values of the expected output, and u max and u min represent the maximum and minimum values of the control signal in all N sampling points during the ith iteration; since these values are given at the end of each iteration, all the sample points will be taken into account, and thus the introduction of the co-factor L i such that the weighting factor λ in different systems are optimized represents the current iteration
    Figure PCTCN2021094746-appb-100054
    Optimal range of weight ratios to u(θ i ).
PCT/CN2021/094746 2020-07-14 2021-05-20 Iterative feedback tuning control for rotating inverted pendulum and robust optimisation method therefor WO2022012156A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010674033.XA CN111736471B (en) 2020-07-14 2020-07-14 Iterative feedback setting control and robust optimization method of rotary inverted pendulum
CN202010674033.X 2020-07-14

Publications (1)

Publication Number Publication Date
WO2022012156A1 true WO2022012156A1 (en) 2022-01-20

Family

ID=72654521

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/094746 WO2022012156A1 (en) 2020-07-14 2021-05-20 Iterative feedback tuning control for rotating inverted pendulum and robust optimisation method therefor

Country Status (2)

Country Link
CN (1) CN111736471B (en)
WO (1) WO2022012156A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114625011A (en) * 2022-03-23 2022-06-14 合肥工业大学 Robust control method for wireless communication reliability of power distribution network
CN115356932A (en) * 2022-08-26 2022-11-18 中国地质大学(武汉) Servo control system and feedforward controller parameter setting method
CN115598967A (en) * 2022-11-01 2023-01-13 南栖仙策(南京)科技有限公司(Cn) Parameter setting model training method, parameter determining method, device, equipment and medium
CN117369246A (en) * 2023-12-07 2024-01-09 济南大学 Optimal robust control method based on electronic resistance high-level pull-down device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111736471B (en) * 2020-07-14 2021-06-15 江南大学 Iterative feedback setting control and robust optimization method of rotary inverted pendulum
CN111580392B (en) * 2020-07-14 2021-06-15 江南大学 Finite frequency range robust iterative learning control method of series inverted pendulum
CN113625568A (en) * 2021-08-11 2021-11-09 上海交通大学 Inverted pendulum passive self-adaptive sliding mode control method based on generalized system model

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080133053A1 (en) * 2006-11-29 2008-06-05 Honda Motor Co., Ltd. Determination of Foot Placement for Humanoid Push Recovery
CN101866144A (en) * 2010-06-29 2010-10-20 北京航空航天大学 Furuta pendulum intelligent control method based on ITAE
JP2011014100A (en) * 2009-07-06 2011-01-20 Toyota Central R&D Labs Inc Inverted pendulum type mobile body and control method for the same
CN109407513A (en) * 2018-12-14 2019-03-01 江南大学 The tracking and controlling method based on Iterative feedback tuning of joint actuated by pneumatic muscles
CN110134011A (en) * 2019-04-23 2019-08-16 浙江工业大学 A kind of inverted pendulum adaptive iteration study back stepping control method
CN111736471A (en) * 2020-07-14 2020-10-02 江南大学 Iterative feedback setting control and robust optimization method of rotary inverted pendulum

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101673354A (en) * 2009-06-12 2010-03-17 北京工业大学 Operant conditioning reflex automatic machine and application thereof in control of biomimetic autonomous learning
CN103823379B (en) * 2014-02-28 2017-06-13 北京理工大学 High-frequency angular oscillation turntable sliding-mode control based on iterative learning
EP3112959B1 (en) * 2015-06-29 2021-12-22 SUEZ Groupe Method for detecting anomalies in a water distribution system
CN105334739B (en) * 2015-12-04 2017-12-19 东北大学 The whole network control methods of FAST based on iterative learning p-type law of learning
CN107561929B (en) * 2017-07-25 2020-01-14 北京理工大学 Model-free robust adaptive optimization method for servo system
CN108107720B (en) * 2017-11-23 2021-03-16 中国南方电网有限责任公司 Water turbine speed regulator parameter setting method and system based on state space analysis
US10522036B2 (en) * 2018-03-05 2019-12-31 Nec Corporation Method for robust control of a machine learning system and robust control system
CN109856968B (en) * 2018-09-19 2022-11-08 湘潭大学 Inverted pendulum system improved active disturbance rejection control method based on phase plane fuzzy self-adjustment
US11007642B2 (en) * 2018-10-23 2021-05-18 X Development Llc Machine learning methods and apparatus for automated robotic placement of secured object in appropriate location
CN109709802B (en) * 2018-12-14 2020-06-16 江南大学 Control method of active electronic ladder circuit based on iterative learning control

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080133053A1 (en) * 2006-11-29 2008-06-05 Honda Motor Co., Ltd. Determination of Foot Placement for Humanoid Push Recovery
JP2011014100A (en) * 2009-07-06 2011-01-20 Toyota Central R&D Labs Inc Inverted pendulum type mobile body and control method for the same
CN101866144A (en) * 2010-06-29 2010-10-20 北京航空航天大学 Furuta pendulum intelligent control method based on ITAE
CN109407513A (en) * 2018-12-14 2019-03-01 江南大学 The tracking and controlling method based on Iterative feedback tuning of joint actuated by pneumatic muscles
CN110134011A (en) * 2019-04-23 2019-08-16 浙江工业大学 A kind of inverted pendulum adaptive iteration study back stepping control method
CN111736471A (en) * 2020-07-14 2020-10-02 江南大学 Iterative feedback setting control and robust optimization method of rotary inverted pendulum

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114625011A (en) * 2022-03-23 2022-06-14 合肥工业大学 Robust control method for wireless communication reliability of power distribution network
CN114625011B (en) * 2022-03-23 2024-04-02 合肥工业大学 Robust control method for wireless communication reliability of power distribution network
CN115356932A (en) * 2022-08-26 2022-11-18 中国地质大学(武汉) Servo control system and feedforward controller parameter setting method
CN115598967A (en) * 2022-11-01 2023-01-13 南栖仙策(南京)科技有限公司(Cn) Parameter setting model training method, parameter determining method, device, equipment and medium
CN115598967B (en) * 2022-11-01 2023-12-08 南栖仙策(南京)高新技术有限公司 Parameter setting model training, parameter determining method, device, equipment and medium
CN117369246A (en) * 2023-12-07 2024-01-09 济南大学 Optimal robust control method based on electronic resistance high-level pull-down device
CN117369246B (en) * 2023-12-07 2024-02-13 济南大学 Optimal robust control method based on electronic resistance high-level pull-down device

Also Published As

Publication number Publication date
CN111736471A (en) 2020-10-02
CN111736471B (en) 2021-06-15

Similar Documents

Publication Publication Date Title
WO2022012156A1 (en) Iterative feedback tuning control for rotating inverted pendulum and robust optimisation method therefor
Akhtaruzzaman et al. Modeling and control of a rotary inverted pendulum using various methods, comparative assessment and result analysis
CN106325073B (en) Position Closed Loop for Servo System IP controller model-free automatic correcting method based on fractional order
CN105867136A (en) Parameter identification based multi-motor servo system synchronization and tracking control method
CN102354107B (en) On-line identification and control method for parameter of alternating current position servo system model
CN102385342B (en) Self-adaptation dynamic sliding mode controlling method controlled by virtual axis lathe parallel connection mechanism motion
CN107263481B (en) A kind of class brain learning control method of multi-freedom robot
CN110739893A (en) improved self-adaptive trackless Kalman filtering rotational inertia identification method
CN103197562A (en) Rotary-table servo system neural network control method
CN105888971B (en) A kind of large scale wind power machine blade active load shedding control system and method
CN106100469B (en) Implementation method based on adaptive motor servo system robust position controller
Hu et al. Modified linear active disturbance rejection control for uncertain robot manipulator trajectory tracking
CN110456641A (en) Pre-determined characteristics Recognition with Recurrent Neural Network Mechanical arm control method when a kind of fixed
CN114578697B (en) Multi-constraint self-adaptive control method of motor-driven manipulator
TWI469501B (en) A controlling method of synchronous reluctance motor
CN110842911B (en) Flexible mechanical arm combined modeling and sliding mode control method considering joint motor characteristics
CN115890668A (en) Distributed optimization learning control method and system for robot joint module
CN109884881A (en) A kind of design for surely taking aim at servo controller based on nonlinear PID controller technology
CN116638544A (en) Joint module cooperative control method based on super local model
Yu et al. The Global Control of First Order Rotary Parallel Double Inverted Pendulum System
CN116736748A (en) Method for constructing controller of robot and robot
CN114665766A (en) Permanent magnet synchronous motor force and position hybrid control system based on load moment estimation
CN107728470B (en) Mechanical arm attitude control method without speed measurement
Zhao et al. Design of MRAC and Modified MRAC for the Turntable
CN111590561A (en) Robustness preset performance control method for distributed mechanical arm system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21841821

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21841821

Country of ref document: EP

Kind code of ref document: A1