When Physics and Mathematics Speak the Same Language
Imagine a heating system in an industrial building. A boiler heats water, a pump forces it through pipes, valves regulate the flow, and radiators release heat into the room. Each element in this chain takes energy from one place and transfers it to another. Some energy is lost along the way – to friction in the pipes or to the heating of the valves themselves. The system abides by strict laws: energy in equals energy out, plus losses. You can't cheat this balance.
Now, imagine you want to automatically control such a system – to maintain the right temperature, prevent overheating, and conserve equipment life. For this, you need a mathematical model. And this is where the difficulties begin: real-world engineering systems are nonlinear. This means their behavior cannot be described by simple equations like «press harder, get twice as much.» In reality, the dependencies are more complex, and standard control methods start to fail.
It is for such cases that two powerful mathematical tools exist. The first is the theory of port-Hamiltonian systems. The second is the Koopman operator theory. Each has already proven its worth on its own. But a group of researchers asked the question: what happens if you combine them? The result turned out to be unexpectedly clean and practically useful.
What Is a Port-Hamiltonian System – Explained in Simple Terms
The term sounds intimidating, but it's based on a simple physical idea. Take any mechanical or electrical device. It has internal energy – kinetic, potential, electromagnetic, thermal, you name it. This internal energy is called the Hamiltonian. Next, the device has ports – points through which it exchanges energy with the outside world. A wall socket is a port. The shaft of a motor is also a port.
A port-Hamiltonian model describes a system through three things:
- How energy circulates internally – without loss, like a pendulum where kinetic energy converts to potential and back. This is handled by the so-called structure matrix, which is skew-symmetric, meaning that mathematically, it doesn't allow energy to appear from nowhere or vanish into thin air.
- How energy is lost – friction, resistance, viscosity. This is handled by the dissipation matrix, which always «pulls» energy down, never adding it.
- How energy enters and exits through ports – this is the input/output matrix, which links external actions to the internal dynamics.
The main property of such a model is passivity. This is a rigorous mathematical way of saying: the system cannot output more energy than it has received. It sounds obvious, but it is this property that allows for the construction of stable controllers. If you can control how energy enters the system through its ports, you can control the system as a whole.
The problem is that real systems are nonlinear. The equations describing a port-Hamiltonian system contain products of variables, squares, and exponentials. Solving them analytically is often a task with no closed-form solution. Numerical methods provide approximations but lose the physical structure. This is where Koopman enters the scene.
The Koopman Operator: Turning Nonlinear into Linear
Bernard O. Koopman proposed his approach back in 1931 while working on problems in mechanics. The idea is elegant: instead of tracking how the system itself moves, track how functions of the system's state change.
Let me explain with an example. Suppose you're observing a pendulum. The pendulum itself moves nonlinearly – its equation contains the sine of the angle. But if you choose the right functions of the angle and velocity – for instance, the total mechanical energy, angular momentum, or trigonometric combinations – then these functions will change according to linear laws. That is, the nonlinear dynamics of the pendulum are «lifted» into a space where they become linear.
The Koopman operator is the mathematical mechanism that describes how these observable functions evolve over time. And its time derivative – the infinitesimal generator – describes the instantaneous rate of this evolution. It is this generator that the study in question works with.
The key advantage: the Koopman operator is linear, even if the original system is nonlinear. This unlocks a vast arsenal of linear analysis methods – spectral decompositions, control methods for linear systems, and rigorous theorems on stability.
The trade-off is dimensionality. The space of functions is infinite-dimensional. You «lift» the problem from a finite number of state variables into an infinite space of observables. In practice, you have to choose a finite set of basis functions and work with an approximation. And this is where a critical question arises, one that for a long time had no clear answer.
The Problem This Work Solves
When you «lift» a port-Hamiltonian system into Koopman space and make a finite-dimensional approximation, no one could previously guarantee that this approximate model would preserve the energy structure. Passivity is a fragile property. Add a little extra in a numerical approximation, choose the wrong basis functions, and the model loses its passivity. A controller designed on such a model could destabilize the real system.
This is not an abstract problem. Engineers who work with control models know the situation well: the model works in simulation, but on real hardware, it starts to «blow up» the system. The reason is often that the numerical model failed to preserve physically significant constraints.
The study's authors asked: can the Koopman generator be decomposed in such a way that each part of the decomposition has a clear physical meaning? And can this decomposition be automatically transferred to finite-dimensional approximations, guaranteeing the preservation of passivity?
The Canonical Decomposition: Three Components of the Generator
The answer turned out to be yes. The Koopman generator for any port-Hamiltonian system can be decomposed into exactly three parts, each corresponding to one of the system's physical «layers.»
The first component is Hamiltonian, or energy-preserving. It describes the part of the dynamics where energy is neither lost nor added – it simply flows from one form to another. Mathematically, this component is skew-symmetric: if you «ask» it how much energy it adds, the answer is always zero. It's like a perfect pendulum in a vacuum – energy circulates but never disappears.
The second component is dissipative. It describes losses: friction, resistance, viscosity. Mathematically, it is positive semidefinite, which means it always «pulls» observables toward smaller values, never adding energy to the system. This is the mathematical embodiment of the second law of thermodynamics at the operator level.
The third component is the input-port. It describes the influence of external actions – everything that comes through the system's «sockets» and «shafts.» It is through this component that a controller can intervene in the dynamics.
The full Koopman generator is simply the sum of these three parts. It might not seem like a big deal. But the devil is in the details: this decomposition is not imposed on the operator externally; it follows from the mathematical structure of the operator itself. The authors proved that for any invariant measure satisfying a certain joint invariance condition (detailed in Theorem 1 of the original paper), the generator satisfies the energy dissipation inequality for a sufficiently broad class of functions.
In simpler terms: the structure appears on its own because it exists in the system's physics. The mathematics merely reveals it.
Transitioning to Finite-Dimensional Models: The Galerkin Method
An infinite-dimensional operator is beautiful in theory, but in practice, you need to work with a finite number of equations. To approximate the Koopman operator with a finite set of functions, the Galerkin method is used – a classic tool of computational mathematics.
The idea is simple: we choose a finite set of basis functions – say, polynomials, trigonometric functions, neural networks – whatever is suitable. We project the infinite-dimensional operator onto this finite basis. We get a finite-sized matrix that can be worked with numerically.
The key result of the paper is that the decomposition into three components transfers exactly to the finite-dimensional case. If you construct an approximation using the Galerkin method while preserving the decomposition's structure, the finite-dimensional matrix itself splits into a skew-symmetric part, a positive semidefinite part, and an input-port part. Passivity is guaranteed – not approximately, but exactly – within the framework of the chosen finite basis.
As a check, the authors considered linear port-Hamiltonian systems – a case for which everything is known precisely. When the state variables themselves are chosen as the observables, the Koopman decomposition recovers the original system matrices without any deviation. This is an important sanity check: the method doesn't add anything extraneous where the solution is already known.
Control via the Space of Observables
The practical value of all this lies in the ability to design controllers directly in the «lifted» space of observables, without returning to the original nonlinear equations.
The logic is as follows. We have «lifted» the system into a linear Koopman space while preserving passivity. In this space, a storage function is defined – a quadratic form of the type zTPz, where z is the vector of observables and P is a positive definite matrix. This function acts as a «generalized energy» in the space of observables.
Since the system is passive, there is a class of controllers that are guaranteed not to pump excess energy into it. Such controllers are called passivity-based controllers. Their idea is that the control action should dissipate – that is, «remove» – energy from the system, bringing it to the desired state.
To prove stability, the authors use LaSalle's invariance principle – a classic tool in control theory, named after Joseph P. LaSalle, who developed it in the 1960s. The principle states that if a Lyapunov function (in our case, the storage function) is non-increasing along the system's trajectories, then the system converges to the largest invariant set where this function is constant. If the detectability condition is met – a technical requirement ensuring that the observables can «see» all essential degrees of freedom – this invariant set coincides with the desired equilibrium state. The system is asymptotically stable.
In practical terms: if you have correctly chosen the basis functions and ensured detectability, a controller designed in Koopman space will work on the real nonlinear system – because the mathematical structure it uses was not artificially imposed but reflects the system's physics.
Why This Is Important – and Where to Apply It
Let me explain why this matters beyond academic papers.
Energy systems – power grids, thermal circuits, hydraulic machines – are physically typical port-Hamiltonian systems. They exchange energy through well-defined ports, lose some energy to dissipation, and must be controlled reliably. Traditional control methods either linearize the system around an operating point (losing accuracy during large deviations) or work with the full nonlinear equations (computationally expensive).
The approach described in this work offers a third path: linear algebra in an expanded space with a guaranteed preservation of physical structure. It combines the computational accessibility of linear methods with the physical rigor inherent in port-Hamiltonian models.
Potential applications include robotic manipulators, where controlling contact forces and preventing unstable behavior during interaction with objects is crucial. Power converters in electronics, where dynamics are nonlinear and stability requirements are strict. Biomechanical prosthetics, where the system must adapt to variable loads while maintaining an energy balance. Energy storage and distribution systems, including the integration of renewable sources into grids – a classic example where dynamics are nonlinear and volatile.
In all these cases, having a surrogate model that is both linear (and thus controllable by standard methods) and passive (and thus physically correct) is a serious engineering tool.
Limitations of the Approach – An Honest Look
It would be dishonest not to mention the limitations.
First, the quality of the entire approach heavily depends on the choice of basis functions. The Galerkin method works well if the basis is a good «fit» for the system's dynamics. But there is no universal recipe for choosing a basis. For a specific problem, this requires either expert knowledge or the use of machine learning methods for automatic selection.
Second, the dimensionality of the «lifted» space can be large. For complex systems with a high-dimensional state, a finite approximation may require hundreds or thousands of basis functions. This means large matrices and corresponding computational costs.
Third, the detectability condition, necessary to guarantee asymptotic stability, must be checked separately for each task. It is not automatically satisfied for an arbitrary choice of observables.
None of these limitations is a fundamental barrier, but each requires engineering diligence in practical application. The theory is elegant – the implementation requires care.
Conclusion: The Outcome and What It Changes
The authors have established a rigorous mathematical link between two theories that had previously developed mostly independently. Port-Hamiltonian theory could accurately describe the energy of physical systems but struggled with nonlinearity. Koopman theory could «straighten out» nonlinear systems but didn't guarantee the preservation of physical structure.
The result of their combination is a canonical decomposition of the Koopman generator that:
- Reflects the system's physics naturally, without imposing structure from the outside.
- Guarantees the preservation of passivity in finite-dimensional approximations.
- Allows for the design of controllers in a linear space with provable stability for the nonlinear system.
- For linear systems, it exactly recovers the original structure – confirming the method's correctness.
This isn't a revolution, but it is a robust fundamental result. The kind of mathematical work that, in a few years, will start appearing in the toolkits of practicing engineers – not because it's trendy, but because it works and can be rigorously justified.
Physics doesn't lie. Mathematics that respects it doesn't lie either. And it is at this intersection that systems are built to work not just in simulations, but in real-world conditions – with loads, noise, and everything else the real world throws in.