Mathematical models of dynamic systems
1. Mathematical models of dynamic systems
In this video, we will learn how to represent dynamic systems through models. We will focus on mathematical models and how they can be used to create Digital Twins of real-world processes.2. What is a mathematical model?
Mathematical models describe natural or human-driven systems using mathematical concepts and language. Models can be classified in several ways. They can be dynamic or non-dynamic, discrete or continuous, deterministic or probabilistic, and linear or non-linear. Models can be simple or complex depending on the needs. However, we need to remember that models are digital approximations of reality because it is often impossible to account for all possible processes of a system in a computer. George Box's quote, "All models are wrong, but some are useful." reflects on this. A useful model captures key processes determining the outcome of a system. For example, we know that the river flow shown in the image is affected by the rocks, but not all rocks impact the flow dynamics in the same way. A good model for this river simulates only the key rocks that allow capturing the main flow patterns and is useful for management and decision-making. Let's look into some examples in more detail.3. Example: model to predict natural processes
Let's continue with the example of river flow. The figure compares observed and predicted flow in a river in China. Every mathematical model needs some information to start a simulation, which we typically refer to as input data. In this case, the model used rainfall data to predict the flow. Examples of other natural process models include weather forecast models, ocean swell forecast models, and many others. Let's now look at models for human-driven activities.4. Example: model to predict human-driven activities
This figure shows a prediction of inflation in the UK developed by a bank. Such simulations can be useful to support fiscal and monetary policies and help avoid economic crises. Other examples include models for supply-chain processes, manufacturing, logistics, and others.5. General code components and structure
Mathematical models, including discrete-event models, typically have three main components. We start with input data and model parameters. The example shows an activity containing three processes, with their duration in hours stored in a dictionary. Then, we need the model engine where the calculations are defined. Typically, we first need a while-loop with an end-condition. Secondly, we need a for-loop to go through all processes. Thirdly, we need to account for the effect of each process on the system output. Once the model engine is defined, we need to configure the simulation run, which typically consists in defining the simulation period and calling the model engine.6. Model outputs
The model outputs usually provide information about the time evolution of the sequence of processes. The example shows the output of a discrete-event model for a manufacturing activity. We can see that there are four processes running sequentially: "transport of raw material", "building components", "assembling parts", and "selling product". Each process has a duration, which is reflected in the time tracking on the left. This manufacturing activity completed two supply-chain cycles in 1 month.7. Visualization of model results
Mathematical models are only helpful if they are informative for decision-making. Therefore, adequate visualization of model results is often key. Choosing the appropriate visualization methods will depend on the model's simulation objectives, but several packages provide powerful plots, including matplotlib, seaborn, and plotly. 2D line or scatter plots, like the one shown here, are commonly used to display model results. Histograms are also popular as they allow the grouping of results to understand how frequently they repeat in the model.8. Let's practice!
Let's practice to solidify some of these concepts.Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.