# Energy in System Dynamics Models

### Kinetic Energy

Energy, a familiar concept in Newtonian mechanics, is a valuable way of describing behaviour in system dynamics models. For example, consider a stock with a constant flow, figure 1:

For a positive value of f, stock x increases uniformly over time. The top graph of figure 2 shows its behaviour for an initial value of x =1, with f = 0.2. By time 20, x has become 5 due to accumulation from the flow.

Stock x is changing and can be assigned kinetic energy, similar to a moving particle. In mechanics, kinetic energy is 1/2 mv2, where m is the mass of a particle and v is its velocity. The net rate of change of a stock is the equivalent of “velocity” if the stock value is thought of as position. But it has no equivalent of mass, for reasons explained later. So I define a stock’s kinetic energy as half its rate of change squared, which for x in figure 1 gives 1/2 f2.

The bottom graph of figure 2 shows the kinetic energy of x is constant because its rate of change does not vary. Put another way, no forces are acting on stock x to cause its acceleration. That is, there are no stock or exogenous signals influencing x’s flow. Kinetic energy measures activity in a stock.

### Energy Sink

Now place a first-order balancing loop on stock x, figure 3. I interpret loops as a “force” acting on a stock. This loop is like a frictional force because the larger the stock, the more material is removed. The result is that the uniform growth in x of figure 1 becomes a curve, with x slowing down to reach a limit, figure 4, top graph. Loop B is a decelerating force.

From an energy perspective, loop B is doing work on the stock, reducing its kinetic energy, figure 4 bottom graph. This “work done” is negative, removing energy from the stock. I describe first-order balancing loops as energy sinks. They play an important role in bringing a system to equilibrium and thus giving control.

The definition of work done is a bit more mathematical and beyond the scope of this post. However, it is an accumulation measuring how much work is done between the start and end times. Thus, work done describes the loop’s behaviour over the entire time horizon, not just at any point in time.

Energy balances in this system. Notice that the difference between the kinetic energy and B’s work done is constant as they follow the same shaped curve, figure 4. The change in kinetic energy is equal to the work done by B, both negative in this case.

### Energy Source

If a first-order balancing loop is an energy sink, then a first-order reinforcing loop is an energy source. Figure 5 has a stock with both types of loops.

If R has a larger gain than B (a>d) then the stock grows and accelerates exponentially, figure 6. Source R puts more energy into the stock than sink B removes. Hence, x increases in kinetic energy, the cause of its acceleration – its upward curvature.

The energy balance equation is: change in kinetic energy of x = work done by R + work done by B.

### Units and Dimensions

If stock x has dimensions [X], and time is [T], then the flow has dimensions [X/T]. It follows that kinetic energy and work done have dimensions [X2/T2]. Thus, energy in system dynamics has well-defined units.

### Multiple Stocks

Energy balances in a single stock-flow system if account is taken of the work done by loops and other stocks. In figure 7, stock y does work on stock x, changing the latter’s kinetic energy. However, energy is not balanced in the whole system. Although y does work on x, x is not doing work on y. Energy balance in stock y must be applied separately to that of x. Indeed, their energies are in different units with insufficient converters to harmonise them.

To balance the energy of the whole system, complete the feedback loop by letting x influence y, e.g. figure 8. This system is fully conserved. The energy injected into y by x balances that injected by x into y. Indeed, second-order balancing loops are the only feedback structure that exchanges energy between stocks in a conserved way.

Had the feedback in figure 8 been an order two reinforcing loop, then that loop would act as a source injecting energy into the whole system. If that source is taken into account, then a single energy balance can still be constructed for the entire system. It contains enough converters to harmonise the energy units of both stocks.

### Use of Energy

In our recent paper in the System Dynamics Review, my co-author and I defined energy and applied it to model analysis. We used the overshoot and collapse model as an example, figure 9. The model contains two stocks. Each has a source and sink, R1 and B1 on Deer, and R2 and B2 on Vegetation. Loop B3 is second-order and exchanges energy between the two stocks. To avoid collapse and achieve a measure of equilibrium, sufficient energy needs to be dissipated overall. In the paper, we show how energy balance can help explain the collapse and suggests modifications to avoid collapse. But that is for another post. In the meantime, read the paper!

1. The formal definition of kinetic energy appears in The Concept of Energy in the Analysis of System Dynamics Models. (Hayward J. & Roach P.A., System Dynamics Review, DOI: 10.1002/sdr.1700, 2022).
2. The paper Newton’s Laws as an Interpretive Framework in System Dynamics introduced the concept of force. (Hayward J. & Roach P.A. System Dynamics Review, 33(3-4), 183-218.  DOI: 10.1002/sdr.1586, 2017.)
3. There are two flows in the figure 3 model. The rate of change of x is f-g, giving kinetic energy is 1/2 (f-g)2.
4. See the paper in 1.
5. The paper in 1 gives the formal definition of work done. For first-order loops, it is the integral of the loop impact multiplied by the rate of change squared.
6. We consider the system in figure 7 in papers in 1 and in 2.
7. In the paper in 1, we show an order two balancing loop conserves energy for any non-linearity, regardless of many other structures in the system.

# Force and Impact

In mechanics, force produces acceleration in an object. The same concept can be used in system dynamics to describe how any time-varying signal can cause acceleration in a stock – a dynamic variable. That signal may be exogenous or come from another stock. In the Newtonian Interpretive Framework, the effect of the force is measured by impact, the ratio of the acceleration of the stock to its rate of change – net flow; the equivalent of velocity. If x is a stock, the impact of all forces on the stock gives:

Thus, force and impact have different sign conventions depending on the net flow dx/dt.

To compare these differences, imagine you are sitting at the origin where there is a positive force on nearby objects – repelling force. If the object is at rest, the force accelerates it, causing it to move away. If the object is already moving away, the force still accelerates it, moving it away faster. The positive force produces positive acceleration. From the impact equation (1), the impact of the force on the stock is positive as both numerator and denominator are positive.

But if an object is moving toward you, the positive force tries to slow the object in order to stop it and send it away again. Thus, the object decelerates. A positive force now has a negative effect on the object. From equation (1) the impact of the force on the object is negative as the denominator dx/dt is negative for an object move toward the origin.

Therefore, a positive force may have a positive impact, or a negative impact, depending on whether the object is moving away, or moving towards, the origin. Impact picks up the effect of the force on the object.

The same comparison between force and impact applies in system dynamics. Consider a stock y exerting a positive force on stock x, figure1. A positive force has g > 0. Stock x is also subject to a negative force, the balancing feedback loop B, a resistive force.

The flow g is set to a constant, g = 1, so that y increases uniformly, starting from zero. Thus, the force of y on x is constant and positive, equal to one. With x starting at 100, the force from the balancing loop is much larger than that of y; thus, x declines, figure 2. Thus, dx/dt < 0 and the impact of y on x is negative, the dashed line in figure 2. A positive force, but a negative impact. The impact of loop B is also negative as the loop is balancing, dotted line figure 2. Figure 2. Stock x, left axis. The impacts of y and loop B on x. Positive force, g = 1.

Initially, loop B exerts the strongest force on x, indicated by its impact having greater magnitude that that from y. At time 4.5, the impact of y exceeds the balancing loop. It is this exogenous force that is responsible for bringing the stock to rest, a momentary equilibrium, at time 8.0 .

After this minimum point, the stock x starts to increase again, driven by the force from y now acting as an accelerator. A positive force with a positive impact, indicated in figure 2 by the dashed line jumping from negative to positive. Impact from y on x is momentarily infinite at x‘s minimum, as dx/dt = 0.

From time = 8 onward, the balancing loop B is resisting the positive force from y, but it remains smaller. As time tends to infinity, the impact of y on x tends to the absolute value of the impact of B, with x tending to uniform increase.

The situation is reversed if the force is negative – an attracting force. In the model of figure 1, a negative force occurs if g < 0 . Let g = -1 with y starting at 50. Stock x increases to a maximum, then declines, figure 3. Figure 3. Stock x, left axis. The impacts of y and loop B on x. Positive force, g = -1.

Figure 3 shows the impact of y on x is the same as that for the positive force, figure 2. Up to the maximum point, the negative force has a negative impact, slowing the growth of x. After the maximum, the negative force has a positive impact, accelerating the decline of x.

An advantage of measuring the force by impact is that the sign of the impact matches the type of behaviour, plus mean acceleration, minus meaning deceleration. It follows that impact is related to the curvature in the graph of the stock. A further advantage of impact is that if the force comes from a first-order loop, impact is positive, with a negative sign for balancing loops. Thus, impact is a natural way of measuring force in system dynamics.

For more information read Hayward J. & Roach P.A. (2017). Newton’s Laws as an Interpretive Framework in System Dynamics. System Dynamics Review, 33(3-4), 183-218.  DOI: 10.1002/sdr.1586.

 Although a first-order balancing loop can bring a stock to rest (equilibrium), it only does so in the limit as time tends to infinity. It requires an exogenous effect, or a higher-order loop, to bring a stock to rest in a finite time.

 The force from y to x can also be made negative by altering the connection between y and the flow into x such that a rising y gives falling flow, e.g. f1 = 1/y.

# Balancing Loops: Growth and Decline

Early on in a system dynamics (SD) course, it is usual for a learner to be introduced to two types of first-order balancing loops: one where the stock grows, and one where the stock declines.

### Death Process

Take the decline situation first. If there are no births or migration, a population will decline over time through deaths, figure 1:

The population declines exponentially, figure 2. I have sometimes heard it said that the stock declines because of the balancing loop. But this is not true. The role of the balancing loop is to SLOW the decline. The stock declines because deaths are an outflow subtracting people from the stock! If there were no loop, the decline would be straight. By the way, there are issues with this model, which I will return to at the end.

In figure 1 note that loop B has one positive polarity and one negative polarity. The plus is a same way link, and the minus is a subtract from link because it is attached to a stock. It is the subtract from link that ensures the stock declines. You could read this as: the fewer in the population, the fewer deaths, thus fewer are subtracted from the population. The “fewer subtracted” is the control that slows the decline. Do not say: the more population, the more deaths, thus the less population! Firstly, in this case, there cannot be “more population” as there is only an outflow. Secondly, even if there were an inflow that could allow more population, the last part should then read: “the more is subtracted from the stock.” It is then clear the action of the loop is opposing the initial intention, thus is giving control.

### Goal-Seeking Process

The other example of a balancing loop SD learners usually see is the goal-seeking process. Employees are recruited with the rate of recruitment proportional to the vacancies. There is a target number of employees. Thus, the vacancies are the target minus the shortfall, figure 3.

The population grows as new employees are recruited, but the growth slows down as the vacancies are reduced, figure 4. The more employees, the fewer vacancies, thus less recruitment, therefore the fewer employees added. As in the death process, the role of the balancing loop is to slow the changes, but this time it slows the growth of the stock. If there were no loop, then growth would be linear. The curve is negative exponential, but it approaches the limit from below, unlike figure 2, where it is approached from above.

The negative polarity in figure 3 is an opposite way link. The plus on the connector into the recruitment flow is a same way link. However, the plus on the flow into the stock is an add to link. Thus positive polarities are interpreted differently if the plus is on a connector or a flow, same way, add to. Likewise with negative polarities: opposite way for a connector, subtract from for a flow.

First-order balancing loops are decelerating forces. They oppose uniform changes in a stock. Contrast this with first-order reinforcing loops which are accelerating forces, which enhance the changes in the stock. Put another way, first-order balancing loops are dissipation forces whereas first-order reinforcing loops are generative forces, a bit like a heat source. This is the sociomechanics interpretation.

### Postscript

I said earlier there were some issues with the death model of figure 1. I set a death rate of 10%, which gives a typical lifetime of 10 years (or thereabouts as there are logs involved.) Yet there are still many individuals left after 10 years. Indeed there are still some after 40 years! Why? The type of SD used here has continuous time. The stock is an aggregation of individuals, and it is assumed the individuals are homogeneously mixed in all their properties – including age – at all times. But if deaths are the only process, then this assumption will be broken, because as time passes, the remaining individuals get older. In fact, the stock would decline as a straight line as the death rate would increase as the average age of the stock goes up. This type of SD is not meant to capture this type of situation – instead, it needs incremental time and conveyors. In most models, births accompany the deaths so that the stock stays reasonably mixed in age structure. In these cases, the death model works fine.

# Reinforcing Loops and Growth

I have often seen the following causal loop used in system dynamics presentations to explain a reinforcing loop:

Figure 1: Causal Loop Diagram of Simple Birth Process

The argument then runs: the more population, the more births, hence more in the population; thus the population grows. Fortunately, I never hear people reverse the argument: the fewer in the population, the fewer births, hence fewer in the population! Clearly not true. If the only process on the population is births, it must grow. In fact, the population will grow even if births stay constant.

The problem with a causal loop diagram is that it does not give any information about which variables are stocks, and thus accumulate. Every causal loop must have at least one stock; otherwise, time does not advance, and there is a circular definition. In the above, Population is a stock, and births are a flow. Thus, the argument should read: the more population, the more births, thus the more are added to the population.

The + sign on the link to births means “same way” that is the births change the same way as the population. If the population goes up, then so do births; if the population goes down so do the births.

However, the + sign on Population means “add to”. If the births go up, more are added to the population; however, if births go down, less are added to the population. But the population still increases because it is being added to.

Figure 2: Stock-Flow Diagram of Simple Birth Process

Now it is clear that the stock Population is being added to. The reinforcing loop describes a process where the births being added to the population is increasing. Thus the population growth accelerates:

Figure 3: Accelerating Growth for 1-Stock Reinforcing Loop (per capita rate of growth 0.2 per unit time)

The reinforcing loop gives accelerating growth. Acceleration is the characteristic behaviour of a reinforcing loop containing only one stock. Acceleration is portrayed as a curve becoming more vertical, figure 3. If, however, the reinforcing loop is broken:

Figure 4: Stock-Flow diagram of Constant Growth

then the resulting growth has no acceleration and appears as a straight line:

Figure 5: Uniform Growth of a Stock with a Constant Flow (births = 1 person per year)

The absence of the loop does not mean the absence of growth, but the absence of acceleration. If there is growth, then it is uniform.

In this way a reinforcing loop (figure 2) can be pictured as a force on a stock, producing acceleration (figure 3) – the equivalent of Newton’s second law of motion. The absence of a loop (figure 4) is like the absence of a force – Newton’s first law of motion – producing uniform growth (figure 5). This analogy is an example of the Newtonian Interpretative Framework which lies at the heart of Sociomechanics, which seeks to explain social behaviour using ideas from mechanics.