Zhenyang Chen, Jose Lavariega
Final Project for 6.832: Underactuated Robotics (2022)
Trajectory Optimization - Legged Locomotion - Optimal Control
Generating Human-Like Running Motion
Research Question: Can we generate a dynamically feasible running trajectory for a humanoid robot through optimization alone?
Running is a highly dynamic, periodic motion characterized by alternating stance and flight phases, with discontinuous changes in velocity at foot contact. This project investigates how trajectory optimization can generate human-like running motion for the MIT humanoid robot.
We formulate the robot's dynamics and optimize a periodic running trajectory for a five-link biped model. A finite-horizon Linear Quadratic Regulator (LQR) is then developed to track the resulting motion.
Optimization begins with a simplified 3-link hopping model before extending to a 5-link biped. This progression validates our formulation before introducing additional complexities.
The 5-link model uses a floating-base representation, with ground reaction forces treated as optimization variables. We formulate the equations of motion using Lagrangian mechanics and apply direct transcription, expressing the system dynamics as constraints at each time step.
The optimization incorporates several task-specific constraints:
Periodic Motion: Enforces symmetry between the two legs, allowing optimization over half a running cycle.
Contact Schedule: Defines the stance and flight phases for each leg.
Impact Dynamics: Models the velocity reset when the foot contacts the ground.
Running behavior: Constrains step length and forward velocity to produce the desired motion.
Energy cost: Minimizes the squared joint torques as a proxy for energy consumption.
Results: Optimizing a Running Gait
The resulting optimization produces a periodic running trajectory for the 5-linked biped with an optimized step length of 0.80 m and an average body velocity of 3.65m/s. The stance and flight phases each last 0.1 seconds.
The resulting motion exhibits several characteristics associated with human running. Before takeoff, the stance leg extends and subsequently bends during flight. Upon landing, the leg first flexes to absorb impact before extending to push off the ground. The joint velocity profiles also illustrate the discontinuities introduced by foot contact and the periodic constraints that connect successive steps.
Control & Discussion: Tracking the Optimized Motion
Generating a feasible trajectory is only part of the problem. The robot must also be able to follow it despite deviations from the reference motion.
We implement a finite-horizon LQR controller that linearizes the system dynamics along the reference trajectory and computes time-varying feedback gains through a Riccati equation. The approach is first developed on a simplified nonlinear system and then extended to a three-link hopping model.
In simulation, the controller tracks some joint variables reasonably well, particularly the hip and knee angles, but struggles to stabilize the body position and velocity. Increasing the state-error penalties produces only marginal improvements.
These results highlight the challenges of trajectory stabilization in underactuated, hybrid systems. Future directions include exploring transverse LQR for stabilization around periodic limit cycles, improving the optimization formulation, and extending the model to three dimensions with additional degrees of freedom.
While optimization does get us a viable running trajectory, we find limitations in LQR to be able to execute on it quickly around multiple stable target points. Linearizations are just not enough, and we aim to extend then to more versatile control paradigms, like MPC. In our presentation, we extend our work towards a running humanoid
MATLAB implementation using CasADi and IPOPT
Reachable set and LQR trajectory following for the simple 3DOF model.
Comparison between reference and tracked states on the 3DOF model.
A pure trajectory generation approach allows us to add complexity to include swing arms and remain viable through our formulation.
The head is massless and serves only for aesthetics.
Presentation, Paper and 5 minute video explaining the method and project.