ethz-asl / data-driven-dynamics

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

Fix standard wing model lift drag calculations #140

Closed Jaeyoung-Lim closed 3 years ago

Jaeyoung-Lim commented 3 years ago

Problem Description There were a few issues with the standard wing model. As a result, the pipeline was not able to estimate the liftdrag coefficients correctly.

This PR fixes the problem by addressing the underlying issues. Bug fixes

Improvements

Proposed Solution This PR reduces the estimated coefficients to lift and drag coefficients that are not in the stall region. While we can incorporate the flat plate model, I would like to push this out when getting the VTOL working, since this is not relevant for fixed wings.

Key changes include

Note that the coefficients of interest here are only for force estimation. Since the force estimation for aerodynamic effects were not working, this has been a blocker to move towards implementing aerodynamic moments.

This does not fix the standard wing model completely, since the perdictions are still not working correctly. However, creating the PR since I consider this as an improvement from the previous state

Testing

coefficients:
  I_xx- I_yy: 0.0
  I_yy-I_zz: -0.007598505025841847
  I_zz-I_xx: 0.0
  c_d_wing_xz_lin: 136.19504547317766
  c_d_wing_xz_offset: 4.846470542724653
  c_d_wing_xz_quad: 2269.2579642974474
  c_l_wing_xz_lin: 9.139676641227844
  c_l_wing_xz_offset: 0.7868849978538761
  control_surface_0_c_d_delta: -25.5763438282221
  control_surface_0_c_l_delta: -342.74350667969543
  control_surface_1_c_d_delta: -25.569258043357184
  control_surface_1_c_l_delta: -342.7080217883057
  control_surface_2_c_d_delta: 0.007165974450208239
  control_surface_2_c_l_delta: 0.07865064519179457
  control_surface_3_c_d_delta: 0.009912942301746809
  control_surface_3_c_l_delta: 0.005275387243893323
  control_surface_4_c_d_delta: -0.05425386269446991
  control_surface_4_c_l_delta: 0.18933110710260334
  intercept: 0.0
  puller_c_m_drag_z_lin: 0.00043925827905427035
  puller_c_m_drag_z_quad: 0.00031486348034107965
  puller_c_m_leaver_lin: 0.0
  puller_c_m_leaver_quad: 0.0
  puller_c_m_rolling: 0.0062141369231162565
  puller_rot_drag_lin: 1.0736153262086319
  puller_rot_thrust_lin: 0.3461121304577288
  puller_rot_thrust_quad: 8.660280818444463
metrics:
  R2: 0.9300612408325579

Note that the estimation is quite sensitive to the flight log, since PX4 has a very small band in the angle of attack which the vehicle enteres during flight for fixedwing vehicles. With a better log: Figure_5

Additional Context