SPICE modeling of a complete photovoltaic system including modules, energy storage elements an a multilevel inverter