Switched Kinematic and Force Control for Lower-Limb Motorized Exoskeletons and Functional Electrical Stimulation