Fuzzy logic tuning of controller as function of error