12.3 Rigid-Body Dynamics & Rotations ended with rotation in hand: quaternions that never lock, Euler’s equations, and the light aircraft’s inertia tensor. 12.2 Thin Airfoil Theory & Panel Methods gave it a wing with a lift slope and induced drag. Now we join rotation to forces and moments in twelve states, position, velocity, attitude and body rates, whose derivatives one function returns. Hand it to RK4 at a fixed step, read the stick every step, draw the result: that is the core of every flight simulator.
Tools: 4.3 Runge–Kutta Methods & Butcher Tableaux, 4.5 Stability Regions & Stiffness, 7.7 Nonlinear Systems & Linearization, 12.1 Airfoils, Circulation & Lift.
Transcript
- Lesson 12.3 gave us rotation, and 12.2 gave us a wing. Twelve states: position, body velocity, attitude and body rates. Our lab carries thirteen, because attitude is a quaternion. One function returns all thirteen derivatives.
- Three frames: earth, north east down; body, glued to the airframe; and wind, along the velocity. The body velocity gives the airspeed V, the angle of attack alpha, how far the air comes from below the nose, and the sideslip beta, from the right.
- Newton holds in the earth frame, forces are known in the body, so the acceleration gains a term: m times v dot plus omega cross v equals F. It is the same omega-cross term as in Euler's equations. And it is real: in a steady pull-up, Z equals minus m q u, the centripetal force.
- Weight, 1100 kilograms times g, is 10 791 newtons. Dynamic pressure times wing area is 25 265.6. So level flight at 50 metres per second needs a lift coefficient of 0.4271. Lessons 12.1 and 12.2 used 12 633 newtons: that was a C L of 0.5, a choice, and would mean 1287.8 kilograms.
- Lift: C L zero is 0.1993 from the panel solution, plus a slope of 5.313 per radian. Drag adds an induced term with factor 0.05426. Moments use assumed stability derivatives: a negative C m alpha puts the neutral point 0.1675 chord behind the centre of gravity.
- The derivative function takes thirteen numbers in and returns thirteen out: air data, coefficients, forces, moments. Runge Kutta four calls it four times a step, then the quaternion is renormalised.
- Trim: three unknowns, three equations. Newton converges in 3 iterations: alpha 2.6606 degrees, elevator minus 2.7452, throttle 0.3880, thrust 931.2 newtons. Check the balance: thrust cosine alpha is 930.2, equal to drag; lift plus thrust sine alpha is 10 747.8 plus 43.2, equal to the weight.
- Is the step small enough? Kick the trimmed aircraft and fly 30 seconds. Altitude errors at 0.05, 0.02 and 0.01 seconds: 5.36 times 10 to the minus 6, 1.39 times 10 to the minus 7, 8.72 times 10 to the minus 9 metres. Ratios 38.5 and 15.9: fourth order. Accuracy does not set the step; stability, 0.296 seconds, and input sampling do.
- Now kick the pitch rate by 0.2 radians per second. This is the short period: pitch rises from 2.66 degrees to 4.71 at 0.41 seconds, then settles, restored by C m alpha and damped by C m q.
- Then the slow motion: the flight path points up, the aircraft climbs and slows, down to 49.05 metres per second at 6.73 seconds, and peaks at 1005.10 metres at 7.26. The next peak is 1003.64 metres at 35.24 seconds: a phugoid, period 27.98 seconds, kinetic and potential energy trading places.
- A 30 degree level turn. Lift must carry the weight: load factor 1.1547, so C L is 0.4932. Its horizontal part curves the path at 0.11328 radians per second. In body axes that is pitch rate 0.0566 and yaw rate 0.0981: the omega cross v terms are the centripetal acceleration.
- Real time and physics time stay apart. Each frame adds the elapsed time to an accumulator, takes fixed steps of 0.01 seconds while one fits, and carries the remainder. Physics runs at 100 Hz whatever the screen does, 60 Hz, or 144, so a flight repeats bit for bit.
- Honest limits. The derivatives are typical values from memory. There is no stall: C L is capped at 1.4, a label, not physics. Flat, non-rotating Earth, still air, no engine dynamics.
- Next, 12.5: linearise these equations about this trim. The eigenvalues of the matrix A give the short period and the phugoid we just watched, read straight off the complex plane.
Frames and states
- Earth frame (flat, non-rotating, inertial): north, east, down (NED). Altitude is .
- Body frame, glued to the airframe at the centre of gravity: out of the nose, out of the right wing, out of the belly. Inertia and aerodynamic tables are constant here.
- Wind frame: along the velocity relative to the air; lift and drag are perpendicular and parallel to it.
With body velocity , the airspeed and the two flow angles are
Angle of attack : how far the air comes from below the nose; sideslip : from the right. In the sim the solid line is and the dashed line is the velocity: seen from the side, the angle between them is .
The states. Six degrees of freedom, each with a position and a rate:
| group | symbols | frame | count |
|---|---|---|---|
| position | earth | 3 | |
| velocity | body | 3 | |
| attitude | or | body to earth | 3 or 4 |
| angular velocity | body | 3 |
Textbooks count twelve with Euler angles. The lab carries thirteen, with a unit quaternion, for the reason 12.3 measured: Euler-angle rates contain , and a loop puts the nose through . Quaternion kinematics are linear and singularity-free, for one extra number and a renormalisation. Euler angles are computed only for display. (The letter now does double duty, pitch rate and quaternion; context decides.)
Newton in a rotating frame
Newton’s law holds in the earth frame, , but the forces are known in body components. 12.3 showed that for any vector stored by its body components , : the change seen from the body plus the turning of the frame. Put :
The same term as Euler’s , acting on momentum. In components, with and ,
Why the extra terms are real. In a steady pull-up at pitch rate , , the velocity turns with the body, so , yet : an upward force , the centripetal force for a path of radius .
The rotational equations are 12.3’s, with the full tensor (including ):
The code solves this system for ; through a rolling moment also starts a little yaw. The kinematics close the system:
Thirteen nonlinear ODEs, one function.
Forces
Weight is straight down in the earth frame, so in body axes it is . With 3-2-1 angles that is (Problem 3); the code uses the bottom row of and never needs the angles.
Thrust is along through the centre of gravity, throttle , N, constant with speed (an assumption: a real propeller’s thrust falls with airspeed).
Aerodynamics use the dynamic pressure (sea-level kg/m) and the wing area m:
Rotating lift and drag by into body axes gives
resolved with only, which is accurate while is small.
The coefficients
Lift. From 12.2’s panel solution for the NACA 2412 wing, with the lifting-line correction: slope per radian and zero-lift angle . So
The elevator adds per radian (from memory); the tail’s own lift slope is ignored. There is no stall model: is capped at , and the HUD says so in red when the cap acts.
Drag polar. with . 12.2 used the elliptic ; a rectangular planform does worse, so we take and (typical values, from memory).
Reconciling the mass
12.1 and 12.2 used a lift of N at : a choice of , not a weight (it would mean kg). 12.3’s inertia assumed 1100 kg, and the sim uses that mass, because the tensor above belongs to it. Then
at m/s. Ignoring the elevator, rad .
Moments and stability derivatives
Moments use a length too: span m for roll and yaw, chord m for pitch. Rates enter non-dimensionally, , , :
Each stability derivative is a slope of a moment coefficient, the first term of a Taylor series about level flight (7.7 Nonlinear Systems & Linearization). The values are stated assumptions typical of a light aircraft, roughly Cessna-172 class and quoted from memory, not derived; is chosen here.
| derivative | value | sign means |
|---|---|---|
| nose-up disturbance, nose-down moment: statically stable | ||
| pitching swings the tail, whose changed angle of attack opposes the motion | ||
| trailing edge down pushes the nose down | ||
| cambered wing’s nose-down moment, partly offset by the tail | ||
| the down-going wing meets a higher : roll damping | ||
| dihedral: a slip to the right rolls left | ||
| , | , | yawing right speeds the left wing; positive aileron rolls right |
| weathercock: the fin swings the nose into the wind | ||
| , | , | yaw damping; right pedal yaws right |
| , | , | side force against the slip; the rudder’s push |
Static margin. Extra lift is and its moment , so it acts chord behind the centre of gravity, at the neutral point: the static margin, studied in 12.5.
The derivative function
Thirteen numbers in, thirteen out:
- Unpack , , ; form from the normalised quaternion.
- Air data: , , , , and the non-dimensional rates.
- Coefficients, then forces: aerodynamic plus thrust plus .
- Moments from the coefficients.
- Return .
The controls are a second argument, constant within a step. The exercise asks for exactly this.
Integrating it
RK4 at a fixed step , then . The sim’s step check kicks the trimmed aircraft ( rad/s), flies 30 s and compares altitude with :
| (s) | altitude error at 30 s (m) |
|---|---|
| 0.05 | |
| 0.02 | |
| 0.01 |
Ratios , against and : fourth order. Micrometres at , so accuracy does not set the step here. Two other things do.
Stability. The fastest mode is roll damping: is the smallest moment and acts across the whole span. Alone, , so with s (lab cell). RK4’s stability region reaches on the real axis (4.5 Stability Regions & Stiffness), so s. Faster aircraft and stiff landing-gear springs push this down.
Inputs and events. The stick is read, and the ground tested, once per step; at s (100 Hz) that is finer than a hand moves.
Finding trim
Trim is a state whose derivatives vanish, apart from steady motion. Level flight at m/s: wings level, , so the velocity is horizontal. Three unknowns , three equations ; the rest vanish by symmetry, except .
Worked example: trim by hand, then by Newton
Pitching moment. gives . At : , trailing edge up.
Lift. Up-elevator removes of , so must rise to . Repeat both: the lab cell’s fixed-point loop settles at , .
Drag and thrust. , so N and .
Newton. The hand estimate ignores that thrust, tilted up by , carries of the weight. Newton on the three residuals, with a finite-difference Jacobian, converges in 3 iterations in the sim:
Check the balance in wind axes: N , and N . So . The largest state derivative at trim is of order (sim readout), and a 30 s hold changes the altitude by exactly m. Press trim: the HUD shows m/s, and load factor (aerodynamic over ; just under 1, as thrust carries part of the weight).
A disturbance: two modes
Press pitch kick: jumps by rad/s, controls at trim. The readout and charts show two motions on very different clocks.
- Short period. The pitch rises from to a peak of at s and settles back to about within a second and a half. That is restoring , damped hard by .
- Phugoid. The kick has bent the flight path upward. With back near trim the aircraft climbs and slows (slowest m/s at s, altitude peak m at s), then dives and speeds up; the next peak is m at s, a period of s, decaying slowly. Kinetic and potential energy trade back and forth.
Time warp 4x shows several phugoid cycles; the step stays s. Positive aileron rolls right at a steady rate set by against . Centre it: the bank decays slowly and the heading swings, but tilted lift no longer carries the weight, so the nose drops and the aircraft dives unless you pull back (Problem 1).
Computing it
Graded: Newton on your lands on the sim’s trim (, , ); every derivative except vanishes there to ; 30 s of RK4 holds the altitude to a micrometre; and a 5 s tumble at keeps to , which needs the renormalisation line.
Concept checks
Problems
The aircraft holds a level turn at bank , m/s, no sideslip. (a) Show the load factor is and find the needed (thrust’s share ignored). (b) Find the turn rate and the body rates and . (c) Which terms of the body-axis equations carry the centripetal acceleration?
Show worked solution
(a) Lift tilts with the wings; its vertical part must carry the weight, , so and .
(b) The horizontal part curves the path: , so rad/s, a full circle in s. The turn is about earth ; in body axes, tilted by , that is rad/s and rad/s.
(c) With , : the in the equation and the in the equation. Together they are , of size , pointing toward the centre of the turn. The induced drag rises times, so the throttle must go up.
Using , , , , , and : (a) solve the two linear equations required and for and directly. (b) Newton found , . Explain the difference.
Show worked solution
(a) From : . Into the lift equation: , so , rad and rad , as the lab cell’s loop found.
(b) The tilted thrust carries N of the weight, so the wing needs only and a little less ; the elevator follows through . Newton solves the full nonlinear equations.
(a) With , show that . (b) At trim (, ) the body force (aero plus thrust) is N. Show it balances the weight’s component, and explain why even though the aircraft is pointing slightly nose-up.
Show worked solution
(a) is the third row of , the earth axis in body components. leaves alone; takes it to ; then mixes the last two into .
(b) N, and N. Weight pulls back along the nose by ; the forward-tilted lift and the thrust push forward by the same amount (in wind axes, ). With there is no rotating-frame term, so .
Key Takeaways
- Earth, body and wind frames; , , . Twelve states, thirteen with the quaternion the lab uses to avoid gimbal lock.
- Newton in the rotating body frame: , beside Euler’s and .
- Forces from coefficients, and a drag polar with ; moments from assumed stability derivatives (: static margin chord).
- The 1100 kg aircraft trims at m/s with , , N; the derivatives vanish to about .
- RK4 at s is accurate to m over 30 s; stability ( s for roll damping) and input sampling set the step. A fixed step with an accumulator makes flight deterministic.
- A pitch kick excites a fast, well-damped short period (pitch peak at s) and a slow phugoid (period s).
- Next, 12.5: linearise these equations about this trim, form the longitudinal matrix , and its eigenvalues give the short period and the phugoid we just watched, periods and damping read straight off the complex plane.