# Fit a dynamical system to a 2 variables time series

**URL:** <https://discourse.julialang.org/t/fit-a-dynamical-system-to-a-2-variables-time-series/109003>\
**Category:** General Usage\
**Tags:** question\
**Created:** [January 19, 2024, 10:16am UTC](https://discourse.julialang.org/t/fit-a-dynamical-system-to-a-2-variables-time-series/109003 "2024-01-19T10:16:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ManuelFossa](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/manuelfossa/32/36305_2.png) [@ManuelFossa](https://discourse.julialang.org/u/ManuelFossa)\
**Post date:** [January 19, 2024, 10:16am UTC](https://discourse.julialang.org/t/fit-a-dynamical-system-to-a-2-variables-time-series/109003/1 "2024-01-19T10:16:18Z")

</div>

Hello,

I have data that consists of an N=1000 observations \* 3 columns matrix.  
the first two columns are 2 variables that condition the third one.

I used DynamicalSystems.jl to estimate the phase space portrait via delay embedding, and obtained a slow varying trajectory that I would like to fit a dynamical system model onto it.

![image](https://global.discourse-cdn.com/julialang/original/3X/4/1/41bfd8497e785eaebf8459670953279c1e612340.png)

Is there any functionality of a package to do that?

---

<div class="post-metadata">

**Author:** ![josuagrw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josuagrw/32/1015_2.png) [@josuagrw](https://discourse.julialang.org/u/josuagrw)\
**Post date:** [January 19, 2024, 10:33am UTC](https://discourse.julialang.org/t/fit-a-dynamical-system-to-a-2-variables-time-series/109003/2 "2024-01-19T10:33:44Z")

</div>

Hi, it sounds like you’re looking for this:

> **[DiffEqParamEstim.jl: Parameter Estimation for Differential Equations ·...](https://docs.sciml.ai/DiffEqParamEstim/stable/)**
>
> Documentation for DiffEqParamEstim.jl.

---

<div class="post-metadata">

**Author:** ![jClugstor](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jclugstor/32/32689_2.png) [@jClugstor](https://discourse.julialang.org/u/jClugstor)\
**Post date:** [January 19, 2024, 5:16pm UTC](https://discourse.julialang.org/t/fit-a-dynamical-system-to-a-2-variables-time-series/109003/3 "2024-01-19T17:16:18Z")

</div>

If you’re looking to identify the system just from the data, maybe take a look at [Home · DataDrivenDiffEq.jl](https://docs.sciml.ai/DataDrivenDiffEq/stable/).

---

<div class="post-metadata">

**Author:** ![ManuelFossa](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/manuelfossa/32/36305_2.png) [@ManuelFossa](https://discourse.julialang.org/u/ManuelFossa)\
**Post date:** [January 26, 2024, 1:03pm UTC](https://discourse.julialang.org/t/fit-a-dynamical-system-to-a-2-variables-time-series/109003/4 "2024-01-26T13:03:49Z")

</div>

Thank you, but if I understood the packages correctly, they still need an equation to generate the data.

---

<div class="post-metadata">

**Author:** ![josuagrw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josuagrw/32/1015_2.png) [@josuagrw](https://discourse.julialang.org/u/josuagrw)\
**Post date:** [January 26, 2024, 2:57pm UTC](https://discourse.julialang.org/t/fit-a-dynamical-system-to-a-2-variables-time-series/109003/5 "2024-01-26T14:57:16Z")

</div>

> [@ManuelFossa](#):
>
> I have data that consists of an N=1000 observations \* 3 columns matrix.

> [@ManuelFossa](#):
>
> Thank you, but if I understood the packages correctly, they still need an equation to generate the data.

so… do you _have_ data or do you need to _generate_ data?
