The paper aims to underline the importance of applying complete optimal control to electric drives, in particular to Permanent Magnet Synchronous Motor (PMSM). The proposed optimal control has three components: the feedback componentassures energy minimization; the forcing component assures the zero steady state; the feedforward compensating component assures fast compensation of the disturbance. The methodology of obtaining this type of the advanced optimal control is based on variational calculus. The solution is a nonrecursive one, avoiding memorizing it from the final time to the initial time, as in the recursive case. Moreover, the solution is orientated to numerical implementation by using a zero order hold in order to solve adequately the matrix Riccati differential equation (MRDE). The practical implication of using the proposed method is the on-line computing possibility of the optimal control solution. The influences of the control weighted matrix upon the manipulated variable of the PMSM electric drive are shown by numerical simulation.