Oscillation when in loiter in d term on roll

It seems to fly really well, vibrations in Y axis up to 10. I configured it with the configurator I am just trying to figure out how to fix this oscillation in my roll d term. It only happens when I switch into loiter mode. If I lower d term the quad starts a slow wobble. I can’t see or hear the oscilliation but the logs seem to show it. I also am having the not able to arm due to “still config gps” error in loiter mode with this beta 3 version.
15in props
6s battery

1 Like

The Roll P is oscillating and D term is just responding to that (I think).
Y axis vibrations go up significantly at the same time.
As a test change the yaw axis, heading, by 90 degrees and see if the oscillation changes to pitch axis or stays with roll axis.

Set these to see if the issue goes away at least temporarily.

PSC_POSXY_P,0.5
PSC_VELXY_D,0.25
PSC_VELXY_I,0.5
PSC_VELXY_P,1.0

These are just half of the default values.

Here is a flight with those param changed. Still have the oscillation though it seems to be less intense.

I just reran a quick tune after changing those params and no more oscillations. I changed these back to default and the oscillations came back.
PSC_POSXY_P,0.5
PSC_VELXY_D,0.25
PSC_VELXY_I,0.5
PSC_VELXY_P,1.0

Looks like the settings didn’t fix the issue. I just updated to the beta version 4.
I still have the oscillation when in loiter.

post a .zip file with the .json and .param files produced by the configurator.

That would be nice to have but due to the original hard drive that I configed it on crashed and now on a new machine I don’t have those.

Hi @prsh8ya,

The roll you seem to be refering to is only 1 degree peak to peak with a period of 3.9 seconds. I would say this is normally to small for you to be conserned about but if there is a clear occilation there is a good chance that it can grow under the right circumstances.

The roll appears to be fully controlled so it does look like it is comming from the position controller. It is a little hard to see this in the logs and to make this easier to diagnse I would face the aircraft directly north/south or east/west so the roll axis is all in one PSCN/PSCE not mixed between them.

I just saw the occilation you are talking about and the vibrations. I see what you are trying to fix now!! This is at a much higher frequency of ~30Hz. As soon as you switch into loiter your vibrations go from less than 2 (very low) to 7 (still very low). Again, this isn’t bad but it is interesting!

Ok, I have a couple ideas/thoughts here.

  1. I believe our default value for D is too high and I would like to reduce it but it is difficult to do this with defaults. I would suggest:
    PSC_VELXY_D → 0.25

  2. It looks like you have a soft isolation mount given your low vibrations in manual flight. It looks like you have a resonance at ~30 Hz. After checking I can see you already know this given you set INS_HNTCH_FREQ 31.04. For the position controller to drive this through the frame you are getting through two 5 Hz filters and the ATC_INPUT_TC (lower than I expected at 0.12). Looking at your filter setup it looks like the only thing you can really do is increase your ATC_INPUT_TC to something like 0.25. That would reduce the fast response and not excite your isolation mount as much. There is a little room to half the two filters to half (PSC_VELXY_FLTD, PSC_VELXY_FLTE) but I am not as happy with that.

I suspect that this is a vibration isolation resonance rather than a simple control occilation. So I would suggest you go back to your starting values in the first log you posted and then drop D to 0.25. I would also try ATC_INPUT_TC at 0.25. If you still want more filtering I would test PSC_VELXY_FLTD at 2.5 Hz. You may not be able to remove this and have to accept a small amount of noice at 30 Hz.

3 Likes

@Leonardthall Thank you for taking the time to look at this for me. I will do some testing starting with ATC_INPUT_TC, PSC_VELXY_D → 0.25 and see what the bin tells me after this.

@Leonardthall I updated the 2 parameters as stated above and it appears that the oscillation is fixed. Here is a .bin from the flight with the updated params.
I truly appreciate your assistance.

On a side not I am running beta 4 and it still won’t allow me to arm in loiter due to the gps still configing error.

Well that has completly removed that problem! That is a nice win :slight_smile:

Congratulations!

1 Like