LibrePilot on a Trex 500E
« on: February 24, 2017, 05:30:17 pm »
I have a Trex 500E with flybar head that I bought on craigslist for $125.  It was crashed and have it back flying again after putting $75 of parts in it. I'd like to try LibrePilot in it and was wondering what the issue is with LibrePilot flying flybar type heads?  The PX4 can do flybar with Copter 3.3.3 by turning off the internal damping loop in the parameters. I like the small size of the various LibrePilot boards.  Finding a good place to mount a FC on a heli is challenging.  The Pixhawk is too big and mounting it underneath by the motor and ESC is not a good option. Mounting it on the top of the tail drive case in back of the rotor head is more ideal - except for the size.

So - if I'd try LibrePilot and maybe a Revo what should I be looking out for to try to fly a flybar head with it?  I've done some coding in the past and possibly with some mods to the code I could make it work and contribute that to the codebase. I suspect the problem is the PID rate loops and over-correcting with a flybar head - combining a mechanical stabilizer with software stabilizer and the software doesn't know why the heli refuses to respond in the way it thinks it should. But that's just a guess.  The only real difference between flybar and FBL or DFC is the responsiveness of the control inputs to the swash, and the corrections that are needed to stabilize it.  So I see no reason why an autopilot should not be able to fly a flybar head, which is inherently more mechanically stable than a FBL or DFC. It may be a simple matter of "freezing" the PID rate in LibrePilot for a flybar head so the flybar can do what it does without interference.

Looking for some general input on what to expect before I'd try it. Don't have a lot of money in my rebuilt 500, so if I crash it a few times trying to sort it out, no big deal.

daveapplemotors

  • *
  • 245
  • Helis rule
Re: LibrePilot on a Trex 500E
« Reply #1 on: February 24, 2017, 06:03:54 pm »
I like your thinking.

You can test your theory quickly by setting up 2 or 3 flight modes. You can have tiny PIDs in one mode and change to other modes --midair if you like!--with one or two TX switches. I think you are correct thinkging to be able to turn outer loop controls way down or all the way off to let the flybar correct.

Why don't you just use a FBL head? Aren't they pretty cheap now?

Worst case is that you will have a really good tail gyro... 
Happy Landings!

Re: LibrePilot on a Trex 500E
« Reply #2 on: February 24, 2017, 10:06:20 pm »
I believe that the difference between flybar and flybarless in LP is just a matter of tuning the PIDs differently.

LP needs more dedicated souls to work with helis.  Most people here fly multis.  I've actually got some nitro and electric helis from years (OK decades in some cases) past, some new-in-the-box that I intend to get back out, but there is always some other project that has my attention.   ::)

Talking about it makes me want to put together my Kyosho Concept 30 SE and OS 32 that are brand new...   ;D

Re: LibrePilot on a Trex 500E
« Reply #3 on: February 24, 2017, 11:27:02 pm »
What I suspect is that the problem is with the integral gain in the PID rate controller, and not with the proportional. Say the heli drifts one way or another. The P gain is going to correct for it immediately, which it should, and the rate controller will determine how fast things get done.  But the integral gain for longer term correction will over-correct if the heli doesn't come back to where the FC "thinks" it should be in the right amount of time.

On the heli end, mechanically, it tips the swashplate in the direction of needed correction.  And the flybar dampens it so it's stable and smooth. The Integrator in the PID loop doesn't like that because that's what it's supposed to do is stabilize it over time.

I surmise that can be the only real conflict.  I'm not familiar with the dev history on LP for heli's and what it's been tested on, and what not.  But if it's been developed on FBL and just not recommended for flybar because it hasn't been tested and tweaked, why not try it?

Yeah, DFC or FBL heads are cheap enough these days. But I like flybar heads because they are mechanically stable and easy to fly. FBL is fly-by-wire only, and way harder on servos.

Re: LibrePilot on a Trex 500E
« Reply #4 on: February 25, 2017, 06:58:34 am »
If I'm not mistaken, P and I work the same and they both tolerate it coming back too slowly (gain too low) by feeling slow to react and mushy or not holding an angle.  It's when the gain is too high and it corrects too quickly that it over corrects and oscillates.

As for the flybar damping the response and that causing an issue, I believe that is equivalent to using slow ESCs.  You just have to reduce the PID and it won't feel as locked in.  :)

Re: LibrePilot on a Trex 500E
« Reply #5 on: February 25, 2017, 08:19:08 am »
I've decided I'm going to try it. I have a Revo board I was going to put in a TriPlane at one point and I never did. That aircraft ended up with a Pixhawk in it. I've been looking for something to use that Revo board for, and this Trex 500E is it   :)

karla

  • *****
  • 629
Re: LibrePilot on a Trex 500E
« Reply #6 on: February 26, 2017, 04:28:23 am »
I've decided I'm going to try it. ...
I've been looking for something to use that Revo board for, and this Trex 500E is it   :)

Good decision Chris :)
I also like they way a Heli fly with a flybar. Tuning PIDs for Helis is a manual procedure anyway here at LP (no autotune like for multi rotors). I have done plenty of manual PID tuning on 250 and 450 size Helis but all of them on Flybarless rotor heads. So have others here I think.

There is a unique stabilizing mode in LibrePilot I particularly like, called VirtualBar. Its different from Rate mode but somewhat mysterious in that it has limited documentation. However, it feels much more like a Fbar heli than just using Rate mode.

I was just thinking... If you are pleased with adding the LP flight controller, then I think next step is to just take away the flybar from your rotor head and retune the PIDs. It will save energy to take it out, longer fly time, more power for your flight.

Will be great to hear how things develop!
Good luck

Re: LibrePilot on a Trex 500E
« Reply #7 on: February 27, 2017, 08:07:06 am »
I flew the Trex 500 today with the Revo board and nothing bad happened. The handling seemed, if anything, a bit sluggish, but I had my heavier flybar paddles on it too. The Revo board definitely takes some of the work out of hovering. I flew in close for maybe 5-6 minutes, then took the heli out over the field and did a couple figure 8's it, which went well.

Frankly, I can't see much difference in the way the Trex 500 handles in forward flight. In hover, the board does its job very well. I don't fly 3D and mostly like scale and some sport flying. So anyway, it works and no unpleasant surprises. Next flight I will try some PID tuning, as right now I have gains quite low.

Yes, I could convert to FBL head, but why?  Flybar is like power steering on the cyclic and takes a lot of load off the servos. IMO the only thing FBL and DFC is good for is smack 3D because they're quicker. My 500 flybar will fly for 20 minutes with a 6S 3300 65C in it if I keep the headspeed down to 2,100.  If I'd drop to a 4S 10,000 so the motor and ESC could run a little more efficient at higher throttle curve I could probalby get 25 minutes out of it in normal flying. With the 6S my throttle curve is only 45% power at mid-stick and goes flat at 55% and max 9 deg collective.

So anyway, it works. Next nice day I'll do a little tuning but the way it worked out of the box was actually pretty impressive :-)

Re: LibrePilot on a Trex 500E
« Reply #8 on: March 01, 2020, 11:53:36 pm »
I flew the Trex 500 today with the Revo board and nothing bad happened. The handling seemed, if anything, a bit sluggish, but I had my heavier flybar paddles on it too. The Revo board definitely takes some of the work out of hovering. I flew in close for maybe 5-6 minutes, then took the heli out over the field and did a couple figure 8's it, which went well.

Frankly, I can't see much difference in the way the Trex 500 handles in forward flight. In hover, the board does its job very well. I don't fly 3D and mostly like scale and some sport flying. So anyway, it works and no unpleasant surprises. Next flight I will try some PID tuning, as right now I have gains quite low.

Yes, I could convert to FBL head, but why?  Flybar is like power steering on the cyclic and takes a lot of load off the servos. IMO the only thing FBL and DFC is good for is smack 3D because they're quicker. My 500 flybar will fly for 20 minutes with a 6S 3300 65C in it if I keep the headspeed down to 2,100.  If I'd drop to a 4S 10,000 so the motor and ESC could run a little more efficient at higher throttle curve I could probalby get 25 minutes out of it in normal flying. With the 6S my throttle curve is only 45% power at mid-stick and goes flat at 55% and max 9 deg collective.

So anyway, it works. Next nice day I'll do a little tuning but the way it worked out of the box was actually pretty impressive :-)

What PID values do you have in the TREX 500?
I need to lower the pid but I'm afraid to run out of control.

Re: LibrePilot on a Trex 500E
« Reply #9 on: March 02, 2020, 06:57:34 am »
I'm making an educated guess here.  I don't have any helis with FC's yet.

My guess is that you want to have as quick a flybar as possible when you put a flight controller on your heli.  Flybar weights all the way in or completely removed.  Then you will want to retune your PIDs a lot higher.  This should give a much more locked in feel.

A heavy flybar with a flight controller is slow to respond, not well stabilized, mushy.

Once you set it up with a quick flybar, if you want it slower and smoother, you can reduce your roll and pitch roll rates, degrees per second (Rate Mode Response and Max Rate Limit).
« Last Edit: March 02, 2020, 07:02:10 am by TheOtherCliff »