Development of an automated control system for a THz sensor system