ethz-asl / data-driven-dynamics

Data Driven Dynamics Modeling for Aerial Vehicles
Other
99 stars 14 forks source link

Add control surfaces as general actuators #136

Closed Jaeyoung-Lim closed 3 years ago

Jaeyoung-Lim commented 3 years ago

Problem Description Previously, a different actuator configuration could only be represented through a new model. This results in a large number of derived models, and since VTOL configurations are diverse this is not scalable.

Since we are using a lumped sum model to describe the aerodynamic forces of the system, we can generalize control surfaces into actuators that influence lift and drag coefficients.

Proposed Solution In this PR, a general control surface actuator is proposed, where the vehicle is lumped as a single wing model and the control surfaces influence the lift and drag coefficients of the lumped wing.

I tried to make the control surface have the same interface/structure as the rotor model so that both can be considered as different kinds of "actuators"

Output of the model results are as the following:

coefficients:
  I_xx- I_yy: 0.0
  I_yy-I_zz: -0.007598505025841941
  I_zz-I_xx: 0.0
  c_d_wing_xz_lin: -5.519116340083283
  c_d_wing_xz_offset: -30.678184660898772
  c_d_wing_xz_quad: 1094.992324663788
  c_d_wing_xz_stall_90_deg: 97.80517579451308
  c_d_wing_xz_stall_min: -36.964144689594065
  c_l_wing_xz_lin: -6.43623980733897
  c_l_wing_xz_offset: 55.87508669765694
  c_l_wing_xz_stall: 4.217490468185637
  control_surface_0_c_d_delta: -41.57608570018073
  control_surface_0_c_l_delta: 28596.49127881699
  control_surface_1_c_d_delta: -41.55163703181258
  control_surface_1_c_l_delta: 28596.530728132144
  control_surface_2_c_d_delta: 0.02765507537996825
  control_surface_2_c_l_delta: 0.09187865783428958
  control_surface_3_c_d_delta: 0.008699739528148207
  control_surface_3_c_l_delta: 0.0011637003146216418
  control_surface_4_c_d_delta: -0.06355351363863997
  control_surface_4_c_l_delta: -0.005418664745054574
  intercept: 0.0
  puller_c_m_drag_z_lin: 0.00043925827905426113
  puller_c_m_drag_z_quad: 0.0003148634803411044
  puller_c_m_leaver_lin: 0.0
  puller_c_m_leaver_quad: 0.0
  puller_c_m_rolling: 0.006214136923116151
  puller_rot_drag_lin: 0.4950549977119333
  puller_rot_thrust_lin: 0.38161297501371066
  puller_rot_thrust_quad: 8.313833244491573
metrics:
  R2: 0.9530785777023228
model:
  puller_:
  - dataframe_name: u4
    description: puller rotor
    position:
    - 0.22
    - 0
    - 0
    rotor_4: null
    rotor_axis:
    - 1
    - 0
    - 0
    rotor_type: RotorModel
    turning_direction: -1
  wing_:
  - control_surface_0: null
    dataframe_name: u6
    description: aileron_right
  - control_surface_1: null
    dataframe_name: u5
    description: aileron_left
  - control_surface_2: null
    dataframe_name: u7
    description: elevator
  - control_surface_3: null
    dataframe_name: u2
    description: rudder
  - control_surface_4: null
    dataframe_name: u3
    description: flaps
numper of samples: 3450

Quick sanity check - Note that the two aileron channels are estimating close to symmetric coefficients:

  control_surface_0_c_d_delta: -41.57608570018073
  control_surface_0_c_l_delta: 28596.49127881699
  control_surface_1_c_d_delta: -41.55163703181258
  control_surface_1_c_l_delta: 28596.530728132144

(Not sure why they are sooo big)

Testing The regression results show almost no difference in the force estimation, therefore I consider this not to be worse, although the performance doesn't seem to be great at all. (Most likely not good enough for the simulation)

Additional Context