Synthesis of virtual holonomic constraints for obtaining stable constraint dynamics