7 Inch Copter very fast Roll Oscillation

I have built an I-Flight 7 inch copter and I got it flying, but I get a very fast oscillation in roll, mostly in LOIT mode hover. It is right on the edge of oscillating when hovering. I have set the following tuning below, which made if fly, but lowest setting of these tuning parameters does not quite take all the oscillation out.

ATC_RAT_RLL_D: 0.01
ATC_RAT_PIT_D: 0.01

Are there any other settings in Arducopter that would make the copter stop these very fast oscillations ???

Many settings:
Initial Tuning
Simply lowering the D term won’t get you very far.

Are you flying a Chimera 7? I have the same frame with 2806.5 motors running 7x3x3 props. Those D values are pretty high (I’m like at 0.002~0.003)

You can find some of my journey here; lots of good help from Andy.

When I set my quad up, I had shaking using the values from the guide. I just halved everything and got the quad to at least hover in stability/alt hold without shaking. Then ran an auto-tune. So do set up a switch for autotune.

Afterwards it was playing with filters and such on that thread.

Hi John,

I actually went down to 0.00 in both pitch and roll and it did not make much difference. The copter is a very standard 7 inch setup used by everyone:

IFlight XL7 ( Same as yours but true X format )
Motors: Lumineir 2807 1200 KV
Props: 7x4x3
4 Cell Battery ( Oscillates like crazy, and motors get crazy hot when I try 6 cell )

Hi Dave,

Thank you for the link. I used that setup page and carefully set each parameter as per the graphs and instructions. I can get it to fly on 4 cells, but it oscillates like crazy on 6 cells ( probably like 3 times per second ) and the motors get crazy hot.

From what I can decipher from the PID information, D is the setting that would affect an oscillating hover. The P and I settings seem to affect reaction to stick inputs and movement. Is there another setting I should be looking at ?

You always need a little bit of D to dampen overshoot or it’ll oscillate from P. So P:D ratio is another better way to look at it. Zero D isn’t good either.

But too much D will cause its own D oscillation.

So if you getting oscillation with low D, try lowering P as well.

Have you configured the harmonic notch?

Hi Andyp1per,

No I have not, but thank you for the suggestion. That probably has something to do with the red VIBE warning I get when flying over 20 MPH. I did a search and found this, so I will give it a try:

This is a thread to discuss harmonic notch tuning in Copter 4.0 including throttle-based, ESC telemetry based and my FFT harmonic notch PR.

The current docs are here:
http://ardupilot.org/copter/docs/common-imu-notch-filtering.html

Hi Chronowarper,

I did not realize P and D needed to be a ratio for a zero movement hover, I will give it a try. I need to do it manually, because I let it fly the auto tune sequence, and it said SUCCESS when it was finished, but the copter went from flying kind of OK to totally uncontrollable after the auto tune, the crash was immediate :frowning:

Could you share your .param file?

Even if you’re not giving the quad any stick input, the quad will respond to wind/air.

I’ll share my initial values that got me hovering. These aren’t ‘good’ values as they’re not tuned. I just took the arducopter initial values (which was shaky on lift-off) and halved all of the roll/pitch P/I/D terms. That got me going. The process is to drop them more (in equal weight) if quad is not stable per the initial tuning guide.

But since we’re both running 7" with similar size 1300kv motors on 6S, this may serve as a reference for magnitude of the PID values.

This is my initial setup for my quad after followed the tuning guide. https://ardupilot.org/copter/docs/tuning-process-instructions.html. I assumed INS_GYRO=65 and followed the formulas.

ATC_RAT_PIT_D,0.0018
ATC_RAT_PIT_FF,0
ATC_RAT_PIT_FLTD,33
ATC_RAT_PIT_FLTE,0
ATC_RAT_PIT_FLTT,33
ATC_RAT_PIT_I,0.07
ATC_RAT_PIT_IMAX,0.5
ATC_RAT_PIT_P,0.07
ATC_RAT_PIT_SMAX,0
ATC_RAT_RLL_D,0.0018
ATC_RAT_RLL_FF,0
ATC_RAT_RLL_FLTD,33
ATC_RAT_RLL_FLTE,0
ATC_RAT_RLL_FLTT,33
ATC_RAT_RLL_I,0.07
ATC_RAT_RLL_IMAX,0.5
ATC_RAT_RLL_P,0.07
ATC_RAT_RLL_SMAX,0
ATC_RAT_YAW_D,0
ATC_RAT_YAW_FF,0
ATC_RAT_YAW_FLTD,0
ATC_RAT_YAW_FLTE,2
ATC_RAT_YAW_FLTT,33
ATC_RAT_YAW_I,0.018
ATC_RAT_YAW_IMAX,0.5
ATC_RAT_YAW_P,0.1
ATC_RAT_YAW_SMAX,0

1 Like

Hi John,

I will be happy to share my .param file. Right now, my tuning and parameters are all wrong. I see what you mean about not just changing only the D value, I am readjusting these now. Also, I just changed my controller mounting and a couple other things to reduce gyro noise, I will test fly and share as soon as I have my results. How did you get your parameters to show as TEXT in your last post ???

1 Like

I am configuring the harmonic notch filtering using the ESC Telemetry mode. I have made the hover measurement and the result is in the graphs below. Prop speed at hover is about 8000 RPM.

I have read everything possible, and I do not know where to set the following parameter based on my graphs. The description of exactly what to set this parameter to is not well explained anywhere, can someone help me with exactly how this parameter should be set ???

INS_HNTCH_FREQ

If you are using ESC telemetry then leave FREQ/BW at the defaults - its only the ratio that matters

OK, the defaults are 80 HZ, and 40 HZ.

Given the graph above, if I did not have ESC Telemetry, what value would I use ? The center frequency of the largest spike ??? That would be 375 HZ ???

The Accelerometer graph is irrelevant when setting the Notch Filter. It’s only active on the gyro’s which you have no data for. Post your parameter file.
Detailed instructions are here:
Dynamic Notch Filter

Not necessarily. It depends on the vibration modes witnessed. Often the largest peak is a harmonic of a lower one and choosing the lower one is more advantageous.

Hi Dave,

Thank you for the quick answer, I will read the link you gave me. I have several copters I want to tune, and will be building more in the future… So it is time learn as much as I can about how to tune them perfectly.

There’s a lot of good material on PID tuning for Betaflight; the concepts generally carry over.


https://theuavtech.com/tuning/

The main catch is the tuning techniques here assume you’re flying in Betaflight’s acro mode with Betaflight’s air mode enabled (you have motor authority with throttle dropped to zero). Which in Arducopter means flying in acrobatic mode, with acro_options air-mode box checked, and a high ATC_THR_MIX_MAN value (I have it at 1)

If your experience is primarily with self-leveling stabilized mode, acro mode will take a little getting used to and I highly recommend you practice that with a simulator or with a small quad that can take some crashes.

My opinion is tuning in acro mode is really the best way to tune or validate the PID since there’s nothing else giving the quad commands.

1 Like

FWIW I have this at 4

SUCCESS !!! It is now flying great :smiley:

HERE WAS THE BIGGEST PROBLEM: Solved by chronowarper, Thanks !!!

You always need a little bit of D to dampen overshoot or it’ll oscillate from P. So P:D ratio is another better way to look at it. Zero D isn’t good either.

But too much D will cause its own D oscillation.

HERE ARE MY SETTINGS: Copter I Flight XL-7 4 Cell Battery. Arducopter 4.1 Anything not listed below is left in DEFAULT setting.

ArduCopterSettings IFLigt XL7 Copter:

FRAME TYPE: First SINGLE ROTOR PER ARM Quad Copter Box (even thought nose is pointing wrong), Then Check X , Y6A below.

ACCEL CALIBRATION
COMPASS CALIBRATION

ARMING_CHECK 0

RCMAP_THROTTLE 1
RCMAP_ROLL 2
RCMAP_PITCH 3
RCMAP_YAW 4

SERVO OUTPUT:
1 MOTOR 4
2 MOTOR 1
3 MOTOR 2
4 MOTOR 3

RADIO CALIBRATION

FLIGHT MODES:
FLTMODE_CH 5
SET MODES: LOIT LOIT LOIT RTL STAB STAB

BATTERY MONITOR FOR MATEK F765:
ANALOG VOLTAGE AND CURRENT
OTHER
Voltage Devider 11

LOIT SPEED 3500

MOT_BAT_VOLT_MAX 16.8
MOT_BAT_VOLT_MIN 13.2

MOT_PWM_TYPE 6 Sets Dshot 600 Recommended
SERVO_BLH_AUTO 1 Enables Configure of ESC via flight controller

RSSI_TYPE 1
RSSI_ANA_PIN 11
RSSI_PIN_HIGH 3.3
RSSI_PIN_LOW 0.1

RTL ALT 6000

BRD_SERIAL1_RTSCTS 1
SERIAL1_BAUD 57
SERIAL1_PROTOCOL 1
SR1_EXT_STAT 1
SR1_EXTRA1 5
SR1_EXTRA2 5
SR1_EXTRA3 1
SR1_PARAMS 10
SR1_POSITION 3
SR1_RAW_CTRL 1
SR1_RAW_SENS 1
SR1_RC_CHAN 1

SERIAL_5 PROTOCOL : 16 ESC Telemetry
SERIAL_5 BAUD : 115

WPNAV_SPEED 2000

OSD_UNITS IMPERIAL
OSD Screen Setup

RADIO CALIBRATION

TUNING IFLIGHT XL7

MOT_THST_EXPO: 0.60
MOT_THST_HOVER: 0.18
INS_ACCEL_FILTER: ???
INS_GYRO_FILTER: 60
ATC_ACCEL_P_MAX : 137500
ATC_ACCEL_R_MAX : 137500
ATC_ACCEL_Y_MAX : 31000
ATC_RAT_PIT_FLTD : 30
ATC_RAT_PIT_FLTT : 30
ATC_RAT_RLL_FLTD : 30
ATC_RAT_RLL_FLTT : 30
ATC_RAT_YAW_FLTE : 2
ATC_RAT_YAW_FLTT : 30
PSC_ACCZ_I: 0.36
PSC_ACCZ_P: 0.18

PID EXTENDED TUNING PAGE / BOX:

P ROLL : 0.1013 P PITCH 0.1013
I ROLL : 0.1013 I PITCH 0.1013
D ROLL : 0.0027 D PITCH 0.0027

VIBRATION TUNING

INS_HNTCH_ENABLE : 1
INS_HNTCH_MODE : 3
INS_HNTCH_REF : 1
INS_HNTCH_FREQ : 128
INS_HNTCH_BW : 64

END ARDUPILOT

3 Likes