Tradheli 4.2 Beta Testing has started

Correct, but it was too much and only happening going to the right side and not to the left. In the log above we can see it hapening 2x when I turn fast to the right. Normally I dont fly in Loiter because I crashed a couple of times and some leans also, so many bad feelings :frowning:
I am going to remove the brake delay and do some more checks. Thanks for the support!!
Regards,
Pedro

@Pedro_Claro Hello Pedro,

I use often Loiter and during the flights for many minutes. Can you post your parameter file. I want to look in your loiter-parameters.

BR

Heri

1 Like

Hi Heri, @heri
Here is the bin file with the issue in Loiter.
After you load the bin click on “show parameters” then you click on “Compare” and compare with your parameters.

Cheers,
Pedro

@Pedro_Claro Hello Pedro,

I have learned something again.

I compared your loiter parameters with my loiter parameters from my Hughes 500 with Mikado Logo 600 SE mechanics. With this helicopter I fly a lot and almost only in LOITER.

I have set LOIT_BRK_ACCEL to 150. The higher the value, the faster a movement is slowed down when you put the sticks in the middle. This could definitely make an improvement already if you increase this value.

My LOIT_Speed is also lower and the ANG_MAX is smaller for me. But that should not play a role here.

My DELAY is also set to 1 second. I have also flown with 0 seconds. But that was too fast for scale flying in the reset reaction. Setting it to 0 should therefore improve or solve your problem. In my opinion, this is the cause of the described behavior.
If I remember correctly, the heli always braked immediately with 0 delay, which bothered me.
The delayed braking you have to take into account in your flying style.
It is a pity that you cannot enter a small value, e.g. 0.5 seconds, but only whole seconds. 0.5 seconds would be a good compromise.

As you know, I only fly scale models. Therefore, I usually do not make sharp or fast stick movements. In your example you move the roll stick very fast and “extreme”. I have not had situations like that in my flying style.

I’m curious what happens when you set the delay to 0.

BR

Heri

Hi Heri,

Thanks for your feedback!
Yesterday I tested with 0 delay, and did not observe the issue. Could be that this delay is the root cause.
Well I was really aggressive testing the Loiter, anyhow I never liked the flight harmony of the heli in the Loiter mode, doesnt look natural. This was one thing I could not catch you when some time ago you said you prefered this mode for the scale helis, but now I got you, as you fligh them slow and this makes sense. The loiter in a 450 size looks a bit awkward, but this is just my impression :slight_smile: .

cheers,
Pedro

Here’s a video from today’s auto takeoff mission and landing. ( sorry for the “no terrain data” annoying messages :slight_smile: )
Autotune and the new Governor is proven!
Well now I am waiting for the next big feature !
Maybe Autorotation?!

Cheers,
Pedro

2 Likes

Hi Pedro,
I’m glad you are pleased with the new features. However, I think there is improvement on the autotune angle P tuning. I am exploring new ways to tune the angle p gain by using filtering to prevent the rate controller from being excited at frequencies beyond its ability to control. By choosing the ATC_INPUT_TC to be 0.15, I can estimate appropriate values for ATC_RAT_PIT_FLTT and ATC_RAT_RLL_FLTT to limit the frequencies being fed to the rate controller. This helps reduce the response gain and provides a better tune for the Angle P controller. If you are willing I would like you to try this on the pitch and roll axes. Currently I am only doing this for pitch and roll because the response gains are high (>1.8). So the rule of thumb is that the time constant for the rate response should be 1/3 the time constant for the attitude response. ATC_INPUT_TC is the time constant for the attitude response. So the rate response would be 0.05. This can be converted to a cutoff frequency for a first order low pass filter in radians/second by taking the inverse which becomes 20 rad/s. However the parameters require this in hertz. So it would be 20/(2*3.14159) which is ~3.2 Hz. You will want to apply this filter frequency to both pitch and roll.

So for this flight test, I want you to incrementally decrease the ATC_RAT_RLL_FLTT and ATC_RAT_PIT_FLTT together until you reach 3.2 hz. First set the ANG_P gains for pitch and roll to 4.5. For the filters, I think it is safe to jump straight to 5 hz initially. Flight test the setting in Stabilize mode. Make sure that you are not seeing any objectionable lag in the response compared to the previous setting. Then set it to 4 hz and finally to 3.2 hz. Once you have flight tested the 3.2 hz filter setting, then run the angle P autotune for pitch and roll. you can change the max frequency (AUTOTUNE_FRQ_MAX) to 60. A setting of 100 is too high for this and can cause poor response gain determination. You can do a flight test afterwards to see what you think however I would like you to post the autotune flights as well as the flight where you tested the new settings.

I think the Yaw autotune was tuning based on a poor determination of the max response gain.


In the graph you can see that the green line (response gain) peaks around 10:06:41 and then looks somewhat jagged out past 10:06:46. It chose a frequency of 80 rad/s to tune on where the max gain really occurred at approximately 40 rad/s. So run the yaw autotune again with the lower AUTOTUNE_FRQ_MAX value of 60 rad/s. That should omit the frequencies where it didn’t estimate the response gain very well. Don’t forget to set the ANG_P value for the yaw axis back to 4.5 before running the autotune again.

Thanks!

1 Like

Hello Pedro,

I myself only have helicopters from the 600 class and larger. Therefore, I do not yet have an impression of how the flight pattern of a small heli looks under loiter mode.

When I started with the loiter mode, the reaction around the stick center was also too sluggish for me. The heli almost didn’t move. However, I have found a solution for this.

I use a 3-step switch to switch between “Stabilice” “Althold” and “Loiter”. In the transmitter I have also assigned to this switch the function that it controls three flight states.
At state 1 and 2 ( = Stab and Althold) I mix a negative Expo to Roll and Pitch. This stretches the PWM travel around the stick center. The helicopter reacts less to the stick movement. In state 3 (= loiter) I mixed a positive expo. This means that the PWM travel around the stick center is increased, there is a larger control command. This makes this strong “coax” effect disappear, which you normally have in loiter mode. This keeps the control response in Stab and Loiter mode about the same. The rest can be adjusted with the loiter parameters.

For me, this results in a very smooth flight pattern that is very close to the original helicopter. Also my fellow pilots on my airfield recognize and love this again and again.

But this is of course very subjective and does not have to please everyone.
*
*
*
I know it would be a big request to you, but I would be very interested in seeing videos of your AutoTuning flights.
Just to evaluate for me if I can do the tuning maneuvers to my scale heli and my flying skills. Or whether I better skip some tuning steps.

BR

Heri

1 Like

Hello Bill,

until now I could follow your discussions halfway. But this last post of yours is higher mathematics for me. I hope Pedro understands it.

BR

Heri

1 Like

Hi Bill,
@bnsgeyer

Yesterday I found some time to do the tests with the filtering.
I went directly to the 3.2Hz filter and tried the Stabilize mode without any issues and proceed with autotune with the settings you requested. Unfortunatly at all times durig the sweep the heli started to oscillate like crazy!
Then I tried with 4Hz and after with 5Hz but the issue was persistent.

Here are the logs:
#4 Autotune Filter 3.2Hz Oscilate
Video Recording 3,2 Hz_1
Video Recording 3,2 Hz_2

#4 Autotune Filter 4Hz Oscilate
Video Recording 4Hz

#4 Autotune Filter 5Hz Oscilate
Video Recording 5Hz

#4 Autotune Yaw Angle P

Best regards,
Pedro

@Pedro_Claro i won’t be able to look at logs until next week. As far as the oscillations you were experiencing with autotune, what tune sequence were you running. Are you sure you were running the angle P tune sequence? I am pretty confident that you would see this behavior when running the rate P and rate D tuning but for the angle P tuning it should not do that. When you flew the aircraft in stabilize mode, how did it feel? Did it feel bouncy in pitch and roll? Thanks for testing!

@bnsgeyer,
It was the AngP for Roll and Pitch and the oscillation appears always close to the end of the first sweep, for all tests except the yaw angle P that ended sucessfuly (at least from AP prespective)


Strange that the Autotune data is not appearing in the logs for this 3,2Hz filter tryout, but it shows in the other logs like the 5Hz and 4Hz.
Can also advance that this oscillation only goes away if I reboot the AP, otherwise it persists also druing the next Stabilize flight.

It feels normal I could not notice a difference. You can see in the videos when I take off, I do sharp inputs and it reacted really good.
I am certain now that I observed this kind of oscillation before during old Autotune tests before, but I believe at the time they were cause of too many settings changes, without rebooting, as it would go away with a reboot. Now its reproducible :slight_smile:
best regards!

@Pedro_Claro so this oscillation definitely appears during the initial attempt at angle P autotuning and then persists until you reboot the controller? I will have to look at this when I get back. Thanks

Also to be clear, this only started to happen when I had you lower the ATC_RAT_XXX_FLTT parameter? You don’t see this behavior if you left the param at the default setting.

@bnsgeyer

It appears when the frequency reaches the maximum. Right after I switch to Stabilize but the oscilations kept going on until I land the helicopter (this can be observed in the videos). After disarming, If I arm again, and take off , the oscilations are still running.
I am a bit confuse, but I dont think this issue is only related to the filtering, as I have observed before during the Autotune tests, 2 or 3 times. Now with the lower filtering is reproducible.

Also the oscilatios are more intense in the Roll compared to the Pitch.

With the default setting (20Hz) this doesnt happen. I reset the filters to 20Hz and proceed with the Yaw Angle P with no issues.

best regards,
Pedro

@Pedro_Claro Hi Pedro, Sorry that it has taken a while for me to get back to this. I did some checks on my end to ensure the autotune Angle P test was not changing some setting in the attitude controller that was causing this. Everything looks good from the autotune code standpoint for Angle P. i am chasing down another issue with the setting of the I gain but I don’t think that this is a problem here as your I gain remained the same value before and after the test.

What I have come to realize with your tuning is that there is another flapping mode that I thought would be too high to be of concern for the tuning. Well it happens that that is not the case. Your roll flapping mode is at 13 hz and the autotune results drove this mode to be lightly damped. I think the attitude controller along with the I gain was helping to keep it from going unstable. So when you reduced the FLTT parameter, the help from the attitude feedback was being eliminated and thus allowed for this mode to go unstable.

Moving forward with your tune. I think the error signal as well as the target signals need to be filtered to keep from exciting this mode or we’ll have to reduce the rate P and rate D gains. I would recommend making both ATC_RAT_RLL_FLTT and FLTE 5 hz. You can try stabilize mode first to see if it made a differenced. Then run the Angle P autotune on Roll. Make your AUTOTUNE_FREQ_MAX = 100 rad/s.

2 Likes

@Pedro_Claro I found a bug in the autotune feature. I am pretty sure this caused this issue now. It appears the function that sets the gains for before tuning put the pitch gains in the roll axis and explains why you got oscillations and why they didn’t stop once you got out of autotune. If you choose to continue using Autotune then only tune one axis in a flight. Be sure to cycle power to the controller before doing another axis.

2 Likes

Hi Bill,
@bnsgeyer
Good that you were able to find this issue. Sorry for not replying soon, I am moving home and only next week will get some free time. I am certainly going to follow up the Autotune accordingly and asap bring you the results here. Thank you!
Cheers,
Pedro

1 Like

@Pedro_Claro
Hello Pedro,

nice to have you back in the forum. I am curious about your tests.

As I said before, the move comes first. :slight_smile:

BR

Heri

1 Like

Hi @bnsgeyer @ChrisOlson
I was wondering if this autotune feature is only for traditional heli or it can be used for tuning other heli configurations also. I was planning to go for autotuning my heli dual intermeshing.

@MoazHussain Sorry it took so long for me to reply. Yes the autotune can be used for any configuration of dual heli. Let me know when you start this. I would like to see how the data looks and may be able to provide some guidance.

Regards,
Bill