Trying to improve tricopter yaw for pid controller 0 in Cleanflight so I built an Openlog Blackbox recorder with a few bits and pieces I had lying around.
In OPENLOG.ZIP:
LOG00008.TXT firmware date: 9th May 2015 18:58:54 = 1.8.1 with no changes (see 00:23.547)
LOG00009.TXT firmware date: 9th May 2015 19:06:24 = 1.8.1 no yaw gyro smoothing (see 00:20.567)
LOG00010.TXT firmware date: 9th May 2015 19:10:57 = 1.8.1 no yaw gyro smoothing and always calculate I term (see 00:23.417)
LOG00011.TXT firmware date: 9th May 2015 19:16:18 = 1.8.1 always calculate I term (see 00:19.565)
After tuning the tricopter and adjusting a few settings, I now have much better PIDs, faster looptime and better tail servo offset:
In OPENLOG2.ZIP
LOG00032.TXT 1.8.1 with no changes
LOG00033.TXT 1.8.1 no yaw gyro smoothing
LOG00034.TXT 1.8.1 no yaw gyro smoothing and always calculate I term
no yaw gyro smoothing and always calculate I term rocks
No yaw gyro smoothing is this in imu.c
gyroData[FD_ROLL] = gyroADC[FD_ROLL];
gyroData[FD_PITCH] = gyroADC[FD_PITCH];
// if (mixerMode == MIXER_TRI) {
// gyroData[FD_YAW] = (gyroYawSmooth * 2 + gyroADC[FD_YAW]) / 3;
// gyroYawSmooth = gyroData[FD_YAW];
// } else {
gyroData[FD_YAW] = gyroADC[FD_YAW];
// }
Always calculate I term is this in pid.c
errorGyroI[axis] = constrain(errorGyroI[axis] + error, -16000, +16000); // WindUp
// if ((ABS(gyroData[axis]) > (640 * 4)) || (axis == FD_YAW &&
...Continue Reading