Singular arcs and output tracking