The paper proposes design of an automatic motion stabilization system for a given control object along a desired trajectory of its motion in space. The stabilization system is constructed by means of symbolic regression. In order to obtain control parameters, a reference model is built. In the reference model, the speed of motion is determined by geometrical parameters of the desired trajectory. The considered problem is formulated in this paper as an extended optimal control problem where the cost function is the integrated accuracy of the motion along the desired trajectory. In order to implement the control function for a real control object, the control synthesis problem is solved by applying the variational genetic algorithm. An example of stabilization system designed by proposed method is given for a quadcopter moving along a given trajectory. © The Author(s), under exclusive license to Springer Nature Switzerland AG 2026.