Text this: Comprehensive Control of Harmonics across Wide Frequency Domain for Railways in Mixed Operation of AC and DC Locomotives