A new method for optimal output of a solar cell array