Cybernetic Leg Control
This is an experimental setup to control a prosthetic leg built with the Lego NXT.
The leg is planar and has 2 degree of freedom, one for the knee and one for the ankle.
There are 3 sensors: a gyroscope at the thigh, an ultrasonic sensor at the hip level and contact sensor at the foot tip.

The gyroscope is used to measure the angular speed of the extension/flexion of the thigh and can be integrated to estimate the absolute angle of the thigh with the ground. The contact measures if the foot has touched something. The ultrasonic sensor measures the distance of the hip to the ground when the leg is extended.
The lego NXT has 2 powerful servomotor which can control the knee and ankle orientation.
The human operator position of the knee and ankle is tracked by using 2 accelerometers placed at the proper positions.
The 3-axis accelerometers are wireless connected to the PC (I’m using the ZStar kit) which runs a C# environment. The host program receive the filtered readings from the sensors and then sends the angular positions to the program running on the NXT via bluetooth.
I used the NXT Osek real time environment on the NXT brick for trajectory planning.
The control system receives angular position and speed from the human operator and using a PID control setup the angular position and speed on the artificial leg.
This video shows some preliminary test with PID control on position but not speed.
I’m working also on a prototype with sEMG (surface EMG) using a USB-DUX with a bio-amplifier.
