Inverse Optimal Control with Speed Gradient for a Power Electric System Using a Neural Reduced Model