On and off grid solar power generation system, also known as hybrid solar power system, is widely used in frequent power outages, or photovoltaic self-use for self-use can not spare the Internet, self-use electricity price is much more expensive than the on-grid price, the peak electricity price is much more expensive than the wave price. The system consists of a photovoltaic array consisting of solar cells, a hybrid solar inverter, a battery bank, and load. The photovoltaic array converts the solar energy into electric energy in the case of illumination, and supplies power to the load through the shybrid solar inverter, and simultaneously charges the battery bank; when there is no light, the battery supplies power to the hybrid solar inverter, and then gives AC load power supply.