Useful tips for log analysis

3689447516?profile=original

Hi all, I thought I'd do a little write up on how I tend to use the log analysis function of APMPlanner.

I don't claim to be very knowledgeable about coding and such, being more of a engineering type I tend to use the graphs to understand what the software is doing, rather then trying to understand by reading the code. This approach may be good for other beginners like me.

 

The first example is used to gain an understanding of what parameters are used in loiter:

 

Let's use an example of a flight that contained one failed attempt at loiter:

 

3689447493?profile=original 

 Graph the values from a NTUN line:  Long err, Lat err, nav lon, nav lat, Loiter lon I.

This will immediately identify the portion of the flight, where loiter mode was used. You can see that it begins around line 2000.

Zooming in on that part of the flight we get more detail:

3689447345?profile=original

RED and GREEN: How the copter is deviating from set position.

BLUE and PINK: how the copter is being commanded to move.

YELLOW: The state of the LOITER I TERM.

 

Here is the I term in more detail (YELLOW):

3689447527?profile=original 

You can see that the I wind-up has deviated from zero.

NOW COMES THE KICKER:

In the forum you can see people asking if X version of Arducopter uses NAV in the loiter or not. Obviously, you have to know this, if you're going to tune loiter properly.

Finding out is as easy as graphing a NAV I TERM instead of the LOITER I TERM:

3689447557?profile=originalIn this graph you can see that the NAV I TERM (YELLOW) wind-up does not deviate from zero,

hence this version does not use NAV terms or procedures for loiter.

 

A typical circling loiter:

This a typical circling loiter. The values being graphed are the same as in the last example, with no I term displayed.

3689447516?profile=original 

 

 You can see that the commanded pitch and roll BLUE and PINK are a diverging oscillation which is almost perfectly in phase - this accounts for the circling motion.

You can also see that the position errors are growing as a function of the increasing control commands by the autopilot. 

 

Anyway that's enough for today, I hope someone finds my amateurish contribution useful... 

 

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • So the values of MOT are percentage not currents, voltages nor the motors pulse width modulation that the ESC's receive from APM
  • Developer

    mot = motor.

    values are generaly close to 2000 for full throttle and 1000 for no throttle

  • Hi

    I have the new update of mission planner & firmware, and after the last flight i downloaded datalog of the flight.

    I'm just wondering, what is MOT meaning3701727743?profile=original

  • Hi,

    I am trying to enable sonar in data logs but I having trouble with this..I used command 'enable SONAR' and the oputput are on the pic below:3701695107?profile=original

  • Hi all !

    I tried to follow this example and noticed the missing / different values in NTUN as well.

    I am clueless although i found this article about a Bug in MP concerniung column names in logs:

    http://diydrones.com/forum/topics/mp-1-2-51-log-browse-column-heade...

    But the fix did not work for me.

    Are those columns in the example gone due to a change in Arducopter and / or MP ?

    Greetings,

    Nils

  • I'd love to be able to provide some useful advice, but I gave up on Arducopter a long time ago...Maybe not permanently, but for the foreseeable future anyway...

  • Help, I dont see these options in 2.9, I can log NTun but not the same data, what am I looking for?

  • To add on my last post:

    I undestand now that Hans is examining the ONBOARD logs that you can download via the CLI. So far I have only been looking at the logs MP records via telemetry.

    But my question still stands: How can i see the params as Loiter Lon I on APM1 running latest FW? I have enabled NTUN logs but Loiter Lon I is just not there. Must I add it to the dataflashlog.xml?

  • Hi,

    I cant find the loiter term (Loiter lon I) or any other of the PID params.

    Do i have to enable them somehow or am I looking in the wrong place? Im looking in Map Screen --> Tuning --> Double Click on graph legend. I also looked in Tlog > Kml or Graph --> Graph Log...

  • Developer

    just a FYI,

    the planner can now graph Tlogs as well.
    under telemetry log > "Log> KML" > graph Log

This reply was deleted.