Yesterday I decided to test the max speed of my quadcopter while cruising in POSHOLD trying different angle_max settings. When I tested at 30º of angle max I was achieving over 60kmh in straigh line but then a problem appeared. I noticed that sometimes at this speed if I released the pitch stick the drone would not brake smoothly but instead do what seemed to be an uncontroled yaw spin (~180º) and then stabilize.
I would expect the drone to brake “smoothly”, keeping its current heading without the unexpected yaw spin.
I suspected the culprit may be the PID settings of my build: 5 inch drone with ~850g. I tried increasing P values in all axis but with no success. Someone also sugested me the problem could be magntometer interference but i am not sure how to check this in the log file. This said, I am not sure what is the true source of the problem and would like to know if anyone already faced this problem and how to solve it.
Logs: 4.89 MB file on MEGA
If you take a look at your log, when your drone is braking it is saturating the motors at minimum, and this is what makes it spin.
Maybe you will have to tune some PID gains better, but I really do not know what can be done.
And I think it is better to use Loiter than PosHold flight mode, in loiter you will have more params to properly setup its behaviour.
Thanks! I didn´t notice that. Maybe it is caused by the excessive brake rate of the POSHOLD mode… but i’m not sure. I wiol have to investigate more.
Just another question. How can we be sure it is not magnetometer interference? I’m worried the gps and mag unit may be too close to the power cables and causing this behaviour…
Use this graph in Mission Planner from the special graph pull-down menu:
But make sure that the changes you see are not caused by Yaw activity which will obviously change the magfield. The best way to use it is a flight with throttle changes and no Yaw input.
I wasn’t aware of it. What is the instruction to analyze this kind of graph @dkemxr ?
Maybe the norm of mag field has to be constant despite of throttle output changings (keeping yaw fixed)?
Yes, that’s right. You will see the magfield trending with Throttle Out. It’s best to test this with no yaw input and blip the throttle from a hover. We can see here when we add Yaw that the Mag response looks to be a function of Yaw so you can’t tell if there is influence from Throttle. I suspect there isn’t.
Nice, thanks a lot for the information!