Implementation of active impedance based on linear motors