M4 Ladybrid Position Hold and PH controller Questions

Info and discussion about the autonomous Micro FC, suitable for nanos, micros and mini multirotors

Re: M4 Ladybrid Position Hold and PH controller Questions

Postby sandmen » Sun Jan 04, 2015 8:09 pm

OlliW wrote:THX a lot for these many suggestions

as regards the calib, well, I think it's not like that I didn't try to squeeze as much info out of the wiki as I could ;)

I might not have been clear enough in some points
* I didn't fly on or from the balcony ;), I just wanted to tell that I've ensured that the M4 had outside temperature :)
* Q: Let's assume "perfect" calibration of both the acc and mag at RT, could the changes in calibration at the sub-degree temperatures explain all or any of the above effects? (I wouldn't think so, but ...)
* I understand that the "original" toilet bowl is typically due to having a mag and some currents during flight, but that the AQ uses the mag just at startup. However, my thought was that if the mag at startup gives south wrong by, let's say, 15° that then the navigation controller would apply the correction signal into a direction off by15^, would soon after realize that the craft doesn't move into the expected direction, would again calculate a correction which is wrong by 15° and so ... I could imagine that this mechanism could lead to flying circles. So, my question. I rephrase:
Q: If the mag predicts south wrong by e.g. 15°, what would the consequences for PH be?
(the 15° is just totally arbitrary number I've chosen for the sake of the example)

I will try to post a photo as soon as I can, but it's really close to the reference build.
I have a BT installed, is this maybe know to worsens GPS reception? (wouldn't think so, but ...)

As regards the HAcc and VAcc thing, I might have underestimated this ... I admittedly assumed that the solid blue led was chosen such that it would work "reasonably". I'll see if I get a telemetry log (working extensively in the outside is not very convenient currently LOL). Maybe I should try to better understand accuracy and resolution of GPS (I assumed that, as usual, resolution is much better than accuracy also for GPS).

Q: With the blue led on, what accuracies can one expect for the horizontal and vertical position hold? (3 m???)

Maybe it could be worthwhile to consider some blue led signaling from which one can deduce the GPS accuracy, such that it blinks faster the better the GPS, or blinks faster with every 0.5m better accuracy, or so ... I would find it inconvenient if one would have to bring to the flying field a "car full of electronics" (i.e a lapi and run telemetry to check H/VAcc) just to fly the M4-LB ...

Q: A question as regards the RTH: Is it supposed to also bring back the aircraft to the original altitude of the home position? I read the wiki to say yes, but never could see that happen.

Thx for your help, and sorry for these questions, I feel a bit stupid myself :oops:
Olli


- Of course, wrong, bad MAG, is the one of the reasons for the "TB" effect.
After the init-phase, we have GYRO and ACC and GPS-Heading to get the best heading.
If we are too far off with the MAG, it makes trouble...
- The blue LED tell's you only, minimum accurancy for POS-Hold/navigation is reached.
Yes, not a bad idea with blinking... but I'm not sure, how many different quality-signales, you can detect.
- Did you carefull check your throttle factor ? Did you have your throttle, in mid-pos (700 +- throttle dead band (40))?
If you are out of the 660 - 770, you will tell the controller rising or sinking!
- For RTL and altitude, you must be in 700+- throttle dead band! Then switch to RTL, now the M4 will also try to reach the altitude.
- The conditions in your Video are far away from good for GPS! I'm not sure, what you expect from the GPS :-)
sandmen
 
Posts: 997
Joined: Fri Jun 22, 2012 7:25 am

Re: M4 Ladybrid Position Hold and PH controller Questions

Postby OlliW » Sun Jan 04, 2015 10:34 pm

many thx for your answers !
I'm not totally satisfied though :P

Of course, wrong, bad MAG, is the one of the reasons for the "TB" effect.
when the mag is used inflight ... that's what I get at least from the web, but the AQ isn't using it inflight to exactly prevent that ... so, to have this unambigously in my head:
You're saying/confirming that a wrong mag does lead to an in-flight TB effect also with AQ's procedure of using the mag?
(y/n)
If we are too far off with the MAG, it makes trouble...
LOL, sure ... my question was what is "too far off" ... it's not very usefull to know that if something is not good enough that it then makes troubles ... ;) (it's a "good" statement though because it is always true LOL)
too far off = 15°, 10°, 5°,1°,0.1° ???
Did you carefull check your throttle factor ? Did you have your throttle, in mid-pos (700 +- throttle dead band (40))? If you are out of the 660 - 770, you will tell the controller rising or sinking!
since it was obvious that this comment would be made I put special emphasis on this in the tests (and in the video) :D
The conditions in your Video are far away from good for GPS! I'm not sure, what you expect from the GPS
well, if these conditions are "far away from good" then it actually means that the whole GPS thing is totally useless for most practical situations I (I !) can think of ... I totally agree that I might have been too naive here, and may have hoped for too much ... but the conclusion would either way be same :?
OlliW
 
Posts: 60
Joined: Sat Nov 01, 2014 3:08 pm

Re: M4 Ladybrid Position Hold and PH controller Questions

Postby kinderkram » Sun Jan 04, 2015 11:04 pm

I have much better results even in windy conditions - with a dipole.
Of course an active antenna will give you a faster fix and a better overall reception.
But it can do better than this.

So ... how are your mag & acc magnitudes?

Your GPS values look good btw. though you were starting between 2 houses.

The rising/sinking is usually a result of
- bad calibration
- wrong throttle factor and/or deadband
- no or wrong foam on the pressure sensor
Some use the correct foam but too thick, compressing the foam will not let it breathe.
kinderkram
 
Posts: 2911
Joined: Fri Jun 22, 2012 7:47 am

Re: M4 Ladybrid Position Hold and PH controller Questions

Postby sandmen » Sun Jan 04, 2015 11:28 pm

when the mag is used inflight ... that's what I get at least from the web, but the AQ isn't using it inflight to exactly prevent that ... so, to have this unambigously in my head:
You're saying/confirming that a wrong mag does lead to an in-flight TB effect also with AQ's procedure of using the mag?
(y/n)

If you read carefuly my comment, I told you is one possible reason.
In the end, I have a video! Nothing more, LOL.
- If the MAG is too much off, ( too much off = for example 180°), then we have really a problem. And currently, this can happen.
By a error from 180*, the movement is in the wrong direction! Or better the UKF will have a problem.
- Maybe, if the MAG not so much off (90°), the GPS-Heading will do a "correction", but this can take time.
This all can happen, yes ......
In the end, a log can show us more details.

since it was obvious that this comment would be made I put special emphasis on this in the tests (and in the video) :D

Perfect, I'm sure, I have overseen this. :D Or, is there anywhere your parameter file?

well, if these conditions are "far away from good" then it actually means that the whole GPS thing is totally useless for most practical situations I (I !) can think of ... I totally agree that I might have been too naive here, and may have hoped for too much ... but the conclusion would either way be same

I'm not sure, do you mean GPS in general, or GPS special on AQ ?
I think, the GPS receive quality can improve by a better antenna. But how much in which conditions ....
I totally agree, GPS, is not really in all conditions available (with a good quality), and not always the best solution.


https://www.youtube.com/watch?v=YV_RT-wk-nw
https://www.youtube.com/watch?v=yNmZBuJ5IHg
Last edited by sandmen on Sun Jan 04, 2015 11:45 pm, edited 1 time in total.
sandmen
 
Posts: 997
Joined: Fri Jun 22, 2012 7:25 am

Re: M4 Ladybrid Position Hold and PH controller Questions

Postby chschmid » Sun Jan 04, 2015 11:31 pm

Some use the correct foam but too thick, compressing the foam will not let it breathe.

And some, like me, leave the protective Capton tape on the baro. ;)

[youtube]/watch?v=Qzb9tZWJX5w&list=UU0mBNsrmKicsV6qt-LtrKAQ[/youtube]
That's how my little LB performs after adding foam.


Cheers
Christof
chschmid
 
Posts: 1800
Joined: Wed Jul 11, 2012 7:41 pm
Location: Herrliberg, Switzerland

Re: M4 Ladybrid Position Hold and PH controller Questions

Postby OlliW » Sun Jan 04, 2015 11:50 pm

kinderkram wrote:no or wrong foam on the pressure sensor
hold on, I added foam but admittedly didn't spend much thought on it ... because it was my understanding that with a 3D GPS fix the AQ doesn't use the baro but only relies on GPS also for altitude ...

did I got that wrong, even with a 3D fix the barometer is used in the altitude calculations? (y/n)

(maybe JussiH could add suitable foam to his shop ;))

kinderkram wrote:bad calibration
in how far could a bad calibration of tha acc and mag affect the altitude? (attitude I understand, but altitude?)

sandmen wrote:If the MAG is too much off, ( too much off = for example 180°), then we have really a problem. And currently, this can happen.
what do you mean by "currently this can happen"? When I turn my copter in my hands I find the HUD display to show the yaw orientation quite reliably ... I can't give a precise figure but certainly it's not off more than 10° ...

BTW: as regards possible led blinking sequences, I think in principle it woukld be sufficient to have just two states, namely the one which is now the solid led (which may become blinking), and in addition one which indicates that one really can rely on the GPS, i.e. what the copter stays within a (+-0.5m)^3 box, or something like that (which may become the solid led).
What I did in some of my projects to indicate more states is to have something like on-off-on-off-on-long off-on-off-and so on to indicate state 2 ... that way it's easily possible to clearly indicate five states: off, 1, 2, 3, solid
OlliW
 
Posts: 60
Joined: Sat Nov 01, 2014 3:08 pm

Re: M4 Ladybrid Position Hold and PH controller Questions

Postby sandmen » Mon Jan 05, 2015 12:55 am

I mean, why ever, some times it can happen, that we get a MAG reading that is off. I saw this 2 times, and on both times the default MAG dec. and incl. was set. After setting the dec. and inc. I can't creat the problem again.
Maybe this "TB" was with totally wrong mag dec. and inc.

Yes blinking is nice :-), but in the end, what dos it help, when I know that the GPS is not so exactly?
But good idea, and maybe we can adjust this.

So, what about GPS? What did you mean about it?

For future questions, it's always good to have the current parameter. Otherwise we need a good "Glaskugel" :-)
sandmen
 
Posts: 997
Joined: Fri Jun 22, 2012 7:25 am

Re: M4 Ladybrid Position Hold and PH controller Questions

Postby OlliW » Mon Jan 05, 2015 1:31 am

the dec and inc are read off from the web page given in the docu for my current place, converted to decimal using the QGC Imu calculater, and inc reversed, when calib was done, I did it 3 times and compared and double checked
honestly, the outlined reasoning appears a bit speculative on this point ;)

blinking, let me ask the other way around: what is a blue solid led worth if it doesn't mean anything in practical terms? It's good at night though, I like that part. Just my 2 cents, nothing else.

GPS, I just have the M4 so GPS in general and GPS special on AQ is currently tautologous to me

Glaskugel, not sure for what it would currently be needed
it's a simple as that: either one has to get all the calibrations perfect to 0.000001% in order for the system to accomplish or there is a certain level of error acceptance in the system ... for both cases one doesn't need a Glasskugel ... as long as one obviously can't specify in words what accuracy is to be achieved any value is meaningless ;)

I think I follow kinderkrams suggestion with the foam, it seems to be the best guess currently (if GPS-PH uses it), I just build a new beautifull light and wind expelling foam housing for the baro, must be quite cozy for it now :lol:

thanks as usual for all the help and patience with me, much appreciated
OlliW
 
Posts: 60
Joined: Sat Nov 01, 2014 3:08 pm

Re: M4 Ladybrid Position Hold and PH controller Questions

Postby Max » Mon Jan 05, 2015 2:15 am

OlliW wrote:blinking, let me ask the other way around: what is a blue solid led worth if it doesn't mean anything in practical terms?

It does mean something -- GPS signal has been determined to have 3m horizontal accuracy or better. It also means that PH and autonomous modes would now be attempted.

Glaskugel, not sure for what it would currently be needed

Actually w/out live telemetry data or a log file, you're pretty much trying to use a crystal ball to determine what is really going on. When everything "just works" then you don't really need that. But for tuning and diagnosis, it's basically a requirement.

The blue LED is just one indicator, but not a very precise one (perhaps this could be improved, you're right).

Connecting this back to your possible MAG problem, we'd really need to see the MAG X/Y/Z plots and MAG Magnitude values, as described in the docs. Also, clear pictures of your setup. Eg. if you have some ferrous mass or untwisted wires running near the mag sensor, that could affect things a lot.

I think I follow kinderkrams suggestion with the foam, it seems to be the best guess currently (if GPS-PH uses it),

Definitely uses it. The foam cover is important.

thanks as usual for all the help and patience with me, much appreciated

You're welcome. Stats, pics, graphs, and params really help us help you. ;)

What's the AUW of your setup?

Cheers,
-Max
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Re: M4 Ladybrid Position Hold and PH controller Questions

Postby OlliW » Mon Jan 05, 2015 4:07 am

I think we have a bit of a mismatch in communication, and it's of course my fault, but it's my way of thinking and doing (and it more often than not works out LOL).

I'm trying to get a feeling for what is to be expected and what is needed, and how things interact. I have questions. I'm not actually asking here to spot a fault, I believe I can do that myself better, by definition, since I have the system sitting here in front of me. I'm looking for the criteria which let me decide.

E.g. you're saying that "w/out live telemetry data or a log file, you're pretty much trying to use a crystal ball to determine what is really going on", but what I'm trying is to figure out if there is actually anything going on! I'm sure you will agree that it's pointless to shoot at birds with canons when there isn't any bird. I'd like to avoid hunting ghosts. So, I find it important to first figure out if there is anything going on at all. The statements so far are interesting in that they only slowly converge.
(I assume it has converged to "it could be better", but you see the point? I still have to rely on assumptions)

I could repeat with further examples. :)

BTW: I assume - and I might be deadly wrong here - that with the M4 you're hoping to attract a wider audience. Iff that's correct then I think you might look at this endevaor here also from another perspective. Consider someone has a similar problem, and scans the web for help, and comes across this or any other thread, and finds many telemetry data and at the end a conclusion it's this or that, or she/he finds statements like "You should aim at this target for this and that reason", what would you think would help this someone more to get along without having to bother anyone else? The Hacc and Vacc figures in the above were usefull, the acc and mag magnitudes are useful. It would be useful to know how accurate the mag angle really has to be. Knowing that in altitude hold both the GPS and barometer data are used is more helpful than a comment that the foam is important. You have a really great docu, yet - quite naturally for such a complex project - it still has some unclear points and some info is missing. I think you want to have the above info in the wiki.

:)

AUW is 43.40g
I've just rebuild the foam thing and first need to test it
acc mag is 9.79 on average, with the new foam mag seems to be consistently lower (ca. 1.9), another reason I first like to double-check the foam thingy
dec & inc are 1.80 an -63.87
IMU_MAG_ALGN_XY 0.0103164399043
IMU_MAG_ALGN_XZ 1.24698099171e-05
IMU_MAG_ALGN_YZ -0.0652721524239
IMU_MAG_BIAS_X -3.4659640789
IMU_MAG_BIAS_Y 3.0814640522
IMU_MAG_BIAS_Z -1.5292160511
IMU_MAG_SCAL_X 0.847387611866
IMU_MAG_SCAL_Y 0.857254385948
IMU_MAG_SCAL_Z 0.819298088551
Hacc/Vacc you have seen in the video
for the next test I have increase thro deadband to 150, to finally rule the center stick thing out
except of the foam thingy there are just the motor wires ca. 5mm above the mag, very much as in the ref build
(I however would have thought that AQ reads the mag before it powers the motors, and the mag calibration is suppossed to account for hard fields...)
what "MAG X/Y/Z plots" are you talking about??
now I've answered these questions ... just kidding LOL
Attachments
P1100241.JPG
P1100240.JPG
P1100239.JPG
P1100238.JPG
OlliW
 
Posts: 60
Joined: Sat Nov 01, 2014 3:08 pm

PreviousNext

Return to AutoQuad M4 Micro Controller

Who is online

Users browsing this forum: No registered users and 3 guests