--- pretty_name: HyperKKL observer benchmark license: other license_name: same-as-hyperkkl-code-repository task_categories: - time-series-forecasting tags: - state-estimation - observers - kkl - nonlinear-systems - control - time-series size_categories: - 10K= 40% of the attainable precision on the unmeasured states (long memory needed); **rich** = the recent window carries almost all the information; **absolutely starved** = poor even with unbounded memory. `cartpole_b` was classified after the original analysis with the same rule (ratio 1.03, rich). Timing and input box: | plant | dt | samples per episode | T | t_ref | alpha | settle index | input range u | actuator | |---|---|---|---|---|---|---|---|---| | `battery` | 0.014835 | 2024 | 30 | 1 | 1.5 | 1011 | [-0.85, 0.85] | affine | | `bioreactor` | 0.061803 | 1620 | 100 | 1 | 0.5 | 809 | [-0.15, 0.15] (admissible interval [-0.25, 0.6]) | saturating, u_bar 0.3, back-EMF k 0.167 on x2 | | `duffing` | 0.010301 | 4856 | 50 | 1 | 3 | 2427 | [-1, 1] | saturating, u_bar 2, back-EMF k 1 on x2 | | `lorenz` | 0.011126 | 4495 | 50 | 1 | 2 | 2247 | [-1, 1] | saturating, u_bar 2, back-EMF k 0.0333 on x2 | | `quad_tank` | 0.05 | 6001 | 300 | 15 | 0.1 | 3000 | [-1, 1] | saturating, u_bar 2, back-EMF k 0.571 on x4 | | `vdp` | 0.020601 | 2429 | 50 | 1 | 1.5 | 1214 | [-1, 1] | saturating, u_bar 2, back-EMF k 0.333 on x2 | | `cartpole_b` | 0.017255 | 1740 | 30 | 1 | 1.5 | 869 | [-1, 1] | saturating, u_bar 2, back-EMF k 0.25 on x4 | | `fhn` | 0.061803 | 1620 | 100 | 2 | 0.5 | 809 | [-1, 1] | saturating, u_bar 2, back-EMF k 0.4 on x1 | | `highway_traffic` | 0.026105 | 7663 | 200 | 10 | 0.5 | 3831 | [-0.15, 0.15] (admissible interval [-0.25, 0.6]) | saturating, u_bar 0.3, back-EMF k 3.33 on x3 | | `network` | 0.043509 | 2300 | 100 | 1.5 | 0.3 | 1149 | [-1, 1] | saturating, u_bar 2, back-EMF k 0.4 on x1 | | `rossler` | 0.022252 | 7192 | 160 | 8 | 1 | 3595 | [-1, 1] | saturating, u_bar 2, back-EMF k 0.02 on x2 | | `two_link_arm` | 0.012941 | 7729 | 100 | 2 | 2 | 3864 | [-1, 1] | saturating, u_bar 2, back-EMF k 0.1 on x3 | `t_ref` is the plant's reference time (seconds per signal time unit; all input time scales are in t_ref units). `alpha` is the bandwidth of the reference KKL latent filter (exposed for KKL users; not needed otherwise). The actuator (saturating `u_eff = u_bar tanh((u - k (x_j - x_ref)) / u_bar)` with back-EMF) is part of the plant and known to the modeller in every setting. `cartpole_b` is the bounded cart-pole (a slow cart-centering loop keeps the cart on a +-2.4 m track). The original **unbounded `cartpole`** (the cart position is a random walk; spread grows 9.4x from T to 5T) failed our inclusion (boundedness) check and is **not** part of the benchmark; it is provided only as the `legacy-cartpole-*` configs for reproducibility of earlier results. ## Settings (what the modeller knows) The data are always generated by the REAL plant; the settings differ in the real plant's parameters, the sensor, and the model a model-based method may use. | setting (config suffix) | real plant | sensor noise | modeller's model | data files | |---|---|---|---|---| | `C1` | nominal parameters | white Gaussian, 3% of y_std | exact `f` (`knowledge="full"`) | `white` | | `C3-partial` | nominal parameters | white Gaussian, 3% of y_std | `f_known`: the UNMODELLED term missing (`knowledge="partial"`) | `white` (same episodes as C1) | | `C3-mismatch30` | every physical parameter off nominal by exp(+-0.3) (signs alternate over sorted names; operating-point parameters excluded) | white Gaussian, 3% | exact structure, NOMINAL parameters | `mismatch30` | | `C3-realistic` (= TEST-C3) | 30% parameter mismatch | AR(1) colored Student-t: e_k = 0.9 e_(k-1) + sqrt(1-0.81) w_k, w ~ unit-variance t(nu=3), scaled to 3% of y_std | `f_known` at NOMINAL parameters | `realistic` | `C1` and `C3-partial` share their files (the modeller's knowledge does not change the data). In `C3-mismatch30` and `C3-realistic` the trajectories `x`, `u` are identical episode by episode; only `y` differs. Process noise (all settings): Euler-Maruyama increments of 0.5% of each state's x_std per sqrt(second). A learned observer is trained on the real plant's data; a model-based filter must use the modeller's model (`code/hyperkkl_bench`: `build_plant(cfg, knowledge=...)`, nominal parameters). ## Splits and evaluation tiers Every config has six splits. All inputs stay inside the same actuator box `v(t) in [-1, 1]` (`u = u_scale v`); what changes out of distribution is the input's **shape** or **sequence**, never its amplitude. | split | episodes | inputs | role | |---|---|---|---| | `train` | 600 | 11 training families: zero, constant, step, staircase, PRBS, square, sinusoid, multisine, ramp, AM, drive ('smooth driver') | training (crossed design: each signal paired with 3 initial conditions) | | `validation` | 64 | training families, independent draws | model selection only | | `phase1` | 400 | zero input, initial conditions over the whole operating domain | autonomous (zero-input) episodes, e.g. for pre-training a base observer | | `id` | 64 | training families (except zero) and ranges, unseen seeds | in-distribution test | | `shape_ood` | 64 | waveforms never used in training (chirp, filtered noise, triangle, sawtooth), same box and frequency band | new input shapes | | `sequence_ood` | 64 | the 'drive' family (pedal-like level/ramp events) with a 'stop-and-go' event sequence: large jumps between distant levels, shorter dwells, faster ramps | new event sequences | Initial conditions are drawn from the plant's IC box (scrambled Sobol). Evaluation episodes use one signal and one initial condition each (independent units) and seeds that depend only on (plant, tier). The `train`/`validation`/`phase1` splits are those of training seed 0 of our experiments. No subsampling was applied: every episode the generator produced is included. Episodes leaving 1.5x the operating envelope are redrawn with a fresh initial condition (up to 6 times); the few that still diverge are dropped, so some splits have fewer episodes: | plant | data | train | validation | phase1 | id | shape_ood | sequence_ood | |---|---|---|---|---|---|---|---| | `battery` | white | 600 | 64 | 400 | 64 | 64 | 64 | | `battery` | mismatch30 | 600 | 64 | 400 | 64 | 64 | 64 | | `battery` | realistic | 600 | 64 | 400 | 64 | 64 | 64 | | `bioreactor` | white | 600 | 64 | 400 | 64 | 64 | 64 | | `bioreactor` | mismatch30 | 600 | 64 | 400 | 64 | 64 | 64 | | `bioreactor` | realistic | 600 | 64 | 400 | 64 | 64 | 64 | | `duffing` | white | 600 | 64 | 400 | 64 | 64 | 64 | | `duffing` | mismatch30 | 600 | 64 | 400 | 64 | 64 | 64 | | `duffing` | realistic | 600 | 64 | 400 | 64 | 64 | 64 | | `lorenz` | white | 600 | 64 | 400 | 64 | 64 | 64 | | `lorenz` | mismatch30 | 600 | 64 | 400 | 64 | 64 | 64 | | `lorenz` | realistic | 600 | 64 | 400 | 64 | 64 | 64 | | `quad_tank` | white | 600 | 64 | 400 | 64 | 64 | 64 | | `quad_tank` | mismatch30 | 600 | 64 | 400 | 64 | 64 | 64 | | `quad_tank` | realistic | 600 | 64 | 400 | 64 | 64 | 64 | | `vdp` | white | 600 | 64 | 400 | 64 | 64 | 64 | | `vdp` | mismatch30 | 600 | 64 | 400 | 64 | 64 | 64 | | `vdp` | realistic | 600 | 64 | 400 | 64 | 64 | 64 | | `cartpole_b` | white | 600 | 64 | 400 | 64 | 64 | 64 | | `cartpole_b` | mismatch30 | 600 | 64 | 400 | 64 | 64 | 64 | | `cartpole_b` | realistic | 600 | 64 | 400 | 64 | 64 | 64 | | `fhn` | white | 600 | 64 | 400 | 64 | 64 | 64 | | `fhn` | mismatch30 | 600 | 64 | 400 | 64 | 64 | 64 | | `fhn` | realistic | 600 | 64 | 400 | 64 | 64 | 64 | | `highway_traffic` | white | 600 | 64 | 400 | 64 | 64 | 64 | | `highway_traffic` | mismatch30 | 600 | 64 | 400 | 64 | 64 | 64 | | `highway_traffic` | realistic | 600 | 64 | 400 | 64 | 64 | 64 | | `network` | white | 600 | 64 | 400 | 64 | 64 | 64 | | `network` | mismatch30 | 600 | 64 | 400 | 64 | 64 | 64 | | `network` | realistic | 600 | 64 | 400 | 64 | 64 | 64 | | `rossler` | white | 600 | 64 | 399 | 64 | 64 | 64 | | `rossler` | mismatch30 | 491 | 57 | 372 | 55 | 51 | 48 | | `rossler` | realistic | 491 | 57 | 372 | 55 | 51 | 48 | | `two_link_arm` | white | 600 | 64 | 335 | 64 | 64 | 64 | | `two_link_arm` | mismatch30 | 600 | 64 | 305 | 64 | 64 | 64 | | `two_link_arm` | realistic | 600 | 64 | 305 | 64 | 64 | 64 | | `legacy_cartpole` | white | 600 | 64 | 400 | 64 | 64 | 64 | | `legacy_cartpole` | mismatch30 | 600 | 64 | 400 | 64 | 64 | 64 | | `legacy_cartpole` | realistic | 600 | 64 | 400 | 64 | 64 | 64 | ## Data format Parquet, one row per episode (zstd). Columns: | column | type | meaning | |---|---|---| | `episode` | int32 | index within the split | | `family` | string | input family (e.g. `drive`, `chirp`, `zero`) | | `x0` | list[float32] (n_x) | initial condition | | `signal` | string (JSON) | the input realisation's parameters | | `dt` | float64 | sample time (s); sample k is at t = k dt, k = 0..N | | `u` | list[float32] (N+1) | applied input, held constant over [t_k, t_(k+1)) (zero-order hold) | | `y` | list[list[float32]] (N+1, n_y) | noisy measurements | | `x` | list[list[float32]] (N+1, n_x) | true state | Per-plant metadata in `metadata/.json`: state / sensor names and indices, unmeasured indices, `x_std` / `y_std` (metric and noise scales), `x_mean`, operating domain, `dt`, `N`, `T`, `t_ref`, `alpha`, `nz`, `settle_frac` / `settle_index`, input box and actuator, IC box, nominal and 30%-mismatched parameters, the UNMODELLED term, the system config for `build_plant`, per-setting sensor model and episode counts, and SHA-256 checksums of every file. ### Loading ```python from datasets import load_dataset import numpy as np, json from huggingface_hub import hf_hub_download ds = load_dataset("Yahias21/HyperKKL-benchmark", "vdp-C3-realistic") # all six splits ep = ds["sequence_ood"].with_format("numpy")[0] x, y, u, dt = np.stack(ep["x"]), np.stack(ep["y"]), ep["u"], ep["dt"] # (N+1, n_x), (N+1, n_y), (N+1,) meta = json.load(open(hf_hub_download("Yahias21/HyperKKL-benchmark", "metadata/vdp.json", repo_type="dataset"))) ``` Or read a split directly: `pandas.read_parquet("data/vdp/realistic/id.parquet")`. ## Metric Settled NRMSE (per episode, then averaged over the 64 episodes of a tier): NRMSE = sqrt( mean_(k >= settle) mean_j ((xhat_j(k) - x_j(k)) / x_std_j)^2 ), settle = int(0.5 N) (the second half of the episode; metadata settle_index) `x_std` is fixed per plant (nominal plant, in-distribution inputs, after washout) and is the same for every setting and tier. **Unmeasured-state NRMSE** = mean over unmeasured states j of sqrt(mean_(k >= settle) (e_j(k)/x_std_j)^2). Normalised errors are clipped to [-100, 100] (non-finite -> 100); an episode is diverged if any |e_j / x_std_j| > 100 or the estimate is non-finite. Reference implementation: `code/hyperkkl_bench/metrics.py` (`settled_nrmse(x, xhat, meta)`). ## Code `code/hyperkkl_bench/` (standalone, needs torch, numpy, scipy): `systems.py`, `systems_extra.py` (battery, network), `systems_bounded.py` (cartpole_b) with each plant's true dynamics `f`, the modeller's `f_known` and the declared `UNMODELLED` term, `h`, the saturating actuator and `build_plant`; `sensors.py` (the sensor models, incl. `colored_t`); `signals.py` (input families and tier definitions); `simulate.py` (RK4 + zero-order hold step); `metrics.py`. ```python import sys; sys.path.insert(0, "code") from hyperkkl_bench import build_plant, load_meta meta = load_meta("vdp", root=".") plant = build_plant(meta["system_config"], perturb=0.3) # real plant of C3-mismatch30 / C3-realistic model = build_plant(meta["system_config"], knowledge="partial") # modeller's model of C3-partial / C3-realistic ``` ## Provenance Generated with the HyperKKL data generator (float64 RK4, input zero-order hold, process noise, then the sensor model; stored as float32). Episodes are exported from the generator's cache of our experiment runs. Exception: `C3-mismatch30` of the test plants (and of `legacy_cartpole`) was not run in our experiments; its `x`, `u` are those of `C3-realistic` (identical by construction: same seeds, same real plant) and `y` was re-drawn as white Gaussian noise (3% of y_std) with the generator's sensor function on CPU with the same seed (`metadata/.json`: `derived_white_from_realistic`). ## License Code in `code/`: the same license as the HyperKKL code repository. Data: released with the code repository under the same terms. The battery plant here is a **simulated** 2-RC cell model; no measured battery data is included. The real battery dataset used elsewhere in our work (Panasonic 18650PF Li-ion data, P. Kollmeyer) is a third-party dataset and must be obtained from its source. ## Citation ```bibtex @misc{hyperkkl_benchmark, title = {HyperKKL observer benchmark}, author = {Yahias21}, year = {2026}, note = {Citation to be added} } ``` Total size of the Parquet files: 5.24 GB.