Position Controller in loiter mode

Hi,
I am having some trouble with respect to the position controller in loiter mode(and land mode).
Here is a small snippet of the log from time 24.00 to 26.40 minutes:

  1. please help me understand the error in velocity tracking between PSCN.TVN and PSCN.VN in loiter mode, which also results in bad tracking in position (PSCN.TPN and PSCN.PN). Could this be related to tuning, but it is following well in guided mode?
  2. Additionally, I noticed that the discrepancy arose immediately upon taking off. please help me understand if there is something that I am missing out on to explain the above behaviour ?
    If the position controller is able to perform well in guided mode, I don’t completely understand the difference in the position controller’s performance in guided and loiter mode.

Here is the log file corresponding to the snippet: 00000180.BIN - Google Drive

I have another log file which shows the same behaviour how upon taking off in loiter mode results in quite off-tracking in TVN and VN and TPN and PN.
here is another log file of the same drone, where we observe the same behaviour:

The drone we are using uses 16-inch propeller, so the drone is quite big.

You do know that the notch filters and the control loops have been improved in ArduCopter 4.4.4?

Oh, I didn’t know that.
I am using 4.4.2, actually.
Could you please explain how the notch filter affects the performance of the position controller differently in guided and loiter mode though?

Why did you post in the 4.1 forum section?

I fixed that now.

Notch filter affects all nodes. It must be properly tuned.

Ok, you have a 0.4m position variation and your velocity error seems to be up to ~0.2 m/s and delayed by 2 seconds. Not huge but not fantastic either.

Your attitude control seems to be giving the correct attitude to achieve the correction accelerations if everything else was right. This might suggest an external disturbance or an ekf estimation problem.

Noise looks small and the EKF seems happy.

PSC velocity gains have been backed off a little. This may make the aircraft a little less precise or a little more susceptible to disturbances.

A video of the flight might help but that is all I have.

Thank you @amilcarlucas and @Leonardthall
I have attached a plot related to EKF3 variance and innovation.
Yes, you are right that EKF noise is not much

I sent you one of the flight videos in a personal chat on Discord. Please have a look at it when you get time. We observe that the drone is oscillating in roll and pitch.

I didn’t realise you were doing a precision landing. Your target location is moving back and forth due to your estimation of landing position:

Your lag may be wrong. PLND_LAG of 0.02 is very fast.