Servers by jDrones

How to prevent RcOut saturation in AutoTune?

Hey guys,

Cube with 3.5.3
Frame: Y6B
Motors: 150KV with large Props
2 parallel batteries, used less than 30% on both logs (fully loaded before each tune)
Hover at around 50% throttle.
No payload, zero moving parts

AUTOTUNE_AGGR = 0.05
ATC_RAT_RLL_FILT, ATC_RAT_PIT_FILT = 10 Hz
Vibration around 3-4, no clipping in normal flight.

Voltage and current sensing was not available at the time. :frowning:

I “tuned” Rate Roll/Pitch over Pos6 “Switch” first.

First log shows partial AutoTune on Roll axis. I stopped that early and transfered the values from RP and RD to Roll and Pitch values. Because I saw some weird movements after AutoTune pushed SP to 6, I reduced that from 4.5 to 3 for the second tune.
Second log shows the second tune on roll axis, with heavy oscillation because of RcOut saturation in the end.

Logs can be found here:
https://drive.google.com/drive/folders/1_MC1KUKJuuH7NQZYxW-bIhTjFDyP7zbx?usp=sharing

Have a look:

Which parameter should I change to achieve a gentle first AutoTune?

Values saved alongside the second AutoTune log.

ATC_ACCEL_P_MAX 57458.26
ATC_ACCEL_R_MAX 68978.54
ATC_ACCEL_Y_MAX 15591.96

ATC_ANG_LIM_TC 1
ATC_ANG_PIT_P 3
ATC_ANG_RLL_P 3
ATC_ANG_YAW_P 3

ATC_ANGLE_BOOST 1

ATC_RAT_PIT_D 0.0255
ATC_RAT_PIT_FF 0
ATC_RAT_PIT_FILT 10
ATC_RAT_PIT_I 0.1
ATC_RAT_PIT_IMAX 0.5
ATC_RAT_PIT_P 0.388

ATC_RAT_RLL_D 0.0255
ATC_RAT_RLL_FF 0
ATC_RAT_RLL_FILT 10
ATC_RAT_RLL_I 0.1
ATC_RAT_RLL_IMAX 0.5
ATC_RAT_RLL_P 0.388

ATC_RAT_YAW_D 0
ATC_RAT_YAW_FF 0
ATC_RAT_YAW_FILT 2.993684
ATC_RAT_YAW_I 0.02
ATC_RAT_YAW_IMAX 0.5
ATC_RAT_YAW_P 0.2

ATC_RATE_FF_ENAB 1

ATC_SLEW_YAW 6000

ATC_THR_MIX_MAN 0.5
ATC_THR_MIX_MAX 0.5
ATC_THR_MIX_MIN 0.1

AUTOTUNE_AGGR 0.05
AUTOTUNE_AXES 1
AUTOTUNE_MIN_D 0.001

MOT_SPOOL_TIME 0.5
MOT_THST_EXPO 0.65
MOT_THST_HOVER 0.2829197

Hi,

These two logs look like they are from different vehicles. The first has what looks like a pretty good tune. The second looks like it was done in a strong wind or something.

I am seeing an unusually strong coupling between roll and pitch.

When you copied the values from your first tune you missed the Acceleration ATC_ACCEL_R_MAX = 24000.

So the main thing you need to look at is the mechanical reason you are getting strong roll and pitch coupling. I am having trouble working out what is happening here. It may be your MOT_THST_EXPO being too low but is could also be your ESC’s are not calibrated to your pwm range (I would be surprised if you did this but I have to share any suggestions).

If you share some photos I may have more ideas.

Hello Leonard,
thank you for your valuable input!

I changed the following options:
ATC_ACCEL_R/P_MAX to 24000
MOT_THST_EXPO 0.75
(and recalibrated the ESCs…)

Flight 3:
(27.11.2017)

As I interprete that:
You can still see those Pitch/Roll couplings.
Current spike (not calibrated) and voltage drop of around 0.6V (2x 6S 16Ah) are telling the same story.

This was in a very gentle left/right sliding movement. Tuning seemed too risky afterwards…

Than again I ran ESC and radio calibration.
(28.11.2017)

As to my understanding, the couplings are still there…

ESCs: T-Motor Flame 60A
No coupling between Signal wires, but the wires of the bottom motors are around 5cm longer than from top motors…

What can I do next:
Changing the ESCs?
Any suggestions for type/model? (Hobbywing?)

Logfiles (including last param file):

The logs you showed do not show large amounts of coupling.

I would suggest setting MOT_THST_EXPO to 0.55 and doing a manual tune followed by another autotune.

Let’s see if we can still see the problem. Make sure your CG is in the correct location!

Hello Leonard,

flight characteristics in stabilized and alt hold seemed fine to us.
Problem is still there.

First flight:
Saw the issue clearly in AutoTune. Stopped that —> Land —> another ESC calibration

Second flight:
Same problem as in first flight…

Third flight:
We have to wait for new props until mid December…

Disassembled drone and PH2 completely, no solder bridges or anything related to the issue.

Wiring loom is build for 180A continuous current.
Both parallel 16Ah Lipos are rated with 15C, they should handle the current flow as well.

Logs:
https://drive.google.com/file/d/1WmyYFjhlxwzgDGAz0UedbOpEdI3IAyma/view?usp=sharing

Hello and happy new year :slight_smile:

We build a plattform for testing/calibrating roll and pitch independendly.

Is it possible to use the AutoTune feature to tune a rigged copter?
Values for P and D are reasonable and can be validated through inflight testing.

The I term instead will be set to the same value as the P term through AutoTune.
Can this be right?

@Leonardthall:
Before I bother you again with the couplings of Roll/Pitch:
Can you describe what to look for in the logs?

I think you mean the following:
ATT>Des Roll and ATT>Roll are tracking well. In the exact moment ATT>DesPitch equals to zero whereas ATT>Pitch features a non zero value.
The undesired ATT>Pitch gets bigger with larger Des Roll “inputs” through the user.

Is this acceptable to a certain degree?

Thanks

That is correct.

That is correct. This is done to achieve a nice feel for the pilot as the aircraft has to fight propeller flapping torque as the aircraft speeds up. You can set it higher than this but you should not need to reduce it less than P.

Yes but I have not seen a tune on a rig match a tune done in the air.

Just a quick feedback:

We switched to breaking ESCs.
Afterwards tuning even with Aggr=0.1 was like tuning a regular sub 5 kg copter.

The achieved tune ist rock solid even in very high wind gusts!

Thanks for your help Leonard!

1 Like

Fi156.

What braking ESC did you switch to? I know this was years ago. Would you use a difference ESC?

I have experienced a crash and very unusual flight characteristic during qautotune. So much so, that I am afraid to do an autotune on my next build.

Thanks,

Dave

Servers by jDrones