We propose a freely programmable THz diffraction grating based on an electrostatically actuated, computer controlled array of metallic cantilevers. Switching between different grating patterns enables tailoring spatio-temporal profiles of the THz waves. By characterizing the device with spatially resolved THz time domain spectroscopy, we demonstrate beam steering for a wide frequency band extending from 0.15 THz to 0.9 THz. The steerable range at 0.3 THz exceeds 40°. Focusing is also demonstrated by programming a chirped grating. The proposed approach could be employed to mimic arbitrary diffraction optics, enabling highly integrated and extremely flexible systems indispensable for THz stand-off imaging and communications.
ASJC Scopus subject areas