Quad trembling when in loiter mode

(Arducopter 4.2.3. Mission Planner 1.3.77)
Hello. The attached video shows my copter trembling on roll axis in loiter mode. The trembling has a duration of some seconds then disappears, then returns…like responding to a cycle. It disappears completely when i switch to althold mode.
Attached the ,bin file of the flight too.
Any of you knows the origin of that and a possibile solution?

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

https://drive.google.com/file/d/1GJB7evXdAse7KRWXb0dhHKccJB5q-NTy/view?usp=drivesdk

The first thing that I noticed is that after the first AltHold your vibrations went very high (Vibe.X,Y,Z >>30 m/s/s) on all axes leading to very high clipping. So check if something happened or something went loose or it has something to do with your tuning because that only happens at Auto modes.

Secondly, your motor outputs (RCOUT) seem that they hit the lowest point which means that they dont have full control.Try to lower the MOT_SPIN_MIN (it can probably go to 0.12 without a problem) and check the logs agains.

Also try switching MOT_HOVER_LEARN = 2 and fly for a bit in the loiter mode. It will readjust the hover thrust.

Your issue probably has nothing to do with loiter at all.

There is some abnormalities in your log and serenely some issues that has to be sorted out.

The first issue and probably the most serious is the vibration issue. You have high vibration in the pitch axis and extremally high on the roll and yaw peaking at 80. (below 30 usualy works, below 10 is good. Over 30 and it will most likely have an effect on flight performance.

The oscillations looks to be the roll axis. The rate controller gain also oscillates greatly resulting in oscillations in flight. You mentioned you didn’t see any of this in alt.hold. I have seen this in many times before and for loiter modes to work, the tune, not only the PIDs but filters and other values must be good in order for loiter to work.

In loiter the flight controller uses many sensors and a lot of data using and EKF to control the aircraft. The EKF hates vibrations and needs well tuned filters and values to work properly. This is probably why you only see the issue in loiter. It’s still there in alt.hold but not visually detectable.

The oscillation in the rate controller probably contributes a bit to vibrations and increases noise in the aircraft but there is differently a vibrations issue here. I have dealt with this before and it’s unfortunately a hardware problem. This much vibrations can’t be handled by changing parameters.

Youre aircraft is also quite light in relations to your motor system. It hovers at around 1250 pwm (1000-2000). A hover output of around 1500 is about where the limit is, and also where many drones fly at. This is not an issue, although with the high vibrations and the rate controller oscillations the motor outputs also oscillates at hover. Since your copter is quite light, the outputs hit their lowest value which limits the copters ability to maintain control. This would be the same it it was too heavy and the output would hit max value.

Although your light weight should not be an issue and the motors hitting lowest value a lot would be caused by the other underlying issues.

So, you probably have to lower your PID values a bit for roll, but before that the vibrations needs to be fixed.

Have you set up the notch filter? that is extremally important on the later firmware’s. The filter handles noise which can cause a lot of issues. Reducing vibrations and noise is key to getting a good tune! So first you need to address your hardware to find sources of vibration.

Could you post some pictures of the setup so that we can see how everything is mounted etc?

I’m going to agree with @Axel1 and say you need to sort out the vibration first before attempting to fix anything with parameters. Make sure your props are tracking well and there’s no damage to them. Then check all the mounting. Make sure nothing is loose or bouncing around. Be sure none of the wires to your FC are tight or bouncing on the FC. Also look into the mounting of the FC. There are lots of opinions between soft mounting and hard mounting of flight controllers. In my opinion if the airframe is rigid and clean then hard mounting is often the way to go. If the airframe is more flexible then you may need to do some kind of soft mounting.

Once you have the vibrations sorted then go back to the parameters. I see there is a filter set but the FFT graph is still showing some peaks. You might want to re-do the HNTCH filter setup again.

I noticed your Pitch and Roll PID values are the same. Vibrations aside, I don’t think that’s going to be the final tune here. The roll tuning, particularly D will need to be turned down a bit.

There’s also some theories right now that some quads will see improvements in loiter from turning down the PSC_VELXY… and PSC_POSXY values to half. As I understand this is only affecting GPS assisted modes such as loiter and RTL. This may help here, but only after you’ve dealt with the other items first.

I have read all your messages and will redo for better understanding
I attach a foto of my drone.
About the structure, the AP (pixhawk 6c) Is mounted ahead . I think It should be placed at the center near the crossing point of the arms. A position not there amplifies vibrations.
The m8n GPS+Compass had a longer shaft where It was mounted on. I received many ekf messages and GPS glitch warnings, but shortening the shaft has fixed all that. I figure out the long shaft amplified vibrations.
The frame Is made of a 30 mm square carbon tube and 2 12 mm round carbon tubes 1 mm thick that pass trought the square tube at different levels.
The weight is around 800 grams the 7000 mah 6s battery and around 800 grams the drone, total around 1800 grams. Props 12x4,5 very efficient master airscrew multirotor line. Motors sunnysky 2216 880 kv. In the rear side is the PCB supplied with the AP. It Is not fitted having the pads for soldering the esc wires, while there Is a 4in1 esc. Already ordered a fitted One. The version “pro” of the drone Is coming , It will fix all structure problems.
Escluding the trembling the drone on my opinion flies well in all modes and has a good endurance of almost 50 minutes.
For now i tell you what above.

https://drive.google.com/file/d/1hffdAMbrD5EVrtMSf4X4Gha2v-Ppq8mN/view?usp=drivesdk

…AP Is glued with silicon, AP Is advertised having an elettronic vibrations reduction system . I put little rubber orings around the motors locking screws beetwen motors and motor support to damp vibrations, they seem to be effective looking vibe monitor…but not enaugh

To begin with, don’t dampen vibrations at the motor. I have tried the tarot motor mounts with fitter rubber dampeners at the motors. It only made the vibration issue worse for me. I believe it filtered out higher frequencies quite well but vibration, not so well.

The reason to this could be many. My theory is that since the motors and propellers have quite large angular momentum, which gives a gyro effect, when the drone tilts and the motor angle changes, this angular momentum and the disks resistance to being tilted flexes the vibration dampening and creates much more vibration.

I would strongly suggest you remove any vibration dampening at the motors. I did, and it reduced my vibration a lot.

The best frames are usually the once that are very ridged and have dampening only for the FC. Your mounting position of the FC should not have any effect on performance as long as you set the position offset parameters correctly.

You should probably get a good vibration dampening for your FC and only dampen vibration mechanically at the FC. You could tidy up the cables running over the FC. If cables touch the FC and vibrate that will cause vibration. Also make sure that no cables are under tension. That will cause them to generate noise and vibrate. You could maybe secure the cables along the side of the craft to avoid running them over the fc.

Also make sure that all electronics are secured tightly to the frame and that no components can shake. Also make sure that your frame is ridged and won’t flex. The FC hates frames that flex.

But most importantly, remove the vibration dampening at the motors and add one for the FC. Regarding what isolation works best for the FC, maybe @Allister knows of one. I only use the cube flight controller and that one does not need soft mounting.

I also took a look at your fft. You have as Allister said some noise peaks to take care of. Your notch could probably benefit from some tuning. Although almost all noise is hardware related. Your oscillating rate controller probably also increases the noise in the system. A high D term usually also increases noise. But focus on the hardware to begin with. Both vibration levels and noise will go down if we sort out the hardware part. Than vi can push the noise down further with good tuning and filters later.

So, to fight against vibrations, first working on the hardware and then on pids filters… Yes this Is the right roadmap. Thank you for your attention. I Will be back to share what i have achieved.

Hello friends.
The evo version of my quad carries significant improvements. Maybe you remember the abnormal datalogs of my previous model.

To reduce vibrations:
-arms made with stiffer 2 mm thick carbon tubes (1mm before) and motors support made of carbon
-damping the AP (kyosho gel pads) , not the motors
-AP placed at the center not ahead as before.

As general improvements:
-new motors and props more efficient
-total weight reduced of 150 grams at 1450 grams.
See the picture and the .bin file
PID values come from an autotune session.
Not enabled filters.

Grateful if you have any suggestion in general and about filters use. Many thanks

https://drive.google.com/file/d/17_AEHAf6LT5JJu7EUDXJAG8CD1A9zl4J/view?usp=share_link

https://drive.google.com/file/d/1itjYBOfjUhDiaVZJXUQ1d5mWeD-ekKj5/view?usp=share_link

Tune looks reasonable. I suggest you set the filter then redo the autotune.

Hello. I am considering wich method to use for setting my notch filter. Excluded n. 2 and n. 3, that need rpm sensor esc telemetry… , or the throttle based (n.1), or in flight fft (n.4) remain
For in flight fft my pixhawk 6c has 2MB flash memory and 1MB RAM and this method Is suggested as the best in official docs. I wonder what to do and take advantage of your curtesy again. …

I would suggest FFT. Make another hover flight in Althold for a minute or so. There is too much going on in the log you posted to select the MIN/MAX FFT range. Set this also:
INS_ACCEL_FILTER,10

Just one more question. After the flight in althold for a minute i can disabile the filter because its effects have been recorded, or It must stay always enabled…yes i am new to filters…

You can disable Batch logging, INS_LOG_BAT_MASK,0 but you will just have re-enable it and set INS_LOG_BAT_OPT, 2 after configuring the filter and making another Hover flight to check it’s effectiveness. So leave it for now. Both of these can be disabled when you are done.