Thread Tools
Apr 06, 2015, 07:34 AM
Registered User
MassiveOverkill's Avatar
Thread OP
Discussion

Blackbox log analyzation\help thread.


I figured a separate thread for analyzing\sharing blackbox logs and configurations would be helpful and not clutter up the main blackbox thread

Joshua has set up a video logging thread here: https://www.rcgroups.com/forums/show...2#post32465747

I'll add formatting\structure later such as list of Guru analyzers and format to submit your info and logs. Maybe we can set up a database to see data from different combos and who knows, maybe evolve autotune from data gathered.

If you all would prefer to keep this in the main thread I can have the mods delete it.

So let's set a format similar to the PID tuning thread: https://www.rcgroups.com/forums/show....php?t=2350974

Please copy and fill in the blanks

User Name
FC: Be specific including current firmware used
PID Controller # ( ) (Cleanflight)
Name Proportional Integral Derivative
ROLL.......( )......( ).......( )
PITCH......( )......( ).......( )
YAW........( )......( ).......( )
LEVEL......( )......( )...... ( )
Roll & Pitch rate:
Yaw rate:
TPA:
RC Rate:
RC Expo:
Looptime:

Esc: Flash:
Frame:
Motors:
Canted Mounts: Yes/No: Degree of Cant
Props (including model\brand):
LiPo:
Flying Weight:
Flying Style: (Acro, race, photo, cruizin, avoiding the ground)
Special tuning notes:
Last edited by MassiveOverkill; Aug 20, 2015 at 10:30 AM.
Sign up now
to remove ads between posts
Apr 06, 2015, 07:34 AM
Registered User
MassiveOverkill's Avatar
Thread OP

Reserved 1


Reserved 1
Apr 06, 2015, 07:34 AM
Registered User
MassiveOverkill's Avatar
Thread OP

Reserved 2


Reserved 2
Apr 06, 2015, 07:34 AM
Registered User
MassiveOverkill's Avatar
Thread OP

Reserved 3


Reserved 3
Apr 06, 2015, 12:08 PM
Registered User
zenman's Avatar
Good thinking on starting this tread! I have been looking over my logs and many questions arise, lots to learn on how best to decipher them.
Apr 07, 2015, 06:59 AM
Registered User
zenman's Avatar
Perhaps if we could get some of the tuning gurus to post their logs here then we could have some examples of properly tuned craft and have something to shoot for.
Apr 08, 2015, 08:04 PM
Registered User
zenman's Avatar
I graphed some data from a csv file on excel of around 500 loop iterations, just banging the sticks on roll.
Quite interesting to see the the response of p and d. Looks like a good response over all but I see d oscilating, I wonder if that means it's too high.

Also, notice on the last graph how the I peaks at the exact point of the bounce back and slowly winds down, seeming to work against p.
I think having I set too high may be reason for the slow bounce back we sometimes experience because it winds down pretty slowly.
Last edited by zenman; Apr 09, 2015 at 07:39 AM.
Apr 10, 2015, 03:03 AM
Registered User
thenickdude's Avatar
Hm yeah having D as the highest-magnitude term seems strange and probably not ideal (maybe reduce the D term?).

Also I'm not sure how to account for those stepping patterns, are you sure that Excel is getting the time axis correct? I'm not sure why the P term would suddenly spike upwards, then slowly decay down to zero, and repeat, since the P is proportional to the error and I don't see why the error should change like a step function. Perhaps your RC sticks were in motion and the sudden P spikes correspond to an updated stick position arriving from the Rx? (new target rotation rate arrives, so suddenly the error spikes).

Can you post the .txt log maybe?
Last edited by thenickdude; Apr 10, 2015 at 03:10 AM.
Apr 10, 2015, 08:05 AM
Registered User
zenman's Avatar
Quote:
Originally Posted by thenickdude
Hm yeah having D as the highest-magnitude term seems strange and probably not ideal (maybe reduce the D term?).

Also I'm not sure how to account for those stepping patterns, are you sure that Excel is getting the time axis correct? I'm not sure why the P term would suddenly spike upwards, then slowly decay down to zero, and repeat, since the P is proportional to the error and I don't see why the error should change like a step function. Perhaps your RC sticks were in motion and the sudden P spikes correspond to an updated stick position arriving from the Rx? (new target rotation rate arrives, so suddenly the error spikes).

Can you post the .txt log maybe?
Yeah I'm pretty sure it's correct as Excel is just comparing columns of numbers.
Thats correct the set point is changing as the stick command (target rotational rate) moves.
Here is another graph with the rc command added. Notice how P seems to back down in magnitude to follow the rc command ( I think this is what your calling a step response ) but does not oscillate in the opposite direction (does not cross 0) like D. Looks like D may be trying to dampen the speeding up and slowing down caused by P.
I don't know for sure if this is an example of a overly dampened system, or if P is too high and needs that much dampening from D to keep it under control.

Is the sum of the PID terms what gets sent to the motor mixer?
In this case the sum will look like the D since its the highest term. Second graph is the sum compared to the rc command.

btw the settings for roll on pidc 1 are : P30 I35 D30

Hope its ok to post all this here. I'm trying to gain an understanding of how it all comes together.
Last edited by zenman; Apr 10, 2015 at 11:41 PM.
Apr 10, 2015, 03:21 PM
Registered User
thenickdude's Avatar
Yeah the PIDs sent to the motors are the sum of all three terms (although various firmware versions have had bugs in some PID controllers where D was logged with the wrong sign, I think they're fixed now).
Apr 10, 2015, 06:40 PM
Registered User
zenman's Avatar
Good to know its fixed. Thanks!
May 08, 2015, 11:52 AM
Build & Crash

How to use Blackbox data for better PID tuning?


Hi all,

I've been searching a lot, but can't seem to find a proper 'tutorial' on how to use (read) blackbox data to optimize PID tuning.

I understand oscillations in gyro and motors are to be minimized, but wouldn't know for sure if I should increase/decrease P, I or D. Also I'm confident I would find out experimentally in the end, but I guess lots have gone this path before.

For example, attached a log with 3 sessions, all using slightly different profiles. How to judge objectively which is the best? (yep, there's a crash in there).

Thanks for any help or links!!
May 09, 2015, 08:09 AM
Registered User
Greetings, I need to figure out how to overlay this on the video, and then trim it down, but I thought I'd upload a log file to start and see if I can get any advice right off the bat.

The frame is a Hoverthings H260
Sunnysky 2204 2300KV motors.
Velotech 12A ESCs.
2200 man battery.
MinimOSD
DragonFly 32 Pro (Naze clone)
6030 Gemfan props
GPS on a mast

LuxFloat PID Controller

My maiden flight was a week ago, and the ship moved like a drunken sailor. I balanced the props and yesterday was my next attempt at flight. It's very hard to control. Even in Level mode (which is what you see here, you'll see that I can't even hold a hover!

Looking at a few things in the log, I see lots of movement. One surprising thing to me is that the baro continues to fall unless I'm actively climbing. There are lots of other odd things too.

I attempted a flight in acro mode (not included in this log) and I don't get up more than 6 inches off the ground before I lose control.

The first part of the log with no activity is just me waiting for the GPS signal to lock in. My goal for the flight was to hover about 6 feet off the ground. You can see how well that worked (not very).

Any ideas where to start?

Thanks,

John
May 09, 2015, 10:16 AM
Registered User
Quote:
Looking at a few things in the log, I see lots of movement. One surprising thing to me is that the baro continues to fall unless I'm actively climbing. There are lots of other odd things too.
Do you have a piece of foam over your baro? Is it shaded from sunlight?

Baro based altitude hold requires a ton of careful tuning, and even at its best, it doesn't work terribly well. If you want proper altitude hold, you really need GPS. That's my experience, anyway.
May 09, 2015, 05:57 PM
Registered User
thenickdude's Avatar
-deleted-


Quick Reply
Message:

Thread Tools