4

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

user62605
  • 53
  • 4
  • 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. – Peter Kämpf Mar 09 '22 at 21:50
  • 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. – quiet flyer Mar 09 '22 at 23:00
  • 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.

    – user62605 Mar 09 '22 at 23:26
  • Could you approach it with the Rate of Turn formula? – Robert DiGiovanni Mar 09 '22 at 23:33
  • 1
    I’m voting to close this question because it is about debugging a computer model, rather than about Aviation. – Ralph J Mar 09 '22 at 23:46
  • Have you ever watched an air show? Or performed a slip? Roll angle is independent of rate of turn. (By that I mean that an airplane can maintain a constant heading at any bank angle). There is only a relationship in a coordinated turn. Are you attempting to implement a full 6-DOF flight model or something less like 3-DOF? – Jim Mar 09 '22 at 23:55
  • @RobertDiGiovanni That looks promising, thank you Robert

    Jim Okay, I understand. I am attempting to implement a 6 DOF model, to ascend a certain amount and to move laterally a certain amount simultaneously.

    – user62605 Mar 10 '22 at 00:18
  • 3
    This question is about aviation. We have several tags for flight simulation. Voting to keep open. – Koyovis Mar 10 '22 at 01:15
  • @Jim actually, to maintain a constant heading with a roll one has to generate a lateral force in the other direction to compensate the wing horizontal vector. In effect, the fuselage becomes a crappy, draggy airfoil producing an opposite lateral vector. The picture alone keeps this question positive, and open. Agree with u that ROT formula is for coordinated flight. – Robert DiGiovanni Mar 10 '22 at 02:05
  • @RobertDiGiovanni - Yes, but the point it since it can be done you can’t derive a turn rate from just a bank angle. And to nitpick, it says “constant velocity” in the title. Which means zero turn rate. But I expect OP really meant constant airspeed. – Jim Mar 10 '22 at 02:26
  • @RobertDiGiovanni - Ok, constant earth-axis velocity. I suppose constant body-axis velocity could involve a turn rate. – Jim Mar 10 '22 at 02:28
  • Thanks @Koyovis – user62605 Mar 10 '22 at 12:45
  • Just to clarify, some comments and answers are getting into the aerodynamic roll torques generated by turning flight. My comment above is fundamentally not about aerodynamics and is rather about the geometrical relationship between bank angle and roll rate; it's an issue of spherical geometry, not aerodynamics. Though it's not entirely unrelated to aerodynamics, as any non-zero roll rate tends to be opposed by an aerodynamic "damping" effect. And of course there are also other aerodynamic roll torques associated with turning flight as well, most of which tend to increase the bank angle. – quiet flyer Mar 11 '22 at 02:29
  • But my basic point is that even without knowing anything whatsoever about the aerodynamic roll torques acting on the aircraft at any given instant, just by knowing starting bank angle, roll rate, climb or descent rate (or climb/descent angle), and airspeed, you ought to be able to predict the bank angle a given increment of time later. And if the aircraft is climbing or descending, the roll rate must not be zero, if the bank angle is to remain constant. If your results aren't consistent with this, you have a problem. Regardless of the exact breakdown of the various roll torques at play. – quiet flyer Mar 11 '22 at 02:51
  • But maybe I'm way over-complicating this. Is your problem that the aircraft is flying at a constant bank angle and airspeed and climb or descent rate (or in level flight), and you know its position at instant A and want to find its position at instant B? If so, that's a rather trivial problem and my comments have taken things to way too deep a level of detail. I thought you were maneuvering in three dimensions and wanted to understand how to integrate roll rate to get bank angle. Oops-- sorry! Given the context of the question, I apparently mis-interpreted "displacement" to mean bank angle. – quiet flyer Mar 11 '22 at 03:01

3 Answers3

3

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 ;).

U_flow
  • 3,640
  • 2
  • 9
  • 24
2

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.

Peter Kämpf
  • 231,832
  • 17
  • 588
  • 929
1

(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.

Robert DiGiovanni
  • 20,216
  • 2
  • 24
  • 73
  • 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 = (1091tan(a)) / v (knots) = (1091tan(0.11456)) / 346 = 6.305E-3 °/sec

    – user62605 Mar 10 '22 at 13:25
  • @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. – Robert DiGiovanni Mar 10 '22 at 15:38