Principle of Terahertz Radiation Using Electron Beams