Wind and light energy are volatile and need to be predicted to provide the basis for the next control strategy. this system uses the neural network algorithm to carry on the short time forecast to the wind energy, the solar energy, Under the condition of high accuracy and based on the predicted results, particle swarm optimization (PSO) is adopted to make decisions.In this way,we can decide how to do today,like when should we charge/discharge the battery to maintain the stability of system rather than just analysis feasibility of system only bases on the history data. By regulating each energy use strategy at different times, the purpose of complementary output is achieved, and the output is guaranteed to be stable as far as possible. the output of system remains from 450KW to 650KW,which is relativity more stable than the simulation that use the traditional PSO method,which remains from 400KW to 900KW .