New Products Flash Sale
Thread Tools
Old Mar 02, 2015, 07:56 PM
Power Max is offline
Find More Posts by Power Max
Registered User
Joined Aug 2014
126 Posts
Help!
Classic PID problems I am having, (it is more difficult to tune than expected!)

I am having issues with instability. I have lowered I and D down to 0, and have P set for 3, which is relatively low. I also had everything set really high, and it seems that oscillation when I let off the sticks, or rapidly thang direction, and under certain circumstances. It is almost like a pendulum! The oscillations are somewhat slow, and dampen away to nothing after several seconds.

My wooden H frame is quite heavy (and honestly a bit bent and warped-looking, from the looks of it when flying ), and the props are relatively close together, so I am guessing this some if the difficulties tuning this thing may be the result of some turbulence, seeing that no one else has only allowed only one inch of space between the 10" props! Though I have not had this much problem with maintaining control in the past, recently, all I can remember changing was the ESC's rev-up speed. (before it was set to rev up rather slowly, I reprogrammed the ESCs in hopes to get a more solid-feeling quad) I suspect that may be the reason I have to retune, along with a really small change in the design of the frame, to make it stronger.

It does not seem to matter what I change, or how much, after an afternoon's attempt at stabilizing the sucker, I did not achieve much. I still have the wobbles, and do not know how high I should turn the P up to stop the wobbles. I have tried really high values for P, like 7.9, and really low values, like 3.0. I am using the multiwii flight FC, and the factory setting was 4.5. Mind you, before the changes, I did not have much issue with stability. What I have noticed when I had D and I turned to 0, and P between 3 and 5, that makes it become slightly more stable, however, it still oscillated when giving it some stick to go forward, backward, or side to side, and it also seemed to overshoot a lot when doing so. Perhaps that is because the multiwii code is trying to accommodate the time it takes to rev up the motors. Also, it still seems to take a LONG time for oscillation to dampen out after giving it some stick. It *DOES* seem to always dampen away when hovering after a fee too many seconds, and longer and more violent oscillations occur on sharp turns, and changes in altitude. I can also I continue to agitate it by oscillating the stick itself to build up the oscillation, though that is not unexpected. (thats feedback control theory 101!) It is bad enough that iI lost control of the twitchy quad, and had to crash when it was coming right at me and at the house, and that crash busted the frame. Lucky all the electronics were fine, maybe a bit wet from snow, but fine, and I did not break a single prop!

Also, I am having issues with yaw. It seems to want to yaw by itself when given different levels of throttle, and roll/pitch. It seems mostly stable when hovering gently. I may try enabling mag (as currently I have a switch set to go between angle mode, and GPS hold, to test the holding ability. That also needs to be tuned, but does seem to roughly work.)

I do not want to turn the ESCs back to there default setting, as that would only servo to slow down the speed/latency of the feedback loop, (as motors take longer to gain speed when corrections are necessary)

For more info on my setup, I am currently using the Multiwii with many of the additional extras, including GPS, mag, acc, gyro, minumOSD (with multiwii-supported firmware) and other stuff.
Power Max is offline Find More Posts by Power Max
Reply With Quote
Sign up now
to remove ads between posts
Old Mar 03, 2015, 07:38 AM
waltr is online now
Find More Posts by waltr
Team WarpSquad
United States, PA, Doylestown
Joined Jan 2014
6,926 Posts
If you get oscillations when increasing throttle then up the TPA.
Tuning can be very difficult especially for a beginner.
Lots of tuning guides and videos.
Sounds like both 'P' and 'I' may be too high. Too high a 'P' give fast oscillations, too high an 'I' give slower, wobbly oscillations.
'D' can damp these some what.

Is the frame stiff? If it flexes the slightest amount then the whole copter could oscillate.

YAW has its own set of PIDs which also need tuning.

Oh, and you should only tune the P,R,Y PIDs when flying in ACRO MODE not any self-leveling mode since the level modes have their own PIDS that can only be tuned after the PIDs are tuned in ACRO mode.
waltr is online now Find More Posts by waltr
Reply With Quote
Old Mar 03, 2015, 07:10 PM
Power Max is offline
Find More Posts by Power Max
Registered User
Joined Aug 2014
126 Posts
What is TPA? I see that in the settings, and it is currently 0.

I cant say it is a fast oscillation, probably about 2ish Hz. I think it is the result of too high a P, although I feel like it was already really low to begin with, I set it as low as 3.

Ahh, gees, why do there need to be so many PID's! I guess once I fix things I will try tuning in acro. I will probably crash and break things, since I have never flown in acro mode, and when I have, I did not know I was in acro, and when letting off the control sticks, of course I accelerated into stuff, overcorrect and crash. I suppose now would be a better time than ever to learn!

Is that [the separate PIDs for level mode] why when even gently push the 'direction' stick, the direction I want to go, it seems to really jump to a severe angle, as if I slammed it all the way over, then level out a little more and angle itself the amount I wanted? That 'twitchiness' of it is a bit annoying, and I think it was put in place to counteract the ESCs settings before, where the motor rev up time was set slower, or softer (soft start, or something like that in the programming of the ESCs).

The frame is by NO means stiff, and that may be a lot of the problem. I was it looked warped when flying, although strangely it never looks warped when in-hand. The whole center bit is suspended because my crap hong kong A2212 motors have problems like loose rattly bearings, horribly unbalanced motor bells, and bent aluminum prop mounts. I had to use a frame with the center of it isolated from all the vibration. I did eventually crash due to the oscillation and lack of control, and busted the frame to bits. I will need to redesign it entirely I think.

Once I get back up and running, or run into difficulties, I will post back here!
Power Max is offline Find More Posts by Power Max
Reply With Quote
Old Mar 03, 2015, 09:34 PM
waltr is online now
Find More Posts by waltr
Team WarpSquad
United States, PA, Doylestown
Joined Jan 2014
6,926 Posts
Well vibrations can kill any performance and stability and make tuning nearly impossible.
Fix all the vibrations first. Balance the motors and the props.
Re-check to see how much the Frame flexes. Set if donw and lift one arm while looking at it on edge. Does it flex? If so it needs to be stiffer.

Read the MultiWii Wiki for what TPA and other terms mean.

Search for then read and watch the videos on tuning PIDs. There are quite a few and then you'll see the difference between fast and slow oscillations.
waltr is online now Find More Posts by waltr
Reply With Quote
Old Mar 04, 2015, 08:41 AM
Power Max is offline
Find More Posts by Power Max
Registered User
Joined Aug 2014
126 Posts
I could not find anything on TBA in the MultiWii site: http://www.multiwii.com/wiki/index.php?title=PID

I have also searched TBA on the site's search engine and have not come across anything, or on google, for that matter. Do you know what it is or what it does?
Power Max is offline Find More Posts by Power Max
Reply With Quote
Old Mar 04, 2015, 11:21 AM
waltr is online now
Find More Posts by waltr
Team WarpSquad
United States, PA, Doylestown
Joined Jan 2014
6,926 Posts
Sorry, you are right that the Wiki doesn't have anything on TPA.
I'll add this to my list of additions to the Wiki. Your feed back is appreciated.

It is however here on the main MultiWii page.
http://www.multiwii.com/software
Throttle PID Attenuator.
waltr is online now Find More Posts by waltr
Reply With Quote
Old Mar 04, 2015, 03:27 PM
Power Max is offline
Find More Posts by Power Max
Registered User
Joined Aug 2014
126 Posts
Are you the developer or something of the Multiwii?!? or a manager for the site or something? If you know enough about the source code the Multiwii, could you tell me what I should do to get my servo's to travel 180 degrees without an external servo stretcher?

I want to use the multi wii's servo camera stabilizing feature, and the 90 degrees that it is able to drive the servo is OK for that by itself, however, I want to be able to change the angle from looking straight ahead, with enough allowed movement to allow stabilization in the tilt, but have that angle be adjusted by control from a spare channel on my radio. That is, so I can look directly down, and see the ground below me, or obviously any angle in between. However, I will need for than 90 degrees to make that work. I have dig around in the 2.3 code, but cannot find the timing for the servo PWM to expand it to the full servo range or about 190 degrees, at least for the one's I have. (the servo library and spare arduino mega is able to drive the servo to it's full range without issues.)
Power Max is offline Find More Posts by Power Max
Reply With Quote
Old Mar 04, 2015, 03:31 PM
Power Max is offline
Find More Posts by Power Max
Registered User
Joined Aug 2014
126 Posts
OK, I see TBA there, but it does not give much information about what is does. Is it for when I am carrying a heavier load than usual, and a difference in the 'transfer function' due to the change in mass, aerodynamics, etc such that the preset PIDs are not as suitable and need to be lowered on average?
Power Max is offline Find More Posts by Power Max
Last edited by Power Max; Mar 04, 2015 at 05:50 PM.
Reply With Quote
Old Mar 04, 2015, 07:08 PM
waltr is online now
Find More Posts by waltr
Team WarpSquad
United States, PA, Doylestown
Joined Jan 2014
6,926 Posts
I'm just one of the Wiki Editors. There is much I do not know about MW code and only add/fix things in the Wiki I do know about. I am open to suggestions since the Wiki does have much to be desired but is better than no documentation. PMs are acceptable.

Sorry, gimbals, baro, mag and gps are not stuff I know.

TPA only seems to be needed on copters with a higher thrust to weight ratio. The more TPA the more the Roll/Pitch PID (I think only the P but not sure) in reduced. This prevents oscillations from the 'P' being too high with higher throttle but allows a high 'P' during hovering and sharp maneuvering.
If your copter is stable hovering and a little more throttle but oscillates at higher throttle then increasing TPA can fix this.
waltr is online now Find More Posts by waltr
Reply With Quote
Old Mar 04, 2015, 08:37 PM
Power Max is offline
Find More Posts by Power Max
Registered User
Joined Aug 2014
126 Posts
Thats too bad. That is precisely what documentation i find to be lacking. I could not even find information as to which pins to connect the servo's to, (so I had to figure it out trial and error) and of course changing the more significant things like the timing to the servo's, thus changing the distance they travel.
Power Max is offline Find More Posts by Power Max
Reply With Quote


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion "Making it more difficult to fail" ... yeah ... because that's the real problem ... logan5 Life, The Universe, and Politics 25 Jan 29, 2015 03:25 PM
Help! Some problems met when tuning PIDs of Arducopter Nickzhang Multirotor Talk 2 May 29, 2013 07:34 AM
Discussion Is A Biplane More Difficult To Fly Than A Single Wing Plane? itsme2 Beginner Training Area (Aircraft-Electric) 6 Jul 22, 2011 07:28 AM
Discussion Will flying the Slick 42" be any more difficult than the Slick 51"? avt 3D Flying 7 Aug 02, 2010 01:28 AM
Discussion Is a Walkera #52 soo much more difficult than a 5#4 or 5#6 ? reely340 Micro Helis 2 Jun 26, 2007 11:30 PM