data-driven-dynamics icon indicating copy to clipboard operation
data-driven-dynamics copied to clipboard

body rotation influence on angular acceleration

Open manumerous opened this issue 3 years ago • 3 comments

The influence of the body angular velocity on the angular acceleration is not yet taken into account: image

There is already a function computing features for omega x omega in the dynamics model:

    def compute_body_rotation_features(self, angular_vel_topic_list):
        """Include the moment contribution due to rotation body frame:
        w x Iw = X_body_rot * v
        Where v = (I_y-I_z, I_z-I_x, I_x- I_y)^T
        is comprised of the inertia moments we want to estimate
        """
        angular_vel_mat = (self.data_df[angular_vel_topic_list]).to_numpy()
        X_body_rot = np.zeros((3*angular_vel_mat.shape[0], 3))
        X_body_rot_coef_list = ["I_yy-I_zz", "I_zz-I_xx", "I_xx- I_yy"]
        for i in range(angular_vel_mat.shape[0]):
            X_body_rot[3*i, 0] = angular_vel_mat[i,
                                                 1]*angular_vel_mat[i, 2]
            X_body_rot[3*i + 1, 0] = angular_vel_mat[i, 2] * \
                angular_vel_mat[i, 0]
            X_body_rot[3*i + 2, 0] = angular_vel_mat[i, 0] * \
                angular_vel_mat[i, 1]
        return X_body_rot, X_body_rot_coef_list

To really take this effect into account it would be necessary to define I_xx, .., I_zz as optimization variables which would rend the problem nonlinear. I guess this is long-therm the way to go. What do you think @Jaeyoung-Lim ?

manumerous avatar Jul 15 '21 22:07 manumerous

@manumerous Yes, but probably for this to be observable, we need the rotational velocity of the rotors.

For multirotors, as long as the coordinate frame is aligned with the principle axis of the drone, omega X I omega is zero. So ignoring this effect is not too bad.

For other platforms, this may introduce some problems. Lets note that we are ignoring this effect and revisit this after we resolve more urgent problems in this repository.

Jaeyoung-Lim avatar Jul 16 '21 11:07 Jaeyoung-Lim

    `X_body_rot_coef_list = ["I_yy-I_zz", "I_zz-I_xx", "I_xx- I_yy"]`

Are we actually estimating the moment of inertia? or are we just calculating the difference?

  • This doesn't seem to appear in the model results

Jaeyoung-Lim avatar Jul 18 '21 13:07 Jaeyoung-Lim

@manumerous I think I am now extremely confused by this formulation. Where is the inverse of the moment_of_inertia applied?

Jaeyoung-Lim avatar Jul 22 '21 06:07 Jaeyoung-Lim