A high frequency generator is coupled to a resonant load. An inverter is swept through a range of frequencies at reduced power. The phase difference between the load current and voltage is measured. When the phase difference is at or near zero, the resonant frequency of the load is detected and the inverter provides full power to the load. The phase difference between the load current and voltage is monitored during operation so that the operating frequency of the inverter can be changed as the resonant frequency of the load changes.