I’m trying to auto-tune a Bixler airframe. It’s not so interesting tuning a Bixler; I’m doing this to understand how the process works so I can apply it to less common airframes. I was able to tune roll (I think) but I’m having some difficulty forcing pitch tune. I flew for 5 minutes pulling and pushing the elevator stick to its limits, but the logs show only about 3 seconds of pitch autotune.
You only reach this on a couple of the peeks. Turn down PTCH2SRV_RMAX_UP. (or turn PTCH2SRV_TCONST down so the same stick input asks for a larger rate)
Thank you, @iampete! I’m changing this now and try again when I fly tomorrow morning. Will report back with new results.
I’m curious. I see that right now, I have RLL2SRV_RMAX==PTCH2SRV_RMAX_UP==PTCH2SRV_RMAX_DN==75. The default values for these, in a new installation, are 0 (which I understand to mean 100 deg/sec). I have no recollection of changing either of these parameters, much less to this specific value. It looks from different versions of parameter files I’ve kept that the 75 values appeared after a previous AUTOTUNE attempt, although it’s possible they changed earlier. Did I do something to invite this change, or is it a side effect of running AUTOTUNE mode?
Equally, I’m curious about what controls the mapping from stick position to demanded angle. I calibrated the radio, but there must be a param that multiplies uSec from the stick to get desired deg/sec. Did I accidentally mess that one up?
The elevator has felt sluggish to me in all modes.
My LIM_PITCH_MAX and LIM_PITCH_MIN are the default 20/-25 degrees which seem reasonable for a Bixler. But I think what you’re saying is that if I decrease PTCH2SRV_TCONST from the default 0.5 seconds, I can increase the demanded pitch change for the same stick deflection. Right now, at full up elevator stick, I think I’m getting LIM_PITCH_MAX/PTCH2SRV_TCONST = 20 degrees / 0.5 seconds = 40 deg/s. If I change TCONST to 0.25, I’d get 80 deg/s at full stick? Is this how the math works?
I tried again today, once with AUTOTUNE level=7 and once with AUTOTUNE level=3. In both cases, I seem to fail to reach 80% rate. With level=3 I did get a little time in auto-tune but instead of multiple spikes up and down, I see a single, 2-minute-long curve.
Maybe I misunderstand something simpler. You graph PIDP.tar. Does the target represent stick deflection or the rate of change in stick deflection? I’m moving the stick to stops up and down, but maybe I need to jerk it faster?
Pitch target is sort of a mixture of angle and rate, is basted on the angle error, so the faster you slam the stick the larger the error. My normal procedure is just to slam the stick from min to max. Looking at the log it could just be, as you say, you just need to move the sticks faster. Roll probably worked OK because you have a larger range of angles, ± 45 rather than +20 - 25. So the same speed stick movement generates a larger angle error in roll than in pitch.
Thank you @iampete. Last time I was at the field, I changed LIM_PITCH_MAX from 20 to 30, and the plane felt a lot more responsive in pitch in FBWA. I put it back to the default 20 before I tried autotune again, which I see now was a mistake :=) I’ll try higher pitch limits and faster stick movements next time I’m at the field.
What’s interesting to me is that with so much difficulty getting into autotune, I seem to be an exception. I wonder if it just works for everyone else, or conversely if it’s a feature that only a few people use. What makes it even more confusing is that I’m trying to keep as many of the defaults as possible.
You might say, what does it matter with a Bixler, it’s stable with default PIDs, and it is. But I want to understand better how the system works. My specific motivation is follow-on airframes in the pipeline, which are much more maneuverable and less forgiving of random tunes. The next project in my queue is an Eflite Extra 300.
Please keep going. I am interested in the outcome as wel. I also wasn’t aware of the stick changing speed.
After struggling with it I got a better tune by setting the RLL2SRV and PTCH2SRV param’s manually. A search for “auto tune” still delivers many issues by some users.
Regards Sascha
Success. It seems that I had been too gentle bringing the stick to its limits previously.
I tried the slam-the-stick-to-the-stop-as-fast-as-you-can approach with two configurations today. First with AUTOTUNE_LEVEL=3 and the default LIM_PITCH_MAX=20. Second time, I set them to 7 and 30 respectively. It seems that in the second case, it was easier to force auto tuning.
There’s a graph on that page that shows tune origress. Do you now what software generated it? I would love to include the same graph but add ATRP.Type to it.
When you engage AUTOTUNE mode a few things will happen:
the autotune system will immediately setup some values for your roll and pitch I and D gains, and your roll and pitch maximum rates.
Can you confirm the coder overwrites LIM_ROLL_CD, LIM_PITCH_MAX, LIM_PITCH_MIN? I have not seen that behavior. Perhaps it only occurs under certain conditions? In my logs, these parameters appear only once, suggesting they stay constant during tune.