The supervisory controller executed by the prosthesis. θa is the ankle angle, which is compared to a position threshold offset from the ankle equilibrium angle, represented here by θth,sw. θ̇s is the angular velocity of the shank, T represents the amount of time that θ̇s is approximately zero, and dt is the sample time of the controller. θa,eq is the ankle equilibrium position for the subsequent state (State 0 of Standing), and θa,eq,w0 is the ankle equilibrium position of State 0 of Walking, which is the previous state.