Ultra-Wideband, On-Chip Phased Arrays For Millimeter-Wave And Terahertz Applications