X8 copter EKF (/gps) problems

Hi, we are in the process of tuning a large (1.4m/T-MOTOR U10 II KV100/28x8.4 propellor) X8 Copter running stock Ardupilot v3.6.8, on a Pixhawk 2. It has not flown yet: We are getting some EKF failsafe warnings in our logs that make us a bit apprehensive. We did some tests where we throttled up the copter until it was barely still on the ground and found it to be tilting one side up to 10 degrees away from level at which point we throttled down to prevent a flip-over. In the attached log (19-05-06_13-55-26.bin) this event happens at the end (around 1833sec). We observe that some motors saturate at the lower limit (RCOUT.C2, for example at PWM value of 1220), but we don’t know if this is normal for a copter that is still in contact with the ground, we have not had the courage yet to fully lift off before consulting. Vibrations seem to be within tolerance as well. We verified that the copter is well balanced.

To rule out wiring/motor placement mistakes we have tested the response of all individual motors to throttle commands (pitch/roll) and when we lift and lean the drone, all motors seem to behave appropriately (meaning they turn slower/faster when they are supposed to), we have attached the log file for this test: 19-05-06_16-36-50.bin. Note that the Pixhawk is pointing to the left, so we have set AHRS_ORIENTATION=6 (Yaw270).

We are not sure what causes the numerous EKF failsafe events. In Mission Planner, when looking at the EKF status the following flags are shown in red: velocity_horiz, and pos_horiz_abs, the 5 bars show very low (almost 0) values, although we have occasionally seen the “Velocity” bar shooting up for a for a short time. We suspect it might be related to the GPS because we observe on some occasions a large number of Gps Speed errors, usually in the range 1-2 m/s. This behaviour is intermittent however and we don’t really understand what causes it.
The copter is equipped with a single Here+ GPS sensor, mounted on a mast of approximately 30cm, which required us to lengthen the cable; could this compromise the signal integrity? Compass and status LEDs seem to work fine though, do they share the same data bus? GPS was used in a large open field, and the system was “warmed up” for over 20 minutes but the error persisted. When looking at the EKF innovations in the log we get only values of 0 for [NKF4/NKF9].SV, is this normal or does it indicate a problem?

Log 19-05-06_13-55-26.bin: https://drive.google.com/open?id=1im-UGNkM42BDDp7K5RGT_1MFZZgRvY6K

19-05-06_16-36-50.bin (761.4 KB)

@jhw84

I have some experience with X8’s, and this sounds similar to an issue we had trying to fly sub-par PID values. However, it looks like you are using the default values, so I wouldn’t think this is explicitly related. My only other thought would be make sure the ESCs have been properly calibrated.

I am interested in tracking this for situational awareness and hope you are able to come to a solution. Best!

Although it is a little risky, but the quickest way to figure out if there are any wiring/orientation/prop error is to do the hand test. One or two people hold the copter above their head (protective gear recommended) and in stab mode just give some throttle and check pitch roll and yaw response And try the resistance against roll and pitch by hand.

(It a a stupid question, but you wired the motors as in the docs (relative to the not rotated FC orientation)?

I ran on a GPS problem on one of my builds. While on ground the EKF would settle down, in the air, with the copter facing north, any northbound tilt (lowering the front-mounted GPS and lifting the bulk of the frame behind) would result in a fast see-saw oscillation in number of satellites (and the corresponding Hdop) generating a GPS Glitch event that would interrupt its auto mission. I’ve repeatedly tested and recreated the event then went on reading about GPS antennas.
Now, studies show that while being a perfect match for single-band GPS (and probably Galileo as well, since it shares the same band) going GNSS with GPS+Glonass on the usual 25x25 mm single-feed ceramic antenna patch used extensively in our hobby is a very bad decision. They concluded that the ceramic patch is “saved” by the receiver’s sensitivity.
I went on and appropriated a Tallysman dual-feed antenna off a derelict A2 (the one in A3 is even better) and said good bye to GPS troubles.

In order to confirm that your ESC calibrations are OK, go to the motor test tab and command very low throttle on all engines (ex 7 -8 %) If all start the calibration is ok. Also, make sure that when you tilt the copter around the artificial horizon shows the movements correctly. As for your GPS issues make sure you try it out in an area far from large objects if you haven’t already

It is always a pleasure reading you. Do you have any antenna to advice on using?

It’s all about the plastic case and ease of use.
DJI’s A2 GPS is easy. Their proprietary canbus solution sits on a secondary pcb soldered to the main mag+gps+antenna pcb. Hot-air it out and you end up with nice soldering pads for gnd/5V, GPS Rx/Tx and MAG I2C data/clock. Just one more wire is needed inside to get 3.3V from the gps LDO to power the mag.
I’ve even jury-rigged a tri-color ToshibaLED inside using the space vacated by the canbus thinghie, for the neat led-on-gps modern approach :slight_smile:
Everything is neat and compact, I took advantage of the nice shielding of a piece of USB3 cable for data transfer, and if you go the DJI way of installing the GPS with the cable facing forward, the mag in in its usual orientation. It’s a classic HMC5883, no troubles here. And DJI being DJI, i’d swear that white plastic “radome” on top is a good-quality radio-plastic.
The dual-feed Tallysman antenna inside, with it’s extensive amplify/filter/sun stage is around $65 off a disibutor like Farnell. Add a $20(?) genuine NEO-M8N receiver, a genuine HMC5883 mag and the convenience of a compact well-built shell you can doble-side tape-it to your GPS mast, at anything below $120 it’s a steal.

On the A3 GPS I sadly used the same approach - erase everything proprietary canbus and expose serial/I2C connections - and I had a hard time connecting to the mag. Then it dawned on me that there’s already a RGB led onboard, besides gps/mag, and all three are being driven/read by the same microcontroller, and it can be easily repurposed for UAVCAN, disregarding it’s original DJI’s programming. But that’s a task for the coming autumn If ever… because ZED-F9P, dual L1/L2 antennas and stuff.

1 Like

Guess i’ll go the F9 route with the adviced double frequency antenna. I guess the TW7972 from Tallysmann would be a good match for it.
Do you know by any chance if the Taoglass CGGBP.35.6.A.02 present on the Zubax uavcan gps is good for the task? Is it double frequency?
Here the specs of the antenna present on the Zubax GPS module: https://taoglas.com/images/product_images/original_images/CGGBP.35.6.A.02.pdf

Thank you all for the helpful tips. @ThePara, it turns out in this case the GPS issue was the telemetry radio strongly interfering with our GPS. We discovered this by chance, where we found that the GPS would work correctly, reliably, and with very high precision when connecting the ground station computer to the pixhawk over USB (thereby reducing the data being sent wirelessly). Repositioning the telemetry transmitter completely resolved the issue. As a backup and for improved accuracy we have also added a second GPS module and configured GPS blending, the drone now carries a Here+ (primary), and a Here2. We have managed to do some flights (see Tuning 1.4m X8, oversensitive including movies). The compasses are still quite unhappy, so we are going to place the Here modules further away from any large current wiring, but the drone is flyable even though it will require some tuning.

@Nolan_Reep, @cyberpilot360: thanks for the tips, we checked it out: It seems that the ESC calibrations were very good.We found that for all motors that the throttle percentage to make them turn where all between 5 and 6%.

@Eosbandi: In the end we did not have the nerve to carry the drone above our heads. We checked and checked again the motor responses to RC inputs and tilting the drone without props. In the end it turned out to be correctly configured, but the stock PID values did not control the drone very nicely (see also our other post linked above) which may have given the unstable appearance during takeoff. We figure it is best to take off confidently, and not linger too long with legs barely touching the ground but it takes some courage to do so.

Once again thanks for all the help on getting this thing in the air. We still have some tuning questions in the other post, which we hope to resolve.