Measurement of vibration parameters of the waveguide for medical treatment