This article discusses the study of problems of optimal control for electric power systems. The numerical solution of optimal control problems for complex electric power systems using an iterative algorithm is shown. Also considered are issues of solving the optimal control of a nonlinear system of ordinary differential equations in two different cases. The proposed solution methods follow the principle of continuation of extremal problems based on sufficient conditions for optimality of V. F. Krotov. A special case of optimal control problems is considered. Numerical experiments showed sufficient efficiency of the implemented algorithms. The problem of optimal motion control of a two-system electric power system is graphically illustrated in the proposed numerical example.