制作四轴遇到的奇葩现象
时间:10-02
整理:3721RD
点击:
motor[1] = ADD_THROTTLE+ throttle- PID_Roll_Rate.Out - PID_Pitch_Rate.Out - PID_Yaw_Rate.Out;
motor[2] = ADD_THROTTLE+ throttle- PID_Roll_Rate.Out + PID_Pitch_Rate.Out + PID_Yaw_Rate.Out ;
motor[3] = ADD_THROTTLE+ throttle+ PID_Roll_Rate.Out + PID_Pitch_Rate.Out - PID_Yaw_Rate.Out ;
motor[4] = ADD_THROTTLE+ throttle+ PID_Roll_Rate.Out -PID_Pitch_Rate.Out + PID_Yaw_Rate.Out ;
本人用的是STM32F103做主控芯片,程序中采样周期1MS,姿态更新是2MS,然后在控制程序里面屏蔽pid,把捕获的油门值直接输出PWM很正常,一添加PID,输出的波形要么杂波要么直接干到最大,不受控制的转,哪位大神能大概提点建议,让我改一下。
motor[2] = ADD_THROTTLE+ throttle- PID_Roll_Rate.Out + PID_Pitch_Rate.Out + PID_Yaw_Rate.Out ;
motor[3] = ADD_THROTTLE+ throttle+ PID_Roll_Rate.Out + PID_Pitch_Rate.Out - PID_Yaw_Rate.Out ;
motor[4] = ADD_THROTTLE+ throttle+ PID_Roll_Rate.Out -PID_Pitch_Rate.Out + PID_Yaw_Rate.Out ;
本人用的是STM32F103做主控芯片,程序中采样周期1MS,姿态更新是2MS,然后在控制程序里面屏蔽pid,把捕获的油门值直接输出PWM很正常,一添加PID,输出的波形要么杂波要么直接干到最大,不受控制的转,哪位大神能大概提点建议,让我改一下。
PID参数需要矫正一下
对于软件类的不了解 感觉既然选择采用PID方式 多为PID参数选择不匹配造成的
但是pid参数再不对,也会四个电机都会转动,随油门大小被控制吧?