> On Monday 25 Jan 2010, Pete Morgan wrote: > > I'm having a successful time tuning my first autopilot on the > > 787. > > > > I've managed to get rid of the "jerks" and wobbles, mainly by > > using a "noise-spike" filter with <max-rate-of-change>. That > > thanks to Syd Adams for that wonderful tip. > > > > All flight level changes, and NAV, heading can be tuned very > > well, at the current tuning speed of 250 knots. > > > > However, at lower and higher speeds, the behaviour changes, > > sometimes significantly. > > > > So it it possible to have two different PID/configs's operating > > at different airspeeds.. > > > > eg in psuedo code > > > > <config> > > {if getprop("airspeed") < 150 } > > <Kp>0.07</Kp><beta>0.5</beta> > > {else} > > <Kp>0.06</Kp><beta>0.3</beta> > > {if} > > </config> > > > > Hope it makes sense.. > > pete > > You can vary the proportional gain of the pid controllers by > specifying a property and default value instead of just sticking a > fixed value between the <Kp> tags e.g. > > <Kp> > <prop>/autopilot/FCS/settings/example-gain</prop> > <value>-0.2</value> > </Kp> If you run the CVS version (or wait a couple of days for the new release), you can make use of even more flexible input parameters: - specify a constant for a constant value - specify a property name to read the value from a property - add a <scale> and/or <offset> for linear modifications of the value - add a <condition> to enable this value and choose from more than one input
Trivial example, constant <Kp>0.2</Kp> Trivial example, property <Kp>/some/property</Kp> More complex: if( /foo == 123 ) Kp = /some/property * /some/other/property + 3 else Kp = 4711 <!-- case f00 == 123 --> <Kp> <condition> <equals> <property/foo</property> <value>123</value> </equals> </condition> <property>/some/property</property> <scale>/some/other/property</scale> <offset>3.0</offset> </Kp> <!-- default, or else branch --> <Kp>4711</Kp> Recursion is supported, so something like this works: <Kp> <property>/some/property</property> <offset> <property>/some/offset/property</property> <scale> <condition> some funky condition here </condition> <value>23.0</value> <condition> some other condition </condition> I'm loosing my track here, but you might see the idea behind. you can model polynoms like a0+a1*x+a2*x^2(+...) that way. More examples is in Docs/README.digitalfilters or the HansaJet autopilot (work in progress). HTH Torsten ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel