smark-

  • *
  • 16
Position Hold issue
« on: March 27, 2017, 11:27:02 pm »
Hi all,

it's the first time that I post on the forum but I've been involved with QR for quite some time now. I have a TBS quad properly tuned and I have tried almost all the autonomous flight modes (except for POI) and they all work well. However I noticed that if I keep my quad in PH for more than 15-20 seconds without touching the sticks, the quad rolls to the right and falls from the sky. I've been able to switch to attitude mode a couple of times and save it, but once I did not manage and I broke 3 props. What could it be? I would like to point out that I'm using an external magnetometer, INS13 navigation filter and the quad normally is rock solid (both in VR and PH).

Re: Position Hold issue
« Reply #1 on: March 28, 2017, 01:05:46 am »
That sounds like either ESC LVC cutoff or FC failsafe (loss of RC signal, bad signal connector, etc.) both of these would happen in non GPS modes too.

Does it always happen toward the end of a battery?

ESC LVC cutoff is probably not the issue if the ESC firmware is SimonK or BLHeli

I would log a flight where it happens and play back the log, especially looking for health alarms, or scope readings that don't make sense like right side actuators (motors) being told to go high power when they go to zero power.  Or uncommanded right roll, etc.

smark-

  • *
  • 16
Re: Position Hold issue
« Reply #2 on: March 28, 2017, 09:21:32 am »
It only happens in PH and only if I leave the sticks for some time (10+ seconds). I have never experienced it in other flight modes (including VR). I would assume that if I switch to VR and leave the sticks for some time it would happen as well, but I haven't tried. In all the three cases I was quite close to the quad (say 4 mt) and the battery was still full. I have BLHeli on my ESCs but I would exclude both RC signal loss (because it happens only in PH) and low voltage issues.
 It seems like that the EKL goes haywire when it's too long in a "steady state" (possible gyro drift related issues?) but I'm able to recover switching to a stabilized mode.
I will calibrate my sensors again and log the next flight. In the meanwhile I have attached my settings so you can spot if there's something wrong in the calibrations.

Re: Position Hold issue
« Reply #3 on: March 28, 2017, 01:56:43 pm »
The EKF actually can diverge, if it runs in a very stable and steady situation for a very long time, due to a floating point arithmetic glitch (this is a general issue with digital implementations of extended kalman filters), however this is unlikely to be your cause since

a) Usually that wont happen in flight since there is too much noise, normally you have to keep the board extremely steady for a long time, like during a bench test with little or no vibration
b) that situation is already being caught in the firmware based on covariance value trends, before the state estimate actually diverges and the EKF is being seamlessly re-inited. When that happens it might cause a short jump or jerk of the quad, but it shouldn't cause a crash like you describe.

From the symptoms, it seems more likely that the cause is GPS caused. A sudden loss of sats and jump in GPS coordinate - or a reset of the GPS receiver - can screw up position hold badly and can also cause the EKF to temporarily loose attitude estimate to the point it could crash.

When the first issue happens (we called that issue the "EKF glitch") it will cause a warning in system alarms which would prevent the board from being re-armed until the next reboot or manual filter reset

The second (GPS) issue would only be visible in a telemetry log. Would it be possible for you to provide a telemetry log (.opl) of a flight where this happened (or will happen)? Especially system alarms and GPSPositionSensor data would be important to chase this down.

smark-

  • *
  • 16
Re: Position Hold issue
« Reply #4 on: March 28, 2017, 10:18:59 pm »
I did some research in the forum, according to your feedbacks, and I found something that looks similar to the issue I have:

https://forum.librepilot.org/index.php?topic=1202.msg8809#msg8809

therefore I will to set up my Ublox M8N to "Airborne 4G" and log the flight in case the issue is still present.

Mateusz

  • *
  • 808
Re: Position Hold issue
« Reply #5 on: March 29, 2017, 12:20:39 pm »
I did some research in the forum, according to your feedbacks, and I found something that looks similar to the issue I have:

https://forum.librepilot.org/index.php?topic=1202.msg8809#msg8809

therefore I will to set up my Ublox M8N to "Airborne 4G" and log the flight in case the issue is still present.

I don't know if you can set dynamic model to "Airborne 4G" via UbloxCenter. If that is what you mean. Revolution reconfigures GPS to it's own settings when you connect battery.

Another thing is that if GPS resets itself then it's hardware fault, but you can also have problems when you have strong transmitter too close to GPS antenna. Even if it's different frequency, it can cause problems like losing sats.

I suggest also to go to map end right click to enable "diagnostics" then you will see afaik red color route. These are the raw positions from GPS before it gets into EKF. Normally you would see just a couple of meters error, that is normal for GPS. But when you see spikes above 10 meters and then GPS position slowly going back to where most of smaller spikes occur, that will be a problem.

Some of spikes can also be caused by multipath reflections from building walls if you use patch antenna https://librepilot.atlassian.net/wiki/display/LPDOC/Homemade+Helix+GPS+antenna

Also you need to leave your GPS for 20min in completely clear sky to update almanac which is valid for ~6h after unplugging battery. If your almanac is not up to date, and you started flying right away, it may not have yet information about all satellites nearby and lose fix more easily.

smark-

  • *
  • 16
Re: Position Hold issue
« Reply #6 on: March 29, 2017, 08:05:53 pm »
I had in mind to change the value in the UAVObject Browser so the Revo would set the Ublox accordingly.
I would tend to rule out disturbances from other antennae, since I've seen the same problem with the FPV TX disconnected and the telemetry power output set to 50 mW. The receiver antennae are 20-30 cm away from the GPS (mounted on a 12 cm mast). Before flying again I will also let the GPS update the Ephemeris.

smark-

  • *
  • 16
Re: Position Hold issue
« Reply #7 on: April 02, 2017, 09:50:30 am »
I have good news. After updating my M8N to the latest Ublox fw (3.01) and setting it up properly for EU I haven't experienced the issue anymore. Today I have tested PH next to a building for several minutes and nothing weird happened. Thanks for your support