2 Introduction
Why perform modeling and simulation? Broadly speaking, we want to gain some insight and deepen our understanding. Science breakthroughs are possible thanks to advancements in computing and engineering - and at this intersection lies modeling and simulation. Before we can dive deeper into the code or the methods, we first need to understand the core concepts of the discipline.
2.1 Core Concepts
- System & Experiment
- Model & Simulation
2.2 What is a System?
The atmosphere is a system. An automobile is a system. A battery pack is a system. A system is a real-world thing (or things) we want to study and understand.
Some rules for using and defining systems:
- systems can be (almost) anything
- systems can be made of smaller systems
- systems must be observable
- ie, it should have some outputs
- these outputs are variables which are determined by the system
- ie, it should have some outputs
- systems can be controllable
- ie, we can provide inputs in the form of variables
- but not all inputs are controllable
- ie, we can provide inputs in the form of variables
2.3 What is an Experiment?
If a system is some real-world thing we want to study, then an experiment is the method by which we study it in physical space. To perform an experiment, we apply some conditions to the system’s inputs and measure the response of the system’s outputs.
- experiments require a system that is both observable and controllable
- performing experiments on large systems can be difficult if:
- system inputs cannot be controlled
- aka disturbance inputs
- system outputs cannot be measured
- aka internal states
- system inputs cannot be controlled
- performing experiments may be infeasible due to:
- cost: physical prototypes are good for experimentation but very expensive to make
- danger: some physical conditions cannot easily be replicated without significant risk
- limitations: some physical systems do not exist (its design may require new experimentation)
Experimentation is a fantastic scientific tool. However, its drawbacks and limitations create certain challenges. We can start to address these challenges with models.
2.4 What is a Model?
A model is a substitute which can be used to perform simplified experiments. Therefore, a model can also be called a simplified system.
- a model must always be thought of in relation to the experiment it offers for a system
- the term “model” has many common uses:
- mental: how we think about a system
- verbal: how we express a system and its behavior using words
- physical: a real-world object that mimics some properties of an actual system
- mathematical: a description of a system where relationships between variables and parameters are expressed by equations
- most laws of nature are mathematical models
2.5 What is a Simulation?
Simulation (Sim-u-la-tion), n. [F. simulation, L. simulatio.] The act of simulating, or assuming an appearance which is feigned, or not true
Derived from the Latin simulare - to pretend
Just as experiments are conducted on systems, simulations can be conducted on models. When relying on computer programs to perform simulations, it is important that the model be a mathematical one. We said that models must be considered in relation to the experiment it offers - this dictates what simulations can be run and what insight can be gained from the results.
Every simulation is comprised of two parts: experimental and model descriptions. A simulation’s experimental frame describes what experiements are fit to be performed. This frame depends on the numerical model description of the simulation and how well the computational experiment correlates to the real-world system.
2.5.1 Why Perform Simulations?
- cost: expense of compute can be mch lower than other forms of experimentation
- time: some real-world experiments are limited by the time period needed to perform them; simulations can be quickly computed and observed in simulations
- visibility: some variables may be inaccessible in the real-world; simulations offer much more transparency and introspection which is a powerful tool for understanding
- design of experiment: parameters and variables can be easily manipulated whereas achieving the same conditions in the real-world can be non-trivial
- suppression of disturbances: simulations can cut through the noise of a physical instrumentation in real-world experiments
- suppression of second-order effects: keep us focused on primary dynamics and effects
2.5.2 Why Not Perform Simulations?
- believing simulation results outside its experimental frame1
- misunderstanding limitations of a model and its corresponding simulation results (and making poor design decisions in the end)
2.6 Building Models
Building useful models requires the interseciton of several disciplines including but not limited to general experience/observations, domain knowledge, and software engineering.
In general the best approach is to build up from first principles. Start with the smallest component at the heart of the system and try to build out from there.
2.7 Analyzing Models
Aside from computing simulations, what other methods can be used to analyze models?
- sensitivity analysis: answers how sensitive model behavior is to changes in its input
- model-based diagnosis: how can certain problematic behaviors be identified and tied to model inputs
- model verification / validation: answers can the model outputs be trusted for the intended experiment
2.8 Mathematical Models
Understanding some dualities in the possible kinds of mathematical models.
- dynamic time-dependent versus static
- evolving continously over time versus at discrete time points
- quantitative versus qualitative
- describing physical distribution of quantities versus lumped quantities
- stochastic / probability-based versus deterministic
Mathematical models can also be made up of different kinds of equations.
- differential: contain time derivatives such as \(\frac{\delta x}{\delta t}\), also denoted \(\dot{x}\)
- algebraic: contain no differentiated variables
- partial differential: contain derivatives with respect to (w.r.t.) other variables than time, such as \(\frac{\delta a}{\delta t} = \frac{\delta^2a}{\delta z^2}\)
- difference: express relations between variables, e.g., at different points in time \(x(t + 1) = 3x(t) + 2\)
2.9 Summary
These concepts and terms for the foundation. Using these building blocks we are ready to commence our journey into modeling and simulation.
The Pygmalion effect is a psychological phenomenon in which high expectations lead to improved performance in a given area and low expectations lead to worse.↩︎