We present experimental results on the preparation of a desired quantum state in a two-level system with the maximum possible fidelity using driving protocols ranging from generalizations of the linear Landau-Zener protocol to transitionless driving protocols that ensure perfect following of the instantaneous adiabatic ground state. We also study the minimum time needed to achieve a target fidelity and explore and compare the robustness of some of the protocols against parameter variations simulating a possible experimental uncertainty. In our experiments, we realize a two-level model system using Bose-Einstein condensates inside optical lattices, but the results of our investigation should hold for any quantum system that can be approximated by a two-level system.