Unable to tune rates properly failing from long time,No idea whats wrong!

Hey hi all

Im unable to tune a quad, pls find the logs setup is t motor and 22 inch prop

pls let me know if you need any other details

as im observing when ever i tried to tune there will be little wobble in both pitch and roll as well and keeps amplifying and eventually loses the control from pilot and need to recover from stab mode which some times and some times not

Exactly which motors and ESCs?
Exactly what battery pack?

Set these and do another short test flight, mostly just hover, but you can do some basic pitch, roll and yaw. Altitude changes help too, just dont go crazy, and no need to run a mission.

ANGLE_MAX,30
ARMING_CHECK,1
ATC_INPUT_TC,0.22
ATC_ACCEL_P_MAX,40000
ATC_ACCEL_R_MAX,40000
ATC_RAT_YAW_D,0
ATC_SLEW_YAW,3000
ATC_THR_MIX_MAN,0.5
INS_HNTCH_ENABLE,0
INS_LOG_BAT_MASK,1
LOG_BITMASK,180222
LOIT_ACC_MAX,300
LOIT_ANG_MAX,25
LOIT_BRK_DELAY,0.35
LOIT_BRK_JERK,150
PILOT_THR_BHV,7
PILOT_Y_RATE,60
PSC_VELXY_D,0.25

These will put a few aspects of the copter back to a known-good or normal start, given the size of this copter. Some of these parameters may not be in their final state, but will help us gather the required information.

EDIT:
and set these too:

ATC_RAT_PIT_SMAX,50
ATC_RAT_RLL_SMAX,50
ATC_RAT_YAW_SMAX,50

Hi,

Thank you for your reply. I apologize for seeing your message late. I am sharing additional details about the system and the issue we are experiencing. I would greatly appreciate your help in reviewing the logs and providing your insights.

System Details:

  • Motor-to-motor distance: Approximately 860–875 mm

  • Motors: T-Motor 320KV Anti-Gravity

  • ESC: T-Motor Flame 60A

  • Battery: GenX 6S 30Ah

  • AUW: Approximately 8 kg

  • Propeller: 22x6.6 T-motor propeller

Currently, the system is able to fly after addressing some critical parameters. However, the issue still requires further investigation.

Earlier, the CG was slightly off, but we have now corrected it. I have attached the flight logs along with a video showing the earlier issue for your reference.

Observed Behavior:
Most of the time, when I release the stick after applying full deflection on roll right and pitch forward, the system bounces/oscillates. This behavior is noticeably stronger compared to roll left and pitch backward, where the response appears more stable.

Could you please review the attached logs and share your suggestions on what might be causing this behavior and how we can resolve it?

I have uploaded of 6th & 7th Mrach flight logs and 4th march instable flight video for your best reference possible for issue finding

I would truly appreciate your guidance on this. I am eagerly looking forward to your feedback.

Thank you very much for your time and support.

Logs & Flight video

Cheers

Go back to all the things that I posted already and set them, I couldnt see a log where you had done that.
In addition set these for the T-Motor Flame ESCs:

MOT_THST_EXPO,0.4
MOT_PWM_MIN,1100
MOT_PWM_MAX,1940

EDIT: you could also try doing the semi-auto ESC calibration since the new Flame ESCs supposedly allow that, and the old Flames had a fixed PWM range that could not be calibrated.

And set these for your battery:

BATT_ARM_VOLT,18.50
BATT_CRT_VOLT,17.40
BATT_LOW_VOLT,18.00
MOT_BAT_VOLT_MAX,25.20
MOT_BAT_VOLT_MIN,16.20

ESSENTIAL
Before you fly use the MissionPlanner motor test to check MOT_SPIN_ARM and MOT_SPIN_MIN are still valid after those above changes.

Now provide just one log with ALL of those parameters set.

Hello,

I have performed Flight with the above suggested parameter value.
Please find the attachment of flight log

You can set those battery voltage parameters I specified, especially the MOT_BAT_VOLT_MIN
and set these:

ARMING_CHECK,1
INS_LOG_BAT_MASK,0
INS_LOG_BAT_OPT,0
INS_RAW_LOG_OPT,0
LOG_BITMASK,180222

There is no need for all the extra logging or any notch filter, so that is good.

Do two test flights in ALTHOLD mode, the first one after the above changes - just ascents and descents.
Then set:
MOT_THST_EXPO,0.4
and repeat the test flight.

What we are looking for is:

  • set too high you can see instability at low throttle (descent)
  • set too low you can see instability at high throttle (ascent)

Keep in mind there is almost always some instability during vertical descent, so choose a safe descent rate. If you think you need to raise the thrust expo because of instability on ascent, go to 0.6 and do another test.

This will help determine if the thrust expo is correct before you get to Autotune.
Send that log :slight_smile:

If for some reason you really want to run a harmonic notch filter use these settings pictured below, however I think it will cause more instability than it solves in your case.
The only real advantage I can think of is: if you add a payload and it enhances vibration well above current levels.

Hi

Unfortunately we are already flying with actual payload and AUW is 8Kgs only as well in last few flight we used filter at 70 hz where as still we see noise in the logs

And we are unable to reduce the noise such as over the time noise frequency keep on increasing or developing in the frame itself to be honest dont know!

I never know where it is going to lead and one more am I at the right direction to solve the persisting issue.

Thanks for you continuous support, Cheers

Hi @xfacta ,
I have following Query regarding notch filter..!

Observation:

  • A noise peak is observed at 63 Hz, which appears to be associated with the motor.

  • Following the 63 Hz peak, four additional consecutive noise spikes are also observed.

Query:

No, in your case the post-filter noise is almost nothing.

The values I provided will fix this, although the post-filter noise from the primary peak is still almost negligable and not worth worrying about.

You could always do anything you want, but an FFT-based notch filter will be broad and overly aggressive, like hitting a thumb-tac with a 10-tonne hammer.

Always fall back to checking the post-filter noise, that’s what matters. You can see it’s practically a flat line across the bottom of the graph. Any bumps are below -50db so not worth introducing other issues to fix them.

Focus on the next steps I gave and dont worry about something that is not a real problem.

Hi @xfacta ,

As per your previous recommendation i have performed flight , there is a small update. This test was conducted using the same drone, but the flight was performed without the camera installed.

I observed a slight shift in the notch filter frequency from 60 Hz to around 55 Hz.

The flight was conducted in Alt-Hold mode, where I performed climb and descent maneuvers using different MOT_THST_EXPO values: 0.4, 0.5, and 0.6.

Based on the flight feel, the drone handled most comfortably with a MOT_THST_EXPO value of 0.5.

Important observations after landing:

  1. With MOT_THST_EXPO = 0.4, the motors continued spinning after landing, and I had to manually disarm the drone.

  2. With MOT_THST_EXPO = 0.5 and 0.6, the drone automatically disarmed when the throttle stick was lowered.
    PFA: Flight log.

Thanks for continuous support.:slightly_smiling_face:

This can happen when MOT_SPIN_ARM and MOT_SPIN_MIN are not set correctly. These are affected by changing the thrust expo, and conversely they can affect the thrust expo.

I maintain that you DO NOT even need a harmonic notch filter, or MAYBE with the settings I provided with the adjusted lower frequency. The post-filter noise (after INS_GYRO_FILTER) is already so low that having any harmonic notch filter introduces other issues like phase lag that will affect subsequent tuning.

Based on your observations, set the thrust expo to 0.5 (which is roughly what we expect from Flame ESCs) disable the harmonic notch filter and TEST that MOT_SPIN_ARM is low as you can get it and motors still start up reliably. Add about 0.03 to get MOT_SPIN_MIN
Now go and run Autotune on pitch and roll axis.

EDIT: a brief look at the logs says your observation of thrust expo 0.5 is most likely correct.

Hi @xfacta ,

I performed AutoTune with the following parameter changes:

  • MOT_THST_EXPO = 0.55

  • INS_HNTCH_ENABLE = 0

Regarding MOT_SPIN_ARM and MOT_SPIN_MIN, I conducted a motor test and observed that all motors begin rotating at approximately 6% throttle. Based on this observation, I set the parameters as follows:

  • MOT_SPIN_ARM = 0.08

  • MOT_SPIN_MIN = 0.12

Please find the flight log attached for reference. I would appreciate your review and any comments or inputs you may have.

Additionally, please advise on the next steps for further tuning, particularly for Loiter mode and navigation in Auto mode.

In the next flight, I am also planning to add payload and conduct a flight test.

Thanks :slightly_smiling_face:

Pitch and roll look quite good now. The resulting PIDs and accel values all look very expected and normal for this copter, so I expect noise and vibration has not been a problem.
Yaw is a bit out of control so run a yaw Autotune: AUTOTUNE_AXES,12

Even though noise is not getting past the gyro filter, there is significant vibrations with a small amount of clipping events. Try to find anything loose or touching the flight controller and secure it. Wiring connected to the FC should not be pulled tight, allow enough freedom that the wires dont transfer vibrations, but not so loose they flap around all over.
Maybe send a photo of the flight controller and wiring.

Hi @xfacta ,

I do not see any moving parts in the flight controller assembly. The flight controller (FC) is directly screwed on top of the PDB. Please refer to the attached image.

Hi @xfacta ,

I performed AutoTune for yaw, and post-tuning, the yaw tracking appears accurate and stable.

In the subsequent flight, I executed an Auto mission for 3 km. While flying outbound, the performance was normal. However, during the return leg, at approximately 1 km from the home point, the drone began to oscillate aggressively, which ultimately led to a crash.

Could you please help analyze and identify the possible cause of this crash?

Please find the attachment: Flight log.

Thanks.

Good news
Attitude control is great - everything we did worked. Right up until the crash :frowning:

Bad news
Just looking at battery voltage and current we can see the outward bound journey is smooth, probably with the wind. The return journey is tougher, probably because of wind. There is one noticeable spike in current, then a short time later the trouble starts.

Looking at motor outputs we can see the same overall picture as we did with the battery details.

Looking closer at the motor outputs (and altitude) we can see Motor2 and Motor1 were involved in all the incidents. The copter struggles through and Motors2 and 1 recover and continue working until finally Motor2 stops providing any thrust and is commanded to maximum, Motor1 is commanded to minimum to compensate - being a quad there is no redundancy and the copter goes down.

When those motor outputs are commanded to maximum, that means the motor or prop or ESC has stopped providing thrust. If it was just one motor you might expect a motor mounting screw touching one of the motor windings causing a short or something like that. When it’s two motors/ESCs playing up at exactly the same time you’ve got to look to the common elements, like the brand and model of ESC for example. Or is there power wiring common to just those two ESCs?

Hi @xfacta ,

Power to all motors is supplied through a common Power Distribution Board (PDB), so a power failure is unlikely.

While reviewing the drone design after integrating the payload, I observed a center of gravity (CG) shift diagonally with the following offsets:

  • X-axis: -1.28 cm

  • Y-axis: 1.73 cm

  • Z-axis: -3.703 cm

The current CG is located diagonally, close to Motor 3 (M3).

I am unsure whether this CG shift could lead to motor saturation, especially under high wind conditions. I would like to understand:

  • Is this level of CG shift acceptable?

  • Do I need to modify the current design to correct it?

  • If corrected, will it help resolve the observed issue?

Looking forward to your guidance.

There may have been some COG shift away from Motor4, or it could have been an effect of wind, I’m unsure. Either way it’s not a big issue and the copter could cope with that fine.
The cause of the crash is not motor saturation because of a slight COG shift or anything similar. I believe it’s because of ESCs not able to cope with conditions and potentially desyncing, and in the end not recovering.