Preprint
Article

This version is not peer-reviewed.

Smooth Trajectory Generation in Robotics from Human Demonstrations Using ANN and LSTM Networks

Submitted:

21 August 2026

Posted:

21 August 2026

You are already at the latest version

Abstract
Trajectory smoothing is a fundamental requirement in robotic systems, as abrupt velocity variations and discontinuities may generate vibrations, increase mechanical stress, and reduce motion accuracy. This paper presents a data-driven methodology for smooth trajectory generation based on human demonstrations, data augmentation, and deep learning techniques. Human-executed trajectories were acquired from video recordings under two motion conditions: paused trajectories containing deliberate stops at direction changes and continuously executed smooth trajectories. The extracted coordinate sequences were normalized and expanded through geometric data augmentation, including reflections, scaling, and translations, to improve training diversity and generalization. Two learning architectures were investigated: a feedforward artificial neural network (ANN) with two hidden layers and a Long Short-Term Memory (LSTM) network. The ANN successfully learned the nonlinear mapping between paused and smooth trajectories, producing accurate results for square-shaped trajectories and their augmented variants. However, additional experiments revealed limitations when trajectories contained multiple consecutive direction changes, indicating that trajectory smoothing cannot be interpreted solely as a geometric transformation problem. To address this limitation, an LSTM-based approach was implemented to explicitly model temporal dependencies within the trajectory sequence. Experimental results demonstrate that LSTM architecture generates smoother and more dynamically consistent trajectories while preserving the geometric characteristics of the original path. The proposed method effectively eliminates zero-velocity segments, improves motion continuity, and reduces trajectory discontinuities without requiring analytical trajectory models. These findings suggest that trajectory smoothing should be regarded as a spatiotemporal learning problem and highlight the potential of recurrent neural networks for generating smooth robotic motions from demonstration data in complex and unstructured environments.
Keywords: 
;  ;  ;  
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.