Copter Wobbling at High Head-Speed

Thanks, I’ll go through the rest of the process as much as possible, and get you that data.

Let me look at the log tonight and at least tell you what I think the rate P gain should be for pitch. Tben you can run the roll axis rate p and d tomorrow.

In the log, you can use the table in mission planner to look at the data for a particular message. So you can filter that table for MSG. Scroll down until you see a message that should say max p gain and max d gain. It should be right before the messages change from Max gain to rate d up for the test. Typically the D gain when it finishes tuning is about 25% of the max D gain and the P gain is about 35% of the max P gain. The p gain varies a little more because that drives the response gain.

I ran out and got the Roll Rates Log already: https://drive.google.com/file/d/1fClqC0L6ISGofEw0Z4lpymUzkQzMZ5v-/view?usp=drive_link

I cut this test shorter than the previous one.

Derek,
First I can go over the pitch axis with you. As I suspected, the autotune determined a value for the Rate D gain of 0.0032 which was 25% of the max gain determined through that test. The max gain for the Rate P was 0.0175. Here is what the frequency response with no rate P or D gain.


Increasing the rate D gain helps flatten this out and push the drop off in gain out to higher frequencies. The peak in this plot shows the beginning of a lightly damped oscillation but the D gain should have helped reduce this. The question becomes how high to make the Rate P gain. I would start with 35% of the max predicted gain since the peak was low (< 1.4). So set the ATC_RAT_PIT_P to 0.0061

The roll axis is slightly more interesting. Here is the frequency response plot from your flight


The peak is out near 45 rad/s (7 hz) and it is close to 2 which is toward the limit of where I stop tuning. So we can use one of the new filters in version 4.5 to remove this peak. Here are the setting you will make.
FILT1_TYPE to 1 - notch filter
Refresh parameters
FILT1_NOTCH_Q 2
FILT1_NOTCH_FREQ 7.2
FILT1_NOTCH_ATT 6
ATC_RAT_RLL_NTF 1
ATC_RAT_RLL_NEF 1

Then rerun the max gain determination portion of the roll autotune for rate P and D tuning.

2 Likes

@bnsgeyer Bill, again, thank you so much for all of your support on this.

I performed a Max Gain test (AUTOTUNE_SEQ = 8) for the Roll axis, having all of the parameters set as given in your above post.

The Flight data is here: 2024-07-03 11-42-29-anon.log - Google Drive

Also, it might be worth noting the pitch axis oscillations now having the D and P gains set as you suggested:

As the pilot, I don’t notice these oscillation during flight. Maybe these are fine. Does the continuous ringing pose a concern for instability?

The Yaw axis does oscillate before takeoff. But seems fine after takeoff. I think there is a parameter to set for preventing stability corrections from taking place while landed?
I have IMAX set to 0.8 for the YAW Rate. Is this a good idea for traditional helis?

What units are we working in when looking at MSG? The gains are between 6 and 11. Much much larger than the gains being set in the actual P and D rate parameters.

I’ll assume, based on what we got for Pitch gains, that I can take the Roll max gains from my new data: D_max = 6.278948, and P_max = 10.54468, divide these by about 617.59, then take 25% to for D-gain, and 35% for P-gain.
This would be:
ATC_RAT_ROLL_D = 6.278948/617.590.25 = 0.00254
ATC_RAT_ROLL_P = 10.54468/617.59
0.35 = 0.00598

Or , better yet, just adjust percentage-wise as compared to what we got for Pitch gains:
ATC_RAT_ROLL_D = ATC_RAT_PIT_D*“ROLL_D_MAX_GAIN”/“PIT_D_MAX_GAIN” = 0.00326.278948/6.672449 = 0.00301
ATC_RAT_ROLL_P = ATC_RAT_PIT_P
"ROLL_P_MAX_GAIN"/“PIT_P_MAX_GAIN” = 0.0061*10.54468/10.76371 = 0.00598.

At least. I may try working in these numbers with a manual tune to see if they are correct.

No. Don’t do anything. You don’t have the right values

Sorry, I should have been clearer in my explanation

this image shows the message I am referring to.


it wasn’t as clear as i remembered. The values you are looking for is
rate_p=0.071773
and
rate_d=0.002101

So I would recommend setting rate D to 0.000525 (0.25* 0.0021) and rate P to 0.025 (0.35 * 0.0718)

Okay, I’ll go try those values.

For what it’s worth, here is the flight data with my values (wrong values): 2024-07-03 14-32-15-anon.log - Google Drive

Please perform a max gain test for both the pitch and roll axes with the current settings. Which includes the ones I just gave you for the roll axis

Don’t make any other changes to the rate P or D gains for the pitch and roll axes. Let me look at the data. At this point, I don’t think you need to do the angle P test. My rule of thumb for the pitch and roll axes is to set it at 6. I want to look at the max gains tests. Then maybe tomorrow I will have you do the tune check. The only reason I don’t have you doing it today is because I might have you make a change to the pitch axis gains, depending on what I see in the data tonight.

@bnsgeyer
Here is the Max Gain Test data for both Pitch and Roll axes, with all tuning parameters set as you have given: 2024-07-03 15-40-40-anon.log - Google Drive

Derek,
Here is the roll frequency sweep.


You can see that the rate response is about 1 to 1 with the target rate. So that is good and means the gains are not too high.

Here is the pitch frequency sweep


You can see that earlier in the frequency sweep that the rate response is greater than the target rate. Are you seeing any type of overshooting of the pitch axis? If you are, then you can drop the rate P gain on the pitch axis down.

At this point, set your angle P gains for pitch and roll to 6. If you would like to run the tune check test for pitch and roll and post the results, that would be great.

I see that you have the ATC_INPUT_TC at 0.15. Personally, that is a little low for a 900 size heli. I would recommend 0.22 or 0.25. I think it would be a lot smoother.

Looks like the gain for pitch rate P should actually be much higher. The max gain “rate_p” is actually 0.175. I will do a manual tune up to 0.061 to make sure that is correct. Currently, it is set at 0.0061.

. . .

Here is the flight data for Pitch Rate P set to 0.061. Still isn’t working out. I’ll try going through tuning from the beginning with the Pitch rates.

what still isn’t working out. What is wrong with the pitch axis?

Don’t listen to me, it’s July 4th, go enjoy a BBQ with fireworks :slight_smile:

We have a quiet evening planned. No fireworks. I just got done working in the yard on our retaining wall and it is 93 deg. So I am resting.

The data looks pretty good. the pitch response did not get any larger so the gain stayed about the same. So I think the new gain is ok. I think the tuning is complete other than setting the angle P gains.

Hmmm, I thought the goal was to have the gain between TRate and Rate appear close to the same magnitude throughout the frequency sweep, which it isn’t doing at all.

That is the goal but in the case of the pitch axis the higher response is at too low a frequency to use the notch filter and the gain is still low enough that the response should still be pretty good. If you think there is some bounce back, we can look at using the notch filter to help with that.