ethz-asl / data-driven-dynamics

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

Add flat plate wing model #151

Closed manumerous closed 3 years ago

manumerous commented 3 years ago

Adding back the flat plate extension to the standard wing model. I think the mistake was in the pipeline switching the cl_0 and cl_alpha naming.

These are the current results for the quadplane model: Screenshot from 2021-08-12 12-11-04

I think the lift curve looks nice and quite plausible. For the drag curve this is not yet the case. Hereby some of the parameters are negative, which should never be the case. I hope adding the constraints will somewhat help us here. i guess the main underlying issue here is that its hard to distinguish between rotor drag and wing drag since the quadplane is only flown in hover.

Jaeyoung-Lim commented 3 years ago

@manumerous I have been thinking about this, but could we either make it optional to estimate the stall dynamics (e.g. have a completely modeled flatplate model when disabled) or remove the stall dynamics estimation completely and keep it as "known" dynamics(no coefficients estimated)?

The reasoning behind this is

Related to: https://github.com/ethz-asl/data-driven-dynamics/issues/150

tstastny commented 3 years ago

could we either make it optional to estimate the stall dynamics (e.g. have a completely modeled flatplate model when disabled) or remove the stall dynamics estimation completely and keep it as "known" dynamics(no coefficients estimated)?

I agree with Jay here. It is not wise to leave the flat plate coefficients in the optimization when we do not have sufficient data to identify them. I would recommend setting a fixed flat plate coefficient, and maybe a manually defined (or otherwise defaulted) stall onset and stall length (aoa stall.. and delta aoa for linear to flat plate transition) params when one does not have the data to do a post stall id.

Some functionality for identifying the stall aoa could be integrated later, but would require specific maneuvers to illuminate this (often dangerous ones if controllers are not well tuned or aircraft are not inherently stable). The transition param would need to be somehow identified with data only. Otherwise, we need to just fix a "close enough" value.

manumerous commented 3 years ago

Yes that's good for me. I also think it makes sense to integrate a good default stall characteristics so we get somewhat realistic post stall dynamics in the sim (Could be useful for pilot training) .

I think a common model was to choose the flat plate lift coefficient to be around 0.7 right? What are good standard flat plate drag coefficients?

Jaeyoung-Lim commented 3 years ago

@manumerous

I think a common model was to choose the flat plate lift coefficient to be around 0.7 right? What are good standard flat plate drag coefficients?

Flatplate models are not usually modeled as a constant lift coefficient, but it is a function of angle of attack. For example, from Hoburg, Warren, and Russ Tedrake. "System identification of post stall aerodynamics for UAV perching." AIAA Infotech@ Aerospace Conference and AIAA Unmanned... Unlimited Conference. 2009.

image

tstastny commented 3 years ago

@Jaeyoung-Lim I believe @manumerous was referring to a scalar on that AoA dependent curve. (So the magnitude of the sine wave is = coeff of flat plate instead of 1). And I have seen 0.7 used before. Though it may be good to find a reference for this. I don't know if they just pulled this number out of thin air, or measured it on a specific platform.

manumerous commented 3 years ago

@manumerous

I think a common model was to choose the flat plate lift coefficient to be around 0.7 right? What are good standard flat plate drag coefficients?

Flatplate models are not usually modeled as a constant lift coefficient, but it is a function of angle of attack. For example, from Hoburg, Warren, and Russ Tedrake. "System identification of post stall aerodynamics for UAV perching." AIAA Infotech@ Aerospace Conference and AIAA Unmanned... Unlimited Conference. 2009.

image

As can be seen in the graph on top the lift is not modelled as a constant component but in dependence of the angle of attack. Sorry for the confusion here. This pr uses the following formulas:

image

Which is similar to the one you proposed @Jaeyoung-Lim, since 2sin(x)cos(x) = sin(2*x). In addition to your model it just adds a minimum drag coefficient for zero angle of attack. But I guess its debatable if that is even needed.

Jaeyoung-Lim commented 3 years ago

@manumerous I think this is fine, since the equation comes from David's tiltwing paper. As long as you can find a good reference for the number you choose this should be fine for now.

The confusion comes from how it was done previously (as a constant)

manumerous commented 3 years ago

@manumerous I think this is fine, since the equation comes from David's tiltwing paper. As long as you can find a good reference for the number you choose this should be fine for now.

The confusion comes from how it was done previously (as a constant)

Good. I think the previous version was just a typo since it doesn't make much sense. Not sure where it came from :)

Jaeyoung-Lim commented 3 years ago

@manumerous Great!

I think the mistake was in the pipeline switching the cl_0 and cl_alpha naming.

Just to clarify, this was fixed in https://github.com/ethz-asl/data-driven-dynamics/pull/140 and not this PR right?

manumerous commented 3 years ago

@manumerous Great!

I think the mistake was in the pipeline switching the cl_0 and cl_alpha naming.

Just to clarify, this was fixed in #140 and not this PR right?

I think your right about this. But when i started adapting for this pr the flat plate coefficients were completely missing in the standard wing model.

Jaeyoung-Lim commented 3 years ago

I think your right about this. But when i started adapting for this pr the flat plate coefficients were completely missing in the standard wing model.

@manumerous Yes, exactly. I removed it since it was breaking the whole optimization. Also for fixed wings this makes sense, since we never go into stall.

manumerous commented 3 years ago

I would propose to merge the code from this pr as it is and fix the flat plate model parameters in pr #152 (which implements a QP optimizer for bounded linear models) by just setting the lower and upper bound to the same level for all default models that we have. This way the functionality of estimating the flat plate model can simply be regained by adjusting the config file.

Jaeyoung-Lim commented 3 years ago

I would propose to merge the code from this pr as it is and fix the flat plate model parameters in pr #152 (which implements a QP optimizer for bounded linear models) by just setting the lower and upper bound to the same level for all default models that we have. This way the functionality of estimating the flat plate model can simply be regained by adjusting the config file.

@manumerous I am not sure if this is what we want. We want to prioritize on getting fixed wing working for now, but this PR makes it worse for fixedwings, since we introducing a floating parameter without the data.

Therefore this PR effectively blocks fixedwing development until https://github.com/ethz-asl/data-driven-dynamics/pull/152 gets merged. (Which is not finished yet)

manumerous commented 3 years ago

I would propose to merge the code from this pr as it is and fix the flat plate model parameters in pr #152 (which implements a QP optimizer for bounded linear models) by just setting the lower and upper bound to the same level for all default models that we have. This way the functionality of estimating the flat plate model can simply be regained by adjusting the config file.

@manumerous I am not sure if this is what we want. We want to prioritize on getting fixed wing working for now, but this PR makes it worse for fixedwings, since we introducing a floating parameter without the data.

Therefore this PR effectively blocks fixedwing development until #152 gets merged. (Which is not finished yet)

So in order to fix the coefficients for the flat plate model those coefficients need to be present in the code. Therefore, I already rebased #152 on this branch and we can close this PR or merge it before #152

Jaeyoung-Lim commented 3 years ago

@manumerous Great thanks