SDK Question Control Surface Moments

markl316

XR2 Ravenstar Commander
Addon Developer
Tutorial Publisher
Joined
Mar 30, 2008
Messages
450
Reaction score
1
Points
18
Hi all,

I'm working on an atmospheric autopilot, and I need to be able to somewhat accurately predict the induced moments on a vessel from control surface deflections so I can tune the autopilot.

I'm working with the as-included Delta Glider. For sum of forces and moments with no control surface inputs, I'm able to predict the lift, drag, and moment in the vessel body frame with pretty good accuracy.

The problem arises when I try to predict the moments from control surface inputs. I would think that the moment from, say, an elevator deflection would be (in the Orbiter left-handed coordinate frame):

M = F x R

Above, the magnitude of F is (qinf * elevatorArea * cLFull * elevatorPos), per the SDK documentation. For the Delta Glider, this would be (qinf * 1.4 * 1.7 * elevatorPos), from DeltaGlider.cpp line 1026, where elevatorPos is between -1 and 1.

The direction of the for F for our elevator example is presumably <0,cos(aoa),sin(aoa)>, such that the elevator lift force acts perpendicular to the freestream (same direction as the lift vector).

The vector R is the moment arm for the elevator, <0,0,-7.2> for the Delta Glider, from DeltaGlider.cpp line 1026.

However, my calculations aren't matching up what Orbiter is returning for the pitching moment. The mismatch seems to be exacerbated with elevator deflections at higher angles of attack (and rudder deflections at higher sideslip angles), which has me thinking I have the force vector direction wrong. Even at high angles of attack and sideslip, when all control surfaces are at zero, my calculations match what Orbiter returns, so I'm confident my issue has to do with how I'm calculating moment from the control surfaces.

The above control surface moment equation & calculation method works quite well for predicting the roll moment from aileron deflections, but it's pitch and yaw that I'm having trouble matching up.


Any ideas here would be much appreciated.
 
Last edited:

asbjos

tuanibrO
Addon Developer
Joined
Jun 22, 2011
Messages
696
Reaction score
259
Points
78
Location
This place called "home".
Have you taken the pitching moment from the airfoil into account? Remember that it's only non-zero in the vertical lift function.

Other than that, it's possibly something with your vectors and their rotations. But that is difficult to diagnose without some source code.
 

Thorsten

Active member
Joined
Dec 7, 2013
Messages
785
Reaction score
56
Points
43
The mismatch seems to be exacerbated with elevator deflections at higher angles of attack (and rudder deflections at higher sideslip angles), which has me thinking I have the force vector direction wrong.

Are you by any chance mixing a lift/drag with an axial/normal force coordinate system? They would agree at zero AoA and be quite different at high AoA.

Just a wild stab...
 

markl316

XR2 Ravenstar Commander
Addon Developer
Tutorial Publisher
Joined
Mar 30, 2008
Messages
450
Reaction score
1
Points
18
Thanks for the quick responses guys!

Have you taken the pitching moment from the airfoil into account? Remember that it's only non-zero in the vertical lift function.

Yes I have: I'm doing M = qinf * S * c * cM, where S is the wing area (90 m^2 for the DG), and c is the chord (5 meters for the DG).




Are you by any chance mixing a lift/drag with an axial/normal force coordinate system? They would agree at zero AoA and be quite different at high AoA.

I am taking this effect into account; I have all of my aerodynamic forces acting perpendicular/parallel to the freestream, which is only parallel to the Z body axis at zero AOA and sideslip.


However, late last night, I did have a breakthrough with my pitch/elevator test case. Apparently, in addition to the vertical (lift) force provided by the elevators, the Orbiter aerodynamic model applies a horizontal (drag) force for the control surface as well, equal to [qinf * S_elevator * elevatorPos], where S_elevator is the elevator (1.4 m^2). I'll post some plots tonight.




But that is difficult to diagnose without some source code.

Once I get yaw/roll nailed down I'm happy to post my code, though it's in MATLAB.
 
Last edited:
Top