Planar biped robot – Matlab control of a Bioloid walking robot

This one is a simple experiment done to test if the Dynamixel motor in an open loop (no internal PID) are fast enough when controlled by Matlab/USB-serial so that a HZD-based method will work.

First test:

Slow walking:

Fast walking:

For building the frame I used 2020 aluminium extrusion (Misumi-like, that one I ordered from ARMA), but for the corners I had to improvise – you should use a corner + side plate for correct mount, but since this is a prototype I got some flat furniture corner that grasps the extrusion pretty well.


In order to constrain the biped in frontal plane I used linear bearing – first idea was to use MGN-12H that were left from the Delta printer build, but they were too short and quite honestly the balls seemed … square (chinese brand, don’t ask). First I downloaded some 3D-printable linear carriage from the internet, based on the metal balls from the bicycle, but finally I redesigned a Kossel-printer carriage for usage with 6mm plastic ABS balls.


The final prototype, together with Usb2Dynamixel connection for Matlab and power adapter


  1. Hey there man, are you using optimization for the hybrid zero dynamics?, how do you parameterize the outputs? you have some matlab material you could share?

    I’m also working on this framework, but I cannot complete the optimization, maybe I’m no computing correctly the zero dynamics or else.

    Best regards!

  2. Hey there man, if you could share your project it would be nice. Regards!

    • One of the very old (without hardware implementation) sketches is here:
      The one used in the videos is an HZD implementation with a brute-force optimisation – I parametrise a single step (step length, how much the knee is bent and desired torso angle) and then do around 1 million simulations and analyse which range of parameters returns a Poincare-stable result (or just a periodic result that does not fall before reaching 500 steps) – I did not use fminsearch or fmincon because… well, because they give little if no insight at all into what actually results in a stable gait. You actually can guess most of the parameters by hand within a couple of trials and get a pretty nice gait.

  3. Thank you for your quick response, I’ll check it out. I’m currently working on my msc thesis in bipedal locomotion based on the work of Eric Westervelt and Jessy Grizzle. I already simulate the three link, and five link biped robots, using the full order dynamics and nonpolynomial outputs, and computing the fixed point numerically. But I’m struggling using the HZD with Bézier polynomial outputs, posing the optimization problem and using fmincon to find optimized coefficients for a desired horizontal velocity. I think my problem is at the constraints and cost function, in the integration of zero dynamics so thats why I was loooking for similar works. The closest code I have is a matlab file that simulates Rabbit (which is the model I’m working on) in the full dynamics and zero dynamics, but they already have the coefficients calculated, problem is they don’t include the computation of those coefficients (

    I would gladly share my work, if interested, just share an email. Best regards!

Comments are closed.