Electromechanical rehabilitation of a user can include receiving a pedal force value from a pedal sensor of a pedal; receiving a pedal rotational position; based on the pedal rotational position over a period of time, calculating a pedal velocity; and based at least upon the pedal force value, a set pedal resistance value, and the pedal velocity, outputting one or more control signals causing an electric motor to provide a driving force to control simulated rotational inertia applied to the pedal.