Control of a flexible-link manipulator