Looking for the cause of Roll fluctuations on Trex450 with pixhawk

I’m having a peculiar behavior with the trex450 during hoover phase which i can not point the reason, tried to lower the ANG coefficient with small effect. took down the RAT_RLL_P and I also with no affect .
checked the parameters during take off and see the fluctuation on the servo output with no reason ?

@ZvikaF please post your log file. Just looking at your traces, the actual roll is not following the desired roll. I doubt you need to lower ang P. Post your log and I will look at it.

@bnsgeyer Thanks a lot Bill , appreciate it, i’m really puzzled by that.
here is a link to the log file
https://drive.google.com/file/d/1IobWR4pTY6ocNqOxoD667G00pjRo2bvh/view?usp=sharing

@ZvikaF So there are a couple of things going on here. First, it appears that you are using the default parameters for attitude controller (ATC_). Unfortunately the default values will not make the aircraft fly well. You really need to read and follow the tuning guide. This is the best information to properly tune your helicopter. Please read it and if you have questions, then post here and I will answer them for you.

So one of the big things you’ll want to do that is also described in the tuning guide is set the ATC_RAT_PIT_ILMI and ATC_RAT_RLL_ILMI parameters. This helps the flight controller make the actual attitude match the desired attitude. Typically I set these to 0.08.

Again, please read and follow the tuning guide.

Regards,
Bill

@bnsgeyer Thanks a lot for your elaborating answer. You are right, I did start with the default parameters, and as the heli was flying reasonably and was just overshooting in the Yaw, i only dealt with that loop. I did start with a very heavy machine (dew to a large battery used) and had an under powered results in the altitude control. eventually, i changed to a lighter and smaller battery, and also had to replace the swash servos. the new servos are more agile that probably started the roll issue.
I will go back and do the tuning from the start.

All the best
Zvika

@bnsgeyer Well, did some changes in the parameters according to the tuning procedure, the heli now is definitely more lively, but still i get from time to time fluctuations on roll, checking on the data i can see clearly that the servo is inducing them.
following is the fidelity of the roll during exitation:

here you can see the minute fluctuation on the roll:

here is a fluctuating phase with the servo output

will the D part in the PID eliminate or excite this behavior ?

best regards
Zvika

Zvika,
the ATC_RAT_XXX_D gain will excite oscillatory response if set too high, which is feedback instability. ATC_RAT_XXX_P can do the same. In looking at your plots, it appears that your sample rate is slow. I would suggest that you use a LOG_BITMASK of 131071. This includes the PID signals and PID, RATE and ATT at 400 hz sample rate. You’ll need to log data at this rate to see the vibrations and feedback instabilities.

Regards,
Bill

Thanks a lot @bnsgeyer .
I did try enlarging the ATC_RAT_XXX_D and indeed got worse oscillations, eventually I took down the ATC_RAT_XXX_P to calm down the oscillation.
You are right about the bit mask, I did not sign all the logging thinking it may be too much (i had 2AFFF).
I see that 131071 (1FFFF) will have the CAMERA and OPTFLOW in and leave IMU_FAST and IMU_RAW out ?

Tuning procedure notes, that on flybar helicopter, the I and D coefficients should be set to zero, am i missing something ? (this heli is a flybar one)

best regards
Zvika

Zvika, it is the rate P and rate D gains that are set to zero on flybarred heli’s. The reason is that the flybar provides the stability that would have been provided by the P and D gains. Thus adding Rate P and rate D will drive the rotor system unstable like you saw with the rate D and rate P gains that you had set. As the tuning guide says, you will still set the I gain per the guide

Tanks a lot @bnsgeyer
Now it is clear … i got confused with rates and position … :slight_smile:

Omitting the P and D coefficients did the trick, thanks a lot :slight_smile:

1 Like