Optimal System Realization in Frequency Domain