Frequency-domain physics-based analysis of semiconductor devices by a spectral-balance approach