The Lawfare Academy

Lawfare Group → Knowledge Institute → Lawfare Academy

← Flight Dynamics and Avionics

Unit 4

Compare coarse and fine steps in a classroom coast model

Apply the idea

The toy cart in the lesson starts at position zero and velocity two, with constant normalized acceleration −1. Its exact position at time one is 1.5. Two implementations return 1.75 with two steps and 1.625 with four.

Compare each error and state what a halving of step size demonstrates for this example.

Read the worked reasoning

Subtract the exact value. The errors are +0.25 and +0.125, so reducing the step halves the observed endpoint error for these sizes and this rule. This checks the numerical treatment of the stated model. It does not test the assumed law against a real cart or establish the results at every time. Keep the units and endpoint identical, and compare an intermediate time if that is relevant. If measured data were available, state their uncertainty separately from the numerical difference.

Learning objectives

  • Compare an exact toy solution with different numerical step sizes.
  • Distinguish numerical error from physical model error.
  • Describe what a constant-speed test does and does not check.

A numerical model approximates motion in increments. A time step, mathematical law and numerical rule all affect its results. More steps can reduce error arising from time discretization under suitable assumptions. They do not automatically repair omitted physics, a poor reference, or unrealistic inputs. This unit uses a deliberately simple nonflight cart with a known exact solution. The lesson is how to test a simulation itself before attaching meaning to its output. Use units, assumptions and a reference solution in the same record.

Separate a numerical rule from the model being solved

Imagine a cart on an ideal horizontal track with no external force. In normalized units its initial position is one and velocity is two. The exact position at time four is 1 + 2 × 4 = 9. If each model step adds current velocity times the interval and leaves velocity unchanged, the result is exact for this simple model in exact arithmetic. Try four steps of length one or eight steps of length one-half. Both give the same position. That agreement is expected because the chosen motion has a constant slope. This test can reveal a unit or indexing mistake. It cannot tell how the rule behaves under a more complicated motion law.

Now consider a separate classroom comparison with constant acceleration −1, initial position zero, initial speed two, and an endpoint at time one. This is a fictitious desk calculation with no target, launch or guidance problem. The exact position is 2 × 1 − 0.5 × 1² = 1.5. Use the simple rule “use the velocity at the start of each interval to estimate that interval’s displacement.” With one step the result is 2. With two steps, positions add 2 × 0.5 and 1.5 × 0.5, or 1.75. Four equal steps add the start velocities 2, 1.75, 1.5 and 1.25 times one quarter, yielding 1.625. The ending errors shrink from 0.5 to 0.25 to 0.125. The model itself did not change.

Compare discretization, model error and observation error

Printed output can agree from one step choice to the next and still answer the wrong real-world question. If an actual lab cart has friction with a different behavior, the constant-acceleration premise may be inappropriate. Refining the numerical step evaluates the approximation used to solve the assumed equations. Testing the underlying model asks whether those equations suit the observed system. Measuring the cart adds uncertainty about the starting state and observed position. Keep all three on separate rows. A valid numerical result may have much smaller step error than the observed uncertainty and still differ because of one of those other scopes.

When you can compute an exact solution for a simple case, use it to check that the method implements the intended law. Then choose an error quantity relevant to the final question. An endpoint comparison can agree even though intermediate values differ, so an entire time history can matter if the question concerns intervening behavior. A useful teaching check records parameters, step value, exact or higher-resolution comparison and residual. Avoid treating a smooth plot as verification. A plot created by interpolating coarse steps can look more precise than the values it displays.

Write an auditable simulation note

Report the problem definition and describe the rule in words before comparing outputs. Give the expected trend under step refinement and verify it for the simple case. If the difference stops shrinking, look for rounding or a bug, or check if the chosen comparison is being made at different times. Design a test that isolates a single factor. Civil-spaceflight courses use this discipline to understand the role of a model in a public technical claim. The lesson’s calculation remains a desk-scale educational analogy. A real flight model requires separately documented physics, validation, conditions and purpose. Record what was tested rather than using the word validated for every possible model use.

Test the reasoning in a second case

Extend the numerical test using a different known answer for the same classroom cart. At time one, the exact velocity is one even though the coarse displacement was two. In the simple method the velocity update applies the constant acceleration over the entire interval, so that endpoint velocity can be correct while position is inaccurate. A table that reports only one verified output can therefore hide an error in another output. Include the result you need. If a comparison concerns the size of a region traversed, position error matters more than an ending velocity check alone.

Work an independent half-time check. Under the stated fictional acceleration law, the exact position at time one-half is 2 × 0.5 − (0.5)²/2 = 0.875. With one half-unit step taking start velocity throughout the interval, the approximate position is one. The difference, +0.125, is a numerical error of the method under a simple model. Reporting it beside the ending residual shows what was checked at another time. If someone instead compares a quarter-time approximation to the half-time exact value, a large difference appears for a different reason. A comparison table needs matching endpoints as well as matching units.

For a final reflection, state a tolerance for the toy check before reviewing the plotted result. A chosen educational tolerance can be useful to decide whether a refinement is adequate for that exercise, even though it says nothing about a real flight requirement. The scope of the criterion is as important as the calculation used to evaluate it.

Open the classroom model workbook.

Check understanding

What does a finer step generally address in this classroom exercise?

  1. The error caused by approximating time evolution with finite intervals
    Feedback

    It does not by itself validate the physical assumptions or sensor data.

  2. A missing physical force is automatically restored
    Feedback

    The same equations can omit a force at every step size.

  3. The uncertainty of every independently measured value becomes zero
    Feedback

    Numerical approximation and measurement uncertainty have separate causes.

Further reading

Use NASA’s civil-spaceflight mechanics overview for the distinction between a physical description and an observed state. Then give a known result of the toy case as an independent numerical check.

My learning →