A controller for continuous wave peristaltic locomotion