Switch between position and force control by fuzzy logic