It is possible to impulse a pendulum using electromagnets, but the energy has to come from someplace.