Residential photovoltaic power systems can generate electricity from sunlight to meet some or all of a home's energy needs. These systems connect to the electric utility grid to provide power when solar is insufficient and allow excess solar power to be exchanged. Battery backup can provide backup power during outages. Proper system design, installation, and compliance with codes are necessary to ensure safe and efficient operation.