In the present study, we have calculated the spectral characteristics of terahertz radiation based on diffraction radiation mechanism from periodic grating using previously written numerical code. The simulation results were analyzed for the possibility of creating a terahertz radiation source