纪录无人机PID参数配置

P:

|-------------|---|---|---|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| PSC_D_POS_P | 1 | 1 | | 0.50 4.00 | Position (vertical) controller P gain. Converts the difference between the desired altitude and actual altitude into a climb or descent rate which is passed to the throttle rate controller. Previously _POSZ_P. |

|-------------|---|---|---|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| PSC_D_VEL_P | 5 | 5 | | 1.0 10.0 | Velocity (vertical) controller P gain. Converts the difference between desired vertical speed and actual speed into a desired acceleration that is passed to the throttle acceleration controller. Previously _VELZ_P. |

|-------------|------|------|---|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| PSC_D_ACC_P | 0.05 | 0.05 | | 0.010 0.250 | Acceleration (vertical) controller P gain. Converts the difference between desired vertical acceleration and actual acceleration into a motor output. If upgrading from 4.6 this is _ACCZ_P * 0.1. |

pid的算法函数在

// Runs the vertical (U-axis) position controller.

// Computes output acceleration based on position and velocity errors using PID correction.

// Feedforward velocity and acceleration are combined with corrections to produce a smooth vertical command.

// Desired position, velocity, and acceleration must be set before calling.

void AC_PosControl::D_update_controller()

{

// check for ekf z-axis position reset

D_handle_ekf_reset();

// Check for z_controller time out

if (!D_is_active()) {

D_init_controller();

if (has_good_timing()) {

// call internal error because initialisation has not been done

INTERNAL_ERROR(AP_InternalError::error_t::flow_of_control);

}

}

_last_update_d_ticks = AP::scheduler().ticks32();

参数名称 所属控制器(类成员变量) 核心作用
PSC_D_POS_P 位置环 (P Controller) 对应代码中的 _p_pos_d_m 将位置误差转换为期望速度,代码为 _p_pos_d_m.update_all()
PSC_D_VEL_P 速度环 (PID Controller) 对应代码中的 _pid_vel_d_m 将速度误差转换为期望加速度,代码为 _pid_vel_d_m.update_all()
PSC_D_ACC_P 加速度环 (PID Controller) 对应代码中的 _pid_accel_d_m 将加速度误差转换为电机推力(油门),代码为 _pid_accel_d_m.update_all()
相关推荐
开心大爆炸2 小时前
xrdp 连接 登录对话框输入密码后闪退
linux·运维·服务器
oushaojun22 小时前
大厂 C++ 面试:深度剖析 Linux Signal 信号机制(转)
linux
苏生Susheng3 小时前
【软件实施】Linux系统Shell脚本教程
linux·运维·服务器·chrome·spring boot·学习·实施
Ruiery3 小时前
Linux 6.6内核 IOMMU 深度解析(七):DMA API 与 IOMMU 集成 — 从 dma_map_single 到 iommu_map
linux·运维·服务器
分支预测失败3 小时前
RISC-V AIA 中断架构实战:从 PLIC 到 APLIC 与 IMSIC 的迁移
linux·后端
GeW3 小时前
RHCE学习拿证计划:锁定核心考点,实现备考效率最大化
linux
snow@li3 小时前
服务器运维:Alibaba Cloud Linux 4 LTS 64位 根目录全景深度解析文章
linux·运维·服务器
苏生Susheng4 小时前
【软件实施】Linux企业运维常用命令手册
java·linux·运维·服务器·springboot·springcloud·软件实施
额额额对了4 小时前
Linux 进程间通信(IPC)核心机制:消息队列、共享内存与信号量详解
linux·网络·网络协议
zx_741484814 小时前
【Linux入门】Linux 安装:VMware Workstation Pro 安装 CentOS 7 保姆级图文教程
linux·centos