Rare earth doped perovskite battery