In @Allister s graph it looks like desyncs, because Motor 4 recovers, but Motor3 loses sync, then later Motor3 again and Motor 2.
I looked at log_9_2023-5-23-19-23-44.bin
Battery voltage is starting to drop around the time of that incident, approaching the low voltage level for a 6S Lipo, and you dont have the correct voltage levels set or failsafe actions.
And it looks like definitely Motor3 gave you the big trouble. So similar issues to the other log that Allister looked at.
Motor outputs have a small oscillation in them, and attitude control also has small oscillations.
There is all default parameters for tuning, so incorrect PIDs and lack of tuning could be causing the ESCs to overheat and lose sync.
You need to connect to MissionPlanner Initial Parameters and put in your prop size, battery cell count, select “Suggested settings” and press Calculate → accept everything it offers.
It is a mistake to think you dont need some of these “just while we are testing”
Then set these:
INS_ACCEL_FILTER,10
INS_HNTCH_ENABLE,1 // set this then refresh params to see the rest
INS_HNTCH_MODE,1
INS_HNTCH_REF,0.2
INS_HNTCH_FM_RAT,0.7
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,4
But don’t rush out to the field to try all these new settings yet!
A big problem is vibrations.
You need Y axis and Z axis down below 20 at least, preferably below 15.
Something is touching or pulling on the flight controller to make the Y axis vibrations worse than X axis, or the antivibration system is not equal in all directions.
Z axis vibrations can take a bit of work to fix - it could be prop wash over the flight controller, frame or parts vibrating and resonating, just poor antivibration mounting - there is a range of possibilities.
Hello,
Thanks so much for your incredible answer !
I will answer all question :
I Use T-motor 4004 KV300 antigravity with 4in1 ESC from Hobbywing and 15x5 carbon fiber propeller also from t-motor T-motor 4004 ESC Hobbywing T-motor Prop
I use Li-Ion (VT6C) 6S2P 7 A/h
First of all I will fine-tune PID with AutoPID from Ardupilot ; I will try to reduce vibration with isolation on my FC (Pixhawk 6C from Holybro)
Than, I will set the parameters you advise me
I can use Mission Planner, do you how can I have some Initial Parameters by an other way ? Moreover, what are theses initial parameters ? PID ?
Thanks so much for you answer, I will send a log ASAP after tuning
You can copy/paste the whole list into notepad and save as a .param file then use MissionPlanner or QGC to load and write the .param file. This save making typing mistakes.
You will have to write the .param file twice, since there’s an “enable” parameter in that list and some of the params wont be available until after INS_HNTCH_ENABLE has been set.
Set them right away, but work on vibrations before you fly again. Then just do some hovering and gentle movements in AltHold. Do not run Autotune until we’ve seen how the Harmonic Notch Filter is behaving, because it can make a big difference to the end result.
Then link to the .bin log file and we can refine a few more things.
Here’s a link to the spreadsheet that started the Initial Parameters screen in MissionPlanner. It’s been updated a bit since then. You can see there’s just a few blue cells to put in your prop size, cell count and select a battery chemistry. There’s also a place for your MOT_THST_HOVER value.
Hello !
So first I try to reduce vibration => log-1-vib-reducing
I think it is a success ! I just add so gel foam under the FC by replacing common tape.
Then, I check that on UAV Log Viewer and I saw that it was good so I tried initial parameters
Please find here all results log-2-initial-param-test
Behaviour seems to be fine => it’s flight perfectly but I am waiting for more advices, I really need to improve reliability in this drone to make it perfectly secure…
Your attitude control looks a bit strange and PIDs are definitely very strange.
You skipped a couple of the parameters related to the battery voltage that I specified.
Alter these to fix up the harmonic notch filter and some others
But I would run Autotune and dont try to manually tune this, the PIDs are already far enough away from each other and any sense of normality Maybe you had tried to run Autotune while the copter was in a bad state - vibrations will do that.
If you can Autotune just Roll axis first AUTOTUNE_AXES,1 then copy the new values to Pitch axis to give it a head start that would be good. Then do Pitch Autotune AUTOTUNE_AXES,2 and see how it flies. Maybe send another log of the test flight after the Autotunes.
Don’t be worried about rushing into Yaw autotune, it is not as critical as pitch and roll by a large margin.
I set all parameters as ask and also battery parameters (I intentionally let them high because it is more secure, Li-Ion have sometimes some great pics decreasing the voltage)
Than, I set all parameters Angle, PID of the roll axis to the Pitch axis and I fly again : Log Flight after PID setup
As you can see in the Log, there is a big problems with alt hold => drone is falling if I let the throttle in the center…
On roll and pitch axis, I think behavior is good
This should make yaw acceptable and fine tune the filters. Use AltHold more and try Loiter
The slight filter adjustments should result in this effect - the vertical black lines are where the notches will be. The grey areas are where the bandwidth covers.
Today, condition was a bit windy but I set all parameters and I fly again. You can see that I first try to fly in AltMode and all seems to be fine => Yaw is ok, Roll and Pitch too ! Drone is able to maintain altitude without trouble but I think it will be better with smaller propeller to have an higher rotation rate… Than I try to make an Auto Flight and also is seems good
Please find the log and feel free to give me more advices, the drones is really better now : Log AltHold and Auto
Moreover, I try to fly with an other drone : same frame but I just change motors and props : 11" now and an higher rotation rate.
I follow your sheet to made initial setup and If you have some advices too for this drone, It will be perfect ! I think fly is good but PID will be tune in Autotune mode
Log in alt hold => Drone 2 - AltHold
Log in mission => Drone 2 - Auto
Use Loiter instead of PosHold. It’s more modern and there is extra tuning parameters for it.
The first log looks quite good, maybe a bit nervous. I would just run Autotune on Pitch and Roll axis. Yaw is reasonable and can probably be left how it is unless you find a problem.
Drone2 seems OK, just set these so we can see what’s going on with the filter:
The HNOTCH settings might need to be refined after that, so do another ALTHOLD log.
But after that it probably just needs an Autotune too, since it is working reasonably OK for first flights.
Also those battery failsafe actions are almost mandatory:
BATT_FS_CRT_ACT
BATT_FS_LOW_ACT
we see so many logs and hear so many stories about “my drone just fell from the sky” and “I only get very short flight time” because the batteries have been degraded by not setting these and the voltage levels correctly.
The other thing we see is “…but I’m only testing and I’ll set them later” which should be translated as “I dont know how my copter and batteries will work together so I want to push the limits and make it fail, and I’ll probably forget to put these settings in place if I do get it flying properly”
Hello !
Sure, I will change PosHold with Loiter => for my knowledge, what is the difference ?
For drone 1 => thanks, all is perfect ! Here a log of a long auto flight If you have something to fine tune… drone1-longflight
For drone 2 => I made an autotune for Roll and I copy it to Pitch. I made two flight with two differents batteries : a 4S3P and a 4S4P first flight we heavier one. I think it is a bit too heavy and batteries didn’t like the high thrust… I made a AltHold test and an auto flight on the same log !
Ready to fine-tune !
Drone1 still has high vibrations and there is clipping.
You will have to see if you can better isolate the flight controller or something…
The vibrations will cause the copter to keep rising at some point, a fly-away. There is built in compensation for this and if the copter can detect this happening it will try to land, but you may have to take control in Stabilise mode.
Otherwise the tuning will be OK.
Drone2 is OK for vibrations
It’s definitely better with the lighter battery and the bigger battery is too heavy for it.
You appear to have a spring-centred throttle, so PILOT_THR_BHV,7 will suit.
With Loiter there are a number of parameters beginning with “LOIT_” to control the acceleration and braking. This makes it ideal for use when you’ve got a sensitive payload on board, or even just an ordinary sport camera. Probably start by trying out Loiter in a flight, then setting LOIT_BRK_DELAY,0.5 to see what difference that makes.
It’s Drone1 that needs work with the physical vibrations. There’s only so much the software filters can do, and once the physical hardware (IMU chips) are clipping or saturated then no amount of software or filtering matters.