Skip to content
Fourohtwo

Optuna closed-loop weight tuning for Q, R, Rd, and Qf

api.autotunempc.com/v1/autotune

Optuna closed-loop weight tuning for Q, R, Rd, and Qf. The study reports overshoot and settling time and is an alternative to manual PID or hand-tuned MPC. The reply is a job id and, when enforcement is on, a job token for the later poll.

BaseAnswering
POSThttps://api.autotunempc.com/v1/autotune

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://api.autotunempc.com/v1/autotune", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"kpi":{"control_effort_weight":0.01,"max_optuna_trials":8,"settling_time_weight":1,"slew_penalty_weight":0.01,"target_max_overshoot_pct":20,"timeout_seconds":30},"scenario":{"n_steps":20,"step_reference":[1,0],"x0":[0,0]},"system":{"N":8,"kind":"nonlinear","name":"double_integrator","parameters":{"dt":0.1}}}),
});
console.log(await res.json());

Example input

{
  "kpi": {
    "control_effort_weight": 0.01,
    "max_optuna_trials": 8,
    "settling_time_weight": 1,
    "slew_penalty_weight": 0.01,
    "target_max_overshoot_pct": 20,
    "timeout_seconds": 30
  },
  "scenario": {
    "n_steps": 20,
    "step_reference": [
      1,
      0
    ],
    "x0": [
      0,
      0
    ]
  },
  "system": {
    "N": 8,
    "kind": "nonlinear",
    "name": "double_integrator",
    "parameters": {
      "dt": 0.1
    }
  }
}