Anomalous waypoint following behavior

I have a tarot T18 octocopter with a pixhawk cube black running Copter 4.0.4. I’ve been investigating some accel clipping (what’s the difference between primary, secondary, and tertiary–is that IMU 1, 2 and 3?) I’ve observed. Part of this was upgrading from the stock Tarot motors to some T-motors. For that shakeout, to test auto, I setup a simple mission of 4 or 5 waypoints with a do_jump at the end to start the mission over. The first flight was great–no issues noted.

However on the second flight when the vehicle got to the last waypoint it was like it stopped tracking the position it was suppose to–it just started drifting off. I switched to loiter to get the vehicle in a safe spot and then went back into auto to restart the mission. This time when it hit the last waypoint it overshot the waypoint, then backtracked to the waypoint and overshot it again and then finally turned and headed back to the first waypoint. I let it fly a few circuits and it would repeat that same behavior at the last waypoint every time. The only difference in configuration between the first and second flights is that I added a takeoff waypoint to the mission on the second flight for an auto takeoff.

The third flight was essentially the same with the same behavior observed. It was pretty consistent although sometimes instead of just overshooting it would seemed to just drift off again.

Log files for all three flights are here: https://www.dropbox.com/sh/lgmtxnrmr7rrclv/AABCF6QioE1Y3Pavo5YBo9dqa?dl=0
(currently only bin files…will add t-logs shortly)

I’ve flown this vehicle / autopilot pretty extensively and never seen this kind of behavior. I did just switch motors and tweaked a few of the gains, but nothing that should’ve affected waypoint following (and I would think if it was the gains it would’ve been manifest on the first flight and in other portions of the flight). Any ideas?

yes, I believe the clipping numbers align to the IMU numbers.
I’m suspecting you’ve got some slight tuning and physical issues affecting the position holding ability.

You’ve got some motor mount twist happening there - CW motors are fighting CCW motors because of the physical yaw bias.
image

Z vibrations are OK, but X and Y vibes are a bit high - that’s usually prop balance. Also check for wires and things flapping around or vibrating against the flight controller.

You could set these
ATC_THR_MIX_MAN to 0.5
PSC_ACCZ_I,0.496
PSC_ACCZ_P,0.248
but that’s nothing to do with the waypoint/drift issue.

Make sure you’ve got these set correctly for your battery:
BATT_ARM_VOLT,22.1
BATT_CRT_VOLT,21
BATT_LOW_VOLT,21.6
MOT_BAT_VOLT_MAX,25.2
MOT_BAT_VOLT_MIN,19.8
BATT_FS_CRT_ACT,1
BATT_FS_LOW_ACT,2

PIDs look a little out to me, I’d run Autotune on pitch and roll axis at least and see how it is after that.
But first what ESCs do you have?

yes- when I first assembled the vehicle the guy that helped me suggested adding 3 degrees of twist on each motor (CW for the CW motors and CCW for the CCW motors when looking down the length of the arm), however the vehicle has been like that for 2-3 years with many many flight hours on it. I guess I’m not sure if that twist is actually needed. His thought was that it gives the vehicle a little extra yaw authority, but maybe the torque provided by the props themselves is sufficient.

I’m using the Hobbywing XRotor 40A-OPTO ESC http://www.helipal.com/hobbywing-xrotor-40a-esc.html for each motor

I guess what’s weird to me is that only happened on the last waypoint and only on the last two flights on Thursday. I flew the vehicle again on Monday for about an hour with several different waypoint missions and they all seemed fine. I uploaded a mission that was similar to the one where I observed the behavior and it flew fine.

Out of curiosity, what plots are you looking at to see if the PIDs are in tune. I’m looking at the Roll/DesRoll and also Pitch/DesPitch and also ErrRP and I think they look pretty good, but I don’t have a reference to compare them against.

Thanks

The motor mount twist is definitely unwanted. It subtracts from headroom in stabilty control and is reducing efficiency. The motors and props should have more than enough torque for all the yaw authority you will ever need.

I used dronee plotter in the above graphs, I also use MissionPlanner.

I’ll definitely fix that, although like I say I don’t think it contributed to the behavior. One thing I realized I didn’t exactly duplicate on my most recent flight was the do_jump command.

On the very first flight there wasn’t a takeoff waypoint so the do_jump pointed to waypoint 1. On the second and third flight, I had inserted a takeoff command as the first mission command, but didn’t change the do_jump command and so it pointed to the takeoff command instead of the first waypoint. That shouldn’t make a difference, but maybe?

On my most recent flights I had the takeoff command, but I had the do_jump command pointed to mission item 2 (the first waypoint) instead of the takeoff command. I’ll give that a check although it probably won’t be until the first week of January.

dronee plotter looks pretty awesome. Thanks for mentioning it.