Terahertz sources based on the special Smith-Purcell radiation