1. A generator for exciting a piezoelectric transducer, the generator comprising: at least one digital processor unit configured to operate at least in an iterative operation stage comprising more than two successive iterations, the at least one digital processor unit also being configured so that for each iteration: the transducer is excited at a plurality of frequencies in a frequency band about a set-point frequency, said frequency band being swept through about the set-point frequency; one or more values related to at least one electrical magnitude associated with the excitation of the transducer for a plurality of frequencies in the frequency band are acquired; and once the frequencies have been swept through, the values acquired are analysed and a new set-point frequency is determined for a subsequent iteration.