An online predictive energy management approach was proposed using a DPSO algorithm. Energy optimal problem with a dynamic cost function was formulated. Fuzzy logic-based correction method was proposed to counter the imprecise prediction. The effect of the presented strategy and correction algorithm was verified.