Today I was flying my quadcopter and upon RTL, it reached home point and just before about to land, the drone tilted for about 45 degrees and was about to crash. I suddenly changed the mode to AltHold and managed to land safely. When observed in logs there was a clear deviation from the desired and actual pitch values as shown in the image below
1st update to latest stable you are running old firmware on EK2. Tuning on this craft is way off. I donât know how you arrived at this between Pitch and Roll
ATC_ANG_PIT_P,18
ATC_ANG_RLL_P,1.744479
ATC_RAT_PIT_I,0.04767863
ATC_RAT_PIT_P,0.04767863
ATC_RAT_RLL_I,0.14
ATC_RAT_RLL_P,0.14
Also, some of the Initial Tuning Parameters are not set. I would reset to default, set the Initial Tuning Parameters and start tuning again and plan on configuring the Dynamic Notch Filter.
No, not at all. Auto Tune is usually the best option. But you have to do the initial tuning work 1st before running it or you will get results like yours.
I have been reading about Dynamic Harmonic Notch Filter. I am using Pixhawk Cube orange. Do you recommend Throttle based Dynamic Notch FIlter or In-Flight FFT Based Harmonic Notch Setup ?
From the little reading I did, Throttle based is easy to setup.
If you donât have Motor RPM either thru ESC Telemetry or using the Bdshot firmware then FFT would be the next best choice. But throttle based works well too.
Thank you for your suggestions. I followed your instructions in the following order
Flashed Arducopter 4.2.2 on my cube orange
Used Missionplanner Helper to do the initial parameter setup as described in this blog. I used the following inputs in the MissionPlanner Helper Screen
Air Screw Size : 18
Battery type : LiPo 6S
Max Voltage : 4.2 V
Discharge Voltage : 3.4 V
Followed instructions in Initial tuning to make sure Altitude hold was working and got the MOT_THST_HOVER. My MOT_THST_HOVER value was 0.21
Setup Throttle based Dynamic Notch Filter and identified two peaks in noise during hover at 68Hz and 120 Hz as shown in the below image. Logs are attached in the link below.
Stability and Control did improve a lot. Automatic Navigation also has become cleaner.
Ask : Can someone please review the Autotune from logs? Attached in the link below.
However, ATC_ANG_PIT_P and ATC_ANG_RLL_P are not allowed to be >12. But my autotune converged to 18 and 12 respectively.
Ask : 1. What would be the cause? 2. What would be the effects if these gains are greater than 12?
During Yaw tuning, Telemetry error said âCanât level the drone. Please try manual tuningâ. However I continued with the Autotune and it did converge and said Autotune successful.
Ask : 1. Can I rely on this or do I have to do manual tuning? 2. What would be the potential cause that this happens?
There were two peaks in noise plots. One at 120 Hz and the other at 68 Hz.
Ask: Can I use INS_HNTC2_FREQ as 68Hz as there is a second smaller peak compared to 120 Hz?
Donât worry about those out of range values. They are there to catch gross entry errors.
I would set the notch center frequency at 66Hz (BW 33) and it will pick up the harmonic of that which is the largest peak.
Tuning looks good. Nice job.
You would not use the same configuration for both notch filters. To be clear you only need 1 with a center frequency at 66hz. A second filter configuration is not needed. If there are either 2 modes of vibration that are not coupled or a static mode with no harmonics then 2 notch filters can be helpful.
I would. I just went through this with a smaller quad, where I changed the notch filter so I decided to re-do the autotune. It did improve things, but I had to look at the logs to see the difference. The good thing is, if the quad is flying well already and these are just improvements or fine tuning, then autotune will run pretty quick.
And my problem resurfaced. Attached a log for an automatic mission. For about 4 times during the auto mission, there is clear offset between desired and actual pitch. Pointed below.
Ask : I am missing out on something fundamental here I think. My ESC signal wires are pretty close to the main battery wires. Would battery wires cause noise in the signals?
You have 2 Notch filters configured. You must have missed the âto be clearâ comment above⌠Disable the 2nd one and make a short hover flight with post filter logging to see the result. I donât know why you are running Auto Missions before completing the tuning. Also set these as per the tuning guide based on the MOT_THST_HOVER value:
PSC_ACCZ_I
PSC_ACCZ_P