RE: [Flightgear-devel] Autopilot in jsbsim
> I played around with the wing-leveler example from "Automatic flight in > jsbsim". I noticed that the solution had the problem of intergator-windup. > I tried to limit and/or clip the intergator component, but that didn't do > what I thought it would. Does anyone have a solution to this problem? Note > that cliping the summer (as the example does) does not solve the windup > problem. > > -- > Roy Vegard Ovesen First of all, let me know how you played with the JSBSim wing-leveler example - I mean, did you use JSBSim in its standalone mode, or did you somehow integrate this with JSBSim within FlightGear. I ask, because I have never tried it within FlightGear, as I have not looked at how to make sure the FlightGear autopilot and the JSBSim flight control/autopilot features could be made to work independently - i.e. how to make a choice on which capability to use. I'd be concerned that they might end up "fighting" each other. Also, can you explain what you mean by integrator windup? I've run tests in JSBSim with that component and it holds steady for quite a while until I stopped the test. I am guessing you mean that the aircraft grows a bias over time. Jon ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Autopilot in jsbsim
On Fri, 9 Jan 2004 06:31:23 -0600, Jon Berndt <[EMAIL PROTECTED]> wrote: First of all, let me know how you played with the JSBSim wing-leveler example - I mean, did you use JSBSim in its standalone mode, or did you somehow integrate this with JSBSim within FlightGear. I ask, because I have never tried it within FlightGear, as I have not looked at how to make sure the FlightGear autopilot and the JSBSim flight control/autopilot features could be made to work independently - i.e. how to make a choice on which capability to use. I'd be concerned that they might end up "fighting" each other. Yes, I used FlightGear. I did a cut and paste into the c172p.xml file from the example code in the manual. I had to modify it a bit: I rederected the output into the fcs/roll-trim-cmd-norm property (the example uses some property under ap/) I figured that the autopilot should use the trim to control the aircraft, is this correct/reasonable? I'm pretty sure that the jsbsim autopilot and FlightGear's autopilot are not fighting each other. I haven't activated the FlightGear autopilot at all! And it works great (the jsbsim one), exept for the integrator windup. Also, can you explain what you mean by integrator windup? Integrator windup is a problem with all PID controllers. When the actuator, in our case the roll trim, goes into saturation (uses all available trim deflection), and still is unable to bring the wings level, the integrator keeps on integratin the error. Problems arise when the actuator (roll trim) goes out of saturation. By then the integrator has been winding up it's contribution to the PI controller output signal. The integrator then has to unwind, the time it takes to unwind ofcourse depends on how long it has been winding-up. While the integrator is unwinding the controller isn't working as it is supposed to. I provoked this actuator saturation by pushing the stick to the right, the autopilot tried to counter this with the roll trim. As I pushed the stick further to the right eventually the roll trim was unable to keep the wings level. The roll trim goes into saturation (full deflection), but is still not able to keep the wings level. This is when the intergator begins winding up. Hope this explains a bit! I've run tests in JSBSim with that component and it holds steady for quite a while until I stopped the test. I am guessing you mean that the aircraft grows a bias over time. When the wings are level and the actuator (roll trim) stays out of saturation, this PI controller works great. It does not grow a bias as long as the actuator is able to do it's job, it only grows a bias when the actuator does not have enough power (deflection angle) to do it's job. The solution to this is to stop the intergation when the actuator goes into saturation. -- Roy Vegard Ovesen ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
RE: [Flightgear-devel] Autopilot in jsbsim
> > When the wings are level and the actuator (roll trim) stays out of > saturation, this PI controller works great. It does not grow > a bias as > long as the actuator is able to do it's job, it only grows a > bias when the > actuator does not have enough power (deflection angle) to do it's job. > > The solution to this is to stop the intergation when the > actuator goes > into saturation. > > Knowing nothing about the jsbsim structure, and only a little about PID control, could you arrange the control loop so that the Integral term is only updated when the output is between 2% and 98%? Richard ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Autopilot in jsbsim
On Fri, 9 Jan 2004 13:58:11 -, Richard Bytheway <[EMAIL PROTECTED]> wrote: Knowing nothing about the jsbsim structure, and only a little about PID control, could you arrange the control loop so that the Integral term is only updated when the output is between 2% and 98%? This is the solution I'm looking to implement, but sadly my knowlege about the jsbsim structure is so limited that I could not think of a way to do it. Maybe the SWITCH component could be used as an if structure? -- Roy Vegard Ovesen ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Autopilot in jsbsim
On Fri, 09 Jan 2004 14:52:28 +0100 Roy Vegard Ovesen <[EMAIL PROTECTED]> wrote: The solution to this is to stop the intergation when the actuator goes into saturation. Aha! Good explanation. Yes, I think this should not be too hard to fix, but I don't have time to play with that myself at this time. Jon ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Autopilot in jsbsim
On Fri, 09 Jan 2004 15:24:15 +0100 Roy Vegard Ovesen <[EMAIL PROTECTED]> wrote: This is the solution I'm looking to implement, but sadly my knowlege about the jsbsim structure is so limited that I could not think of a way to do it. Maybe the SWITCH component could be used as an if structure? Yes, I think this is exactly a possibility. Have you seen this paper: http://jsbsim.sourceforge.net/AutomaticFlightInJSBSim.pdf ?? There is a decent description of the switch in there. Jon ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Autopilot in jsbsim
On Fri, 09 Jan 2004 14:52:28 +0100 Roy Vegard Ovesen <[EMAIL PROTECTED]> wrote: Also, note that the derivative part of the example wing leveler control was a complete guess - and I think it actually may not play a large part (or *any* part) in the maintaining wings-level at all. I have also considered using the wing leveler as part of a heading hold control law. Instead of using a roll angle of *zero* to maintain (i.e. wings level) one could insert a desired roll angle. That's only a part of it. Jon ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Autopilot in jsbsim
On Fri, 09 Jan 2004 09:15:53 -0600, Jon S Berndt <[EMAIL PROTECTED]> wrote: On Fri, 09 Jan 2004 15:24:15 +0100 Roy Vegard Ovesen <[EMAIL PROTECTED]> wrote: This is the solution I'm looking to implement, but sadly my knowlege about the jsbsim structure is so limited that I could not think of a way to do it. Maybe the SWITCH component could be used as an if structure? Yes, I think this is exactly a possibility. Have you seen this paper: http://jsbsim.sourceforge.net/AutomaticFlightInJSBSim.pdf ?? Yes, that's where I cut and pasted the wing leveler example from :-) -- Roy Vegard Ovesen ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Autopilot in jsbsim
On Fri, 09 Jan 2004 09:13:33 -0600, Jon S Berndt <[EMAIL PROTECTED]> wrote: On Fri, 09 Jan 2004 14:52:28 +0100 Roy Vegard Ovesen <[EMAIL PROTECTED]> wrote: The solution to this is to stop the intergation when the actuator goes into saturation. Aha! Good explanation. Yes, I think this should not be too hard to fix, but I don't have time to play with that myself at this time. I've found more problems caused by the integrator: When our jsbsim autopilot is deactivated (ap/wingslevel_hold = false) the integrator is still integrating the difference between actual roll angle and desired roll angle (zero). So if the pilot makes a bank to one direction, and then brings the wings level, the integrator has been winding up during the bank. If the pilot then activates the autopilot the contribution from the integrator will be much more than it should be. If we had the ability to reset the integrator to an arbitrary value, we could reset it to zero whenever the autopilot was deactive. To fix the windup when it was active, we could reset it to the walue it had when saturation occured. I think this should be implemented in the jsbsim source code, not in the fdm_config xml file. -- Roy Vegard Ovesen ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Autopilot in jsbsim
On Fri, 09 Jan 2004 22:39:20 +0100 Roy Vegard Ovesen <[EMAIL PROTECTED]> wrote: I think this should be implemented in the jsbsim source code, not in the fdm_config xml file. Yes. And it is true there probably should be an initialization capability for filters, integrators, etc. I'll try and look into this very soon. Jon ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Autopilot in jsbsim
On Fri, 09 Jan 2004 15:51:40 -0600, Jon S Berndt <[EMAIL PROTECTED]> wrote: Yes. And it is true there probably should be an initialization capability for filters, integrators, etc. I'll try and look into this very soon. How about adding a new flight control component: "PID controller"?! I've been searching my textbooks on control systems and found a few PID controller algorithms. I could begin to implement one that takes care of the integrator windup problem and has some other usefull features. -- Roy Vegard Ovesen ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
RE: [Flightgear-devel] Autopilot in jsbsim
> How about adding a new flight control component: "PID controller"?! I've > been searching my textbooks on control systems and found a few PID > controller algorithms. I could begin to implement one that takes care of > the integrator windup problem and has some other usefull features. Well ... I'm open to the discussion. At the moment, though, I wonder how useful it would be if one already has the other individual components? Besides the integrator initialization issue, is there anything else that the current component building blocks could not handle? Jon ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel