A method of operating a transport refrigeration system , the method comprising: controlling, using a controller , a plurality of components of the refrigeration system , wherein controlling comprises operating a prime mover , a heater , and an electric generation device ; monitoring , using the controller , a plurality of operating parameters of the refrigeration system , wherein the operating parameters comprise a speed of the prime mover and a voltage of the electric generation device ; and detecting, using the controller , when a heating mode or a defrost mode is required; activating , using the controller , the heater when the heating mode or the defrost mode is required; characterised by comparing , using the controller , the voltage of the electric generation device to a selected voltage, wherein the selected voltage is a maximum heating voltage limit of the heater ; and controlling, using the controller , the speed of the prime mover in response to the voltage of the electric generation device , wherein controlling the speed of the prime mover comprises: when the voltage of the electric generation device is less than the selected voltage, increasing the speed of the prime mover until the voltage of the electric generation device equals the selected voltage; when the voltage of the electric generation device is equal to the selected voltage, maintaining the speed of the prime mover ; and when the voltage of the electric generation device is greater than the selected voltage, decreasing the speed of the prime mover . controlling, using a controller , a plurality of components of the refrigeration system , wherein controlling comprises operating a prime mover , a heater , and an electric generation device ; monitoring , using the controller , a plurality of operating parameters of the refrigeration system , wherein the operating parameters comprise a speed of the prime mover and a voltage of the electric generation device ; and detecting, using the controller , when a heating mode or a defrost mode is required; activating , using the controller , the heater when the heating mode or the defrost mode is required; characterised by comparing , using the controller , the voltage of the electric generation device to a selected voltage, wherein the selected voltage is a maximum heating voltage limit of the heater ; and controlling, using the controller , the speed of the prime mover in response to the voltage of the electric generation device , wherein controlling the speed of the prime mover comprises: when the voltage of the electric generation device is less than the selected voltage, increasing the speed of the prime mover until the voltage of the electric generation device equals the selected voltage; when the voltage of the electric generation device is equal to the selected voltage, maintaining the speed of the prime mover ; and when the voltage of the electric generation device is greater than the selected voltage, decreasing the speed of the prime mover . when the voltage of the electric generation device is less than the selected voltage, increasing the speed of the prime mover until the voltage of the electric generation device equals the selected voltage; when the voltage of the electric generation device is equal to the selected voltage, maintaining the speed of the prime mover ; and when the voltage of the electric generation device is greater than the selected voltage, decreasing the speed of the prime mover . <EOS>