My drone flipped over during its initial testing, can someone please help?
I have recently had to switch over from a Pixhawk 2.4.8 to a Pixhawk Cube Orange on my T960 hexarotor. The drone was working fine for a good while with the original Pixhawk until I noticed a low Vcc reading on it which was causing my Maxbotix SONAR to malfunction. I was also getting this warning on it:
Prearm Board 4.1V out of range 4.3-5.8V
I have just switched over to a Cube Orange and tried to do some initial testing today when it flipped over.
- The drone frame, power train, and other avionics were unchanged.
- The Prearm warning was gone.
- Motors were spinning in the right direction and connected in the correct order.
- Props were also attached properly.
- All parameters were at default save for the following params:
Tried doing a hover test today and found the drone to oscillate (precess?) and flip over during Position Hold mode. No error messages in the log but the RCOUT does look a bit strange:
The starting RCOUT to each pair of arms is different. Why?
Here is the drone build:
Here is the log of the crash from today:
2022-05-19 16-17-24.bin (368 KB)
Here is a log from a previous hover test with the Pixhawk 2.4.8:
You need to at least set up the initial tuning. The defaults work okay for a 1kg quad with 9 or 10 inch props.
Use the Mission Planner helper to set up some of the initial parameters, then set the filters, then work on the tune.
Thanks, Allister. I admit I did not look into the Initial Parameters feature (the spreadsheet) before. However, the drone was flying properly with the default params and Pixhawk 2.4.8. Any reason it should be different for the new FC?
Luck. I wouldn’t say the drone was flying properly. Looking at the graphs from your older FC there are oscillations in the pitch and roll there, they just didn’t get as out of control as the newer controller. I can’t explain why one would react so differently but mounting, internal damping, multiple IMUs, etc will have a difference.
Does the starting thrust differential not indicate a bias or error in the accel or gyro calibration? I will try the initial tuning settings and report back though, you might be right. These values work great for my F450 but not for a copter this large.
Also, naive question: how exactly do you determine oscillations? That plot you have posted just looks like noise to me. I would have thought that was normal. Something like this below would seem like obvious oscillations:
NOTE: this was back when I was trying to use PX4 with this setup.
Same. I have an old F450 that all I did was tune the filters and let it go. The rest of the tune is so good I can’t be bothered to try and make it better. I have other 450 sized machines that the defaults are hardly flyable. Each setup is different.
In that graph I posted earlier you should look at the difference between the actual and desired values. When tuned the two should follow each other closely. For example, if you look at the desired pitch (blue), you’ll see the actual pitch (yellow) jumping around or oscillating around it. Same can be said for the desired roll (red) and actual roll (green).
Here’s an example of a better tune:
I see. So it is oscillations around the desired value, not just a generally sinusoidal behavior that is indicative of oscillations. But that begs the question: suppose I do a manual or auto-tune but then change things on the payload of my copter. Will I have to tune again?
You shouldn’t have to, not if the tune is good. But it will depend on how much heavier, and how the payload is mounted (vibration damping, C of G, etc). Generally people will tune without the payload first, then add it and test accordingly.
Thank you for your support, Allister. It might take me a few days to repair the drone and test the new parameters but I’ll report back here when I do.
I did some Stabilize mode tests using the built-in Initial Parameters calculator today. Lifted off just a few inches off the ground before landing again just like the tuning instructions say. Looking at the logs it does seem like there were some minor oscillations towards the end of the hover but I am not sure if that requires further manual tune.
This is what it looks like on my F450 (default params with successful auto-tune):
I was throttling down in the end so I am not sure if those squiggles at the end were due to the drone making contact with the ground. What do you think?
Log files here:
T960 Stabilize test 1 log
T960 Stabilize test 2 log
F450 Stabilize and Alt-Hold reference test log
I would suggest you get the filters set up.
You will need to fly it a little longer. If it’s going to flip over you’ll know already from the short hops, but by the same token I’d still try to get it in the air a little longer to get some more data.
Off-topic, this caught my eye:
Is there a reason for your change to ArduPilot from PX4? Asking because my team wants to shift to PX4, and I am not sure about this change. Thanks!
I was very green at the time and I thought the instability issues were flight stack specific (I was wrong).
I did an Alt Hold test today for about a minute. Here are the same plots as before:
It seems well-behaved to my eye but I do notice there is a slight phase difference in the setpoint and control variables. How does one fix that?
I think the large spikes at the end are because I screwed up the landing. It is hard to land it when there is a slight lateral motion in descent – this always happens on Alt Hold mode.
- Is it safe to move on to Autotune?
- Should I do the harmonic notch stuff now or later? This board is capable of doing in-flight FFT tuning but my payload is atypical and will keep changing in weight and geometry. Should I do autotune now and notch filters with the payload or vice versa?
EDIT: forgot to add the log file
Configure the notch filter before running Auto Tune or you will just have to do another one after you configure it. I would update the firmware to latest Stable before doing anything.
Yup, what Dave said. Setup the filters first, then do the auto tune.
Thanks, both of you. I think what I am trying to ask is how exactly I should proceed given that the payload geometry and weight will change over time. Should I do both notch filters and autotune with the payload? Here is a 3D render of the drone + payload (in one configuration):
I imagine that if the aggressiveness of the autotune is kept at default then slight changes to the payload will not affect things very much but I wonder what would happen if the length of those long antennas I have at the bottom are changed.
I think it will depend on how flexible the antennas are (resonance) and how much the weight & balance changes. Once you’ve got the initial tune you could always fine tune again with a dummy weight simulating the payload, as long as the weight and position are accurate. Your motors seem to be working reasonably well now, but if the weight of the payload changes too much that could cause issues.
Do the FFT test first as per the instructions on the wiki. That will give you a better idea if you need both static and dynamic filters. Don’t auto tune until the filters are set.
Thanks again. I guess I’ll try and do the in-flight FFT tuning with and without the payload and some length of antennas to see how the vibration modes change. I’ll report back in a couple of days.
Here are the results sans payload:
Here is what it looks like with the payload (antennas extended out):
Not sure what to make of it. There seems to be a fundamental 50 Hz and integer harmonics at 100, 150 and 200 Hz. What should I change now? What should the filter bandwidth be?
Here are the logs:
- In-flight tuning without payload
- In-flight tuning with payload