Unstable flight during RTL descend

I’m a beginner and right now I’m getting used to a lot of Data-flash logs.
Until Today the drone was pretty stable i made several RTLs and a few autonomous missions.
Everything worked well.

I changed the remote controller and wanted to try a normal RTL again.
The first moments were fine but when the drone was hovering above the Home point and began to descend the copter was really unstable (Nearly a 80 degree rotation on the pitch axis)
I switched into the loiter mode and the drone were getting a little bit more stable.
Here is a link to the .bin Log file:
https://www.transfernow.net/files/?utm_source=EvIvvG102020&utm_medium=&utm_content=de

LogAnalyzer:
Size (kb) 19830.6689453125
No of lines 224964
Duration 0:10:04
Vehicletype ArduCopter
Firmware Version V4.0.4
Firmware Hash 40502bd9
Hardware Type
Free Mem 0
Skipped Lines 0
Test: Autotune = UNKNOWN - No ATUN log data
Test: Brownout = GOOD -
Test: Compass = WARN - WARN: Large compass offset params (X:-122.74, Y:-78.91, Z:-272.29)
WARN: Large compass offset in MAG data (X:-122.00, Y:-78.00, Z:-272.00)
mag_field interference within limits (23.08%)
Test: Dupe Log Data = GOOD -
Test: Empty = GOOD -
Test: Event/Failsafe = FAIL - ERR found: CRASH
Test: GPS = GOOD -
Test: IMU Mismatch = GOOD - (Mismatch: 0.25, WARN: 0.75, FAIL: 1.50)
Test: Motor Balance = GOOD - Motor channel averages = [1217, 1234, 1187, 1199]
Average motor output = 1209
Difference between min and max motor averages = 47
Test: NaNs = FAIL - Found NaN in CTUN.DSAlt
Test: OpticalFlow = FAIL - FAIL: no optical flow data
Test: Parameters = FAIL - ‘MAG_ENABLE’ not found
Test: PM = FAIL - 18 slow loop lines found, max 8.18% on line 183434
Test: Pitch/Roll = UNKNOWN - ‘BarAlt’
Test: Thrust = GOOD -
Test: VCC = UNKNOWN - No CURR log data

My Params after auto tuning:

Here are some Data Flash Logs that represents the roll and pitch at the time where the drone descended and began shaking (ATT):
Green actual pitch and red the desired pitch:

Green actual roll and red the desired roll: (-178 was when the drone flipped over on the ground)

It seems to me that the drone actually wanted this behaviour because the desired degree is close to the actual degree in both cases.
But as i said I’m relatively new to the topic.

If you need further information please tell me.

You need to post a link to the .bin flight log file.

you are right this is easier.
[https://www.transfernow.net/files/?utm_source=EvIvvG102020&utm_medium=&utm_content=de)
this should work hopefully

Describe this craft. Motors, props, Power (4S/6S).

Quadcopter Setup:

Motor: MN3508 with 380KV (T-Motor)
ESC: T40A 400Hz 2-6S (T-Motor)
Props: 15x5 Carbon Fiber (T-Motor)
Flightcontroller: Pixhawk 2 cube + here GPS
Battery: 5000mAh 5S 20C Lipo
Frame: Tarot Iron Man FY650

Try these:
PSC_ACCZ_I to 2 x MOT_THST_HOVER
PSC_ACCZ_P to MOT_THST_HOVER

And set these:
MOT_BAT_VOLT_MAX : 4.2v x No. Cells
MOT_BAT_VOLT_MIN : 3.3v x No. Cells

1 Like

MOT_THST_HOVER is 0,2005236
so PSC_ACCZ_I = 0.4010
but when i want to change the value of
PSC_ACCZ_P = 0,2005236 it’s telling that this number is out of range

There are many parameters that flag that error, it doesn’t prevent you from making the change. Often it’s because MP has not caught up with Ardupilot.

Alright, i made the changes.
It loos like it will rain at any moment. So i will probably test them out tomorrow.
But thank you for your help.
I will do a compass callibration as well because of the “Large compass offset params” warning in the Log File.

Ignore whatever the Auto Analysis feature tells you. It’s not up to date. Some of the parameters it FAIL’s don’t even exist in the current versions of Ardupilot.The only reason to perform another mag calibration is if you changed/moved hardware on the craft. It doesn’t hurt to do it, just saying…

Soooo it was a little bit dark outside but i made a last flight.
Two RTLs and everything was pretty good.
The drone was flying more stable than before, but the wind was also not as strong as in the previous flight where the drone nearly flipped in the sky. And the drone was still a little bit shaky but far more stable than before.
Here is the new log file:
https://www.transfernow.net/files/?utm_source=S0TN0Q102020&utm_medium=&utm_content=de

Tomorrow i will mount a camera and a speaker onto the drone:p

After you add the additional weight MOT_THST_HOVER will change requiring a change in the other parameters. Hover around in Loiter for awhile so it can learn a new value. Also, you will have to perform another compass calibration. The speakers magnet could be a problem.

And with change in other parameters you mean
i have to do this again?
PSC_ACCZ_I to 2 x MOT_THST_HOVER
PSC_ACCZ_P to MOT_THST_HOVER

yeah you are right the speaker could be a problem maybe i should wrap tinfoil around them.

Yes, those parameters have to be re-factored.

Tin foil won’t work. Mu metal foil would. It’s what used to line bookshelf speakers when old tube tv were sensitive to magnetic fields.

Regarding Pitch versus Desire Pitch (and same for Roll), arducopter artificially keeps them fairly close together - if they are allowed to diverge too much the PIDs get badly affected.

Safety
Set these right away:
BATT_FS_CRT_ACT,1
BATT_FS_LOW_ACT,2
BATT_ARM_VOLT,18.4
BATT_CRT_VOLT,17.5
BATT_LOW_VOLT,18
And I’d highly recommend setting these too (and be prepared to wait for 3D GPS fix before arming)
FENCE_ACTION,3
FENCE_ALT_MAX,50
FENCE_ENABLE,1
FENCE_RADIUS,100
FENCE_TYPE,3

Other stuff

Set:
MOT_THST_EXPO,0.71 <-- this will help the descent wobbles too
ATC_INPUT_TC,0.2

There’s uneven weight distribution or a ESC/Motor response issue, motor 2 is working harder than the rest. For some reason motor 3 is working the least. That is odd and you’d usually expect CW or CCW motors to be linked in performance, or motors physically near each other. Maybe it’s some strange ESC calibration problem. I would perform the all-at-once ESC calibration.

I think the motor/ESC issue has affected the PIDs and I’d expect these PIDs to all be much closer in terms of Pitch vs Roll. You’ll have to try and fix that or tuning will forever give you trouble, being a symmetrical craft. A more rectangular craft would have different PIDs for pitch/roll like these. (values rounded for clarity)

ATC_ANG_RLL_P,7.2732
versus
ATC_ANG_PIT_P,4.6766

ATC_RAT_RLL_P,0.0948
ATC_RAT_RLL_I,0.0948
ATC_RAT_RLL_D,0.00783
versus
ATC_RAT_PIT_P,0.1067
ATC_RAT_PIT_I,0.1067
ATC_RAT_PIT_D,0.00455

My tendency would be to average them out a bit, and keep pitch and roll the same or at least closer:
ATC_ANG_RLL_P,7
ATC_ANG_PIT_P,7
ATC_RAT_RLL_P,0.1
ATC_RAT_RLL_I,0.1
ATC_RAT_RLL_D,0.006
ATC_RAT_PIT_P,0.1
ATC_RAT_PIT_I,0.1
ATC_RAT_PIT_D,0.006
Keep testing and referring back to the Tuning guide if you need to: https://ardupilot.org/copter/docs/tuning-process-instructions.html

After all that fix-up and tuning and another Autotune and the aircraft is flying nice in all reasonable conditions, go back to the RTL tests.

For the RTL wobbles, I’d say tuning will help a LOT, plus setting the LAND_SPEED_HIGH and LAND_SPEED based on a few test descents. Manually descend and check logs for the descent rate that always works smoothest (LAND_SPEED) and a descent rate where wobbles are just starting to creep in (LAND_SPEED_HIGH). Or do what we do and just adjust those values and try again…
Try these for a start:
LAND_ALT_LOW,700
LAND_REPOSITION,1
LAND_SPEED,40
LAND_SPEED_HIGH,140

2 Likes

Thanks a lot for the detailed solution.
I tried to calibrate the ESC’s again.
Through mission planner i came into the ESC calibration mode.
When i set the throttle stick to the max position i received the notification(5 beeps for 5S and one long beep) from the esc’s that they got the maximum value.
But when i lower the throttle to the min position i don’t get any response (and i did before the ESC calibration the RC calibration as well).

Edit:
Actually i found this one https://ardupilot.org/plane/docs/guide-esc-calibration.html
the typical ESC calibration works for the here link gps + pixhawk cube.

I did most of the paramter changes except for the safety parameters because i thought it would be not so good to take the drone into the RTL when the drone is not capable of flying stable in RTL mode but i did all the other recommended changes.

A little udpate what i did recently:
1.) ATC param changes as mentioned above
2.) ESC calibration
3.) Accel calibration
4.) Barometer calibration

Todays flight:
I only flew the drone in the loiter mode but it was still wobbling around and it was not really windy.

The .bin flight data file:
https://www.transfernow.net/files/?utm_source=1in8ef102020&utm_medium=&utm_content=de

(The desired roll and pitch are really really close to the actual roll and pitch)
(The Motors performance changed also i think this is due to the ESC calibration)
But i also think I don’t have the experience to properly assess the graphics:D.

Good information thanks for sharing
vmware

My tendency would be to reduce these slightly and see if the wobbling goes away:
ATC_ANG_RLL_P,6
ATC_ANG_PIT_P,6
ATC_RAT_RLL_P,0.08
ATC_RAT_RLL_I,0.08
ATC_RAT_RLL_D,0.005
ATC_RAT_PIT_P,0.08
ATC_RAT_PIT_I,0.08
ATC_RAT_PIT_D,0.005
You’ll have to follow the instructions in the tuning process to achieve a more stable flight then move onto an Autotune.

1 Like

And if lowering them doesnt help, you could in fact go the other way:
ATC_RAT_RLL_P,0.12
ATC_RAT_RLL_I,0.12
ATC_RAT_RLL_D,0.005
ATC_RAT_PIT_P,0.12
ATC_RAT_PIT_I,0.12
ATC_RAT_PIT_D,0.005
And see what effect that has.
Although all this is up to you and reading through the tuning process.

1 Like