Design of an expert system to automatically calibrate impedance control for powered knee prostheses