A generator or ultrasonic device for determining a temperature of an ultrasonic blade, the generator or ultrasonic device comprising: a control circuit coupled to a memory, the control circuit configured to: determine an actual resonant frequency of an ultrasonic electromechanical system comprising an ultrasonic transducer coupled to an ultrasonic blade by an ultrasonic waveguide, wherein the actual resonant frequency is correlated to an actual temperature of the ultrasonic blade ; retrieve from the memory a reference resonant frequency of the ultrasonic electromechanical system , wherein the reference resonant frequency is correlated to a reference temperature of the ultrasonic blade ; infer the temperature of the ultrasonic blade based on the difference between the actual resonant frequency and the reference resonant frequency, wherein the control circuit is further configured, in order to infer the temperature of the ultrasonic blade , to: generate a temperature estimator and state space model of the inferred temperature of the ultrasonic blade as a function of the resonant frequency of the ultrasonic electromechanical system based on a set of non-linear state space equations; apply a Kalman filter to improve the temperature estimator and state space model; apply a state estimator in a feedback loop of the Kalman filter ; control power applied to the ultrasonic transducer ; and regulate the temperature of the ultrasonic blade . determine an actual resonant frequency of an ultrasonic electromechanical system comprising an ultrasonic transducer coupled to an ultrasonic blade by an ultrasonic waveguide, wherein the actual resonant frequency is correlated to an actual temperature of the ultrasonic blade ; retrieve from the memory a reference resonant frequency of the ultrasonic electromechanical system , wherein the reference resonant frequency is correlated to a reference temperature of the ultrasonic blade ; infer the temperature of the ultrasonic blade based on the difference between the actual resonant frequency and the reference resonant frequency, wherein the control circuit is further configured, in order to infer the temperature of the ultrasonic blade , to: generate a temperature estimator and state space model of the inferred temperature of the ultrasonic blade as a function of the resonant frequency of the ultrasonic electromechanical system based on a set of non-linear state space equations; apply a Kalman filter to improve the temperature estimator and state space model; apply a state estimator in a feedback loop of the Kalman filter ; control power applied to the ultrasonic transducer ; and regulate the temperature of the ultrasonic blade . generate a temperature estimator and state space model of the inferred temperature of the ultrasonic blade as a function of the resonant frequency of the ultrasonic electromechanical system based on a set of non-linear state space equations; apply a Kalman filter to improve the temperature estimator and state space model; apply a state estimator in a feedback loop of the Kalman filter ; control power applied to the ultrasonic transducer ; and regulate the temperature of the ultrasonic blade . <EOS>