CN114594675B - Four-rotor aircraft control system and method with improved PID - Google Patents
Four-rotor aircraft control system and method with improved PID Download PDFInfo
- Publication number
- CN114594675B CN114594675B CN202210216326.2A CN202210216326A CN114594675B CN 114594675 B CN114594675 B CN 114594675B CN 202210216326 A CN202210216326 A CN 202210216326A CN 114594675 B CN114594675 B CN 114594675B
- Authority
- CN
- China
- Prior art keywords
- coordinate system
- attitude
- aircraft
- control
- pid
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B11/00—Automatic controllers
- G05B11/01—Automatic controllers electric
- G05B11/36—Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential
- G05B11/42—Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential for obtaining a characteristic which is both proportional and time-dependent, e.g. P. I., P. I. D.
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
Abstract
本发明涉及飞行器控制技术领域,尤其涉及一种改进型PID的四旋翼飞行器控制系统及方法。本发明提供一种改进型PID的四旋翼飞行器控制系统及方法,包括有飞行姿态检测模块、无线通信模块和控制模块;飞行姿态检测模块包括加速度传感器、陀螺仪、磁力计、气压高度计和北斗定位系统;所述北斗定位系统用以测定大地坐标系和飞行器坐标系;无线通信模块传输信息数据;控制模块进行姿态数据运算并以PWM方式驱动飞行电机。依据四旋翼飞行器姿态微机电检测系统的实时数据采集和四元数精算预估,使姿态角数据解算过程具有较高的运算精度和自适应性。
The present invention relates to the field of aircraft control technology, and in particular to an improved PID quadcopter control system and method. The present invention provides an improved PID quadcopter control system and method, comprising a flight attitude detection module, a wireless communication module and a control module; the flight attitude detection module comprises an acceleration sensor, a gyroscope, a magnetometer, a barometric altimeter and a Beidou positioning system; the Beidou positioning system is used to measure the earth coordinate system and the aircraft coordinate system; the wireless communication module transmits information data; the control module performs attitude data calculation and drives the flight motor in a PWM mode. Based on the real-time data acquisition and quaternion actuation estimation of the quadcopter attitude micro-electromechanical detection system, the attitude angle data solution process has higher calculation accuracy and adaptability.
Description
技术领域Technical Field
本发明涉及飞行器控制技术领域,尤其涉及一种改进型PID的四旋翼飞行器控制系统及方法。The present invention relates to the technical field of aircraft control, and in particular to an improved PID quadrotor aircraft control system and method.
背景技术Background technique
传统的PID针对变化信号的变化率只能是常数,为“斜坡信号”,当变化率仍是时间的函数时,由于我们的控制器里的微分项只有一个一阶微分,则求导后还是变化的信号,传统的PID就无法处理了。另外它是一种线性控制器,所以只能对某个平衡点及其邻域使用,但是现实系统都有非线性,强耦合的特征,一旦邻域超出,系统就会崩溃。The traditional PID can only make the rate of change of the changing signal a constant, which is a " ramp signal ". When the rate of change is still a function of time, since the differential term in our controller is only a first-order differential, the signal after differentiation is still a changing signal, and the traditional PID cannot handle it. In addition, it is a linear controller , so it can only be used for a certain equilibrium point and its neighborhood, but the real system has nonlinear and strong coupling characteristics. Once the neighborhood is exceeded, the system will collapse.
为了解决传统PID控制对参数整调的复杂条件和被控对象复杂化以及适应性差的问题,以及较弱的鲁棒性,是目前亟待解决的技术问题。In order to solve the problems of complex conditions for parameter adjustment and complexity of controlled objects, poor adaptability, and weak robustness of traditional PID control, it is a technical problem that needs to be solved urgently.
发明内容Summary of the invention
为了克服传统PID控制适应性差、较弱的鲁棒性的缺点,本发明的技术问题是:提供一种改进型PID的四旋翼飞行器控制系统及方法。In order to overcome the shortcomings of poor adaptability and weak robustness of traditional PID control, the technical problem of the present invention is to provide an improved PID quadrotor aircraft control system and method.
本发明的技术实施方案为:一种改进型PID的四旋翼飞行器控制系统,包括:飞行姿态检测模块、无线通信模块和控制模块;飞行姿态检测模块包括加速度传感器、陀螺仪、磁力计、气压高度计和北斗定位系统;所述北斗定位系统用以测定大地坐标系和飞行器坐标系;无线通信模块传输信息数据;控制模块进行姿态数据运算并以PWM方式驱动飞行电机。The technical implementation scheme of the present invention is: an improved PID quadcopter control system, comprising: a flight attitude detection module, a wireless communication module and a control module; the flight attitude detection module comprises an acceleration sensor, a gyroscope, a magnetometer, a barometric altimeter and a Beidou positioning system; the Beidou positioning system is used to measure the earth coordinate system and the aircraft coordinate system; the wireless communication module transmits information data; the control module performs attitude data calculations and drives the flight motor in a PWM manner.
一种改进型PID的四旋翼飞行器控制方法,包括:An improved PID quadrotor control method, comprising:
S1)坐标系的建立与姿态表示;地理坐标系(Xg,Yg,Zg)用以描述飞行器相对地面的位置及姿态、机体坐标系(Xb,Yb,Zb)是无人机惯性导航的基础坐标系;S1) Establishment of coordinate system and attitude expression; the geographic coordinate system (X g , Y g , Z g ) is used to describe the position and attitude of the aircraft relative to the ground, and the body coordinate system (X b , Y b , Z b ) is the basic coordinate system for UAV inertial navigation;
地理坐标系可通过分别转动θ,γ,与机体坐标系重合,其姿态表示为:旋转矩阵只需更新/>便可实时计算θ,γ,/>旋转矩阵/>可通过求解四元数得到。The geographic coordinate system can be obtained by rotating θ, γ, Coincident with the body coordinate system, its posture is expressed as: rotation matrix Just update /> Then the real-time calculation of θ, γ, /> Rotation Matrix/> It can be obtained by solving the quaternion.
S2)加速度传感器数据采集;加速度传感器进行测量时重力惯性质量R的三轴分量记为Rx、Ry、Rz;S2) Acceleration sensor data acquisition; when the acceleration sensor is measuring, the three-axis components of the gravitational inertial mass R are recorded as Rx, Ry, and Rz;
重力加速度与三个坐标轴之间的夹角记为α、β、γ。The angles between the gravitational acceleration and the three coordinate axes are denoted as α, β, and γ.
S3)陀螺仪数据采集;测量某一段时间内角度的变化率,由初识状态角度与积分后的角度进行相加得出增量后旋转角度θ;S3) Gyroscope data acquisition: measuring the rate of change of the angle within a certain period of time, and adding the initial state angle and the integrated angle to obtain the incremental rotation angle θ;
并建立陀螺仪随机漂移数学模型,一阶Auto-Recessive(AR)模型:And establish the gyroscope random drift mathematical model, the first-order Auto-Recessive (AR) model:
Xt=αiXt-1+εt。 Xt = αiXt -1 + εt .
S4)磁力计数据采集;航向角为磁力计用测量信息在水平方向上的分量求得。S4) Magnetometer data acquisition; heading angle It is obtained by measuring the horizontal component of the magnetometer information.
S5)卡尔曼滤波器设计;在陀螺仪噪声估计,一阶(AR)模型的基础上,设计卡尔曼滤波器对陀螺仪输出角速率进行补偿;S5) Kalman filter design: Based on the gyroscope noise estimation and the first-order (AR) model, a Kalman filter is designed to compensate the gyroscope output angular rate;
卡尔曼滤波估计可分为两个阶段,:预测和更新;Kalman filter estimation can be divided into two stages: prediction and update;
预测: predict:
更新: renew:
S6)通过采用四元数进行姿态解算旋转矩阵,根据陈孟元等的推论已给出其解算的结果,并将新四元数转化为三个欧拉角,从而获得飞行姿态角θ,γ;S6) By using quaternions to solve the attitude rotation matrix, the result of the solution has been given according to the inference of Chen Mengyuan et al., and the new quaternion is converted into three Euler angles to obtain the flight attitude angle θ, γ;
S7)基于姿态检测与改进型PID的四旋翼飞行器控制器设计。S7) Design of a quadrotor controller based on attitude detection and improved PID.
S7)步骤如下:S7) The steps are as follows:
1)将飞行器的控制过程中的微分项改进为以临界阻尼状态的自由振动微分方程; 1) Improve the differential term in the control process of the aircraft into a free vibration differential equation in a critical damping state;
根据该系统的刚度和质量,将固有频率表示出来;The natural frequencies are expressed according to the stiffness and mass of the system;
将零时刻的初始条件带入到系统的自由振动微分方程当中,由此得出振幅和初相位的表达式:Substituting the initial condition at time zero into the free vibration differential equation of the system, the expressions of amplitude and initial phase are obtained:
Xt=Asin(ω0t+δ)。 Xt = Asin( ω0t +δ).
2)改进型PID控制器由比例单元、积分单元和改进后的振动微分单元组成,以T为采样周期,Ti为积分周期,Td为微分周期,n为采样序号,则改进型PID算法可表示为:2) The improved PID controller consists of a proportional unit, an integral unit and an improved vibration differential unit. With T as the sampling period, Ti as the integral period, Td as the differential period, and n as the sampling number, the improved PID algorithm can be expressed as:
本发明的有益效果是:The beneficial effects of the present invention are:
1.依据四旋翼飞行器姿态微机电检测系统的实时数据采集和四元数精算预估,使姿态角数据解算过程具有较高的运算精度和自适应性。1. Based on the real-time data collection and quaternion calculation estimation of the attitude micro-electromechanical detection system of the quadrotor aircraft, the attitude angle data calculation process has higher calculation accuracy and adaptability.
2.将飞行器的PID控制算法中的微分项改进为以临界阻尼状态的自由振动微分方程,再进行解耦运算,减小系统超调量,使其具有较强的鲁棒性。2. Improve the differential term in the aircraft's PID control algorithm into a free vibration differential equation in a critical damping state, and then perform decoupling operations to reduce the system overshoot and make it more robust.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本发明的四旋翼飞行器坐标原理与姿态表示示意图。FIG1 is a schematic diagram showing the coordinate principle and attitude representation of a quadrotor aircraft of the present invention.
图2为本发明的改进型PID微分项的算法框图。FIG. 2 is an algorithm block diagram of the improved PID differential term of the present invention.
图3为本发明在飞行试验中的横滚角曲线图。FIG. 3 is a roll angle curve diagram of the present invention in a flight test.
图4为本发明在飞行试验的俯仰角曲线图。FIG. 4 is a pitch angle curve diagram of the present invention during a flight test.
图5为本发明在飞行试验的横滚角误差曲线图。FIG. 5 is a graph showing the roll angle error of the present invention during a flight test.
图6为本发明在飞行试验的俯仰角误差曲线图。FIG. 6 is a pitch angle error curve diagram of the present invention in a flight test.
具体实施方式Detailed ways
下面将对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
实施例Example
本发明根据现有飞行器硬件搭建模式出发,从飞行姿态微机电检测、改进型PID控制和临界阻尼自由振动微分方程解算等三个方面进行描述:The present invention is based on the existing aircraft hardware construction mode and is described from three aspects: flight attitude micro-electromechanical detection, improved PID control and critical damping free vibration differential equation solution:
1.建立四旋翼飞行器姿态微机电检测系统;1. Establish a micro-electromechanical detection system for the attitude of a quadrotor aircraft;
2.依据微机电实时数据采集和四元数精算预估,以改进型PID方法来设计出控制器,使其具有较高的运算精度和较强的鲁棒性。2. Based on micro-electromechanical real-time data acquisition and quaternion precise estimation, the controller is designed using the improved PID method to make it have higher calculation accuracy and stronger robustness.
3.在改进型PID的微分项中依据飞行器比例控制的负阻尼原理和飞行器动力学模型近似建立临界阻尼自由度振动微分方程进行解算。3. In the differential term of the improved PID, the critical damping degree of freedom vibration differential equation is approximately established and solved based on the negative damping principle of aircraft proportional control and the aircraft dynamics model.
如图1所示,一种改进型的四旋翼飞行器控制系统,包括有飞行姿态检测模块、无线通信模块和控制模块;飞行姿态检测模块包括加速度传感器、陀螺仪、磁力计、气压高度计和北斗定位系统;所述加速度传感器和陀螺仪分别测量飞行器X、Y、Z轴的姿态数据,并进行互补融合计算出姿态角(俯仰角,横滚角,偏航角);所述磁力传感器监测数据用以消除陀螺仪带来的积分漂移误差;所述气压高度计测量飞行器高度数据;所述北斗定位系统用以测定大地坐标系和飞行器坐标系;无线通信模块传输信息数据;控制模块进行姿态数据运算并以PWM方式驱动飞行电机。As shown in Figure 1, an improved quadcopter control system includes a flight attitude detection module, a wireless communication module and a control module; the flight attitude detection module includes an acceleration sensor, a gyroscope, a magnetometer, a barometric altimeter and a Beidou positioning system; the acceleration sensor and the gyroscope respectively measure the attitude data of the aircraft's X, Y, and Z axes, and perform complementary fusion to calculate the attitude angle (pitch angle, roll angle, yaw angle); the magnetic sensor monitoring data is used to eliminate the integral drift error caused by the gyroscope; the barometric altimeter measures the aircraft's altitude data; the Beidou positioning system is used to determine the geodetic coordinate system and the aircraft coordinate system; the wireless communication module transmits information data; the control module performs attitude data calculations and drives the flight motor in a PWM mode.
本发明还涉及一种改进型的四旋翼飞行器控制方法,该方法包括下列步骤:The present invention also relates to an improved quadrotor control method, which comprises the following steps:
S1)坐标系的建立与姿态表示:如图1所示,地理坐标系(Xg,Yg,Zg)用以描述飞行器相对地面的位置及姿态,它以飞行器中心为原点,Xg指向地理东向,Yg指向地理北向,Zg指向天空,即东北天坐标系;S1) Establishment of coordinate system and attitude expression: As shown in Figure 1, the geographic coordinate system ( Xg , Yg , Zg ) is used to describe the position and attitude of the aircraft relative to the ground. It takes the center of the aircraft as the origin, Xg points to the geographic east, Yg points to the geographic north, and Zg points to the sky, that is, the northeast sky coordinate system;
机体坐标系(Xb,Yb,Zb)是无人机惯性导航的基础坐标系,与飞行器固联,它以机体中心为原点,Xb指向机体前向,Yb指向机体右侧,Zb垂直机体水平面向上;The body coordinate system (X b , Y b , Z b ) is the basic coordinate system of the UAV inertial navigation, which is fixed to the aircraft. It takes the center of the body as the origin, X b points to the front of the body, Y b points to the right of the body, and Z b is perpendicular to the horizontal plane of the body and upward;
姿态角(俯仰角θ,横滚角γ,偏航角)是用来描述机体运动的角参量,在飞行器工作时,四个转动的旋翼产生垂直机体水平面向上的总升力F和沿着机体坐标系的三轴转动力矩t1,t2,t3,升力F引起飞行器的空间位置发生变化,转动力矩t改变飞行器的姿态;地理坐标系可通过分别转动θ,γ,/>与机体坐标系重合,即:Attitude angle (pitch angle θ, roll angle γ, yaw angle ) is an angular parameter used to describe the motion of the aircraft. When the aircraft is working, the four rotating rotors generate a total lift F perpendicular to the horizontal plane of the aircraft and a three-axis rotational torque t 1 , t 2 , t 3 along the aircraft coordinate system. The lift F causes the spatial position of the aircraft to change, and the rotational torque t changes the attitude of the aircraft. The geographic coordinate system can be changed by rotating θ, γ, / > Coincident with the body coordinate system, that is:
Xg,Yg,Y1,/>Y2,/>Yb,Zb Xg , Yg , Y 1 ,/> Y 2 ,/> Yb , Zb
可得到地理系到机体系的旋转矩阵 The rotation matrix from the geographic system to the machine system can be obtained
式中只需更新便可实时计算θ,γ,/>旋转矩阵/>可通过求解矩阵微分方程或四元数得到。In the formula, only the update Then the real-time calculation of θ, γ, /> Rotation Matrix/> It can be obtained by solving matrix differential equations or quaternions.
S2)加速度传感器数据采集;加速度传感器进行测量时重力惯性质量R的三轴分量记为Rx、Ry、Rz;再通过三角函数等相关知识可求出重力加速度与三个坐标轴之间的夹角记为α、β、γ;S2) Acceleration sensor data acquisition; when the acceleration sensor is measuring, the three-axis components of the gravitational inertial mass R are recorded as Rx, Ry, and Rz; then the angles between the gravitational acceleration and the three coordinate axes can be calculated through trigonometric functions and other related knowledge and recorded as α, β, and γ;
S3)陀螺仪数据采集;陀螺仪也称角速度传感器测量某一段时间内角度的变化率,要想得到角度增量值可以通过对两次测量时间差值进行积分,增量值为正值表示角度在增大,增量值为负值表示角度在减小,增量后旋转角度θ可以由初识状态角度与积分后的角度进行相加得出;S3) Gyroscope data acquisition: The gyroscope, also known as the angular velocity sensor, measures the rate of change of the angle within a certain period of time. To obtain the angle increment value, the time difference between two measurements can be integrated. A positive increment value indicates that the angle is increasing, and a negative increment value indicates that the angle is decreasing. The rotation angle θ after the increment can be obtained by adding the initial state angle and the integrated angle.
θ=θ0+∫0 tωdtθ=θ 0 +∫ 0 t ωdt
式中:θ-增量后旋转角度值;θ0-上一次进行旋转的角度值;ω-角速度传感器测量的数值;t-测量间隔时间;Where: θ - rotation angle value after increment; θ 0 - angle value of the last rotation; ω - value measured by the angular velocity sensor; t - measurement interval;
由于微机电陀螺仪存在较大输出噪声,而姿态解算存在积分过程,陀螺仪输出噪声会随时间累积,导致解算的最终旋转角度随之发散,称之为随机漂移;因此建立陀螺仪随机漂移数学模型,用以补偿其输出角速率,以提高飞行器姿态解算精度;依据“Huamingqian”等论证的一阶Auto-Recessive(AR)模型来描述微机电陀螺仪随机漂移:Since the MEMS gyroscope has large output noise and the attitude solution has an integration process, the gyroscope output noise will accumulate over time, causing the final rotation angle of the solution to diverge, which is called random drift. Therefore, a mathematical model of gyroscope random drift is established to compensate its output angular rate to improve the accuracy of aircraft attitude solution. The first-order Auto-Recessive (AR) model demonstrated by "Huamingqian" et al. is used to describe the random drift of the MEMS gyroscope:
Xt=αiXt-1+εt Xt = αiXt -1 + εt
式中Xt为t时刻的陀螺漂移,αi为常量系数,εt服从零均值高斯分布,参数αi、εt可由Matlab函数“aryule”得到。Where Xt is the gyro drift at time t, αi is a constant coefficient, εt obeys a zero-mean Gaussian distribution, and the parameters αi and εt can be obtained by the Matlab function “aryule”.
S4)磁力计数据采集;磁力计用于求取载体姿态中航向角的估计,航向角为磁力计用测量信息在水平方向上的分量求得;三轴磁力计在地球磁场坐标系下的测量值为:S4) Magnetometer data collection; The magnetometer is used to obtain an estimate of the heading angle in the carrier attitude, and the heading angle is obtained by the component of the magnetometer measurement information in the horizontal direction; the measurement value of the three-axis magnetometer in the earth's magnetic field coordinate system is:
其中,上标b表示了向量h为地球磁场坐标系下的向量,下标x,y,z,表示三轴磁力计各轴的分量;当磁力计水平放置水平面上时,可以利用向量h在水平方向上的分量航向hx和hy求出磁力计坐标系x与地球磁场北极的的夹角,即航向角推导公式为:Among them, the superscript b indicates that the vector h is a vector in the Earth's magnetic field coordinate system, and the subscripts x, y, and z represent the components of each axis of the three-axis magnetometer. When the magnetometer is placed horizontally on a horizontal plane, the heading hx and hy of the horizontal components of the vector h can be used to calculate the angle between the magnetometer coordinate system x and the North Pole of the Earth's magnetic field, that is, the heading angle derivation formula is:
S5)卡尔曼滤波器设计;在陀螺仪噪声估计,一阶(AR)模型的基础上,设计卡尔曼滤波器对陀螺仪输出角速率进行补偿;S5) Kalman filter design: Based on the gyroscope noise estimation and the first-order (AR) model, a Kalman filter is designed to compensate the gyroscope output angular rate;
卡尔曼动态方程分为状态方程和观测方程,状态方程:The Kalman dynamic equation is divided into the state equation and the observation equation. The state equation is:
Xt=At-1Xt-1+Bt-1Ut-1+Wt-1 Xt =At -1Xt- 1 +Bt -1Ut- 1 +Wt -1
观测方程:Yt=HtXt+Vt Observation equation: Y t = H t X t + V t
式中Xt为t时刻状态向量;At-1为状态转移矩阵;Ut-1为控制量;Bt-1为控制输入矩阵;Wt-1为过程噪声,服从零均值且方差为Qt的高斯分布;Ht为观测矩阵;Vt为量测噪声,服从零均值且方差为Rt的高斯分布;Where Xt is the state vector at time t; At-1 is the state transfer matrix; Ut-1 is the control variable; Bt -1 is the control input matrix; Wt -1 is the process noise, which obeys the Gaussian distribution with zero mean and variance Qt ; Ht is the observation matrix; Vt is the measurement noise, which obeys the Gaussian distribution with zero mean and variance Rt ;
卡尔曼滤波估计可分为两个阶段,:预测和更新;预测阶段使用上一时刻估计的状态值预测下时刻的状态值;更新阶段结合当前的预测值和观测值更新现时刻的状态值;Kalman filter estimation can be divided into two stages: prediction and update. In the prediction stage, the state value estimated at the previous moment is used to predict the state value at the next moment. In the update stage, the state value at the current moment is updated by combining the current predicted value and the observed value.
预测: predict:
更新: renew:
式中为卡尔曼更新的的状态值和方差矩阵;Yt为量测值;Kg为卡尔曼增益,它保证卡尔曼算法估计的状态值为方差最小的最优值;根据预测和更新公式便可实时估计出角速率、随机漂移;In the formula is the state value and variance matrix updated by Kalman; Yt is the measured value; Kg is the Kalman gain, which ensures that the state value estimated by the Kalman algorithm is the optimal value with the minimum variance; the angular rate and random drift can be estimated in real time according to the prediction and update formula;
在应用卡尔曼算法之前,依据步骤3)中的一阶(AR)模型对噪声进行处理,使陀螺仪随机漂移为状态向量中的一部分,从而满足卡尔曼估计对噪声的要求;再通过卡尔曼算法估计出陀螺仪的随机漂移,用以补偿陀螺仪输出的三轴角速率;根据一阶(AR)模型对陀螺仪随机漂移,确定卡尔曼算法的动态方程;Before applying the Kalman algorithm, the noise is processed according to the first-order (AR) model in step 3) so that the gyroscope random drift is a part of the state vector, thereby satisfying the noise requirement of the Kalman estimation; the random drift of the gyroscope is then estimated by the Kalman algorithm to compensate for the three-axis angular rate output by the gyroscope; the dynamic equation of the Kalman algorithm is determined according to the first-order (AR) model for the gyroscope random drift;
状态方程: Equation of state:
观测方程:Yt=[1 0]Xt+Vt,其中 Observation equation: Y t = [1 0] X t + V t , where
式中Xα,Xr分别表示卡尔曼滤波估计的陀螺仪随机漂移和输出角速率。Where X α and X r represent the gyroscope random drift and output angular rate estimated by Kalman filter respectively.
S6)通过采用四元数进行姿态解算旋转矩阵,从而获得飞行姿态角;设当前的坐标系为机体坐标系,则四元数列向量:S6) The attitude is solved by using quaternion rotation matrix to obtain the flight attitude angle; assuming that the current coordinate system is the body coordinate system, the quaternion vector is:
q=[q0q1q2q3]T=[0123]T q=[q 0 q 1 q 2 q 3 ] T =[0123] T
根据陈孟元等的推论中给出的解算结果,新四元数转化为三个欧拉角的过程直观表示为:According to the solution results given in the inference of Chen Mengyuan et al., the process of converting the new quaternion into three Euler angles can be intuitively expressed as:
θ=arcsin(-2(q1q3-q0q2))θ=arcsin(-2(q 1 q 3 -q 0 q 2 ))
进而得到实时飞行姿态数据,并用于调控四旋翼各个电机运行功率。Real-time flight attitude data is then obtained and used to regulate the operating power of each motor of the quadrotor.
S7)基于姿态检测与改进型PID的四旋翼飞行器控制器设计;由于PID的参数是将不同的量纲数据进行转换,因此它的参数获取依赖于飞行姿态检测模块的数据信息;微分项D控制的是某个量是否是很快达到目标值,并且是否会过冲,它相当于对P参量的一个负向阻尼作用,主要是用于抑制机体震荡过冲,增加微分D值则可以修正这种抖动,因此微分需要与比例项一同调节;如图2所示,其步骤如下:S7) Design of a quadcopter controller based on attitude detection and improved PID; Since the parameters of PID are to convert different dimensional data, its parameter acquisition depends on the data information of the flight attitude detection module; The differential term D controls whether a certain quantity reaches the target value quickly and whether it will overshoot. It is equivalent to a negative damping effect on the P parameter, which is mainly used to suppress the body oscillation overshoot. Increasing the differential D value can correct this jitter, so the differential needs to be adjusted together with the proportional term; As shown in Figure 2, the steps are as follows:
1)将飞行器的PID控制算法中的微分项改进为以临界阻尼状态的自由振动微分方程; 1) Improve the differential term in the aircraft's PID control algorithm to a free vibration differential equation in a critical damping state;
知道该系统的刚度和质量,便能够将固有频率表示出来;Knowing the stiffness and mass of the system, the natural frequency can be expressed;
将零时刻的初始条件带入到系统的自由振动微分方程当中,由此得出振幅和初相位关于位移的表达式:Substituting the initial condition at time zero into the free vibration differential equation of the system, we can derive the expressions of amplitude and initial phase with respect to displacement:
Xt=Asin(ω0t+δ) Xt =Asin( ω0t +δ)
式中A为振幅(常数),δ为初相位;Where A is the amplitude (constant), δ is the initial phase;
2)改进型PID控制器由比例单元、积分单元和改进后的振动微分单元组成,按数字式PID控制器处理方式,以T为采样周期,Ti为积分周期,Td为微分周期,n为采样序号,则改进型PID算法可表示为:2) The improved PID controller consists of a proportional unit, an integral unit and an improved vibration differential unit. According to the processing method of the digital PID controller, T is the sampling period, Ti is the integral period, Td is the differential period, and n is the sampling sequence number. The improved PID algorithm can be expressed as:
式中,Kp为比例系数,为积分系数,/>为结合固有频率的振动微分系数;Where Kp is the proportionality coefficient, is the integration coefficient, /> is the vibration differential coefficient combined with the natural frequency;
通过采集信号的负反馈求得系统输出值与期望值的偏差,经过比例换算得出系统输出控制量从而消除系统输出偏差;积分控制对积累的偏差进行调节;微分控制在临界阻尼自由振动的边界条件下,控制误差的变化趋势,提高输出响应的快速性,减小系统超调量。The deviation between the system output value and the expected value is obtained by negative feedback of the collected signal, and the system output control quantity is obtained through proportional conversion to eliminate the system output deviation; the integral control adjusts the accumulated deviation; the differential control controls the change trend of the error under the boundary conditions of critical damping free vibration, improves the rapidity of the output response, and reduces the system overshoot.
实验测试Experimental test
下面将具体给出实验条件,进一步说明本发明实施例的基于自适应的飞行器控制系统故障补偿和扰动抑制方法的有效性,其中,实验条件包括:The experimental conditions are specifically given below to further illustrate the effectiveness of the adaptive aircraft control system fault compensation and disturbance suppression method according to the embodiment of the present invention, wherein the experimental conditions include:
飞行器参数:Aircraft parameters:
整机质量m=1.5kg、对向轴距L=50.0×10-2m、升力系数kt=6.15×10-5N·ms2、阻力系数kd=1.18×10-6N·ms2、X轴转动惯量6.25×10-3,Y轴转动惯量5.15×10-3,Z轴转动惯量10.45×10-5,电机转动惯量1.19×10-4kg·m2。用四元数解算模块搭建四旋翼飞行器微电机系统,在学院体育场进行室外飞行实验,并通过改进型PID遥控器给飞行姿态信号用以控制飞行姿态。利用无线通信技术将数据回传到上位机进行分析。图3-4为飞行试验的横滚角曲线图和俯仰角曲线图,图3-4中横滚角最大幅值不超过10°,俯仰角最大幅值不超过45°。The total mass of the machine is m = 1.5 kg, the opposite wheelbase is L = 50.0 × 10 -2 m, the lift coefficient is k t = 6.15 × 10 -5 N·ms 2 , the drag coefficient is k d = 1.18 × 10 -6 N·ms 2 , the X-axis moment of inertia is 6.25 × 10 -3 , the Y-axis moment of inertia is 5.15 × 10 -3 , the Z-axis moment of inertia is 10.45 × 10 -5 , and the motor moment of inertia is 1.19 × 10 -4 kg·m 2 . The quadcopter micromotor system is built using the quaternion solver module, and an outdoor flight experiment is conducted at the college stadium. The flight attitude signal is given through the improved PID remote controller to control the flight attitude. The data is transmitted back to the host computer for analysis using wireless communication technology. Figure 3-4 shows the roll angle curve and pitch angle curve of the flight test. In Figure 3-4, the maximum roll angle does not exceed 10°, and the maximum pitch angle does not exceed 45°.
如图5-6所示,在飞行试验中,横滚角在几个峰值处存在相对较大的误差,这是由于其高频的大幅值变化造成。而俯仰角的幅值变化较为平缓,对应的误差也相对较小。虽然存在一定的相对误差,但做高速率角运动时,飞行器均能较好地跟随控制器给定的参考值,且误差都能控制在一定范围内。从而能够证明姿态解算方法在实际飞行中的有效性。As shown in Figure 5-6, in the flight test, the roll angle has relatively large errors at several peaks, which is caused by its high-frequency large-amplitude changes. The amplitude of the pitch angle changes more slowly, and the corresponding error is relatively small. Although there is a certain relative error, when performing high-rate angular motion, the aircraft can well follow the reference value given by the controller, and the error can be controlled within a certain range. This proves the effectiveness of the attitude solution method in actual flight.
以上所述实施例仅表达了本发明的优选实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形、改进及替代,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express the preferred implementation modes of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications, improvements and substitutions can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention patent shall be subject to the attached claims.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210216326.2A CN114594675B (en) | 2022-03-07 | 2022-03-07 | Four-rotor aircraft control system and method with improved PID |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210216326.2A CN114594675B (en) | 2022-03-07 | 2022-03-07 | Four-rotor aircraft control system and method with improved PID |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114594675A CN114594675A (en) | 2022-06-07 |
CN114594675B true CN114594675B (en) | 2024-06-04 |
Family
ID=81806955
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210216326.2A Active CN114594675B (en) | 2022-03-07 | 2022-03-07 | Four-rotor aircraft control system and method with improved PID |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114594675B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118983737B (en) * | 2024-08-01 | 2025-04-08 | 国网河南省电力公司荥阳市供电公司 | UAV transmission line deicing device and its digital control system |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003108203A (en) * | 2001-09-27 | 2003-04-11 | Mitsubishi Electric Corp | Pid control device and method for deciding its action, pid adjusting device and method for identifying transfer function for control object |
CN101339405A (en) * | 2008-08-13 | 2009-01-07 | 哈尔滨工程大学 | A digital PID control method |
KR100910461B1 (en) * | 2006-12-26 | 2009-08-04 | 주식회사 포스코 | Electromagnetic vibration damper for controlling vibration of plated steel sheet through self-tuning PID control |
CN102853834A (en) * | 2012-01-09 | 2013-01-02 | 北京信息科技大学 | High-precision scheme of IMU for rotating carrier and denoising method |
CN102955477A (en) * | 2012-10-26 | 2013-03-06 | 南京信息工程大学 | Attitude control system and control method of four-rotor aircraft |
JP2015084155A (en) * | 2013-10-25 | 2015-04-30 | オムロン株式会社 | Parameter adjustment device, parameter adjustment method, and parameter adjustment program |
CN106919179A (en) * | 2017-04-28 | 2017-07-04 | 东华理工大学 | A kind of four-rotor aircraft control system and control method |
CN110209182A (en) * | 2019-05-21 | 2019-09-06 | 云南民族大学 | A kind of quadrotor based on AVR single chip |
CN110308648A (en) * | 2019-07-11 | 2019-10-08 | 燕山大学 | Position-based impedance control system variable impedance characteristic compensation control method and system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107957730B (en) * | 2017-11-01 | 2020-02-18 | 华南理工大学 | A kind of unmanned aerial vehicle stable flight control method |
-
2022
- 2022-03-07 CN CN202210216326.2A patent/CN114594675B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003108203A (en) * | 2001-09-27 | 2003-04-11 | Mitsubishi Electric Corp | Pid control device and method for deciding its action, pid adjusting device and method for identifying transfer function for control object |
KR100910461B1 (en) * | 2006-12-26 | 2009-08-04 | 주식회사 포스코 | Electromagnetic vibration damper for controlling vibration of plated steel sheet through self-tuning PID control |
CN101339405A (en) * | 2008-08-13 | 2009-01-07 | 哈尔滨工程大学 | A digital PID control method |
CN102853834A (en) * | 2012-01-09 | 2013-01-02 | 北京信息科技大学 | High-precision scheme of IMU for rotating carrier and denoising method |
CN102955477A (en) * | 2012-10-26 | 2013-03-06 | 南京信息工程大学 | Attitude control system and control method of four-rotor aircraft |
JP2015084155A (en) * | 2013-10-25 | 2015-04-30 | オムロン株式会社 | Parameter adjustment device, parameter adjustment method, and parameter adjustment program |
CN106919179A (en) * | 2017-04-28 | 2017-07-04 | 东华理工大学 | A kind of four-rotor aircraft control system and control method |
CN110209182A (en) * | 2019-05-21 | 2019-09-06 | 云南民族大学 | A kind of quadrotor based on AVR single chip |
CN110308648A (en) * | 2019-07-11 | 2019-10-08 | 燕山大学 | Position-based impedance control system variable impedance characteristic compensation control method and system |
Non-Patent Citations (5)
Title |
---|
PID Control for Attitude Stabilization of an Unmanned Aerial Vehicle Quad-copter;Qasim, M等;《5th International Conference on Instrumentation, Control, and Automation》;20171231;全文 * |
双旋翼无人机姿态控制系统研究;秦昊;《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》;20170115(第01期);全文 * |
变翼无人机飞控系统及姿态研究;张聂;《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》;20190515(第05期);C031-131 * |
四旋翼飞行器控制系统关键技术研究;张浩;《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》;20180615(第06期);全文 * |
基于卡尔曼滤波的四旋翼飞行器控制算法;胡开明等;《探测与控制学报》;20200229;第42卷(第1期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN114594675A (en) | 2022-06-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112629538B (en) | Ship horizontal attitude measurement method based on fusion complementary filtering and Kalman filtering | |
WO2020220729A1 (en) | Inertial navigation solution method based on angular accelerometer/gyroscope/accelerometer | |
CN103425146B (en) | A kind of inertially stabilized platform interference observer method for designing based on angular acceleration | |
CN108827299B (en) | Aircraft attitude calculation method based on improved quaternion second-order complementary filtering | |
CN104898681B (en) | A kind of quadrotor attitude acquisition method for approximately finishing card quaternary number using three ranks | |
CN104914874B (en) | A kind of pose control system for unmanned plane and method based on adaptive Mutually fusion | |
CN104335128B (en) | Method for controlling the rotor wing unmanned aerial vehicle of more rotors with crosswind and accelerometer estimation of deviation and compensation | |
CN104764467B (en) | Re-entry space vehicle inertial sensor errors online adaptive scaling method | |
CN110017837B (en) | Attitude anti-magnetic interference combined navigation method | |
CN106249745A (en) | The control method of four axle unmanned planes | |
CN109506646A (en) | A kind of the UAV Attitude calculation method and system of dual controller | |
CN108759845A (en) | A kind of optimization method based on inexpensive multi-sensor combined navigation | |
CN109682377B (en) | A Pose Estimation Method Based on Dynamic Step Gradient Descent | |
CN106959110A (en) | A kind of head attitude detecting method and device | |
CN110567461B (en) | A non-cooperative spacecraft attitude and parameter estimation method considering no gyroscope | |
CN106052682B (en) | A kind of hybrid inertial navigation system and air navigation aid | |
CN106444804A (en) | Complementary filtering algorithm and cascade PID based four-rotor aircraft design method | |
CN111351482A (en) | Integrated Navigation Method for Multi-rotor Aircraft Based on Error State Kalman Filter | |
CN113670314B (en) | UAV attitude estimation method based on PI adaptive two-stage Kalman filter | |
CN111964688B (en) | Attitude estimation method combining UAV dynamics model and MEMS sensor | |
JP2015024705A (en) | Automatic take-off and landing control method for small electric helicopter | |
CN107289942A (en) | A kind of relative navigation system and method for formation flight | |
CN110793515A (en) | A UAV Attitude Estimation Method under Large Maneuvering Conditions Based on Single Antenna GPS and IMU | |
CN114594675B (en) | Four-rotor aircraft control system and method with improved PID | |
Yang et al. | A fast adaptive-gain complementary filter algorithm for attitude estimation of an unmanned aerial vehicle |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: 344000 No. 154 Yangcheng Road, Jiangxi, Fuzhou Patentee after: Gandong University Country or region after: China Address before: 344000 No. 154 Yangcheng Road, Jiangxi, Fuzhou Patentee before: Yangtze College East China University of Science and Technology Country or region before: China |
|
CP03 | Change of name, title or address | ||
EE01 | Entry into force of recordation of patent licensing contract | ||
EE01 | Entry into force of recordation of patent licensing contract |
Application publication date: 20220607 Assignee: Jiangxi Aimei Technology Co.,Ltd. Assignor: Gandong University Contract record no.: X2024980040921 Denomination of invention: An improved PID control system and method for quadcopter aircraft Granted publication date: 20240604 License type: Common License Record date: 20241223 Application publication date: 20220607 Assignee: Jiangxi Guowei photoelectric display Co.,Ltd. Assignor: Gandong University Contract record no.: X2024980040920 Denomination of invention: An improved PID control system and method for quadcopter aircraft Granted publication date: 20240604 License type: Common License Record date: 20241223 |
|
EE01 | Entry into force of recordation of patent licensing contract | ||
EE01 | Entry into force of recordation of patent licensing contract |
Application publication date: 20220607 Assignee: JIANGXI SHENGLING TECHNOLOGY Co.,Ltd. Assignor: Gandong University Contract record no.: X2024980040918 Denomination of invention: An improved PID control system and method for quadcopter aircraft Granted publication date: 20240604 License type: Common License Record date: 20241223 Application publication date: 20220607 Assignee: FUZHOU CITY SHUANGLING MAGNETIC MATERIALS Co.,Ltd. Assignor: Gandong University Contract record no.: X2024980040917 Denomination of invention: An improved PID control system and method for quadcopter aircraft Granted publication date: 20240604 License type: Common License Record date: 20241223 Application publication date: 20220607 Assignee: JIANGXI XINDING TECHNOLOGY Co.,Ltd. Assignor: Gandong University Contract record no.: X2024980040915 Denomination of invention: An improved PID control system and method for quadcopter aircraft Granted publication date: 20240604 License type: Common License Record date: 20241223 Application publication date: 20220607 Assignee: Jiangxi liankun Intelligent Technology Co.,Ltd. Assignor: Gandong University Contract record no.: X2024980042810 Denomination of invention: An improved PID control system and method for quadcopter aircraft Granted publication date: 20240604 License type: Common License Record date: 20241226 Application publication date: 20220607 Assignee: FUZHOU DONGXIANG DISTRICT ZHIHE TECHNOLOGY Co.,Ltd. Assignor: Gandong University Contract record no.: X2024980042499 Denomination of invention: An improved PID control system and method for quadcopter aircraft Granted publication date: 20240604 License type: Common License Record date: 20241225 Application publication date: 20220607 Assignee: Jiangxi Maihong Electronic Technology Co.,Ltd. Assignor: Gandong University Contract record no.: X2024980041476 Denomination of invention: An improved PID control system and method for quadcopter aircraft Granted publication date: 20240604 License type: Common License Record date: 20241224 Application publication date: 20220607 Assignee: JIANGXI HENGCHENG INDUSTRIAL Co.,Ltd. Assignor: Gandong University Contract record no.: X2024980041429 Denomination of invention: An improved PID control system and method for quadcopter aircraft Granted publication date: 20240604 License type: Common License Record date: 20241223 Application publication date: 20220607 Assignee: Jiangxi Derong Transmission Technology Co.,Ltd. Assignor: Gandong University Contract record no.: X2024980040922 Denomination of invention: An improved PID control system and method for quadcopter aircraft Granted publication date: 20240604 License type: Common License Record date: 20241223 |
|
EE01 | Entry into force of recordation of patent licensing contract | ||
EE01 | Entry into force of recordation of patent licensing contract |
Application publication date: 20220607 Assignee: Jiangxi Zhongke Shixian Optoelectronics Co.,Ltd. Assignor: Gandong University Contract record no.: X2024980043875 Denomination of invention: An improved PID control system and method for quadcopter aircraft Granted publication date: 20240604 License type: Common License Record date: 20241230 |