Hysteresis loop controller & Finite-State-Machines