ethz-asl / data-driven-dynamics

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

Wing model parameters for standard plane do not make sense #150

Open manumerous opened 3 years ago

manumerous commented 3 years ago

As outlined in #143 the drag coefficients give no reasonable estimate for the standard plane.

image

A had a look at the code and tried to identify what the problem could be. So far I am not quite sure.

First I manually checked the computation of the angle of attack, which seems to be correct. From that it can also be seen that the model was regressed on data which contained only AoAs between about [-1.5, -4.3] degrees.

image

In order to generate positive lift that means that the stadard plane models wing should have an angle of incidence of at least 4.5 degrees. I think that is the case for most aircraft and therefore seems reasonable. Do we have a way to check that in the px4 air frame?

So far it seems to me, that the bad fit could just be due to the very narrow distribution of the angle of attack in the data. If the residual force error is about the same order of magnitude or larger than the change in lift force over the 3 deg angle of attack range that could lead to very different parameters that predict very bad outside the region represented in the data. At least the AoA distribution is a notable difference to the quadplane model data in #143 and #131.

Maybe you could give some insights here @tstastny ?

manumerous commented 3 years ago

I guess thats another good example why we would like to constrain the optimization parameters.

tstastny commented 3 years ago

In order to generate positive lift that means that the stadard plane models wing should have an angle of incidence of at least 4.5 degrees. I think that is the case for most aircraft and therefore seems reasonable. Do we have a way to check that in the px4 air frame?

I don't think it can be said that "most" aircraft have wing incidence of 4 degrees. Actually.. I would assume most have zero. and just have cambered airfoils. As for checking this in px4, I guess this is not anything PX4 has any idea about?

So far it seems to me, that the bad fit could just be due to the very narrow distribution of the angle of attack in the data

Yes. We've discussed this quite a few times. The data needs to span the range you care about, and it needs to be weighted based on frequency bins. Otherwise the optimizer will see a million points around one angle of attack, and hardly any anywhere else, and consider the rest of the curve as outliers, fitting a line arbitrarily to the clump of undistributed points. This problem can be helped a bit by proper maneuver design, but also we must NOT take the entire flight for estimating these parameters. As this will very easily lead to exactly this problem. Not sure if that is still the case in the framework (using the entire flight log instead of picking relevant parts / maneuvers).

I guess thats another good example why we would like to constrain the optimization parameters.

This is true, we definitely need to constrain the opt params (especially as we discussed before on the quadratic part of the drag curve). But the main issue with fixed-wing ID is a bit more fundamental. Bad data = bad optimizations. No way around it. So we firstly need to feed the optimizer healthy food. And we need to curate that food for the proper nutrients. This requires more work on the maneuver design during data collection, much more so than what is necessary for multicopters. This is unfortunately just an endemic problem to the vehicle class.