An electrically operated aerosol-generating system comprising: a heating element for heating an aerosol-forming substrate proximate to the heating element a power supply for supplying power to the heating element; and electric circuitry in communication with the heating element and the power supply, the electric circuitry comprising a memory and being configured to: regulate the supply of power to the heating element for a heating cycle period in response to a user input; determine a first derivative of the electrical resistance of the heating element with respect to time; determine that there is an adverse condition if said first derivative of the electrical resistance exceeds a threshold value stored in the memory during a heating cycle period at or subsequent to a predetermined time in the heating cycle period; and control power supplied to the heating element based on whether there is an adverse condition at the heating element or to provide an indication based on whether there is an adverse condition at the heating element, wherein the electric circuitry is configured to calculate a second derivative of the electrical resistance of the heating element with respect to time, and wherein the predetermined time is when the second derivative exceeds or is equal to a second derivative threshold value. a heating element for heating an aerosol-forming substrate proximate to the heating element a power supply for supplying power to the heating element; and electric circuitry in communication with the heating element and the power supply, the electric circuitry comprising a memory and being configured to: regulate the supply of power to the heating element for a heating cycle period in response to a user input; determine a first derivative of the electrical resistance of the heating element with respect to time; determine that there is an adverse condition if said first derivative of the electrical resistance exceeds a threshold value stored in the memory during a heating cycle period at or subsequent to a predetermined time in the heating cycle period; and control power supplied to the heating element based on whether there is an adverse condition at the heating element or to provide an indication based on whether there is an adverse condition at the heating element, wherein the electric circuitry is configured to calculate a second derivative of the electrical resistance of the heating element with respect to time, and wherein the predetermined time is when the second derivative exceeds or is equal to a second derivative threshold value. regulate the supply of power to the heating element for a heating cycle period in response to a user input; determine a first derivative of the electrical resistance of the heating element with respect to time; determine that there is an adverse condition if said first derivative of the electrical resistance exceeds a threshold value stored in the memory during a heating cycle period at or subsequent to a predetermined time in the heating cycle period; and control power supplied to the heating element based on whether there is an adverse condition at the heating element or to provide an indication based on whether there is an adverse condition at the heating element, wherein the electric circuitry is configured to calculate a second derivative of the electrical resistance of the heating element with respect to time, and wherein the predetermined time is when the second derivative exceeds or is equal to a second derivative threshold value. <EOS>