A method and system for detecting fluid mass flow rate based on Coriolis flowmeter
By applying neural network adaptive filtering and blind source signal separation algorithms in Coriolis flowmeters, combined with short-time Fourier transform and temperature compensation technology, the Coriolis flowmeter signal processing and data accuracy problems are solved, achieving higher measurement accuracy and anti-interference ability, and meeting the accuracy and reliability requirements of industrial production.
Patent Information
- Application Number
- CN202410496012.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-23
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-04-23
AI Technical Summary
Coriolis flowmeters have problems with signal processing and data accuracy, resulting in unstable measurement accuracy and insufficient anti-interference capability.
Adaptive filtering algorithm based on neural network and blind source signal separation algorithm, combined with short-time Fourier transform technology, real-time filtering and time-frequency analysis of the sensor signals of the Coriolis flowmeter are used to remove noise and extract accurate signal components, thereby calculating the phase difference and mass flow value, and correcting the flow data through the temperature compensation model.
It improves the measurement accuracy and anti-interference ability of the Coriolis flowmeter, enhances the stability of the system and signal resolution accuracy, and can achieve the accuracy requirement of 0.01%, meeting the requirements of industrial production for flow measurement accuracy and reliability.
Smart Images

Figure CN118392263B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of flow detection of Coriolis flowmeters, and in particular to a fluid mass flow detection method and system based on a Coriolis flowmeter. Background Art
[0002] The Coriolis mass flowmeter (Coriolis flowmeter for short) is a direct mass flowmeter with high precision and good stability. It is widely used in flow monitoring and control in chemical, petroleum, food and other industrial fields. Traditional Coriolis flowmeters usually use mechanical detection methods, which have some challenges in flow detection, such as limited accuracy and susceptibility to external interference. In order to overcome these problems, researchers are constantly exploring and improving the detection methods of Coriolis flowmeters.
[0003] Shandong University uses a digital drive with feedback control to maintain the steady amplitude vibration of the flow tube, and uses the Newton LMS algorithm to track the frequency and the discrete time Fourier transform algorithm to calculate the phase difference (Gao Rui, Zhu Qiuyue, etc., A Coriolis mass flowmeter cloud transmission digital signal processing device and method, invention patent, application number: 201310504736.8, application publication number: CN 103528634A, application publication date: 2014.01.22). This method realizes real-time frequency tracking, but in the Newton LMS algorithm, due to its adaptive nature, there is a risk of overfitting, which will lead to a decrease in generalization ability, increase the system's computing cost and resource consumption, and the feedback control system is easily affected by noise and interference, resulting in system instability or oscillation, making the flow detection accuracy unstable.
[0004] Hefei University of Technology combines an IIR bandpass filter with adjustable passband width and depth with a zero-crossing detection algorithm based on Lagrangian interpolation to process the output signal of a micro-bend Coriolis flowmeter sensor (Xu Kejun, Hou Qili, et al., A digital signal processing method and system for a micro-bend Coriolis flowmeter, invention patent, application number: 201110046129.2, application publication number: CN 102128656 A, application publication date: 2011.07.20). This method achieves good real-time performance, can effectively process high-frequency signals, and retain the high-frequency characteristics of the signal. However, when adjusting the parameters of an IIR bandpass filter with adjustable passband width and depth, the frequency response will be uneven, and frequency distortion or amplitude instability will occur, which will reduce the calculation accuracy of the flow rate. Moreover, when there is noise in the signal, the Lagrangian interpolation method will introduce interpolation errors in signal processing, which will affect the accuracy of zero-crossing detection, thereby affecting the phase difference and the detection accuracy of the flowmeter. Summary of the invention
[0005] Purpose of the invention: In view of the problems pointed out in the background technology, the present invention provides a fluid mass flow detection method and system based on a Coriolis flowmeter to solve the problems existing in the Coriolis flowmeter in signal processing and data accuracy, so as to improve its measurement accuracy and anti-interference ability.
[0006] Technical solution: The present invention discloses a fluid mass flow detection method based on a Coriolis flowmeter, comprising the following steps:
[0007] Step 1: Use the Coriolis flowmeter and the Hall sensor to collect the sensor signal X(t) when the Coriolis flowmeter is working, and sense the flow of the fluid in the pipeline in real time, and convert the sensed information into an electrical signal;
[0008] Step 2: Using a neural network-based adaptive filtering algorithm to perform real-time filtering processing on the signal data to remove noise and extract accurate signal components, wherein the neural network-based adaptive filtering algorithm uses the sensor signal and the Coriolis flowmeter reading as feature dimensions to divide the data into a training set and a test set;
[0009] Step 3: Apply short-time Fourier transform technology to perform time-frequency analysis on the signal;
[0010] Step 4: Use the blind source signal separation algorithm to separate the orthogonal signal and zero-crossing signal components in the mixed signal after processing the signal data, and obtain the phase difference and mass flow value through the Coriolis flowmeter phase difference calculation method of zero-crossing detection and orthogonal demodulation;
[0011] Step 5: According to the current temperature of the fluid, the mass flow rate of the fluid is corrected through the temperature compensation model to determine the final mass flow rate of the fluid.
[0012] Furthermore, the specific process in step 2 is as follows:
[0013] Step 2.1: Select the recursive neural network RNN as the neural network structure for Coriolis flowmeter signal filtering;
[0014] Step 2.2: Train the recurrent neural network RNN, divide the collected Coriolis flowmeter signal data set into a training set and a validation set, and initialize the weight and bias parameters of the recurrent neural network;
[0015] The sensor signal X(t) in the training set is input into the network, and the output Y(t) is calculated by the recursive neural network:
[0016] Y(t)=f(W xh X(t)+W hh H(t-1)+b h )
[0017] Where X(t) is the value of the input sensor signal at time t, H(t-1) is the value of the hidden layer at time step t-1, and W xh is the weight matrix input to the hidden layer, W hh is the weight matrix from hidden layer to hidden layer, b h The bias vector of the hidden layer, f is the activation function;
[0018] Calculate the loss between the network output Y(t) and the actual label, and use the mean square error to calculate the loss function:
[0019]
[0020] Where N is the number of data samples, Y(t i ) is the output of the network, Y label (t i ) is the actual label;
[0021] According to the loss function, the back propagation algorithm is used to update the network parameters to reduce the loss. Specifically, during the back propagation process, the gradient of the loss function to the network parameters is calculated by the chain rule. The gradient of the loss function to the network output is The gradient of the network output with respect to the weight parameter W is Update the network's weights and bias parameters according to the gradient descent optimization algorithm.
[0022] Use the validation set to verify the performance of the network on unseen data, check whether overfitting or underfitting occurs, and repeat the previous steps until the network converges or reaches the preset number of training rounds;
[0023] Step 2.3: Input the real-time signal collected by the sensor into the trained neural network. The neural network will filter the input signal according to the learned features, remove noise and extract accurate signal components;
[0024] Step 2.4: Obtain the signal output Y′(t) after the neural network processing, which is the accurate signal component after filtering.
[0025] Furthermore, the short-time Fourier transform technology in step 3 performs time-frequency analysis on the signal as follows:
[0026] Step 3.1: Divide the accurate signal Y′(t) after filtering into segments according to a certain time window length, each segment is called a frame, and the frame sequence Y′(t) is obtained. n , where n represents the nth frame, and overlapping frames are used to ensure the continuity of time-frequency analysis;
[0027] Step 3.2: Select the Hanning window as the window function and perform the following operations on the frame sequence Y′(t): nApply the window function ω(t):
[0028]
[0029] Where t is the index of the window function, N is the window length, and the windowed signal is: Y′(t) n *ω(t);
[0030] Step 3.3: Perform Fourier transform on each windowed frame and calculate the Fourier transform result Y′(f) n Take the modulus square to get the spectrum information of each frame:
[0031]
[0032]
[0033] Among them, Y′(f) n Represents the spectrum information of the nth frame, where N is the length of each frame;
[0034] Step 3.4: Arrange the spectrum information of each frame in time order to form a time-frequency spectrum matrix, that is, the real-time spectrum graph S(t, f):
[0035] S(t,f)=|Y′(f) n | 2 .
[0036] Furthermore, the blind source signal separation algorithm in step 4 separates the orthogonal signal and the zero-crossing signal components in the mixed signal as follows:
[0037] The mixed signal I(t) is sampled at the time sampling point to obtain a set of sampling value sequences, which are arranged in time order, with each sampling value corresponding to a column, to form a matrix M. The mixed signal matrix M is decentralized to eliminate the DC component of the signal, and a centralized signal matrix is obtained.
[0038] The signal matrix after centering is obtained by PCA whitening Whitening is performed so that the signal of each channel has unit variance and the correlation between the signals is eliminated. In the PCA whitening process, the mixed signal covariance matrix C is calculated; the covariance matrix is subjected to eigenvalue decomposition C*V=V*Λ to obtain eigenvalues and eigenvectors, where V is the eigenvector matrix, Λ is a diagonal matrix, and the elements on the diagonal are eigenvalues;
[0039] Calculate the whitening matrix in, represents the inverse square root of the eigenvalue matrix;
[0040] Perform whitening transformation, and the signal matrix after whitening is obtained as follows: and used as input to the ICA algorithm;
[0041] The signal matrix after whitening As input data, the data is zero-meaned to ensure that the mean of the data is zero, and then it is expressed as a linear combination of independent component signals Z, that is, Compute the kurtosis of each signal:
[0042]
[0043] Where E[·] represents the expected operation;
[0044] The kurtosis of all signals is considered comprehensively and defined as a comprehensive independence metric function, that is,
[0045]
[0046] Where P is the separation matrix, p i is the i-th column of P, N is the number of signals;
[0047] By maximizing the comprehensive independence metric function, the optimal separation matrix P is obtained to achieve independent separation of signals, and then To separate the independent source signals, the components of the separated zero-crossing signal Z1(t) and the orthogonal signal Z2(t) remain independent.
[0048] Furthermore, the method for determining the phase difference and mass flow value in step 4 is as follows:
[0049] Step 4.1: Connect the separated signals Z1(t) and Z2(t) to an oscilloscope to observe the waveforms, and obtain the zero-crossing time, signal period and amplitude value;
[0050] Step 4.2: Solve for the phase difference:
[0051]
[0052] Among them, t1 and t2 are the times when the adjacent sensor signals cross zero, T is the signal period, and A1 and A2 are the amplitudes of the demodulated signals of the adjacent sensor signals;
[0053] Step 4.3: Solve for mass flow rate:
[0054] Q=ρ0*S*V(t)*phase difference
[0055] Wherein, ρ0 represents the density of the fluid at the reference temperature T0; S represents the cross-sectional area of the measuring pipe; V(t) represents the flow velocity of the medium.
[0056] Furthermore, the process of correcting the mass flow rate of the fluid in step 5 is as follows:
[0057] Step 5.1: Build a temperature compensation model to handle the effect of fluid density changing with temperature:
[0058] ρ(T)=ρ0(1-β*(T-T0))
[0059] Among them, ρ(T) represents the corrected fluid density; β is the temperature coefficient, which represents the proportional relationship between density and temperature; T represents the current temperature;
[0060] Step 5.2: Use the established temperature compensation model to correct the fluid density and then calculate the corrected mass flow rate Q′(t).
[0061] Q′(t)=ρ(T)*V(t).
[0062] The present invention also discloses a system based on the above-mentioned fluid mass flow detection method based on a Coriolis flowmeter, comprising:
[0063] The Coriolis flowmeter body and two Hall sensor modules are installed in the center of the cross section of the Coriolis flowmeter pipe. The two Hall sensor modules are fixed on both sides of the pipe respectively, and the exciter is fixed in the center of the pipe to make it parallel to the pipe. When the Coriolis flowmeter is working, the excitation coil provides driving force for the measuring tube. When the medium flows through the Coriolis flowmeter, the Hall sensor senses the change of the magnetic field generated by the coil and outputs the corresponding electrical signal.
[0064] The signal processing module is used to perform real-time filtering on the signal data of the Coriolis flowmeter sensor using an adaptive filtering algorithm based on a neural network, remove noise and extract accurate signal components, and perform time-frequency analysis on the signal using short-time Fourier transform technology;
[0065] A signal separation module is used to separate the orthogonal signal and zero-crossing signal components in the mixed signal by using a blind source signal separation algorithm on the processed signal data;
[0066] The mass flow value determination module obtains the phase difference and mass flow value through the Coriolis flowmeter phase difference calculation method that combines zero-crossing detection and orthogonal demodulation;
[0067] The temperature compensation module is used to correct the mass flow rate of the fluid through a temperature compensation model.
[0068] Preferably, it also includes a single-chip microcomputer and a human-computer interaction interface. The single-chip microcomputer transmits the processed sensor signal to the Alibaba cloud platform through a wireless communication module. The wireless communication module uses an NB-IoT module and a Beidou module to integrate with the Coriolis flowmeter, and transmits the collected and corrected fluid mass flow data and location information to the Alibaba cloud platform through the MQTT protocol, and displays them visually through the human-computer interaction interface.
[0069] Beneficial effects:
[0070] 1. The present invention adopts recursive neural network algorithm, short-time Fourier transform signal processing technology and blind source signal separation algorithm to achieve precise control and data fusion of the Coriolis flowmeter, enhance the system's anti-interference ability, signal solution accuracy, measurement accuracy and stability, meet the requirements of industrial production for flow measurement accuracy and reliability, and achieve an accuracy requirement of 0.01%, which is better than traditional methods.
[0071] 2. The present invention compensates for the influence of temperature change on the measurement results by establishing a temperature compensation model that matches the system, and combines high-precision algorithms and communication functions to improve the reliability and stability of the system and meet the requirements of industrial production for equipment reliability.
[0072] 3. The present invention realizes remote monitoring and control of the Coriolis flowmeter system by introducing the Alibaba Cloud IoT platform. The integrated NB-IoT wireless module and Beidou module communicate with the Alibaba Cloud platform, allowing users to monitor the flowmeter data in real time and remotely control the equipment, improving the convenience of operation and the level of system intelligence, and also controlling the cost problem, better meeting the needs of industrial production. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 A system block diagram of a fluid mass flow detection system based on a Coriolis flowmeter proposed by the present invention;
[0074] Figure 2 This is a schematic diagram of the installation of the Coriolis flowmeter;
[0075] Figure 3 It is the time-frequency spectrum of short-time Fourier transform signal analysis;
[0076] Figure 4 This is a schematic diagram of the data after PCA whitening. DETAILED DESCRIPTION
[0077] The embodiments of the present invention are described in detail below. Figure 1 ), this embodiment is implemented on the premise of the technical solution of the present invention, and provides a detailed implementation method and a specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0078] The present invention discloses a fluid mass flow detection method and system based on a Coriolis flowmeter. Figure 1 , the specific fluid mass flow detection method includes the following steps:
[0079] Step 1: Installation of Coriolis flowmeter Figure 2 :Install the Coriolis flowmeter pipe in the center of the cross section (taking a single straight pipe as an example) to minimize electromagnetic interference and ensure measurement accuracy. Then fix the two Hall sensor modules on both sides of the pipe, and fix the exciter in the center of the pipe so that it is parallel to the pipe. After installation, adjust the position and angle so that the vertical distance between the Hall sensor module and the exciter and the pipe is equal, keep it stable, and not easily affected by external interference.
[0080] Step 2: Get the original signal and noise: When the Coriolis flowmeter is working, the excitation coil provides driving force for the measuring tube. When the medium flows through the Coriolis flowmeter, the Hall sensor can sense the change of the magnetic field generated by the coil and output the corresponding electrical signal. This output electrical signal is the original signal; and the noise mostly comes from the vibration of the surrounding environment, electromagnetic interference, electromagnetic radiation of the equipment itself, etc. By monitoring the noise level in the actual working environment, the various noises existing when the flowmeter is working can be obtained. Finally, the specific expression of the sensor signal X(t) is:
[0081]
[0082] Among them, t represents the value of the signal at that moment.
[0083] Step 3: Use neural network adaptive filtering algorithm to deal with interference and noise:
[0084] Step 3.1: Data preparation: According to the signal X(t), the acquired Coriolis flowmeter data is divided into training set and test set, and the training set and validation set data are converted into a format suitable for recurrent neural network processing, with sensor signals and Coriolis flowmeter readings as feature dimensions.
[0085] Training set:
[0086] Time(s) Sensor signal X(t) <![CDATA[Coriolis flowmeter reading (m 3 / h)]]> t=0.002 0.2 100 t=0.004 0.25 105 t=0.006 0.3 110
[0087] Validation set:
[0088] Time(s) Sensor signal X(t) <![CDATA[Coriolis flowmeter reading (m 3 / h)]]> t=0.020 0.28 108 t=0.022 0.35 115 t=0.024 0.33 112
[0089] Step 3.2: Build a recurrent neural network (RNN): First, build an RNN model suitable for processing time series data. Then, use the Xavier initialization method to initialize the weight matrix W input to the hidden layer. xh , the weight matrix W from hidden layer to hidden layerhh And the weight matrix W from the hidden layer to the output layer hy And the bias parameters are initialized. Then, the sensor signal X(t) in the above training set is input into the network, and the output Y(t) is calculated by the recursive neural network. Then, the mean square error is used to calculate the loss function between the network output Y(t) and the actual label, and the gradient of the loss function to the network output is calculated by the chain rule. and the gradient of the network output with respect to the weight parameter W This is used to monitor the changes in the loss function during training, and to continuously adjust the network parameters to minimize the loss function. Afterwards, the weights and bias parameters of the network are updated according to the gradient descent optimization algorithm, and the performance of the network on unseen data is verified using the above validation set to check whether overfitting or underfitting occurs. Repeat the previous steps to ensure network convergence. Finally, the real-time signal collected by the sensor is input into the trained neural network. The neural network will filter the input sensor signal according to the learned features, remove noise and extract the signal output Y′(t) after the neural network processing, which is the accurate signal component after filtering.
[0090] Weight initialization: The weight matrix W input to the hidden layer xh Initialize using the Xavier initialization method:
[0091]
[0092] Among them, n in is the number of input features, n out is the number of neurons in the hidden layer.
[0093] The weight matrix W from hidden layer to hidden layer hh And the weight matrix W for the output layer hy Initialize, also using the Xavier initialization method.
[0094] Bias initialization: Initialize the bias vectors of the hidden layer and output layer to zero vectors.
[0095] The sensor signal X(t) in the training set is input into the network, and the output Y(t) is calculated by the recursive neural network.
[0096] Y(t)=f(W xh X(t)+W hh H(t-1)+b h )
[0097] Where X(t) is the value of the input sensor signal at time t, H(t-1) is the value of the hidden layer at time step t-1, and W xhis the weight matrix input to the hidden layer, W hh is the weight matrix from hidden layer to hidden layer, b h The bias vector of the hidden layer, f is the activation function.
[0098] Calculate the loss between the network output Y(t) and the actual label, and use the mean square error to calculate the loss function:
[0099]
[0100] Where N is the number of data samples, Y(t i ) is the output of the network, Y label (t i ) is the actual label.
[0101] In this embodiment, the Xavier initialization method is used to initialize each parameter to obtain:
[0102]
[0103] Using Sigmoid as the activation function, the expression of the Sigmoid function is:
[0104] From Y(t)=f(W xh X(t)+W hh H(t-1)+b h ), and the network output is:
[0105] Right now
[0106] By the loss function After updating the weights and bias parameters of the network, the performance of the network on unseen data is verified using the above validation set. The result is that the network converges and the accurate signal component Y′(t) is extracted after filtering.
[0107] Step 4: Analyze the signal using short-time Fourier transform (see Figure 3 ): Divide the filtered signal Y′(t) into multiple windows, each window corresponds to an instant. Perform short-time Fourier transform on the signal in each window to obtain the spectrum information under the window. Select the Hanning window as the window function to reduce the spectrum leakage effect and improve the accuracy and reliability of time-frequency analysis. n Apply the window function ω(t).
[0108]
[0109] Windowed signal: Y′(t) n *ω(t).
[0110] Perform a short-time Fourier transform on each windowed frame:
[0111]
[0112] The short-time Fourier transform result Y′(f) n Take the modulus square to get the spectrum information of each frame:
[0113]
[0114] Arrange the spectrum information of each frame in time order to form a time-frequency spectrum matrix, that is, the real-time spectrum graph S(t, f):
[0115] S(t, f )=|Y′(f) n | 2
[0116] Step 5: Separate the mixed signal through the ICA algorithm: Input the analyzed signal Y′(t) into the integrated circuit module to obtain the mixed signal I(t). Sample the mixed signal I(t) at the time sampling point to obtain a set of sampling value sequences. Arrange this set of sampling value sequences in chronological order, with each sampling value corresponding to a column, to form a matrix M. In the matrix M, each column represents the sampling value of the mixed signal at a specific time point, and each row represents a different mixed signal channel. Decentralize the mixed signal matrix M to eliminate the DC component of the signal and obtain a centralized signal matrix
[0117]
[0118] Here, μ represents the mean value of the data.
[0119] The signal matrix after centering is obtained by PCA whitening Whitening is performed so that the signal of each channel has unit variance and the correlation between signals is eliminated. During the PCA whitening process, the mixed signal covariance matrix C is calculated:
[0120]
[0121] Where N is the number of samples.
[0122] Perform eigenvalue decomposition C*V=V*Λ on the covariance matrix to obtain eigenvalues and eigenvectors, where V is the eigenvector matrix, Λ is a diagonal matrix, and the elements on the diagonal are eigenvalues.
[0123] Calculate the whitening matrix in, Represents the inverse square root of the eigenvalue matrix.
[0124] Perform whitening transformation, and the signal matrix after whitening is obtained as follows: And used as input to the ICA algorithm.
[0125] The signal matrix after whitening As input data ( Figure 4 ), zero-mean the data to ensure that the mean of the data is zero. Then it is expressed as a linear combination of independent component signals Z, that is, Kurtosis is calculated for each signal to measure the non-Gaussianity of the signal. Since high kurtosis indicates that the signals are more non-Gaussian and more independent, we estimate the separation matrix P by maximizing the independence measure.
[0126] Kurtosis calculation: Where E[·] represents the expected operation.
[0127] The kurtosis of all signals is considered comprehensively and defined as a comprehensive independence metric function, that is,
[0128]
[0129] Where P is the separation matrix, p i is the i-th column of P and N is the number of signals.
[0130] By maximizing this comprehensive independence metric function, the optimal separation matrix P can be obtained to achieve independent separation of signals, and then To separate the independent source signals, the components of the separated zero-crossing signal Z1(t) and the orthogonal signal Z2(t) are kept independent. At this time, the oscilloscope is connected to obtain the zero point calculation result, signal period and amplitude value from the waveform through the code.
[0131] Zero point calculation results:
[0132]
[0133] Amplitude value:
[0134]
[0135] Step 6: The phase difference and flow value are obtained by the Coriolis flowmeter phase difference calculation method using a combination of zero-crossing detection and orthogonal demodulation:
[0136]
[0137] Among them, t1 and t2 are the time when the adjacent sensor signals cross zero, T is the signal period, and A1 and A2 are the amplitudes of the demodulated signals of the adjacent sensor signals. The separated signals are used to obtain the parameter values t1 and t2, A1 and A2 required for calculating the phase difference, and then substitute them into the phase difference formula.
[0138] Z1(t) and Z1(t) are two signals obtained after separation. These two signals are connected to the oscilloscope as sine waves. During the measurement process, when A1 and A2 correspond to the flow of fluid in the measuring tube, the waveform amplitude value of the corresponding sine wave changes when the signal is detected.
[0139] Adjacent sensors refer to the situation in which, in the Coriolis flowmeter measurement, electromagnetic coils are installed on the left and right sides of the measuring pipe, and there is a Hall sensor under the coils. When the fluid in the measuring pipe moves from the left end to the right end, the measuring tube vibrates. At this time, the sensors at both ends receive a fluctuating signal respectively, and t1 and t2 correspond to the time when these two signals are received respectively.
[0140]
[0141] Taking chemical wastewater as the measuring medium, ρ0=1.05g / cm 3 , the measuring tube diameter is DN25. According to Q=ρ0*S*V(t)*phase difference, the flow values of the above example data are obtained: Q1≈133.92kg / h, Q2≈133.92kg / h, Q3≈134,28kg / h.
[0142] Step 7: Temperature compensation: Use the microcontroller to monitor temperature changes in real time and obtain the current temperature value T. The temperature compensation model is used to process the influence of fluid density changes with temperature, and then the measurement results are compensated.
[0143] From ρ(T)=ρ0(1-β*(T-T0)), we get the fluid density correction data: ρ≈1.0458g / cm 3 .
[0144] The corrected mass flow rate Q′(t) is obtained by Q′(t)=ρ(T)*V(t).
[0145] Q′(t)1≈136.152kg / h, Q′(t)2≈136.044kg / h, Q′(t)3≈136.116kg / h
[0146] Through the above operations, the accuracy and stability of flow calculation are improved, and the accuracy level can reach 0.1.
[0147] Step 8: Data transmission and remote monitoring through Alibaba Cloud platform: The processed and analyzed data is transmitted to the IoT platform through the NB-IoT wireless module. This includes real-time data collected by sensors, ambient temperature values, flow values, GPS real-time positioning data, etc., and encryption and authentication mechanisms are used to ensure the security of data transmission. Users operate and monitor the system through a high-definition touch screen, and can view data, adjust parameters, and implement remote control functions in real time. Assuming that the system detects an abnormal situation, such as a sudden increase in mass flow, the system can transmit this information to the IoT platform through the NB-IoT wireless module. Users use the high-definition touch screen to remotely monitor the system status, detect abnormalities and adjust parameters in time, implement remote control, and reduce mass flow to avoid equipment damage.
[0148] Through the above steps, the problems of signal processing and data accuracy of the Coriolis flowmeter can be solved, the measurement accuracy and anti-interference ability of the Coriolis flowmeter can be improved, and the remote monitoring and control of the Coriolis flowmeter system can be realized, making the Coriolis flowmeter system more intelligent and interconnected.
[0149] Specifically, the traditional method of eliminating noise with digital filtering cannot completely eliminate all noise, which affects the accuracy of signal processing. In addition, for complex noise environments and signal interference, the effect of traditional methods is limited, and it is difficult to improve the overall performance of the system. The signal processing method based on the adaptive filtering algorithm based on neural networks and the blind source signal separation algorithm adopted in the patent of this invention can handle various interference and noise problems, perform fine analysis on the output signal of the sensor and extract effective information, improve the accuracy and precision of signal processing, realize precise control and data fusion of the Coriolis flowmeter, and improve the system's anti-interference ability and signal solution accuracy. The temperature compensation system solves the impact of temperature changes on the measurement results, and improves the accuracy and stability of the measurement. Finally, remote monitoring and control of the Coriolis flowmeter system is achieved through the Alibaba Cloud Internet of Things platform.
[0150] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit of the present invention should be included in the protection scope of the present invention.
Claims
1. A fluid mass flow detection method based on a Coriolis flowmeter, characterized in that: The following steps are involved: Step 1: Use the Coriolis flowmeter and the Hall sensor to collect the sensor signal X(t) when the Coriolis flowmeter is working, and sense the flow of the fluid in the pipeline in real time, and convert the sensed information into an electrical signal; Step 2: Using a neural network-based adaptive filtering algorithm to perform real-time filtering processing on the signal data to remove noise and extract accurate signal components, wherein the neural network-based adaptive filtering algorithm uses the sensor signal and the Coriolis flowmeter reading as feature dimensions to divide the data into a training set and a test set; Step 2.1: Select the recursive neural network RNN as the neural network structure for Coriolis flowmeter signal filtering; Step 2.2: Train the recurrent neural network RNN, divide the collected Coriolis flowmeter signal data set into a training set and a validation set, and initialize the weight and bias parameters of the recurrent neural network; The sensor signal X(t) in the training set is input into the network, and the output Y(t) is calculated by the recursive neural network: Y(t)=f(W xh X(t)+W hh H(t-1)+b h ) Where X(t) is the value of the input sensor signal at time t, H(t-1) is the value of the hidden layer at time step t-1, and W xh is the weight matrix input to the hidden layer, W hh is the weight matrix from hidden layer to hidden layer, b h The bias vector of the hidden layer, f is the activation function; Calculate the loss between the network output Y(t) and the actual label, and use the mean square error to calculate the loss function: Where N is the number of data samples, Y(t i ) is the output of the network, Y label (t i ) is the actual label; According to the loss function, the back propagation algorithm is used to update the network parameters to reduce the loss. Specifically, in the back propagation process, the gradient of the loss function to the network parameters is calculated by the chain rule. The gradient of the loss function to the network output is The gradient of the network output with respect to the weight parameter W is Update the network’s weights and bias parameters according to the gradient descent optimization algorithm; Use the validation set to verify the performance of the network on unseen data, check whether overfitting or underfitting occurs, and repeat the previous steps until the network converges or reaches the preset number of training rounds; Step 2.3: Input the collected real-time signal into the trained neural network, which will filter the input signal according to the learned features, remove noise and extract accurate signal components; Step 2.4: Obtain the signal output Y'(t) after the neural network processing, which is the accurate signal component after filtering; Step 3: Apply short-time Fourier transform technology to perform time-frequency analysis on the signal; Step 4: Use the blind source signal separation algorithm to separate the orthogonal signal and zero-crossing signal components in the mixed signal after processing the signal data, and obtain the phase difference and mass flow value through the Coriolis flowmeter phase difference calculation method of zero-crossing detection and orthogonal demodulation; The blind source signal separation algorithm separates the orthogonal signal and zero-crossing signal components in the mixed signal as follows: The mixed signal I(t) is sampled at the time sampling point to obtain a set of sampling value sequences, which are arranged in time order, with each sampling value corresponding to a column, to form a matrix M. The mixed signal matrix M is decentralized to eliminate the DC component of the signal, and a centralized signal matrix is obtained. The signal matrix after centering is whitened by PCA Whitening is performed so that the signal of each channel has unit variance and the correlation between the signals is eliminated. In the PCA whitening process, the mixed signal covariance matrix C is calculated; the covariance matrix is subjected to eigenvalue decomposition C*V=V*Λ to obtain eigenvalues and eigenvectors, where V is the eigenvector matrix, Λ is a diagonal matrix, and the elements on the diagonal are eigenvalues; Calculate the whitening matrix in, represents the inverse square root of the eigenvalue matrix; Perform whitening transformation, and the signal matrix after whitening is obtained as follows: and used as input to the ICA algorithm; The signal matrix after whitening As input data, the data is zero-meaned to ensure that the mean of the data is zero, and then it is expressed as a linear combination of independent component signals Z, that is, Compute the kurtosis of each signal: Where E[·] represents the expected operation; The kurtosis of all signals is considered comprehensively and defined as a comprehensive independence metric function, that is, Where P is the separation matrix, p i is the i-th column of P, N is the number of signals; By maximizing the comprehensive independence metric function, the optimal separation matrix P is obtained to achieve independent separation of signals, and then To separate the independent source signals, that is, to make the components of the separated zero-crossing signal Z1(t) and the orthogonal signal Z2(t) remain independent; Step 5: According to the current temperature of the fluid, the mass flow rate of the fluid is corrected by the temperature compensation model to determine the final mass flow rate of the fluid; Step 5.1: Build a temperature compensation model to handle the effect of fluid density changing with temperature: ρ(T)=ρ0(1-β*(T-T0)) Among them, ρ(T) represents the corrected fluid density; β is the temperature coefficient, which represents the proportional relationship between density and temperature; T represents the current temperature; Step 5.2: Use the established temperature compensation model to correct the fluid density and then calculate the corrected mass flow rate Q'(t): Q'(t) = ρ(T)*V(t).
2. A method for detecting fluid mass flow rate based on a Coriolis flowmeter according to claim 1, characterized in that: In step 3, the short-time Fourier transform technology is used to perform time-frequency analysis on the signal as follows: Step 3.1: Divide the accurate signal Y'(t) after filtering into segments according to a certain time window length, each segment is called a frame, and the frame sequence Y'(t) is obtained. n , where n represents the nth frame, and overlapping frames are used to ensure the continuity of time-frequency analysis; Step 3.2: Select the Hanning window as the window function and perform the following operations on the frame sequence Y'(t): n Apply the window function ω(t): Where t is the index of the window function, N is the window length, and the windowed signal is: Y'(t) n *ω(t); Step 3.3: Perform Fourier transform on each windowed frame and calculate the Fourier transform result Y'(f) n Take the modulus square to get the spectrum information of each frame: Among them, Y'(f) n Represents the spectrum information of the nth frame, where N is the length of each frame; Step 3.4: Arrange the spectrum information of each frame in time order to form a time-frequency spectrum matrix, that is, the real-time spectrum graph S(t, f): S(t,f)=|Y'(f) n | 2 。 3. The method for detecting fluid mass flow rate based on a Coriolis flowmeter according to claim 1, characterized in that: The method for determining the phase difference and mass flow value in step 4 is as follows: Step 4.1: Connect the separated signals Z1(t) and Z2(t) to an oscilloscope to observe the waveforms, and obtain the zero-crossing time, signal period and amplitude value; Step 4.2: Solve for the phase difference: Among them, t1 and t2 are the times when the adjacent sensor signals cross zero, T is the signal period, and A1 and A2 are the amplitudes of the demodulated signals of the adjacent sensor signals; Step 4.3: Solve for mass flow rate: Q=ρ0*S*V(t)*phase difference Wherein, ρ0 represents the density of the fluid at the reference temperature T0; S represents the cross-sectional area of the measuring pipe; V(t) represents the flow velocity of the medium.
4. A system based on the fluid mass flow detection method based on a Coriolis flowmeter according to any one of claims 1 to 3, characterized in that: include The Coriolis flowmeter body and two Hall sensor modules are installed in the center of the cross section of the Coriolis flowmeter pipe. The two Hall sensor modules are fixed on both sides of the pipe respectively, and the exciter is fixed in the center of the pipe to make it parallel to the pipe. When the Coriolis flowmeter is working, the excitation coil provides driving force for the measuring tube. When the medium flows through the Coriolis flowmeter, the Hall sensor senses the change of the magnetic field generated by the coil and outputs the corresponding electrical signal. The signal processing module is used to perform real-time filtering on the signal data of the Coriolis flowmeter sensor using an adaptive filtering algorithm based on a neural network, remove noise and extract accurate signal components, and perform time-frequency analysis on the signal using short-time Fourier transform technology; A signal separation module is used to separate the orthogonal signal and zero-crossing signal components in the mixed signal by using a blind source signal separation algorithm on the processed signal data; The mass flow value determination module obtains the phase difference and mass flow value through the Coriolis flowmeter phase difference calculation method that combines zero-crossing detection and orthogonal demodulation; The temperature compensation module is used to correct the mass flow rate of the fluid through a temperature compensation model.
5. A system for detecting fluid mass flow rate based on a Coriolis flowmeter according to claim 4, characterized in that: It also includes a single-chip microcomputer and a human-computer interaction interface. The single-chip microcomputer transmits the processed sensor signal to the Alibaba cloud platform through a wireless communication module. The wireless communication module uses an NB-IoT module and a Beidou module to integrate with the Coriolis flowmeter, and transmits the collected and corrected fluid mass flow data and location information to the Alibaba cloud platform through the MQTT protocol, and displays them visually through the human-computer interaction interface.
Citation Information
Patent Citations
Slightly bent Koch mass flow meter digital signal processing method and system
CN102128656A
Coriolis mass flow meter cloud transmission digital signal processing device and method
CN103528634A
A Coriolis mass flowmeter cloud transmission digital signal processing device and method
CN103528634B
Vibration signal combined denoising method
CN107025446A
Phase difference calculation method for Coriolis flowmeter with mixed zero-cross detection and orthogonal demodulation
CN116337191A