Glider perching with wing co-design
TL;DR
- Problem
- Perching, landing on a point at near-zero speed, needs a post-stall pitch-up, and the wing’s shape limits what any controller can do. Optimal-control co-design plans one open-loop trajectory for one start.
- What we built
- A closed-loop PPO controller for the elevator, trained to adapt to varying starting speeds, positions and flight directions in a GPU-native simulator with NeuralFoil aerodynamics, plus two searches for a better wing: one learned alongside the controller, one black-box.
- Result
- Perches within 5 cm at under 1 m/s, matching optimal control from its start and generalizing beyond it; the best wing found cuts training time by 29.7%.
- Stack
- Python, PyTorch, PPO, REINFORCE, cross-entropy method, NeuralFoil
What if a robot could redesign its own wing while learning to fly?
- 29.7% FASTER CONVERGENCE
- PPO
- Co-design
- GPU-batched sim
- Curriculum

The approach
- A simulator built for RL. The planar glider dynamics (RK4) and the NeuralFoil aerodynamics surrogate run natively in PyTorch, so everything stays on the GPU: 4,096 gliders in parallel, about 600,000 steps per second on one RTX 5090. The agent sees a 7-D state and commands the elevator rate, within ±5 rad/s.
- Curriculum. First a simple flat-plate aerodynamics model, then NeuralFoil, then four stages that tighten the perch from 0.5 m to 0.05 m, always under 1 m/s.
- Algorithm. I built the SAC agent while a teammate built the PPO one, in parallel, both to replace the optimal-control planner with RL. SAC solved the flat-plate perch, but PPO was kept: it stays stable when the curriculum tightens (SAC’s replay buffer goes stale) and scales with thousands of parallel gliders, while TD3 never reliably found the pitch-up.
- Robustness. Every episode starts from a randomized state: nine base positions 3 to 10 m from the perch, Gaussian noise, and a 30° spread on the velocity direction, so the controller learns a strategy, not one trajectory.
- Wing co-design. The 18-D wing shape (Kulfan/CST parameters, 0 = NACA 4412) joins the policy’s state and learns by REINFORCE with a design critic as baseline. A second, black-box search (the cross-entropy method, 8 generations × 24 wings) looks directly for the wing the controller learns fastest.
What it achieved
- 5 cm, under 1 m/s. The NeuralFoil policy cleared all four curriculum stages in 200M timesteps, trained in under 6 minutes.
- Optimal-control quality, closed loop. From the optimal-control baseline’s start it perches with a trajectory of comparable quality, and it keeps perching from most other starts, where an open-loop plan would have to be solved again.
- 29.7% faster learning. With the CEM wing, the controller reaches the final curriculum stage in 200 PPO updates instead of 285 for the NACA 4412, and masters perching in 244 instead of 336 (5 seeds); the co-designed wing is 27.1% faster.
- The direction matters. A random change of the same size is only 11.6% faster and was the only wing that once failed to master: co-design points somewhere real.
Figures & photos






Notes
The animation at the top is a real inference run of the trained co-design policy flying its co-designed wing, rendered for this site from the logged states: it perches 4.5 cm off target at 0.91 m/s after 2.42 s (shown at ×0.48, the glider drawn larger than scale). From 12 random starts, it perched every time.
A team of 3 in EPFL’s Reinforcement Learning course, in collaboration with the CV Lab: the project builds on the lab’s gradient-based co-design framework for winged robots, and NeuralFoil is an open-source aerodynamics surrogate. The code is in the team’s repository, linked above.