1. A method for controlling a powered ankle prosthesis, comprising receiving sensor measurements associated with the powered ankle prosthesis; based at least on a present state of the powered ankle prosthesis and the sensor measurements, determining whether to switch from the present state to a different state of the powered ankle prosthesis, each state of the powered ankle prosthesis being one of series of states for the power ankle prosthesis defining an activity controller; wherein within each state the prosthesis is programmed to emulate a passive impedance function.