Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Orbiter SDK Orbiter software developers post your questions and answers about the SDK, the API interface, LUA, meshing, etc.

Reply
 
Thread Tools
Old 02-02-2020, 05:29 PM   #1
markl316
XR2 Ravenstar Commander

Default Control Surface Moments

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 by markl316; 02-02-2020 at 07:34 PM.
markl316 is offline   Reply With Quote
Old 02-03-2020, 09:39 AM   #2
asbjos
tuanibrO
 
asbjos's Avatar
Default

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.
asbjos is offline   Reply With Quote
Old 02-03-2020, 11:47 AM   #3
Thorsten
Orbinaut
 
Thorsten's Avatar
Default

Quote:
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...
Thorsten is offline   Reply With Quote
Old 02-03-2020, 02:29 PM   #4
markl316
XR2 Ravenstar Commander

Default

Thanks for the quick responses guys!

Quote:
Originally Posted by asbjos View Post
 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).




Quote:
Originally Posted by Thorsten View Post
 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.




Quote:
Originally Posted by asbjos View Post
 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 by markl316; 02-04-2020 at 01:44 AM.
markl316 is offline   Reply With Quote
Thanked by:
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 08:44 AM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.