Optimization of recombination levels and their capture cross section in power rectifiers and thyristors