Tradheli Autotune - Alpha level testing

What esc are you using? I assume you are using the RSC mode 1 so you can change rpm settings during the flight? And your esc is connected to servo output 8 on your pixhawk?

I highly doubt that the ATC gains that were changed had anything to do with your esc issue. Your esc governor relies only on the channel 8 output and that remained unchanged during the flight.

As I said, maybe the wiki isn’t explicit enough. Please set up your swashplate per my instructions above.

The ESC brand is YPG (might be YEP OEM) https://www.aliexpress.com/item/1583156481.html
RSC MODE 1 on channel 8.
I get the same behavior from the original Align ESC on the other two 450 helis,

You’re right, mentioned this for the lesser stability encountered flying.

will check again, to my best knowledge, setup procedure was done as you wrote above, my most strict part was mechanical, keeping 90 deg on mid servo point, horn position restriction moved it from 1500. during setup flight had to trim the swash a bit to stop lateral and longitude drifts, did it by changing servo mid point, instead of mechanical adjustments, in order to keep the movement coherent,

Well when I looked at your servo1 and servo2 trim, they were around 1100-1200. So not sure what is going on there. Did they somehow get unintentionally changed? Or do you remember having to set them that low to achieve the desired swashplate setup.

You are right, checked my earlier parameters again:
SERVO1_TRIM,1575
SERVO2_TRIM,1212
SERVO3_TRIM,1150

My other heli (#3) has better trims:
SERVO1_TRIM,1475
SERVO2_TRIM,1480
SERVO3_TRIM,1460

Excellent point, thanks :slight_smile:
have to repeat alignment process due to servo horn breakage, might explain some discrepancy behavior

Completed the pitch/roll autotune successfully. I noticed the two pitch autotune flights converged to pretty different values of accel_max and ang_p so I’ve uploaded two samples. Will keep progressing with another roll, yaw, and into the autotune with rate P/D.

Heli Size: 280
Number of main rotor blades: 2
Main Rotor Diameter: 0.63m
Tail Rotor Diameter: 127 mm
Takeoff Weight: 1.2 kg
Rotor Speed (RPM): 3300-ish (55 hz peak on the FFT)

On a side note, just wanted to confirm the intended behaviour of the tuning maneuver during the VFF tuning. It’s pretty snappy at the exit of the pitch/roll maneuver - see attached image. The target pitch angle is held at +18 deg while the target pitch rate goes to -50 deg/s and the vehicle pitches down accordingly. When the constant rate portion of the maneuver completes, the target pitch rate snaps to +160 deg/s to bring the pitch angle (now at about -20 deg) back to the target pitch angle of +18 deg. Makes sense considering that you want a constant rate command.

Pitch (1) https://drive.google.com/file/d/1e83i4N_a0XOo9ukyMrJrKTNgiL_v48aL/view?usp=sharing

Pitch (2) https://drive.google.com/file/d/15RMf_cIEvF2COFwIas-cUozqfWXrraGW/view?usp=sharing

Roll: https://drive.google.com/file/d/1EzpuIB_M9Ai--toVBBtc1NCM2qCTnG1h/view?usp=sharing

Hello Bill,
tried today with the new FW. Was good and bad.
Unfortunately I had not looked more on LOG_BITMASK, I think there were the wrong parameters.

The first flight with Autotune was good (roll), he did everything and after landing immediately switched off the engine. And also saved the values.

On the second flight (pitch) it also started to oscillate, but then the motor switched off again ( =motor interlock).

Then flew again, after 10 sec. Motor off (= crash detector).
then I deactivated the crash detector.
Then flew again, without autotune, after about 30 sec. motor off again (=internal errors (0x800).

Fortunately only a small damage.

Maybe you can still do something with the files.

Holger

Holger,
I am sorry to hear of your problems. In order to completely rule out the autotune firmware, please load the stable version of 4.0.7 and see if you get a motor shutdown.
I will consult with @tridge with the data you provided. Maybe it will give us more answers.

Thanks again for your testing.

@Murdoch Thanks for the data. Yes, I know the return to level is pretty abrupt. It doesn’t look that bad on a 600 size but I’m sure it is pretty snappy on a 300 size. I can work to make that less abrupt. I have been working on another version that will identify the max rate D and rate P gains and tune rate D. The biggest issue with those tests is maintaining trim and not having the aircraft run away while it does the oscillations. It is easier with the angle P because I’m using stabilize commands to perform the dwell and I can just add the pilot command on top of it. With the max gain and rate D test, the inputs are rate commands and it is more difficult to superimpose pilot commands especially when it transitions from rate commands to attitude commands. So I have been working to have it hold trim attitudes better during the dwells. I hope to test that out this weekend. I will look at your data as well. Thanks for testing!!

@picoflug I had the log file analyzed by another developer. He thinks there may be an issue with the interrupt request handling. We need more information on how the RC receiver inputs are given to the flight controller. please provide the receiver manufacturer and model and which port on the flight controller it is plugged into. Also please let us know if you are using a PPM encoder between the receiver and flight controller or is your receiver providing SBUS or some other summed PPM signal.

I would recommend that you stop flying 4.0.X firmware in your PH4-mini. There is something about your setup that may be causing this issue. It seems like you don’t have any problems with 4.1-dev since you reported that you have flown many times on this firmware with no issues.

Thanks,
Bill

Hello Bill,
I re-installed the autotune-FW and made two flights today in ALTHOLD, 10 minutes and 15 minutes.
all was right, no messages in MP.
For autotune it was too stormy today - next.

my receiver is FrSky R-XSR, connected via S-BUS to the PIXHAWK 4 mini. I have the same constellation in two other Hubis, no problems.

regards Holger

Hi Bill,
today i did the autotune, all was running, no problems, no messages. I think there must be a bug in the first installation of the firmware.
first nick, then roll and then yaw.

Than adding nick and adding roll. And than a flight.

It is flying good, but it could be a litlle bit harder, especially in yaw.

with regards

Holger

@bnsgeyer
Bill,

during the past few days I have found several entries from beginners like myself who have problems with tuning their helicopters.

I am very tech and data affine, but I still have problems understanding the log files and drawing the right conclusions from them.

Again and again we beginners have to burden the experts in the forum with our questions and log files. Your patience with us is to be admired.

It is therefore twice as good if your autotune works and is soon available as a stable version.

If spring and nice weather weren’t around the corner, I would wait until your autotune is done before flying FC any more.

BR

Heri

@Steve_Mitchell I was looking through your 380 logs again. Your VFF requirements are pretty low compared to larger heli’s. I had asked that you start off with an I gain of 0.1 for these tests but realized that during the Angle P test, I don’t modify the gain to 1/2 your VFF. I think it could be why I’m seeing larger response gains at lower frequencies (<1 hz). So please conduct the pitch and roll autotune again except have your pitch and roll I gains set to 0.05. It will be much closer to 1/2 the calculated VFF gain.
Thanks
Bill

All axes tuned using stock autotune. Created/updated a share folder so I’m not spamming with individual links. There’s a google sheet in there which summarizes everything.

https://drive.google.com/drive/folders/1JZOkg4DFMECFiycaZPwPlEtyfjQNsoXv?usp=sharing

Pitch tuning with a non-zero pitch rate D went well. Converged to different values, but went well. I stopped the autotune flight with non-zero rate pitch P and D. I wasn’t 100% sure how to decipher the messages to see which ANG_P or ACCEL_MAX values it was on when I stopped, but the log is in the share folder. I didn’t try with the roll axis since the rate roll D is already zero

Interesting point with the I tune being set to 0.05 for the smaller heli. The stock autotune generally converged to 0.05 in pitch and roll.

Next time out I’ll see what info I can get in roll. Rate Roll D was tuned with ATC_RAT_RLL_FILTD set to zero, so I might be able to work on that. I’ll try set the starting I term to 0.05 as well.

Niall @Murdoch,
Thanks for the additional testing. Last night I was looking at your flights that you provided previously. Your aircraft responded in pitch and roll similar to what I have seen with my 626. So I was contemplating how to address the response seen in Steve’s aircraft.
I am glad to see that you added some rate d gain and re-ran the autotune. I will look at your data when I get a chance and give you feedback.

@picoflug thanks for continuing to test despite the FC issues you have been having. I will look at your data too.

@bnsgeyer Okay, I’ve give it a try this weekend. We have had two weeks of atrocious weather, so haven’t done any D testing for you.

@Murdoch,
What does your normal tune look like for the pitch axis? Can you send me a Param file for what you fly normally. When you added the P gain, the response gain was getting really high so it was good that you stopped the tuning.

As for my messages, it appears that the ATNH message, which records the results of the test, is not always being logged. So you can look at the MSG message and that is what is being sent to the ground station. There are a lot more messages to sift through but it appears to all be there.

It looks like my VFF tuning is not doing so well. It over estimated. Your VFF for pitch should be somewhere around 0.13. With just the rate D gain tuned, it is hard to say what the proper angle P gain should be. With Angle P of 4.5, the response gain peaked at 2.67. So how did it feel tuned with the autotune using just the rate D gain?

I may have to provide the option to allow users to set their own VFF until I can get the test to do a better job.

In roll, it responds very similar to what I expected based on my heli. The VFF has some variability but over all it is a much better. It required an Angle P of 10 to get the response gain up to 2.0 which is acceptable.
thanks
Bill

@bnsgeyer Hi Bill, Did some 380 size Roll and Pitch Autotune testing with I gain set to 0.05. I’m not sure why but there seem to be a lot yaw/heading changes compared to the first round of Auottune testing that I did. Seem to have a mind of it’s own. :laughing:

Ran out of time to do D gain testing.

Params:
SM380 Pitch Autotune I 0.05 - 155.param (18.6 KB)
SM380 Roll Autotune I_0.05 - 156.param (18.6 KB)

Log files:
Pitch:
https://drive.google.com/file/d/1hEkR-QJ6dxTlzn1xWBZY54yol7USTjGf/view?usp=sharing

Roll:
https://drive.google.com/file/d/1EugSqZdt7BHrUhPSzMVOZerc26riEmQs/view?usp=sharing

@Steve_Mitchell thanks for the data. I will take a look.

@Murdoch @Steve_Mitchell @ZvikaF @picoflug
I have been working to improve autotune. I have made the VFF test smoother so it doesn’t violently snap back to the trim attitude. I have also been working on the angle P test. I will look to test it this week hopefully and get another version out this weekend. Thanks again for all of your testing and willingness to accept the added risk.
Regards,
Bill

@bnsgeyer

Thank you Bill for your hard work.
I have my 450 ready for couple of weeks, but the weather is gusty.
Looking forward to try the smoother version :slight_smile:

1 Like