Parameter optimization method, signal processing method and related device of mass flow meter

Through the Gray Wolf algorithm, the parameters Kp and Ki of the PI controller are optimized, and the steady-state error problem caused by inaccurate parameter values ​​in the prior art is solved, and the measurement accuracy of the mass flowmeter is improved.

CN119880077AActive Publication Date: 2025-04-25SHANGHAI FEEJOY ELECTRONICS TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411954294.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-25
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

In the prior art, the proportional algorithm Kp and the integral algorithm Ki in the PI amplitude control algorithm adopt the empirical value acquisition method, which is difficult to ensure the accuracy of the value acquisition, resulting in the difficulty of completely eliminating the steady-state error, which affects the measurement accuracy.

Method used

The parameters Kp and Ki of the PI controller are optimized by using the gray wolf algorithm, and the positions of the gray wolf individuals are updated by constructing the target fitness function and iteratively adjusting the parameters to reduce the amplitude deviation of the vibration sampling signal.

Benefits of technology

The amplitude control of the sensor signal is effectively optimized, the signal deviation is reduced, the signal accuracy is improved, and the measurement accuracy of the mass flowmeter is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119880077A_ABST
    Figure CN119880077A_ABST
Patent Text Reader

Abstract

The invention discloses a parameter optimization method, a signal processing method and a related device for a mass flowmeter, and the parameter optimization method comprises the steps: initializing a group of grey wolf individuals, and the position of each grey wolf individual comprises a proportion parameter and an integral parameter which are randomly selected in a preset range; constructing a target fitness function, wherein the target fitness function is used for describing the deviation between the amplitude of the vibration sampling signal corresponding to the grey wolf individual and the expected amplitude; on the basis of a grey wolf algorithm and the target fitness function, iteratively updating the positions of the grey wolf individuals in the fitness value decreasing direction; and after iteration is completed, selecting the position of the grey wolf individual with the minimum fitness value as an optimal parameter and outputting the optimal parameter. According to the parameter optimization method, PI control parameter optimization is carried out based on the grey wolf algorithm, amplitude control of sensor signals is effectively optimized, signal deviation is reduced, signal accuracy is improved, and then the measurement precision of the mass flow meter is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of Coriolis flowmeter signal processing, and specifically relates to a parameter optimization method, a signal processing method and related devices of a mass flowmeter. Background Art

[0002] The Coriolis flowmeter is a flowmeter that works based on the principle of the Coriolis effect. When the fluid flows through a pipe that vibrates at a certain frequency, the mass and flow rate of the fluid will generate a Coriolis force perpendicular to the flow direction, causing a slight distortion of the pipe, which in turn produces a vibration phase difference at both ends. There is a linear relationship between this phase difference and the mass flow rate of the fluid. By accurately measuring the phase difference, the flowmeter can calculate the mass flow rate of the fluid. Due to the difficulty in modeling fluid flow and complex structures, the coupling characteristics of the Coriolis flowmeter are difficult to fully reveal through theoretical models. Therefore, the signal processing research of Coriolis flowmeters by domestic and foreign research teams mainly focuses on the influence of the frequency, amplitude and phase difference of the flow tube vibration on the measurement accuracy. Currently, commonly used signal processing methods include PI amplitude control method, zero-crossing method, etc.

[0003] The PI amplitude control method adjusts the input through the proportional algorithm and integral algorithm of the error to achieve the purpose of stable vibration of the flow tube, so that the vibration of the flow tube reaches the expected vibration assignment. p and the integration parameter K i It is difficult to ensure the accuracy of the value by using the empirical method, which makes it difficult to completely eliminate the steady-state error, affecting the measurement accuracy. The zero-crossing method is not as reliable as some more complex phase difference measurement methods because its accuracy may be affected by noise and waveform.

[0004] In addition, the sensor output signal of the Coriolis flowmeter is currently filtered through Kalman filtering. If the noise does not conform to the Gaussian distribution or the model is inaccurate, the performance of the Kalman filter may be greatly reduced. In addition, the model parameters are manually set, and the filtering effect depends on the accurate system model and noise assumptions. The small noise of the Coriolis flow tube cannot be filtered well. Summary of the invention

[0005] The purpose of this application is to provide a parameter optimization method, a signal processing method and a related device for a mass flow meter to solve the problem of the proportional algorithm K in the PI amplitude control algorithm in the prior art. p And integration algorithm K i It is difficult to ensure the accuracy of the values ​​by using the empirical method, which makes it difficult to completely eliminate the steady-state error, thus affecting the technical problem of measurement accuracy.

[0006] In order to achieve the above-mentioned object, the first aspect of the present application provides a method for optimizing parameters of a mass flow meter, comprising:

[0007] Initialize a group of gray wolf individuals, the position of each gray wolf individual includes a proportional parameter and an integral parameter randomly selected within a preset range;

[0008] Constructing a target fitness function, wherein the target fitness function is used to describe the deviation between the amplitude of the vibration sampling signal corresponding to the gray wolf individual and the expected amplitude, wherein the vibration sampling signal is obtained by sampling the output signal of the vibration sensor of the mass flowmeter;

[0009] Based on the gray wolf algorithm and the target fitness function, iteratively updating the position of the gray wolf individual along the direction of decreasing fitness value;

[0010] After the iteration is completed, the position of the gray wolf individual with the smallest fitness value is selected as the optimal parameter and output.

[0011] In one embodiment, the objective fitness function is as follows:

[0012]

[0013] In the formula, is the fitness value of the i-th gray wolf individual, are the proportional parameter and integral parameter of the i-th gray wolf individual, Ahope is the expected amplitude, x1[n] is the vibration sampling signal, n=1,2,3,…,N, N represents the number of sampling points.

[0014] In one embodiment, the step of iteratively updating the position of the gray wolf individual along the direction of decreasing fitness value based on the gray wolf algorithm and the target fitness function includes:

[0015] Before each iteration, all gray wolf individuals are traversed, the positions of the traversed gray wolf individuals are output, the corresponding vibration sampling signals are obtained, and the fitness values ​​of the gray wolf individuals are calculated based on the target fitness function, and the gray wolf individuals are sorted according to the fitness values;

[0016] Select the three gray wolf individuals with the smallest fitness values ​​as α wolf, β wolf, and δ wolf, and the other gray wolf individuals as ω wolf;

[0017] Based on the positions of α wolf, β wolf, and δ wolf, update the position of each ω wolf.

[0018] In one embodiment, the step of updating the position of each ω wolf based on the positions of the α wolf, the β wolf, and the δ wolf is specifically as follows:

[0019] Calculate the distances between the current positions of wolf α, wolf β, wolf δ and target wolf ω respectively to obtain three distance parameters;

[0020] Based on the positions of α wolf, β wolf, δ wolf and three distance parameters, the updated position of the target ω wolf is obtained.

[0021] In one embodiment, the step of iteratively updating the position of the gray wolf individual along the direction of decreasing fitness value based on the gray wolf algorithm and the target fitness function further includes:

[0022] Before each iteration, determine whether the current number of iterations is greater than or equal to the maximum number of iterations; and / or determine whether the fitness value of the gray wolf individual with the smallest fitness value is less than or equal to a preset threshold;

[0023] If yes, the iteration is complete; otherwise, continue the iteration.

[0024] In order to achieve the above-mentioned object, the second aspect of the present application provides a parameter optimization device for a mass flow meter, comprising:

[0025] An initialization module is used to initialize a group of gray wolf individuals, and the position of each gray wolf individual includes a proportional parameter and an integral parameter randomly selected within a preset range;

[0026] A function construction module, used to construct a target fitness function, wherein the target fitness function is used to describe the deviation between the amplitude of the vibration sampling signal corresponding to the gray wolf individual and the expected amplitude, wherein the vibration sampling signal is obtained by sampling the output signal of the vibration sensor of the mass flowmeter;

[0027] An iteration module, used for iteratively updating the position of the gray wolf individual along a direction where the fitness value decreases based on the gray wolf algorithm and the target fitness function;

[0028] The output module is used to select the position of the gray wolf individual with the smallest fitness value as the optimal parameter and output it after the iteration is completed.

[0029] In order to achieve the above-mentioned object, the third aspect of the present application provides a signal processing method of a mass flow meter, comprising:

[0030] Obtaining optimal parameters based on the parameter optimization method described in any of the above embodiments;

[0031] Acquire a vibration sampling signal of a vibration sensor of the mass flow meter, adjust the amplitude of the vibration sampling signal based on the optimal parameter, and output the adjusted signal as a driving signal to the excitation driving system;

[0032] Obtain vibration sampling signals of two vibration sensors of the mass flow meter, perform Fourier transform on the two vibration sampling signals respectively, and obtain two frequency domain signals;

[0033] Perform Hilbert transform on the two frequency domain signals respectively and calculate the phase difference;

[0034] Based on the phase difference, the mass flow rate and density of the fluid are calculated.

[0035] In one or more implementations, the step of adjusting the amplitude of the vibration sampling signal based on the optimal parameter is specifically as follows:

[0036]

[0037] Where x[n] is the vibration sampling signal, is the optimal ratio parameter, is the optimal integral parameter, ΔA[n]=A hope -|x1[n]|, Ahope is the expected amplitude, x1[n] is the sampling signal, n=1,2,3,…,N, N represents the number of sampling points.

[0038] In one or more embodiments, the step of performing Fourier transform on the vibration sampling signal is specifically as follows:

[0039]

[0040] Where y[n] is the filtered vibration sampling signal, j is the imaginary unit, N is the total number of sampling points of the signal, k is the frequency index, and k = 0, 1, 2, ..., N-1.

[0041] In one or more implementations, the steps of performing Hilbert transform on the two frequency domain signals respectively and calculating the phase difference are specifically as follows:

[0042] φ[k]=arg(Y[k])

[0043] Δφ 12 [k] = φ1[k] - φ2[k]

[0044] Where Y[k] is the frequency domain signal, φ[k] is the instantaneous phase obtained after Hilbert transform, φ1[k] and φ2[k] represent the instantaneous phases of the two vibration sensors respectively, and Δφ 12 [k] is the phase difference.

[0045] In one or more embodiments, it further includes:

[0046] A temperature sampling signal is acquired, and a signal processing result is compensated based on the temperature sampling signal and a temperature compensation model.

[0047] In order to achieve the above-mentioned object, the fourth aspect of the present application provides a signal processing device of a mass flow meter, comprising:

[0048] A parameter optimization module, used to obtain optimal parameters based on the parameter optimization method of any of the above implementations;

[0049] An amplitude adjustment module, used for acquiring a vibration sampling signal of a vibration sensor of a mass flow meter, adjusting the amplitude of the vibration sampling signal based on the optimal parameters, and outputting the adjusted signal as a driving signal to a vibration excitation driving system;

[0050] A Fourier transform module is used to obtain vibration sampling signals of two vibration sensors of the mass flow meter, and perform Fourier transform on the two vibration sampling signals respectively to obtain two frequency domain signals;

[0051] The Hilbert transform module is used to perform Hilbert transform on the two frequency domain signals respectively and calculate the phase difference;

[0052] The result output module is used to calculate the mass flow rate and density of the fluid based on the phase difference.

[0053] In order to achieve the above-mentioned object, the fifth aspect of the present application provides a signal processing chip of a mass flow meter, comprising:

[0054] at least one processor; and

[0055] A memory storing instructions, which, when executed by the at least one processor, enables the at least one processor to execute the signal processing method as described in any of the above embodiments.

[0056] In order to achieve the above-mentioned purpose, the sixth aspect of the present application provides a machine-readable storage medium, which stores executable instructions, and when the instructions are executed, the machine executes the signal processing method as any of the above-mentioned embodiments.

[0057] In order to achieve the above-mentioned object, the seventh aspect of the present application provides a signal processing system of a mass flow meter, comprising:

[0058] The signal processing chip described in any one of the above embodiments;

[0059] A temperature sensor, used for collecting temperature signals;

[0060] At least two vibration sensors for collecting vibration signals at different positions of the flow tube;

[0061] an amplifying filter, used for amplifying and filtering the output signals of the vibration sensor and the temperature sensor;

[0062] The analog-to-digital converter is used to sample the output signal after amplification and filtering to obtain a vibration sampling signal and a temperature sampling signal;

[0063] A lattice notch filter, used for performing lattice filtering on the vibration sampling signal;

[0064] The excitation drive system is used to control the vibration of the flow tube based on the drive signal sent by the signal processing chip.

[0065] Different from the prior art, the beneficial effects of this application are:

[0066] The parameter optimization method of the present application performs parameter optimization of PI control based on the Grey Wolf algorithm, effectively optimizes the amplitude control of the sensor signal, reduces the deviation of the signal, improves the accuracy of the signal, and thus improves the measurement accuracy of the mass flow meter;

[0067] The signal processing method of the present application can accurately extract phase difference information in the frequency domain by combining Fourier transform and Hilbert transform technology, and then obtain more accurate mass flow and density values ​​through phase difference calculation, meeting the high-precision measurement requirements;

[0068] The signal processing system of the present application can effectively remove noise interference by combining lattice filtering with amplification filtering, especially in complex environments, to ensure the reliability and stability of sensor signals, thereby improving the robustness of the system;

[0069] This application realizes the application of the Grey Wolf Algorithm in signal processing, so that the method has strong adaptability and real-time adjustment capabilities, can quickly adjust parameters according to changes in actual signals, and realize dynamic and real-time mass flow measurement. It shows good adaptability in complex and highly variable flow measurement scenarios, and can cope with challenges such as large signal amplitude changes and strong noise, and maintain high measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0071] Figure 1 It is a flow chart of an implementation method of a parameter optimization method of a mass flow meter of the present application;

[0072] Figure 2 yes Figure 1 A schematic flow chart of an implementation method corresponding to S300;

[0073] Figure 3 It is a schematic diagram of the Grey Wolf Algorithm of this application;

[0074] Figure 4It is a structural schematic diagram of an implementation method of a parameter optimization device for a mass flow meter of the present application;

[0075] Figure 5 It is a flow chart of an implementation method of a signal processing method for a mass flow meter of the present application;

[0076] Figure 6 It is a waveform diagram of two vibration sampling signals in one implementation of the signal processing method of the present application;

[0077] Figure 7 is a schematic diagram of phase difference in an implementation of a signal processing method of the present application;

[0078] Figure 8 It is a structural schematic diagram of an implementation scheme of a signal processing device for a mass flow meter of the present application;

[0079] Fig. 9 It is a schematic diagram of the structure of the signal processing chip of the mass flowmeter of the present application;

[0080] Fig.10 It is a structural schematic diagram of an implementation scheme of a signal processing system of a mass flowmeter of the present application;

[0081] Fig.11 It is the waveform diagram of the vibration sampling signal of the present application before and after filtering. DETAILED DESCRIPTION

[0082] In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application.

[0083] At present, the signal processing methods of Coriolis mass flowmeter mainly include PI amplitude control method and zero-crossing method. Since there is an optimal amplitude value in the vibration process of the flow tube, the flow tube can maximize the measurement performance of the instrument and extend the service life of the flow tube when it vibrates steadily at this amplitude.

[0084] Therefore, the purpose of the PI amplitude control method is to make the vibration of the flow tube reach the desired vibration value through the PI amplitude control algorithm, and adjust the input through the proportional algorithm and integral algorithm of the error to achieve the purpose of stable vibration of the flow tube. However, in the system test, the two parameters K of the PI controller p , K i It is very important and must be appropriately determined based on previous experience or the performance of the specific sensor. pToo large may lead to overreaction and oscillation, while too small may lead to slow response and large steady-state error. i If it is too large, it may cause system oscillation or instability, and if it is too small, it may not be able to eliminate the steady-state error. When adjusting these two parameters, it is necessary to balance the response speed, steady-state error and system stability. However, the current manually preset parameters cannot meet the needs of high-precision measurement.

[0085] The zero-crossing method refers to finding the critical intersection of two sensor signals, that is, a set of corresponding positions where x1[n]=0 and x2[n]=0 are t1 and t2. The phase difference between the two signals can be obtained by calculating the zero-crossing time difference between signals t1 and t2, that is, Δφ 12 =((t1-t2) / T)*360°, where T is the period of the signal. In the measurement of Coriolis force, high precision and fast response are usually required. Although the zero-crossing method can provide better real-time performance, its accuracy may be affected by noise and waveform, and it may not be as reliable as some more complex phase difference measurement methods.

[0086] In order to solve the above problems, the applicant has developed a parameter optimization method for a Coriolis mass flowmeter, which can optimize the two parameters K of the PI controller. p , K i , providing a more reliable parameter for amplitude control, thus helping to improve the measurement accuracy and service life of the flow meter.

[0087] Specifically, see Figure 1 , Figure 1 It is a flow chart of an implementation method of a parameter optimization method of a mass flow meter of the present application.

[0088] like Figure 1 As shown, the optimization method includes:

[0089] S100, initialize a group of gray wolf individuals.

[0090] Specifically, this embodiment uses the Gray Wolf Algorithm to optimize parameters. First, the Gray Wolf parameters can be initialized. Since the optimization target is the proportional parameter K p and the integration parameter K i , so the dimension of prey can be defined as 2, and the maximum number of iterations and the total number of wolves can be defined based on actual needs.

[0091] Within the preset range, a randomly selected proportional parameter integral parameter can be assigned to each individual gray wolf as the position of the individual gray wolf. The preset range is the K of the hunting p ,K i The range can be obtained based on actual needs and experience, that is, the position of the i-th gray wolf individual satisfies: Exemplarily, in one embodiment, the position of the i-th gray wolf individual may satisfy:

[0092] S200, constructing a target fitness function.

[0093] The target fitness function is used to describe the deviation between the amplitude of the vibration sampling signal corresponding to the individual gray wolf and the expected amplitude. The vibration sampling signal is obtained by sampling the output signal of the vibration sensor of the mass flow meter.

[0094] In this implementation, the optimization goal of the Grey Wolf algorithm is to minimize the deviation between the vibration amplitude of the flow tube and the expected amplitude, so that the flow tube vibrates at the expected amplitude to ensure measurement accuracy.

[0095] Therefore, the target fitness function can be constructed based on the deviation, and iterative updates are performed in the iterative process with the goal of minimizing the fitness value.

[0096] In one embodiment, the objective fitness function may be as follows:

[0097]

[0098] In the formula, is the fitness value of the i-th gray wolf individual, are the proportional parameter and integral parameter of the i-th gray wolf individual, Ahope is the expected amplitude, x1[n] is the vibration sampling signal, n=1,2,3,…,N, N represents the number of sampling points.

[0099] The vibration sampling signal is a discrete time series obtained by sampling the output signal of the vibration sensor through an analog-to-digital converter, and n is the discrete time index. By calculating the sum of the difference between the expected amplitude and the amplitude of the vibration sampling signal at each moment, the target fitness function used to characterize the amplitude deviation of the flow tube can be obtained. The target fitness function can be used to judge the size of the system error under different parameter combinations of gray wolf individuals.

[0100] The expected amplitude may be preset based on actual needs. For example, in one embodiment, the expected amplitude may be 0.35.

[0101] S300, based on the gray wolf algorithm and the target fitness function, iteratively update the position of the gray wolf individual along the direction of decreasing fitness value.

[0102] After completing the wolf pack initialization and the construction of the target fitness function, we can start iterative updating with the goal of minimizing the fitness value of the individual gray wolf.

[0103] Specifically, see Figure 2 and Figure 3 , Figure 2 yes Figure 1 A schematic diagram of a flow chart of an implementation method corresponding to S300, Figure 3 It is a schematic diagram of the Grey Wolf Algorithm of this application.

[0104] like Figure 2 As shown, the iterative update method includes:

[0105] S301. Before each iteration, traverse all gray wolf individuals, output the positions of the traversed gray wolf individuals to the PI controller, obtain the corresponding vibration sampling signal, calculate the fitness value of the gray wolf individual based on the target fitness function, and sort the gray wolf individuals according to the fitness value.

[0106] First, before each iteration, the position of each gray wolf individual can be output, that is, the proportion parameter K of the gray wolf individual p and the integration parameter K i Based on this parameter, the system can adjust the amplitude of the vibration sampling signal and drive the excitation drive system based on the adjusted signal. The flow tube vibrates under the drive of the adjusted excitation drive system. The vibration sensor can output a signal after detecting the vibration signal. The output signal can be sampled to obtain the vibration sampling signal corresponding to the gray wolf individual.

[0107] By substituting the vibration sampling signal into the above target fitness function, the fitness of the gray wolf individuals can be obtained, and the gray wolf individuals are sorted according to the fitness value.

[0108] S302. Select three gray wolf individuals with the smallest fitness values ​​as α wolf, β wolf, and δ wolf, and the other gray wolf individuals as ω wolf.

[0109] S303. Based on the positions of the α wolf, the β wolf, and the δ wolf, update the position of each ω wolf.

[0110] like Figure 3 As shown in the figure, the three gray wolves with the best parameters are selected in the gray wolf algorithm, which are called α wolf, β wolf, and δ wolf, respectively, and the remaining gray wolf individuals are regarded as ω wolf. α wolf, β wolf and δ wolf are responsible for guiding. As α wolf, β wolf and δ wolf move to surround the prey, ω wolf searches for prey and attacks prey to complete hunting optimization and finally obtain the optimal solution.

[0111] In this embodiment, the three gray wolf individuals with the smallest fitness values ​​are respectively used as α wolf, β wolf, and δ wolf to update the position of ω wolf. The specific updating method may include: respectively calculating the distance between the current position of α wolf, β wolf, δ wolf and the target ω wolf to obtain three distance parameters; based on the positions of α wolf, β wolf, δ wolf and the three distance parameters, obtaining the updated position of the target ω wolf.

[0112] The update formula can be as follows:

[0113] D α =|C1·X α -X i |,D β =|C2·X β -X i |,D δ =|C3·X δ -X i |

[0114] X1=X α -A1·D α ,X2=X β -A2·D αβ ,X3=X δ -A3·D δ

[0115]

[0116] In the formula, X α , X β , X δ are the positions of α wolf, β wolf, and δ wolf respectively, and D α , D β , D δ They are three distance parameters respectively, C1, C2, C3 are random weight coefficients, A1 and A2 are another two random coefficients used to control the update amplitude.

[0117] By repeating the above iterative process, the position of the individual gray wolf is updated until the iteration ends.

[0118] Specifically, the condition for the end of iteration can be that the number of iterations reaches a preset maximum number of iterations, or the fitness value of the gray wolf individual reaches a preset threshold, such as Figure 2 As shown, the iterative updating method also includes:

[0119] S304. Before each iteration, determine whether the current number of iterations is greater than or equal to the maximum number of iterations.

[0120] If yes, then:

[0121] S305, iteration completed.

[0122] S306: Determine whether the fitness value of the gray wolf individual with the smallest fitness value is less than or equal to a preset threshold.

[0123] If yes, then:

[0124] S307, iteration completed.

[0125] It can be understood that in the actual iteration process, when the current number of iterations reaches the maximum number of iterations and the minimum fitness value of the gray wolf individual reaches the preset threshold, it can be determined that the iteration goal is reached and the iteration can be ended.

[0126] S400, after the iteration is completed, the position of the gray wolf individual with the smallest fitness value is selected as the optimal parameter and output.

[0127] Based on the above step S300, the position of the gray wolf individual can be updated to ensure that under the parameters of the gray wolf individual, the deviation between the vibration amplitude of the mass flow meter and the expected amplitude is minimized; further, the position of the gray wolf individual with the smallest fitness value can be output as the optimal parameter.

[0128] Based on the parameter optimization method of the above-mentioned implementation modes, through the adaptive adjustment of the Grey Wolf algorithm and the PI control strategy, the amplitude control parameters of the sensor signal can be effectively optimized, which helps to reduce the signal deviation in subsequent signal processing, improve the accuracy of the signal, and thus improve the measurement accuracy of the mass flow meter.

[0129] This application also provides a parameter optimization device for a mass flow meter, see Figure 4 , Figure 4 It is a structural schematic diagram of an implementation method of a parameter optimization device for a mass flow meter of the present application.

[0130] like Figure 4 As shown, the parameter optimization device includes an initialization module 21, a function construction module 22, an iteration module 23, and an output module 24.

[0131] The initialization module 21 is used to initialize a group of gray wolf individuals, and the position of each gray wolf individual includes a proportional parameter and an integral parameter randomly selected within a preset range;

[0132] The function construction module 22 is used to construct a target fitness function, which is used to describe the deviation between the amplitude of the vibration sampling signal corresponding to the gray wolf individual and the expected amplitude, and the vibration sampling signal is obtained by sampling the output signal of the vibration sensor of the mass flow meter;

[0133] The iteration module 23 is used for iteratively updating the position of the gray wolf individual along the direction of decreasing fitness value based on the gray wolf algorithm and the target fitness function;

[0134] The output module 24 is used to select the position of the gray wolf individual with the smallest fitness value as the optimal parameter and output it after the iteration is completed.

[0135] As above Figures 1 to 3, a parameter optimization method according to an embodiment of this specification is described. The details mentioned in the above description of the method embodiment are also applicable to the parameter optimization device of the embodiment of this specification. The above parameter optimization device can be implemented by hardware, or by software, or by a combination of hardware and software.

[0136] The present application also provides a signal processing method, which performs amplitude adjustment based on the optimal parameters obtained by the parameter optimization method of the above-mentioned embodiments, performs signal processing on the two signals obtained after the amplitude adjustment, and outputs the final signal processing result.

[0137] Specifically, see Figure 5 , Figure 5 It is a flow chart of an implementation method of a signal processing method for a mass flow meter of the present application.

[0138] like Figure 5 As shown, the signal processing method includes:

[0139] S10. Obtain optimal parameters based on parameter optimization method.

[0140] First, the optimal parameter, i.e., the proportional parameter K, is obtained based on the parameter optimization method of each of the above embodiments. p and the integration parameter K i .

[0141] S20, obtaining a vibration sampling signal of a vibration sensor of the mass flow meter, adjusting the amplitude of the vibration sampling signal based on optimal parameters, and outputting the adjusted signal as a driving signal to a vibration excitation driving system.

[0142] Acquiring the vibration sampling signal of the vibration sensor is the same as the related description of S200. The vibration sampling signal is obtained by sampling the output signal of the vibration sensor through an analog-to-digital converter.

[0143] Based on the optimized scale parameter K p and the integration parameter K i , the amplitude of the vibration sampling signal can be adjusted, and the adjusted signal can be used as the driving signal of the excitation drive system. It can be understood that under the action of the adjusted signal, the excitation drive system can drive the flow tube to vibrate with an amplitude that is less deviated from the expected amplitude, thereby effectively improving the subsequent measurement accuracy.

[0144] In one embodiment, the formula for adjusting the amplitude of the vibration sampling signal based on the optimal parameters may be as follows:

[0145]

[0146] Where x[n] is the vibration sampling signal, is the optimal ratio parameter, is the optimal integral parameter, ΔA[n]=A hope -|x1[n]|, Ahope is the expected amplitude, x1[n] is the sampling signal, n=1,2,3,…,N, N represents the number of sampling points, is the integral term, which represents the accumulated error of the signal amplitude.

[0147] S30, obtaining vibration sampling signals of two vibration sensors of the mass flow meter, and performing Fourier transform on the two vibration sampling signals respectively to obtain two frequency domain signals.

[0148] After the amplitude is adjusted, the vibration sampling signals of the two vibration sensors of the mass flow meter can be obtained. Figure 6 , Figure 6 It is a waveform diagram of two vibration sampling signals in one implementation of the signal processing method of the present application.

[0149] By performing Fourier transform on the two vibration sampling signals respectively, the discrete time signal can be converted into a frequency domain signal.

[0150] In one embodiment, the specific formula of Fourier transform may be as follows:

[0151]

[0152] Where y[n] is the filtered vibration sampling signal, j is the imaginary unit, N is the total number of sampling points of the signal, k is the frequency index, and k = 0, 1, 2, ..., N-1.

[0153] S40, performing Hilbert transform on the two frequency domain signals respectively, and calculating the phase difference.

[0154] After the Fourier transform, the frequency domain signal can be further trigonometrically operated through the Hilbert transform to obtain the instantaneous phase, and then the phase difference between the two instantaneous phases can be calculated.

[0155] See also Figure 7 , Figure 7 It is a schematic diagram of phase difference in one implementation of the signal processing method of the present application.

[0156] In one embodiment, the calculation formula of Hilbert transform and phase difference may be as follows:

[0157] φ[k]=arg(Y[k])

[0158] Δφ 12 [k] = φ1[k] - φ2[k]

[0159] Where Y[k] is the frequency domain signal, φ[k] is the instantaneous phase obtained after Hilbert transform, φ1[k] and φ2[k] represent the instantaneous phases of the two sensors respectively, and Δφ 12 [k] is the phase difference.

[0160] S50. Based on the phase difference, the mass flow rate and density of the fluid are calculated.

[0161] Those skilled in the art know that after obtaining the vibration phase difference between the two ends of the flow tube of the Coriolis flowmeter, the mass flow rate and density of the fluid can be calculated.

[0162] In one embodiment, the calculation formula of the mass flow rate of the fluid can be as follows:

[0163]

[0164] Where C1 is a constant related to the characteristics of the Coriolis flowmeter, Δφ 12 [k] is the phase difference.

[0165] The calculation formula of density ρ can be as follows:

[0166]

[0167] Where C2 is a constant that is dependent on the fluid and the geometry of the Coriolis flow meter.

[0168] Since the measurement results of the Coriolis flowmeter are greatly affected by temperature and different materials have different sensitivities to temperature, an increase in temperature will cause the elastic modulus of the vibration tube material to decrease, thereby affecting the vibration frequency and amplitude, and ultimately leading to measurement errors.

[0169] In order to ensure the accuracy of the measurement results, the signal processing method also includes:

[0170] S60: Acquire a temperature sampling signal, and compensate the signal processing result based on the temperature sampling signal and a temperature compensation model.

[0171] The temperature compensation model is a well-known model in the art, which can be established based on a model in which the elastic modulus of a material changes with temperature, and will not be described in detail here.

[0172] Based on the signal processing method of each of the above embodiments, the proportional parameter K obtained by optimizing the gray wolf algorithm is used. p and the integration parameter K i, to adjust the amplitude of the vibration sampling signal, and use the adjusted signal as the drive of the excitation drive system, which can effectively reduce the deviation between the vibration amplitude of the flow tube and the expected amplitude, thereby significantly improving the measurement accuracy and service life. In addition, by combining Fourier transform and Hilbert transform technology, it is possible to accurately extract phase difference information in the frequency domain, and then obtain more accurate mass flow and density values ​​through phase difference calculation to meet high-precision measurement requirements.

[0173] The present application also provides a signal processing device for a mass flow meter, see Figure 8 , Figure 8 It is a structural schematic diagram of an implementation scheme of a signal processing device for a mass flow meter of the present application.

[0174] like Figure 8 As shown, the signal processing device includes a parameter optimization module 31, an amplitude adjustment module 32, a Fourier transform module 33, a Hilbert transform module 34 and a result output module 35.

[0175] The parameter optimization module 31 is used to obtain the optimal parameters based on the parameter optimization method of any of the above implementations;

[0176] The amplitude adjustment module 32 is used to obtain the vibration sampling signal of the vibration sensor of the mass flow meter, adjust the amplitude of the vibration sampling signal based on the optimal parameters, and output the adjusted signal as a driving signal to the excitation driving system;

[0177] The Fourier transform module 33 is used to obtain vibration sampling signals of two vibration sensors of the mass flow meter, and perform Fourier transform on the two vibration sampling signals respectively to obtain two frequency domain signals;

[0178] The Hilbert transform module 34 is used to perform Hilbert transform on the two frequency domain signals respectively and calculate the phase difference;

[0179] The result output module 35 is used to calculate the mass flow rate and density of the fluid based on the phase difference.

[0180] In one embodiment, the signal processing device further includes a temperature compensation module 36, which is used to obtain a temperature sampling signal and compensate the signal processing result based on the temperature sampling signal and a temperature compensation model.

[0181] As above Figures 1 to 7 , a signal processing method according to an embodiment of this specification is described. The details mentioned in the above description of the method embodiment are also applicable to the signal processing device of the embodiment of this specification. The above signal processing device can be implemented by hardware, or by software, or by a combination of hardware and software.

[0182] This application also provides a signal processing chip for a mass flow meter, see Fig. 9 , Fig. 9 It is a schematic diagram of the structure of the signal processing chip of the mass flow meter of the present application.

[0183] like Fig. 9 As shown, the signal processing chip 40 includes at least one processor 41, a memory 42 (e.g., a non-volatile memory), a memory 43, and a communication interface 44, and the at least one processor 41, the memory 42, the memory 43, and the communication interface 44 are connected together via a bus 45. At least one processor 41 executes at least one computer-readable instruction stored or encoded in the memory 42. In one embodiment, the processor 41 may be a DSP.

[0184] It should be understood that the computer executable instructions stored in the memory 42, when executed, cause at least one processor 41 to perform the above combined operations in various embodiments of the present specification. Figure 1-Figure 5 Describes the various operations and functions.

[0185] According to one embodiment, a program product such as a machine-readable medium is provided. The machine-readable medium may have instructions (i.e., the above-mentioned elements implemented in the form of software), which, when executed by a machine, causes the machine to perform the above-mentioned combination of various embodiments of this specification. Figure 1-Figure 8 Specifically, a system or device equipped with a readable storage medium may be provided, on which a software program code implementing the functions of any of the above-mentioned embodiments is stored, and a computer or processor of the system or device reads and executes the instructions stored in the readable storage medium.

[0186] In this case, the program code itself read from the machine-readable medium can realize the function of any one of the above embodiments, and thus the machine-readable code and the machine-readable storage medium storing the machine-readable code constitute part of this specification.

[0187] Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer or a cloud via a communication network.

[0188] This application also provides a signal processing system for a mass flow meter, see Fig.10 , Fig.10 It is a structural schematic diagram of an implementation scheme of a signal processing system of a mass flow meter of the present application.

[0189] like Fig.10As shown, the signal processing system includes a signal processing chip 40 of any of the above embodiments, two vibration sensors 10, a temperature sensor 20, an amplifier filter 30, an analog-to-digital converter (ADC) 50, a lattice notch filter 60 and an excitation drive system 70.

[0190] The two vibration sensors 10 are used to collect vibration signals at different positions of the flow tube of the mass flow meter. More specifically, in one embodiment, the two vibration sensors 10 can be used to collect vibration signals at both ends of the flow tube.

[0191] The temperature sensor 20 is used to collect temperature signals.

[0192] The amplifying filter 30 is used to amplify and filter the output signals of the vibration sensor 10 and the temperature sensor 20 , thereby achieving signal amplification and noise suppression.

[0193] The analog-to-digital converter 50 is used to sample the amplified and filtered signal to convert the analog signal into a digital signal to obtain a temperature sampling signal and a vibration sampling signal.

[0194] The lattice notch filter 60 is used to perform lattice filtering on the vibration sampling signal, thereby eliminating interference signals of specific frequencies and improving the stability and performance of the signal.

[0195] The excitation drive system 70 is used to receive the excitation signal sent by the signal processing chip 40, and drive the flow tube to vibrate at a preset amplitude based on the excitation signal.

[0196] In one embodiment, the excitation driving system 70 specifically includes a direct digital synthesizer (DDS), a multi-channel digital-to-analog converter (MDAC), a power amplifier, and an actuator connected in series in sequence, for generating and amplifying signals.

[0197] The signal processing chip 40 includes a processor 41 and a memory 42, which is used to determine the optimal parameter of signal processing, that is, the proportional parameter K, by a parameter optimization method. p and the integration parameter K i ; Obtain the filtered vibration sampling signal, adjust the amplitude of the signal with the optimal parameters, and transmit the adjusted signal as the excitation signal to the excitation drive system; obtain the adjusted two-way excitation sampling signal, combine the Fourier transform and Hilbert transform technology, accurately extract the phase difference information in the signal, and then calculate the mass flow and density value through the phase difference; obtain the temperature sampling signal, perform temperature compensation on the output result based on the temperature sampling signal and the temperature compensation model, and output the final measurement result.

[0198] The signal processing system based on the above embodiments combines the lattice filter with the amplification filter. Fig.11 , Fig.11 It is the waveform diagram of the vibration sampling signal of the present application before and after filtering, which can effectively remove noise interference, especially in complex environments, ensure the reliability and stability of the sensor signal, thereby improving the robustness of the system.

[0199] It is obvious to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above, and that the present application can be implemented in other specific forms without departing from the spirit or essential features of the present application. Therefore, the embodiments should be regarded as exemplary and non-limiting in all respects, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present application. Any reference numeral in a claim should not be regarded as limiting the claim to which it relates.

[0200] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

Claims

1. A method for optimizing parameters of a mass flow meter, characterized in that: include: Initialize a group of gray wolf individuals, the position of each gray wolf individual includes a proportional parameter and an integral parameter randomly selected within a preset range; Constructing a target fitness function, wherein the target fitness function is used to describe the deviation between the amplitude of the vibration sampling signal corresponding to the gray wolf individual and the expected amplitude, wherein the vibration sampling signal is obtained by sampling the output signal of the vibration sensor of the mass flowmeter; Based on the gray wolf algorithm and the target fitness function, iteratively updating the position of the gray wolf individual along the direction of decreasing fitness value; After the iteration is completed, the position of the gray wolf individual with the smallest fitness value is selected as the optimal parameter and output.

2. The method for optimizing the parameters of a mass flow meter according to claim 1, characterized in that: The target fitness function is as follows: In the formula, is the fitness value of the i-th gray wolf individual, and are the proportion parameter and integral parameter of the i-th gray wolf individual, Ahope is the expected amplitude, x1[n] is the vibration sampling signal, n=1,2,3,…,N, N represents the number of sampling points.

3. The parameter optimization method of a mass flow meter according to claim 1, characterized in that: The step of iteratively updating the position of the gray wolf individual along the direction of decreasing fitness value based on the gray wolf algorithm and the target fitness function comprises: Before each iteration, all gray wolf individuals are traversed, the positions of the traversed gray wolf individuals are output, the corresponding vibration sampling signals are obtained, and the fitness values ​​of the gray wolf individuals are calculated based on the target fitness function, and the gray wolf individuals are sorted according to the fitness values; Select the three gray wolf individuals with the smallest fitness values ​​as α wolf, β wolf, and δ wolf, and the other gray wolf individuals as ω wolf; Based on the positions of α wolf, β wolf, and δ wolf, update the position of each ω wolf.

4. The method for optimizing the parameters of a mass flow meter according to claim 3, characterized in that: The step of updating the position of each ω wolf based on the positions of α wolf, β wolf and δ wolf is specifically as follows: Calculate the distances between the current positions of wolf α, wolf β, wolf δ and target wolf ω respectively to obtain three distance parameters; Based on the positions of α wolf, β wolf, δ wolf and three distance parameters, the updated position of the target ω wolf is obtained.

5. The method for optimizing parameters of a mass flow meter according to claim 3, characterized in that: The step of iteratively updating the position of the gray wolf individual along the direction of decreasing fitness value based on the gray wolf algorithm and the target fitness function also includes: Before each iteration, determine whether the current number of iterations is greater than or equal to the maximum number of iterations; and / or determine whether the fitness value of the gray wolf individual with the smallest fitness value is less than or equal to a preset threshold; If yes, the iteration is complete; otherwise, continue the iteration.

6. A parameter optimization device for a mass flow meter, characterized in that: include: An initialization module is used to initialize a group of gray wolf individuals, and the position of each gray wolf individual includes a proportional parameter and an integral parameter randomly selected within a preset range; A function construction module, used to construct a target fitness function, wherein the target fitness function is used to describe the deviation between the amplitude of the vibration sampling signal corresponding to the gray wolf individual and the expected amplitude, wherein the vibration sampling signal is obtained by sampling the output signal of the vibration sensor of the mass flowmeter; An iteration module, used for iteratively updating the position of the gray wolf individual along a direction where the fitness value decreases based on the gray wolf algorithm and the target fitness function; The output module is used to select the position of the gray wolf individual with the smallest fitness value as the optimal parameter and output it after the iteration is completed.

7. A signal processing method for a mass flow meter, characterized in that: include: Obtaining optimal parameters based on the parameter optimization method described in any one of claims 1 to 5; Acquire a vibration sampling signal of a vibration sensor of the mass flow meter, adjust the amplitude of the vibration sampling signal based on the optimal parameter, and output the adjusted signal as a driving signal to the excitation driving system; Obtain vibration sampling signals of two vibration sensors of the mass flow meter, perform Fourier transform on the two vibration sampling signals respectively, and obtain two frequency domain signals; Perform Hilbert transform on the two frequency domain signals respectively and calculate the phase difference; Based on the phase difference, the mass flow rate and density of the fluid are calculated.

8. The signal processing method of a mass flow meter according to claim 7, characterized in that: The step of adjusting the amplitude of the vibration sampling signal based on the optimal parameter is specifically as follows: Where x[n] is the vibration sampling signal, is the optimal ratio parameter, is the optimal integral parameter, ΔA[n]=A hope -|x1[n]|, Ahope is the expected amplitude, x1[n] is the sampled signal, n=1, 2, 3, ..., N, N represents the number of sampling points; and / or, The steps for Fourier transforming the vibration sampling signal are as follows: Wherein, y[n] is the filtered vibration sampling signal, j is the imaginary unit, N is the total number of sampling points of the signal, k is the frequency index, and k=0, 1, 2, ..., N-1; and / or, The steps of performing Hilbert transform on the two frequency domain signals respectively and calculating the phase difference are specifically as follows: φ[k]=arg(Y[k]) Df 12 [k]=φ1[k]-φ2[k] Where Y[k] is the frequency domain signal, φ[k] is the instantaneous phase obtained after Hilbert transform, φ1[k] and φ2[k] represent the instantaneous phases of the two vibration sensors respectively, and Δφ 12 [k] is the phase difference.

9. The signal processing method of a mass flow meter according to claim 7, characterized in that: Also includes: A temperature sampling signal is acquired, and a signal processing result is compensated based on the temperature sampling signal and a temperature compensation model.

10. A signal processing device for a mass flow meter, characterized in that: include: A parameter optimization module, used to obtain optimal parameters based on the parameter optimization method described in any one of claims 1 to 5; An amplitude adjustment module, used for acquiring a vibration sampling signal of a vibration sensor of a mass flow meter, adjusting the amplitude of the vibration sampling signal based on the optimal parameters, and outputting the adjusted signal as a driving signal to a vibration excitation driving system; A Fourier transform module is used to obtain vibration sampling signals of two vibration sensors of the mass flow meter, and perform Fourier transform on the two vibration sampling signals respectively to obtain two frequency domain signals; The Hilbert transform module is used to perform Hilbert transform on the two frequency domain signals respectively and calculate the phase difference; The result output module is used to calculate the mass flow rate and density of the fluid based on the phase difference.

11. A signal processing chip for a mass flow meter, characterized in that: include: at least one processor; as well as A memory storing instructions, which, when executed by the at least one processor, enables the at least one processor to execute the signal processing method for a mass flow meter according to any one of claims 7 to 9. 12 . A machine-readable storage medium storing executable instructions, wherein when the instructions are executed, the machine executes the signal processing method for a mass flow meter according to claim 7 .

13. A signal processing system for a mass flow meter, characterized in that: include: The signal processing chip according to claim 11; A temperature sensor, used for collecting temperature signals; At least two vibration sensors for collecting vibration signals at different positions of the flow tube; an amplifying filter, used for amplifying and filtering the output signals of the vibration sensor and the temperature sensor; The analog-to-digital converter is used to sample the output signal after amplification and filtering to obtain a vibration sampling signal and a temperature sampling signal; A lattice notch filter, used for performing lattice filtering on the vibration sampling signal; The excitation drive system is used to control the vibration of the flow tube based on the drive signal sent by the signal processing chip.

Citation Information

Patent Citations

  • Apparatus for measuring the temperature of a fluid flow

    CA2271502A1

  • Coriolis mass flow meter cloud transmission digital signal processing device and method

    CN103528634A

  • Coriolis mass flowmeter (CMF) amplitude control method

    CN107102586A

  • Feature selection method of grey wolf optimization algorithm based on fused random black hole strategy

    CN110880031A

  • Method for reducing measurement errors of infrared methane sensor based on improved GWO-SVM

    CN112113926A