Characterization and optimization of parameters of photovoltaic devices