A system includes at least three sensors, an electrode array, a muscle stimulator, and a microprocessor. The sensors are configured to be arranged substantially in a common plane and associated with a foot of a body. Additionally, each of the sensors are configured to produce a signal associated with an orientation of the foot. The electrode array is coupled to a lower limb of the body and configured to stimulate at least one muscle of the lower limb. The muscle stimulator is coupled to the electrode array and configured to output a muscle stimulation signal to the electrode array. The microprocessor is coupled to the sensors and configured to calculate an orientation of the foot based on the signals produced by the sensors. Additionally, the microprocessor is configured to control the muscle stimulation output via the muscle stimulator based on the calculated orientation of the foot.