Principle of solar automatic generator