Embedded hysteresis compensation and control on a magnetostrictive actuator