mathematics//simulation
Simulation is the execution of a model's rules to produce possible trajectories or observations, and it is used to see what a model can produce under its assumptions: a way of asking what would happen without paying for the answer. It makes assumptions operational: parameters, initial conditions and random inputs jointly determine what the model can produce. Repeated runs can explore variability within those assumptions.
Simulation is the execution of a model's rules to produce possible trajectories or observations, and it is used to see what a model can produce under its assumptions: a way of asking what would happen without paying for the answer. It makes assumptions operational: parameters, initial conditions and random inputs jointly determine what the model can produce. Repeated runs can explore variability within those assumptions.
Built from a model and an integrator (numerical integration, with discretization deciding how the continuous model becomes computable), a simulator lets an engineer try a controller without crashing drones, repeat a thousand flights with random wind and sensor errors, rehearse what nobody wants to provoke (a motor failing at 50 m, a valve sticking during a batch) and train reinforcement learning policies that need millions of attempts. PX4 and ArduPilot are tested in simulation with the same code that flies. A reasonable drone simulator carries a six-degree-of-freedom rigid body, motors and propellers with thrust growing as the square of rotor speed, some aerodynamics, sensors with noise, bias, latency and quantization, wind and a battery; none of these is optional if the controller depends on it.
Agreement with simulated data demonstrates behaviour inside the generator, not automatically in the world it imitates.
A simulator never compared with real logs is an opinion with nice plots: its gap to reality is measured, by replaying recorded flights or plant data through it, never assumed.
The two members of this family answer the two questions a simulation raises. The Monte Carlo method answers how widely can the outcome spread, by repeating the run with randomly drawn parameters and disturbances and looking at the distribution, and above all its tail. The sim-to-real gap answers how far is this from the machine, and lists where simulators go wrong and what closes the distance, from realistic noise to flight tests.
Simulation is the base of a testing ladder. Running the production code against a simulated plant is software-in-the-loop, running the real controller board against a plant simulated in real time is hardware-in-the-loop; both sit in X-in-the-loop testing, and the integrator choice there is constrained by deadlines.
Massively parallel simulation on GPUs runs thousands of copies of a robot at once, which is what made training legged locomotion policies in minutes practical; it is the engine behind most of reinforcement learning for control and behind synthetic data for perception.
A simulator is easily confused with a digital twin. The simulator describes a drone of this model; a twin describes drone number 127, kept synchronized with that unit's data by an estimator and updated as it ages.
It is often more machinery than the question needs. If a hand calculation or a spreadsheet answers it (will the battery last, does the flow fit the pipe), no simulator is required; it pays off when there is dynamics, feedback or a large number of combinations to try (flyswatter rule).