Micro tuning techniques - different than larger quads


#41

I’m wondering how PID tuning affects how the quad flies in a windy situation…

brushed micro quads are very lightweight, so at 60g for an 8.5mm build wind is very easily able to disrupt an even and smooth flight…

In my particular case, the quad tends to get bounced around and almost seems like the motors don’t exactly know what to do as each gust affects them all differently… I am guessing increasing “I” will be what helps out in a situation like this, because it helps control how outside forces affect the quad…

Can a micro quad at 60g be tuned to handle 15mph winds? lol 15mph seems to be pushing the boundaries of where performance of flight is affected lol I’ve flown in 10mph winds and it seems to do not that bad…


#42

You’re right on the money. As for 15mph, that’s probably getting close to the limit. Lol. Never measured exactly. …


#43

What pids have you come up with so far?


#44

due to a lack of authentic USB cables at work, I cannot log into betaflight to check them, but i will post them in a little bit…

I made the PIDs originally from scratch for my 65mm prop dreamcatcher, but they seemed to work out VERY well for my 55mm prop crook build with a few small tweaks to the P value…


#45

My weekend is coming up soon, and I’ve been slaving away at this tune on my 70g bird so it’ll be flying perfectly by then. :slight_smile: The last 2 days Ive just been PID tuning.

I decided to tune my 66-70g 8.5mm bird starting from scratch, and ended up having to start over 3 or 4 times from scratch but eventually started to dial in some great stick response, but I kept having this issue with take off and throttle punches and hovering back down. It would keep trying to yaw left it was the most annoying thing on the planet… eventually though after trying again a few more times from scratch I was able to get it right, and got a decent tune on this bird. I tested it out via FPV and it is very flyable, especially for promixity, nice a sharp but smooth movements…

set p_pitch = 70
set i_pitch = 60
set d_pitch = 45
set p_roll = 70
set i_roll = 60
set d_roll = 45
set p_yaw = 90
set i_yaw = 90
set d_yaw = 20
set p_alt = 50
set i_alt = 0
set d_alt = 0
set p_level = 50
set i_level = 50
set d_level = 100
set p_vel = 55
set i_vel = 55
set d_vel = 75

set rc_rate = 120
set rc_rate_yaw = 100
set rc_expo = 0
set rc_yaw_expo = 0
set thr_mid = 50
set thr_expo = 0
set roll_srate = 70
set pitch_srate = 70
set yaw_srate = 65
set tpa_rate = 10
set tpa_breakpoint = 1650

It’s smooth on flips, holds its altitude. I was able to fly it for 6 minutes on 55mm props with tx02 connected, landing at 3.7v inside doing throttle punches and flips, with no yaw issue, landing with warm but not too hot motors… I’m sure when I fly it in the wind their may be more of a noticeable difference, (hopefully not though lol) and I may need to make some minor adjustments from there but as of right now - this feels sweet!..

I’m realizing it is easy to get a flyable tune… it is HARD to perfect a tune though. lol trying to find out where a specific problem can be really tricky, and often times can lead to starting from scratch again… But it is certainly worth taking the time to get a sick tune on these little guys…

Going to work on the crook 110 56-61g build now and hopefully by the end of 2moro or sooner I’ll have that little guy tuned perfectly and ready for the weekend! Once I get it tuned I’ll share my PIDs on that build. Should be the same weight limit on your king kong 8.5mm build. it would be so awesome if you wouldn’t mind sharing your tune with me for that build once you have it dialed in… I’d like to compare! :smiley:


#46

Will do man! It’s great to read about your experience. I’m looking forward to diving in too. I get my fatsharks back from my bro next weekend. Was thinking about waiting till then so I could document the process and share.


#47

sweet dude! im excited for an update! iend up putting the quad in the fridge for a minute or so to let the motors cool down faster lol I noticed my batteries are getting used faster than they can charge while pid tuning. trying to PERFECT a pid tune takes some time thats for sure. lol


#48

I finally got done tuning both quads tonight, and I have tuned them to perfection for their application. which is great cuz Now i can spend all day to try to work on a brushless build… but I tell you what it definitely takes quite a few tries to dial in a perfect tune. My brushless build flew PERFECT off a stock betaflight tune, so I can’t really say I tuned it…

But I’m happy I can say I 100% completed 2 brushed builds… from build to tune! :D. 3 builds down, many many many more to go!

Thanks for all tuning help! I’m sure it’ll prove usEful in my current brushless build.


#49

Well, I flew a few more packs tonight before dark and couldn’t resist making some adjustments. I also switched to 65mm props from 55mm as it just felt heavy on the 55’s. Wasn’t a lack of punch but more of a swinging out too wide in corners type heavy - like it was carrying too much momentum. I usually fly hotter motors than these and I think it was behaving this way from slower prop speeds - so I increased how much blade I had giving me more bite.


#50

Problems I felt with whatever previous tune that was still loaded on my scisky (this is not tuning from scratch - this is adjusting in from a bad tune):
I term wind up - in hard maneuvers that didn’t end fast enough - eventually it would just fall out of the maneuver. I term was accumulating error - didn’t have the authority to correct - so it accumulated more until it unloaded on me.
Correction - this can be because I is too low or because P is too low. (D if too low will promote P oscillation - that’s error on both sides of the target that doesn’t wind up) - so my I values seemed reasonable but I started raising them. It just unloaded “I wind up” in smaller amounts but more frequently. So I cranked up P.
Next problem was propwash - the 65’s don’t spin up or down as fast as the 55’s did - and in my opinion this characteristic is what causes poor handling of prop wash. (If you flew back before damped light - you know what what a difference this made to handling because we could change the speed of our props faster to dynamic situations). Prop wash is usually tamed by D. But I have have a personal rule that once my D has to be increased to the same value as my P- if the behavior isn’t cured yet - I then raise P and D together. Usually this will beat whatever bad prop wash scenarios I encounter. But it’s also creating pretty high D which can make for sluggish response - so once I beat the bad behavior - I start dropping D back down by itself to find the point where sharp inputs on the sticks feel right.

So if you look close at the two examples above - “I term wind up” and bad prop wash handling - they are usually associated with I and D values…but you can see where I used them to help me see that my P was too low in both cases. (if I explained it well)


#51

The last problem I fixed was a horrible nose up on throttle punches. My I value felt great for everything but this … and already seemed like it was on the high end. This is caused by an imbalance in available thrust from cheapo or damaged motors.
Betaflight 3.16 has a value that you can access through the cli called anti gravity gain. Watch the video below to understand what’s it’s doing… my rig took a gain value of 7 to lock in solid catching itself from drops, flips, stalls - anything that requires a quick blast of the throttle. It’s tricky to know when you need this - you have to watch for a repetitive behavior indicating thrust imbalance and not another tuning problem. Ie … flip both ways and make sure it’s not bounceback. It’s really nice to have this feature … worth an update if you are suffering from motor imbalance.


#52

So the tune feels 90% at this point… just for fun - tomorrow I’m going to attack filtering as a potential source of latency in the system. Filters can cause bigger delays than loop time - and I wonder how much I’ll be able to “feel” the difference. Our tiny brushed motors do not have the power of larger brushless systems to be able to introduce vibrations of the same magnitude. I bet betaflight defaults a leave some room for improvement on our brushed quads.

Side note - currently sampling gyro at 2.67k and pid update at 1.33. I could also run 1.67 on both but lose the advantage of oversampling the gyro to increase the nyquist frequency at the gain of eliminating a very small amount of delay. Does anyone think I should bump up the loop time and down the gyro instead?


#53

I can relate to this… a fresh, uncrashed set of motors is optimal for finding that PERFECT tune… after 10 packs of trying to dial in a tune I noticed a motor was going weak and causing the issues I was dealing with… swapped to a fresh set of motors, and completed the tune. lol

Thanks for posting that video, I will absolutely look into that… it sounds like a fantastic feature to have.


#54

So I’m going to test fly different filter settings starting tonight. First filter to go after is d term filtering. Our brushed micros have no active braking and as such, require larger d values to resist fast changes applied by P. With D filtering, we offset the location of D relative to P and therefore reduce its effectiveness. Maybe even causing us to overshoot the correct amount of D without filtering or amplifying the effect of d term latency because of our larger d values. So tonight’s test will be no low pass and no notch. Will it fly better? Will it show signs of an over active D term? If so, will it fly better than it did with filtering once it’s turned down?


#55

If improvement can be made here, gyro filters are next on the menu. This shouldn’t affect tune like d filtering, but should just create less delay in information getting to the pid loop - allowing it to do its job better - like having a faster looptime.

Maybe all these things just sound good in theory and the delays are so small that I won’t be able to tell, or maybe brushed micros do create the same problematic vibrations as brushless quads the betaflight developed the filtering for. Without a definitive answer out there - I guess I’ll just have to try it and trust the seat of my pants feel.


#56

@NotFastEnuf - Is the only way to do this is with a blackbox/sdcard? I really want to play with the filters but have no way of diagnosing any vibrations or noise…


#57

To set up notch filters correctly - yes. But defaults are pretty good for most brushless systems. Unfortunately I have never seen traces from a brushed quad … so I’m experimenting.
My first test was all d term filteting disabled. With a pretty well tuned copter (on previous defaults) it flew worse like this. There was a really low frequency lumbering oscillation on slow decents into prop wash, and the same sort of thing throwing it into hard 180 corners. Next pack I flew - I restored the defaults and it’s back to locked in.


#58

More batteries charging now, but it just felt like D was too high with filters disabled. I want to try turning it off again and cutting my D in half.

As for gyro filters … at this point with betaflight, they are all software filters with minimum latency. I don’t think there is much to gain there, especially with the speeds that f3 boards run at. In other words, f3 low looptimes + latency from software filtering gyro = still probably faster than f1 boards.
But d term filtering is throwing our D out of sync with P and causing us (this is just my opinion) to need higher d gains than we should to tame P oscillations.

In my current tune with D filtering on - I am right on the edge of some fast P type oscillations in the hardest of maneuvers. When I turned filtering completely off - it flew like it was way overloaded on d gain - easy to produce slow worbely oscillations. More to come…

This is a scisky f1 I’m flying hence the looking hard for a performance edge so I don’t feel tempted to buy new stuff…


#59

Do you follow Boris’ Betaflight thread on RCGroups? There’s a lot of discussion on the workings of the filters and their affects in real time latency. It gets pretty complex but I think you might enjoy it :wink:


#60

That’s a great suggestion … not super closely but I do check in from time to time. I probably should participate more but I feel kind of like a black sheep in the room trying to adapt all of the hard work and experimentation getting high powered brushless quads to fly on rails to my little brushed motors. Haha