A method is proposed for the synthesis of a closed-loop system with controls that ensure the movement of an object with minimal deviations from a given trajectory of the output coordinate and its higher derivatives and a transition to this set. To solve the problem, the Pontryagin maximum principle is used to study special situations without analysis of auxiliary variables, supplemented by the apparatus of general position conditions for nonlinear systems in an extended coordinate space, taking into account the object, a functional that is nonlinear regarding deviations of the output coordinate and the explicit occurrence of time. The combined use of these methods allows us, firstly, to find special trajectories of coordinates that are higher derivatives of the output coordinate, and after excluding time, a special phase trajectory is found, which is a switching line for reaching the final state, a given programmed motion along which in a closed system is carried out by special control. Secondly, access to a special phase trajectory from the initial state is carried out for linear objects by relay control, and for nonlinear objects, under certain boundary conditions, relay control is supplemented by a special control of the speed problem. Examples of control of programmed motion with oscillatory and aperiodic processes of a given duration for linear and nonlinear objects are given. Taking into account the nature of equilibrium states, determined by the methods of the qualitative theory of differential equations, and restrictions on control and coordinates, topologies of trajectories are obtained for the implementation of a continuous special control or sliding mode. New algorithms and structures of control systems are obtained. The results are accompanied by modeling, illustrating the effectiveness of algorithms and structures of control systems according to the proposed synthesis method and confirming analytical materials. The results of the work can be used to control linear and nonlinear objects in mechatronics, robotics, thermal processes and other industries.