On Tuesday 03 February 2004 02:23, Jim Wilson wrote:
> "Curtis L. Olson" <[EMAIL PROTECTED]> said:
> > For everyone: I've integrated this into a larger document which attempts
> > to explain the basic ideas behind control theory and then describes the
> > specific PID algorithm we have implimented for FlightGear.  This
> > information isn't strictly necessary for building aircraft specific
> > autopilot configurations, but it's such cool stuff it's worth mentioning.
> > :-)
>
> It is indeed!  Is the altitude hold working for you?  I'm finding that the
> first stage is outputing values that ocilate from max to min and back in
> probably 5 or 6 (not timed yet) cycles.  Anyway, I haven't looked at the
> code or adjusted any of the parameters yet.  I just wanted to know if maybe
> it's something unique to my setup before messing with numbers.
>
> Best,
>
> Jim

I started with putting the generic AP in the TSR2 and got similar behaviour.  
I haven't had a chance to see the docs yet but I've got a reasonable alt hold 
by reducing Kp & Ti, quite drastically.

  <!-- Altitude hold.  2 stage cascade controller. -->

  <!-- Stage #1 sets target rate of climb based on diff between current alt 
-->
  <!-- and target altitude. -->
  <pid-controller>
    <name>Altitude Hold (Altimeter based) Stage 1</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/altitude</prop>
      <value>altitude-hold</value>
    </enable>
    <input>
      <prop>/instrumentation/altimeter/indicated-altitude-ft</prop>
    </input>
    <reference>
      <prop>/autopilot/settings/target-altitude-ft</prop>
    </reference>
    <output>
      <prop>/autopilot/internal/target-climb-rate-fps</prop>
    </output>
    <config>
      <Kp>0.1</Kp>        <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>20.0</Ti>     <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-40.0</u_min> <!-- minimum output clamp -->
      <u_max>40.0</u_max> <!-- maximum output clamp -->
    </config>
  </pid-controller>

Obviously, I've upped the u_min & u_max here too.

Heh! - I'll get the docs tomorrow...

LeeE


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to