Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #15 on: December 10, 2015, 08:01:17 am »
For anyone wanting / willing to try moving HomeLocation a long way north or south for a test, I can say that I just had flights in VelocityRoam where I moved it 1400km north and 1300km south.  Moving it that far, I couldn't get the mags to go green, so I increased my mag warning level from .05 to .10 to get it to arm.

The one thing I definitely saw was a very slow north south oscillation in flight.  Distance was maybe a hundred meters.  Velocity was maybe a five meters per second.  In VelocityRoam I had no problem countering the oscillation, but if I didn't counter it, it moved as described.

I would suggest trying 500km or 1000km north or south; whatever it takes to still get an occasional green mag so it will arm.

Another thing that I can't say for sure was that there seemed to be a fast twitch (like a partial fast oscillation) that I have never seen before.

This quad is a stable old underpowered work horse running stock PIDs.

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #16 on: December 10, 2015, 08:26:07 am »
Does your mag health consistently go yellow or red at slightly more than hover power?  Perhaps more so when pointed say north than when pointed say south?  How about at higher power than hover power?

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #17 on: December 10, 2015, 08:27:22 am »
Warning:  Dangerous test!  Don't do it if you are uncomfortable with it.

Probably the first thing I would do if I could recreate it is log and graph the mags and ActuatorCommand.Channel(s) (=motors) while I used the GCS to run each motor up (to at least hover x 1.5 power) and down.  And also run all motors up and down at the same time.

One fairly good way to do this is to start by taking all props off and putting them back, upside down, on the motor immediately clockwise, like motor #1 prop goes upside down on motor #2.  This will cause all motors to blow upward and make testing somewhat easier.  Whether you do it this way or not, you must have props on because the motors won't pull many amps without props.

Tie it down securely (so it can't move, which would cause the mag reading to change) maybe to a board in your porch.  It's important that it doesn't move during the test.  Long wobbly landing gear might need to be removed.

If you can see a difference in the mags when running this test, there is a reasonable chance that it could be a wiring / mag issue.

lanzi

  • *
  • 53
Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #18 on: December 10, 2015, 08:42:07 am »
-Yes absolute stock pids after a fresh install shows the issue the same way as a pid tuned quad.

- using a lumenier qav 400 with a PDB in a non circular layout. there is heaps of separation between the Platinum V9 and the PDB (which is the lowest part of the frame).
the lipo is strapped underneath and all wires are twisted and braided. the V9 has a vertical separation of the PDB of more than 20cm.

- 2 tuning methods are used. OP-Tune (when the calculator was still online) and now LP easy-tune.

- only out of the ordinary i can think of is the 915mhz 3dr radio that i use for telemetry. although i doubt this is an issue as i tested it with a bluetooth module as well. same oscillations.

- yes all wires are twisted and braided. hi current wires as low as possible and gps and compass as high as possible.

- my second testframe is a blackout mini-h. showing the same characteristics although the components on that frame are really rudimentary. no osd, no vtx, no camera, just the revo, platinum v9, 12 amp escs, 2000kv motors and frsky 2.4ghz receiver.

-i would like to mention again that flying close to or over water makes the oscillations really bad.

- logging my flights i can say that my mags almost always stay green in flight. sometimes they go orange but never red. no matter how much throttle i give.

- will do a home location test with greater distance tomorrow (weather permitting). also will try the inverted propeller test to see what happens

thanks heaps TheOtherCliff for getting onto it!! May i ask where your physical location is? Do you think the compass declination could be an issue?

cheers
lanzi

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #19 on: December 10, 2015, 09:30:58 pm »
A 'bug I hinted at' is that the braking has a minimum speed in it and we seem to have a problem if it is below a certain speed.

lanzi

  • *
  • 53
Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #20 on: December 10, 2015, 09:42:26 pm »
yes it seams like the breaking values must have something to do with it. the faster i go the less oscillations i have. when i get slower to fly a turn left or right the oscillations get more.

lanzi

  • *
  • 53
Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #21 on: December 10, 2015, 09:44:41 pm »
by the way, did the inverted propeller test yesterday evening. tied the quad down and gave full throttle to see what the mag is doing. mag stays green up to 90 percent throttle above that it turns orange, but never red

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #22 on: December 11, 2015, 08:10:45 pm »
That is a smoking gun that we should look at high power wiring.  If you were to test again and rotate the copter and test at different compass points, you would find that there are directions where this (orange mag health) happens less or not at all.  If you included all possible orientations (not suggesting doing this) you would find a group (cone actually) of angles where the mag stays green at full power.

(assuming you aren't close to a magnetic north or south pole :) and your wiring mag field is much weaker than the earth's when measured at the FC mag sensor) 

Are all your high power wires twisted:
- battery to connector
- connector to PDB
- PDB to ESC
- ESC to motor (less probable issue here)

The mag direction is used like the accels for attitude.  The mag strength is used to determine mag health.

If you add an external mag field (from our high power wiring) to the earth's mag field, it can do any combination of making the strength stronger (ext field points north), weaker (points south) or even just change field direction without changing strength (points mainly in a disk (actually a cone) that goes east up west down).  This is vector addition (arrow addition) where for instance 10 north plus 10 east equals 14.142135... northeast and 10 north plus 10 south equals zero and 10 north plus 10 north equals 20 north.

So understand also that the mags are used for attitude, just like the accels.

What sounds like it is happening:
Say facing north it is worse:
When front motors add power the extra mag field changes the direction of the detected mag field and makes it think it is more nose down so it adds even more power to front motors.  It reaches a point where it thinks it is correct and reduced power on nose motors.  That changes the direction of the detected mag field and makes it think it is more nose up, so it reduces nose motors even more... Oscillation.

And when facing south there is no problem:
In the above description, the extra mag field does not change the direction of the detected field, it just changes the strength.  The change in detected mag field does not change the direction of the detected mag field, so no attitude change, so no oscillation.

It would be my guess that for say 300mm and larger quads with external mag on a pole, with all high power wires twisted, that this will not happen.

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #23 on: December 12, 2015, 06:44:29 am »
Today I went out and flew VelocityRoam with a camera on board.  Here is the video I made.  Do you see an oscillation?  What time / direction did it happen?  When the camera is facing the man (me) it is point just about straight south.

Password is:
oops



Timestamp in video is about 2 hours fast.
« Last Edit: December 12, 2015, 06:49:49 am by TheOtherCliff »

ggrif

  • *
  • 171
Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #24 on: December 12, 2015, 06:25:01 pm »
Following this with great interest! Thanks TheOtherCliff.

Lanzi, would you mind posting your most recent adjustments to the various parameters on the "System, Settings" tab? Now that OP is gone I can't go back there and look at all the suggested fixes.

I've just finished a new 480 quad.  I will see what happens with stock "Generic Quad" setup first. Then, if need be, dial in what you've come up with.

ggrif

  • *
  • 171
Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #25 on: December 12, 2015, 06:36:22 pm »
Today I went out and flew VelocityRoam with a camera on board.  Here is the video I made.  Do you see an oscillation?  What time / direction did it happen?  When the camera is facing the man (me) it is point just about straight south.

Password is:
oops



Timestamp in video is about 2 hours fast.

The oscillations seem to start when, I'm guessing, the quad has rotated about 180 degrees from South, so North?  Very consistent through the video.

lanzi

  • *
  • 53
Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #26 on: December 13, 2015, 10:38:31 pm »
Hi TheOtherCliff,

thanks heaps for posting your video. that confirms that you have the problem as well. evnen though your quad seams to be quite a bit bigger judging from the lower rpms.
my observation regarding the oscillation in your video are the following with South facing you and North facing the trees.

Bad Oscillations
0:20-0:36
1:11-1:46
2:02-2:30
5:38-6:04
Really Bad Oscillations
2:55-3:56
Ok Stable almost No Oscillations
0:58-1:06
1:50-2:00
2:38-2:52
Ok No Oscillations (really good)
4:00-5:22
What Have you done here? There almost No Oscillation on a 360 Degrees rotation!!!
Have you changed any settings on the fly?
4:35-5:37


Regarding your assumption that the problem does not show on frames bigger than 300mm does not apply to my setup. my QAV400 is bigger than 300mm with an external mag on a long pole plus all high current twisted and running very low in the frame. the frame itself is G10 and should have no impact.

the scenario you describe above in "what sounds like is happening"
is that something that can be fixed in code?

cheers
lanzi

lanzi

  • *
  • 53
Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #27 on: December 13, 2015, 10:48:22 pm »
hi ggrif,

these are my most recent settings. although i have to say the result regrading the oscillations with these settings is not much different to the stock settings.



Following this with great interest! Thanks TheOtherCliff.

Lanzi, would you mind posting your most recent adjustments to the various parameters on the "System, Settings" tab? Now that OP is gone I can't go back there and look at all the suggested fixes.

I've just finished a new 480 quad.  I will see what happens with stock "Generic Quad" setup first. Then, if need be, dial in what you've come up with.

lanzi

  • *
  • 53
Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #28 on: December 18, 2015, 07:32:12 am »
To keep you guys in the loop. After another few days of testing I was not able to reduce the oscillation at all. I set up a completely new frame with everything new. Frame, motors, ESC, ppm receiver and 5 V bec, op revo and V9 GPS on a mast. Nothing else. No fpv gear. Standard settings and PIDs. Oscillations show up  every time. Set home location 500 km north and 500 km south plus 500km east and west. Did not change a thing. Velocity roam and GPS assist show oscillations while hovering and with stick input especially when yawing.

Did the devs find out anything in the meantime?

Cheers
Lanzi

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #29 on: December 18, 2015, 05:26:54 pm »
By the way, the quad in my video is using aux mag, but the GPS/mag board is stacked right on top of the Sparky2 FC, so it is almost as close to the wiring as the on board mag.

I didn't change anything during that flight.  I haven't bothered to tune PIDs as this is a test quad and I have always assumed that this quad was just a little bouncy.  I actually thought that the video didn't really show any direction based oscillations.

The scenario in "what sounds like is happening" is one that should be eliminated by careful twisting of high power wires and/or a mag mounted on a pole.  Code could be written for a second mag calibration that gets run with props on at full power.  That second calibration would be used to track the changes at different power settings on each motor.  A lot of work for very little gain, and it would have to be recalibrated whenever the wiring gets shifted around and you would have to be careful to always install the same brand/size of battery in the same orientation with the same number of twists and stow the battery wire in the same location each time.

I think I did a decent job twisting my wires, but as I say, the mag sensor is not on a pole, so there still may be mag issues.
« Last Edit: December 18, 2015, 05:33:18 pm by TheOtherCliff »