AHRS: Waiting for Home

So I took the copter outdoors and attempted the Autotune.

It was able to start but it seemed to show Roll 0% for every instance. (is this correct?)

But there are lots of other factors at hand.

  1. Battery is 5000mAh 11.1 GOLDBAT. I get about 6-7 min indoors. at 20C
    today it was -3c with gusts around 20kph and I am only able to get 3 min fly-time
  2. With the minor wind the copter was being pushed by the wind and I would have to take over when
    its position was too far or to close to an object. This leaves me with less then 2 min on Autotune. I
    would try and leave it as long as possible but the value was always 0%.

In general flying outdoors was much better then indoors, Yaw was consistent and GPS Loiter was working to keep the copter in the position without any stick input.

Is it acceptable to use 2x 5000mah batteries to increase the run time?

Was the Autotune working or was something incorrectly configured?

Logs attached.

Thanks.

The good news is Yaw is working well, pitch and roll just needs to come up to the same standard (via Autotune).

Autotune is not going to work in wind unfortunately. I know weather is a big factor there and you will have to wait. Autotune moves the copter around a lot and you would need a very big indoor area, which I think would be too much of to ask. Autotune will work from AltHold mode, so Loiter and a perfect GPS fix are not strictly required.

The bad news is adding another battery will probably shorten flight time, or at least add very little. Your motor outputs are right around ideal now, so weight and thrust is well balanced. Adding more weight will force the motors to work much harder.
There are some motors and props that really handle extra weight well, and there is not much difference in (servo/PWM) output required - these are not those motors :slight_smile:

Hi there Shawn,

Thank you for the feedback. I it will be quite the challenge to complete the autotune, The city I live in is 90% covered by flight restrictions due to nearby airports and Helipad. This means I’m forced to go out in the fields where there is lots of wind. I will try and arrange the use of a large gymnasium to reduce wind and temperature issues.

In regards to the battery, it would be about 400g additional payload. this is equal to the UTM-30 Laser range finder that was removed from this copter So I would think it would be ok with the weight but I would have to test and compare the values for a basic hover.

I will try single axis autotune within the indoor area I have currently have and see about other possible testing areas.

The next goal would be to integrate the copter with the Optitrack system. (If you have any input or ideas they could be helpful)

Thanks.

Hi there Shawn,

I was able to try the autotune indoors ( where I usually fly)

It was manageable but the Yaw errors and gps seem work against me. (at first the copter is flat and stable but after some flying and yaw the copter seems to lose this and usually requires left and forward inputs but this is not consistent between flights.) If I power off and on again the copter is flat.

I was able to get it flat for 1 complete battery ( ~5min) but this was not enough time to do the Roll axis. I did have to apply some stick inputs to keep from crashing but I cannot see much reduction from this test. It may be impossible to complete the autotune with just 1 battery.

I will try and connect a 2nd battery and do some tests of the PWM required for hover. Is there anyway to pause the autotune or save the state to allow for a battery swap?

Any inputs or suggestions are appreciated. Thanks.

No unfortunately - we can see where it gets to in logs, but it will start over for next attempt.
Maybe if it got quite a way through we could use some values from the log to give it a head start.

OK, here is the log. It was able to complete the D term and was about half way through the P term.

As you suspected the current draw with 2x batteries was 17A! This is easily 50% more than the 12a that 1x battery is drawing and as you stated I suspect the run-time will be the same or worse.

How can see see what to adjust in the PID to tune get it started a lot closer? I think this is the only way to get the auto-tune to work. the Roll vs DesRoll looked very good at then end!

Thanks!

I couldnt tell what numbers Autotune was coming up with at those intermediate stages, or whether they would be good or bad.
Once autotune succeeds it tells us the resulting parameters and values in messages, so we can easily see what to copy to another axis.
I would try these and see if flight is better, then maybe try that Autotune again.

ATC_ANG_PIT_P,6.0
ATC_ANG_RLL_P,6.0
ATC_RAT_PIT_D,0.004
ATC_RAT_PIT_I,0.12
ATC_RAT_PIT_P,0.12
ATC_RAT_RLL_D,0.004
ATC_RAT_RLL_I,0.12
ATC_RAT_RLL_P,0.12

Hi there Shawn,

Unfortunately these values didn’t seem to make any major change ( that I can see)

I got to the same point, D was completed and it started on P, but again ran out of battery.

I find I am spending about half the time on repositioning the quad, with lots of EKF3 and AHRS errors, Could we disable compass or gps to reduce the errors? ( one would think there is a giant magnet in the ceiling, but there isn’t lol)

I don’t know how this will be possible without getting an intermediate tune and assisting the autotune to complete within the short time frame, I’m just not sure were/how to get the data from the logs, a realtime output of the values would be very beneficial.

Any ideas?

Thanks Tristan

Hi there Shawn, After watching some videos of the VTOL Quick tune it provides a much clearer data-output with actually pid values. It also seems it doesn’t take very long. I could try outdoors again and see if this is possible. It could get us closer with the auto tune and then it may complete within the time frame.

I am also tempted to try pitch or yaw auto-tune and see if they can complete.

On the battery topic, is the ~6 min runtime correct, Logs show ~1000mah capacity, but the battery is 5000, If i run the numbers in eCalc i get like 20 min hover time. Are these batteries low quality? I could buy some others if so, but I don’t have anything to compare with.

Any other ideas are appreciated, Thanks Tristan.

OK well I was able to get the all 3 axes to AutoTune!

Pitch

Roll

Yaw

I think the Numbers are reasonable. It sure fly’s different.

Now to try and sort the battery ( unless you think this 5-6 min is correct) and try for Optitrack.

Please let me know your thoughts, Tristan.

Excellent.
Did you use Autotune or the VTOL Quicktune script?

The quicktune does produce good results and it’s worth doing in some cases, the only reason I dont recommend it up front is because there is a bit of extra setup. Some of the lesser-performance flight controllers struggle with scripting too.

I havent checked logs but I might later.

Hi there Shawn, This was standard auto tune. I was able to get the Pitch axis to tune, then put those values in for Roll, and this got it much closer. Yaw only took a few minutes.

Now that it flies well I will be working to solve theses issues. (tested a few flights, still get yaw errors but I suspect this is due to the indoor EMI)

  1. Vibrations, will test without prop-gaurds and see if it makes a difference.

  2. Setup with Optitrack, I will work on this but I’m sure I will have some questions.

  3. Battery life, Is this normal? or is this battery poor quality?

Thanks, Tristan.