Multi-Level Embedded Motor Control for Prosthesis