Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1.1 Introduction

This chapter is dedicated to Arjan’s 60th birthday. We were both extremely fortunate to be his Ph.D. students and have admired him, over the years, for his deep technical insights and fundamental contributions to systems and control theory. His work has influenced our own professional interests and growth in many ways.

Arjan’s discussions and work about compositions of mathematical structures over the years have been an important contribution to systems (and control) theory. This has led to some really interesting results in various allied disciplines. For example, the use of the compositionality property in spatial discretization was a wonderful concept of his. Recently, when working with wireless communication systems the first author was studying if there was an elegant way to describe the interconnection structures in wireless networks. This motivated the authors to model wireless communication systems in a port-Hamiltonian setting. It is indeed impressive that the port-Hamiltonian theory of Arjan and Bernhard Maschke can be used across so many engineering disciplines.

On a personal level, Arjan’s influence is deep. His generosity, patience and kindness are attributes that we have tried to emulate over the years. From both the authors: Arjan, thank you for some beautiful memories. And of course, happy birthday!

The design and deployment of a wireless communication system involves multiple aspects: modeling the radio signal propagation characteristics, router design, network layer routing protocols, the design of the antenna, and so on. There is a standard for describing these multiple subsystems and their interconnections, and this is the OSI (open systems interconnection) model, [11]. The OSI model partitions the functions of a communication systems into seven abstraction layers. These include, among others, the data link layer, the physical layer, and the network layer. The workings of each of these seven layers, and their interactions completely define a wireless communication system. For example, the physical layer may use a full duplex transmission mode, the MAC layer in the data link layer controls the permissions to transmit data; and the network layer implements various protocols to decide on message routing. The internal functioning of the OSI architecture is not of clear relevance (at least not directly) from a dynamical systems viewpoint, which is one of the themes of this book. What is more relevant is the traffic flow dynamics in communication systems, the way that congestion occurs in a network, the analysis of network latencies, and of course stability issues. The MAC layer and network layer protocols can be considered to be more relevant from a control viewpoint, and as such is not the focus of this chapter—which focuses entirely on modeling the traffic dynamics in a specific component—the wireless router.

Network traffic is usually considered as a sequence of arrival of data packets in a time interval, called a point process, [3], which is characterized by a set of packet arrival times \(\{t_1, t_2, \ldots \}\). Some traffic models rely on the use of stochastic processes to represent, for example, the packet arrival times \(\{t_1, t_2, \ldots \}\). The most well-known stochastic process is based on assuming that the packet arrival data is independent and the packets are exponentially distributed—this is the (memoryless) Poisson process traffic model. An important drawback of the Poisson model is that it cannot capture traffic burstines, [5], as the Poisson process assumes that the arrival rate is constant. One approach to handle this is to consider the basic process as a Poisson process and modulate the arrival rate—this leads to a Markov modulated Poisson process, [7]. Another modeling approach that considers inter-arrival times is the Markov model, which models the events in a traffic network by a finite number of states, [7]. A general problem with models which are based on inter-arrival times is that since they consider the arrival of each data packet as a separate event, there is a significant overhead. This has motivated the use of fluid flow models to describe network traffic, which characterizes traffic flow by the flow rate. Since flow rate changes much less frequently than individual packet arrival times, the computational burden is reduced [1]. The assumption is that the changes in flow rates capture the different events that occur in the network [7]. The use of graph theoretic tools to model large-scale communications network is, to the best of the authors’ knowledge, surprisingly limited, except some works such as [2, 12].

There are related issues surrounding network traffic modeling, such as congestion handling, optimal router buffer sizing, channel capacity [13], channel/link utilization, network latency, etc. Network congestion can occur due to a variety of reasons—e.g., by improper sizing of buffers in network routers [14], traffic flow exceeding actual network capacity, etc. Buffers are used to prevent packet drops and to maintain link/channel utilization.Footnote 1 The sizing of router buffers is an important area of research in network communications, [14, 23]. Too large a buffer size and network latency can be significantly degraded, too small a buffer size and we can expect channel/link utilization to be poor and even lead to buffer instability.

Existing network traffic modeling techniques do not capture the inherent physical nature of the interconnection in the data flow. The design of various advanced network protocols rely primarily on the type of traffic flow (e.g., Poisson process), [9], or the type of MAC protocols used, [4], but not on the interconnection structure itself. There is need for a network-based modeling technique which can capture the interconnection structure of each node in a communication network, as well as to model the interconnection structure of the entire network, while capturing the underlying fundamental physical laws. The framework of port-Hamiltonian systems, [1921] and energy based modeling, [17] is very well suited to this task. The concept here is that systems from different domains (mechanical, electrical, chemical, etc.) can be interconnected to form a network, and this networked system can then be modeled (and controlled) by using energy as the unifying theme, [1619, 21]. A complex physical system can be viewed as an interconnection of simpler subsystems. The interconnection, in this framework, then results in the total energy being equal to the sum of energies of individual subsystems. A fundamental result is that any (power conserving) interconnection of (multiple) port-Hamiltonian systems results in another port-Hamiltonian system, [8, 19]. Recently, the port Hamiltonian framework has been extended to modeling dynamics on graphs, [22]; an extension of this to communication networks may provide interesting results in stability and control.

1.2 Models of Wireless Communication Systems

Our objective in this work is to model the traffic flow in communication systems, from an energy viewpoint, more specifically in a Hamiltonian setting. We abstract the working methodology of the router to a set of simple differential equations—from a traffic flow viewpoint. Note that data flow in a communication network is typically considered in time slots or intervals. In this paper we make the assumption that the data flow can be described by differential equations, and thus we model the traffic flow as continuous linear time invariant systems. We focus on the data inflow/outflow, the influence of the buffer on traffic dynamics, and the analogy of dissipation in such systems. While our focus is on router traffic, the same (or similar) dynamics can also be used for other communication devices which have buffering capability.

Let \(\omega (t)\) denote the number of buffered packets in a router at time t. Let \(\omega _\xi \) denote the size of the buffered packets in the router at time t. Next, let \(\mu \) denote the number of transmitted packets by the router at time t, and finally \(\mu _\xi \) denotes the size of transmitted packets by the router at time t. We note the following constitutive relationships:

$$\begin{aligned} \omega _\xi = \frac{\omega }{q}, \quad \mu _\xi = \frac{\mu }{s} \end{aligned}$$
(1.1)

with q and s being unit-less scaling constants.

1.2.1 Router Configuration—Transmitted Data Fed Back to Receiver

First we consider the simplest possible router configuration, where the transmitted data is directly fed back to the receiver side. Further we make the following assumptions:

  • transmission is instantaneous and takes place at a fixed rate

  • reception (through the looping back) is also instantaneous (i.e., no delays)

  • no buffer overflows (infinite buffer assumed)

  • no transmission or reception losses

Then we obtain the two differential equations governing the router dynamics as

$$ \frac{\mathrm{{d}} \omega }{\mathrm{{d}}t} = -\mu , \quad \frac{\mathrm{{d}} \mu _\xi }{\mathrm{{d}}t} = \omega _\xi $$

The first differential equation, \(\frac{\mathrm{{d}} \omega }{\mathrm{{d}}t} = -\mu \) expresses that the rate of change in the number of buffered packets, \(\omega (t)\) is a function of the number of packets that have been transmitted (out of the buffer). The second differential equation, \(\frac{\mathrm{{d}} \mu _\xi }{\mathrm{{d}}t} = \omega _\xi \) expresses that the rate of change in the size of the transmitted packets is equal to the size of the buffered packets—in other words, all the buffered packets are instanteneously transmitted each time. In a Hamiltonian formulation we can rewrite the above equations as follows. First, let \((\omega , \mu _\xi )\) be the energy states and \((\omega _\xi , \mu )\) be the energy co-states. Then we define the Hamiltonian as \(H(\omega ,\mu ) = \frac{1}{2} \left( \frac{\omega ^2(t)}{q} + \mu _\xi ^2(t) s \right) \). Then we have

$$\begin{aligned} \left[ \begin{array}{c} \dot{\omega } \\ \dot{\mu _\xi } \end{array} \right] = \left[ \begin{array}{cc} 0 &{} -1 \\ 1 &{} 0 \end{array} \right] \left[ \begin{array}{c} \frac{\partial H}{\partial \omega } = \omega _\xi \\ \frac{\partial H}{\partial \mu _\xi } = \mu \end{array} \right] \end{aligned}$$
(1.2)

In fact, these are equations of a harmonic oscillator, and in this case we can compute the time rate of the Hamiltonian as

$$ \frac{\mathrm{{d}}H}{\mathrm{{d}}t} = \omega _\xi \left( -\mu \right) + \mu \omega _\xi = 0 $$

which is indeed what we expect from a harmonic oscillator system. The main assumption made in the set of Eq. (1.2) is that buffering and data transmission are instantaneous. In actual practice (always occurs during network congestion), usually only a part of the buffered data is transmitted, and the router continues buffering the remainder of the data. Clearly, the assumptions we made above are unrealistic for wireless systems. The following subsections will incorporate additional criteria to make the models more realistic.

1.2.2 Router Configuration—No Reception, Only Transmission

In the second case we assume the router is only transmitting data and is not receiving any data. We assume that the router has some data already buffered, and this data is being transmitted.

The dynamics then has the following form:

$$ \frac{\mathrm{{d}} \omega }{\mathrm{{d}}t} = -c_1 \mu , \, \, \frac{\mathrm{{d}} \mu _\xi }{\mathrm{{d}}t} = c_2 \omega _\xi $$

The interpretation of \(\frac{\mathrm{{d}} \mu _\xi }{\mathrm{{d}}t} = c_2 \omega _\xi \) is simply that the buffer does not empty its contents instantaneously, and in each time slot it can empty only \(c_2 \omega _\xi \) amount of data. Similarly, the interpretation of \(\frac{\mathrm{{d}} \omega }{\mathrm{{d}}t} = -c_1 \mu \) is that the rate of change of buffered packets is always a fraction (bounded from above by 1) of the total number of transmitted packets. If we consider the Hamiltonian, as before, \(H(\omega ,\mu ) = \frac{1}{2} \left( \frac{\omega ^2(t)}{q} + \mu _\xi ^2(t) s \right) \), we obtain the Hamiltonian dynamics as

$$\begin{aligned} \left[ \begin{array}{c} \dot{\omega } \\ \dot{\mu _\xi } \end{array} \right] = \left[ \begin{array}{cc} 0 &{} -c_1 \\ c_2 &{} 0 \end{array} \right] \left[ \begin{array}{c} \frac{\partial H}{\partial \omega } = \omega _\xi \\ \frac{\partial H}{\partial \mu _\xi } = \mu \end{array} \right] \end{aligned}$$
(1.3)

These dynamics are the same as the dynamics of a harmonic oscillator only when \(c_1=c_2=1\). The resulting time rate of change of the Hamiltonian is

$$\begin{aligned} \frac{\mathrm{{d}}H}{\mathrm{{d}}t} = \omega _\xi \left( - c_1 \mu \right) + \mu c_2 \omega _\xi = \left( c_2 - c_1 \right) \mu \omega _\xi \end{aligned}$$
(1.4)

The sign of \(\frac{\mathrm{{d}}H}{\mathrm{{d}}t}\) then depends on the relative values of \(c_1\) and \(c_2\). As an illustrative simulation, we consider a router with 1000 kb of buffered data; and a 10 kbps transmission rate; the router does not receive any data. In this example, when data transmission just starts, \(c_1=1\) and then it keeps decreasing. \(c_2=0\) at the beginning and and converges to 0.5 (toward the end of the data transmission). The left plot in Fig. 1.1 shows the buffered and transmitted packets; after about 12 time units the buffer is emptied. The right plot of Fig. 1.1 plots the time rate change of the Hamiltonian from Eq. 1.4; the total energy (Hamiltonian) is also shown in this plot (the quadratic curve). The interpretation of \(\frac{\mathrm{{d}}H}{\mathrm{{d}}t}\) being negative (i.e., \(c_2 < c_1\)) is that there are more buffered packets than transmitted packets,Footnote 2 when \(\frac{\mathrm{{d}}H}{\mathrm{{d}}t}\) becomes positive (i.e., \(c_2 > c_1\)) there are more transmitted packets than buffered packets.Footnote 3

Fig. 1.1
figure 1

Simulation response for a system with buffered data and only data transmissions. a Buffered (decreasing curve) and transmitted (increasing curve) packets; starting with 1000 buffered packets and 0 transmitted packets. The buffer is empty after 12 time units. b Rate of change of the Hamiltonian; also shown is the quadratic Hamiltonian function itself (the Hamiltonian values are scaled for easy comparison). Minimum energy corresponds to \(c_2\) = \(c_1\)

1.2.3 Router Configuration—No Transmission, Only Reception

In the third case we assume that the router is only receiving data with no data transmissions. The dynamics then has the following form:

$$ \frac{\mathrm{{d}} \omega }{\mathrm{{d}}t} = 0 + \eta , \, \, \frac{\mathrm{{d}} \mu _\xi }{\mathrm{{d}}t} = 0 $$

where \(\eta \) is the number of data packets being received by the router at time t. If we consider the Hamiltonian, as before, \(H(\omega ,\mu ) = \frac{1}{2} \left( \frac{\omega ^2(t)}{q} + \mu _\xi ^2(t) s \right) \), we obtain the Hamiltonian dynamics as

$$ \left[ \begin{array}{c} \dot{\omega } \\ \dot{\mu _\xi } \end{array} \right] = \left[ \begin{array}{cc} 0 &{} 0 \\ 0 &{} 0 \end{array} \right] \left[ \begin{array}{c} \frac{\partial H}{\partial \omega } = \omega _\xi \\ \frac{\partial H}{\partial \mu _\xi } = \mu \end{array} \right] + \left[ \begin{array}{c} 1 \\ 0 \end{array} \right] \eta $$

Then

$$ \frac{\mathrm{{d}}H}{\mathrm{{d}}t} = \omega _\xi \eta > 0, \,\, \text {if} \,\, \eta > 0 $$

In reality, the energy cannot indefinitely increase. A router does not have an infinite buffer size, and once the routers buffer capacity limit is reached it begins to discard data packets. This phenomena shall be modeled in a dissipation framework in Sect. 1.2.6. In any case, we have the implication that \(H(\omega , \mu _\xi )\) is bounded from above.

1.2.4 Router Configuration—Both Transmission and Reception Enabled

In the last case, we assume the router is both receiving and transmitting data. The dynamics then has the following form:

$$ \frac{\mathrm{{d}} \omega }{\mathrm{{d}}t} = -c_1 \mu + \eta , \, \, \frac{\mathrm{{d}} \mu _\xi }{\mathrm{{d}}t} = c_2 \omega _\xi $$

where \(\eta \) is the number of data packets being received by the router at time t. If we consider the Hamiltonian, as before, \(H(\omega ,\mu ) = \frac{1}{2} \left( \frac{\omega ^2(t)}{q} + \mu _\xi ^2(t) s \right) \), we obtain the Hamiltonian dynamics as

$$\begin{aligned} \left[ \begin{array}{c} \dot{\omega } \\ \dot{\mu _\xi } \end{array} \right] = \left[ \begin{array}{cc} 0 &{} -c_1 \\ c_2 &{} 0 \end{array} \right] \left[ \begin{array}{c} \frac{\partial H}{\partial \omega } = \omega _\xi \\ \frac{\partial H}{\partial \mu _\xi } = \mu \end{array} \right] + \left[ \begin{array}{c} 1 \\ 0 \end{array} \right] \eta \end{aligned}$$
(1.5)

Then

$$ \frac{\mathrm{{d}}H}{\mathrm{{d}}t} = \left( c_2-c_1 \right) \mu \omega _\xi + \omega _\xi \eta $$

In Fig. 1.2 we simulate the traffic of a router with varying input data rates and fixed transmission rates. Note that the minimum energy corresponds to \(c_2 = c_1\). In Fig. 1.2c the number of buffered packets, \(\omega (t)\), remains constant since input data rate is equal to transmission rate. The buffer utilization (which means the amount of buffer space utilized, ideally this should be fairly high) for the two cases when \(\eta \) is greater than or equal to the transmission rate is very good. In the first case when \(\eta \) is smaller than the transmission rate, the buffer utilization is poor. However, when \(\eta \) is much greater than the transmission rate, the buffer will quickly fill up, see Fig. 1.2e and this can lead to router instability; this will be studied in Sect. 1.3.

Fig. 1.2
figure 2

Simulation response for a system with varying input data rates and fixed transmission rates. a Input data rate = 50kbps, Transmission rate = 100 kbps. Buffered data (decreasing) and transmitted data (increasing). b Rate of change of the Hamiltonian and the quadratic Hamiltonian. c Input data rate = 100 kbps, Transmission rate = 100 kbps. Buffered data (constant) and transmitted data (increasing). d Rate of change of the Hamiltonian and the quadratic Hamiltonian. e Input data rate = 150 kbps, Transmission rate = 100 kbps. Buffered data (increasing, smaller slope) and transmitted data (increasing). f Rate of change of the Hamiltonian and the quadratic Hamiltonian

1.2.5 Dirac Structures

We have claimed that Eq. (1.5) is a port-Hamiltonian model. In this section we will prove this claim by showing that the space of flows and efforts corresponding to the interconnection structure \(\left[ \begin{array}{cc} 0 &{} -c_1 \\ c_2 &{} 0 \end{array} \right] \) is a Dirac structure. We consider the dynamics as in Eq. 1.5 and rewrite it as

$$ \left[ \begin{array}{c} \dot{\omega } \\ \dot{\mu _\xi } \end{array} \right] = \underset{J}{\underbrace{ \left[ \begin{array}{cc} 0 &{} -1 \\ 1 &{} 0 \end{array} \right] }} \left[ \begin{array}{c} \frac{\partial H}{\partial \omega } = \omega _\xi \\ \frac{\partial H}{\partial \mu _\xi } = \mu \end{array} \right] + \underset{B}{\underbrace{ \left[ \begin{array}{cc} 0 &{} 1-c_1 \\ c_2-1 &{} 0 \end{array} \right] }} \left[ \begin{array}{c} \frac{\partial H}{\partial \omega } = \omega _\xi \\ \frac{\partial H}{\partial \mu _\xi } = \mu \end{array} \right] + \left[ \begin{array}{c} 1 \\ 0 \end{array} \right] \eta $$

The matrix \(J:= \left[ \begin{array}{cc} 0 &{} -1 \\ 1 &{} 0 \end{array} \right] \) is the standard skew-symmetric Poisson structure (and hence Dirac). We denote the new matrix \(\left[ \begin{array}{cc} 0 &{} 1-c_1 \\ c_2-1 &{} 0 \end{array} \right] \) by \(\mathfrak {B}\) and call this the Buffer structure. The resulting energy balance equation will have three terms, as follows:

$$\frac{\mathrm{{d}}H}{\mathrm{{d}}t} = 0 + \left( c_2-c_1 \right) \mu \omega _\xi + \omega _\xi \eta $$

The 0 power contribution is due to the skew-symmetric Poisson structure. The \(\omega _\xi \eta \) power contribution is the supply rate. Finally, the \((c_2-c_1) \mu \omega _\xi \) is the buffered power in the system. Note that this is not the dissipated power; there is no loss of energy/power in the system. Instead, because the router is unable to transmit the entire received data in a single time slot, some data are left buffered in the router. This is given by \((c_2-c_1) \mu \omega _\xi \).

Recall the definition of a Dirac structure from [21].

Definition 1.1

A constant Dirac structure on an l-dimensional linear space, \(\mathfrak {F}\) is a linear subspace \(\mathfrak {D} \subset \mathfrak {F} \times \mathfrak {F^*}\) such that \(\mathfrak {D}=\mathfrak {D^\perp }\), where \(\perp \) is defined with respect to a bilinear form on \(\mathfrak {F} \times \mathfrak {F^*}\).

It follows that \(\langle e | f \rangle = 0, \forall (e,f) \in \mathfrak {D}\), [21].

Set \(f_s := \left[ \begin{array}{c} \dot{\omega } \\ \dot{\mu _\xi } \end{array} \right] \), \(e_s := \left[ \begin{array}{c} \frac{\partial H}{\partial \omega } \\ \frac{\partial H}{\partial \mu _\xi } \end{array} \right] \), \(e := \frac{\partial H}{\partial \omega }\) and \(f := \eta \). Denote \(x = \left[ \omega , \mu _\xi \right] ^T\). Then we have the energy balance

$$ \begin{aligned} \frac{\mathrm{{d}}H(x)}{\mathrm{{d}}t} = \frac{\partial H}{\partial x} \dot{x} =&-e_s^T f_s = \left[ \begin{array}{cc} \frac{\partial H}{\partial \omega } \frac{\partial H}{\partial \mu _\xi } \end{array} \right] \left[ \begin{array}{c} \dot{\omega } \\ \dot{\mu _\xi } \end{array} \right] \\&\Rightarrow e_s^T f_s + (c_2-c_1) \omega _\xi \mu + \frac{\partial H}{\partial \omega } \eta = 0 \\&\Rightarrow \underset{\mathrm{{stored\,power}}}{\underbrace{e_s^T f_s}} + \underset{\mathrm{{buffered\,power}}}{\underbrace{(c_2-c_1) \omega _\xi \mu }} + \underset{\mathrm{{supplied\,power}}}{\underbrace{e f}} = 0 \end{aligned} $$

Thus \(\langle \langle \cdot ,\cdot \rangle \rangle \,= 0\) and this bilinear form defines a Dirac structure for the matrix operator \(J + \mathfrak {B}\) on the space \(\mathfrak {F} \times \mathfrak {F^*}\). There is an additional term, \((c_2-c_1) \omega _\xi \mu \), which is not seen in the usual energy balance equations for standard physical systems. Denote \((c_2-c_1)\) by \(\tilde{c}\), so we have \(\tilde{c} \omega _\xi \mu \), which corresponds to the buffered energy in the system. This motivates a modified port-Hamiltonian interconnection structure, e.g., see p. 14 of [21] for the standard port-Hamiltonian interconnection structure, as follows (Fig. 1.3).

Fig. 1.3
figure 3

The port-Hamiltonian structure which includes a buffer element; note that dissipation has not yet been considered

Fig. 1.4
figure 4

Six routers, modeled as PH systems \(\varSigma _i\), with channel capacities indicated

1.2.6 Including Dissipation

The analogy of electrical or mechanical dissipation for a communication system (e.g., a single router) is related to congestion control. Wireless technologies have become very popular in the past decade. This has led to a proliferation of devices connected over a WiFi channel (such as 802.11). Inevitably, this has led to network congestion. Even in wired communication systems congestion is a commonly observed problem.

Consider Fig. 1.4 where there are six routers, each modeled as a port-Hamiltonian system as in Eq. 1.5. Router 1, denoted by \(\sum _1\), is transmitting to router 3, \(\sum _3\); and router 2, \(\sum _2\), is transmitting to router 4, \(\sum _4\). This example is strongly motivated from the example presented in [6]; we present the same example in a port-Hamiltonian context. Denote, as in [6], \(\lambda _i\) to be the sending rate of router i, and \(\tilde{\lambda }_i\) to be the actual outgoing rate of router i. Assuming there is no feedback from the network the total throughput is just 20 kbps. This is because source 2 is limited to 10 kbps because of link 5. And because source 1 is competing with source 2 (which is trying to transmit at 1000 kbps) on link 3, source 1 can only transmit at 10 kbps. Thus the total throughput is 20 kbps. However, if source 2 knew (via feedback) that it cannot exceed 10 kbps, it would not attempt to transmit at 1000 kbps, and it would simply transmit at 10 kbps. Then source 1 could have transmitted at 100 kbps. This is a form of network inefficiency and it can lead to the phenomena of congestion collapse, [6, 10]—which simply means that the achieved throughput \(\rightarrow 0\) as the offered load \(\rightarrow \infty \).

Fig. 1.5
figure 5

Simulation of network inefficiency when upstream routers do not have feedback from downstream routers. a Router1 Without feedback (light), with feedback (dark). Both buffered and transmitted packets are shown. b Router2 Without feedback (light), with feedback (dark). Both buffered and transmitted packets are shown. c Energy rate change for router 1, with (dark) and without (light) feedback. d Energy rate change for router 2, with (dark) and without (light) feedback

In Fig. 1.5 we perform simulations to model the effect of feedback on the router traffic dynamics. In Fig. 1.5a we see the buffered and transmitted packets of router 1 under conditions of no feedback and when feedback is present. Note that when feedback is not present (router 1 operates at 10 kbps throughput); when feedback is present (router 1 operates at 100 kbps) and Fig. 1.5a shows a significantly faster response time in emptying the buffer (the two dark curves until t = 150. When feedback is absent, Fig. 1.5a shows a much slower response time in emptying the buffer (takes about 1000 time units). Router 2, in Fig. 1.5b has the same response times since it continues to operate at 10 kbps throughout with or without feedback. We observe in Fig. 1.5c that the slope for \(\frac{\mathrm{{d}}H}{\mathrm{{d}}t}\) is much sharper with feedback and with the sign changing very quickly, indicating that buffer utilization is reducing faster and leading to reduced buffer stability; we will study this formally in Sect. 1.3. To implement congestion control each node (router) requires feedback from the downstream network. Feedback may be in the form of missing packets (downstream); if missing packets are detected the sources reduce their transmission rate. In congestion, control dropping packets (often deliberately) is a form of feedback control, whereby the upstream nodes detect the dropped packets and react by reducing their transmission rates. Note that a router may also drop packets if the buffer is filled up. In this paper we model the dropping of packets in the dissipation framework of port-Hamiltonian systems. This dissipation is not always present in the system dynamics; and is usually observed only during congestion and occurs at discrete time intervals. To model this we first have the following dynamics for the buffered packets:

$$ \frac{\mathrm{{d}} \omega }{\mathrm{{d}}t} = -c_1 \mu - R_\omega \omega + \eta $$

where the parameter \(R_\omega (t) \omega (t)\) models the number of dropped packets (from the buffer) at time t. We then have the corresponding port-Hamiltonian dynamics:

$$\begin{aligned} \left[ \begin{array}{c} \dot{\omega } \\ \dot{\mu _\xi } \end{array} \right] = \underset{J}{\underbrace{ \left[ \begin{array}{cc} 0 &{} -1 \\ 1 &{} 0 \end{array} \right] }} \left[ \begin{array}{c} \frac{\partial H}{\partial \omega } = \omega _\xi \\ \frac{\partial H}{\partial \mu _\xi } = \mu \end{array} \right] + \underset{\mathfrak {B}}{\underbrace{ \left[ \begin{array}{cc} 0 &{} 1-c_1 \\ c_2-1 &{} 0 \end{array} \right] }} \left[ \begin{array}{c} \frac{\partial H}{\partial \omega } \\ \frac{\partial H}{\partial \mu _\xi } \end{array} \right] - \underset{R}{\underbrace{ \left[ \begin{array}{cc} R_\omega &{} 0 \\ 0 &{} 0 \end{array} \right] }} \left[ \begin{array}{c} \frac{\partial H}{\partial \omega }\\ \frac{\partial H}{\partial \mu _\xi }\end{array} \right] + \left[ \begin{array}{c} 1 \\ 0 \end{array} \right] \eta \end{aligned}$$
(1.6)

This corresponds to the standard port-Hamiltonian input-output model with dissipation, with \(J-R = \left[ \begin{array}{cc} -R_\omega &{} -1 \\ 1 &{} 0 \end{array} \right] \). Denote: \(e:= \frac{\partial H}{\partial \omega }\), \(f:= \eta \). We then have the energy balance as

$$\begin{aligned} \frac{\mathrm{{d}}H}{\mathrm{{d}}t} = \underset{\mathrm{{stored\,power}}}{\underbrace{e_s^T f_s}} + \underset{\mathrm{{buffered\,power}}}{\underbrace{\tilde{c} \mu \omega _xi}} + \underset{\mathrm{{supplied\,power}}}{\underbrace{e f}} - \underset{\mathrm{{dissipated\,power}}}{\underbrace{R_\omega \omega _\xi ^2}} = 0 \end{aligned}$$
(1.7)

With dissipation included we obtain the complete structure of the port-Hamiltonian system for the class of communication systems considered in this paper and is as shown below (Fig. 1.6).

Fig. 1.6
figure 6

The port-Hamiltonian structure which includes a buffer element; note that dissipation has not yet been considered

1.3 Formal Characterization of Stability, Buffer Utilization, and System Latency

A fundamental problem in wireless communication networks is that of designing a scheduling policy that is guaranteed to stabilize the node buffers (i.e., a router in a network) for a given arrival process with some specified arrival rate. Related problems involve guaranteed maximum latency (i.e. delay) and buffer utilization (discussed below). While we do not discuss scheduling policies in this chapter, the concept of stability, latency, and buffer utilization will be analyzed below. A typical definition of stability for wireless networks is as follows, see [15].

Definition 1.2

(Buffer/Router Stability) Let \(\omega (t)\) be the number of packets in a routers buffer at time t. The buffer is called stable if

$$ \lim _{B \rightarrow \infty } \lim _{t \rightarrow \infty } \sup \text {Pr} \{ \omega (t) > B \} = 0 $$

The above definition simply says that a queue is stable if its asymptotic buffer overflow probability goes to zero as the buffer size, B, goes infinitely large, [15]. In other words the queue length (in the buffer) should not go to infinity! The network is called stable if all node buffers are stable.

Scheduling algorithms should also consider end-to-end delays (latency). Network delay is characterized as acceptable if,

$$ \text {Pr} \left( \frac{X^{\mathrm{{agg}}}(t)}{\lambda } \right) > \tau _d = 0 $$

where \(X^{\mathrm{{agg}}}(t)\) denotes the aggregated queue length, \(\lambda \) denotes the arrival rate, and \(\tau _d\) denotes the service time allowed to a particular task. (Assuming packets are arriving at a constant rate and all queues are First In First Out), [23]. The above definition is simply saying that the delay in the network is considered acceptable if the probability that the latency exceeds a delay threshold is zero. Another way to measure the latency is, related to the definition in [3], as follows:

Definition 1.3

(Latency) The packet latency can be defined as the ratio of the buffer size to the channel/link capacity, i.e.,

$$ \tau = \frac{B}{C} \quad \text {and} \quad \tau _{\mathrm{{current}}} = \frac{\omega (t)}{\mu (t) / s} $$

where B is the buffer sizing required to keep the link fully utilized (see Definition 1.4 and the discussion following that), \(\mu / s\) is the number of packets transmitted in a unit interval of time, and C is the channel/link capacity (in bits per sec). Note that \(\tau \) is the maximum latency possible when the buffer is full, and \(\tau _{\mathrm{{current}}}\) is the current latency experienced by a user.

Buffers add queuing delay, and this increases packet latency. Thus as the requirement on the current buffer size increases, the queuing delay (latency) proportionately increases.

A different problem exists in the utilization of the buffer.

Definition 1.4

(Buffer Utilization) (optimal) Buffer utilization is defined as the amount of buffer sizing required in order to keep the link fully utilized while ensuring latencies satisfy service times, during congestion.

While buffer utilization may be simply defined as the amount of buffer space occupied; buffer utilization is strongly linked to the channel/link utilization. The link or channel utilization must remain high always, especially during congestion. This in turn implies that a router’s buffer must never be empty, or else the link utilization can go down. Thus during congestion we can expect that the desired relation between the buffer size and channel capacity to be as follows: \(c(t) \rightarrow C \Rightarrow \omega (t) \rightarrow \tilde{B}\), where c(t) is the current channel utilization and C is the maximum channel capacity, \(\omega (t)\) captures the current buffer usage, and \(\tilde{B}\) is the congestion buffer threshold (\(\tilde{B} < B)\). Note that B is the buffer size which is calculated via a standard rule set forth in [23] and is theoretically high enough to ensure complete link utilization during congestion, see the footnote below. For example, advanced congestion control mechanisms prefer the buffer size, \(\tilde{B}\), to be as high as possible (during congestion) so that link utilization remains high—but belowFootnote 4 the typical buffer size B obtained via the [23] rule, so as to keep latencies under control.

Definition 1.5

(Link Utilization) Link utilization can be defined as the ratio of the current data transfer rate to the link capacity, i.e.,

$$ LU = \frac{\mu (t) /s}{C} $$

where \(\mu / s\) is the number of packets transmitted in a unit interval of time.

Ideally, during congestion, we require \(LU = 1\).

To summarize, the four parameters—buffer utilization, link utilization, latency, and stability—are strongly linked with each other; in the following subsection we analyze these parameters in relation to our port-Hamiltonian model, Eq. 1.5. Note that while we ignore the port Hamiltonian model with dissipation below, the same result can be easily extended to the case with dissipation.

1.3.1 Analysis of Stability, Buffer Utilization, Link Utilization, and System Latency in a Port-Hamiltonian Setting

In this section we analyze stability, latency, and buffer utilization in a port-Hamiltonian setting. Specifically, we will study the time rate of change of the Hamiltonian, \(\frac{\mathrm{{d}}H}{\mathrm{{d}}t}\) and analyze these properties. The analysis below studies how the energy balance equation directly influences these four crucial performance parameters of a communication system:

Remark 1.6

Consider the system dynamics as in Eq. 1.5 and the associated energy balance equation \(\frac{\mathrm{{d}}H}{\mathrm{{d}}t} = \left( c_2-c_1 \right) \mu \omega _\xi + \omega _\xi \eta \). Assuming that the input \(\eta (t)\) is constant, we then have the following:

  1. (1)

    \(c_2=0 \Rightarrow \frac{\mathrm{{d}}H(t)}{dt}>0\) if \(\eta (t) > \mu (t)\), and leads to decreasing buffer stability, optimal link utilization, and poor latency

  2. (2)

    \(c_2=0 \Rightarrow \frac{\mathrm{{d}}H(t)}{\mathrm{{d}}t} \le 0\) if \(\eta (t) \le \mu (t)\), and leads to increasing buffer stability, low link utilization, and low latency

  3. (3)

    \(c_1=0\) and \(\eta (t) > 0 \Rightarrow \frac{\mathrm{{d}}H}{\mathrm{{d}}t}>0\) leads to buffer instability and zero link utilization

  4. (4)

    \(c_2=c_1 \Rightarrow \frac{dH}{dt}>0\), leads to increasing buffer stability, reduced buffer utilization

  5. (5)

    For \(0 < c_2 < c_1\), a large negative \(\frac{\mathrm{{d}}H}{\mathrm{{d}}t}\) leads to improved buffer utilization but reduced buffer stability, whereas a smaller negative \(\frac{\mathrm{{d}}H}{\mathrm{{d}}t}\) leads to reduced buffer utilization and increased buffer stability.

  6. (6)

    For \(0 < c_1 < c_2\), a large positive \(\frac{\mathrm{{d}}H}{\mathrm{{d}}t}\) leads to reduced buffer utilization but increased buffer stability, whereas a smaller positive \(\frac{\mathrm{{d}}H}{\mathrm{{d}}t}\) leads to increased buffer utilization and reduced buffer stability.

We now analyze the statements made in Remark 1.6. The time rate of the Hamiltonian is \(\frac{\mathrm{{d}}H}{\mathrm{{d}}t} = \left( c_2-c_1 \right) \mu \omega _\xi + \omega _\xi \eta \).

  • \(c_2 = 0\) and \(\eta (t) > \mu (t)\): Clearly, we have that \(\frac{\mathrm{{d}}H}{\mathrm{{d}}t} \) is an increasing function. This has the implication that the number of packets in the buffer, \(\omega (t)\), will eventually exceed the buffer capacity and will lead to instability, i.e., \(\underset{t \rightarrow \infty }{\lim } \omega (t) > B\); where B is the buffer capacity threshold. The link utilization, \(LU = \frac{\mu (t) / s}{C} \rightarrow 1\) only if sufficient buffered data is always available. In the current case we have that \(\omega (t) > \mu (t)\) (at least after a finite time) implying that the requirement for buffered space is continuously increasing (and in finite time \(\omega (t) \rightarrow \tilde{B}\))—indicating high buffer utilization and thereby \(LU \rightarrow 1\).

  • \(c_2 = 0\) and \(\eta (t) < \mu (t)\): Clearly we have that \(\frac{\mathrm{{d}}H}{\mathrm{{d}}t}\) is a decreasing function. This has the implication that \(\mu (t) > \omega (t)\). Thus \(\omega (t) < B, \forall t\) and the router queue will be stable. Further, the link utilization \(LU < 1\), since \(\omega (t)\) is a decreasing function. Thus, though \(\mu (t) > \omega (t)\) we observe that \(\mu (t)\) is either a constant or a decreasing function and hence \(LU < 1\). Further, we have \(\omega (t)/\mu (t) < 1\), which will lead to poor buffer utilization.

  • \(c_2 = c_1 = 1\): This corresponds to the situation where the router does not buffer any incoming packets, it instantaneously transmits any incoming data. Then \(\frac{\mathrm{{d}}H}{\mathrm{{d}}t} = \eta \omega _\xi \). This is an ideal situation from a user perspective, since the user will not experience any delays in receiving the data. The problem with this is that the buffer remains underutilized and link utilization will be poor.

  • \(c_2 - c_1 < 1\): Denoting \(\tilde{c}\) for \(\left( c-1 \right) \) we have: \(\frac{\mathrm{{d}}H}{\mathrm{{d}}t} = \tilde{c} \mu \omega _\xi + \eta \omega _\xi , \text {with} \,\, \tilde{c}<0 \). Assume that \(\eta (t)\) is a (nonzero) constant. The larger \(\tilde{c}\) is, the more negative is \(\frac{\mathrm{{d}}h}{\mathrm{{d}}t}\), the smaller \(\tilde{c}\) is, the less negative \(\frac{\mathrm{{d}}H}{\mathrm{{d}}t}\) is. The interpretation of a large \(\tilde{c}\) is that c is fairly small, thus the number of transmitted packets at time t, is small. This can cause issues from a QoS perspective, where the user may experience significant latencies; however, the buffer utilization improves—and the system dynamics moves closer to instability. The interpretation of a smaller \(\tilde{c}\) is exactly the opposite: decreased latency (and increased QoS) and poor buffer utilization—but system dynamics has improved stability.

1.4 Compositionality Results in Communication Systems

A fundamental result in the area of port-Hamiltonian systems is that the composition of two Dirac structures is again a Dirac structure [19, 21]. If we consider the total energy to be the sum of the energies of individual physical system, then the power conserving interconnection of two port-Hamiltonian systems is again a port-Hamiltonian system [19, 21]. In this section we study the interconnection of two port-Hamiltonian systems, each representing a communication system equipped with a buffer.

In a wireless network with multiple nodes (e.g., routers), often the nodes enter into contention for channel access. When this happens, collisions occur and this can result in lost data. Further, there are other reasons for data loss—related to the physical medium—e.g., path loss, which describes the radio signal attenuation caused by free space propagation, scattering, reflection, etc. Thus, data loss in communication systems will occur in general, and especially during congestion. From a systems viewpoint we can consider the data loss (due to any of these reasons) as being a result of interconnection loss (and could be looked upon as a dissipation in the interconnection, i.e., lossy interconnection). Indeed, the following result formally captures this in the sense that when we interconnect two Dirac structures, the data loss can be captured through a lossy interconnection. The following theorem is an extension of the compositionality proof in [8].

Theorem 1.7

Let \(\mathfrak {D}_A\) denote the Dirac structure which represents router A, and let \(\mathfrak {D}_B\) denote the Dirac structure representing router B. We have \(\mathfrak {D}_A \subset \mathfrak {F}_1 \times \mathfrak {F}_1^* \times \mathfrak {F}_2 \times \mathfrak {F}_2^*\), and defined w.r.t. their bilinear forms. Then \(\mathfrak {D}_A || \mathfrak {D}_B\) is also a Dirac structure w.r.t. the bilinear form on \(\mathfrak {F}_1 \times \mathfrak {F}_1^* \times \mathfrak {F}_3 \times \mathfrak {F}_3^*\), with a lossy interconnection.

Proof

This proof follows the same spirit as that of Cervera et al. If \(\mathfrak {D}_A\) and \(\mathfrak {D}_B\) are Dirac structures, then they admit the following image representations:

$$ \begin{aligned} \mathfrak {D}_A = [E_1 \,\, F_1 \,\, E_{2A} \,\, F_{2A} \,\, 0 \,\, 0]^T \\ \mathfrak {D}_B = [0 \,\, 0 \,\, E_{2B} \,\, F_{2B} \,\, E_3 \,\, F_3]^T \end{aligned} $$

Furthermore, for the composition of the two Dirac structures we place the following constraint:

$$ e_{2A}=e_{2B}, \quad f_{2A}=-k f_{2B} $$

Then \( (f_1,e_1,f_3,e_3) \in \mathfrak {D}_A || \mathfrak {D}_B \iff \) \(\exists \lambda _A, \lambda _B\) s.t.

$$ [f_1 \,\, e_1 \,\, 0 \,\, 0 \,\, f_3 \,\, e_3]^T = \left[ \begin{array}{cccccc} E_1 &{} F_1 &{} E_{2A} &{} F_{2A} &{} 0 &{} 0 \\ 0 &{} 0 &{} E_{2B} &{} -k F_{2B} &{} E_3 &{} F_3 \end{array} \right] ^T \left[ \begin{array}{c} \lambda _A \\ \lambda _B \end{array} \right] \iff $$
$$ \begin{aligned}&\forall \left( \beta _1, \alpha _1, \beta _2, \alpha _2, \beta _3, \alpha _3 \right) s.t. \\&\left[ \begin{array}{cccccc} \beta _1&\alpha _1&\beta _2&\alpha _2&\beta _3&\alpha _3 \end{array} \right] \left[ \begin{array}{cccccc} E_1 &{} F_1 &{} E_{2A} &{} F_{2A} &{} 0 &{} 0 \\ 0 &{} 0 &{} E_{2B} &{} -k F_{2B} &{} E_3 &{} F_3 \end{array} \right] ^T = 0 \end{aligned} $$

This gives

$$ \begin{aligned} \beta _1^T f_1 + \alpha _1^T e_1 + \beta _2^T f_{2A} - k \beta _2^T f_{2A} + \alpha _2^T e_{2A} - \alpha _2^T e_{2B} + \beta _3^T f_3 + \alpha _3^Te_3 = 0 \\ \Rightarrow \beta _1^T f_1 + \alpha _1^T e_1 + \beta _3^T f_3 + \alpha _3^Te_3 + \beta _2^T f_{2A} \left( 1- k \right) = 0 \end{aligned} $$
$$ \begin{aligned}&\iff \\&\forall \left( \alpha _1, \beta _1, \alpha _2, \beta _2, \alpha _3, \beta _3 \right) s.t. \\&\left[ \begin{array}{cccccc} F_1 &{} E_1 &{} F_{2A} &{} E_{2A} &{} 0 &{} 0 \\ 0 &{} 0 &{} -k F_{2B} &{} E_{2B} &{} F_3 &{} E_3 \end{array} \right] ^T \left[ \begin{array}{cccccc} \beta _1&\alpha _1&\beta _2&\alpha _2&\beta _3&\alpha _3 \end{array} \right] = 0 \end{aligned} $$
$$ \begin{aligned}&\iff \forall \left( \alpha _1, \beta _1, \alpha _3, \beta _3 \right) \in \mathfrak {D}_A || \mathfrak {D}_B \\&\beta _1^T f_1 + \alpha _1^T e_1 + \beta _3^T f_3 + \alpha _3^Te_3 = \beta _2^T f_{2A} \left( k-1 \right) \end{aligned} $$

Thus \(\mathfrak {D}_A || \mathfrak {D}_B = \left( \mathfrak {D}_A || \mathfrak {D}_B \right) ^\perp _{diss}\) and is a Dirac structure with interconnection losses characterized by \(\beta _2^T f_{2A} \left( k-1 \right) \). \(\Box \)

Theorem 1.7 shows that, in communication networks, the interconnection of two communication systems (such as routers) is lossy. We proved that the resulting interconnection is again a Dirac structure with interconnection losses. Consider a network of N routers, each router being modeled as a port-Hamiltonian system. We have the corresponding Dirac structures \(\mathfrak {D}_i, i=1, \ldots , N\). Assume that \(\mathfrak {D}_1\) is a source sending packets, at a constant rate \(\eta (t)\), to the destination \(\mathfrak {D}_N\). Further, assume that each \(\mathfrak {D}_i, i=2, \ldots , N-1\) also receive traffic from other sources. Let us denote the interconnection losses, captured by \(\beta _2^T f_{2A} \left( k-1 \right) \) in Theorem 1.7, by \(\mathfrak {L}_{ij}, i \ne j, i=1:N-1, j=2:N\). Then we have that the total interconnection losses in the network is the sum of each interconnection loss, i.e., \(\mathfrak {L} = \overset{i=N, j=N-1}{\underset{i=1,j=2}{ \sum }}\mathfrak {L}_{ij}\). Let \(\mathfrak {L}_{\mathrm{{thresh}}}\) be the total packet losses a network can tolerate (in terms of Quality of Service, fairness, and stability measures). Then if \(\mathfrak {L} > \mathfrak {L}_{\mathrm{{thresh}}}, \forall t\) the network will experience any (or all) of these issues: degraded latency, buffer instability, and poor link utilization. In fact it is possible to show, though not in this work, that there is a cascading effect on the entire network which can lead to severe traffic congestion or even network failure.

1.5 Conclusions

In this chapter we provide a port-Hamiltonian formulation of wireless network traffic flow, under the assumption of deterministic flows. The resulting Dirac structure for such systems indicates an additional term in the power balance equation, which we term as the buffered power. The loss of packets, from the buffer, is modeled as a dissipation term in the dynamics. We analyze buffer stability, channel/link utilization, and latencies using the energy balance equation. Finally we prove that the composition of two Dirac structures, each representing a communication system with buffering capability, is again a Dirac structure but with lossy interconnection.

The work here opens interesting possibilities. One is a study of the various conservation laws and symmetries inherent in such systems. Another is the development of novel routing protocols, for e.g., using Casimirs. Another possibility can be the study of communication networks on graphs, in a port-Hamiltonian setting—where stability and performance of large-scale communication networks can be analyzed in the well-established energy modeling framework of port-Hamiltonian systems.