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
There was a bug in the calculations, where the wrong calculation was done for the lift coefficients (cl_0 and cl_alpha was swapped). This has been fixed.
The matrix calculation for cl_alpha was being swapped with cl_0
Improvements
For fixed wing vehicles, we have almost little to no data in wing stall. However, the pipeline was trying to fit coefficients that are only effective in the stall region. (e.g. c_d_wing_xz_stall_min, "c_d_wing_xz_stall_90_deg, c_l_wing_xz_stall ). This resulted in basically "free" coefficients and was making the pipeline fit very strange curves outside the stall region.
The current implementation of stall region aerodynamics were modeled as a linear force(fixed force proportional to the dynamic pressure), which is far from reality. If we are interested in modeling the behavior in this state space, we need to be more thorough on how to model the aerodynamics in this region. From the literature, it has been shown that airfoil geometry does not play an important role in stall. Therefore it the behavior of the wing is close to a flat plate.
Reference:
Jategaonkar, Ravindra V. Flight vehicle system identification: a time domain methodology. American Institute of Aeronautics and Astronautics, 2006.
Cory, Rick, and Russ Tedrake. "Experiments in fixed-wing UAV perching." AIAA Guidance, Navigation and Control Conference and Exhibit. 2008.
Khan, Waqas. Dynamics modeling of agile fixed-wing unmanned aerial vehicles. McGill University (Canada), 2016.
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
Removed stall aerodynamics related coefficients
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
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:
Additional Context
The prediction results are still not good, and this is something that still needs to be fixed.
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
cl_alpha
was being swapped withcl_0
Improvements
c_d_wing_xz_stall_min, "c_d_wing_xz_stall_90_deg, c_l_wing_xz_stall
). This resulted in basically "free" coefficients and was making the pipeline fit very strange curves outside the stall region.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
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:
Additional Context