So I'm tryng to practice tuning the pid parameters of my ardupilot, (running Arduplane 3.2.3) using HIL with flightgear, so when I go to tune for my real plane, I have a better idea of what to do. I am having a problem with the FBWA mode.
I followed the instructions at http://plane.ardupilot.com/wiki/common-simulation/flightgear/
to set up HIL with arduplane, missionplanner, and flightgear, and I think I have it working. I was able to control the plane in "manual" mode with a gamepad. Afterwards, I set the flightmode to fly by wire A (FBWA), which, from what I understand (correct me if I am wrong) means I use my game pad to specify a target (for example) roll angle, and the arduplane will try and stabilize (using pid control) the plane at that angle of roll. I seem to have been able to tune roll parameters so that the plane steadies. However, when I went to tune pitch, the plane seemed to not even "attempt" to steady itself on that axis when I left the joystick in a neutral position. It would often slowly drift off until the plane was nose up or down, at which point the plane entirely loses control. If I tilt the joystick to counteract the drift, the plane jerkily pitches in that direction as far as it can until the plane is again uncontrollable. If I continue to send restoring actions to the plane, I am able to manage the pitch, but this defeats the purpose of FBWA. When I increased the p parameter for pid, these jerks seemed to only happen much quicker (this was how I was able to, I think, tune the roll parameters)
My exact process is as follows: In mission planner, I set the ardupilot to manual mode, and take off. Once I am at an altitude I am comfortable with, I switch to FBWA. Immediately after the switch, the plane will pitch up towards uncontrollable. (I don't set any waypoints)
I am not sure if it's a problem with my joystick communicating with the loop, or if I am misinterpreting pitch in FBWA mode, or FBWA in general. Could it be a geofencing issue? Could it be that my initial pid parameters were just that bad? (attached is a screen shot of my basic tuning parameters)
Any help would be appreciated.
Well, actually, if anyone could explain the meanings of the various values that can be plotted in mission planner's "flight data" window, if you check tuning, that would be very helpful. The values that I'm interested in are those prefixed with "nav" (ex, nav roll, nav pitch, nav beari), those of the format ch#in and ch#out (ex, ch1in, ch1out, ch2in...) and those of the form hilch# (ex, hilch1, hilch2, ...).