Donny

  • *
  • 12
hello all developers and experts:

     I meet some about kalman(ekf) algorithm problem on revolution board and hope you can provide suggest and some way, thank you very much in advance. :)

    First, i introduce my hardware configure to you: revolution + on board only  mag sensor + GPS of NMEA data protocol + sbus remote control input, you can detail look from attachment [revolution_hardware_config.png]. And the software release version is 16.09.

    I had completed all sensor calibration and all sensor state or alarm is green or good.

    When i set algorithm to basic(complementary), the autopilot is horizontal and aircraft is still. it looks very good.

    When i set algorithm to complementary + mag, the autopilot also is horizontal and aircraft is still. it looks also very good.

    When i set algorithm to complementary + mag + GPSOutdoor, the autopilot also is horizontal and aircraft is still. it looks also very good.

   But when i set algorithm to INS13Indoor or GPS Navigation (INS13), the autopilot goes all over the place, it is not horizontal, but aircraft is still. I check all setting and redo configure,but this problem keep exist. :'( :'( :'(

   The algorithm INS13Indoor and INS13 is base of EKF, i doubt the default  P Q R variance martrix is incorrect, but i don't know how to set these parameters. so i hope you can introduce any way about them.

   I hope you can help find some problem about setting error lead this problem, thank you... :) :)

   About autopilot go all over the place, you can look picture from attachments.

   And i have uploaded my configure file to attachments.
 
thanks,
Donny.
 
   
 
   

Re: About IN13indoor and Gps Navigation(INS13) problem on Revolution
« Reply #1 on: August 17, 2018, 11:19:15 am »
Don't mess with the EKF P Q R.

A certain amount of level change in INS13 is normal.  INS13 uses the full 3D mag and so it gets some leveling information from both the accels and the 3D mag.  If it is sloped less than 10 degrees and has slight jitter, say less than 3 degrees, that is fairly normal.  If it is moving around more than that in a regular oscillation, that is usually caused by a bad mag calibration.

Beware that once mag calibration is started, it is always sampling.  Because of that beware that you should not set the aircraft down at any time during mag cal.  Beware that you really need to use RF telemetry (not USB) for mag cal.  Don't do mag cal close to your car or other large metal things.  It really takes two people to do mag cal.  One to run computer and other to do aircraft rotations.

Donny

  • *
  • 12
Re: About IN13indoor and Gps Navigation(INS13) problem on Revolution
« Reply #2 on: August 17, 2018, 11:41:33 am »
First thanks Cliff. :)

I understand your reply about mag calibration. i don't have opLink module to further calibrate mag sensor. but when i calibrate mag sensor, i move the aircraft one meter away from the ground and  i have complete mag calibration and mag error level is below 5%, it looks good.

I have buy oplink module from Amazon, i receive your advice. Please asks: Do you have other problem about this view?

thanks. :)

Re: About IN13indoor and Gps Navigation(INS13) problem on Revolution
« Reply #3 on: August 17, 2018, 04:39:19 pm »
In INS13, is the tilt less than 10 degrees with less than 3 degrees of actual jitter?

Donny

  • *
  • 12
Re: About IN13indoor and Gps Navigation(INS13) problem on Revolution
« Reply #4 on: August 31, 2018, 08:55:14 am »
Hi Cliff :),
   Now, I have  bought a NAZA GPS with  mag and connect by receive port at revolution board. And I calibrate aux mag sensor by oplink and away from mag source,example car, pc and so on. you can look the result after calibrated by the picture.
    But when i set algorithm to INSindoor,  autopilot has still gone all over the place.  please look my frame and provide some advice about the problem.thank you.

Donny

  • *
  • 12
Re: About IN13indoor and Gps Navigation(INS13) problem on Revolution
« Reply #5 on: August 31, 2018, 08:57:38 am »
 :)

Donny

  • *
  • 12
Re: About IN13indoor and Gps Navigation(INS13) problem on Revolution
« Reply #6 on: August 31, 2018, 09:00:57 am »
FYI

Re: About IN13indoor and Gps Navigation(INS13) problem on Revolution
« Reply #7 on: August 31, 2018, 05:30:28 pm »
If the GPS is mounted in back, then you have GPS mounted wrong.  Not because it is mounted in back, but because arrow on GPS points to rear.  You can fix this in Attitude->Magnetometer->AuxMagOrientation->Yaw by setting it to 180

Most DJI GPSs have cable coming out the front.  It makes sense if you think about it.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: About IN13indoor and Gps Navigation(INS13) problem on Revolution
« Reply #8 on: August 31, 2018, 09:28:19 pm »
Quote
But when i set algorithm to INSindoor,  autopilot has still gone all over the place.  please look my frame and provide some advice about the problem.thank you.
Using INSIndoor, jumping position in map is normal, without data from GPS sensor.
You should use INS13 instead and adjust correct Auxmag orientation as already reported.


Donny

  • *
  • 12
Re: About IN13indoor and Gps Navigation(INS13) problem on Revolution
« Reply #9 on: September 01, 2018, 05:13:12 am »
I label the frame nose in the picture, please loot it <250-3-3.png file>.  my frame nose and GPS orientation is same.

In INS13Indoor, I reset Aux mag orientation yaw to 180, but all bargraphs show not zero. i think i don't need to adjust the orientation because they are same.

thanks your reply.

Donny

  • *
  • 12
Re: About IN13indoor and Gps Navigation(INS13) problem on Revolution
« Reply #10 on: September 01, 2018, 05:23:41 am »
i re-set aux mag orientation to [0,10,20], the bargraphs show zero.

Re: About IN13indoor and Gps Navigation(INS13) problem on Revolution
« Reply #11 on: September 01, 2018, 05:32:35 am »
The alignment bars must show 0,0,0 in all possible rotations.  Move it slowly around and you will probably see that you made it worse at some angles by setting orientation to 0,10,20.

If the GPS is mounted in front of the quad then it is rotated correctly, with GPS arrow pointing forward, and then the Aux Mag Orientation should be set to 0,0,0.  Do not set it to 0,10,20

Donny

  • *
  • 12
Re: About IN13indoor and Gps Navigation(INS13) problem on Revolution
« Reply #12 on: September 01, 2018, 06:27:26 am »
Hi Cliff:
     I re-mount GPS mast and mag, but the aug mag orientation Y axis show -6, and the orientation all are zero. how to fix the problem?
     

f5soh

  • *****
  • 4572
    • LibrePilot
Re: About IN13indoor and Gps Navigation(INS13) problem on Revolution
« Reply #13 on: September 01, 2018, 08:53:44 am »
Bargraphs show the difference between the measured Mag vector by onBoard mag sensor and Auxmag sensor but your onBoard sensor is more disturbed so you cannot trust him completely.
After you set the Mag usage to AuxOnly, it can be used for navigation because is far away from disturbances sources :
- Lipo saver with permanent mag inside .
- Strong currents from motors/esc/power wires.

Of course calibration is also affected by the above magnetic sources.

With onBoard mag less disturbed, you should show something like that while rotating Quad in various orientations
(jump to 8:29):




« Last Edit: September 01, 2018, 08:59:56 am by f5soh »

Re: About IN13indoor and Gps Navigation(INS13) problem on Revolution
« Reply #14 on: September 01, 2018, 04:14:08 pm »
   But when i set algorithm to INS13Indoor or GPS Navigation (INS13), the autopilot goes all over the place, it is not horizontal, but aircraft is still. I check all setting and redo configure,but this problem keep exist. :'( :'( :'(

"Autopilot goes all over the place" is the original problem.  When you say autopilot, I am guessing that you mean the Primary Flight Display; the box in the top left corner of the Flight Data page.

Leave the Aux Mag Orientation set to 0,0,0, and Mag Usage set to AuxOnly.  I assume the GPS is mounted in front of the quad.  Is that the place it is mounted?  If so, that means the arrow on the GPS is pointing forward and so the Aux Mag Orientation should be 0,0,0.  From the pictures, I see that the Revo is also mounted correctly if I assume the GPS is in front.

Added about mag calibration:
When you calibrate the mag, be aware that the GCS is always gathering data, not just when you push the button 6 times.  Move the quad slowly (at least 1 whole second) from position to position.  Do not set it on the ground at any time during calibration.  Calibration must also be done far away from metal things like cars, metal fuel tanks, metal beams in buildings, etc.  Calibration should ideally be done via telemetry, not USB, but USB may be OK for AuxOnly usage if you carefully keep the USB cable away from the GPS during calibration.

When using INS13, it is normal for the PFD to be tllted by as much as 10 degrees, and for it to wiggle as much as 3 degrees.  Is it worse than that?

Does PFD respond correctly?  Whild hilding the quad in hand, pitch the front down and PFD shows more brown dirt.  Roll left (left side down) to tilt the quad left, and the PFD should roll right.

If all this is working now, and the motors respond reasonably (zero throttle stick is motors off, low stick is low motor speed, etc.) I would test hover it outside.  Plug battery in and wait for 12 or more minutes (for GPS to download almanac) before first flight of the day.

If PFD still looks crazy to you, maybe make a video of it for us to see.
« Last Edit: September 01, 2018, 04:41:20 pm by TheOtherCliff »