Influence of defects and impurities on solar cell performance