Design and control of an active prosthetic leg