We propose to model the spectral response of p-n junction photodetectors based on
gallium nitride and related AlGaN alloys. The model is based on the resolution of the
differential equations that govern the excess carrier variation in each layer of the photodiode
taking into account all the physical parameters, in particular the presence of deep trap levels in
the forbidden gap. We notice that the theoretical results are in good agreement with the
experiments. We have also analysed the effect of the recombination velocity at the illuminated
surface, as well as the impact of the thickness and the doping density of the p-type layer
(illuminated zone) on the spectral response magnitude.