Hi all,

Testing Ardupilot 2.5 from Jason Short on Vimeo.




Here's a video of testing today. I had a flawless run of the T3 round two course. Everything was looking good. I'll post the code today on the repository.

Some flight notes. I completely remove the I term (by setting it to zero) for Roll and Pitch which helped tremendously. I went from highly unstable turns to nice smooth ones.

Altitude hold seems to have a slight oscillation for me. You can here the motor go up and down as the plane pitches up and down slightly. Any thoughts for dampening this out?

I reduced the loiter radius to 20 meters which the plane doesn't like. It tends to do figure eights around the home position. I'll increase that to 30 next time.

I'll post the code tonight.
Jason

Views: 68


Developer
Comment by Randy on February 13, 2010 at 4:36pm
Nice video. I saw your other one "Above the fog" from 3 months ago as well on vimeo. Very pretty.
Comment by Rana on February 13, 2010 at 7:10pm
Jason, you can well study the code of UDB, there is some height margin defigned, which helps a lot.
@Billu Bhaiya, you can help better.

Admin
Comment by Thomas J Coyle III on February 13, 2010 at 7:59pm
Jason,

Like NS Rana said, you probably need to code some hysteresis into the altitude variable so that it takes more than a slight change in altitude to cause the motor to speed up or slow down. It would be sort of like changing your loiter radius until you get the proper response around the loiter coordinates.

Just a thought.

Regards,
TCIII

Admin
Comment by John C. on February 13, 2010 at 10:06pm
Wow, very interesting Jason. I had an extremely successful 2.5RC2 flight yesterday, and as happy as I was with it (my first successful throttle integrated flight) I noticed the same notes as you. An oscillation in the altitude hold, and a tendency to figure 8 over home.

I'm having a problem with my KML converter right now, but here's my flight log if you have something that works.

udall_2_12_10.txt


I also have a video that I will post to this thread where you can see the altitude hold behavior.

Excellent work! I can't believe this thing works as well as it does.

JC

Developer
Comment by jasonshort on February 13, 2010 at 10:15pm
I'm making some changes that should help on the turns. I'm putting a roll rate limiter to keep my plane from jerking after it reaches a waypoint.

Doug and Ryan are writing a new version of the altitude hold/throttle. I might tweak it for tomorrow though.

Developer
Comment by Ryan Beall on February 13, 2010 at 10:27pm
Finally someone believes me with removing the I term! Yeah a better scheme for airspeed/altitude hold would benefit that oscilation. However you kind of have to deal with the gps being noisy unless you add baro. Hmm that makes me think of a filter that you might be able to implement to estimate altitude with out it....I'll see what I can come up with!

Developer
Comment by Ryan Beall on February 13, 2010 at 10:28pm
p.s. you can also add a slew rate limiter. That would probably be your best bet to keep this controller for now until a better one replaces it.

Developer
Comment by jasonshort on February 13, 2010 at 10:39pm
Yeah, I talked to Doug about the slew rate limiter. I don't exactly know how to write one.
I came up with this:

float calc_nav_roll(float error)
{
static float err_rate_limiter = 0;
integrators[I_NAV_ROLL] += (error * head_I * deltaMiliSeconds)/1000.0;

// Limit Integrator
// ----------------
integrators[I_NAV_ROLL] = constrain(integrators[I_NAV_ROLL], HEAD_I_MIN, HEAD_I_MAX);

// Sum the errors
// --------------
error = (head_P * error) + integrators[I_NAV_ROLL];

// rate of change dampener
if(error > err_rate_limiter){
err_rate_limiter += 70;
}else{
err_rate_limiter -= 70;
}
err_rate_limiter = constrain(err_rate_limiter, HEAD_MIN, HEAD_MAX);
return (err_rate_limiter);
}

70 being .7 degrees
It will slow the change to 35° per second.

I also found I was using some up elevator (5°) to gain altitude. might that be a source of oscillation?

Developer
Comment by jasonshort on February 13, 2010 at 10:48pm
Maybe I was over thinking it. Here's an alternate version.

float calc_nav_roll(float error)
{
static float old_error = 0;
integrators[I_NAV_ROLL] += (error * head_I * deltaMiliSeconds)/1000.0;

// Limit Integrator
// ----------------
integrators[I_NAV_ROLL] = constrain(integrators[I_NAV_ROLL], HEAD_I_MIN, HEAD_I_MAX);

// Sum the errors
// --------------
error = (head_P * error) + integrators[I_NAV_ROLL];
error = constrain(error, HEAD_MIN, HEAD_MAX);

old_error = old_error *.9 + error *.1;
return (old_error);
}


Developer
Comment by jasonshort on February 14, 2010 at 12:46am
New code is posted.

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service