Implantable small device enabled with magnetic actuation for on-demand and pulsatile drug delivery