THz spectroscopy of advanced materials