Superposition of lithium batteries and photovoltaics