Copter Wobbling at High Head-Speed

For pitch and roll with traditional heli frames (ie single main rotor and tailrotor), it is the best approach for autotune at least initially and that is because most of the control comes from the feedforward path. Where as the yaw axis has most of the control from the rate P gain. So that is why you don’t zero rate P and D before tuning the yaw axis.

Well, I’ll have to get back to tuning some other time, I stripped the main gear in a fast spool up on the ground. I have the bailout spool up set for 1 second in order to recover from a free fall, in which case that can be good, but it should be slower for this heli.

It was an odd thing. I had landed in auto mode, and the motor had shut down. I didn’t change the mode, nor did I change the state of the Motor interlock at this point. Suddenly, the heli spooled back up for a moment. The only control input that may have affected this is I had moved the collective stick back up. Does Auto-Mode respond to collective position for determining throttle state?

All else is well, I’m just ordering some more drive gears, which I have expected to replace often with this heli. I will lengthen the bailout spool-up time as well. I never liked how fast I had it set.

Yaw Angle-P tuning is here

I don’t think this is required. The fast re-spool is meant to be operated with main rotor at nominal rpm (or close vicinity anyway). Power recovery don’t normally pose any extra stress on the gearbox- what you probably experienced is a fast re spool with low rotor rpm which caused the over torque.
Do you have a log of this?

That is this log:

The ESC handles the speed in store governor mode. It engages after 40% throttle input.

Sorry, did you mean you landed in AutoTune mode? There is no Auto mode in this log

Yes, I meant Auto-Tune mode, sorry.
I landed in Auto-Tune mode, the motor shut down for a few seconds, then somehow decided to re-engage. In the log, you can see a flag saying “EV: LAND_COMPLETE_MAYBE” so perhaps the autopilot was not sure if the heli had actually landed.

If you land in autotune, you must disarm in order to save the tuned gains. If you switch to another flight mode before you disarm and you still have motor interlock enabled then it will cause it to spool up again.

It won’t disable motor interlock until it is land complete.

That’s why my case is strange. I did not change the mode. My channel-5 input for the mode setting never changed during that time. I did not change the interlock state either during that time.

There is another flag in the data log which says “EV: ROTOR_SPEED_BELOW_CRITICAL” after I have landed, and RPM is reporting as zero at this point. Some process in the autopilot still believes the helicopter is in the air I suppose, and is probably engaging an emergency response to bring the RPMs above a critical state.

Ok. That doesn’t sound right. I will have to look into it.

@Raisintoe
Why do you have both RSC_IDLE and RSC_AROT_IDLE set to the same value? you are using the ESC to distinguish when to fast spool for auto recovery and slow spool for ground start up, correct? If you are using the ESC then the RSC_IDLE would be set to zero and the AROT_IDLE set to 30. It doesn’t explain why the motor started to spool again but I want to make sure your set up is correct.

So here is plot of RC3_IN which is your throttle stick and SERVO10 which is the output to the ESC.

This is definitely a bug but I’m not sure what triggered the SERVO10 output. Autotune is altitude hold in the vertical axis and typically a takeoff is triggered by raising the collective (throttle stick) above halfway. It doesn’t appear that you did that. However I will caution you on raising the collective off of the bottom stop as there are certain things like takeoff that are triggered if the stick is more than halfway between hover collective and zero collective. All of this still doesn’t make sense.

I will have to do some testing in SITL to see if I can reproduce this event and then figure out why it is happening. Sorry about the stripped gears.

As far as the angle P testing of the yaw axis, It took the gain to 10 which I typically don’t keep it there even though the data says its ok. I think and Angle P of 6-8 would be fine. I typically set mine to 6.

For now if you plan to do more autotune testing, I would recommend that you disable the manual autorotation, set the H_RSC_IDLE to zero, and be sure to keep the throttle stick down after landing in AUTOTUNE, disable motor interlock and disarm.

I’d like to add little clarification: the issue he encountered is not related to having H_RSC_AROT_MN_EN set to 1.
It is related to the engine re-spool (on the autopilot side) and having H_RSC_IDLE set to 30, which clearly falls within the ESC internal “fast respool” threshold.

Mmm, yes, I had H_RSC_IDLE set to 30 in order to test fast spool-up response on the ground initially. I will set this to 0. The autopilot will go directly to H_RSC_IDLE as soon as the landed state is detected, correct?

A stripped gear is a very small contribution toward supporting software development. Thank you for all of your work and support. I’ll be back up flying again on Monday :slight_smile:

Yes, if you have manual autorotation enabled, when you disable motor interlock and you are not landed, then the servo output to the esc will be RSC_AROT_IDLE. Then if the autopilot detects a landing with motor interlock disabled then the RSC_IDLE is used.

My assumption here is probably invalid. What really matters is the moment of inertia of the helicopter, correct? The heli is 27lbs. With that weight, I suppose the resonant frequency would be fairly low?

Hi Derek,
It somewhat deals with weight but more with how it is distributed which is moment of inertia. It also deals with rotor design. The two are the primary influence on the rigid body modes of motion. Pitch and roll modes are heavily influenced by the rotor. Autotune uses the frequency defined by the phase of 161 deg to tune the gains for these rigid body modes.

Here is an update on the issue we found because of your stripped gears. How autotune handles the motor interlock was faulty. There is a proposed change to the code that will automatically turn off the motor and then disarm the flight controller once it detects landing in autotune. It was discussed in tonight’s Dev Call meeting and hopefully will be accepted into the code over the next week.

1 Like

Is it still possible to test the Radio Failsafe on the ground, as shown here? Radio Failsafe — Copter documentation

I have been trying to verify that my autopilot switches to RTL mode on a radio failsafe. So far I only get an immediate disarm because I am on the ground.

How can I verify that the autopilot will in fact go to RTL mode in case of a radio failsafe in flight?

Test Log here: 2024-07-01 21-08-55-anon.log - Google Drive

@bnsgeyer I performed a Pitch Rate-D and Rate-P tuning sequence. I quit just before it finished. I went as far as I dared, but the amount of flex in the main rotor blades was starting to scare me. But, I think I have enough data to estimate a good tune. In fact, looking at the ATNH data table, it looks like Rate-D settled on a value of 0.003180596

Is this enough information to tune Angle-P gain as well as the Rate-D and Rate-P gains? Or will I still need to do an Angle-P tuning sequence? I figure whatever is determined for the Pitch gain will be close enough for the Roll gain also.

. . .

I set the Rate-D gain to 0.003180596 for Pitch and Roll axes. Then went to do a manual tune for the Rate-P gain in both axes. Turns out the Rate-D gain is a little high. The helicopter started shaking after takeoff. I’ll go back to manual tune the gains for now, until we can calculate better gains from the autotune.

The tail axis is a little high on the gains too. It’s been oscillating just a little. Probably didn’t give it a good autotune since I never lowered the P and D gains back to zero to begin with.

. . .

The Feed-Forward Autotune set the Roll FF-gain exactly to what I had set it for during manual tune, (0.18) that’s pretty cool!

You can’t make the assumption that the roll D gain is the same as the pitch D gain. Typically the roll D gain has to be much smaller. That is why the aircraft started shaking. That is true most of the time for the rate P gains as well.

You really need to follow the process I laid out in the autotune wiki. If you feel that autotune is causing too much stress on the aircraft then stop and I can typically determine appropriate gains from just the max gain determination test for the each axis.

You don’t want to lower rate P and D gain on the yaw axis to zero. That could be disastrous as the yaw axis uses mainly rate P gain for control. Please use the gains that autotune determined when you conducted it the first time. The gains it determined after the second time you ran it were probably a little high.

@bnsgeyer Did this data at least give you the Max gain sequence for the Pitch? If I understand correctly, the max gain sequence is the first part of the rate sequence. I did follow the wiki for tuning the pitch rate gains.

Yes that is correct. I can get that info from your log. I just haven’t been able to look at it yet.

Right. You did. I was just saying that you can’t go and change the roll rate p and d gains. You have to be careful with the assumptions you make causing you to deviate from the process. You’ll want to continue using the wiki process which has you conducting the autotune rate p and d tuning of the roll axis.