Welcome to Multi-Rotor UK. Please login or sign up.

Saturday,September 21, 2019, 18:09:20

Login with username, password and session length

Shoutbox

Gaza07:
21 Sep 2019 13:20:58
New Black n Black Theme installed  :smiley:
ched:
31 Aug 2019 20:37:03
Looking forward to BFU #9 footage  :D Hope you all had a great time
Gaza07:
31 Aug 2019 04:46:44
Hope you all have a great day today at the BFU 9  :beer2:
dp106:
29 Aug 2019 11:19:07
try again now, hopefully it should be resolved...
Gaza07:
29 Aug 2019 11:17:40
Should be fixed now
hoverfly:
29 Aug 2019 11:12:33
replies with only a few words are being rejected as file too big.. :hmm:
dp106:
29 Aug 2019 11:09:33
3D Site also affected
dp106:
29 Aug 2019 11:09:11
Gaza is on the case
dp106:
29 Aug 2019 11:09:03
there are currently issues with the forum
dp106:
29 Aug 2019 11:06:07
test
Members
Stats
  • Total Posts: 196840
  • Total Topics: 19837
  • Online Today: 49
  • Online Ever: 530
  • (Tuesday,June 26, 2012, 08:34:46 )
Users Online
Users: 0
Guests: 40
Total: 40

Theme Changer





3d - Printworx

Printing 3d Forum

Exciting Times - PID system changes

Started by barneyg, Tuesday,July 09, 2013, 02:11:43

Previous topic - Next topic

barneyg

Tuesday,July 09, 2013, 02:11:43 Last Edit: Tuesday,July 09, 2013, 02:54:47 by barneyg
I';ve been slowly getting better at flying my Quad and gradually dialling in the settings.  Mostly I';ve been flying in Angle mode, with a little bit of Acro for when I want to crash :)  I';ve never been amazingly happy with my PID Settings, having some twitchiness and less than stellar Yaw stability.

Being the code monkey that I am I keep an eye on the MultiWii forums - especially the dev sections :) and this thread caught my eye :
http://www.multiwii.com/forum/viewtopic.php?f=8&t=3671

So I took MultiWii 2.2 and added in the suggested changes ( these have now been committed to Trunk but I';m not really wanting to move to a complete dev build just yet :smiley: )

All I can say is WOW ::) all that twitchiness gone ... still some random Yaw movements though so I finally did a few things that I should have done right from the outset which seem to have made quite a difference ... I was looking at the values coming out of my RX and used the trims on my TX to get them a little more central an I added in the DEADBAND setting since the signal wasn';t returning exactly back to center.

Tonight I was hovering nice and stably in Acro mode and the only time I got some weird yaw behaviour was when I did a minimum throttle decent (I was testing the quads stability during a fast descent) which I arrested and then went into a climb using full throttle (I';d over cooked it  - the quad yawed quite drastically, about 30-45 degrees, to the right as it reached the turnaround point but quickly returned to its original heading as the quad stared to rise.  I didn';t try doing just a hover to full throttle since it was about then that the battery died  :whistling:  I';m guessing this is probably down to the massive magnetic field that was generated by the huge current draw.

Anyway just needed to share  :wack0

teslahed

Interesting stuff, well spotted.

I';ve had a look through the latest Dev code and there is the following new section;

/*************************************************************************************************/
/*****************                                                                 ***************/
/****************  SECTION  2 - COPTER TYPE SPECIFIC OPTIONS                               *******/
/*****************                                                                 ***************/
/*************************************************************************************************/

  /********************************  PID Controller *********************************/
    /* choose one of the alternate PID control algorithms
     * 1 = evolved oldschool algorithm (similar to v2.2)
     * 2 = new experimental algorithm from Alex Khoroshko http://www.multiwii.com/forum/viewtopic.php?f=8&t=3671&start=10#p37387
     * */
    #define PID_CONTROLLER 1


So setting PID controller to 2 is going to enable the new PID system.

How does PID tuning the new system compare to the old one? If it';s different the new method could be much better and i would still need to play around and learn to use it properly because i would be able to tell.
One circlip short of a quadcopter.
 1 lobe short of an antenna.

barneyg

Quote from: teslahed on Tuesday,July 09, 2013, 09:47:46
So setting PID controller to 2 is going to enable the new PID system.

How does PID tuning the new system compare to the old one? If it';s different the new method could be much better and i would still need to play around and learn to use it properly because i would be able to tell.


Yeah that is the bit in Trunk ... as I say I';ve just replaced the PID code in 2.2 since Trunk is quite fluid right now (I';ve also swiped the GYRO_SCALE patch too)

I';m not sure on the tuning ... I';ve not been that successful on the old system and I';ve failed on the new one at step 2 of the process I';ve been following :

My general tuning procedure is this:

- Turn I to zero.

- Increase P until you can see it overshoot and correct itself.

- Increase D to eliminate the overshoot. If oscillations become worse then you have too much D and will have to back off both P and D.

- Keep going back and forth between increasing P and D until you have to back off because D is making things worse.

- Finally, increase I until you see signs of instability (oscillations), then back off.


I got to a P of over 6 and still didn';t have any oscillations so I stopped and asked in that thread but haven';t had a reply yet.

I';ve based my settings on the ones posted quite recently there :
Pitch and Roll : P=4.5 I=0.025 D=20 Rate=0.10
Yaw : P=8.0 I=0.040 D=30 Rate=0.20
RC Rate = 1.0
RC Expo = 0.0
and using the expo in my TX.

Leigh

Given these APMs are equipped with sensors that can obviously detect the movement associated with a self-level or stabilization correction, is there any logical reason why they can';t "auto-tune" themselves if flown in a static environment (without wind), given the right amount of code to achieve this?
Aussie on the loose in Belfast.

barneyg

Quote from: hart on Tuesday,July 09, 2013, 15:37:05
Given these APMs are equipped with sensors that can obviously detect the movement associated with a self-level or stabilization correction, is there any logical reason why they can';t "auto-tune" themselves if flown in a static environment (without wind), given the right amount of code to achieve this?


Funny you should mention that :

http://www.rcgroups.com/forums/showthread.php?t=1922403

Leigh

Aussie on the loose in Belfast.

barneyg

Some more flying tonight ... more than just hovering this time ... tried to get my head around banking turns when not in Angle mode.    Struggling with that ... it is counter intuitive to me to return the roll to center once I';ve achieved the desired level of bank.  I kept ploughing into the floor ... fortunately the grass in the field near me is waist high so there was no damage :)

I';m still very happy with the controls ... precise without being twitchy and the yaw drift has gone now (I think using the TX trims and the DEADBAND option were the nails in that coffin) there is some "interesting" yaw characteristics in high load conditions ... a Straight full throttle climb from a hover is fine but it kicks round to the right when reversing direction ... and not just on straight up down.  I saw the same behaviour, to a lesser degree, when moving forwards at a fair clip and then pulling back hard on the stick to reverse the horizontal direction.   I think this may well be a combination of torque and magnetic interference.

I had a quick play with RTH using the new PID algorithm and that didn';t seem to be impacted at all.

Hands0n

Quote from: barneyg on Tuesday,July 09, 2013, 15:43:13
Funny you should mention that :

http://www.rcgroups.com/forums/showthread.php?t=1922403


Oh wow!  :blink  How absolutely awesome.  We should start a new thread on just this specific topic, I reckon.  This guy seems to have taken MultiWii to an entirely new level of capability.  I shall certainly be trying that out in my HK 835P over the weekend (busied right out all this week ... bah!) ~~
--
Danny
"Its better than bad, its good"

Current FCs: Pixhawk, APM 2.6, Naza M V2, Naze32, Flip32+ CC3D, KK2.1.5
Aircraft: miniMax Hex, DJI 550 (clone) TBS Disco, 450 Firefly, 250 Pro, ZMR250, Hubsan X4, Bixler 2