First I know I shouldn’t have taking off in position hold but right when I took off. The quad did a yaw then just left the area. I caught it in time. Only broken props. I did see a mag field error right before it happened. I had logging set up for pid tunning. So Im hoping someone can tell what happened from the log. I feel defeated lol. Tell me what I did wrong. https://drive.google.com/file/d/1eWsUjxepFXkPA76d8waBWIIT1frwHOFM/view?usp=drivesdk
True but you shouldn’t use Position Hold at all. It’s essentially deprecated replaced by Loiter. Still around obviously but Loiter is much more capable. Not that it’s a source of the problem, just FYI.
You disabled a lot of useful log fields. Like GPS and Compass to name 2 that may be helpful now…
In any case there was a GPS Glitch or Compass error that took awhile to clear.
I think the gps cable might be damaged so I switched the gps out. Also took the gps out of the compartment and using a mast now
. Hopefully it wont happen again. I thought my filters might have been to aggressive. Noise is under -50
I deviated from the methodical tuner steps. So I stupidly disabled items I shouldn’t have. Mag fit was done but something obviously went wrong. Compass error was odd because 5 flights the mag fit graph was almost perfect. Ive decided just to start over and let autotune do its thing. Even if its over damping the set point. Follow the Methodical configurator steps only.
As @dkemxr said, you have disabled a lot of useful logging, so there are no CTUN messages and I cannot see what the machine was really thought of its throttle levels, so what follows is a fair amount of speculation, but…
-
For the immediate cause of the “flyaway”, I think it was simply switching from an altitude-holding mode to a manual altitude mode with throttle at 1704. The machine did what you commanded: yeet up into the air. GPS/compass had about nothing to do with it, at least directly.
-
[Speculation warning] The reason for this (stick at 1704) apparently was that the machine was not increasing its altitude in PosHold (any AltHold-like mode could be there) when having throttle stick as high as 1740. Here I have no real idea what’s happening, except maybe for physical setup problems with a barometer. In my practice, such things happened when the barometer was too exposed to air distorted by propellers, but your build might be suffering from an opposite issue by the looks of it: possibly lack of pressure transduction. Check what happens there (in Stabilize, tracking logged altitude vs what you see in real life) and fix it before attempting any altitude-managed modes.
-
Your likely next problem is a blasphemously badly tuned yaw, which I judge by poor desired vs actual yaw tracking deviation (more than 20 degrees), as well as by
ATC_ANG_YAW_Pbelow 3,ATC_ACC_Y_MAX = 93for a machine that is less than a human in size, andATC_RAT_YAW_FLTE = 1which all seems to be an indication that an autotune has failed. Maybe that’s a compass issue, maybe something else, but definitely way too bad.
Did previous beta releases fly fine with same settings?
I am working on a new build and recently used the beta version, as I had success with it on other vehicles. In hindsight, I should have stayed in stabilized and altitude hold modes while tuning.
Right before the copter yawed on its own and took off, I noticed compass errors and a possible GPS glitch message. I was preparing to perform a yaw autotune at the time. During my initial QuickTune and AutoTune, the filters seemed significantly over-filtered, which may be why the yaw P value never exceeded 0.4.
It seems QuickTune does not tune yaw higher than the default P 0.500. Is that the maximum allowed value unless I manually increase the limit?
Edit. Oh you mean the stabilization pids. Yeah I just noticed that too lol. It should be higher. Its a 22 inch propeller 6KG AUW. Thurst is 4:1 in its current form
Yea, you have default QUICK_YAW_P_MAX,0.5
This is OK as you will be running Auto Tune after it anyway.
Where in the logs can I find what pid values that caused occilation during quick tune? Ive enabled almost everything to be logged. I want to find out where the limits are before manual tuning the P to R ratio.
They should appear under QUIK
Txs for the report. I’ve added it to the 4.7 issues list as an item requiring more investigation.
As mentioned by other reviewers, a lot of logging has been turned off which makes analysis difficult. Especially turning off the compass and navigation (aka PSC) logging makes it very difficult to learn much.
The most visible problem is the yaw estimate. We see the EKF3’s estimate in green below and the backup DCM’s estimate in red and they’re very different. There are also multiple “ground mag anomaly” messages.
The yaw estimates converge just after the pilot switches to stabilize but of course, the estimates are not related to the flight mode (the EKF has no idea what flight mode the vehicle is in) so this is just a coincidence.
If there is a software bug I think the most likely issue is that PosHold may not be handling yaw resets properly. PosHold is more complex than Loiter in this way because it mixes pilot controlled angle mode (equivalent to AltHold) and velocity control (similar to Loiter). When the pilot is providing angle inputs it uses those, when the sticks go back to the middle it slows down and enters a velocity control mode.
We should also check that when the EKF yaw resets and the vehicle is in PosHold or Loiter, we correct rotate the position controller’s desired velocity to match. If we don’t then if the vehicle is flying quickly when a yaw reset happens we could end up with the vehicle suddenly changing direction until the desired velocity decays away to zero.
The attitude controllers seem to be mostly doing what they’ve been asked to do. See the desired vs actual graphs for roll and pitch below.
Here’s the equivalent for yaw:
In a event like this would switching into land bring it down right safely? I had a hard time with stabilized because in the panic I lost orientation. What would be your suggestion?
Hi @Squirrel5,
In general in this situation I would switch to AltHold mode but in this particular case, even if the vehicle had been left in PosHold the pilot would have been able to recover it OK.
The pilot switched to Stabilize mode but the vehicle still crashed. I think this was because the pilot lost “situational awareness”. E.g. he/she didn’t know which way the vehicle was facing.
The vehicle eventually hit the ground but it looks like the pilot didn’t raise the throttle while the vehicle was descending.
So, I’d say maybe the pilot needs to practice a bit more on recovering a vehicle in AltHold and/or Stabilize mode? A good test is to face the vehicle towards the pilot get it up to speed a bit and have him/her recover control of the vehicle in AltHold or Stabilize.
Im a he and ill definitely try that. I’ve mainly use fpv quads. So my line of sight skills are not that good. Could you take a look at my filtering. I know im getting frame resonance around 80hz but that appears to be a 2nd harmonic. Is using a throttle notch the right approach? Motor noise seems to be covered. Ive been able to lower the bandwidth to 15 and attenuation 15. Gyro to 60hz.
Alt hold is a pretty good fallback mode, though it won’t really help you if visual orientation is confused and you are fighting some wind. But it will produce a very controlled landing by simply lowering the throttle a bit - less challenging than a similar situation using stabilize mode.
did some manual tuning. Getting better but yaw is still not right. Autotune never goes more than p .5 I.05 with the stability P at 3.5.
Most times that happens is because of poor filter configuration.
If you share a log with a few tests with LOG_BITMASK set to 180222 or a superset thereof, and with batch logging configured (that includes pre+post filter logging in INS_LOG_BAT_OPT) or better, as well as maybe few photos of the vehicle, that would be helpful for more useful advice.
Ok i will in a few hours. My filter delay is 24ms and d term is 7 ms. Only hint of noise above -50 is on the Z axis 28hz only -44 db. Im using two esc telemetry notches and 1 throttle notch for frame resonance. Gyro filter is 45hz. I had it ar 60hz. That dropped the gyro delay to 15ms but noise was over -50db. Roughly -42.
22 inch prop. 900 frame. 6kg currently








