EMTP simulation of an active filter operating with weak AC distribution system