paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Reply to "How does throttle management work?"


From: Maik Höpfel
Subject: Re: [Paparazzi-devel] Reply to "How does throttle management work?"
Date: Wed, 14 Oct 2009 11:35:58 +0200

Hello everyone,

thanks for you long explanations. I'm starting to understand it now, I
believe I will need to make a few test flights to say I'm certain ;)

So one thing we've been assuming was that the plane climbs too much
when giving throttle. This in turn reduces maximum throttle in wind.
AJ posts seems to confirm that. So I will try to tune pitch_of_vz and
maybe also see if I could lower the tendency of the plane to climb so
much. For takeoff, I only have to give full throttle and it climbs by
itself... But I was told that gliders (it's an EasyGlider) are
designed that way. We'll see.

My second point is: I asked Chris for his updated EasyGlider files and
they contained the following lines, along with the rest of normal
throttle-related stuff.

    <!-- auto airspeed and altitude inner loop -->
        <define name="AUTO_AIRSPEED_SETPOINT" value="14." unit="m/s"/>
        <define name="AUTO_AIRSPEED_PGAIN" value="0.060"/>
        <define name="AUTO_AIRSPEED_IGAIN" value="0.050"/>
        <define name="AUTO_GROUNDSPEED_SETPOINT" value="5" unit="m/s"/>
        <define name="AUTO_GROUNDSPEED_PGAIN" value="0.75"/>
        <define name="AUTO_GROUNDSPEED_IGAIN" value="0.25"/>

So, will this even work when I don't have an airspeed sensor? Because
I don't think he has one right now, so I'm guessing that it just
estimates airspeed. But then I'm at loss again about how Paparazzi
decides which throttle to apply. Way I see it, it now would aim for
three different speeds: the one from altitude management (described by
AJ), the one to maintain airspeed and the one to maintain groundspeed.
I see that the pgain for airspeed is a lot lower than groundspeed, so
I'm assuming it just has more of an effect, but I'm just guessing
here...

Third: Chris' airframe config also contained a makefile flag,
"ap.CFLAGS += -DSTRONG_WIND". I tried Google, but did not find
anything about that. How does that come into play? I would've thought
that just tuning the above settings would make it able to fly in
strong winds...

Fourth and last: What are dash/loiter/cruise? Are those just different
cruise_throttle's?

Thanks a lot everyone. I promise to make a wiki page once I feel like
I've understood things :)

Regards,
Maik

2009/10/14  <address@hidden>:
> All,
> Let me try to explain how Paparazzi manages throttle.
>
> First off let me say that paparazzi does not manage speed by default for 2
> reasons.  First we do not have airspeed sensors to do control on that(see
> Vassilis email) and second groundspeed is a tough reference to track on.
> Wind and vehicle dynamics can kinda screw with you when dealing with
> groundspeed.  That being said there is some code on the SVN that runs a PID
> on groundspeed to manage throttle, however its not well tested, and the
> tuning proceedure is not well known.
> OK on to how paparazzi uses throttle.
> First we calculate an altitude error.
> altitude_error = (desired_altitude - actual_altitude)
> Then we apply an arbitrary gain to convert the altitude error to a desired
> climb rate.
> desired_climb = altitude_error * altitude_pgain
> Then we go into the inner loop and determine the climb rate error.
> climb_error = (desired_climb - actual_climb)
> Then we apply a PID control on the climb error to manage the throttle.
> desired_throttle = cruise_throttle + climb_throttle_increment *
> desired_climb + throttle_pgain * (err + throttle_igain * throttle_sum_err +
> throttle_dgain * d_err);
> So a couple of things here.  cruise_throttle is simply the "neutral" offset,
> and allows the Iterm to not have to work as hard.  I think that if you had a
> properly constructed and tuned Iterm you would be ok not to have this term.
> What it does mean is that this number does not have to be perfect.
> The next term may be confusing to some.  This is simply a feedforward
> control.  Open loop we "guess" how much throttle we need for a commanded
> climb rate.  This gain climb_throttle_increment could be obtained by
> graphing throttle vs climb rate on a test flight if you really wanted to
> tune it well.
> Lastly we have the traditional PID terms with there gains.  Nothing really
> special there.
> Ok really 1 last thing.  The comment that changing the min nominal and max
> throttle did not lock it.  Of course not!  Locking the throttle on most
> small airplanes(especially flying wings) and just using elevator for
> altitude control can be a little rough.  What we did instead of locking the
> throttle was to adjust the cruise_throttle using these values.  So.  If you
> put a dash throttle of 1.0 then the first term in this equation will be 1.
> If your desired_climb=0 and your err=0 then your desired_throttle will be
> 1.  But if the AP is not able to maintain altitude control with the throttle
> at 1 then it will lower it enough to keep altitude control.  If you would
> like to allow the elevator to help more, take a look at the pitch_of_vz
> which will give more elevator control for climb_rate errors.
> I think that covers it.
> AJ
>
>
>
>
>
>
>
>
>
> Subject: [Paparazzi-devel] Reply to "How does throttle management
> work?"
> From: chris <address@hidden>
> Date: Tue, October 13, 2009 9:36 am
> To: address@hidden
>
> Hi.
> I am searching a way to do this (have a fixed ground speed) but
> unfortunately have not found the way yet which might mean that i will
> have to write my own code.
> Since i posted the easyglider files i have made many corrections i can
> safely fly now with 7 Beaufort wind.
> Of course you will need a big engine and the plane will have big course
> variations
> but at least will not crash or get lost.
> 4 Beaufort wind is like any calm day now.
> In order to fly well with high wind you must select a plane that has a
> high wing loading
> and it is fast.
> My best choice would be the twinjet (older), the twister with at least
> 800W of power (best)
> or the funjet which is almost as good as the Twister but less expensive
> to fly.
> Send me an email and i will reply with the newer files.
>
>
>
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]