Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Please help! Need to relate PIDs with quad behaviour...
#1
Help!

First, sorry if this question was already posted and I'm repeating it, but I did not find anything simmilar in this forum (nor in other forums and, generally, online) to my problems listed here. So I'm posting it and hope some of you PID gurus here can help me to solve it. Cry

I fly only brushed micros, FPV. Mostly indoors (outdoors only in the backyard and when there is no wind and rarely). I fly tiny whoop clones I made out of different toy quad "Silverware" compatible boards and frames like Boldclash BWHOOP and Eachine E011. They all are flashed with Silverware - open source firmware with acro mode set. I used to fly in level mode, but I switched to acro before few months so I am still new in acro - but just few months of practice cause me to get into it rather OK (at least I think Smile ). Still can't do flips nor rolls I but I can fly around rather fine and stable with some of my 6mm builds - but with some (7mm), I have lot of problems tuning them.

I read and watched lot of PID tuning videos and I think I am starting to get feeling how it should be done and how quad behavior needs to "feel" during tuning and after success,  but I still strugle with some specific problems. And what I simply can't find anywhere is relating some specific behaviours of quad with PIDs - to be precise, what behaviour is caused by what PID and/or PID combinations and what to increase/descrease to fix it. Because, simple fast left/right moves and reducing oscilations by tunning PIDs + other standard and usual methods of tuning are OK but does not solve all specific problems I have on some 7mm builds (6mm builds are mostly OK with little modified stock PIDs from fimrware so I fly them more than problematic 7mm which I can't "tame").

And here is list of these problems on my 7mm buids (behaviour during indoor flying with stock PIDs from firmware):
  • In hovering quad sometimes yaws by itself. Sometimes roteates to the right, and sometimes to the left. My TX (deviated Devo 7e) has deadband set on all channels and channel monitor says 0 during yawing so it is not related to sticks nor calibration of TX (also some quads does not yaw with the same TX - so it is definitelly not due to TX)
  •  In hovering sometimes it drifts randomly to all sides (goes everywhere by itself - little to the left, then start to go right, then back, forward... like floating on a water but without wobbling and without oscilations - it just glide around by itself a lot more than it is normal and sometimes "bounces" like it hit some invisible wall during hovering - all that needs a lot of stick moves to hold it at one spot)
  • In hovering sometimes it increases/reduces throttle by itself (this is rare but happens sometimes - like I pushed/pulled throttle but I did not touch it)
  • No "locked in" feeling during flight - while flying straight, it sometimes drifts to a side (not yawing - straight drifting to a side) and when I try to get it back on track, it start to go "everywhere" (like a "drunk" - it is not wobble nor oscilations - flying it feels like figthing a ship on waves - hard to stabilize it and get it back to track)
  • No "locked in" feeling during normal turns - like that yaw drift from hovering hits here too - also, when turning, it starts to go "everywhere" after turn is done
  • In fast turns (180 degree turns and braking that way) it wobble 1-2 maybe 3 times when turn is over and, also, tend to go "everywhere" after turn is done.
All this hapens with new motors, good props and straight frame (whoop ducted X type), so I think it is not related to problems with that. Camera is in front, VTX is at back (detached), battery centered - so CG should also be rather OK. It usually does not oscilate nor wobble on fast moves, fast stops, fast left/right moves, fast yaws etc (just in these specific situations I listed above) - it just feels like a ship full of drunk sailors that I'm trying to navigate Smile ... It has enough power and speed so it is not lacking thrust.

Now, would be great if somebody help me with relating these problems with PID and help me to finally set it up and fly and not tweak constantly (which started to be very frustrating because lately I just started to randomly put numbers here and there becasue I don't know what to do any more - and without success Sad ).

Thanks in advance.
Reply
Login to remove this ad | Register Here
#2
What you are describing sounds like vibration to me. Even though you are using new motors, the brushed motors have a large rotating mass compared to their size and it's unlikely that these motors are balanced in any way. Different frames and motors will have different characteristics when it comes to vibration. The levels and frequencies of the vibration will be very dependent on the throttle level as well, further complicating the situation.

Have you tried soft mounting the flight controller (if that's even possible)?

Have you tried changing the settings in config.h for the hardware gyro low pass filter and the software gyro low pass filter? If you do have excessive vibration, returning to some well known PIDs that work for others on the same hardware and experimenting with the filters instead might help.
Reply
#3
By soft mounting you mean putting some foam under board or on screws? I think it is hard to do in my case (type of board and frame) but I can try.

I already seen recommendations for setting different gyro filters and that helped a bit on one build but not on all of them. But I thought my problems are mostly caused by PIDs.

Now, I don't see vibrations (not in LOS nor in FPV video) - all problems are mosty related to quad's behaviour like he has its own will. I assumed vibrations will be visible at least in FPV video. But they are not. Image is stable, no any oscilations... So, all behaviour I listed could actually be not PID related but gyro related?  I'll definitelly try some stock PIDs and more filters in combination and see if that might help...

Thanks!
Reply
#4
The vibrations don't have to be slow enough so that you can see them.

Wobbling after a hard manoeuvre can be that D is too low or P is too high. Drifting from the set angle is too low I. Overcompensating on starting or ending a move is too high P. A lack of 'locked in' feeling can be from P being too low.

The uncommanded yaw is what makes me think of vibration and the increase in throttle is often due to uncommanded yaw - as you have to speed up two motors and slow down the other two to yaw. The seemingly random disturbances during hover would also tend to suggest vibration. Mounting the flight controller on foam pads may be enough to reduce the vibration to an acceptable level. Vibration may also be only present at particular throttle levels, especially if the vibration is caused by poorly balanced motors. Just like an unbalanced wheel on a car can only be felt at particular speeds, motor induced vibration may only exist at a very narrow band of the throttle. If the vibration is specific to a certain throttle range, the PID controller itself can induce the vibration as it changes the motor speeds to control the craft; it doesn't just depend on the position of your throttle stick.

Badly tuned PIDs tend to exhibit repeatable symptoms rather than random ones.

For generic PID tuning, Joshua Bardwell's series of videos on PID tuning explain everything you need to know.
Reply
#5
Thanks for details! I've seen Bardwell's videos and they are great - but when I started to tune, I stumbled to specific problems for which I can't figure out what might be. But vibrations can be cause - especially if they don't need to be visible but still can cause problems (and I alway assume that what I see can cause problem). I'll definitelly try to put some foam under screws between frame and board and try to set diferent gyro filters for start.

And just two more questions (for this reply  Wink ):

You said "Overcompensating on starting or ending a move is too high P" - what exactly is "Overcompensating on starting or ending a move"? I mean, how overcompensating actually feels during flying and how to detect it as a problem? Is it "like a boat on a waves"/"it goes everyhwere"/"drunken sailors" feeling during start/end of a fast move (which I experience in my case)?

And about unbalanced motors - is it possible to balance motors? And how? I never tried that (I only do props balancing when it is needed)...
Reply
#6
You can't balance brushed motors. Brushless can be balanced by using a vibration meter and bits of tape on the bell.

Overcompensating at the end of a roll would cause the quad to bounce back in the opposite direction when the stick was centred to stop the roll. This may lead to a short wobble as the PID controller fights the too strong effect of a too high P gain.
So maybe your explanation would match that.
Reply
#7
I only have visible short wobble or two wobbles at end of fast and sharp 180 degree turns (not roll nor flips - just simple turn in straight line). How much invisible wobbles and vibrations I have, can't tell Sad  . Also, in normal flying, no any visible oscilations or wobbling - just "drunk"/"go where it wants" feel... But could be that when I roll left for, say 10 degree, that it goes back for 2 degrees and mess up direction. But I can't detect than in googles or LOS - it can't be spotted visually - I simply feel that it actually does not do exactly what I told him to do so it is pretty hard to control especially during fast moves.

Original P (on both roll and pitch) were around 13e-2 and "going everywhere" and not "locked in" feeling was rather big. By increasing P up to 19e-2 (and also increasing bit of I and D) I manage to get it much more controllable but still problematic... Need to try filters etc. but I'll check it later afternoon (need to flash it fot that).
Reply
#8
Yeah, the hardware limitations of these boards don't exactly make tuning a simple task, especially when you have to recompile and flash each time you change something.

Good luck!
Reply
#9
For PIDs no need to flash (gesture tunning works fine). For other options - yes. Flashing is neccesssary. But I can live with that (for now  Rolleyes ). Setting different gyro filter helped a bit but it still behaves like it has his own mind.. I can't find good way to soft mount board (at end, it need to be attached with screws to the frame and then vibration will be transferred anyway via screws). But I'll experiment more...

Thanks for help!
[-] The following 1 user Likes silverAG's post:
  • unseen
Reply
#10
I think I got it!
I manage to tune my 7mm build from first post. I tuned it "from scratch" using help from here, from RCgroups, from youtube and other various sources. Indoor, it flys great! I ended up with PIDs lower than default and also with "I" lover than "D" which, as I see, is not a common thing. Is it OK to have I gain lower than D?

Also, I tested it in front of air condition and it does not loose attitude but it was drifting aroung due to wind. Simmilar behaviour I had outside on stronger wind - it goes everwhere but angle is kept. So I assume "I" is OK and it can't prevent drifting from wind - I mean, quad with correctly tuned "I" wind will push around but quad will keep angle and wind won't get it out from angle?
Reply
#11
I'm glad to hear you got things working better!

Every quad is different and micro brushed builds are very different from a 5" brushless quad. There's no formula that fits all and if I < D is working for you then it is correct for your quad.

Wind will, of course, blow the quad around. The flight controller has absolutely no concept of the craft's position in 3D space without a GPS, only what speed it is rotating around each axis and (if an accelerometer is used) the angle of each axis. As rate mode is only using the gyro, all the flight controller knows about is rotation.

If the wind tries to change the quad's current attitude, that will be registered by the gyro and if the current commanded rotation is zero, the PID controller will apply an opposite correction to what the wind is causing.

Note that this is not an entirely error free system. Errors will slowly accumulate and the craft's attitude will change over time due to accumulated error. With only one sensor (the gyro), there is no way the flight controller can detect accumulated error and correct for it. In more advanced systems like the Pixhawk, multiple sensors are integrated into a comprehensive model of the quad's attitude, heading, speed and position.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Where to put 2.4GHz ELRS RX with ceramic antenna on 5in racing quad? Luk5569 6 167 05-Mar-2024, 12:54 PM
Last Post: ph2t
  Data Zombie Quad? Green_Weedle 2 138 05-Feb-2024, 10:27 PM
Last Post: Pathfinder075
  How quad building has helped my Beer brewing Rob Axel 5 224 16-Oct-2023, 01:24 AM
Last Post: Rob Axel
  Help Find my quad aerokam 16 805 10-Oct-2023, 04:52 PM
Last Post: Dak_4008
  Broke my first quad, fixed my first quad FPVme 4 293 23-May-2023, 07:11 PM
Last Post: FPVme


Login to remove this ad | Register Here