On Sunday 16 March 2008 21:52, LeeE wrote: > On Sunday 16 March 2008 03:51, Syd&Sandy wrote: > > Hi all , > > I've been trying to change the xmlautopilot to use <prop> and > > <value> for the u_min and u_max properties , and currently have > > quite a mess on my hands right now :) The idea is to have a min > > and max property to control bank-limit / pitch with a panel > > knob ... setting the u_min and u_max from a property seems to > > be working , but I get some strange things happening . The > > pi-simple controller isnt clamped anymore (so i removed the > > clamp check )... and the output goes immediately to the u_min > > value...although u_min and u_max are checked every update... > > Has anyone else attempted this , with good results ? Or , > > hopefully , already implemented this ? Anyway , I'll keep > > plugging away at it, the answer is probably staring me in the > > face and I can't see it. Is this something that should be > > implemented anyway ? Cheers > > Hi Syd, > > one way you could do this with the current autopilot controllers > is to feed the output from your controller through a gain filter > to get the range you want. > > For example, if you've set u_min/u_max to +/- 40 in your
Oops - that should have said u_max/u_min to +/- 40 > controller but want to reduce it to +/- 20, you'd set the gain > value on the gain filter to 0.5. > > If you don't mind re-tuning your controller, it would probably > make more sense to set u_min & u_max to +/- 1.0, then the gain and again above - u_max & u_min to +/- 1.0 > factor would be the required bank or pitch angle limit i.e. for > +/- 30 limits you'd use a gain of 30. > > Changing the output clamps does change the overall behaviour of > the controller, however. I found that I got more desirable > behaviour from a pitch controller (output is a hstab deflection) > when I set the u_min & u_max limits to +/- 0.25 and then passed Sigh... u_max & u_min to +/- 0.25 > it through a gain filter with a factor of 4 to restore the > required +/- 1.0 range, as opposed to setting the clamps directly > to +/- 1.0. > > Heh - I'm still not entirely sure why this is, actually having > fiddled with the code myself, but it came about through an > experiment where I was trying to increase the effective bandwidth > through parallelism. I started off with four identical > controllers running in parallel, the outputs of which were summed > but then I realised that I could get the same effect with a > single controller using the gain filter technique. > > LeeE Doh! LeeE ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel