awegroup / MegAWES

Matlab/Simulink model of a megawatt-class airborne wind energy system based on rigid wing technology.
https://megawes.readthedocs.io/en/latest/
Apache License 2.0
17 stars 7 forks source link

DE2019 control effectiveness seems wrong #4

Closed jesseishi closed 1 year ago

jesseishi commented 1 year ago

Hi,

In Dyn_6DoF_v2_0_r2019b/AirborneSystem/FlightControlSystem/AttitudeAndRateLoop/RateLoop/ControlAllocation/allocation the control effectiveness matrix Ba is calculated based on the DE2019 model. When executing the following code (after having loaded the DE2019 aircraft model and having initialized the sim):

alpha = 0.1;
Cl_deltaA =DE2019.Cl_deltaA_0 + DE2019.Cl_deltaA_alpha * alpha + DE2019.Cl_deltaA_alpha2 * alpha^2;
Cl_deltaR =DE2019.Cl_deltaR_0 + DE2019.Cl_deltaR_alpha * alpha + DE2019.Cl_deltaR_alpha2 * alpha^2;                                 

Cm_deltaA =DE2019.Cm_deltaA_0 + DE2019.Cm_deltaA_alpha * alpha + DE2019.Cm_deltaA_alpha2 * alpha^2;  
Cm_deltaE = DE2019.Cm_deltaE_0  + DE2019.Cm_deltaE_alpha * alpha + DE2019.Cm_deltaE_alpha2 * alpha^2; 

Cn_deltaA =DE2019.Cn_deltaA_0 + DE2019.Cn_deltaA_alpha * alpha + DE2019.Cn_deltaA_alpha2 * alpha^2;  
Cn_deltaR =DE2019.Cn_deltaR_0 + DE2019.Cn_deltaR_alpha * alpha + DE2019.Cn_deltaR_alpha2 * alpha^2;

Ba = [[Cl_deltaA,0,Cl_deltaR];[Cm_deltaA,Cm_deltaE,0];[Cn_deltaA,0,Cn_deltaR]]

You get:

Ba =
0.1474             0    0.0090
0.0142   -1.8535            0
         0             0    0.0759

This is unexpected from what I generally know about aircraft control because Cm_deltaA is nonzero and Cn_deltaA is zero. This is strange because you would expect that an asymmetric aileron deflection does not have an effect on the pitch moment (so Cm_deltaA = 0) and that it does have an effect on the yaw moment (so Cm_deltaA != 0). Maybe the m and n subscripts got mixed up somewhere? Or this is correct and just different from what I would expect (very possible)?

I dug a little bit further into it and the fits that are done in Src\Common\initAllSimParams_DE2019.m seem correct so the data it uses might be false. In that case, B_Axx are not correct which are loaded from Lib\6DoF\Control_allocation_V60.mat.

DylanEij commented 1 year ago

The reason why the Cn_deltaA is zero, is because the FN (yaw moment) was forced to be zero from the FSI model. I do not remember correctly why this was the case but I think it had something to do with the controller. We track a zero sideslip angle and did not want the instability of the yaw moment to affect this. Also the values were relatively small compared to the other coefficients. However, it is true this value is not zero. Bear in mind that the matrix is based on steady state solutions from the FSI, therefore it looks at a deformed wing state. I will send you the updated allocation matrix, if this does not crash the aircraft we can update the library file in the future.