纪录无人机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()
相关推荐
海阔天空任鸟飞~5 小时前
Linux 权限 777
linux·运维·服务器
Kina_C8 小时前
Linux iptables 防火墙原理与实操——从四表五链到 NAT 配置
linux·运维·服务器·iptables
wdfk_prog9 小时前
嵌入式面试真题第 15 题:不可恢复异常后的通用崩溃快照、调用栈保存与离线分析架构
linux·开发语言·面试·架构
雷工笔记13 小时前
什么是Ubuntu?
linux·运维·ubuntu
jsons114 小时前
autofs挂载
linux·服务器·网络
liwulin050614 小时前
【ollama】自定义结构化输出
linux·前端·数据库·ollama
gs8014015 小时前
【实战】记一次 Linux 服务器入侵排查:grok-agent 后门木马深度剖析与彻底清理
linux·运维·服务器
时空无限15 小时前
vllm 大模型启动缓存相关环境变量 export
linux·缓存·vllm
Echo_cy_15 小时前
基于ZYNQ-7000的Ethernet驱动配置
linux·驱动开发·嵌入式硬件·fpga开发·ethernet·zynq
ShineWinsu16 小时前
对于Linux:模版方法类的解析以及socket、TcpSocket的封装
linux·c++·面试·socket·模板方法模式·封装·tcpsocket