Analyzing Logs and Params of large (29" Props) Quad and Hex Copters - Pixhawk Cube Black

Hi,
@Leonardthall, @rmackay9
I need your assisstance. I am running arducopter 3.6.12 on my newly build heavy lift hexa copter. I am on a tuning phase of this heavy machine and i had 2 crashes after severe wobbling. The details of hex are as under:
Frame: 1600 mm
Motors: T-motors U8 lite KV 85
ESC: T-Motor Flame 60A
Propellers: 29"
Take-off weight: 20.3 kg
AutoPilot: Pixhawk Cube Black
GPS: Here2
I have attached the parametric/configuration file and log file of the crash for reference. Just after take off, there was only a slight wobbling effect, however we lifted off to certain height to check/verify the gains.Just after the yaw movement (clock wise and counter clock wise), the wobbling started and it got worse thereby fast descent in height finally resulting in crash. Since we have been flying the quadcopter (arducopter version 3.6.12) and we have used same tunes (almost similar thrust to weight ratio as of our new hexa copter), therefore based on our analogy we used slightly lower tunes with hex configuration for this build. In our 2-3 flights (2 crashed out of 3), one of my clear observation is that once the bird gets unstable, it gets severe and therefore the wobbling increases finally resulting in crash.
Can you please tell/identify what are the parametric issues and what is the main reason that stability is not achieved once it gets unstable. Any guidance/help will be much appreciated.
Hex Files.zip (866.3 KB)

Hi @Yasir_khizar,

How much of this process have you followed:
https://ardupilot.org/copter/docs/tuning-process-instructions.html

@Leonardthall
To be true, i did not follow as such as i was pretty much confident with my already set gains of quadcopter. Since the thrust to weight ratio of my quad was almost similar to that of hex, i just reduced pid values of pitch and roll to be on the safer side… The INS_GYRO_FILTER value is 20 hz whereas FILT values are not exactly half i.e FILT values are 15. Moreover, ATC_ACCEL_P_MAX as well as TAC_ACCEL_R_MAX values are 110000 (and not set as 20000) compared to the tuning process instructions. Could this be the reason of wobbling getting severe resulting into crashing? Did u check the config file as well as logs and did u find some issue? In my understanding, the rest of the config/calibrations were made correctly…
Thankyou for response
Regards
Yasir Khizar

As you say, these are very high for a large aircraft.

ATC_ACCEL_P_MAX,110000
ATC_ACCEL_R_MAX,110000
ATC_ACCEL_Y_MAX,27000

And I suspect that this is the main reason. You should never trust a tune on a new aircraft and should go through the whole tuning process to make sure you are safe.

This is way out:
ATC_RAT_YAW_FILT,8

I can’t see much from your log other than the tune is not stable. But given the way you set it up it really could be anything. The thrust to weight ratio is just one aspect isn’t enough to say that the tune will be similar.

Sorry to hear about your crash.

@Leonardthall, thanks for ur guidance/support.
Now, we have successfuly configured our hexacopter. It is flying pretty well on low speeds. We will be gradually increasing horizontal/vertical speeds and would be verifying with logs. I need to ask two things:

  1. What are the upper and lower limits for pitch and roll to that of desires pitch and desired roll respectively. If we magnify the graph, the pitch/roll is following the des pitch/roll but it is slightly oscillating around the mean value; so i would like to know how can we judge/say that the actual value is very closely following the desired values.
  2. We have noticed that once we release the sticks quickly, the actual pitch/roll values slightly overshoots the desired values. This thing we have noticed on loitering as well as when we apply brakes i.e. release the sticks on horizontal movement. I would like to know the parameters relating to this phenomenon; are they pid values of pitch and roll or we need to think of atc_accels. We have checked that increasing atc_input_tc above 0.2 compromises the position lock specially during landing so we have adjusted to 0.20. Can u suggest what parameters needs to be adjusted to avoid the overshoot. (We have observed the overshooting issue on our quadcopter as well and based on ur suggestions, we will be re-fining our quadcopter as well).
    Regards
    Yasir Khizar

I would need to see a log.

@Leonardthall, I am attaching the params and logs of my Quad for your expert opinion.

https://drive.google.com/drive/folders/1jBMePr_PieKdvrx94SZCVWpBrf0YTgKb

Here are the specs of the system:
Frame: 1.356 m
Motors: T-motors u8 prop KV 170
Props: 29 x 9.5
Takeoff weight: 7.5 kg
Autopilot: Pixhawk Cube Black
GPS: Here 2

By now, the loitering and position hold is quite accurate. Analyzing logs, we have found that actual values are following the desired values but are oscillating. Moreover, when the sticks are released quickly during horizontal movement, the bird seems to overshoot. We are seeking advice which params need to be re-evaluated and requires tuning.

Regards
Yasir Khizar

@Leonardthall,
Hi, here are the params and logs of HEX Copter:

https://drive.google.com/drive/folders/1e1hXMRWTX22fco1tKAY1FtDM334S2tzn?usp=sharing

The specs of the system are:
Frame: 1600 mm
Motors: T-motors U8 lite KV 85
ESC: T-Motor Flame 60A
Propellers: 29"
Take-off weight: 20.3 kg
AutoPilot: Pixhawk Cube Black
GPS: Here2
The product is stable; yet we have not gained high speeds, around 4 m/sec. Since bird is quite heavy, certainly we need to be sure whether our configuration parameters are ok before we fly for higher speeds. During flying, sometimes we felt that it twitches sightly on roll and pitch sides by itself (i.e. with no stick movement). We have also found that by reducing the pids, the product starts wobbling. I would like to mention that the weight distribution of the bird is not normal, the camera and obstacle avoidance sensor are slightly on the forward side; yet, we are not sure how to adjust gains for pitch and roll. Your assisstance/advice will surely help us in smooth flights.
Thanks once again for help.
Regards
Yasir Khizar

Hi @Yasir_khizar,

Both your aircraft are suffering from high gyro noise levels. I would suggest that you upgrade to the latest version of ArduCopter and set up the harmonic notch based on your throttle. Your filter settings on your hex are ok but your quad doesn’t follow my suggestions.

The logging on your hex doesn’t seem to be set to fast but your quad is and it looks like you have very strong 50 Hz noise.

My comercial work tuning aircraft like this is a big reason for the additional filter flexibility available in 4.0.

@Leonardthall, thaaanks for guidance.
Actually, i upgraded to latest firmware previously but it started Alt Hold issues. Unfortunately, there were no benchmarks parameter settings for heavy lift copters except for wiki details and thus i decided to change it back to older firmware version copter 3.612 stable release.
Regarding filter settings of quad, though we didnot change ATC_RAT_PITCH_FILT and ATC&RAT_ROLL_FILT from 15 Hz to 10 Hz but we did change the following:
ATC_ACCEL_P_MAX,48000
ATC_ACCEL_R_MAX,48000
ATC_ACCEL_Y_MAX,9000
The result was that on the forward movement, there was slight left/right tilting on roll side initially and then the aircraft had a smooth travel (wind was 8-10 knots). So, we thought that it may be due to low accels value and thus we increased pitch/roll accels to 72000 which improved the roll side tilting issue. We can ofcourse try low accels with standard filt settings but i need ur advice whether we try for this option or we should jump to copter 4.0.3. If we adopt copter 4.0.3, how to resolve Althold problems…
Regards
Yasir Khizar

Sorry but you need to start from the beginning. I would suggest that you upgrade to 4.0. Follow the instructions below but after you have the aircraft in a safe alt hold hover, set up your harmonic notch filter and then finish the tune.

https://ardupilot.org/copter/docs/tuning-process-instructions.html#

Hi @Leonardthall,
As per ur advice, we have upgraded our autopilot to the latest firmware stable copter v 4.0.3 and we have started tuning our quadcopter. The details of our quad are as under:

Frame: 1.356 m
Motors: T-motors u8 pro KV 170
Props: 29 x 9.5
Takeoff weight: 7.5 kg
Autopilot: Pixhawk Cube Black
GPS: Here 2

We started flying in alt hold mode by enabling INS_LOG_BAT_OPT to capture pre-filter gyro data (File 1). We found strong noise at around 57-60 Hz and its harmonic at 115 Hz, therefore we applied a dynamic notch at 58 Hz with 20 Hz bandwidth and carried out a flight (File 2). The noise was suppressed/removed, however we find out additional noise at 27-28 Hz in next flight and thus we applied static notch of 6 Hz bandwidth at the above mentioned frequencies (File 3). Finally, with the applied settings we carried out a detailed flight (File 4) by changing P and I gains (from 0.35 to 0.30 to 0.25) in order to assess the maneuvering of our quad. One of our primary observation is that the actual pitch/roll graphs have oscillations i.e. noise and is continuous through out the flight irrespective of the gains. So, i would like to know how to suppress this noise/oscillations and whether this should be our concern (If yes, how to remove this). The 2nd observation was that when we applied brakes, we found slight jerks of our copter before attaining the attitude stability. As a reference, i have attached the parametric file (File 5) in order to seek ur expert opinion whether we need to change our parameters, filtering, etc.

https://drive.google.com/folderview?id=1HS5t4HMxqf36nkaAlBv8tFSWsvP5AsuA

Thankyou in advance
Regards
Yasir Khizar

In 4.0 you can use FLTE to remove this kind of noise once you have the gyro noise down to acceptable levels

@andyp1per,
What are the acceptable levels of gyro noise? What should be the initial value of FLTE for removing such noise i.e. ATC_RAT_RLL_FLTE and ATC_RAT_PIT_FLTE? From the graphs and our tuning parameters, how do u rate them and what r ur suggestions to improve them? Our aim is to fly equaly good at high winds and have good brakings…
Regards
Yasir Khizar

Your gyro noise looks good.
If you look at your pid outputs you will see that there is an oscillation around 50Hz especially on pitch:

it’s not too bad, but it is fairly visible and you can see it if you look at the RATE output. It’s also clearly coming from P - there is not much D amplification. So I suggest try setting FLTE to 30Hz maybe to see if that attenuates it. You could probably set FLTT to that as well. But if you do you should set FLTT to 0 whilst running autotune or it will affect the results.

When the noise is acceptable you should always run autotune again.

Hi mate,

Your harminc notch setup is not quiet right. I would suggest:
INS_HNTCH_ATT,40
INS_HNTCH_BW,20
INS_HNTCH_ENABLE,1
INS_HNTCH_FREQ,29
INS_HNTCH_HMNCS,3
INS_HNTCH_MODE,1
INS_HNTCH_REF,0.34

Disable your fixed harmonic notch.
INS_NOTCH_ENABLE,0

Start with that and evaluate the noise.

@Leonardthall, Hi
Actually, the more stronger noise was around 57-60 Hz and it had 1st harmonic around 115-120 Hz initially as can be seen from the 1st log i.e. File 1. Therefore, the reason to enabling INS_HNTCH for 60 Hz was that we thought 60 Hz noise is the main source and could not be the harmonic of 30 Hz noise (bcz of very high amplitude). Thus, we suppressed the 30 Hz noise explicitly by enabling the INS_NOTCH. So, can u plz elaborate about the following:

  1. By setting INS_HNTCH_FREQ to 29 Hz with 20 Hz BW and INS_HNTCH_HMNCS to 3, will be able to filter out all 3 frequencie bands i.e. 30 Hz, 58 Hz, 118 Hz.
  2. What is the range of control bandwidth so that we can rest assure that filter(s) do not suppress the controls i.e the desired/required inputs.

Thanks for guidance/support…

Regards
Yasir Khizar

The fundamental or first harmonic is the lowest frequency component where the other frequency components are multiples of that frequency. There is no rule to say that the fundamental must be the highest magnitude.

In the case of multirotors the fundamental is caused by propeller imbalance while the second harmonic is caused by the blades passing over the arm. In coaxial configurations the 4th harmonic can be the largest and is the upper blades passing over the lower blades.

I turned on only the fundamental and first harmonic but if you have a fast processor you could also turn on the 3rd and 4th.

  1. That will filter the 29 and 58. The low pass filters start to work above that but you may get further benefit from adding the 3rd and 4th harmonics.

  2. The control bandwidth tends to be in the 5 to 10 Hz range. In general you can test by tuning up the aircraft without the harmonic notch then turn it on. If it does not show any signs of oscillation then you are probably not interfering with the control bandwidth. If you do another tune and find you can get the same or higher PID values then you are in good shape.

@Leonardthall,
As per ur advice, we have configured the dynamic notch. The log file and params are attached:

https://drive.google.com/file/d/1mJ4ASVwfscPVhhE5BRZRismYFqOgW7gJ/view?usp=drivesdk

We have carried out mutiple ascents and descents, hovering and pitch/rolls including quick release of the sticks. We would like to seek guidance regarding our notch filtering whether it is upto the mark. The next and importantly we seek your expert opinion regarding our quadcopter tunes (ATCs, FLTs). Our two primary observations include:

  1. During 1.5 m/sec descend, our first descend had slight wobble; however, the next 4 descends had no such observations.
  2. During quick release of the sticks, there are oscillations settling down after 2 to 3 cycles. In addition we have observed slight overshoots on pitch and roll side.

@andyp1per, @xfacta… Can u also plz assissit/guide regarding our tunes…

Thanks in advance…
Regards
Yasir Khizar

The noise on each axis is ok now, not great but not bad.

There seems to be unusual amounts of motor mismatch so I would double check that your frame is perfectly straight and the centre of gravity is in the correct spot.

I can see that you have not set up any of the MOT parameters so you really need to set these and recalibrate your ESC’s and go through the full tuning process.

https://ardupilot.org/copter/docs/tuning-process-instructions.html