Hmm, okay that makes sense. As for terrain issues, i suppose some more sensors and a companion computer could be implemented. Ive seen some pretty amazing stuff done with 3d cameras lately and the pocket sized supercomputers.
Tim
Sounds good Tim. I look forward to seeing your results. What was your feedback instabiility freq in pitch? Just remember that there is a limit to how much additional P gain you will get before you start seeing oscillations at either 1.5 hz higher or lower than the notch frequency. But hopefully you can get the P gain high enough to see good results.
Tim, hereâs what too much rate P looks like in the roll axis. Friend of mine tuning his Trex 550 with a Pixhawk in it.
https://drive.google.com/open?id=0B3XDEEzynlG1VVM5Z0w3cXdNS3c
Chris,
Yeah, definatly seen that. It takes a fair amount of P before i get to that, roughly 60-75% more P gain than I have. The problem I am having is the weird little instabilites that pop up and the only way to get rid of them is to pull P gain way down to .038 to .04. What im hoping for is the filter to get rid of that narrow band of instability so i can run the P gain closer to .1 at least. I can run .1 now, and the heli indeed feels more locked im, i just have wobbles with all but the finest control inputs and wind gusts induce them as well. Heck, in a hover when i adjust collective pitch the wobble pops up at specific pitch.
So in inplementing the filter, i have a feeling i can get things balanced better. I know now, and throughout tuning it just doesent feel like its locked in, it has flown okay at times, but never as solid as I would like. Hence me still tweaking it.
If this were my goblin 700 and I was tuning say a regular old FBL, my gut would tell me to add in more head gain. So thats part of my logic here I guess. I understand its not apples to apples. One system is designed for 3D flight and the other for UAS type work and auto missions, but I wonder if at the core some of the same mechanics are at play. So although im not shooting for super high P gain, or any other gain for that matter, to me it feels like it needs a bit more head gain if that makes sense?
Tim
Tim, the only FBL units Iâm familiar with at all is the Align ones running BeastX. But yeah, I think they use basically the same type of system.
Actually I donât know that the number you end up with for P gain makes that much difference? Because you can tune your rate P for say 21mm servo throw. And the heli will fly fine but be really twitchy. Shorten the servo throw to say 17mm, and now you can run more P gain and it will likely be less twitchy - same helicopter, same servos, just different mechanical rate. So shooting for a particular number on P gain is like a giant guess. Itâs all in how fast the heli responds to the rate command. Thatâs what really counts, and different helicopters and mechanical setups will require different settings.
Bill,
I looked through many logs and I keep seeing a reoccurring pattern of between 3 and 4hz on the pitch axis. So it comes in a bit lower on pitch than roll. I guess that makes sense as it dampened more on the pitch axis because of the tail and CG differences?
So I read through your detailed instructions and it all seems to make sense. Hopefully the filter will target the instabilities vs just rolling everything off the top like it does now.
-A question, since the instabilities seem to be quite low on the spectrum, will setting the filter at 3hz Pitch and 5hz Roll cause issues with control? I seem to remember it being noted that setting the standard filter lower than 4hz could possibly affect pilot controls?
Thanks,
Tim
Chris,
I am definitely not still shooting for say, .2 on the P gains anymore. Now that I am a bit more comfortable with the system I have a better feel of whatâs going on.
Let me see if I can explain my thoughts correctly. Please excuse the FBL reference, it just what I know and have worked with many so itâs a good benchmark for me.
- Say I am tuning my new Goblin 700 with a Spirit Pro⌠Ive set up the system and gone with middle road gains. Now I start to bring up the cyclic gain until I see ossicilations and back it off a couple points, not unlike what iâm doing with the Pixhawk. Now the heli feels locked in, but, I have a bounce on the pitch axis. Now if I just drop the head gain down quite a bit, the bounce goes away but the heli is not nearly as locked in.
What I do now is leave the gain where it is and go into the software and employ the âElevator Filterâ. Now the bounce is gone and I still have that locked in feel from having the gain a bit higher. I have no way of knowing what sort of filtering they are using, and everyone is so tight lipped about their firmware I will likely never know. I understand that I guess as you just have to look to something like the KBAR that was a direct ripoff of the VBAR, firmware and all, to see why they are so tight lipped about their filtering schemes. One thing is for certain is that it is all coming down to firmware and filtering of the signal. Newer units are using the same sensors that something like the Pixhawk Is using so the playing field is pretty level, as I have said before it is all coming down to their firmware and how well they execute it. - Example 2 goes like this, I had a vibration prone helicopter. It was off the charts so no matter what I did I would have unwanted tendencies if I tried raising the cyclic gain to a reasonable level. I go in the software and select âadvanced signal processingâ and viola, I can now raise the gain by 50% and have a locked in helicopter regardless of sensor saturation because of the terrible vibes. I would absolutely love to know what they are doing the filter the signal, as I am certain it could be used to great effect with Pixhawk.
I am not looking to have my UAS feel anything like my 3D helicopters, in fact I want it to feel the opposite, but all that aside I also donât believe I am anywhere close to where should be with P gain. It just doesnât feel like I am totally in control when flying it, it has a mushiness to it. The VFF will definitely sharpen up the response of the helicopter, but it just doesnât feel like its locked in with high VFF and low P gains. Nothing about my helicopter feels smooth. I am quite smooth with my control inputs, I donât jab the sticks, but it feels like the helicopter is jumpy and not dampened at all. I have High I gain and some D in there, but I am starting to think a lot of my issue has to do with such a small P value.
I played around with a disposable quad recently. I set the gain values of P I and D to sort of mimic what I have on my helicopter and although they are two very different airframes, I found I had the same type of control response with High I, and low P and D. I am not well enough versed to look at the data and compare the results in a meaningful way so I have to base this all of feel, but I can say for sure similar setting I had on that little quad with the PIDâs resulted in that same âtightened up rubber bandâ feel⌠Just nothing smooth about it, no feeling of control. It just plain feels unbalanced if that makes sense?
I truly believe better filtering will allow Pixhawk to perform far better with traditional helicopters and soon I will see if a notch filter Improves things. I just donât like the fact that there is such a wide gap between when small instabilities start and when the big P gain oscillations pop up.
Tim
I wouldnât recommend lower than 4 hz for the FILT param. I would set the notch much below 4 either because the width attenuates freq slightly lower. Sorry I havenât responded sooner. I have a pretty busy day at work hosting visitors.
Well, âlocked inâ is not really an engineering term. Itâs a subjective âfeelâ that may be different, given two different pilots.
Another thought I had on your fight with wobbles is, what is your disc loading? I suspect with your 800 stretch mod it may be quite low? Like less than 0.6 lb/ft^2? That is going to affect how âtwitchyâ and stable it is. Having a bigger disc does not mean better stability if it has low loading. Comparison in UAV heliâs, my 700 has a takeoff weight of 21.2 lbs full of fuel. Or like Robâs Procyon heli I believe has a takeoff weight of around 25 lbs with a 800 rotor. Even my little 500 has a takeoff weight of 7.1 lbs. Iâm guessing youâre at less than 15lbs with two batteries in it?
Tim, hereâs a couple more params you can play with
ATC_ACCEL_P_MAX
ATC_ACCEL_R_MAX
ATC_ACCEL_Y_MAX
These set the acceleration limits in pitch, roll and yaw. For my bigger flybar that I want to handle very smoothly without jerky movements and be silk smooth on runs, Iâll set those down to around 90000 for pitch and 80000 for roll. Smaller heliâs like my 600 Iâll leave them at default. Even smaller heliâs can use more yet because theyâre spinning less disc mass, but I think I have them set at default for my 500.
I had understood that your helicopter was too responsive and you were using more expo in the radio than ever before and it was still too responsive. But now, with your new settings itâs âmushyâ and not âlocked inâ. Since I donât know exactly what youâre trying to do or set to get those two extremes, I can only point out those params as being fairly important. For a big heli you want it slower and not jerky. For your stretch mod I suspect you got way too much rotor area for the loading, so slowing those down (assuming the âtwitchinessâ you described) is what to do. For your now âmushyâ feeling, turn them up a bit. It will allow the attitude controller to use the proper acceleration in the various axis to make its corrections.
This would be sort of similar to the âhead gainâ you were talking about. How much acceleration is it allowed to use when hitting a pitch or roll target. If itâs allowed to use a lot, it should be fairly explanatory as to what the results would be with a large disc spinning a lot of mass.
Bill,
Thanks for the reply, I will keep the filter above 4hz. I wonder if upping the head-speed a bit will raise the frequency of instability?
Tim
Itâs possible but i didnât see much change for my heli when I changed head speed, at least nothing significant. I donât know if stiffening the pixhawk mounting plate might change the freq. sorry I donât have better answers for this. I lucked out and had both freq above 5 hz
Chris,
I agree âlocked inâ is not an engineering term and is subjective in nature. That being said, feel aside, based on my experience it is acting like there is not enough gain. It, as I stated, is rubber band like and doesnât make authoritative movements, its just mushy. Alot of hunting for where it need to be, which I guess is evident when looking at the desired vs actual in the logs? Higher P gain brings the graphs closer together when I look at the comparisons based on changes in P gain Iâve noticed. Iâm assuming within reason that is what I am trying to achieve, a good correlation between desired and actual?
As to disc loading? Without figures to back it up, Iâm gonna take a stab at it and say itâs low. Iâm guessing in the neighborhood of 13lbs AUW. Now when the gimbal is added that changes significantly. I estimate around 25-27lbs AUW once the camera gear, gimbal and extra batteries are added to the equation, and maybe more. I am going to have to re-weigh everything as I cannot find my old figuresâŚ
ATC_ACCEL_P_MAX etc, I will definitely look into those further once I get it fairly set with the P, I and D gains again after the filter implementation. Thanks again for the info Chris! Iâm sure eventually I will have a good flying platform here, just have to keep working at it. I donât know how much more time I will spend on it without the gimbal though as for the near future, that will be its primary mode of operation.
Tim
Yes. Itâs really âlocked inâ is a term I hear all the time from the 3D people. And I observe them with their âlocked inâ helicopter come in from a 5 minute flight, assuming theyâre not carrying it in a bag of busted parts, and they canât hover it in a 10 foot circle because itâs so âlocked inâ. So they just kinda cut it and plop it onto the ground.
Thatâs why I donât really understand what the term means.
I likely use the term differently than most, i agree 3D pilots use it as a way to describe how awesome their heli is. Lol. I personally use the term to describe a situation where the helicopter is responding to my inputs in a tight, clean manner with no bounce, wobble or over/under correction from the FBL or in this case, Pixhawk.
When I first start tuning a system and the gains are conservative, it just feels like the heli is all over the place and not stable at all. Once the tuning is done it just feels like it is flying on invisible railroad tracks provided whatever system its using has the capacity to provide that kind of flight.
As ive said before, ive used quite a few units now and âmostâ will get the job done, but are just impossible to tune well enough to become what I would consider âlocked inâ. They lack either the tune-ability to get rid of the bad tendencies or just plain have garbage firmware that doesent filter gyro noise well enough.
So I agree the term is over used and probably to foster the hype more than anything, i use it as a way to describe how well an FBL is performing desired vs actual without any other movements.
Currently my heli feels like im flying a melted stick of butter in the sky, in a hover it moves around and responds to stick commands in a non precise, sloppy manner. When flying fast it is no where near the ârail likeâ behavior im used to. No really bad tendencies, its just not locked in yet.
Tim
OK. Aways back you said the heli was so snappy that you were using more expo than ever in your radio and it still was too quick. So why not go back to those settings and then tweak whatâs wrong with it to get it to hit target attitude?
-
Set the FILT params up around 10. Fly it in stabilize and turn up the P gains on each axis until it shakes violently hovering a few inches off the ground. Back 'em off to where it donât shake.
-
Set the I gains at .35. Now, do you still have your tail bounce? Turn off the D gain on the pitch. Bounce still there? Ramp up the headspeed some.
-
Put it in Loiter and pull the logs out. Is actual now tracking desired? Does vibes look ok? Does the IMU aliasing look OK? Maybe tweak up the I gain a bit and set the leak rate. Adjust your AHRS trims, which I donât think youâve done yet. Set the ATC_ACCELâs to smooth it out so itâs not jerky. That should get it really âlocked inâ for the autopilot so it hit its target attitude without over-shoot.
-
How does it feel in Stabilize now? Too quick? Then just adjust the RC_FEEL for you to tame it down so itâs not so âlocked inâ. Not quite quick enough? Turn up the RC_FEEL to get it more âlocked inâ.
-
Now fly it auto. If it does a good flight, pull the logs. Look at all the same things you looked at from the Loiter test. Vibes, IMUâs, attitude tracking, rates, how well did it track the ground course. Doesnât quite track attitude in forward flight? Turn up the VFF. Now a little too responsive in Stabilize again? Adjust RC_FEEL as necessary. Everything you need to really get it accurate in actual flight is in those logs.
-
Now bring it back in and hang a cement block on it and fly it. How well does it handle the payload? Pretty sluggish? Ramp that headspeed up. Repeat the Loiter and Auto tests with the cement block hanging on it.
This is how I would approach tuning the thing. Your current state in the adventure is what Iâd call stalled. And in aviation, the word âstalledâ means it ainât gonna fly.
So a quick update on my progress. I managed to sneak in a few flights today, I set everything back to square one and started with P gain on the tuning knob, I gain at 0 and D gain at 0. Keep in mind I am now using firmware provided by Bill incorporating the Notch Filer.
For the first couple flights the standard filter was at 20hx on pitch and roll and the notch filter at 0hz.
I did a couple test hops turning up P gain until it oscillated. Needless to say, I did not get very far before it in-hinged. With the standard filter at 20hz I got to a P gain of .031 before it started to oscillate badly. I landed after a couple more attempts and checked the logs for instability frequency. I settled on the notch filter at 7hz for pitch and 5hz for roll. I then proceeded to bring up the P gain to .16 before even a wiggle on the head! I now have the I gain at .2 on both pitch and roll and will hopefully get in a few more flights to target the instability a bit better and settle on I gain values as well as a final P and D term.
Desired vs actual are following each other very closely now, there is just a blip here and there where they part ways but I will say the data matches what I am feeling in the air in that it is very precise in its movements now. I hate to use the termâŚlocked inâŚ(sighâŚ), but I will as it describes how the helicopter feels now. It responds to my commands and doesnât overshoot of produce sloppy wiggles. No more stick of melted butter. I will say I am genuinely impressed with how it feels in the air at this point. I am likely not going to go much if any higher with the P gain but think the instability issue was prohibiting me from getting my P term up to a reasonable level before the use of the filter. This represents a 75% raise in P gain with no negative tendencies, in fact its been the opposite.
Now I just need to collect some more data and finish tuning so I can try loiter and quite possibly an auto mission.
Tim
Tim,
Glad to hear you are getting good results with the notch. Did you keep your FILT param at 20? Just curious. You could possibly squeeze more P gain or guard against bad oscillations by putting the FILT at 4. I think initially as you expand the flight envelope with both piloted and autonomous flight, you might look at using that setting. Then as we gain confidence that no bad oscillations suddenly crop up we can back off on the FILT to may be 10 hz.
By the way what is the freq of the oscillations when they crop up again?
Remember the instability freq will change with the notch. Iâm not sure you will be able to target the notch any better. The instabilities you are seeing now are (I think) the side lobes of the notch. Not sure that is the right description. I donât think you will be able to capture those in the notch. I guess your I gain might affect the instability freq with the notch and might draw it lower. That is why when you were looking at the instability freq without the notch and with the super high I gain, it was lower. So I wouldnât play too much with the notch center freq. if anything you could lower it by 0.5 hz but I wouldnât play with it too much more.
Bill,
I just flew it again and I must say it feels pretty good. Roll is super tight, not even a hint of wiggle. Pitch, which has always been my problem axis has a bounce to it with hard inputs. As it sits now the frequency on pitch looks to be 4hz. But as you just noted, other settings change that. Without I gain or D gain it was easy to target where to put the notch as it was a very distinct oscillatory frequency, but since adding those in along with the notch filter it changed the frequency to the 4hz it is at now. It is not a strong oscillation, very weak, its more of a one-two bounce that runs its course on its own. The flight I just had was a brutal one for the helicopter Iâm sure. I literally tried to beat the snot out of it. I honestly felt 110% more confident it was not going to un-hinge after implementing these changes. It is a completely different helicopter and honestly does not feel much different than one of my well tuned 3D helis which is a stark difference from its behavior before.
I wonder if D term would help the bounce out on the Pitch axis? It was quite windy this eve, 20-25mph random gusts, and combined with the very sharp inputs I was making in opposing directions I thought for sure it would take off and build up a stronger oscillation, but it did not. Itâs just a bounce, once, maybe twice. Its just like when I am tuning a quad and I have to build up the D term to get rid of a bounce after a roll or something.
Six or one half dozen, I am genuinely impressed with the progress in just a couple flights. Now I just need a day at the field to really put some work in and finish this project off.
I will upload some logs tonight that will hopefully tell some of the story.
Tim