Representation and control of coordinated-motion tasks for human-robot systems