Commit 7d58c15
Switch CTRNN integration from forward Euler to exponential Euler (ETD1)
The exponential Euler method integrates the linear decay term -u/tau
exactly, making it unconditionally stable regardless of dt/tau ratio.
Forward Euler required dt < 2*tau for stability. The nonlinear forcing
term is still held constant per step (same assumption as before).
Update formula: u_new = exp(-dt/tau) * u_old + (1 - exp(-dt/tau)) * z
Test reference values regenerated for the new integrator.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 04a7371 commit 7d58c15
2 files changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | | - | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
| |||
0 commit comments