PID tuning question
« on: April 05, 2016, 04:32:23 pm »
Hi everyone.

I have a Robocat 270 running CC3D Atom and LibrePilot. For the most part, the 'cat flies fairly well, except...

...when banking aggressively, the motors increase RPM dramatically, seemingly on the verge of going out of control, and the drone gains quite a bit of altitude. The motors settle down quickly, but the brief, high-pitched whine is noticeable and you can see the 'cat struggle to level itself out, and there is a slight wobble as it auto-corrects. I have my Thrust PID scaling as shown.

Not sure of this is also a symptom related to this, but the 'cat just feels a bit "twitchy"...as though if I push it too hard it will lose control completely. Very sensitive to control input.

Maybe I have the auto-leveling correction set too strongly. If so, how is this adjusted in LibrePilot? What should I try adjusting?

Thought/suggestions appreciated from someone desperately trying to learn.  Sorry for all of the noob-ness...


Re: PID tuning question
« Reply #1 on: April 05, 2016, 06:30:36 pm »
Your TPA graph you show is grayed out so its disabled. But leave it off for now. Your pitch and roll P gain controls that. You could lower the P gain only for roll and pitch in closed loop on the advanced page

Also try some expo, on the basic tab.  The little graph is you expo which sort of decreases sensitivity around mid stick. Positive decreases sensitivity and negative increases it

You can also add some expo to "soften" the controls in your radio but I like to use the GCS when ever I can. Expo will make it less twitchy. Tuning will get rid of the wobble and any other strange behavior usually.

Tpa is used to lessen the PID control at high throttle and/or increase PID control at lower throttle

Some copters need it. Some don't use it at all. I would get it less sensitive first then start tuning when your super comfortable flying

The banking turns thing: flying in an auto level mode the motors will do that: they are constantly fighting against the copter trying to level itself.  sounds like you may have cruise control on your throttle. Cause that is what it is designed to do. Raise or lower throttle in turns for you.

Add expo, lower P gains maybe, learn to fly manually in rate mode

 
« Last Edit: April 05, 2016, 06:33:50 pm by NicholasDavid »
5" alien 4s 596grams with battery and GoPro FPV
Lantian LT210 4s 604grams with batt and GoPro FPV
GE X220 4s 6" 513grams with batt and HD cam FPV
Homemade acro X copter. 6" 4s - like a warpquad LOS

Re: PID tuning question
« Reply #2 on: April 05, 2016, 09:38:03 pm »
Thanks so much.

Yes, I knew it was grayed out, but only because I unplugged before taking a screen shot.

When you say "...lower the P gain only for roll and pitch in closed loop...", where exactly is that?  Is it the Inner Loop or Outer Loop section?

My settings are attached for "Intermediate" switch settings...(Bank 2)...

Re: PID tuning question
« Reply #3 on: April 05, 2016, 09:45:30 pm »
Outer loop. I gain should stay zero. At least that's the way it used to be. Outer loop is auto level pids.  Innerloop is rate and manual modes

I believe setting your Outerloop I gains to zero will fly better

Outer loop P to 2.500-3.000 and set I to 0.000 on both roll and pitch and yaw. 

So roll p 2.500, pitch P 2.800,yaw p 2.500
I for all three at 0.0000

Also what default did you start with? How did you get these pids?
 The qav 250 or blackout 250 or hobby king 250 (race) all fly great on a 210-280mm H or X quad. You may just need to adjust pitch P down closer to roll P for an X frame.  That is what I would use and start tuning from there.
 A bounce or jitter after a stick move can be adjusted by lowering your outer loop P gain. Your whole outer loop table looks way to high.

Also I would really turn off TPA until you have it better tuned, and your innerloop table "rate pids" Looks  like  a good starting point.

I usually start tuning my innerloop PIds with .00200 for pitch and roll and something like .00450 for both I gains and 20-30 for D gains. Leave the whole yaw section as is, or until your have a better grasp of what changes do to how it flys

I'm not an expert by any means, but YouTube is your friend. Painless360 has a great PID video. Video aerial systems (ibcrazy) has a couple great tuning vids and Joshua Bardwell, who flys and tunes beta flight/cleanflight has some informative videos also. PID tuning is PID tuning it does not matter he's always talking about beta/cleanflight it's still pids. They always do the same thing. Just the numbers will be different.
« Last Edit: April 05, 2016, 10:04:46 pm by NicholasDavid »
5" alien 4s 596grams with battery and GoPro FPV
Lantian LT210 4s 604grams with batt and GoPro FPV
GE X220 4s 6" 513grams with batt and HD cam FPV
Homemade acro X copter. 6" 4s - like a warpquad LOS

Re: PID tuning question
« Reply #4 on: April 05, 2016, 09:57:40 pm »
Like this?

What about Yaw in Outer Loop?  Can't thank you enough for the help and education.

Re: PID tuning question
« Reply #5 on: April 05, 2016, 10:13:35 pm »
Again, many thanks for all the information and help.

My initial settings came from Banggood, where the drone was purchased.  They have the configuration as a download .uav file...so I did so and off I went.

As I said, for the most part it flies fairly well, just some fine tuning required...I just didn't know where to start and what to tweak.  This gives me some great insight and things to try.

Cheers.

Re: PID tuning question
« Reply #6 on: April 05, 2016, 10:21:47 pm »
Yeah no problem. Happy flying

BTW. I only have expirence with the CC3D. No atom or revo.
5" alien 4s 596grams with battery and GoPro FPV
Lantian LT210 4s 604grams with batt and GoPro FPV
GE X220 4s 6" 513grams with batt and HD cam FPV
Homemade acro X copter. 6" 4s - like a warpquad LOS