Motif discovery describes finding reoccuring sequences in time series. It has been used frequently in different domains such as bioinformatics, medicine, and robotics. A lot of different work exists towards approaches of motif detection. This thesis is based on previous work, transforming time series to discrete representations by applying the Symbolic Aggregate approXimation (SAX). Afterwards, a hierarchical grammar structure is build by the greedy string compression algorithm Sequitur. The resulting grammar structure aids motif detection in linear execution time with linear space requirements. This thesis presents the approach and adapts it to find reoccuring movements in the motion data of the humanoid robot Myon. After implementing and evaluating this approach, adaptions for real-time execution are developed. Finally, motion detection is implemented directly on the robot and two techniques to learn motifs are introduced, enabling users to teach, label, and discard movement motifs.