Magnetoelectric cantilever sensors under inhomogeneous magnetic field excitation