LibrePilot Forum

General Category => General Discussion => Topic started by: I_drone_about_drones on June 24, 2017, 11:35:36 am

Title: PID settings
Post by: I_drone_about_drones on June 24, 2017, 11:35:36 am
Hi

I have been trying to find PID settings for a 180 size quad but can't find any really good ones online.
The vehicle set up wizard doesn't have any for 180 size quads(unfortunately).
The ones I have now aren't very good(but at least they work)
Is there anyone who has PID settings for my quad.(180 size please)
Any help would be appreciated.
Title: Re: PID settings
Post by: hawkview on June 24, 2017, 03:36:24 pm
Use tx pids option if you don't have a revo, or autotune.

If you got pids that fly without vibs use easy tune to tune the pids
Title: Re: PID settings
Post by: Mateusz on June 24, 2017, 03:48:43 pm
Is there anyone who has PID settings for my quad.(180 size please)

Like mentioned use EasyTune in general or AutoTune if you have F4 hardware, but always check if AutoTune result make sense, it's not suitable for blindly running.
About PIDs for 180mm size, that is not realistic to have. PIDs depend on battery used, size of props, motors, total weight etc.. There are too many factors to have PIDs just for 180mm size, so sadly you do really need to tune yourself. And best results are by tuning, not by using someone's PIDs. If default PIDs work fine, then it's just coincidence.
Title: Re: PID settings
Post by: I_drone_about_drones on June 26, 2017, 03:40:53 pm
I would use auto tune but I only have two flight modes on my controller. I can't figure how to do it with two.
Is there any way to do it with two flight modes it and how.
Thanks in advance for the help.
Title: Re: PID settings
Post by: f5soh on June 26, 2017, 03:54:03 pm
You need at least two flight mode positions assuming you cannot takeoff in Autotune.

FM1: Attitude
FM2: Autotune

- Takeoff in Attitude mode - Bank1 (FM1)
- Switch to Autotune (FM2)
- Wait for one minute (shaking)
- Land - Disarm (New autotune PIDs are copied to Bank3)

Next you can check/copy the new PID found in bank3 or simply use it with Attitude for testing
FM1: Attitude + bank1
FM2: Attitude + bank3

https://www.youtube.com/watch?v=BTjcshAvY3s
Title: Re: PID settings
Post by: I_drone_about_drones on June 27, 2017, 09:00:44 am
Thanks everybody for the help.
Title: Re: PID settings
Post by: I_drone_about_drones on June 27, 2017, 11:47:43 am
Now I have run into another problem.(sadly)
I set FMS1: to stabilized 1; FMS2: to autotune
Now I get an error.(attached pic)
What am I doing wrong.

Title: Re: PID settings
Post by: TheOtherCliff on June 27, 2017, 04:15:26 pm
I don't notice where you said what kind of FC you have.  AutoTune isn't available on CC3D.  Use EasyTune if you have an extra channel to tune with.
Title: Re: PID settings
Post by: f5soh on June 27, 2017, 07:47:11 pm
Quote
What am I doing wrong.
(https://forum.librepilot.org/index.php?action=dlattach;topic=3589.0;attach=6289)
You cannot run Autotune using a CC3D

Previous post highlighted the config issue you have, i mean try to run Autotune with a CC3D.
Quote
Use tx pids option if you don't have a revo, or autotune.

Quote
or AutoTune if you have F4 hardware
Title: Re: PID settings
Post by: I_drone_about_drones on June 28, 2017, 02:41:36 am
Okay I do have a CC3D so autotune won't work.(Thanks for telling me)
My problem now is That I have a spectrum DX6i which does not have any wheels or accessories other than switches.
And I think means TxPID won't work on my transmitter.
Even if it did, I can't seem to any accessories add them in the transmitter setup.
Is there any way to tune my quad beside just comparing different PID banks on my two flight modes.
Thanks.
Title: Re: PID settings
Post by: TheOtherCliff on June 28, 2017, 07:24:32 am
I suggest you Google
OPTune

That is an old manual way where you manually adjust PIDs till you get small oscillation, then a formula tells you all PIDs.
Title: Re: PID settings
Post by: Mateusz on June 28, 2017, 08:19:57 am
Is there any way to tune my quad beside just comparing different PID banks on my two flight modes.
Thanks.

Either transmitter with knobs, or oplink modem and Bluetooth dongle + Android phone. Alternative two oplinks and laptop. You need to tune these values some way.
Dunno about OPTune but if Cliff says so then it must be possible. It is cheap to get 2 oplink modems and ask someone with laptop to assist changing values while you fly. I haven't done that though. Android app has PID tuning panel and is nice as you can attach phone to transmitter. Choice is yours ;)
Title: Re: PID settings
Post by: I_drone_about_drones on June 28, 2017, 10:17:47 am
 I have another question.
The reason I thought my PID were out of tune was
1. When I fly really fast forward and bring the drone level it automatically stops itself.
2. When I descend the drone wobbles.(but I think that this is just a librepilot thing)
And another totally unrelated question,
How do you increase the roll and pitch speed.(I have an idea how to but I don't want to mess things up)
Thanks.
Title: Re: PID settings
Post by: Mateusz on June 28, 2017, 10:46:03 am
I have another question.
The reason I thought my PID were out of tune was
1. When I fly really fast forward and bring the drone level it automatically stops itself.
2. When I descend the drone wobbles.(but I think that this is just a librepilot thing)
And another totally unrelated question,
How do you increase the roll and pitch speed.(I have an idea how to but I don't want to mess things up)
Thanks.

I am not sure what you mean by 1. motors stop ?
About 2. your optimal PIDs might be narrow, in my case it happens on big F450 copter, it wobbles at high and low throttle. There is option TPS (Thrust PID scaling) which adjusts PIDs to throttle value and solves this problem on quads having it. Though I haven't seen this happening on smaller builds. Yesterday I finished 80mm size one and didn't even tune it, flew FPV between rooms feels just fine.

Actually bluetooth dongle you can hook up directly to CC3D without need for OPlink, sorry for confusion. Check wiki how to do that. Dongles are very cheap and it's realy nice to have, if you go to the field with goggles, batteries, copters and realized you forgot to change "always disarmed" :) But it's a 20min bike ride back to home :) Also app shows system health, and allow changing many options. Really handy and I recommend it.
Title: Re: PID settings
Post by: f5soh on June 28, 2017, 11:18:16 am
Quote
OPTune
That is an old manual way where you manually adjust PIDs till you get small oscillation, then a formula tells you all PIDs.

OPTune requirements should be the same as EasyTune because you need to find the small oscillation using a knob and TxPID.
Anyway you can find the small oscillation by trial and error / land connect to GCS... it must take some time :)

The wobbles in vertical descent phase are almost normal, just physics. Drone descend into his vortex.
You can do fast descends without wobbles if you go a little forward and doing circles.

You can take a look at wiki pages for how to change speed settings, for Attitude mode:
https://librepilot.atlassian.net/wiki/display/LPDOC/Attitude+Setup#AttitudeSetup-Advancedtab

Rate mode:
https://librepilot.atlassian.net/wiki/display/LPDOC/Rate+Setup#RateSetup-Advancedtab

Others pages related to tuning using different stabilization modes:
https://librepilot.atlassian.net/wiki/display/LPDOC/Advanced+tuning
Title: Re: PID settings
Post by: I_drone_about_drones on June 28, 2017, 02:01:20 pm
When I say stop I mean the drone banks backward and stops itself. (so it is hovering in one place or flying backwards)
Is this the battery.
I assumed that stabilized 6 is acro, am I wrong.
Title: Re: PID settings
Post by: TheOtherCliff on June 28, 2017, 03:54:59 pm
How do you increase the roll and pitch speed.(I have an idea how to but I don't want to mess things up)

Are you asking about the banking speed or the banking max angle?  Are you already flying in Rate mode or still using Attitude?

Stabilization -> SettingsBank# -> Advanced
Enable the "use advanced" each time you go to this page.  Adjust:
AttitudeModeResponse to change max angle in Atttude mode
RateModeResponse to change the banking speed (rotation rate) in Rate mode
MaxRateLimit to change the banking speed (rotation rate) in other modes (not Rate) such as Attitude
Title: Re: PID settings
Post by: I_drone_about_drones on June 29, 2017, 02:29:40 am
When I say stop I mean the drone banks backward and stops itself. (so it is hovering in one place or flying backwards)
Is this the battery.
I assumed that stabilized 6 is acro, am I wrong.
This is in rate mode. I'm sure that the drone is not supposed to stabilize itself.(And It only does this when I fly forward fast in stabilized 6)
Maybe I can get a video of it doing this.
Title: Re: PID settings
Post by: TheOtherCliff on June 29, 2017, 07:45:41 pm
IIRC:  It usually means that the PIDs need to be tuned.  In particular, the "I" term probably needs to be higher.
Title: Re: PID settings
Post by: I_drone_about_drones on June 30, 2017, 10:44:52 am
Today I've been doing a lot of PID tuning by plunging the drone into my laptop editing PIDs  and then flying.
But my problem is the pid settings have to be change drastically to notice any difference.
The only big difference I notice is how the drone reacts.
if I put my pitch and roll P to about 300 the drone reacts fast. If I put it higher or lower it seems to react slower.
I haven't play around with the I and D settings yet.
What is the difference between the rate stabilization and the attitude stabilization.
Title: Re: PID settings
Post by: TheOtherCliff on June 30, 2017, 06:20:34 pm
There are two sets of PIDs.  The first one controls the rotation rate.  The second one uses the first one (rate) to control the bank angle (attitude).

Rate mode uses only the rate (inner) PID.  Attitude mode uses both PIDs.

Many people adjust only the inner PID, even for Attitude mode.

You can see that if the inner PID is bad, then neither Rate mode nor Attitude mode will work.

I often double or halve a value (multiply or divide by 2.0) to get an idea of what it does and whether it is better or worse.  If that is too much, set back to default (or not) and multiply or divide by 1.5.  Tweak by smaller amounts such as by 1.1.  Of course 1.0 does nothing.  Don't bother with numbers smaller than 1.0 since multiplying by 2.0 is the same as dividing by 0.5
Title: Re: PID settings
Post by: I_drone_about_drones on July 01, 2017, 03:01:50 pm
Thanks
 I will have to find a day to fly and do more tests. (It's been raining so much I can't fly)