Alt Hold issues in Copter 4.0

This is a group to discuss any alt hold anomalies seen in the release of copter 4.0.

Please provide data flash logs, video’s and use the following logging settings.

Hi Leonardhall,
I send you the flight records before and after changing the parameters.

-before

-After

It looks like your AFTER is a tlog.

Congratulations on the release of Aducopter 4.0 Beta.

When I recently applied arducopter4.0-rc1 to the Cube Orange,
It have an altitude oscillation as shown in the picture

The setting value has been transferred from 3.6.11
(attitude keep is nice!)

Is there anything I can try?

Can you send a log for me to look at?

Can you check it?

How were you flying the orange on the 3.6.11?
Can you please provide two logs, the first on 3.6.11 and the second on 4.0 rc1. Please make sure both are using the same setup.

Thanks for your help!

I think it might be interesting to try a test where these two parameters are changed:

  • GND_EFFECT_COMP = 1. This is unlikely to help but in general there is no downside to having this on
  • GND_PRIMARY = 1. This will change the primary baro to the 2nd baro which seems to be giving more reasonable readings than the 1st one which is showing large oscillations.

Also can you clarify a bit what you were seeing for the flight in the logs?

  • Do you think the vehicle is moving up and down 50cm or 1.5m?
  • how high was the vehicle flying? 4m or 7m?

Could you also please provide some photos of the aircraft.

I’m sorry to disturb you.

I moved the parameters(*.param) used in Cube Black to Cube Orange.

Below is a picture of my vehicle, and I hope you can refer to it.

1 Like

Thank you for your interest.

I think the change in some GND_PRIMARY will work.
But, flight test is available on this weekend.

And, in flight

  • the vehicle moved slowly about 50cm vertically.
  • the altitude was about 3~4m from ground
1 Like

@steampunk - That is a nice looking frame… where did you get that? Do you also have a Lidar unit attached?

You have a problem with your baro height sensing. It has a cyclic error and the EKF is following it slightly. The EKF vertical velocity is consistent with the GPs vertical velocity. It is not an EKF problem.

@steampunk,

by any chance is your autopilot able to get light on it, especially around the baro?

You may also like to ensure you have some foam over the baro to reduce the magnitude of pressure waves hitting the sensor.

@winstonsaz,

I had a quick look at your log and I think the barometer is being affected by changing in the vehicle’s velocity. I suspect this is the existing issue that some frames have where changes in the vehicle’s attitude or speed cause a pressure difference on the baro.

Of course it’s possible that we’ve had some sort of change in the EKF’s tuning but it’s a bit unlikely because the EKF hasn’t been modified much between 3.6.11 and 4.0.0.

I suspect if you’re able to run back-to-back tests between 3.6.11 and 4.0.0 we will see that both show the same issue… which is essentially a frame issue I think… of course I could be wrong but so far that’s what I see in the logs.

The current theory appears to be that there are some differences in the way the heater needs to work between IMU2 and IMU3
Tests are being done on this at the moment

2 Likes

FWIW my altitude retention is rock solid with 4.0

ATC_RAT_PIT_D,0.001262779
ATC_RAT_PIT_FLTD,80
ATC_RAT_PIT_FLTE,0
ATC_RAT_PIT_FLTT,80
ATC_RAT_PIT_I,0.07594138
ATC_RAT_PIT_P,0.07594138
ATC_RAT_RLL_D,0.0005355414
ATC_RAT_RLL_FLTD,80
ATC_RAT_RLL_FLTE,0
ATC_RAT_RLL_FLTT,80
ATC_RAT_RLL_I,0.03069822
ATC_RAT_RLL_P,0.03069822
ATC_RAT_YAW_D,0
ATC_RAT_YAW_FLTD,0
ATC_RAT_YAW_FLTE,4.5125
ATC_RAT_YAW_FLTT,20
ATC_RAT_YAW_I,0.01684844
ATC_RAT_YAW_P,0.1684844
PSC_ACCZ_D,0
PSC_ACCZ_FLTD,40
PSC_ACCZ_FLTE,20
PSC_ACCZ_FLTT,0
PSC_ACCZ_I,0.37
PSC_ACCZ_IMAX,800
PSC_ACCZ_P,0.185
PSC_ANGLE_MAX,0
PSC_POSXY_P,2
PSC_POSZ_P,0.3
PSC_VELXY_D,0.25
PSC_VELXY_D_FILT,5
PSC_VELXY_FILT,5
PSC_VELXY_I,0.5
PSC_VELXY_IMAX,1000
PSC_VELXY_P,1
PSC_VELZ_P,4
INS_GYRO_FILTER,100
SCHED_LOOP_RATE,800

1 Like

In recent test, GND_PRIMARY value was changed to 1, and it’s look like the altitude oscillations have disappeared.
However, pressure sensor’s(BARO1) heater still showed oscillations.

is it hardware problem(cube orange)? or firmware driver?

1 Like

We will give you some parameters to change on the heat control loop.
We suspect the heater is a bit stronger and needs lower PID settings. This is only in master so far but it should be in the next beta release. (unless you are able to test master)

@steampunk,

As Leonard says the heater change didn’t make it into -rc2 but it should be included in -rc3. Basically the heater in the CubeOrange reacts much faster than the one in the CubeBlack so AP’s heater controller needs different gains.

Thanks very much for your report. It was extremely helpful to have the logs.