Method and system for vortex flowmeter anti-transient shock interference based on autocorrelation filtering
By reducing transient impact interference of vortex flowmeters through autocorrelation filtering, a bandpass filter is constructed, which solves the problem that vortex flowmeters cannot measure correctly under complex operating conditions and realizes real-time identification and reduction of transient impact interference in low-power mode.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ANHUI UNIV
- Filing Date
- 2023-07-31
- Publication Date
- 2026-06-26
Smart Images

Figure CN117013992B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of flow detection technology. It is a method and system for resisting transient impact interference of vortex flowmeter based on autocorrelation filtering. Specifically, it relates to a signal processing method and system based on a microcontroller (MCU) and autocorrelation filtering. Background Technology
[0002] Vortex flow meters are widely used due to their numerous advantages and are suitable for measuring various media, including liquids, gases, and steam. Vortex flow meters generally employ piezoelectric sensors, measuring flow rate by measuring the frequency of fluid vortices based on the principle of fluid vibration. Because piezoelectric sensors have high frequency and transient response characteristics, they are highly sensitive to pipeline vibration interference. Conventional amplitude-dominant spectral analysis methods are insufficient to handle pipeline vibration interference under complex conditions; transient impact vibration is a major category of pipeline vibration interference.
[0003] Transient shocks are caused by internal fluid impacts and external environmental impacts, such as fluid pulsation shocks and impact shocks. Fluid pulsation shocks are transient impact interferences generated on the pipeline system during pulsating flow transport, producing multiple pulse interference components. Impact vibrations originate from human-induced knocking, falling objects, pipeline collisions, valve actuation, etc., causing impact interference to the pipeline. The frequency band of the interference usually overlaps with the effective frequency band of the vortex flow signal within the normal measured flow velocity range, making it difficult for digital signal processing methods based on the maximum spectral peak of FFT to extract the correct vortex flow signal. There is limited research on accurately extracting vortex flow signals under strong transient impact interference. Some scholars have improved the structure of the sea cliff in the vortex sensor by designing a more stable sea cliff structure, thereby enhancing the ability of the vortex flowmeter to resist strong transient impact vibration interference (Mariusz R. Rzasa, and Beata Czapla-Nielacna, Analysis of the Influence of the Vortex Shedder Shape on the Metrological Properties of the Vortex Flow Meter[J]. Sensors., 2021, 21(14): 4697; Pan Lan, Song Kaichen, Xu Guoliang. Research on Vortex Flowmeter Sensor with High Anti-interference Performance[J]. Journal of China Jiliang University, 2005, 16(4): 268-270, 278). However, optimizing the sensor structure requires high-level manufacturing processes and a large number of finished products to verify its reliability. Other scholars have also conducted research on signal processing for conventional sensor structures. Patent application number 201510021818.6, "A Signal Processing Method for Vortex Flowmeters Resisting Low-Frequency Strong Transient Impact Vibration Based on Data Replacement," discloses a signal processing method based on data replacement. Patent application number 201610099983.8, "A Signal Processing Method and System for Vortex Flowmeters Resisting Transient Impact Interference Based on Kalman Filtering," discloses a signal processing method based on Kalman filtering. Both have achieved certain effects in resisting strong transient impact interference. However, when transient impacts are frequent, they can still overwhelm the vortex flow signal, causing significant obstacles to the accurate measurement of the vortex flow signal. Summary of the Invention
[0004] The problem this invention aims to solve is that, in complex industrial environments, the piping system of vortex flowmeters is susceptible to high-intensity or high-frequency transient interference. The interference frequency band often overlaps with the effective frequency band of the vortex flow signal within the normal measured flow velocity range, rendering commonly used digital signal processing methods ineffective. Currently, when transient impacts are frequent, methods based on piecewise Kalman filtering and data replacement still result in the vortex flow signal being submerged in the processed signal, and digital signal processing methods based on the maximum spectral peak of FFT cannot extract the correct vortex flow signal.
[0005] To solve the above problems, the present invention adopts the following technical solution:
[0006] The output signal of the vortex flow meter is processed to reduce the energy of strong transient impact vibration interference while retaining the energy of the frequency band corresponding to the vortex flow frequency. The method for resisting transient impact interference in a vortex flow meter based on autocorrelation filtering includes the following steps: S1: Acquire the output signal of the vortex flow meter, calculate the peak-to-peak value segment, set a sudden change threshold, and extract the number of impacts in the output signal; S2: Based on the characteristic that the farther away from the starting point of the impact interference, the less affected the signal becomes, find the data segment with the least impact after each transient impact interference as the bandpass filter data segment; S3: Perform frequency domain autocorrelation filtering on the output signal to reduce the energy of strong transient impact interference while retaining the energy of the frequency band corresponding to the vortex flow frequency; S4: Calculate the average amplitude spectrum of the filtered data, extract the effective peak value, and calculate the amplitude ratio of the effective peak value in the amplitude spectrum of the average amplitude spectrum and the amplitude spectrum of the output data before filtering; S5: Extract the peak frequency corresponding to the maximum amplitude ratio as the frequency of the vortex flow signal.
[0007] As a preferred embodiment of the present invention, S1 specifically involves: acquiring the output signal s of the vortex shear sensor. a (n), the sampled data to be processed s a (n) Divide the data into segments, each segment containing at least half a cycle of vortex flow signal information; calculate the peak-to-peak value of each segment, and take twice the average of the three smallest peak-to-peak values as the mutation threshold; if there are two consecutive segments with peak-to-peak values exceeding the mutation threshold, classify the consecutive segments with peak-to-peak values exceeding the mutation threshold as a complete strong transient impact, and determine the impact start point in the first segment of the consecutive transient impact segment based on the mutation characteristics; each impact start point represents a transient impact interference, and count the number of transient impacts in the sampled data to be analyzed.
[0008] In a preferred embodiment of the present invention, S2 specifically involves: based on the characteristic that the farther away from the impact interference, the less affected the data is by the interference, the data before the impact initiation point is the data farthest from the previous transient impact, that is, the data least affected by the transient impact interference. A segment of data is extracted from the preceding data adjacent to the impact initiation point as filter data y. a(n), the length of this data segment must be no less than the length of one cycle of the minimum flow signal.
[0009] As a preferred embodiment of the present invention, S3 specifically refers to: if the vortex shear sensor outputs signal s a The length of (n) is L, i.e., n = 0, 1, 2, ..., L-1, and the filter data y extracted by S2 is... a Let the length of (n) be N, n = 0, 1, 2, ..., N-1, and let L = M + N-1, where L is an integer power of 2. Then y a (n) Pad zeros to extend to point L, and calculate the FFT of point L to obtain Y. a (k), k = 0, 1, 2, ..., L-1; extract s a The first M points of (n) are padded with zeros and extended to point L. The FFT of point L is then calculated to obtain S. a (k); S at point L a (k) and Y a Multiplying by (k) yields the L-point filtered sampled data f. a The FFT of (n) is F a (k). Thus, a frequency domain autocorrelation filtering process can be achieved through two FFT operations. Furthermore, this process yields both the FFT of the output signal before filtering and the FFT after filtering, which can be used for subsequent spectrum analysis, thereby simplifying the computation. Using the extracted data to construct filters, frequency domain autocorrelation filtering is applied to the output signal, preserving the energy of the frequency band corresponding to the vortex flow frequency while reducing the energy of strong transient impact interference.
[0010] As a preferred embodiment of the present invention, S4 specifically involves: calculating the average amplitude spectrum of the data after filtering in S3, extracting the three largest peaks in the average amplitude spectrum that are greater than the cutoff amplitude as effective peaks, and calculating the amplitude ratio of the effective peaks in the average amplitude spectrum after filtering and the amplitude spectrum of the output data before filtering.
[0011] As a preferred embodiment of the present invention, S5 specifically involves: autocorrelation filtering retains the energy of the frequency band corresponding to the vortex flow frequency while weakening the energy of other frequency band signals. Therefore, the amplitude ratio of the peak value of the vortex flow signal will be the largest, and the peak frequency corresponding to the largest amplitude ratio is extracted as the frequency of the vortex flow signal.
[0012] Therefore, this invention has the following beneficial effects: the provided vortex flowmeter anti-transient impact interference system is a general system for vortex sensors with conventional single-sensor structures; the provided vortex flowmeter anti-transient impact interference method based on autocorrelation filtering is a low-power, real-time anti-strong interference method that can meet the needs of complex working conditions. This method and system do not rely on empirical parameters; process parameters can be calculated in real time based on the sensor's output data, facilitating widespread application; the use of LEA-based FFT for fast frequency domain autocorrelation filtering effectively ensures the response speed in low-power mode; by extracting the data segment least affected by interference from the sensor output data and constructing a bandpass filter approximating the vortex flow signal, the energy of the vortex flow signal in the mixed signal is preserved while the energy of multi-mode transient impact interference is weakened, ensuring that the vortex flow signal can be correctly identified even when the energy of the interference component is greater than the energy of the vortex flow signal. Attached Figure Description
[0013] Figure 1 This is a functional block diagram of a method for resisting transient impact interference based on autocorrelation filtering.
[0014] Figure 2 This is a block diagram of the hardware system of a vortex flow meter transmitter.
[0015] Figure 3 This is a time-domain waveform diagram of the output data from the vortex shear sensor.
[0016] Figure 4 This is a magnified view of the frequency domain amplitude spectrum of the vortex shear sensor output data.
[0017] Figure 5 This is a flowchart of the method for extracting filter data segments.
[0018] Figure 6 This is a schematic diagram of the results of the filter data segment extraction.
[0019] Figure 7 This is a flowchart of the algorithm for resisting strong transient impact interference in vortex flowmeters.
[0020] Figure 8 This is a comparison of the amplitude spectra before and after autocorrelation filtering when there is flow.
[0021] Figure 9 This is a comparison of the amplitude spectra before and after autocorrelation filtering when there is no flow.
[0022] Figure 10 This is a block diagram of the signal processing system software structure in a vortex flowmeter.
[0023] Figure 11 This is the flowchart of the main monitoring program of the signal processing system in the vortex flowmeter. Detailed Implementation
[0024] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0025] A method and system for resisting transient impact interference using a vortex flowmeter based on autocorrelation filtering can identify the frequency of the vortex flow signal in real time in low-power mode and calculate the instantaneous flow rate of the vortex flowmeter when the pipeline system is subjected to high-intensity or high-frequency transient impact interference, and the frequency band of the interference overlaps with the effective frequency band of the vortex flow signal within the normal measured flow velocity range. The steps of the method for resisting transient impact interference using a vortex flowmeter based on autocorrelation filtering are as follows: Figure 1 As shown, the specific steps include: S1: Acquire the output signal of the vortex shear sensor, calculate the peak-to-peak value segment by segment and set the abrupt change threshold, and extract the number of impacts in the output signal; S2: Based on the characteristic that the farther away from the starting point of the impact interference, the less affected by the interference, find the data segment with the least interference after each transient impact interference as the data segment of the bandpass filter; S3: Use the filter to perform frequency domain autocorrelation filtering on the output signal respectively, while retaining the energy of the frequency band corresponding to the vortex flow frequency and reducing the energy of strong transient impact interference; S4: Calculate the average amplitude spectrum of the filtered data, extract the effective peak value, and calculate the amplitude ratio of the effective peak value in the amplitude spectrum of the average amplitude spectrum and the amplitude spectrum of the output data before filtering; S5: Extract the peak frequency corresponding to the maximum ratio in the amplitude ratio as the frequency of the vortex flow signal.
[0026] The advantages of this invention are: the provided vortex flowmeter anti-transient impact interference system is a general system for vortex sensors with conventional single-sensor structures; the provided vortex flowmeter anti-transient impact interference method based on autocorrelation filtering is a low-power, real-time anti-strong interference method that can meet the needs of complex working conditions. This method and system do not rely on empirical parameters; process parameters can be calculated in real time based on the sensor's output data, facilitating widespread application; the use of LEA-based FFT for fast frequency domain autocorrelation filtering effectively ensures response speed in low-power mode; the extraction of the least affected data segment from the sensor output data and the construction of a bandpass filter approximating the vortex flow signal preserves the energy of the vortex flow signal in the mixed signal while weakening the energy of multi-mode transient impact interference, ensuring correct identification of the vortex flow signal even when the interference component energy is greater than the vortex flow signal energy.
[0027] Example:
[0028] The design concept of this invention is as follows: based on the fact that vortex flow signals are approximately single-frequency signals with only one main frequency, and their amplitude-frequency characteristics are similar to those of bandpass filters, a bandpass filter based on vortex flow signals is constructed to filter the output signal containing transient impact interference, so as to retain the energy of the vortex flow signal and reduce the energy of transient impact interference.
[0029] This invention is based on Figure 2 The illustrated vortex flowmeter transmitter hardware system acquires the output signal of the vortex sensor. The system's processor is a low-power microcontroller—MSP430FR5994—with built-in LEA, enabling rapid FFT implementation, significantly reducing FFT computation time and ensuring the real-time implementation of the vortex flowmeter's anti-transient interference system based on autocorrelation filtering. The vortex sensor is a commonly used piezoelectric sensor. The system hardware of this invention mainly includes a power conversion circuit, a signal conditioning circuit, a signal processing module, a human-machine interface module, a 4-20mA output module, a pulse output module, a 485 communication module, a temperature and pressure compensation module, a reset circuit, and an external watchdog module. The implementation and testing of the anti-transient interference method are mainly related to the power conversion circuit, signal conditioning circuit, signal processing module, and human-machine interface module. The signal processing module acquires the output signal from the vortex sensor after conditioning by the signal conditioning circuit.
[0030] Using a 50mm diameter gas vortex flow meter as an example, with a given gas flow rate of approximately 55Hz, the pipeline system was tapped at a frequency of 5 times per second, and the sampling frequency was set to 2500Hz. The time-domain waveform of the conditioned vortex sensor output data is shown below. Figure 3 As shown. Performing a 2048-point FFT on this data yields its 2048-point frequency domain amplitude spectrum, as shown below. Figure 4 As shown. Figure 4 The maximum peak point (96.44Hz, 0.2124V) is the peak point of an interference component of the transient impact vibration, and its amplitude is much larger than the amplitude of the peak point corresponding to the gas flow signal (54.93Hz, 0.0948V). Therefore, if a digital signal processing method based on the maximum spectral peak of FFT is used to extract the 96.44Hz interference component as the vortex flow frequency output, accurate flow information cannot be obtained.
[0031] Below, in conjunction with Figure 3 The output data shown details the processing steps of the method for resisting transient impact interference in vortex flowmeters based on autocorrelation filtering:
[0032] (1) Extraction of filter data segments
[0033] If the output signal contains both transient impulses and flow signals, the further away from the onset of the transient impulse, the greater the interference attenuation and the smaller the impact of interference on the flow rate, meaning it more closely resembles the characteristics of the flow signal. Therefore, in the presence of strong transient impulse interference, this characteristic can be used to... Figure 5 The illustrated process identifies the data segments in the actual signal least affected by interference to construct a filter. The specific process is as follows: First, the sampled data s to be processed... a(n) Segmentation: Each segment contains at least half a cycle of vortex flow signal information, and the peak-to-peak value of each segment is calculated. The amplitude of the flow signal will fluctuate within a certain range; therefore, it is appropriate to take twice the average of the three smallest peak-to-peak values as the mutation threshold. If two consecutive segments have peak-to-peak values exceeding the mutation threshold, it indicates the presence of strong transient impact interference; otherwise, it indicates the absence of strong transient impact interference. When strong transient impact interference exists, the consecutive segments with peak-to-peak values exceeding the mutation threshold are classified as a complete strong transient impact. The impact start point is determined based on the mutation characteristics in the first segment of the consecutive transient impact segment. Each impact start point represents a transient impact interference, and the number of transient impacts in the sampled data to be analyzed is counted. Based on the characteristic that the farther away from the impact interference, the less affected the data is by the interference, the data before the impact start point is the data farthest from the previous transient impact, that is, the data least affected by the transient impact interference. Therefore, a segment of data can be extracted from the data adjacent to the impact start point as filter data y. a (n).
[0034] When the output signal contains a flow signal, this filter is based on vortex flow signal; when the output signal does not contain a flow signal, this filter is based on white noise, which can greatly reduce the energy of transient impact interference components in the output signal. The length of the filter data segment must be no less than the length of one cycle of the minimum flow signal to ensure the filtering effect of the constructed filter.
[0035] for Figure 3 The output data shown is in accordance with Figure 5 The process is as shown. The 2048 sampled data points at a sampling frequency of 2500Hz are divided into 16 segments. The mutation threshold is calculated to be 0.86, and the number of impacts is identified as 4. The calculated impact initiation points are 199, 799, 1373, and 1917. Since the lower limit of the gas flow frequency for a 50mm diameter nozzle is approximately 50Hz, and one cycle contains approximately 50 data points, the length of the filter data segment is set to 60 points. Details of the 4 60-point filter data segments can be found in [link to documentation]. Figure 6 The data segment indicated by the double arrows. (By...) Figure 6 It can be seen that the above-mentioned filter data segment extraction method can effectively identify the starting point of transient impact and accurately extract the data segment less affected by interference as the filter data segment.
[0036] (2) Frequency domain autocorrelation filtering
[0037] Digital vortex flow meters typically extract the frequency of the vortex flow signal through spectrum analysis. Therefore, this paper focuses on the sampled data s to be processed at point L. a(n) Perform frequency domain autocorrelation filtering, n = 0, 1, 2, ..., L-1, let L = M + N-1, where M and N are the data lengths, the specific process of which will be described below. L is an integer power of 2. Thus, frequency domain filtering can be quickly implemented using FFT.
[0038] The specific process of autocorrelation filtering is as follows: for point L, s a (n), using Figure 5 The method shown extracts filter data y from N points. a (n), n=0,1,2,...,N-1, change y a (n) Pad zeros to extend to point L, and calculate the FFT of point L to obtain Y. a (k), k = 0, 1, 2, ..., L-1; extract s a The first M points of (n) are padded with zeros and extended to point L. The FFT of point L is then calculated to obtain S. a (k); S at point L a (k) and Y a Multiplying by (k) yields the L-point filtered sampled data f. a The FFT of (n) is F a (k). In this way, an autocorrelation filtering process can be achieved through two FFT operations. Furthermore, through this process, both the FFT of the output signal before filtering and the FFT after filtering can be obtained for subsequent spectrum analysis, thereby simplifying the calculation.
[0039] (3) Anti-transient impact interference algorithm
[0040] Based on autocorrelation filtering and considering various operating conditions of vortex flowmeters under transient impact interference environments, a proposed method is... Figure 7 The algorithm shown is for resisting strong transient impact interference in a vortex flowmeter. When a strong transient impact occurs, the output signal is acquired, based on... Figure 5The process involves calculating the number of transient impacts T and extracting T data segments less affected by the transient impacts to construct filters. The output signal is then subjected to T frequency domain autocorrelation filtering operations, and the average amplitude spectrum after filtering is calculated. It is determined whether there are peak values greater than the cutoff amplitude in the average amplitude spectrum. If so, it indicates the presence of a vortex flow signal in the output signal; otherwise, it indicates the absence of a vortex flow signal in the output data, and the flow frequency is zero. If a vortex flow signal exists, to ensure that the flow peaks are not missed, the three largest peak values greater than the cutoff amplitude in the average amplitude spectrum are extracted as effective peak values, and the amplitude ratio of the effective peak values in the average amplitude spectrum after filtering and the amplitude spectrum of the output data before filtering is calculated. Autocorrelation filtering retains the energy of the frequency band corresponding to the vortex flow frequency while weakening the energy of other frequency bands. Therefore, the amplitude ratio of the peak values of the vortex flow signal will be the largest, and the peak frequency corresponding to the largest ratio is the frequency of the vortex flow signal.
[0041] for Figure 3 The output data shown is given with L = 2048 points, N = 60 points, M = 1989 points, and a cutoff amplitude of 40mV. Step (1) Extract four filter data segments from the output signal and perform four autocorrelation filters on each segment. The amplitude spectrum comparison before and after filtering is shown in the figure. Figure 8 As shown. Figure 8 The black dotted line in the top image is a magnified view of the frequency domain amplitude spectrum after performing an L-point FFT on the M-point sampled data. Figure 8 (Below) is a magnified view of the L-point average amplitude spectrum after four autocorrelation filters. The black dashed line represents the cutoff amplitude. The uncorrected frequencies corresponding to the three largest effective peaks after filtering are 54.93Hz, 91.55Hz, and 96.44Hz, with corresponding amplitudes of 0.0869V, 0.1060V, and 0.1322V, respectively. Before filtering, the amplitudes corresponding to these three effective peaks in the frequency domain amplitude spectrum are 0.0948V, 0.1186V, and 0.2124V, respectively. Therefore, the amplitude ratios corresponding to the three effective peaks are 0.91667 (0.0869 / 0.0948), 0.89376 (0.1060 / 0.1186), and 0.61776 (0.1322 / 0.2124), respectively. The largest amplitude ratio is 0.91667, corresponding to an uncorrected frequency of 54.93Hz, which is closest to the given vortex flow signal frequency. Therefore, according to Figure 7 The process extracts 54.93Hz as the flow frequency, which can correctly identify vortex flow signals under strong transient impact interference.
[0042] The situation of transient impact interference when there is no flow is also a challenge in resisting transient impact interference. When there is no flow, there are approximately 5 strong transient impacts per second, with a sampling frequency of 2500Hz and L = 2048 points. The time-domain waveform of the output signal is as follows: Figure 9As shown above, for this set of output data, the following is adopted: Figure 8 Autocorrelation filtering was performed using the same parameters. Following step (1), four filter data segments were extracted from the output signal, and autocorrelation filtering was performed four times for each segment. The amplitude spectrum comparison before and after filtering is shown below. Figure 9 (See below). The black dotted line is a magnified view of the frequency domain amplitude spectrum after performing an L-point FFT on the M-point sampled data. The solid black line is a magnified view of the L-point average amplitude spectrum after four autocorrelation filters. The dashed black line represents the cutoff amplitude. Since there is no flow signal in the output data, the constructed filter is a white noise-based filter. After autocorrelation filtering, the energy of strong transient impact interference components is greatly reduced, and there are no effective peak values, meaning the vortex flow signal is 0Hz.
[0043] Based on the proposed method for resisting transient impact interference in vortex flowmeters using autocorrelation filtering, the software structure block diagram of the constructed vortex flowmeter signal processing system is as follows: Figure 10 As shown. The system software of this invention adopts a modular design and is controlled by a main monitoring program. It mainly consists of a main monitoring program, an initialization module, an interrupt module, a calculation module, a watchdog module, a communication module, and a display module. The flowchart of the main monitoring program for the signal processing system is shown below. Figure 11 As shown. The working process of the vortex flowmeter signal processing system software of the present invention is as follows: When the system is powered on, the configuration of each module is initialized, and then the ADC sampling data is transferred and stored via DMA, extracting 2048 sampling data. Then, by segmenting and setting a sudden change threshold, it is determined whether there is transient impact interference in the 2048 sampling data. If transient impact interference exists, filter data segments are extracted from the 2048 data points, and an anti-strong transient impact vibration interference algorithm based on autocorrelation filtering is run to calculate the flow frequency. If there is no transient impact interference, the corrected amplitude spectrum is directly calculated on the sampling data, and it is determined whether there is an effective peak. If there is, the peak frequency at the maximum amplitude is taken as the flow frequency; otherwise, it indicates that there is no vortex flow signal, and the flow frequency is zero. The LCD is refreshed to display the latest flow measurement results, completing one cycle and entering the next cycle.
[0044] The basic working process of the system of this invention is as follows: the piezoelectric vortex sensor converts the detection result into a charge signal output. The charge signal is amplified and filtered by the signal conditioning circuit and then sent to the signal processing module. The ADC of the signal processing module collects the output signal into discrete data. The discrete data is processed by the vortex flow meter anti-transient impact interference method based on autocorrelation filtering to extract the frequency of the vortex flow signal. The frequency of the vortex flow signal is then displayed in real time on the LCD in the human-machine interaction module.
[0045] The transient impact interference suppression system for vortex flowmeters provided by this invention is a general-purpose system for conventional single-sensor vortex sensors. The provided method for suppressing transient impact interference in vortex flowmeters based on autocorrelation filtering is a low-power, real-time anti-strong interference method that can meet the needs of complex operating conditions. This method and system do not rely on empirical parameters, but use LEA-based FFT for fast frequency domain autocorrelation filtering, effectively ensuring response speed in low-power mode. It can correctly identify vortex flow signals even in complex industrial environments where the energy of interference components exceeds the energy of the vortex flow signal. The method and system are easy to promote.
[0046] Terminology Explanation:
[0047] MCU: Microprocessor.
[0048] FFT: Fast Fourier Transform.
[0049] LEA: With low-power accelerator.
[0050] DMA: Direct Memory Access.
[0051] ADC: Analog-to-Digital Converter.
[0052] LCD: Liquid Crystal Display.
[0053] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions conceived without creative effort should be included within the scope of protection of the present invention.
Claims
1. A method and system for resisting transient impact interference in a vortex flowmeter based on autocorrelation filtering, comprising a power conversion circuit, a signal conditioning circuit, a signal processing module, a human-machine interface module, and signal processing system software for resisting transient impact interference in a vortex flowmeter based on autocorrelation filtering; a piezoelectric vortex sensor converts the detection result into a charge signal output, the charge signal is amplified and filtered by the signal conditioning circuit and then sent to the signal processing module, the ADC of the signal processing module acquires the output signal into discrete data, the discrete data is processed by the method for resisting transient impact interference in a vortex flowmeter based on autocorrelation filtering to extract the frequency of the vortex flow signal, and the frequency of the vortex flow signal is displayed in real time on the LCD in the human-machine interface module; the method for resisting transient impact interference in a vortex flowmeter based on autocorrelation filtering is characterized by, Includes the following steps: S1: Acquire the output signal of the vortex shear sensor, calculate the peak-to-peak value in segments and set the abrupt change threshold, and extract the number of impacts in the output signal; S2: Based on the characteristic that the farther away from the starting point of the impact interference, the less affected the data becomes, the data segment with the least impact after each transient impact interference is selected as the bandpass filter data segment. In S2, based on the characteristic that the farther away from the impact interference, the less affected the data becomes, the data before the impact starting point is the data farthest from the previous transient impact, i.e., the data with the least impact. A segment of data is extracted from the preceding data adjacent to the impact starting point as the filter data. The length of this data segment must be no less than the length of one cycle of the minimum flow signal; S3: Perform frequency domain autocorrelation filtering on the output signal using a filter to reduce the energy of strong transient impact interference while retaining the energy of the frequency band corresponding to the vortex flow frequency. The calculation steps for frequency domain autocorrelation filtering in S3 are as follows: If the vortex sensor output signal... The length is L, that is S2 extracts filter data The length is N. ,make And L is an integer power of 2; Extend the line to point L by padding with zeros, and then calculate the FFT at point L. , ;extract The first M points are padded with zeros and extended to point L. The FFT of point L is then calculated to obtain the result. L point and Multiply to obtain the filtered sampled data at point L. The FFT is Thus, a frequency domain autocorrelation filtering process can be achieved through two FFT operations, obtaining both the FFT of the output signal before filtering and the FFT after filtering. S4: Calculate the average amplitude spectrum of the filtered data, extract the effective peaks, and calculate the amplitude ratio of the effective peaks in the average amplitude spectrum and the amplitude spectrum of the output data before filtering; S4 specifically involves: calculating the average amplitude spectrum of the filtered data in S3; and extracting the three largest peaks in the average amplitude spectrum that are greater than the cutoff amplitude as effective peaks; The method calculates the amplitude ratio of the effective peak values in the average amplitude spectrum after filtering and the amplitude spectrum of the output data before filtering. Autocorrelation filtering retains the energy of the frequency band corresponding to the vortex flow frequency while weakening the energy of other frequency bands. Therefore, the amplitude ratio of the peak values of the vortex flow signal will be the largest. The peak frequency corresponding to the largest amplitude ratio is extracted as the frequency of the vortex flow signal. This invention can correctly identify the vortex flow signal under strong transient impact interference. S5: Extract the peak frequency corresponding to the maximum amplitude ratio as the frequency of the vortex flow signal.