Starting PIDs and any other recommendations...
« on: September 01, 2019, 08:38:43 pm »
Hoping I can get a ball park set of PID's to get it close enough and not be too scary. I know all heli's are different, but I would think that settings for a 450 or 500 should get me closer. Heli is a Trex 470. Also, any other recommendations or changes that you see I might need.

I believe in giving as much info as possible....so here it comes.

My back ground so you know a little about me
- I'm pretty much a heli noob. I had a Blade CP nearly half a lifetime ago, but never got much stick time....then crashed it. I was out of the RC hobby for several years after that. About 5 years ago I got into multirotors. Started with DJI's, then moved to DIY. I can fly the snot out of those now, either stabilized or rate. I have 3 quads with CC3D's (one is the flying pig in my avatar...AKA Swine Flew), a quad with a Lumineer and a hexa with a Pixhawk. No problems with orientation in flight anymore.

Side bar - Yes, I designed and 3D printed the pig myself. Here's a video of the maiden voyage if you're interested. Sorta boring, but still....the pig is flying, lol.


I have practiced with Heli-X, lots and lots of hours. Can hover pretty stable (have practiced with high and low head speeds) right side up as well as inverted. Flip and roll in any direction...flip in, roll out etc. I configured Heli-X and my heli so the switches are the same (muscle/reaction memory training).

So, thankfully you're not dealing with a TOTAL noob.

Hardware/Software setup:

Heli = Trex 470LM
CC3D Atom mounted roughly centered below mainshaft. Upside down, so roll is 180 out. Mounting is double sided foam.
Align 470MX motor
Align BL50X ESC - Configuration = No brake, mid timing, high cutoff voltage protect, soft start w/governor enabled, quick throttle response
Align DS450M/DS455M servos running at 8.4v
6S
Taranis X9D Plus and X8R Rx
X8R<-->CC3D via Sbus


-Initial setup (heli and CC3D) seems OK. All controls and switches work as they should.
-Collective runs -12 to +12 degrees
-I'm starting with 50% head speed.
-Mode was/is all rate until tuning is better dialed and I feel OK with trying attitude and axis lock.
-Only working with settings bank 1 for the moment. After I get a base line I may set up another for dual head speeds.
-I created a noob training gear from 1/2" PVC and a 4 way connector, because...well, you know. I strapped it to a bench in my shop and spooled it up to make sure things looked OK and nothing came flying apart. Unbelievably I nailed blade tracking first try.
-No expo/curves at the moment. Might want to add some? 10% on pitch/roll? I generally don't use it on my multis. No idea what heli's generally need.
-Tx has no curves, modes or anything of the sort programmed in. Just ins, outs and logic for the switches. As I said above, it all is functioning fine.















With much trepidation I did a 6" lift off this morning. Enough to know it's drifting forward and left, and the tail twitches pretty good.

I will subtract more roll and pitch in the attitude tab under "rotate virtual" to compensate for the drift. I had already subtracted 2.5 degrees from roll to begin with, knowing that left drift was likely. I had nothing subtracted from pitch. Next try will be 5 subtracted from each, unless someone has a better idea. One thing about this heli is the landing skids are tilted so that the heli frame/mainshaft sit tilted forward a little when it's sitting level on the skids. Will there be further compensation needed for that?



So, anyone have and recommendations to get this thing closer to easy lift off and hands off stable hover?

Thanks a bunch for taking the time. Cheers!








« Last Edit: September 01, 2019, 11:16:24 pm by FlyNFool »

Re: Starting PIDs and any other recommendations...
« Reply #1 on: September 02, 2019, 05:06:35 am »
A few things:

PIDs are basically proportional to head speed because unstabilized max roll rate (and roll acceleration) is basically proportional to head speed.  I'm guessing that if you reduce the head speed in a well tuned copter, it will oscillate unless you reduce the PIDs too.  Probably best to reduce the PIDs from their real best max?  Thinking of running two different head speeds, well that is why we have multiple settings (PID) banks to attach to different FMS positions.

Unlevel landing gear are only a problem in Attitude mode (not Rate) and because of "I" term windup.  It is like taking off from the side of a hill.  The best way is to take off quickly without touching anything but the throttle/collective till you are in the air.  That's hard to do with a heli because it takes so long to spin up.  It's easy to jump off the ground to knee high with a quad.

I would start with lowish PIDs and increase them because I don't like the idea of oscillations in a heli.

You've got the RotateVirtual corrections correct.  I have to look it up in my notes each time.

There are several heli guys that come by once in a while.  It may be a while before any of them see this.  I think I recall that you want to generally reduce the default quad PIDs.  Copying someone else's PIDs... there is just so much that can be different.  Different head speed, different max cyclic pitches, flybar weights in different places make a huge difference; and then a different model on top of those.

With a Revo class FC, AutoTune would probably work.

Have you looked at EasyTune / TxPID?
https://librepilot.atlassian.net/wiki/spaces/LPDOC/pages/45875246/EasyTune
https://librepilot.atlassian.net/wiki/display/LPDOC/TxPID
« Last Edit: September 02, 2019, 05:15:28 am by TheOtherCliff »

karla

  • *****
  • 629
Re: Starting PIDs and any other recommendations...
« Reply #2 on: September 02, 2019, 07:11:49 am »
Hello FlyNFool

I think you are doing great! Already being airborn, you have passed so many common pitfalls.
From now on its more easy and fun.

I agree with Cliff that its so many things on a frame that differs so hardly not worth to copy another ones PIDs.
However, comparing and confirming being in the ballpark can give some comfort.
So, in the picture you can see some settings for a trex450l that is configured with low headspead to carry more weight than usual 3D setup, camera and gimbal.



I would use your Flight mode 2 when continue trimming the PID settings.
No need to spend time on getting the tail in position with rate (good to run it once to see there is enough travel of the tail servo though).
I would personally not adjust the drifting in hover by change the virtual rotation but rather move the physical length of the servo pins. or trimming the acctuator settings by small increments, similar to when doing swosh plate balancing.

You said your transmitter do not have any curves. That would mean that you use the standard linear throttle curve from the flightcontoller Libre code? And the collective pitch angle is moving along with the throttle right?
You also said you have enable the Governor mode in the ESC.
I am curious how do you know you are using 50% head speed?

... most people before use curves setup in the tx. This is interesting.

I really like your piq quad :)
« Last Edit: September 02, 2019, 07:16:54 am by karla »

Re: Starting PIDs and any other recommendations...
« Reply #3 on: September 02, 2019, 08:50:11 am »
I would personally not adjust the drifting in hover by change the virtual rotation but rather move the physical length of the servo pins. or trimming the actuator settings by small increments, similar to when doing swosh plate balancing.

For Attitude mode I respectfully disagree because the "I" term will wind up and move any amount of linkage necessary to get it back to that attitude.  Rotate Virtual is the right way to do it.  :)  Rate mode should never need any trim at all.  I would fly it without any stabilization keep the servos centered and adjust the linkage to get that hovering, then Rate mode will be perfect and not need to wind up to get to the correct swash plate angle.  Then adjust Rotate Virtual in Attitude mode and all modes are perfect.

On a related note, never use transmitter trims except temporarily and put them back.  Rate mode should never need the trims moved from how they were set when the transmitter wizard was run (hopefully they were centered then).  When you have both Rate and Attitude on the mode switch and you use the transmitter trims to stop drift in Attitude mode, then what you have done is trim in a slow flip when you switch to Rate mode.
« Last Edit: September 02, 2019, 09:02:01 am by TheOtherCliff »

Re: Starting PIDs and any other recommendations...
« Reply #4 on: September 02, 2019, 01:51:04 pm »
A few things:

PIDs are basically proportional to head speed because unstabilized max roll rate (and roll acceleration) is basically proportional to head speed.  I'm guessing that if you reduce the head speed in a well tuned copter, it will oscillate unless you reduce the PIDs too.  Probably best to reduce the PIDs from their real best max?  Thinking of running two different head speeds, well that is why we have multiple settings (PID) banks to attach to different FMS positions.

Unlevel landing gear are only a problem in Attitude mode (not Rate) and because of "I" term windup. It is like taking off from the side of a hill.  The best way is to take off quickly without touching anything but the throttle/collective till you are in the air.  That's hard to do with a heli because it takes so long to spin up.  It's easy to jump off the ground to knee high with a quad.

I would start with lowish PIDs and increase them because I don't like the idea of oscillations in a heli.

You've got the RotateVirtual corrections correct.  I have to look it up in my notes each time.

There are several heli guys that come by once in a while.  It may be a while before any of them see this.  I think I recall that you want to generally reduce the default quad PIDs.  Copying someone else's PIDs... there is just so much that can be different.  Different head speed, different max cyclic pitches, flybar weights in different places make a huge difference; and then a different model on top of those.

With a Revo class FC, AutoTune would probably work.

Have you looked at EasyTune / TxPID?
https://librepilot.atlassian.net/wiki/spaces/LPDOC/pages/45875246/EasyTune
https://librepilot.atlassian.net/wiki/display/LPDOC/TxPID
TOCliff - Thank you much for replying!


1- Oops, this is a FBL heli. Did I screw up in thinking that CC can handle FBL?

2- I've used TxPID on the quads, was not sure if it would be a good idea to try on a heli. I was a bit worried about memory and that darn stack error popping up again. I'm not a code jockey, so I don't really understand the stack. However, being nervous and fighting to keep the heli level and not running away I couldn't see me twisting knobs at the same time. I guess I could do short hops and adjust in between. Hmmm.....
« Last Edit: September 02, 2019, 02:42:23 pm by FlyNFool »

Re: Starting PIDs and any other recommendations...
« Reply #5 on: September 02, 2019, 02:26:51 pm »
Hello FlyNFool

I think you are doing great! Already being airborn, you have passed so many common pitfalls.
From now on its more easy and fun.

I agree with Cliff that its so many things on a frame that differs so hardly not worth to copy another ones PIDs.
However, comparing and confirming being in the ballpark can give some comfort.
So, in the picture you can see some settings for a trex450l that is configured with low headspead to carry more weight than usual 3D setup, camera and gimbal.




I would use your Flight mode 2 when continue trimming the PID settings.
No need to spend time on getting the tail in position with rate (good to run it once to see there is enough travel of the tail servo though).
I would personally not adjust the drifting in hover by change the virtual rotation but rather move the physical length of the servo pins. or trimming the acctuator settings by small increments, similar to when doing swosh plate balancing.

You said your transmitter do not have any curves. That would mean that you use the standard linear throttle curve from the flightcontoller Libre code? And the collective pitch angle is moving along with the throttle right?
You also said you have enable the Governor mode in the ESC.
I am curious how do you know you are using 50% head speed?


... most people before use curves setup in the tx. This is interesting.

I really like your piq quad :)

Hi Karla - Thanks for the reply!

1- A little extra weight and low speed is what I've got ATM. And if they are at all similar I can see I am pretty far off on PID's. Curious, why low HS with that camera rig? I thought higher HS equates to more stability?

2- The collective moves linear with stick input. No curves applied anywhere. Throttle signal to ESC is as follows:
 
-Two switches are used to control ESC. Arm switch and Throttle/HS switch.
-In the Tx I have logic/special functions set so that the arm switch over rides output and sets throttle to 0% when disarmed. It only over rides throttle signal to ESC, I can still control collective and rudder.
-With arm switch in the armed position, throttle control is on the 2nd switch. It (currently) is set with 3 positions....0%, 50% and 75%.

I suppose I mis-spoke (typed). It would not be accurate to say 50% HS as I don't have an RPM signal to monitor. It would be accurate to say 50% available output.

Re: Starting PIDs and any other recommendations...
« Reply #6 on: September 02, 2019, 02:40:34 pm »
I would personally not adjust the drifting in hover by change the virtual rotation but rather move the physical length of the servo pins. or trimming the actuator settings by small increments, similar to when doing swosh plate balancing.

For Attitude mode I respectfully disagree because the "I" term will wind up and move any amount of linkage necessary to get it back to that attitude.  Rotate Virtual is the right way to do it.  :)  Rate mode should never need any trim at all.  I would fly it without any stabilization keep the servos centered and adjust the linkage to get that hovering, then Rate mode will be perfect and not need to wind up to get to the correct swash plate angle.  Then adjust Rotate Virtual in Attitude mode and all modes are perfect.

On a related note, never use transmitter trims except temporarily and put them back.  Rate mode should never need the trims moved from how they were set when the transmitter wizard was run (hopefully they were centered then).  When you have both Rate and Attitude on the mode switch and you use the transmitter trims to stop drift in Attitude mode, then what you have done is trim in a slow flip when you switch to Rate mode.

I avoid Tx trims like the plague. Every single model in my Tx is neutral trimmed.

Ah, I think I get it. Rotate virtual only affects leveling in atti and other stabilized or partly stabilized modes. Rate doesn't care and the only thing I should be doing right now is adjusting physical mechanics in order to get it to stop excessive drifting. Then if I choose I can concern myself with stabilization.

Back to the bench with it to reassess mechanical setup.

Thank you much  :)

karla

  • *****
  • 629
Re: Starting PIDs and any other recommendations...
« Reply #7 on: September 03, 2019, 05:34:25 am »
1- A little extra weight and low speed is what I've got ATM. And if they are at all similar I can see I am pretty far off on PID's. Curious, why low HS with that camera rig? I thought higher HS equates to more stability?
Vibration issues, I have the fastest head speed it can take.
Hard to say if PID are far off or not. I would still tuning after your heli. I usually start with default setting, if it can hover at all then work on one axis at the time, increase numbers until show signs of oscillation, then lower it ~30%. Usually works okay and completes pretty quickly.


Quote
2- The collective moves linear with stick input. No curves applied anywhere. Throttle signal to ESC is as follows:
-Two switches are used to control ESC. Arm switch and Throttle/HS switch.
-In the Tx I have logic/special functions set so that the arm switch over rides output and sets throttle to 0% when disarmed. It only over rides throttle signal to ESC, I can still control collective and rudder.
-With arm switch in the armed position, throttle control is on the 2nd switch. It (currently) is set with 3 positions....0%, 50% and 75%.
That was a new one :)
So when you move the throttle stick on your TX it only sends collective to heli?


Quote
Ah, I think I get it. Rotate virtual only affects leveling in atti and other stabilized or partly stabilized modes. Rate doesn't care and the only thing I should be doing right now is adjusting physical mechanics in order to get it to stop excessive drifting. Then if I choose I can concern myself with stabilization.
Right!
Thats what I wanted to communicate :)
Thanks @Cliff for being more clear about it.

Re: Starting PIDs and any other recommendations...
« Reply #8 on: September 03, 2019, 02:58:53 pm »

That was a new one :)
So when you move the throttle stick on your TX it only sends collective to heli?



Correct. I have no ESC throttle mixed in with the stick, it's only collective. I figure I won't need extra HS with higher collective since I'm not going to be banging the sticks for a while yet. When I need I can revisit mixing it in. It seemed simpler....a removal of the mix to remove a variable. If HS affects PID's, then wouldn't it seem logical to find the HS it likes for normal flying and keep/govern it there? I don't mind going in and making another model file for a more traditional setup.

karla

  • *****
  • 629
Re: Starting PIDs and any other recommendations...
« Reply #9 on: September 04, 2019, 03:54:41 am »
It makes a lot of sense.
Indeed simplify things, just not the most common way to start with heli setup.
please let us know how it develops.

Re: Starting PIDs and any other recommendations...
« Reply #10 on: September 13, 2019, 11:57:57 pm »
Well, I completely re-setup the heli. Took all the links off and checked lengths. Started from scratch in LP. Remembered (this time) to set the flight mode and stabilization mode all to manual for the setup. I'm getting about 6* positive cyclic and a little less on the negative side. My neutral collective is not absolutely centered, I'm about 1/2 degree off full neg to full pos. I'm thinking it won't make a difference since I don't plan on punch outs in any orientation anytime soon. 0 pitch is spot on mid stick. I get 1/10 degree variance checking pitch all the way around on both blades, and that depends on how the servos 'settle' after I roll the cyclic stick in each position. Sometimes 0, sometimes it flickers 0 - 0.1.

One thing I am curious about. I've read many step by step descriptions and watched lots of videos on setups. One thing that is mentioned in only a few is lengthening the left swash link a turn and shortening the right link a turn to counter the inherent left drift, or push, by the tail. Is that relevant on helis with FBL units, or is that for older setups? I know the forces involved are still present, but not sure if having a controller changes the equation. Trim it out in links or the Tx?

I believe my forward/left drift was a combo of the above effect mixed with the fact that I had it in Atti mode and had not compensated board tilt because of the skids. I get proper horizon in the GCS on the bench now. Nose down 5* on the skids, flat when it should be.

With an answer to the left/right link question above and slightly cooler temps I should be ready to try again. Think I will start with rate trainer limited to maybe 25-30* and rate on the tail. If that lifts off and behaves well I'll have rate/rate/rate on mode 2 and atti/atti/axis lock on mode 3. Oh, that reminds me, what would be a somewhat tamed expo for this thing to start off with? I see anywhere from 10-40%....a rather wide margin to choose from. I fly most of my quads with linear in/out (0 expo) but want to start a bit tamed with the scary Tasmanian devil until I know what she feels like.

Thanks!

karla

  • *****
  • 629
Re: Starting PIDs and any other recommendations...
« Reply #11 on: September 16, 2019, 04:26:46 am »
Seems you leveled the swash plate okay.

When starting out to get a stable hover at stick centered (no forward/aft, no left right drift), use rate not atti.
I prefer to adjust the servo link rods until stable. However, that's a matter of taste and habit.
The tail rotor typically gives a smaller amount of tilt effect on the heli so it is actually tilted (rolled) some 5-10 degrees when hover. For a FBL heli you just need to think what stabilization mode you fly in. When in manual or rate stab mode, then flight controller don't care if the heli is tilted.

However, if you switch over to atti stab mode, then it will start to drift since the controller notice there is a roll angle.
This will be the second step, after you are satisfied with the rate/manual setting. Then you adjust the virtual rotation setting so it cancel out the roll. After that is done then you will not have drift in atti mode (nor in manual/rate mode).

Just a tip, start getting the tail behave will first (yaw axis). Lift off in manual (or nearly lift off is enough) so you can confirm you have enough travel on the tail servo to compensate for the main rotor. From the point where it balance the main rotor out, its good to have 50% travel in both directions. Just get it reasonable. After that always put the yaw in Axislock and forget about it, its done. You can move on to roll and pitch.

Good luck!

Re: Starting PIDs and any other recommendations...
« Reply #12 on: September 20, 2019, 10:43:41 pm »
I had to ditch the Atom for this project. I have been having odd Rx reboots and I think it's something to do with this particular Atom, as a change in wiring and a different Rx still exhibit the issue. It will, somewhere around the bottom 20% of collective stick, somehow trigger a reboot of the Rx. I know by monitoring voltage that it's not an overload or high draw problem, like a sticky spot in the collective or jammed servo.
 :-\
I'm going to 3D print a basher quad and stick it in that to see if the problem is just in a heli configuration, or if it persists in a quad configuration.

Feeling less than confident about using a CC3D in this my only heli, I ordered a popular regular FBL unit to use instead. Heli is now flying.

Thank you for all the help. Perhaps I will get a cheap clone FBL heli and try again with a different CC3D in the future.

Re: Starting PIDs and any other recommendations...
« Reply #13 on: September 21, 2019, 05:06:32 am »
It should not be possible for the Atom to cause the receiver to reboot.  Not the Atom's fault, but the unmodified Atom or stock wiring may not handle the amps drawn by multiple high current heli servos.  There may also be vibration intermittent wiring.

If it (receiver reboot) is reproducible there are several fairly simple ways to give cleaner power to the receiver without changing anything else.  If that alone fixes the issue, I would be confident that the issue was understood.

It's hard to test for brief electrical problems.  :(  An overload/undervolt only needs to last for say 1/100th of a second to cause a reset and it requires special equipment, connected at a known problem site (rx in this case) to record something like that.

Did it only happen with the rotor spun up?  If it happened even without the rotor spinning, it is a lot safer to troubleshoot and it might save you some grief to know the cause for sure.  With strange problems, I often find that trying to make the problem go away just makes it harder to reproduce.  Maybe on the bench try to load down several servos by hand to reproduce the problem.  You've got a new FBL unit that you will go back to, but I would put the Atom back in and 100% fix that problem first, to know that the FBL is safe too.

It's very common that the high load servos in a heli cause electrical power overload issues.  Receiver and FC reboot can be the result.  Be careful to watch for the receiver still rebooting.  I hope that your new FBL unit has special filtering in it to keep the receiver running during these load spikes.

Good luck!  :)
« Last Edit: September 21, 2019, 05:21:33 am by TheOtherCliff »