Analysis and improvement of cyclic stability of H2 sensing properties of Pd/Mg–Ni films