New tuning needed when change from Lipo to Li-ion

Hi folks. I have done some tests with a LI-ion 6S4P made from NCR18650B battery cells for my 680Quad. It is autotuned with a 6S12000mAh Lipo and it flies quit well. With a 6S4P Li-ion pack the drone feels somewhat sluggish. Either I need to upgrade to 6S5P Li-ion to get more punch or redo the autotune ?. What do you think my friends?

Welcome to Li Ion batteries :slight_smile:
I think if you increase the number of parallel cells to increase punch, you will be adding weight which might have more of a negative effect. Spend some time in ecalc and you will be able to see what difference it makes, before taking the leap.
Keep in mind Li Ion packs have a tendency to overheat the cells in the middle, so more cells could mean more heat build up too.

Battery current is about 10 to 11 amps average, and about 20 amps peak, so just make sure the new battery pack is capable of that without overheating.
You can set this to 20 or whatever suits the maximum continuous current rating of the pack
MOT_BAT_CURR_MAX
and there’s a time constant setting, so little peaks wont be clipped. You can lower the time constant value to limit the current excursion beyond the MAX too.

Attitude control was reasonable before you tried to run Autotune. Maybe run Autotune if still required after you’ve checked and worked through everything else I mention here.

You need to change all the battery voltage related settings to suit

BATT_ARM_VOLT,19.10
BATT_CRT_VOLT,18.00
BATT_LOW_VOLT,18.60
MOT_BAT_VOLT_MAX,24.60
MOT_BAT_VOLT_MIN,16.80

and hover thrust learnt a new value
MOT_THST_HOVER,0.2966039
so you could adjust

PSC_ACCZ_I,0.6
PSC_ACCZ_P,0.3

and you could set these regardless of battery packs

BATT_FS_CRT_ACT,1
BATT_FS_LOW_ACT,2 or 3
INS_ACCEL_FILTER,10
INS_LOG_BAT_OPT,4

I think your FFT-driven harmonic notch filter is not working properly, more by accident than design.
You could try setting these:

INS_HNTCH_BW,25
INS_HNTCH_FREQ,50

and see if it works better in subsequent logs.
My reasoning is the FTT collected data - clearly showing the wrong frequency and bandwidth for your sized props

FFT_BW_HOVER,100
FFT_FREQ_HOVER,129.7673

Otherwise I would change over to throttle-based harmonic notch filter and disable FFT

1 Like

Thanks Shawn for your advice.

Hi Shawn. I have edited the parameters as you suggested and also redone the Autotune. What do you think about the result?

//YB

Attitude looks quite good in the testflight, but it’s still a bit nervous.
In-flight FFT still not working…
Set these then run Autotune again

ATC_THR_MIX_MAN,0.5
AUTOTUNE_AGGR,0.1
FFT_ENABLE,0
INS_HNTCH_FREQ,67
INS_HNTCH_BW,20
INS_HNTCH_MODE,1
INS_HNTCH_FM_RAT,0.7
INS_HNTCH_REF,0.28

Hi Shawn

I changed those parameters and did new autotune. How do you conclude in FFT analysis that the regulation is somewhat nervous??

I meant the attitude control appeared a bit nervous :slight_smile:
Let me know how you think it is going and what you think of the tuning and attitude control so far.

Try ATC_INPUT_TC,0.22 so the copter is not trying to follow tiny wobbles and variation in the RC transmitter stick inputs. I think this will smooth out the flight, I always use about 0.2

Now attitude control is quite “technically correct” but I suspect you might want a slightly softer tune for carrying a camera or similar, this is not a small racing quad :slight_smile: It is easy for us to sort that out later if it is still an issue.

From that flight data you can set these, because hover thrust changed:
INS_HNTCH_REF,0.3
PSC_ACCZ_I,0.86
PSC_ACCZ_P,0.43
which may return some of the “punch” you wanted.
Now run a Yaw autotune, then do a test flight in AltHold mode with plenty of yaw and circles, and test you pitch and roll too. You can test Loiter too, but it is very handy to have AltHold in the same flight.
If you can do more turns, circles and coordinated turns we can really nail down the compass settings too, since Li Ion batteries are bad for magnetic fields.

Hi Shawn and thanks for your help.

I have now changed the parameters and run a new Yaw Autotune. The copter has good response and flies stably. Can you check the log if there is more to do or should I be satisfied?

:slight_smile: you tell me! Actually it’s a good question - On one side there is your feedback and expectations, and on the other side is me and other people that look in the logs and see things that you wont notice with the naked eye. Hopefully we can converge and settle on something you will be happy with and wont let you down.

I’m examining that log closely and will probably check over your other logs too.
It seems the yaw autotune made yaw worse, or at least noisier, so I really want to figure out what’s going on.
Pitch and roll are OK but I think we can get those operating more smoothly too.

There’s always been a noise frequency around 35 to 37 Hz with you copter - would that be because of a gimbal or something? Is everything fully secured?

Hi shawn and thanks for help.

Now I changet the props from 15 inch cf to 16 inch folding and run autotune for YAW. I can see that the Att.yaw is now less nervous ?

Regards YB

That is pretty good. Attitude control is great! What do you think?
Let me know if yaw gives you issues or is too extreme.

MOT_THST_HOVER has gone down to 0.25 so you could adjust a couple of other parameters if necessary. Particularly:
INS_HNTCH_REF,0.18
I still dont quite understand the frequencies that are showing up in the FFT graphs, as if there’s more going on here than what we realise. It would be nice to figure that out - can you send my a picture of the whole copter and a few of the flight controller and other equipment please?
image

There’s a tiny bit of instability during descents and you may be able to lower the MOT_THST_EXPO a little
I would try
MOT_THST_EXPO,0.70 or 0.69
and send another log of ascents and descents



Was the old battery mounted the same way? To me the mount doesn’t look very stiff (at least for small deflections)

Hi YB,
just getting back to this now…
Here’s the latest redesign of your harmonic notch filters!
Reasons:

  1. Dynamic, peak at 49Hz, 98Hz, 200Hz and 300Hz (looks like a related set of frequencies)
  2. Static, peak at 35Hz, 67Hz and 134Hz which seems to be present regardless of your props (also looks like a related set of frequencies)
INS_HNTCH_BW,10
INS_HNTCH_FM_RAT,0.7
INS_HNTCH_FREQ,49
INS_HNTCH_HMNCS,7
INS_HNTCH_MODE,1
INS_HNTCH_REF,0.175
INS_HNTC2_ATT,40
INS_HNTC2_BW,10
INS_HNTC2_ENABLE,1
INS_HNTC2_FREQ,35
INS_HNTC2_HMNCS,3
INS_HNTC2_MODE,0
INS_HNTC2_REF,0

It will be interesting to see a test flight after that. We can figure out if one of those needs to change to dynamic or static or other changes…

In the last config there was
INS_HNTCH_REF,0.3
which would have prevented there harmonic notch filter from working properly at lower throttle levels.

I would look for some way of damping of securing that cowling since I suspect it might be vibrating somewhat. Just some tape to the frame as a temporary measure to see if that makes any difference. A couple of foam blocks stuck to the baseplate for it rest against might be a more permanent solution. If that works out you may be able to disable HNTC2.

Hi

There is a Velcro fastener between the Li-ion battery 6S14000mAh 1.2 Kg and battery holder in purpose to prevent the battery to slipping. Then the battery is attached with three straps to the holder.

Hi Shawn

I modified the parameters and was able to do a shorter test flight. Machine shook violently and I landed again. Attaches the flight log. I have checked all fasteners
I’ve checked all the fasteners and can’t find anything loose. Pixhawk 6C is fixed with 3M on a polycarbo plate which is then screwed into the CF frame. Can this bring about something undesirable?.

That was a bit unexpected :frowning:
I can see roll had an issue with oscillations.
Let’s set:

INS_HNTC2_ENABLE,0
MOT_THST_EXPO,0.71

and see if that get it back to normal.

No worries, i had saved the parameters and already made a 15 minutes test fligt. So good so far. Perhaps the Tarot 680 frame is a bit instabil ?

Hi Shawn.
After it flies perfectly, it has started to vibrate. I have checked that nothing is loose and have also reassembled the Pixhawk 6c. RCOUT vibrates and the motors get hot. Maybe I should redo the autotune?

Try these lower PID values, especially the D terms seemed high to me
ATC_RAT_PIT_D,0.007
ATC_RAT_PIT_I,0.21
ATC_RAT_PIT_P,0.21
ATC_RAT_RLL_D,0.0073
ATC_RAT_RLL_I,0.22
ATC_RAT_RLL_P,0.22

There is still two or three frequencies and so many harmonics occurring - there’s got to be something vibrating and resonating…
Roughly these that I listed before

  • 49Hz, 98Hz, 200Hz and 300Hz
  • 35Hz, 67Hz and 134Hz

image