A control problem for a nonstationary dynamic system with nonfixed termination time and terminal functional in the presence of uncertain parameters is considered. A control construction algorithm is proposed, which uses elements of necessary optimality conditions and the speed gradient principle providing a guaranteed value of the quality functional. The results of computing the control and values of the functional for test parameters of the model are presented.