4
$\begingroup$

I'm simulating an aircraft in Simulink and then using a controller to make it follow a reference path. My control inputs are elevator, aileron and rudder angles and the outputs of the state space are roll, pitch and yaw.

I'm struggling to find info on how to get displacement using the roll angle of the aircraft. At the moment I'm using Euler angles to go from a constant local velocity to a global one. enter image description here

Thanks

$\endgroup$
15
  • $\begingroup$ What is the result if you integrate over small time steps and update all state variables after each step? Also, in order to keep speed constant, you should also control thrust. $\endgroup$ Commented Mar 9, 2022 at 21:50
  • $\begingroup$ Just remember, when climbing or descending, a non -zero roll rate is required to maintain a constant bank angle. If your results aren't consistent w/ this, something is wrong. Required direction of roll for constant bank is toward high wingtip when climbing (i.e. bank angle will tend to increase if roll rate is damped or brought to zero), and toward low wingtip when descending (i.e. bank angle will tend to decrease if roll rate is damped or brought to zero), and this has a very significant impact on stability and control characteristics. $\endgroup$ Commented Mar 9, 2022 at 23:00
  • $\begingroup$ Thanks for the comments guys @PeterKämpf I have been integrating the global velocities wrt time to get the new global positions. I think my problem lies with if simply applying Euler angles to a vector of local velocities (v_local = [178m/s 0m/s 0m/s]') is how one gets global velocities or am I missing something? quietflyer I see. I just checked the roll rate there in the simulation and thankfully it is non-zero while climbing. $\endgroup$
    – user62605
    Commented Mar 9, 2022 at 23:26
  • 1
    $\begingroup$ I’m voting to close this question because it is about debugging a computer model, rather than about Aviation. $\endgroup$
    – Ralph J
    Commented Mar 9, 2022 at 23:46
  • 3
    $\begingroup$ This question is about aviation. We have several tags for flight simulation. Voting to keep open. $\endgroup$
    – Koyovis
    Commented Mar 10, 2022 at 1:15

3 Answers 3

3
$\begingroup$

If you are trying to simulate an aircraft (in Matlab/Simulink) you would typically use the equations of motion for aircraft. As these are taught all around the world you can also find a lot of lectures about this stuff, for example here or here.

Normally you would simulate all 12 states of the 6-DOF equations of motion, but if you are only interested in the translational part, you would use the following formulas:

$ \dot{u} = \frac{X}{m} − g \cdot \sin(\theta) + r \cdot v − q \cdot w\\ \dot{v} = \frac{Y}{m} − g \cdot \sin(\phi) \cdot \cos(\theta) - r \cdot u + p \cdot w\\ \dot{w} = \frac{Z}{m} − g \cdot \cos(\phi) \ cos( \theta) - q \cdot u − p \cdot v\\ $

With $X$, $Y$ and $Z$ being the aerodynamic and motor forces, $m$ being the mass, $\phi, \theta, \psi$ the euler angles, $p, q, r$ the rotational rates and $u, v, w$ the body velocities (or local velocities as you call them).

Normally you would now get your aerodynamic and motor forces, (depending on your inputs for elevator, rudder, ailerons and motor control) sum them up and put them into the formula above. After this step, you obtain the body velocities $u$, $v$ and $w$ which you THEN can convert to velocities in the inertial frame via the euler rotation to velocities in inertial frame (Reference on page 18 tells you how to do that, but be aware WHICH Euler rotation you want to use, there are several). Then you can simply integrate these velocities to obtain the position of your aircraft.

This is the standard way to perform a flight simulation.

P.S. It sounds like you are performing an incomplete simulation of your flight model, as you only obtain the euler angles. Especially if you want to develop a controller, you should perhaps revisit how you simulate your flight model.

P.P.S. I want to point out that what you are refering to as "local" velocity, is (in the flight dynamics community) typically called "body" velocity (the frame of reference is then called the body frame). What you are refering to as "global" velocity is typically the inertial velocity (defined in the inertial coordinate system)

P.P.P.S. The aerospace toolbox of Simulink contains most of these calculations as Blocks which you can use. If you are a student you might have free access to that toolbox ;).

$\endgroup$
2
$\begingroup$

You need to consider why the airplane flies at a nonzero roll angle.

The reason is the creation of a side force by tilting wing lift. This side force is needed to balance the centrifugal force resulting from turning (or to create the centripetal force needed for turning, for those of you who prefer a different point of view). Only looking at Euler angles does not give you (rsp. your mathematical model) the full picture. You also need to consider their rate of change and the inertial forces resulting from those rotations.

$\endgroup$
1
  • $\begingroup$ Okay great thank you, Peter, that helps a lot $\endgroup$
    – user62605
    Commented Mar 10, 2022 at 12:49
1
$\begingroup$

(from comments under question) attempting to ... ascend a certain amount and move laterally a certain amount simultaneously

This is a climbing turn. Climbing and turning both require more thrust than level flight. Assuming a coordinated turn and constant speed (not a "chandelle"), we can start by examining the Rate of Turn formula to determine lateral displacement over time.

Since lift is less than weight in a climb, lateral forces from the wing will be less.

In very shallow rates of climb, the difference will be tiny. In much steeper climbs, the plane rolls more and yaws less through the turn, almost a mirror image of an aircraft transitioning from a spiral dive into a rolling bad ending.

I would imagine the aircraft pictured has more than gentle manuevers in mind. Specifics on rate of turn and climb would be helpful.

$\endgroup$
2
  • $\begingroup$ Okay rate of turn equation it is. I want it to climb at 5m/s (for 10 sec). The roll angle is approximately 0.002 radians (or 0.11456 degrees) and velocity is 178m/s (or 346knots) so, therefore ROT = (1091*tan(a)) / v (knots) = (1091*tan(0.11456)) / 346 = 6.305E-3 °/sec $\endgroup$
    – user62605
    Commented Mar 10, 2022 at 13:25
  • $\begingroup$ @user62605 if I was actually flying it I would increase throttle, establish climb, increase throttle, roll to turn at first to make sure my speed did not drop off too fast, especially for a very high wing load like the plane pictured. Recommend doing the same for your Sim for now. $\endgroup$ Commented Mar 10, 2022 at 15:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .