Skip to content
Dilara Caglar
CourseworkCompleted course assignment

Linkage Design and Soft-Robot Co-design

Gradient-based linkage reshaping with implicit differentiation and a Fréchet loss, and soft-robot co-design comparisons.

My contribution

In the linkage notebook I implemented the damped Newton solver for closure, the implicit-differentiation sensitivities, and the gradient-descent loop on the Fréchet loss.

Affiliation
Computational Design of Cyber-Physical Systems
Dates
Spring 2026
Role
Individual assignment on course starter notebooks
Topics
Optimization and Simulation, Hardware–Algorithm Co-design
Tools
JAX, Python
Contents
  1. The problem
  2. My contribution
  3. Constraints
  4. Design decisions
  5. What was difficult
  6. Evidence
  7. Current status
  8. What I would change next

01

The problem

I moved from simulating a design to improving it automatically. One task was to reshape a four-bar linkage, the mechanism inside walking toys, pumps and pick-and-place machines, so its coupler traces a target curve. The other was to optimize soft walking robots jointly for their controller and their material stiffness, and to understand the global and multi-objective tools used when gradients are unreliable.

02

My contribution

In the linkage notebook I implemented the damped Newton solver for closure, the implicit-differentiation sensitivities, and the gradient-descent loop on the Fréchet loss. For the soft walkers I ran four optimizer and stiffness configurations, 10 random trials each in 2D and 3D, and produced the comparison plots. I also worked the simulated-annealing and multi-objective metric problems by hand. The course provided the walker simulator and the linkage geometry.

03

Constraints

Each walker run lasted 512 time steps, and the spatially varying stiffness case cost 2.5 to 3× more per iteration, which limited how many trials I could afford. The linkage used 6 Newton steps per crank angle and 40 descent steps, so the solver had to be efficient enough to differentiate through every frame.

04

Design decisions

For the linkage I chose implicit differentiation over backpropagating through the unrolled Newton solver: at convergence ∇E = 0, so ds*/dℓ = −(H + δI)⁻¹ ∇²Eₛₗ costs one linear solve per frame and stores no solver history. For the walkers I compared plain gradient descent with Adam, and controller-only optimization with uniform and spatially varying stiffness, to see when extra design freedom actually pays off.

05

What was difficult

Plain gradient descent made no progress at all on the 3D walker. In 2D, the spatially varying stiffness run reached about −0.53 within 35 iterations, but both stiffness runs then drifted upward, so controller-only Adam finished lowest. That contradicted my expectation that more design freedom always helps, and I reported it rather than picking the best iteration.

06

Evidence

For the walkers, Adam converged 2 to 3× faster than gradient descent with about 3× lower trial-to-trial variance, and in 3D spatially varying stiffness beat controller-only Adam by 0.09 in final loss (−0.45 vs. −0.36), averaged over 10 trials.

07

Current status

Simulation: a completed course assignment.

08

What I would change next

I would add early stopping or a decaying learning rate so the co-design runs keep their early gains, and run more trials to tighten the comparison. For the linkage, I would try a smoothed Fréchet loss, since the exact one only sends gradient through a single worst-matched point.

Related work