I’ve incorporated my version in 3.4.6 which is what Chris has been flying in his FBL 500. However he’s got some magical powers where by he didn’t have any bad oscillations. So he didn’t need that capability. Since I have not seen the new filter scheme that Leonard was working on come out, I am working on a notch filter scheme that only affects the gyro signal. This should help for aircraft where the oscillation is lower between 3-5 hz. And of course it will help for higher frequencies too. I’ve got it coded into 3.4 but haven’t flown it. My X3 is still down for maintenance. what frequency have you seen you oscillations at? My current notch might be able to help.
Not magical powers. I just setup my helicopter with much slower mechanical rates to try to make it more stable. I was able to get the P gains up to .19 in the rate controller. But it didn’t work long term because the helicopter became twitchy and unstable when I tried to fly it faster on auto flights. At anything below that it never oscillates. But I’ve also failed to get it as stable as it was with the flybar on it. I got some really good video from that little 500 with a solid mounted camera with the flybar on it. I have never to this day managed to get it stable enough to shoot good video with it with a FBL head. It’s really close, but not quite there, and I doubt it ever will be because I’ve run out of things to try to tune on it.
So an update… I have still not tried AltHold or Loiter. That is for the next set of packs another day. Im going to upload a Param file and .bin and it would be awesome if someone could take a look before i flip the magic switch…
That being said, in wind, no wind, doesent matter it flies awesome now. Tweaked here, tweaked there and kind of forgot about numbers and went up and down with the values until it felt good.
It holds a “rock solid” hover now, with no to little wind it sits there like its in gps hold already. Im impressed to say the least. Very very stable when it does get windy.
I tried some forward circuits and backwards circuits of varying speeds and it seemed quite good. When i tip the cyclic forward it just leans in and speeds up very smoothly, and counter correcting leads to a nice slow stop with no more shuddering or tail bobbing.
Keep in mind, ive been dialing the headspeed back with each flight to get it where i had it before when carrying the gimbal and even with headspeed lower than it was before when i was getting the tail bob, its smooth and steady. Quite remarkable to me anyways considering how it was doing before. Im impressed.
Im now very excited to get the gimbal on it and see how it fares with the extra mass of the gimbal+equip and 2 more packs.
With the headspeed drops im now back to 8-9 minutes with 3.85 left in the packs at resting voltage, so i could push some more out when working, and this is with very little forward flight, so with that added in im guessing 10-12min on 2 packs and 15-20 with 4 packs and the gimbal. Which is roughly where i was before with the system.
As it all sits, im happy with my decesion to use Pixhawk as its now turning into a very well flying controller.
Tim
Bill,
I will look at the logs and see if i can decipher that, what i do know it that even at 4hz, if i get up close to .09 in P gain, it ossicilates with every little move. At 20 hz its lower than that before it goes to pot.
I suppose it would be nice to employ a filter to get higher P gains as im sure the system would benifet. As i said, it does fly quite nice now compared to before, but there is always room for improvement. Im starting to build confidence in the system, as im going to strap alot of camera gear on it, more is better.
Tim
Those should be my last 3 flights of the day and the parameters as they were flown. I’m looking to try Loiter and AltHold next?
Tim
When you go to the altitude controlled flight modes now, the ACCEL_Z_P param that we set back at the beginning to 0.3 will come into play. It determines how fast the collective reacts to hold altitude. Just like tuning the rate PID’s, if it’s too high it will make your collective bounce up and down. So kind of watch that, and the best place to test it is in fairly good wind where the heli goes in and out of ETL in hover. If it seems to vary a lot in altitude, then turn ACCEL_Z_P up a bit. If the helicopter starts to bounce, then turn it down.
The suggested setting I gave you for that is .05 below where I run my bigger helicopters.
On this filter thing, Bill and I don’t agree on that. I’m not totally sure how that interacts with the Loiter controller, but I couldn’t get my DFC helicopter to track the ground track right on auto missions with it set that low. The helicopter would come to a stop, fly sideways a bit to get back on the track, then go again. I don’t know the technical reasons behind it, but after fiddling with it for several days I turned that up to 20 to see what it did. Then set it to 2 to see what it did. I went ahhhhh… I set it to 10 and flew an auto flight and it was fine. But after further tuning flying higher speed auto flights I set the roll to 13. But that may not apply to all helicopters or conditions. Maybe yours will work fine. But when I looked at my logs it looked like the autopilot wanted to make faster, more accurate and more frequent corrections than a human pilot would do. And it wasn’t being allowed to do it, so it would miss a waypoint and then backtrack.
The moral the story is that what you see in hover is not what you get in forward flight. Especially when you start pushing up the speed.
That param doesn’t make any difference for flybar and I just leave at the default of 20 for those.
Chris,
Thanks for the response. I am just trying to make sure my shoes are tied before i go for a run… If that makes sence? I’m just now starting to get a very small grasp on how the different parameters effect flight, and as you just pointed out, that can go out the window as soon as the controller is completely in charge with auto missions, so just being very cautious. There is no cheap, or safe way to crash an 800 unfortunately, and all risk aside, it usually pays to be thorough.
I have no idea the effects of increasing the filter to a different value, if i hit a roadblock with unwanted behavior like what you have described, ill have to revisit it i guess.
Tim
I don’t really know either. Your helicopter might be totally different. You just have to try it. The same setings don’t work with every one. I just know that in auto the autopilot does not do well flying a slug. It’s kind of like a student pilot learning how to fly. First they learn to hover. But that doesn’t mean they know how to fly it.
Chris,
I believe we have helped others where I recommended a FILT value of 4 hz. They were able to increase there P gain and achieved good loiter results. Certainly Tim could try backing off on P gain and going to FILT of 10 hz and try to tune that way. It would be interesting to see if he could get acceptable loiter results that way. I’d imagine he would have to bring up the I gain more and D gain if he can get more out of that. I agree that the crontroller can make inputs faster than a human and too low of a FILT value could affect the loiter/auto performance. That’s why I don’t recommend values lower than 4 hz but I don’t have any data on if that affects loiter performance. In your case you did not have any oscillation problems.
Bill, that’s true. I looked at Tim’s latest parameters and I think he’s tuned a bit “soft” on P gain for the amount of feedforward he has. Remember when we did the tuning on my FBL the first time I made the same mistake? Tried it in Loiter and it seemed really good. Tried an Auto flight and didn’t even make it to the second waypoint.
I had that flybar “feel” with my setup but it wasn’t crisp enough for the autopilot. And that sent me on a one month tweaking adventure to make it actually work, and frankly, I’m using expo in my radio these days in Stabilize flight mode to get it so I like it for manual flying.
So I think Tim should just try it. It’s not going to just crash. The worst it will do is be a bit sloppy in hitting waypoints and making turns and trying that first auto landing to see if it can actually do it. You can always bail out if you have a basically flyable helicoper in Stabilize. It’s possible Tim’s much larger helicopter will be fine. They’re not all the same.
Bill, maybe you can correct me on this, but I think Tim could just set that at 10 and try flying it and I don’t think he’ll notice any difference? I don’t think a human pilot, unless flying 3D with very rapid full stick aileron, is making control inputs that fast. But the autopilot does. That was kind of my thinking on it. I know the autopilot will perform better if it can run that loop faster.
It would be a simple matter of setting just those two params for pitch and roll, try it and see if it has any different “feel” or stability for Tim without changing anything else. If it doesn’t leave it there for the autopilot to use. If there is a change trying it, or the heli seems more twitchy, then set it back to 4 and try it with the rest of the current rate settings before getting too excited about a retune.
Maybe I’m wrong on my thinking of how that works. It would be nice to see Tim have a successful first auto test flight with it. I’ve flown hundreds of auto flights and know what to watch for. For somebody who’s never done it it can be kind of nerve wracking the first time watching an autopilot fly your $3,000 helicopter.
Thanks for the feedback. The helicopter now “feels” good, but that doesnet mean its actually good in terns of autopilot ability i guess?
Should i back off VFF a tad, swap to 10hz and try to get P up a bit more? I looked through quite a few of the logs and following Bill’s method for frequency, i come up with alot of repeating 5hz patterns? I certainly could be mistaken though?
It seems to do okay as it is in forward flight, i only had the space to get to 40-50mph or so before hitting the brakes. I also did the same run in reverse for backwards flight and it flew as expected.
Its hard to get a really good feel for it as its limited I’m assuming by the accellerometers to only so mant degres of bank angle. All i do know is it doesent seem to suffer from slow behavior, when i jab the sticks hard it banks down very quickly and if i rock it back and forth quickly it does it quite crisply and i can get the blades to “bark” not unlike any of my 3d machines, its just limited to X degrees of bank
I guess it would just be easier if the Pixhawk flies good auto missions the way it is set up now, but I’m fully expecting further tuning.
A thought, so ive heard from many sources Pixhawk tends to get swamped with 3d flight, like flips and rolls tic tocs or whatnot, so i was thinking. In “stabilize” it is using accellerometers, and gyros if i understand correcrly? Does it use them in every flight mode? What im getting at is this, at times the EKF blows up for X reason and as Chris points out, with a flybar its not an issue because the flybar stabilizes it and you can fly around manually without issue.
Im drawing off my FBL experience and this is what ive found, all but 2 of the newest ones suffer from the accelerometers losing their orientation in hard 3d flight, but its a non issue as you can just flip out of the bailout or stabilized mode and fly manually on gyros alone.
Could Pixhawk be setup to revert to using “only the gyros” if other sensors get swamped? I guess that would equate to a manual mode as i assume if it acts like other controllers in that mode of operation you have to be able to actively pilot it as their are no bank angle limits or self leveling etc.
Is that what acro is supposed to be? Or does every mode with pixhawk use accels?
Keep in mind i have no desire to use Pixhawk for 3d personally, i think its more of a what happens if a bearing lets go in the air and starts producing alot of vibrations that confuse Pixhawks accels or something to that effect? A gyro only mode that requires manual piloting would be a good failsafe i think? Or does this already exist within Pixhawk?
Tim
My point of pulling back the P gain before raising the FILT parameter to 10 hz is to keep the aircraft from getting bad oscillations. I hate for him to just change it to 10 hz and have an Oh Crap moment because its oscillating so badly. Just want him to be careful when changing the FILT parameter especially if he is using it to attenuate oscillations for higher P gain.
Bill, i dont know if you have time to look, or have looked at the latest logs, but im wondering if 5hz is indeed where im having problems? And if so then without a notch filter the best i can hope to do is keep it a 4hz to alleviate?
Tim
As you’ve said, you can’t get the P gain as high as you did with FILT at 4. So going to FILT = 10 will not help getting a higher P gain. The reason FILT =4 is helping you is the fact that your oscillatory frequencies are above 4 hz. If you set FILT to 10 hz, it would have very little, if any, affect on a bad oscillation at 5 hz. Remember that FILT is the Frequency below which the low pass filter is allowing to pass through. Now it is not a direct cut off at the FILT frequency. It’s attenuation effect ramps up as the frequencies go beyond the cut off frequency. [quote=“timbaconheli, post:536, topic:16800”]
A thought, so ive heard from many sources Pixhawk tends to get swamped with 3d flight, like flips and rolls tic tocs or whatnot, so i was thinking. In “stabilize” it is using accellerometers, and gyros if i understand correcrly? Does it use them in every flight mode? What im getting at is this, at times the EKF blows up for X reason and as Chris points out, with a flybar its not an issue because the flybar stabilizes it and you can fly around manually without issue.
[/quote]
So the EKF uses accelerometers and possibly gyros too to determine attitude. And yes it is using attitude to control the aircraft in every mode because everything goes through the attitude controller (for Flybar_mode=0). So if the EKF blows up then there is not much you can do. The only way you might be able to save your heli would be to tune it with the ATC_ANG_ PIT_P and ATC_ANG_RLL_P to zero. This will cause the attitude controller to rely more heavily on the PID rate controller to capture the attitude in all modes but if the attitude solution is lost, it would allow you to switch to acro mode without the bad attitude solution impacting it. This was discussed some by Rob and Leondard in the unusual swashplate behavior topic.
I looked at some older ones last night. It appears the roll oscillation is around 5.5 hz. I have not seen a case where I could see a bad oscillation in pitch. You might have to raise that P gain by itself to see what the frequency is in pitch.
Bill,
Thanks for taking a look at the log. I will bump the P gain up on pitch and see if i can get an ossicilation to present itself there.
Im glad you also see the issue at 5.5hz and it confirms in looking at it the right way then. Is it possible to use your notch filter in 3.5? How is the filter profiled? A very tight V response or more of a parabola? Im farmiliar with audio filtering but not so much in other applications. So your notch will attenuate the target frequency and let everything else through correct? Is it possible to stack filters? Ergo, use a notch to stomp out the specific low frequency instability and use another filter to roll off everything above 20hz or similar?
I remember from my pro audio days though, stacking filtering lead to some unwanted effects, some of them quite weird and unexpected. Would the Pixhawk behave similarly?
I had a conversation with someone who is part of the FBL design world and although he would give no specifics, he confirmed getting good behavior from thier units came down to well designed filtering. I have a unit im using from that company, and as a test i put on some severly unbalanced tail blades on one of my beater helis and it vibrated like crazy, the tail was a blur. I tried to take off and it ossicilated like crazy on all axis, keep in mind with a good tail this heli flew awesome. I put it down and got into the FBL unit and ticked the box for “advanced signal processing” and tried again. It flew awesome again even though it was vibrating like an aerial construction compacter. It also had no issues with reaponse, felt just as crisp as it did before. I checked the vibe logs and the entire flight was above the “clipping” threshold, it looked like a big fat solid line vs a graph with peaks and valleys, it was swamped, but still flew great.
This tells me that their success comes down to some fancy filtering, which as i said, they hold onto withan iron grip. The FBL in this test was mounted with one layer of VHB tape and it was strapped down with a velcro strap.
From my understanding, pretty much every flight controller available uses the same basic sensors, so performance comes down to software/firmware and how well it is designed.
So in short, im more than interested in attempting to implement a notch filter, in theory it sounds like what the doctors ordered?
Im assuming the instability im having is somehow related to vibrations and turing them into a feeback loop? Am i right with that thought, or way off base?
What are my other choices? Moving the controller, or attempting to change the frequency of the vibration profile?
I see Chris is a proponent of reducing the macanical rates of the heli and using that as a way of increasing the gain in the Pixhawk. Ive played around with that with other helis and seen the results of increasing or decreasing servo arm throw thereby changing the mechanical rates. With the way this Trex is set up, i would have to completely change the servo arrangement and go direct to swash and use shorter servo arms as im as far in on the Align arms as i can go with the push pull setup?
Anyways, im just thinking out loud here.
Tim