PID settings, in attitude mode newb
« on: May 06, 2016, 10:34:37 am »
Hello guys!

im new in this hobby.
My setup is, a diatone spadger, dys 3100kv 1306. DYS XM20A oneshot esc, im using 4045 props, and i CC3D. And i have a Devo f12e, with deviationtx firmware

Im trying to figure out PID settings in Attitude mode.

When i try to tune the PID, i get very comfused.
In Rate Stabilization inner loop witch should only effect when im in rate mode. But it doesnt.

If i turn up the P ind pitch and roll, to 500 it shakes like crazy, but it shouldnt. because im in attitude mode.??
Ive tryed so many options for the PID´s, but nothing is worth keeping. ive tryed with about 250 ind pitch and rool for the P, about 580 for the I. and the D doest really make any difference, only if it is 0,60.
I have tryed for serverel days now to tune my PID when im in attitude mode. But without any luck.

i like to fly in attitude, because im new. But the quad feels so slow, and very heavy. and i only want the quad to have a max tilt angle at 55degrees.


I think i just buy another flightcontroller, because no one cant help my, because im using librepilot, and i cant get cleanflight to work. And i dont want to waste more time figureout nothing.
to this is my last hope :-)


Couldt anyone share there PID´s, or all the librepilot settings, for a simalar setup? i know the values are inderpentdent, but is is worth a try.

Cant figure out TxPID. To many options and cant figure out what to do. and how the do it.:-)

Greetings from Denmark!

Brunosanta

  • **
  • 54
  • I understand it all but know nothing
Re: PID settings, in attitude mode newb
« Reply #1 on: May 06, 2016, 10:43:10 am »
I have a quick tip for you, I hope it works.

Put the quad in rattitude mode, be aware to do not use too much stick deflection otherwise the quad will flip.
set the attitude slider to intermediate.
leave attitude PID as default, maybe put it at 3000 instead of 2500
mark the field pitch and roll for the PID to change together.
Go to Tx tab and set the easytune pitch.
unmark the Yaw, leave it as it it.
set the accessory button (whichoever one you use) to easy tune pitch, set the number 00..3500 till 6500

do a flight and use the accessory button to find a locked feeling.

go back and uinmark the pitch and roll check button, change the TX tab to control only roll now, and do the small adjustment.

It should work easy like that. dont worry abou the weight being bigger in pitch, you will find the tune when the quad feels locked. and wehn you separate the setting for roll you can smooth out if its too much
Everybody is only optimistic on the social networks.. being real is hard nowadays

Mateusz

  • *
  • 808
Re: PID settings, in attitude mode newb
« Reply #2 on: May 06, 2016, 11:21:01 am »
If i turn up the P ind pitch and roll, to 500 it shakes like crazy, but it shouldn't. because im in attitude mode.??

That is not correct assumption, LibrePilot uses dual-loop controller for schematics refer to https://librepilot.atlassian.net/wiki/display/LPDOC/Attitude+Setup
That means that you should tune your inner loop (rate-loop) for both Rate and Altitude flying. Leave outer loop as it is at defaults.

For PID tuning Easytune works great https://librepilot.atlassian.net/wiki/display/LPDOC/TxPID
Or try sometimes working reasonably Autotune https://librepilot.atlassian.net/wiki/display/LPDOC/AutoTune


Re: PID settings, in attitude mode newb
« Reply #3 on: May 06, 2016, 01:15:23 pm »
HIi, Brunosanta.

Ive done that now.

ive sat it to 1500 to 3200. over 3200 my quad buzzes like shit when i go above 3500, i rises to the air.

Ive found my "sweetspot", but i does still vibrate when i flick the pitch/roll stick. but that is normal? it only for a slip sekund.
ive jused my gimbaltilt knops on my devo to find the sweet stop.
but how do i get the settings?

now what should i do?

Re: PID settings, in attitude mode newb
« Reply #4 on: May 06, 2016, 01:18:34 pm »
UPS!

The settings are now ind bank 3 :-)

0,00235 pitch and roll P
0,00705 pitch and roll I
0,000032 pitch and roll D

but what about the yaw settings?

Re: PID settings, in attitude mode newb
« Reply #5 on: May 06, 2016, 01:31:55 pm »




Is this normal?
« Last Edit: May 06, 2016, 03:38:34 pm by hwh »

Brunosanta

  • **
  • 54
  • I understand it all but know nothing
Re: PID settings, in attitude mode newb
« Reply #6 on: May 07, 2016, 04:08:50 pm »
Ok! Im glad somehow it is working out.
the stick flickering, zou can go to input and increase the deadband to 5 or 6, or zou can open the TX and adjust the small screw on it.

I that your quad is vibrating when you let it back to level, for that, the easiest ( there are advanced ways) just go into the tx PID and slide  it to the side of photografer, it should smooth out that easily.

When you are finished with the tunning, go back and activate the yaw automatic calculation. that should bring you to a very good tunning.

Let me know if it works!
 see you
Everybody is only optimistic on the social networks.. being real is hard nowadays

Brunosanta

  • **
  • 54
  • I understand it all but know nothing
Re: PID settings, in attitude mode newb
« Reply #7 on: May 07, 2016, 10:09:15 pm »
hi mate, I just had a chance to check on the video again and I see you have troubles to maintain hover.. one trick is to use the cruise control, that makes sure when you turn sides or front ( pitch and roll) the quad keeps the altitude. The second and most important, go to your throtle curve ( I am guessing it is a straight line) and make a verry light curve, being it very flat around the middle where the quad hovers.. by doing that you will get a less precise throtle change, being able to control the hover better.
Everybody is only optimistic on the social networks.. being real is hard nowadays

Re: PID settings, in attitude mode newb
« Reply #8 on: May 08, 2016, 05:53:24 pm »
The quad hovers just fine.
I know it doesn't seems like that in the video.
I might look at it anyway.

What.. My tapatalk is fuckt
« Last Edit: May 08, 2016, 06:28:18 pm by f5soh »

jbarchuk

  • ***
  • 129
Re: PID settings, in attitude mode newb
« Reply #9 on: May 08, 2016, 10:16:11 pm »
The quad hovers just fine.
I know it doesn't seems like that in the video.

Then what is your problem/question? If you're still thinking about this...

Quote
Ive found my "sweetspot", but i does still vibrate when i flick the pitch/roll stick. but that is normal? it only for a slip sekund.

...then the basic malfunction is that that is not 'flying.' That is not a proper stick control/action.

Analogy. Your car is sitting still with the motor running and the clutch out. You drop the clutch hard and slam the gas pedal to the floor. The clutch engages, the wheels spin up to full RPM almost instantly, lose traction with the pavement, and a lot of smoke erupts but the car doesn't go anywhere. If the 'complaint' at that moment is that the car doesn't go anywhere, well, that's because that was because of improper clutch/gas pedal action.

Opposite analogy. You're car is traveling at 100mph/160kph. You depress the clutch, take your foot off the gas pedal, slam on the brakes as hard as possible and hold it there. The car pitches/tilts forward hard (car suspension in action) as it takes a few seconds for the tires to screech to a halt. -Just- as the car stops moving the suspension 'releases' and the car pitches backwards. Then the suspension tilts forward and backwards a few more times as the shock absorbers gradually release the energy stored in the springs. If the 'problem/complaint' at that moment is that the car rocks backward and forward 'too many times' then the original issue was that that was not 'normal' use of the brakes.

A typical motor vehicle will always spin the tires when too much clutch/gas is applied from a dead stop. A typical car will always rock forward/backward when the brakes are slammed to a stop.

The stick flicking is the equivalent of slamming on the gas and then the brakes. Yes, the quad will rock a few times. The answer is don't slam on the gas and the brakes. Move the sticks in a controlled and deliberate manner to make it travel in the direction you want it to go. That's 'flying' not slamming in an uncontrolled manner.

You *CAN* push the sticks very hard in any direction hard and then pull them back very hard, and the quad should tilt hard and then tilt back, but not do the rocking thing as seen in your vid because the sticks are moving in a CONTROLLED manner.

Re: PID settings, in attitude mode newb
« Reply #10 on: May 09, 2016, 05:37:23 pm »
The quad hovers just fine.
I know it doesn't seems like that in the video.

Then what is your problem/question? If you're still thinking about this...

Quote
Ive found my "sweetspot", but i does still vibrate when i flick the pitch/roll stick. but that is normal? it only for a slip sekund.

...then the basic malfunction is that that is not 'flying.' That is not a proper stick control/action.

Analogy. Your car is sitting still with the motor running and the clutch out. You drop the clutch hard and slam the gas pedal to the floor. The clutch engages, the wheels spin up to full RPM almost instantly, lose traction with the pavement, and a lot of smoke erupts but the car doesn't go anywhere. If the 'complaint' at that moment is that the car doesn't go anywhere, well, that's because that was because of improper clutch/gas pedal action.

Opposite analogy. You're car is traveling at 100mph/160kph. You depress the clutch, take your foot off the gas pedal, slam on the brakes as hard as possible and hold it there. The car pitches/tilts forward hard (car suspension in action) as it takes a few seconds for the tires to screech to a halt. -Just- as the car stops moving the suspension 'releases' and the car pitches backwards. Then the suspension tilts forward and backwards a few more times as the shock absorbers gradually release the energy stored in the springs. If the 'problem/complaint' at that moment is that the car rocks backward and forward 'too many times' then the original issue was that that was not 'normal' use of the brakes.

A typical motor vehicle will always spin the tires when too much clutch/gas is applied from a dead stop. A typical car will always rock forward/backward when the brakes are slammed to a stop.

The stick flicking is the equivalent of slamming on the gas and then the brakes. Yes, the quad will rock a few times. The answer is don't slam on the gas and the brakes. Move the sticks in a controlled and deliberate manner to make it travel in the direction you want it to go. That's 'flying' not slamming in an uncontrolled manner.

You *CAN* push the sticks very hard in any direction hard and then pull them back very hard, and the quad should tilt hard and then tilt back, but not do the rocking thing as seen in your vid because the sticks are moving in a CONTROLLED manner.
Thank you for the answer.

That was understandable.!

jbarchuk

  • ***
  • 129
Re: PID settings, in attitude mode newb
« Reply #11 on: May 09, 2016, 07:27:39 pm »
Thank you for the answer.

That was understandable.!

Excellent. Now all I need to do is go back and reread what I wrote to see if it makes sense to me.  :o

I try to think up analogies for things like this. 'Air' is an INVISIBLE medium, yet the laws of PHYSICS are ALWAYS in effect.

Example. Picture a boat traveling fast through the water. Kill the throttle and the boat stops pretty quickly. Then a second or two later the wake that the boat had created catches up with the boat, pushes it further forward, and it rocks backward/forward as the water settles out. The same thing happens in the air. Air doesn't have a lot of mass the way water does but it definitely has an effect.