Force Balance: Spring vs Gravity
Tune the spring stiffness so the spring force balances the load's weight at the target deflection — reading force equilibrium straight off a real simulation.
Try this first — before any explanation.
Same device, but now the mass is right (0.5 kg) and the SPRING is wrong: stiffness 20 N/m, so the load sags all the way to -0.245 m. The spec deflection is -0.10 m. Tune the stiffness until the spring force balances gravity exactly there.
Edit the MJCF device model and simulate it on real MuJoCo physics — tune the parameter so the part settles at the spec.
The idea, built visually.
At rest, nothing moves because the forces cancel: the spring pulling up equals gravity pulling down. Spring force is stiffness times stretch; weight is m g. Set them equal at the deflection you want and solve for stiffness: stiffness equals m g over x. Half a kilo, ten centimetres of stretch — that's 0.5 times 9.81 over 0.10, about 49 newtons per metre. A softer spring sags too far; a stiffer one barely gives. The simulation just lets you watch that balance find itself.
▣ Stage animation: A force-balance bar: spring-force-up vs weight-down, unequal (load sinking to -0.245); as stiffness rises 20 → 49 the up-bar grows to meet the down-bar, the load rises and locks at -0.10, equal bars glow green.
Build it up, step by step.
1. Solve the balance. stiffness·x = m·g → stiffness = m·g/|x| = 0.5·9.81/0.10 ≈ 49 N/m.
2. Edit the joint's stiffness="20" → 49.
3. Simulate — the load settles at -0.10 m where spring force = weight.
How the Bench grades your run.
PASS WHEN PASS when the load settles at -0.10 m (±0.006) — spring force balances weight there.
- Sags below -0.10 m — spring too soft; raise stiffness toward m·g/0.10 ≈ 49.
- Barely deflects (above -0.10 m) — spring too stiff; lower stiffness toward 49.
- It oscillates and won't settle — keep some damping (the damping term is fine at 6); the fix here is stiffness, not damping.
Bring back what you've already mastered.
- Force balance: at equilibrium, spring force (stiffness·x) equals ____ (the weight m·g).
- Solve: to settle a 0.5 kg load at 0.10 m on a spring, stiffness ≈ ____ N/m (49).
- A stiffer spring gives a ____ deflection for the same weight (smaller).
What you must demonstrate to advance.
Tune stiffness so the device settles at the spec deflection — reading force equilibrium off a real sim.
How this feeds your build.
Force-balance reasoning underlies every load case your capstone device must survive.