# Examples of dynamical physical systems with exogenous inputs described by UDEs

**URL:** https://discourse.julialang.org/t/examples-of-dynamical-physical-systems-with-exogenous-inputs-described-by-udes/133373
**Category:** Modelling & Simulations
**Tags:** diffeq, sciml
**Created:** [October 23, 2025, 8:20am UTC](https://discourse.julialang.org/t/examples-of-dynamical-physical-systems-with-exogenous-inputs-described-by-udes/133373 "2025-10-23T08:20:08Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Emil\_Martinsen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/emil_martinsen/32/219121_2.png) [@Emil\_Martinsen](https://discourse.julialang.org/u/Emil_Martinsen)
#### Post date: [October 23, 2025, 8:20am UTC](https://discourse.julialang.org/t/examples-of-dynamical-physical-systems-with-exogenous-inputs-described-by-udes/133373/1 "2025-10-23T08:20:08Z")

</div>

Can anyone point me to some good examples (code, papers, tutorials) of a dynamical physical system that are modelled with UDEs, i.e., ODEs where parts are known and other parts are unknown and modelled by a neural network, i.e. on the form:

\frac{dx}{dt} = f\_{known}(t,x(t), u(t),p) + NN(t,x(t),u(t),p),

where x(t) is the state(s) of the system and u(t) is the time-varying exogenous inputs.

The UDEs could, e.g., describe mass or energy balances.

I have looked alot into these two examples:

- Lotka-Volterra UDE (no exogenous inputs, simulated data):  
[Automatically Discover Missing Physics by Embedding Machine Learning into Differential Equations · Overview of Julia's SciML](https://docs.sciml.ai/Overview/stable/showcase/missing_physics/#autocomplete)
- Hammerstein system w. exogenous inputs (rhs is pure NN):  
[Handling Exogenous Input Signals · SciMLSensitivity.jl](https://docs.sciml.ai/SciMLSensitivity/dev/examples/ode/exogenous_input/)

But other than that, it is difficult to find good examples to get inspiration from. Maybe I am just looking the wrong places.

Thx! 🙂

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [October 23, 2025, 9:13am UTC](https://discourse.julialang.org/t/examples-of-dynamical-physical-systems-with-exogenous-inputs-described-by-udes/133373/2 "2025-10-23T09:13:58Z")

</div>

> [@Emil\_Martinsen](#):
>
> where x(t) is the state(s) of the system and u(t) is the time-varying exogenous inputs.

Not sure if there’s a good example online of this exact form right now? I mean you’d just use DataInterpolations.jl with it, so there’s not much to it. @SebastianM-C do you have a good example to point to?

---

<div class="post-metadata">

### Author: ![Emil\_Martinsen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/emil_martinsen/32/219121_2.png) [@Emil\_Martinsen](https://discourse.julialang.org/u/Emil_Martinsen)
#### Post date: [October 27, 2025, 3:31pm UTC](https://discourse.julialang.org/t/examples-of-dynamical-physical-systems-with-exogenous-inputs-described-by-udes/133373/3 "2025-10-27T15:31:56Z")

</div>

Hi Chris, thx for your reply. Fair. Yes I use DataInterpolations.jl for the inputs. My main challenge is that the gradient computation of the loss functions seems to be extremely slow with my setup. It seems like something is wrong or done in a inefficient way.

So I made a new post with a MWE of my setup - maybe you or someone else can see what is missing.

Link to post:

> [@AD of UDEs - how to set it up?](https://discourse.julialang.org/t/ad-of-udes-how-to-set-it-up/133461):
>
> Hi! Im new to Julia and SciML but I am really curious to see how combining ODE’s with neural network could improve the predictive performance of the model we are developing for solvent-based CO2 capture. My current setup includes dynamic states, multiple independent timeseries of real data exogenous inputs, unknown dynamics modelled as a neural network (NN). I use DataInterpolations.jl to handle the inputs. I want to train the NN by minimising a loss function (MSE across all the independent…

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [October 27, 2025, 3:42pm UTC](https://discourse.julialang.org/t/examples-of-dynamical-physical-systems-with-exogenous-inputs-described-by-udes/133373/4 "2025-10-27T15:42:48Z")

</div>

I have a small example here

> **[SciML: Adaptive Universal Differential Equation · LowLevelParticleFilters...](https://baggepinnen.github.io/LowLevelParticleFilters.jl/stable/friction_nn_example/)**
>
> Documentation for LowLevelParticleFilters Documentation.

it learns the network weights online, i.e., no separate training and using phases.

There’s another example here from an ongoing pet project of mine

> **[SciML: Learning a sunshine disturbance model · LowLevelParticleFilters...](https://baggepinnen.github.io/LowLevelParticleFilters.jl/stable/thermal_nn_example/)**
>
> Documentation for LowLevelParticleFilters Documentation.

it uses a slightly simpler function approximator than an NN though.

---

<div class="post-metadata">

### Author: ![SebastianM-C](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sebastianm-c/32/2480_2.png) [@SebastianM-C](https://discourse.julialang.org/u/SebastianM-C)
#### Post date: [October 31, 2025, 12:55pm UTC](https://discourse.julialang.org/t/examples-of-dynamical-physical-systems-with-exogenous-inputs-described-by-udes/133373/5 "2025-10-31T12:55:21Z")

</div>

I also have an example with [Experimental Design for Missing Physics - ScienceDirect](https://www.sciencedirect.com/science/article/pii/S240589632500552X)

This is also showcased in [Optimal Data Gathering for Missing Physics · Overview of Julia's SciML](https://docs.sciml.ai/Overview/stable/showcase/optimal_data_gathering_for_missing_physics/)
