The invention discloses a wrong wave prevention method for an ultrasonic flowmeter and the ultrasonic flowmeter. The method comprises the steps that an initial threshold value is set; according to the initial threshold value, a steady-state
sine wave peak value and amplitudes of a plurality of continuous waveforms which exceed the initial threshold value and are before the steady-state
sine wave are obtained from the first
echo signal, and the amplitudes comprise a
head wave and an adjacent waveform after the
head wave; according to the steady-state
sine wave peak value of the first
echo signal and the amplitudes of the plurality of waveforms, calculating to obtain a first preset value; obtaining a second preset value of the second
echo signal according to the initial threshold value; obtaining a second threshold value according to the ratio of the second preset value to the first preset value; and obtaining the
head wave of the third echo
signal according to a second threshold value. The ratio of the first preset value of the first echo
signal to the second preset value of the second echo
signal is calculated, the initial threshold is adjusted according to the ratio to obtain the second threshold, logic is simple, real-time calculation is facilitated, the influence of wrong
waves can be avoided, the influence of interference on a metering result is reduced, and metering precision is improved.