jc-bao / crazyswarm2-adaptive

This is a fork of the Crazyswarm2 project. The goal of this fork is to make the Crazyswarm 2 project more adaptive to different scenarios and to make it easier to use.
1 stars 1 forks source link

🐛 Lower-Level Model Mismatch - Imprecise Attitude Rate Controller leads to MPPI unstable behavior #9

Open jc-bao opened 1 year ago

jc-bao commented 1 year ago

🚨 Problem Description:

The lower-level model-mismatch issue is affecting the performance of the MPC (Model Predictive Control). The MPC performance is suboptimal and exhibits unstable behavior, primarily attributed to an imprecise attitude rate controller.

jc-bao commented 1 year ago

Attempt 1: check the hovering behavior

MPPI action compare with PID action with H=1, N=8192:

image

MPPI action compare with PID action with H=32, N=8192: -> too noisy

image

try to make lamba (entroypy) larger 1e-2 -> 1e-3 -> not work try to make sampling sigma smaller -> still noisy, but with smaller scale. try to reduce horizon to 16 -> still noisy reduce H to 8 -> still noisy

sensor noise?

image

-> not very noisy.

MPPI behavior in simulator?

image

-> the same, super noisy.

💭 It might be MPPI issue, which yields high frequency actions.

jc-bao commented 1 year ago

Attempt: add low-pass filter to MPPI action output:

set action=0.1 action + 0.9 old action:

image

-> still too noisy for real-world experinment

0.05 low-pass filter:

image

-> still too noisy for hardware

disable model first-order delay:

image

hardware diverged. (I think it is caused over filtered system. )

image
jc-bao commented 1 year ago

Attempt: add quaternion cost

constrain quaternion make the system much more stable in this case. But the model mismatch still exist.

jc-bao commented 1 year ago

Attempt: matching hovering thrust