Uncertain Differential Equations in Excel | Vose Software

ModelRisk example · General techniques

Missile Flight: Differential Equations

A missile with air friction: where does it land, how sure are we, and what friction do the observations imply?

  • Complexity: ★★★★★
  • Free Excel workbook (GU-27)
  • Needs ModelRisk: free trial

From the model’s saved run

The flight

VoseODE in every simulation, with uncertain launch speed and friction.

MeasureUnit5th pctMedian95th pctMean
Rangem40.146.552.646.5
Flight times4.444.624.814.62
Maximum heightm28.931.033.231.0
Chance of a range above the long-flight mark17.8%
Range

The business question

A missile leaves a 10 m platform at 25 m/s and 60°. Air friction slows it in proportion to its speed, and gravity pulls it down: four ordinary differential equations. The original examples solved them with VoseODE and used Excel's Solver, and in the stochastic version VBA macros, to find when the missile lands and to fit the friction to observations.

This version needs neither: VoseODE gives the trajectory every tenth of a second, the landing is where the height crosses zero, and the fit is a search over friction values. Launch speed and friction are uncertain, so every simulation flies a different missile.

Who it is for
Engineers and scientists whose models are differential equations with uncertain parameters: trajectories, pharmacokinetics, population dynamics, reaction kinetics, epidemics.
Main outputs
The range, flight time and maximum height: mean and percentiles · the chance of a range above 50 m · what drives the range · the friction fitted to four observed positions · VoseODE's results against the exact solution.

How the model works

Five sheets after this one, read from left to right. Each one feeds the next.

  1. Inputs sheet

    Launch speed and friction as Lognormal distributions (the original Missile 3's); the angle, launch height and gravity; VoseODE's time step.

  2. Fit sheet

    Four observed positions (Missile 2). For each friction value on a fine grid, the exact trajectory's squared error. The best value and a parabola through its neighbours give the least-squares friction.

  3. Flight sheet

    The four equations as text, the variables and their starting values. The landing interpolated from the VoseODE trajectory where the height turns negative; the exact landing (Newton's method) as a check.

  4. Trajectory sheet

    VoseODE(name, equations, start, step, time stamps, names, starting values): speeds and position at 70 times.

  5. Results sheet

    The range, flight time and height, their percentiles, and what drives the range.

ModelRisk techniques

  • Differential equations VoseODE
  • Landing point by interpolation
  • Exact solution by Newton's method
  • Least-squares fit by grid search
  • Lognormal speed and friction
  • Conditional-mean drivers

Find similar models

Product

The results in detail

Checks on the method

VoseODE against the exact solution, and the friction the observations imply.

Height over time — 5th / 50th / 95th percentile band
What drives the range: mean range with each input low or high
MeasureUnitValue
Mean range, VoseODEm46.46
Mean range, exact solutionm46.37
Fitted friction (Fit sheet)per second0.0984
Friction's mean on the Inputs sheetper second0.1000
The ranking as a table 2 inputs
Input (ranked by influence)Lowest meanHighest meanRank
Air friction40.451.51
Launch speed42.850.22

How to read these results

  • The missile flies about 46 m (median), and nine flights in ten land between about 40 and 52.5 m; about one in six goes beyond 50 m. It stays aloft about 4.6 s and climbs to about 31 m.
  • Friction drives the range's uncertainty although the range is far more sensitive to speed: a 1% faster launch adds 1.6% to the range, 1% more friction takes away only 0.25%. Friction is simply ten times as uncertain (± 29% against ± 3%).
  • VoseODE solves the four equations in every simulation. The landing is where the height crosses zero, interpolated between two time stamps, with no Solver and no macros. The exact solution agrees to about 0.1 m: the difference is VoseODE's time step.
  • The four observed positions imply a friction of about 0.098 per second (Fit sheet), close to the 0.1 assumed for the launch: the fit is a search over friction values, not Solver.

See it move. Open the workbook, change an input on the Inputs sheet and run the simulation: every table and chart on this page updates in Excel.

Inputs and assumptions

Every assumption in the model, with its uncertainty and where it comes from. The figures are illustrative.

Uncertain launch 2 inputs

Lognormal(mean, standard deviation): the original Missile 3's.

AssumptionUnitUncertaintyLowMost likelyHigh
Launch speedMean 25 m/s, standard deviation 0.7m/sLognormal25.000.70–
Air frictionMean 0.1, standard deviation 0.029: compare the fit on the Fit sheetper secondLognormal0.1000.029–
Fixed launch conditions 5 inputs
AssumptionUnitValue
Launch angledegrees60
Launch heightm10.0
Gravitym/s²9.81
VoseODE time stepSmaller: more accurate, slowers0.010
A long flight: range abovem50

Units and conventions

Friction
Per second: the deceleration is friction × speed.
Range
Horizontal distance from the platform when the missile reaches the ground (height 0).

Key assumptions and limitations

Physics
Friction proportional to speed (linear drag), constant gravity, no wind, flat ground.
Integration
VoseODE steps through time; a smaller step is more accurate and slower. The exact solution on the Flight sheet shows the step's error.
Data
Launch, observations and uncertainty are those of ModelRisk's earlier Missile, Missile 2 and Missile 3 examples. Missile 3 re-ran Solver with VBA macros in every iteration; this version has no macros.

How to use it

  1. Set the launch and the uncertainty on the Inputs sheet; replace the observations on the Fit sheet.
  2. Run a simulation from the ModelRisk ribbon (10,000 samples with a fixed seed are set).
  3. To model other dynamics, rewrite the equations and variables on the Flight sheet; VoseODE solves any system of first-order equations.

The tornado chart fills in after a simulation with ModelRisk’s classic engine.

ModelRisk functions used

VoseODE
Solves ordinary differential equations given as text, at chosen times.
VoseLognormal
Launch speed and friction, uncertain.
VoseSimSensitivityMean
The mean range when each input is low or high: what drives it.
VoseSimMean, VoseSimPercentile, VoseSimProbability
Statistics of the simulation.

Further reading