Transient operation of linear motor