calculate HW correction by fuzzy logic