karla

  • ****
  • 278
Re: GPS assist and Heli
« Reply #45 on: November 24, 2017, 03:19:17 pm »
I have a suspicion here:
the FC in AltitudeVario/AltitudeHold is trying to correct altitude just by altering the thrust, and not by changing the collective pitch of the heli.

Unfortunately, I feel pretty sure this is the case.
This is not good news.
The main way to control the vertical position for a heli is not done with the throttle.
The head speed (rpm of rotor) changes little and the collective pitch angle does most of the job.

I am afraid this will be the case for the other autonomous altitude modes as well, like PositionHold, RTB, Pathplanner and GPSassist.
Well true, the vertical component can be disabled, but that makes for example RTB or Pathplanner questionable to use.

I have an idea how to get around this.
If the throttle when controlled by the FC during AltitudeVario is following the throttle curve set in the GCS, then possibly if I can set the Collective curve to follow the throttle, then the pitch will change as well but using its own curve.

To do this I need to move the definition of the throttle- and collective curves from the transmitter to the GCS.
Did that, no problem, its done by un-clicking the option Collective Pass through and set up the two curves in the GCS instead. In the transmitter I just pt them linear. The two curves are very different.
It works and output is controlled by these new curves.






However, I want the source of Curve2 to be the throttle, and not as before the Collective. But when I change the source setting from collective to Throttle, then the servos do not move at all when moving the throttle stick. It just moves to what ever value is on the Min position of collective curve. Change the Min value and save and then servos will move to new position and stay there regardless of stick movement.



Any ideas here?
Should be possible to chose Throttle as a valid option since its in the dropdown list box right?
« Last Edit: November 25, 2017, 01:33:02 am by karla »

Re: GPS assist and Heli
« Reply #46 on: November 25, 2017, 05:49:25 pm »
Sorry that LP doesn't have a really full heli setup...

If I were doing this, I would start with a governor mode ESC and let the FC control collective.  I think that even BLHeli and SimonK have governor options.

karla

  • ****
  • 278
Re: GPS assist and Heli
« Reply #47 on: November 26, 2017, 03:07:14 am »
Thanks Cliff.
The thought has crossed my mind.
The Align ECS, RCE-BL45X, aboard do support Governor mode.

I might look in to it, however, it will be a new way of flying for me and likely present several unforeseen configurational issues and undesired consequences.

Meanwhile, I am tempted to have a look at the code and understand why the curve2source not seem to like the option throttle as source. If that can be sorted its preferred and much more useful for heli users than going governor mode. I have a build environment and next on my MS win 10 machine, so its more to find my way around. Do you guys have some forum for detailed code discussion?

Re: GPS assist and Heli
« Reply #48 on: November 26, 2017, 05:12:09 am »
I'm going to make a guess that there are not a lot of developers that do helis.

Maybe someone else can come by here to suggest a better discussion place.

f5soh

  • *****
  • 4064
    • LibrePilot
Re: GPS assist and Heli
« Reply #49 on: November 26, 2017, 08:18:24 pm »
Quote
It sounded like you agree there is a problem when flying in circles, but not that there is a problem when flying for a long time in a straight line, which is the same as hovering in the wind, which is the same as using transmitter trims to stop drift.
Did some testing this afternoon, setting a 10 degrees virtual rotation for Pitch and adding Pitch trim using Complementary.
Looks working and didn't see a issue related to attitude estimation after 5 flights.

Re: GPS assist and Heli
« Reply #50 on: November 27, 2017, 03:14:32 am »
If I'm not mistaken, it would be a problem with long stationary hover with same heading and would reset with each new battery.

Trim transmitter trim for no drift and hover as described.  The problem would be that the trim you start out with is not the trim you need after a long hover with it misconfigured the way you have your quad set.

One of the accel settings, I forget which one, when you turn it up, the issue is more noticeable.  And there was a reason we used to tell people to try changing it.
AttitudeSettings->AccelKp
AttitudeSettings->AccelKi
AttitudeSettings->AccelTau

I will see if I can recreate...

Re: GPS assist and Heli
« Reply #51 on: November 27, 2017, 10:21:31 pm »
I tried.  I cannot recreate any issue with this.  So I have no problem with the idea of INS13 using only heading from the compass.  Recall that this discussion was whether we needed an option to allow the current (16.09) 3D compass in the new INS13 because inclusion of 3D mag may give better attitude estimation in certain cases.

In this testing, Rattitude mode transmitter trims work just as well as RotateVirtual.  I would never recommend that since changing transmitter trims will mess up Rate mode flight...

I tried Rattitude (forgot it was Rattitude till late in flight; would have used Attitude) with CF/Basic with RotateVirtual roll +10 degrees and could not recreate any issue within the limits of human noticing and fine mode transmitter trims in a 3 minute hover.  I then tried just AccelTau = max; no problem.  I then tried just AccelP *= 4 and Acceli *= 10; no problem.  I didn't check the code to verify whether these are even used in CF/Basic.

AccelTau change recommendations may have been needed more when we had that "base 2" vs. "base 1" sensor data conversion error.  That may be where we suggested increasing the value.  Increased throttle -> increased vibration -> sensor overflow -> bad attitude estimation because of conversion error at max value.

As to whether we ever had an issue where Attitude mode worked better by adjusting RotateVirtual than by adjusting transmitter trims I don't know but assume not...  Maybe I am remembering problems from different firmware brand long ago.  Edit: Or it is a CC3D only issue with the different flight code base, but that doesn't matter for this discussion which was raised because of changes in INS13.
« Last Edit: November 28, 2017, 05:49:26 am by TheOtherCliff »

karla

  • ****
  • 278
Re: GPS assist and Heli
« Reply #52 on: November 30, 2017, 10:51:46 am »
I have a suspicion here:
the FC in AltitudeVario/AltitudeHold is trying to correct altitude just by altering the thrust, and not by changing the collective pitch of the heli.

When looking more in to this, I get more and more puzzled.
I meant to say in the above post that the FC is trying to correct the altitude by altering the throttle, not really the thrust.
I realize now that I don't understand the difference between these two terms.

In the System Settings, you have these settings:



But in the Systems - Data Settings, you have this additional concept of Thrust:



Is the throttle the values that comes from the transmitter and the thrust is what actually gets out to the motor(s)/collective via the actuator as lift after the FC tampered with it?

When I look at the values the thrust takes on, its just identical to the values of the throttle...

What is this Thrust thing?
« Last Edit: November 30, 2017, 11:17:00 am by karla »

Re: GPS assist and Heli
« Reply #53 on: November 30, 2017, 01:22:34 pm »
calculations all use the thrust variable

At the end, the calculated thrust is either put out on the throttle or on the collective.  There is a setting somewhere in System page (I think SystemSettings) that says whether to use throttle or collective.

karla

  • ****
  • 278
Re: GPS assist and Heli
« Reply #54 on: December 03, 2017, 02:53:56 pm »
You may switch to Next and get rid of INS13 / 3D Mag issues in 16.09 and also made possible Complementary+Mag+GPS usage.

For now I have put aside all ambitions with the vertical altitude automation.
This weekend I flew some 8 lipo packs, each some 15 min, trying to get the PIDs good and locked-in and the magnetometer to be very stable.
I think it became better and can do position hold on gps for some time (thrust = manual though). However, after a while it gets out of hand and starts making increasingly larger corrections and must be aborted.
When just using attitude mode and INS13 its difficult to get a stable hover without drift by adjusting the mag roll and pitch settings.
I will try the advice to convert to Next and see if that will get a more stable attitude hover in INS13.
If so, then my hope is that the position hold will also work better.

Re: GPS assist and Heli
« Reply #55 on: December 04, 2017, 08:00:50 pm »
Just some thoughts...

If you have good Attitude mode flight with Basic AttiEstAlgo, You could test if Attitude mode is good with INS13.  If Attitude flies better with Basic than with INS13, it is probably a mag issue.

You could also try to fly in Rate mode which removes accels from the question.

If bad in both Basic and INS13, you could record telemetry (so you can replay the same flight several times) during a difficult flight and look at accels and gyros for excess noise maybe caused by vibration.

I wonder if mag issues are caused by increased current needs toward the end of flight or when using old batteries.  Voltage drop due to low battery or old battery voltage sag means you need more current to hover.  More current = worse mags?

Good luck.

karla

  • ****
  • 278
Re: GPS assist and Heli
« Reply #56 on: December 05, 2017, 08:20:43 am »
Thanks Cliff,

and for sure, Attitude mode with Basic AttiEstAlgo flies like a charm, very stable, no drift, but Attitude with AttiEstAlgo INS13 then its moving around. My conclusion also, its a mag issue. So before I upgrade to Next I should move the Mag to an even better mounting location on the heli and see if that solves all. However, I want the new video gadget for the OSD PFD only available on Next so I will upgrade, and also move mount to a better location.

This will involve some serious soldering to extend the gps/mag cables. I will try make an extension cable rather than a fix soldering of them. I think this is not the problem so I like to revert easily to the original set up.

By this, I (we) will not know if the issue will be fixed by moving the mount of the mag/pgs or if its due to Next software.

I have several log files from last weekend but don't really know what to look for in terms of vibrations... I attach one small one here, if you care to have a look (have a beer instead? or just hint where to look :- )

For mag issues at end of lipo life due to higher current and higher interference, I don't think its likely for this set up. All Lipos new and its the same over 15 min of each lipo flight.
I would have noticed.
« Last Edit: December 05, 2017, 08:23:51 am by karla »

karla

  • ****
  • 278
Re: GPS assist and Heli
« Reply #57 on: December 07, 2017, 08:31:44 am »
Today I moved the gps-mag unit to better location on heli tail boom,
completed the conversion to Next,
calibrated Attitude using Basic.
It flies well.

Then calibrated mags and turned to INS13 and Attitude.
It flies well.
Then did Pos Hold.
Its really gusty around 6 m/s but it show clear tendencies of 'bowling'.
However, its at a new and better level than before, but still not where I can trust it or where I want it to be :(

My conclusion is I still have mag issues, too much disturbances.
Will try to improve the mount location on heli but it will involve some serious reconfiguration of transmitters etc etc

This feels like a long march...
« Last Edit: December 07, 2017, 08:40:37 am by karla »

Re: GPS assist and Heli
« Reply #58 on: December 07, 2017, 05:08:37 pm »
Do you have all your high current wire pairs/triples twisted?  Battery to connector, connector to ESC, ESC to motor?

f5soh

  • *****
  • 4064
    • LibrePilot
Re: GPS assist and Heli
« Reply #59 on: December 07, 2017, 09:25:15 pm »
Did you do a simple check looking if compass in PFD matches a known North heading ?
Remove the Roll/Pitch in Auxmag orientation and redo a test.