1. A method for controlling a powered ankle prosthesis having a shank, a foot, an ankle joint rotatably coupling the shank and the foot, and a motor for directly actuating the ankle joint, comprising operating the motor to cause the ankle joint to be actuated so to have an impedance behavior corresponding to a pre-defined behavior associated with a present state of a series of states of an activity controller for the powered ankle prosthesis, the impedance behavior controlled exclusively via a torque generated by a drive shaft of the motor during operation of the motor; receiving sensor measurements associated with the powered ankle prosthesis; based at least on the present state and the sensor measurements, determining to switch from the present state to a different state of the series of states; wherein within each state, the pre-defined behavior emulates a passive impedance function.