Compensation and Control of Smart Devices with Hysteresis