{
  "format": "robotparts-model-definition/1",
  "category": "actuator",
  "word": "stribeck",
  "rung": 3,
  "name": "M3.stribeck",
  "family": "static friction",
  "title": "Stribeck friction",
  "description": "Coulomb + viscous + Stribeck",
  "summary": "Friction that falls from its breakaway value to the Coulomb value as the output speeds up, plus viscous friction (the Stribeck curve).",
  "equation": "tau_r = (coulomb_friction + (breakaway_torque - coulomb_friction)*exp(-(|v|/stribeck_velocity)^stribeck_exponent))*sign(v) + viscous_friction*v; stribeck_exponent is 2 when absent",
  "since": "robotparts/2.3",
  "v2_3_kind": "stribeck",
  "inputs": {
    "v": {
      "definition": "The output's angular speed.",
      "unit": "rad/s"
    }
  },
  "state": {},
  "output": {
    "name": "tau_r",
    "definition": "The resisting torque at the output: what the motor must add to move the output as the inputs say.",
    "unit": "N·m",
    "sign": "The joint feels -tau_r (a resisting torque opposes motion; ripple pushes and pulls with angle)."
  },
  "terms": {
    "coulomb_friction": {
      "required": true,
      "key": true,
      "measured_by": "velocity plateaus, both directions, 6-8 speeds, each at least one rotor turn"
    },
    "viscous_friction": {
      "required": true,
      "key": true,
      "measured_by": "velocity plateaus, both directions, 6-8 speeds, each at least one rotor turn"
    },
    "breakaway_torque": {
      "required": true,
      "key": true,
      "measured_by": "slow plateaus below 0.5 rad/s"
    },
    "stribeck_velocity": {
      "required": true,
      "key": true,
      "measured_by": "slow plateaus below 0.5 rad/s"
    },
    "stribeck_exponent": {
      "required": false,
      "definition": "Shape exponent d of the Stribeck curve, how sharply friction falls with speed; 2 when absent.",
      "value": "number",
      "si_unit": "",
      "units": {
        "": 1
      },
      "positive": true,
      "measured_by": "slow plateaus below 0.5 rad/s",
      "default": 2
    },
    "output_inertia": {
      "required": false,
      "key": true,
      "measured_by": "chirps (or the datasheet)"
    }
  },
  "together": [],
  "exclusive": [],
  "constraints": [],
  "variants": {},
  "backends": {
    "python": {
      "how": "reference",
      "implementation": "model.py",
      "implementation_sha256": "87f9bc8becd9dd5db7e1811b349fb96eb31e422435ab4c18ed43db7ab3952a5b",
      "engine": null,
      "note": "The contract's own ruler: stdlib Python, torque(terms, inputs, state, dt) -> (tau_r, state), terms in SI."
    },
    "js": {
      "how": "reference",
      "implementation": "model.js",
      "implementation_sha256": "15bdb5ab166da818de23201e58f524d1cfb5e0604aa64ecad9f2ce51d68f1c34",
      "engine": null,
      "note": "The same equation as model.py as an ES module (torque(terms, inputs, state, dt) -> {tau, state}); tests/acceptance_v2/test_amendment_2_5.py holds the two to 1e-12."
    },
    "mujoco": {
      "how": "plugin",
      "implementation": "robotparts.mujoco",
      "engine": "mujoco",
      "maps": {
        "armature": "output_inertia",
        "frictionloss": "breakaway_torque",
        "damping": "viscous_friction"
      },
      "settings": {
        "friction_solref": {
          "definition": "The joint's solreffriction (timeconst, dampratio): how hard frictionloss sticks; MuJoCo's soft default creeps below about 0.4 rad/s on a light hinge.",
          "value": "number-list",
          "length": 2
        },
        "friction_solimp": {
          "definition": "The joint's solimpfriction (dmin, dmax, width, midpoint, power), every entry > 0.",
          "value": "number-list",
          "length": 5,
          "bounds": {
            "min": 0,
            "min_exclusive": true
          }
        }
      },
      "note": "The static level sticks natively (frictionloss = breakaway_torque); the plugin adds back what friction falls by as the output speeds up, so sliding friction is the Stribeck curve."
    }
  },
  "validity": {
    "dims": {
      "output_speed": {
        "definition": "|v|, the output speed the terms were fitted or checked across.",
        "unit": "rad/s"
      }
    },
    "assumptions": [
      "Friction depends on speed only: not on load, temperature or rest time.",
      "The curve holds across the speeds it was fitted on; below the slowest plateau the breakaway level is extrapolated."
    ]
  },
  "readme": "README.md"
}
