Frequency inverter function