A speed adaptive control algorithm for the self-contained A/K prostheses