Simulation of an electromagnetic actuator using bond graphs