System analysis: Introduction

Author

David Kneis (firstname.lastname @ tu-dresden.de)

Published

November 10, 2023

\(\leftarrow\) BACK TO TEACHING SECTION OF MY HOMEPAGE

1 What is a system?

A system is a part of reality that is either naturally or pragmatically separated from its surrounding environment. The system boundaries are chosen such that interactions between the system and the environment are either negligible (zero) or well known (i.e. easy to quantify). In this context, the term interaction typically refers to fluxes of mass, energy, individuals, or information.

The table below provides some classical examples with a hydrobiological context:

System Separated from environment by
a lake shore (from terrestrial), bottom (from aquifer)
a river basin watershed (from neighboring catchment)
a bacterial culture wall of the glass bottle or plastic tube
an individual, e.g. a pear mussel or a bacterial cell shell, skin, mucus, membrane, etc.

2 System boundaries

2.1 Boundaries are the key to balances/budgets

The adequate definition of system boundaries is the key to establishing balances (a.k.a. budgets). Balance equations take into account all fluxes into the system (counted as positive) as well as any outward bound fluxes (counted as negative). Examples:

  • the water balance of a lake
  • the energy balance of a cell

In the hydrobiological context, we are mainly concerned with the following balances:

Type of balance Examples
Mass balances Apart from water, we are typically interested in biologically limiting resources like, e.g., organic carbon, phosphorus, or bioavailable nitrogen.
Water balances A special case of mass balances. Water balances can be computed, e.g., for water bodies, soil columns, or entire landscapes.
Energy balances Can be established for organisms to understand their survival and reproduction. In the context of climate change, energy balances of lakes and oceans are of particular interest.
Balance of individuals This determines the dynamics of a population due to reproduction or immigration and the corresponding losses, due to, e.g., mortality or emigration.


Balance equations are at the heart of process-oriented mathematical models which can be used to simulate and predict system dynamics. Such process-oriented models (a.k.a. mechanistic models) must be distinguished from empirical models (a.k.a. black-box models). The table below helps to distinguish between the two major categories of models.

Model category Main characteristics Example
Process-oriented models (syn.: mechanistic m.) The model is built on the definition of a system (using boundaries) and knowledge about its internal functioning. The functioning is typically expressed via balance equations where left and right hand side are consistent with respect to units. Often built on differential equations. Lake volume tomorrow (m³) = Lake volume today (m³) + Inflow rate (m³/s) * length of day (s)
Empirical models (syn.: black-box m.) Not built on system theory. No closed budgets. The response variable (left hand side) is computed from predictors (on the right hand side) with the help of empirical coefficients. The equations are typically not consistent with respect to units (units of empirical coefficients have no physical meaning) . Manning's equation: Flow velocity = 1/n * slope^1/2 * hydraulic radius^2/3


In the following, we focus on process-oriented models. However, from time to time we may make use of empirical formulas as well.

2.2 Defining boundaries may be difficult

In reality, “everything interacts with everything”. Consequently, some pragmatism is often needed to defined the boundary of systems. The figures below illustrate some problems encountered in the context of hydro-biological systems.

Example 1: Bottom sediments are an integral part of lake ecosystems as they interact with the water body. In a typical lake, organic matter undergoes settling and is later mineralized in the sediment. The released nutrients can re-enter the water body via diffusion and possibly other dispersive or convective processes. However, as a consequence of incomplete recycling, the sediment grows constantly and very old material (found in great depth) is unlikely to interact with the water body anymore. In such a case, it is necessary to pragmatically define the system boundary by setting a cut-off depth. Sediment layers below this depth are no longer considered part of the system.

Example 2: River catchments are typically delineated based on watersheds inferred from an elevation model. However, the subsurface watershed may not be identical with its above-ground counterpart. In the figure, rain falling on the right hand slope of the mountain contributes to runoff on the left hand side catchment. The resulting error in the estimated catchment area translates into an inadequate water balance.

3 State variables, parameters, and processes

We consider a headwater catchment as in the figure below. The system is connected to its surrounding environment by water fluxes like precipitation, evaporation, and runoff.

Conceptual model of a headwater catchment.


At a closer look, these fluxes cause a changes in the system’s internal state: namely soil moisture and, with some delay, the filling of the aquifer. Runoff is generated as a function of the filling of these storages.

Let’s bring some order into the general terms used in system theory and process-oriented modeling:

Category Characteristics Examples
State variable Captures the current state of a system. Its values change over time. The unit usually does not include a time component (exception: age). Soil moisture, water level, storage volume, temperature, concentration, age, etc.
Parameter In system modeler's language, parameter is a synonyme for constant. Parameters describe system features which are considered as invariant, i.e. they do not change significantly over time. Catchment area, porosity of soil, molar mass of an element, coefficients of the Stefan-Boltzmann equation, maximum intrinsic growth rate of a bacterium
Process The phenomena triggering changes in the values of state variables. Quite often, these are fluxes accross the system boundaries but processes can also be internal to the system (like percolation in the figure above). Processes can be quantified by their rates (e.g. mm/day for precipitation) and the unit generally involves time. Fluxes of energy, mass, water (precipitation, runoff, ...), or individuals. Common system internal processes include biological growth, biochemical decay and all sorts of chemical reactions, mixing, convection, etc.

4 Balances as differential equations

Balances can typically be expresses as differential equations. As an example, we consider a lake with an in- and outflow.

Components of a simplified water balance of a lake that ignores exchange with the atmopshere and the aquifer.


If the storage volume is denoted \(V\) and the rates of in- and outflow are expressed by \(Q_{in}\) and \(Q_{out}\), we can write the water balance as

\[\dfrac{d}{dt} V = Q_{zu} - Q_{out}\]

where \(d/dt V\) represents the derivative of the volume with respect to time. In other words, the \(d/dt\) operator can be read as “rate of change of …”.

Because the inflow rate is generally variable, we can express it as a function of time \(t\). For a natural lake without antropogenic control, the outflow rate is a function of the water level \(W\).

\[\dfrac{d}{dt} V = Q_{zu}(t) - f(W)\]

The water level essentially determines the depth of the water column in the outlet channel (\(D\)) and the latter in turn controls the outflow. The relation \(Q_{out} = f(D)\) is generally non-linear and it can usually be expressed by a power law. For this particular example, we will assume \(Q_{out} = 10 * D^{5/3}\) which states that the flow rate increases faster and faster as the water level rises. This is typically so because of the shape of river channels but also because bottom friction becomes less important at higher flow depths. Finally, we have:

\[\dfrac{d}{dt} V = Q_{zu}(t) - 10 * D^{5/3}\]

Now that we came up with a differential equation: What can we do with it? Generally, we are left with two options:

  1. Dynamic solution: Differential equations can be integrated so as to compute the state of the system at a future point in time. This is also known a solving an initial value problem. In the example above, integration would turn the differential on the left hand side (\(d/dt V\)) into an expression \(V(t)\).

  2. Steady-state solution: We can compute the state that the system would approach if its boundary conditions (like all input fluxes) would be constant over very long periods of time. Knowledge about steady states (and the stability of steady states in particular) is very important for ecosystem management and protection.

Steady-state solutions can be computed in two ways:

Approach How it works When does it work
Long-term integration A dynamic solution is computed for a time point in the far future with all time-varying boundary conditions being set to a constant value. Those boundary conditions can be fluxes (e.g. inflow) but also variables that trigger fluxes (e.g. air humidity controling the evaporation flux). Always works but typically requires numerical integration.
Direct solution Here, we replace the differential on the left hand side by a zero (remember that d/dt was a synonyme for "change over time"). After setting the left hand side to zero, the equation can be rearranged to find the steady-state value of the state variable(s) of interest. Useful if the rearranged equation can be solved directly. Otherwise one might still need numerics, but now for rootfinding rather than for integration.


Let’s use the direct approach to compute a steady-state solution for the lake example above. We start with the original differential equation

\[\dfrac{d}{dt} V = Q_{zu}(t) - 10 * D^{5/3}\]

set the Left hand side set to zero

\[0 = Q_{zu}(t) - 10 * D^{5/3}\]

and rearrange for a (derived) state variable, the flow depth at the outlet:

\[D = 1/10 * Q_{in}^{3/5}\]

Note that the latter is uniquely related to the primary state variable, the storage volume, by an curve that describes the lake’s bottom topography (see hypsometric curve).

Let’s use a little R code to visualize the steady state for a range of possible inflow rates. The resulting plot is displayed just below the code.

# an equally-spaced vector of inflow rates
Qin <- seq(from=0, to=10, by=0.1)

# corresponding depths in steady-state, note the vector operation
D <- 0.1 * Qin^(3/5)

# a line style plot with axes annotations
plot(Qin, D, type="l", xlab="Inflow rate (m³/s)",
  ylab="Flow depth at lake outlet (m)"
)

# a note to avoid misinterpretation
legend("bottomright", bty="n", legend="valid for steady state conditions only")

5 What’s next?

Before we proceed with dynamic solutions of differential equations and balances of more complex hydrobiological systems, let’s spent some time on learning the basics of R.