Generation Detection and Processing of Terahertz Signals