Changing analogWrite() function frequency

Required energy depends on the switching frequency, with all MOSFET circuits.