👨🎓个人主页:研学社的博客
💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
📋📋📋本文目录如下:🎁🎁🎁
目录
💥1 概述
本文的鹈鹕四旋翼无人机的 PD 控制器的增益,并使用它们来控制四旋翼飞行器所需的高度、横滚、俯仰和偏航角。阶跃响应在不同的时刻开始。为所有变量提供比较值(过冲、上升时间和SS误差)。
📚2 运行结果
部分代码:
% Read the gain values
GainsK = importdata('Gains.mat');
Kpz = GainsK(1,1); % Height P controller
Kdz = GainsK(1,2); % Height D controller
Kpp = GainsK(1,3); % Roll P controller
Kdp = GainsK(1,4); % Roll D controller
Kpt = GainsK(1,5); % Pitch P controller
Kdt = GainsK(1,6); % Pitch D controller
Kpps = GainsK(1,7); % Yaw P controller
Kdps = GainsK(1,8); % Yaw D controller
%
% % % Best Gains of the controllers
%
% Kpp = 30
% Kdp = 5
%
% Kpt = 30
% Kdt = 5
%
% Kpps = 30
% Kdps = 5
%
% Kpz = 40
% Kdz = 12
% % save gains data
% Gains = [Kpz Kdz Kpp Kdp Kpt Kdt Kpps Kdps];
% save('Gains.mat','Gains') % Write the optimal gains in a .mat file
% Quadrotor constants
Ixx = 8.1*10^(-3); % Quadrotor moment of inertia around X axis
Iyy = 8.1*10^(-3); % Quadrotor moment of inertia around Y axis
Izz = 14.2*10^(-3); % Quadrotor moment of inertia around Z axis
Jtp = 104*10^(-6); % Total rotational moment of inertia around the propeller axis
b = 54.2*10^(5-6); % Thrust factor
d = 1.1*10^(-6); % Drag factor
l = 0.24; % Distance to the center of the Quadrotor
m = 1; % Mass of the Quadrotor in Kg
g = 9.81; % Gravitational acceleration
stepsize = 0.01;
t = 0.00000000000000:stepsize:5.00000000000000; % simulation time
% Initial conditions for the Quadrotor
x0 = [];
for i = 1:12,
x0 = [x0;0]; % Initial position is the origin O(0,0,0), linear and angular velocities/accelerations = 0
end
% Initial values
Zinit = 0;
Phiinit = pi/3;
Thetainit = pi/2;
Psiinit = -pi/5;
x0(1) = 3; % Xinit
x0(3) = 4; % Yinit
x0(5) = Zinit; % Zinit
x0(7) = Phiinit; % Phiinit
x0(9) = Thetainit; % Thetainit
x0(11) = Psiinit; % Psiinit
🎉3 参考文献
部分理论来源于网络,如有侵权请联系删除。
[1]宋志强,方武,刘孝赵.基于PD控制的四旋翼无人机着陆控制研究[J].计算机应用与软件,2020,37(09):324-327.
[2]冯长辉,齐晓慧,苏立军,刘海波.四旋翼无人机TD-PD控制律设计[J].电光与控制,2016,23(03):36-40.