A globally stable state feedback controller for flexible joint robots