Analysis of the relationship between variations in detuning angle and the harmonic generation efficiency of a KDP crystal