Signal processing method, module and control system for Coriolis flowmeter

The vibration amplitude control of the Coriolis flowmeter is optimized through the adaptive adjustment of the whale algorithm and the PI control strategy, which solves the stability and accuracy problems caused by the empirical values ​​of the proportional coefficient and the integral coefficient, and achieves high-precision mass flow measurement.

CN120628231APending Publication Date: 2025-09-12SHANGHAI FEEJOY ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510755401.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

In the application of Coriolis flowmeter, there are problems such as insufficient working stability and poor measurement accuracy due to the empirical values ​​of proportional coefficient and integral coefficient.

Method used

The whale algorithm is used for adaptive adjustment. By initializing the whale individuals, the target fitness function is constructed, and the proportional coefficient and integral coefficient are iteratively updated to minimize the fitness value. The vibration amplitude control is optimized in combination with the PI control strategy.

Benefits of technology

It improves the accuracy of the signal and the measurement precision of mass flow, has strong adaptive ability and real-time adjustment ability, and can maintain high-precision measurement in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120628231A_ABST
    Figure CN120628231A_ABST
Patent Text Reader

Abstract

The invention discloses a signal processing method, module and control system for a Coriolis flowmeter, and the signal processing method comprises the steps: initializing a group of whale individuals, and the positions of the whale individuals comprise a proportionality coefficient and an integral coefficient which are randomly selected in a preset range; and constructing a target fitness function. And iteratively updating the position of the whale individual based on the whale algorithm by taking the minimum fitness value as a target. And after iteration is completed, selecting the position of the whale individual with the minimum fitness value as an optimal coefficient and outputting the optimal coefficient. Based on the signal processing method, the module and the control system for the Coriolis flowmeter, the vibration amplitude control of the Coriolis flowmeter is effectively optimized, the deviation of the signal is reduced, the accuracy of the signal is improved and the measurement precision of the mass flow rate is further improved by adopting the self-adaptive adjustment and PI control strategy based on the whale algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent sensing technology, and in particular relates to a signal processing method, module and control system for a Coriolis flowmeter. Background Art

[0002] Mass flow is one of the most important parameters in the industrial process, and it is related to every link from production to sales. Regarding the measurement of mass flow, the measuring instruments are also constantly being upgraded and iterated. The measurement accuracy, as the key to mass flow meter measurement, is also being continuously improved. Factors related to measurement accuracy include process structure, measurement object, main control chip processing speed and sensor selection, among which signal processing is the most important influencing factor and is constantly being updated and processed. In the past few decades, Coriolis flowmeters (Coriolis flowmeters) have been widely used in petroleum, chemical, food and medical pharmaceuticals due to their excellent performance. Their application in deep cryogenic areas such as liquid nitrogen has gradually matured and gradually replaced differential pressure flowmeters. The Coriolis flowmeter is a flowmeter that works based on the principle of the Coriolis effect discovered by French scientists. When the fluid flows through a measuring pipe that vibrates at a certain frequency (natural frequency), the mass and flow rate of the fluid will generate a Coriolis force F perpendicular to the flow direction. C , causing a slight distortion in the pipe, which in turn produces a vibration phase difference ΔΦ at both ends. This phase difference is related to the mass flow rate of the fluid. There is a linear relationship between the phase difference and the mass flow rate. By accurately measuring the phase difference, the flow meter can calculate the mass flow rate of the fluid. Specifically, the relationship between mass flow rate and phase difference can be expressed by the formula , where K is a calibration constant related to the pipe geometry, material properties, and vibration frequency. An oscillation sensor within the flowmeter captures the pipe's vibration state and converts the vibration data into an electrical signal. This signal is processed by a transmitter and ultimately calculated as the fluid's mass flow rate. Because the Coriolis effect is unaffected by changes in fluid density, temperature, and other factors, this flowmeter offers high measurement accuracy and is widely used to precisely measure the mass flow of various fluids.

[0003] While theoretical research on Coriolis flowmeters has reached considerable depth, various assumptions and simplifications are often employed to simplify models and reduce computational burdens. Due to the difficulties in modeling fluid flow and complex structures, the coupling characteristics of Coriolis flowmeters remain difficult to fully understand through theoretical models. Consequently, research teams both domestically and internationally have focused their research on signal processing for Coriolis flowmeters on the impact of the frequency, amplitude, and phase difference of the measuring tube's vibration on measurement accuracy. Common signal processing methods include PI amplitude control, Kalman filtering, and the zero-crossing method.

[0004] The information disclosed in this background technology section is only intended to enhance understanding of the overall background of the invention and should not be regarded as an admission or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the Invention

[0005] The object of the present invention is to provide a signal processing method, module and control system for a Coriolis flowmeter, which can solve the problem that the proportional coefficient and the integral coefficient are empirically determined in the application of the Coriolis flowmeter, resulting in insufficient working stability and poor measurement accuracy.

[0006] In order to achieve the above object, a specific embodiment of the present invention provides the following technical solutions:

[0007] A signal processing method for a Coriolis flowmeter comprises: initializing a group of whale individuals, wherein the positions of the whale individuals include a proportional coefficient and an integral coefficient randomly selected within a preset range; constructing a target fitness function, wherein the target fitness function is used to describe the deviation between an optimized amplitude obtained after feedback adjustment of the vibration amplitude of the Coriolis flowmeter based on the whale individuals and a desired amplitude; iteratively updating the positions of the whale individuals based on a whale algorithm with the goal of minimizing the fitness value; and after the iteration is completed, selecting the position of the whale individual with the smallest fitness value as the optimal coefficient and outputting it.

[0008] In one or more embodiments of the present invention, the target fitness function includes:

[0009]

[0010] Among them, ΔAMP i [n]=AMP hope -x i [n];

[0011] Where, and are the proportional coefficient and integral coefficient of the i-th whale individual, is the fitness value of the i-th whale individual, AMP hope is the expected amplitude, n is the discrete time index, N is the number of sampling points, x i [n] is the optimized amplitude obtained after feedback adjustment of the vibration amplitude of the Coriolis flowmeter based on the i-th whale individual.

[0012] In one or more embodiments of the present invention, with the goal of minimizing the fitness value, iteratively updating the position of the whale individual based on the whale algorithm includes: performing feedback adjustment on the vibration amplitude of the Coriolis flowmeter based on each of the whale individuals to obtain a corresponding optimized amplitude, and calculating the fitness value of each of the whale individuals based on the target fitness function; selecting the whale individual with the smallest fitness value, and iteratively updating the position of the whale individual based on the position of the whale individual and the whale algorithm.

[0013] In one or more embodiments of the present invention, with the goal of minimizing the fitness value, iteratively updating the position of the whale individual based on the whale algorithm includes: when the number of iteration steps does not exceed a preset threshold, selecting the surround prey algorithm to update the position of the whale individual; when the number of iteration steps exceeds the preset threshold, selecting the bubble net attack algorithm or the random exploration algorithm to update the position of the whale individual.

[0014] In one or more embodiments of the present invention, when the number of iteration steps exceeds the preset threshold, selecting the bubble net attack algorithm or the random exploration algorithm to update the position of the whale individual includes: generating a random probability value; if the random probability value is less than 0.5, selecting the bubble net attack algorithm to update the position of the whale individual; if the random probability value is not less than 0.5, selecting the random exploration algorithm to update the position of the whale individual.

[0015] In one or more embodiments of the present invention, the signal processing method further includes: if the position of the individual whale exceeds the preset range, correcting the position of the individual whale.

[0016] In one or more embodiments of the present invention, if the position of the individual whale exceeds the preset range, correcting the position of the individual whale includes taking the corrected position parameter of the individual whale as:

[0017]

[0018] Among them, X new is the corrected position parameter of the individual whale, X old is the original whale individual position parameter, L min is the minimum value of the preset range of the corresponding position parameter, L max The maximum value of the preset range of the corresponding position parameter.

[0019] In one or more embodiments of the present invention, the signal processing method further includes: performing feedback control on the vibration amplitude of the Coriolis flowmeter based on the optimal coefficient, and obtaining the vibration signal of the Coriolis flowmeter, and calculating the mass flow rate and / or density based on the vibration signal; and / or obtaining the vibration signal of the Coriolis flowmeter, calculating the mass flow rate and / or density based on the vibration signal, and correcting the calculation result based on temperature.

[0020] A specific embodiment of the present invention also provides a signal processing module for a Coriolis flowmeter, comprising: at least one processor; and a memory, wherein the memory stores instructions, and when the instructions are executed by the at least one processor, the at least one processor executes the signal processing method for the Coriolis flowmeter as described above.

[0021] A specific embodiment of the present invention also provides a control system for a Coriolis flowmeter, comprising: the above-mentioned signal processing module for the Coriolis flowmeter; and a temperature compensation module, connected to the signal processing module to sense temperature and generate a temperature signal; and / or a signal acquisition module, connected to the signal processing module and the Coriolis flowmeter to collect vibration signals and send the vibration signals to the signal processing module; and / or a driving module, connected to the signal processing module and the Coriolis flowmeter to drive the Coriolis flowmeter to vibrate based on the control of the signal processing module.

[0022] Compared with the prior art, the signal processing method, module, and control system for the Coriolis flowmeter of the present invention effectively optimizes the vibration amplitude control of the Coriolis flowmeter by adopting adaptive adjustment and PI control strategies based on the whale algorithm, reduces signal deviation, improves signal accuracy, and thus improves the measurement accuracy of mass flow. It has strong adaptive and real-time adjustment capabilities, can quickly adjust parameters according to changes in actual signals, and realize dynamic and real-time mass flow measurement. In general, this method shows good adaptability in complex and highly variable flow measurement scenarios, can cope with challenges such as large signal amplitude changes and strong noise, and maintains high measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0024] Figure 1 FIG. 4 is a flow chart of a signal processing method according to an embodiment of the present invention.

[0025] Figure 2 4 is a flowchart of sub-steps of a signal processing method in one embodiment of the present invention.

[0026] Figure 3 Flowchart of a whale algorithm according to an embodiment of the present invention.

[0027] Figure 4 Flowchart of another whale algorithm in one embodiment of the present invention.

[0028] Figure 5 2 is a vibration amplitude curve obtained by a signal processing method according to an embodiment of the present invention.

[0029] Figure 6 Comparison of vibration amplitude curves under different iteration numbers.

[0030] Figure 7 FIG. 1 is a flow chart for calculating mass flow rate and density in one embodiment of the present invention.

[0031] Figure 8 2 is a waveform diagram of two vibration signals in one embodiment of the present invention.

[0032] Figure 9 2 is a comparison diagram of signal waveforms before and after filtering in one embodiment of the present invention.

[0033] Figure 10 FIG. 4 is a structural diagram of a signal processing module in an embodiment of the present invention.

[0034] Figure 11 FIG. 4 is an algorithm structure diagram of a signal processing module in one embodiment of the present invention.

[0035] Figure 12 1 is a structural diagram of a control system in one embodiment of the present invention. DETAILED DESCRIPTION

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

[0037] The terms "coupled," "connected," or "connected" as used in this specification encompass both direct and indirect connections. An indirect connection is a connection made through an intermediate medium, such as an electrically conductive medium, which may have parasitic inductance or capacitance. An indirect connection may also include a connection through other active or passive devices, such as switches, follower circuits, or other circuits or components, to achieve the same or similar functional objectives. Furthermore, in the invention, terms such as "first" and "second" are primarily used to distinguish one technical feature from another and do not necessarily require or imply a specific relationship, quantity, or order between these technical features.

[0038] In the detailed description of the specification, reference is made to the accompanying drawings forming a part hereof, wherein like reference numerals designate like parts throughout, and wherein exemplary embodiments that may be implemented are shown by way of example. It should be understood that other embodiments may be utilized and structural or logical changes may be made without departing from the scope of the present application. Therefore, the following detailed description should not be construed in a limiting sense.

[0039] The various operations in the specification may be described as multiple discrete actions or operations in a manner that is most helpful in understanding the claimed subject matter. However, the order of description should not be interpreted as implying that these operations must be sequentially related. Specifically, these operations may not be performed in the order presented. The described operations may be performed in an order different from the described embodiments. Various additional operations may be performed and / or the described operations may be omitted in additional embodiments.

[0040] For the purposes of this application, the phrase "A and / or B" means (A), (B), or (A and B). For the purposes of this application, the phrase "A, B and / or C" means (A), (B), (C), (A and B), (A and C), (B and C), or (A, B and C).

[0041] Various components and devices may be referred to or shown herein in the singular, but this is merely for ease of discussion, and any element referred to in the singular may include a plurality of such elements in accordance with the teachings herein.

[0042] The description uses the phrases "in one embodiment" or "in other embodiments" or "in some embodiments", which can each refer to one or more of the same or different embodiments. In addition, the terms "including", "comprising", "having", etc. used in relation to the embodiments of this application are synonymous.

[0043] At present, the commonly used signal processing methods for Coriolis flowmeters include PI amplitude control, Kalman filtering, zero-crossing method, etc.

[0044] PI amplitude control: There is an optimal amplitude value during the vibration of the measuring tube. When the measuring tube vibrates in a steady state at this amplitude, the measuring performance of the instrument can be improved to the greatest extent and the service life of the measuring tube can be extended. Therefore, it is hoped that the vibration of the measuring tube can reach the desired vibration amplitude through the PI amplitude control algorithm. The input can be adjusted by the proportional algorithm and the integral algorithm of the error to achieve the purpose of stabilizing the vibration of the measuring tube. However, in the system test, the two parameters K of the PI controller are p , K i It is very important and must be appropriately determined based on previous experience or the performance of the specific sensor. p Too large may lead to overreaction and oscillation, while too small may lead to slow response and large steady-state error. i Too large a value may cause system oscillation or instability, while too small a value may not eliminate steady-state error. When adjusting these two parameters, it is necessary to balance response speed, steady-state error, and system stability.

[0045] Kalman filter: For discrete signals collected by sensors, since they contain noise, they generally need to be filtered. For irregular noise filtering, Kalman filter is used. It mainly includes two processes: prediction and update. In the prediction step, the state estimation of the previous step is used to and control input u k , predict the current state through the state transfer matrix A and control matrix B and the error covariance matrix In the update step, combined with the actual measurement value y k And the observation matrix H, calculate the Kalman gain K k , and then adjust the predicted state according to the gain to obtain the updated state estimate And update the error covariance matrix P k This process continuously optimizes the state estimate in a recursive manner. This method works well for high-noise situations. However, if the noise does not conform to a Gaussian distribution or the model is inaccurate, the performance of the Kalman filter may drop significantly. Furthermore, the determination of the model parameters is also subjective, and the filtering effect depends on an accurate system model and noise assumptions. Therefore, it cannot effectively filter the small noise of the Coriolis measuring tube.

[0046] Zero-crossing method: The zero-crossing method refers to finding the critical intersection moment of the 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 of the signals t1 and t2, that is, Where T is the signal period. Coriolis force measurements typically require high precision and fast response. While the zero-crossing method offers good real-time performance, its accuracy can be affected by noise and waveforms, making it less reliable than more complex phase difference measurement methods.

[0047] Therefore, according to the above algorithm summary, how to determine a reliable K p , K i For amplitude control, it is very important to effectively filter noise and establish a simple phase difference calculation model. According to the above algorithm, the signal processing process is improved to ensure the establishment of an accurate and reliable Coriolis flowmeter signal processing algorithm model.

[0048] Example 1

[0049] like Figure 1 As shown, a signal processing method for a Coriolis flowmeter in one embodiment of the present invention includes:

[0050] Initialize a set of whale individuals.

[0051] Construct the target fitness function.

[0052] With the goal of minimizing the fitness value, the position of the individual whale is iteratively updated based on the whale algorithm.

[0053] After the iteration is completed, the position of the whale individual with the smallest fitness value is selected as the optimal coefficient and output.

[0054] The position of the individual whale includes a proportional coefficient and an integral coefficient randomly selected within a preset range.

[0055] In one embodiment, initialization I w whale individuals. Since the whale position parameters include the proportional coefficient and the integral coefficient, the dimension of the prey is defined as 2, and the position of the i-th whale individual is recorded as:

[0056]

[0057] in, is the proportional coefficient of the i-th whale individual, is the integral coefficient of the i-th whale individual. The proportional coefficient of each whale individual and the integral coefficient They are randomly selected within a preset range, namely:

[0058]

[0059] Among them, K pmin and K pmax is the proportionality coefficient The minimum and maximum values ​​of the preset range, K imin and K imax is the integrating factor The minimum and maximum values ​​of the preset range.

[0060] Generally speaking, based on practical experience, and For example, the preset range in this embodiment is: I w is 100.

[0061] Next, the target fitness function is used to describe the deviation between the optimized amplitude obtained by feedback adjustment of the vibration amplitude of the Coriolis flowmeter based on the individual whale and the expected amplitude.

[0062] In one embodiment, the target fitness function may include:

[0063]

[0064] Among them, ΔAMP i [n]=AMP hope -|x i [n]|.

[0065] Where, and are the proportional coefficient and integral coefficient of the i-th whale individual, is the fitness value of the i-th whale individual, AMP hope is the expected amplitude, n is the discrete time index, N is the number of sampling points for the optimized amplitude, x i [n] is the optimized amplitude obtained by feedback adjustment of the vibration amplitude of the Coriolis flowmeter based on the i-th whale individual.

[0066] Among them, the expected amplitude AMP hope It can be preset based on actual needs. For example, the expected amplitude can be 0.35.

[0067] In one embodiment, the optimized amplitude x i [n] can be obtained by hardware control. In other embodiments, the optimized amplitude x i [n] can also be obtained through simulation or other methods. Optimized amplitude x i The specific method of [n] will be described in detail below and will not be elaborated here.

[0068] like Figure 2 As shown, with the goal of minimizing the fitness value, iteratively updating the position of individual whales based on the whale algorithm may include the following steps:

[0069] The vibration amplitude of the Coriolis flowmeter is feedback-adjusted based on each individual whale to obtain the corresponding optimized amplitude, and the fitness value of each individual whale is calculated based on the target fitness function.

[0070] The whale individual with the smallest fitness value is selected, and the position of the whale individual is updated based on the position of the whale individual and the whale algorithm.

[0071] Repeat the above two steps until the iteration is completed.

[0072] In one embodiment, when feedback adjustment is performed on the vibration amplitude of the Coriolis flowmeter based on each individual whale to obtain the corresponding optimized amplitude, hardware control can be used, for example:

[0073] Output the position of each whale individually, that is, the proportional coefficient and the integral coefficient Then, through the excitation system, PI controller, PID controller or other modules based on the proportional coefficient and the integral coefficient Feedback control is performed on the amplitude of the Coriolis flowmeter (such as PI control, PID control, etc.) to make the Coriolis flowmeter vibrate at the adjusted amplitude, and the vibration signal of the Coriolis flowmeter is collected. At this time, the amplitude of the vibration signal is the optimized amplitude.

[0074] For example, the vibration signal may be generated by any vibration sensor on the measuring tube of the Coriolis flowmeter.

[0075] In other embodiments, when feedback adjustment is performed on the vibration amplitude of the Coriolis flowmeter based on each individual whale to obtain the corresponding optimized amplitude, simulation or other methods may also be used. For example, the simulation method includes the following steps:

[0076] Output the position of each whale individually, that is, the proportional coefficient and the integral coefficient Then, is the proportional coefficient, The integral coefficient is calculated by simulating the amplitude of the Coriolis flowmeter using a PI simulation control algorithm, a PID simulation control algorithm, or other control algorithms to obtain an optimized amplitude. The simulation control algorithm can adopt an existing algorithm, which is also a technical means known to those skilled in the art.

[0077] Then, the optimized amplitude is substituted into the target fitness function to obtain the fitness value of each individual whale.

[0078] It can be seen that if the proportional coefficient and integral coefficient of a whale individual are used to control the vibration amplitude of the Coriolis flowmeter, the optimized amplitude obtained after feedback control is consistent with the expected amplitude AMP. hopeThe whale with the smallest sum of deviations between the two parameters (and the fitness value) is the most effective at stabilizing the vibration of the Coriolis flowmeter, ensuring that the actual amplitude of the Coriolis flowmeter quickly approaches the desired amplitude. Our goal in subsequent work will be to find this optimal coefficient.

[0079] Then, the whale with the smallest fitness value is selected, and the position of the whale is updated based on the position of the whale and the iterative whale algorithm. For the sake of convenience, the position of the whale with the smallest fitness value in the current iteration step is recorded as The position of the individual whale to be iteratively updated is recorded as The updated position of the individual whale is recorded as

[0080] Here, this embodiment will exemplarily provide two specific whale algorithms. The first algorithm is as follows: Figure 3 As shown, this algorithm is the preferred whale algorithm. Specifically, the iterative update of the position of individual whales based on the whale algorithm includes:

[0081] When the number of iteration steps does not exceed the preset threshold value Tmax, the prey encirclement algorithm is selected to update the position of the individual whale.

[0082] When the number of iteration steps exceeds the preset threshold Tmax, the bubble net attack algorithm or the random exploration algorithm is selected to update the position of the individual whale.

[0083] Preferably, the preset threshold Tmax can be set to 5 steps or 6 steps.

[0084] Specifically, when the number of iteration steps exceeds a preset threshold value Tmax, selecting the bubble net attack algorithm or the random exploration algorithm to update the position of the individual whale includes:

[0085] Generate a random probability value P. For example, the range of the generated random probability value P is [0, 1]:

[0086] P = rand(0,1)

[0087] If the random probability value P is less than 0.5, the bubble net attack algorithm is selected to update the position of the individual whale.

[0088] If the random probability value P is not less than 0.5, the random exploration algorithm is selected to update the position of the individual whale.

[0089] Preferably, the basic vector parameters can be initialized before each iteration and

[0090]

[0091] in, and are all random vectors in the range of [0,1], and a is the nonlinear attenuation parameter:

[0092]

[0093] Where a initial and γ are preset parameters, T max is the iteration period, and t is the number of current iteration steps. initial is 2, T max The value of a is 3ms, and γ is 0.5. This is a parabolic decay formula. Initially, a is quickly reduced to accelerate global search, and then a changes slowly to improve local development.

[0094] Exemplarily, the prey encirclement algorithm can be as follows:

[0095]

[0096] For example, the bubble network attack algorithm can be as follows:

[0097]

[0098] Where b is the spiral shape constant and l is a random number in the interval [-1,1].

[0099] For example, b=1, l=0.5, cos(2π×0.5)=-1, then the above formula can be simplified to:

[0100]

[0101] For example, the random exploration algorithm can be as follows:

[0102]

[0103] in, The position of a newly randomly selected individual whale within the preset range.

[0104] In the second whale algorithm, iteratively updating the position of individual whales based on the whale algorithm may include:

[0105] Generate random probability value P and convergence coefficient vector

[0106] Based on the random probability value P and the convergence coefficient vector An algorithm selected from the prey encirclement algorithm, bubble net attack algorithm and random exploration algorithm is used to update the position of individual whales.

[0107] For example, the range of the generated random probability value P is [0, 1]:

[0108] P = rand(0,1)

[0109] Convergence coefficient vector for:

[0110]

[0111] in, is a random vector in the range [0,1], and a is a nonlinear attenuation parameter:

[0112]

[0113] Where a initial and γ are preset parameters, T max is the iteration period, and t is the number of current iteration steps. initial is 2, T max The value of a is 3ms, and γ is 0.5. This is a parabolic decay formula. Initially, a is quickly reduced to accelerate global search, and then a changes slowly to improve local development.

[0114] like Figure 4 As shown, for example, based on the random probability value P and the convergence coefficient vector Select one of the following algorithms: the prey encirclement algorithm, the bubble net attack algorithm, and the random exploration algorithm. Updating the position of individual whales may include:

[0115] If the random probability value P is less than 0.5, the prey encirclement algorithm is selected to update the position of the individual whale.

[0116] If the random probability value P is not less than 0.5 and the modulus of the convergence coefficient vector |A| is less than 1, the bubble net attack algorithm is selected to update the position of the individual whale.

[0117] If the random probability value P is not less than 0.5 and the modulus of the convergence coefficient vector |A| is not less than 1, the random exploration algorithm is selected to update the position of the individual whale.

[0118] Preferably, the basic vector parameters can be initialized before each iteration and

[0119]

[0120] in, is a random vector in the range [0,1].

[0121] The specific descriptions of the prey encirclement algorithm, bubble net attack algorithm and random exploration algorithm are as described in the preferred whale algorithm and will not be repeated here.

[0122] Preferably, the signal processing method may further include: if the position of the individual whale exceeds a preset range, correcting the position of the individual whale.

[0123] In one embodiment, after each iterative update, it can be determined whether the updated position of the individual whale exceeds the range. If it does not exceed the preset range, the position of the individual whale is not adjusted. If it exceeds the preset range, the position of the individual whale is corrected.

[0124] Specifically, the corrected individual whale position parameters can be taken as:

[0125]

[0126] Among them, X new is the corrected whale individual position parameter, X old is the original whale individual position parameter, L min is the minimum value of the preset range of the corresponding position parameter, L max The maximum value of the preset range for the corresponding position parameter.

[0127] Specifically, if the original whale individual proportion coefficient If it exceeds the preset range, the corrected proportional coefficient is used. for:

[0128]

[0129] Similarly, if the original whale individual proportion coefficient If it exceeds the preset range, the corrected proportional coefficient is used. for:

[0130]

[0131] For example, if Corrected to

[0132] like Corrected to

[0133] By repeating the above iterative process, the position of the individual whale is updated until the iteration ends.

[0134] In one embodiment, the criterion for determining whether an iteration is complete may be whether the current number of iterations is greater than or equal to the maximum number of iterations. If so, the iteration is complete; otherwise, the iteration continues.

[0135] Exemplarily, the iteration completion condition may be determined before each iteration. Of course, the determination may also be made after each iteration is completed or at other time points.

[0136] In other embodiments, other iteration termination conditions and termination judgment times can also be set according to actual needs. For example, it can be determined whether the fitness value of the whale individual with the smallest fitness value is less than or equal to a preset threshold. If so, the iteration is completed, otherwise, the iteration continues. Alternatively, it is also possible to determine whether the current number of iterations is greater than or equal to the maximum number of iterations, and also determine whether the fitness value of the whale individual with the smallest fitness value is less than or equal to the preset threshold. As long as one condition is judged to be yes, the iteration is completed. If both conditions are judged to be no, the iteration continues. Alternatively, the judgment step can be omitted, and the iteration completion condition can be triggered by other methods such as the timed iteration method.

[0137] Then, after the iteration is completed, the optimal coefficient is output

[0138]

[0139] Furthermore, the signal processing method may further include: based on the optimal coefficient Feedback control is performed on the vibration amplitude of the Coriolis flowmeter, and the vibration signal of the Coriolis flowmeter is obtained, and the mass flow rate and density are calculated based on the vibration signal.

[0140] By obtaining the optimal coefficient That is, the proportional coefficient and the integral coefficient are determined. Those skilled in the art should know how to further perform feedback control on the vibration amplitude of the Coriolis flowmeter, such as through PI control, PID control, etc. In one embodiment, the optimized and Perform PI control on the vibration amplitude of the Coriolis flowmeter and adjust it to obtain a new driving signal x adjusted [n′] is used to excite the Coriolis flowmeter so as to minimize the deviation between the actual vibration amplitude of the Coriolis flowmeter and the expected amplitude. For example, the PI control formula is as follows:

[0141]

[0142] Where x[n′] is the new vibration signal of the Coriolis flowmeter obtained after determining the optimal coefficient. It can be the signal generated by any vibration sensor on the measuring tube of the Coriolis flowmeter. n′ is the discrete time index, n = 1, 2, 3, ..., N′, N′ is the number of sampling points, ΔAMP[n′] = AMP hope -|x[n′]|, represents the difference between the amplitude of the new vibration signal at discrete point n′ and the expected amplitude AMP hope The size of the deviation between .

[0143] ΔAMP[ζ′]=AMP hope -|x[ζ′]|, ζ′=1,2,…,n′. is the integral term, which represents the difference between the amplitude of the new vibration signal at the discrete point ζ′ and the expected amplitude AMP hope The cumulative deviation between .

[0144] Figure 5 The solid line in the middle shows the vibration amplitude curve of the Coriolis flowmeter under vibration control based on the original PID control system, and the dashed line shows the vibration amplitude curve of the Coriolis flowmeter under vibration control based on the signal processing method of this embodiment. The two different dashed lines represent the vibration amplitude curves when the first whale algorithm (optimized whale algorithm) and the second whale algorithm (whale algorithm) are used, respectively. It can be seen that the whale algorithm, especially the optimized whale algorithm, greatly improves the vibration amplitude response characteristics of the Coriolis flowmeter.

[0145] Figure 6 The figure shows the comparison of vibration amplitude curves under different numbers of iterations. It can be seen that increasing the number of iterations can optimize the amplitude response.

[0146] After implementing feedback control of the Coriolis flowmeter's vibration amplitude based on the optimal coefficient, the Coriolis flowmeter's amplitude has been optimized and adjusted to more closely approximate the actual desired amplitude. This optimizes the vibration signal, improving the accuracy of mass flow and density calculations. Calculating mass flow and density based on vibration signals is common knowledge in the field, and those skilled in the art are capable of performing relevant analysis and calculations based on vibration signals.

[0147] like Figure 7 As shown, illustratively, obtaining a vibration signal of a Coriolis flowmeter and calculating mass flow and density based on the vibration signal may include: obtaining two vibration signals generated by two vibration sensors of the Coriolis flowmeter, and sampling and digitally quantizing them respectively. Figure 8 The waveforms of two vibration signals are shown.

[0148] Next, the two vibration signals can be filtered separately. This step is to remove noise from the signals. For example, the two signals are filtered separately to obtain enhanced signals. Figure 9 The figure shows the comparison of signal waveforms before and after filtering.

[0149] Next, the filtered enhanced signal is transformed by fast Fourier transform to obtain a frequency domain signal. Specifically, the Fourier transform can be performed based on the following formula:

[0150]

[0151] Where k is the frequency index, n is the discrete time index, j is the imaginary unit, y[n] is the enhanced signal after filtering, Y[k] is the frequency domain component of the signal at frequency index k, and N is the number of sampling points. The number of sampling points here can be different from the number of sampling points when optimizing the whale algorithm.

[0152] Next, the two frequency domain signals Y[k] can be Hilbert transformed and the phase difference can be calculated. The Hilbert transform and phase difference calculation formulas are as follows:

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

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

[0155] Among them, φ1[k] and φ2[k] represent the instantaneous phase of the two sensors, Δφ 12 [k] is the instantaneous phase difference.

[0156] Next, the mass flow rate Q is calculated based on the phase difference m For example, the mass flow rate Q can be calculated by the following formula m :

[0157]

[0158] Among them, C1 is a constant related to the sensor characteristics, Amax is the expected amplitude under ideal conditions, and A adjust is the actual amplitude of the vibration signal under the vibration amplitude PI control by optimizing the whale algorithm. In other embodiments, the mass flow rate Q m It can also be calculated by the following formula: m =C1·Δφ 12 [k].

[0159] Next, the density ρ is calculated based on the phase difference. For example, the density ρ can be calculated using the following formula:

[0160]

[0161] where C2 is a constant that is dependent on the fluid and sensor geometry.

[0162] 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.

[0163] In order to ensure the accuracy of the measurement results, the signal processing method may further include: correcting the calculation results of the mass flow and density based on the temperature.

[0164] 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.

[0165] In other embodiments, only the mass flow rate or only the density may be calculated.

[0166] In summary, this solution, through the adaptive regulation and PI control strategy based on the whale algorithm, effectively optimizes the vibration amplitude control of the Coriolis flowmeter, reduces signal deviation, improves signal accuracy, and thus enhances the measurement accuracy of the mass flowmeter. The combination of lattice filtering and amplification filtering effectively removes noise interference, ensuring the reliability and stability of the vibration signal, especially in complex environments, thereby improving the robustness of the system. Combining Fourier transform and Hilbert transform techniques, it accurately extracts phase difference information in the frequency domain. This phase difference calculation yields more accurate mass flow and density values, meeting the requirements of high-precision measurement. The application of the optimized whale algorithm in signal processing gives this method strong adaptability and real-time adjustment capabilities, enabling rapid parameter adjustments based on actual signal changes, enabling dynamic and real-time mass flow measurement. Overall, this method demonstrates good adaptability in complex and highly variable flow measurement scenarios, capable of coping with challenges such as large signal amplitude variations and high noise levels, while maintaining high measurement accuracy.

[0167] Example 2

[0168] like Figure 10 As shown, the present invention further provides a signal processing module 10 for a Coriolis flowmeter. The signal processing module 10 includes at least one processor 11, a memory 12 (e.g., a non-volatile memory), a storage 13, and a communication interface 14. The at least one processor 11, the storage 12, the storage 13, and the communication interface 14 are connected together via a bus 15. The at least one processor 11 executes at least one computer-readable instruction stored or encoded in the storage 12. In one specific embodiment, the processor 11 may be a DSP.

[0169] It can be understood that the computer executable instructions stored in the memory 12, when executed, enable the at least one processor 11 to perform the various operations and functions described in Example 1.

[0170] Figure 11A preferred algorithm processing module for the signal processing module 10 is presented. First, the signal processing module 10 system initializes the module settings to ensure that all parameters and settings are correct. It then configures the interrupt routine to ensure stable operation during real-time data processing. Next, the signal processing module 10 calculates the amplitude of the received vibration signal and analyzes the amplitude changes to lay the foundation for subsequent frequency analysis. Based on the aforementioned signal processing method, the signal processing module 10 then transmits the calculated results for each individual whale to an external excitation system, PID controller, or other drive control module for feedback control of the vibration amplitude of the Coriolis flowmeter, ultimately determining the optimal coefficients. The signal processing module 10 then outputs the optimal coefficients for feedback control of the vibration amplitude of the Coriolis flowmeter based on the optimal coefficients. The module then acquires the vibration signal of the Coriolis flowmeter and calculates the phase difference, mass flow rate, and density based on the vibration signal. The calculated results can also be corrected based on temperature, completing the entire signal processing process and ensuring the high precision and real-time performance of the flowmeter. This process not only improves system performance but also ensures measurement accuracy and stability.

[0171] Example 3

[0172] like Figure 12 As shown, the present invention also provides a control system for a Coriolis flowmeter, which includes the signal processing module 10 described in Example 2, as well as a temperature compensation module 20, a signal acquisition module 30, a driving module 40 and a peripheral interface module 50.

[0173] The temperature compensation module 20 is connected to the signal processing module 10 to generate a temperature signal.

[0174] Specifically, the temperature compensation module 20 may include a temperature sensor, a first amplifying and filtering circuit, and a first analog-to-digital converter. The temperature sensor is used to collect temperature information and convert it into a temperature signal. The first amplifying and filtering circuit is connected to the temperature sensor to receive the temperature signal and amplify and filter the temperature signal. The first analog-to-digital converter is connected to the first amplifying and filtering circuit to perform analog-to-digital conversion on the processed temperature to generate a digital temperature signal. The signal processing module 10 is connected to the first analog-to-digital converter to receive the digital temperature signal. The signal processing module 10 can perform temperature compensation correction calculations based on the digital temperature signal.

[0175] The signal acquisition module 30 is connected to the signal processing module and the Coriolis flowmeter, and is used to acquire vibration signals and send the vibration signals to the signal processing module 10 .

[0176] Specifically, the signal acquisition module 30 may include a second amplifying and filtering circuit, a third amplifying and filtering circuit, a second analog-to-digital converter, and a third analog-to-digital converter.

[0177] The second amplifying and filtering circuit can be connected to a vibration sensor on the measuring tube of the Coriolis flowmeter. The second amplifying and filtering circuit is used to amplify and filter the vibration signal emitted by the vibration sensor. The second analog-to-digital converter is connected to the second amplifying and filtering circuit. The second analog-to-digital converter is used to perform analog-to-digital conversion on the vibration signal after the second amplifying and filtering processing to generate a corresponding digital vibration signal. The signal processing module 10 is connected to the second analog-to-digital converter to receive this digital vibration signal. The signal processing module 10 can implement the various operations and functions described in Example 1 based on this digital vibration signal.

[0178] The third amplifying and filtering circuit can be connected to another vibration sensor on the measuring tube of the Coriolis flowmeter. The third amplifying and filtering circuit is used to amplify and filter the vibration signal emitted by the vibration sensor. The third analog-to-digital converter is connected to the third amplifying and filtering circuit. The third analog-to-digital converter is used to perform analog-to-digital conversion on the vibration signal after the third amplifying and filtering processing to generate a corresponding digital vibration signal. The signal processing module 10 is connected to the third analog-to-digital converter to receive this digital vibration signal. The signal processing module 10 can implement the various operations and functions described in Example 1 based on this digital vibration signal.

[0179] The driving module 40 is connected to the signal processing module 10 and the Coriolis flowmeter to drive the Coriolis flowmeter to vibrate based on the control of the signal processing module 10 .

[0180] Specifically, the driving module 40 may include a DDS (Direct Digital Synthesizer), an MDAC (Multi-channel Digital-to-Analog Converter), a power amplifier, and an exciter.

[0181] The DDS is connected to the signal processing module 10, which can control the DDS to generate a digital drive signal for driving the vibration of the exciter of the Coriolis flowmeter. The MDAC is connected to the DDS, and the MDAC is used to perform digital-to-analog conversion on the digital drive signal to generate an analog drive signal. The power amplifier is connected to the MDAC and the exciter of the Coriolis flowmeter, and the power amplifier is used to amplify the analog drive signal and output the amplified analog drive signal to the exciter to control the exciter to drive the measuring tube to vibrate.

[0182] The peripheral device and interface module 50 may include a power-off monitoring unit connected to the signal processing module 10 , an indicator light, a communication serial port, an EEPROM (Electrically Erasable Programmable Read-Only Memory) and an SDRAM (Synchronous Dynamic Random Access Memory).

[0183] The power failure monitoring unit is used to monitor the power status of the signal processing module 10 to prevent power failures. The indicator light is used to illuminate based on the control of the signal processing module 10. The communication serial port is used for communication between the signal processing module 10 and external devices. The EEPROM and SDRAM are used for data storage.

[0184] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0185] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0186] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0187] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0188] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.

[0189] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method 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 can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.

Claims

1. A signal processing method for a Coriolis flowmeter, characterized in that: include: Initializing a group of whale individuals, wherein the positions of the whale individuals include a proportional coefficient and an integral coefficient randomly selected within a preset range; Constructing a target fitness function, wherein the target fitness function is used to describe the deviation between the optimized amplitude obtained after feedback adjustment of the vibration amplitude of the Coriolis flowmeter based on the individual whale and the expected amplitude; With the goal of minimizing the fitness value, iteratively updating the position of the individual whale based on the whale algorithm; After the iteration is completed, the position of the whale individual with the smallest fitness value is selected as the optimal coefficient and output.

2. The signal processing method for a Coriolis flowmeter according to claim 1, characterized in that: The target fitness function includes: Among them, ΔAMP i [n]=AMP hope -x i [n]; Where, and are the proportional coefficient and integral coefficient of the i-th whale individual, is the fitness value of the i-th whale individual, AMP hope is the expected amplitude, n is the discrete time index, N is the number of sampling points, x i [n] is the optimized amplitude obtained after feedback adjustment of the vibration amplitude of the Coriolis flowmeter based on the i-th whale individual.

3. The signal processing method for a Coriolis flowmeter according to claim 1, characterized in that: With the goal of minimizing the fitness value, iteratively updating the position of the individual whale based on the whale algorithm includes: performing feedback adjustment on the vibration amplitude of the Coriolis flowmeter based on each of the individual whales to obtain a corresponding optimized amplitude, and calculating the fitness value of each of the individual whales based on the target fitness function; The whale individual with the smallest fitness value is selected, and the position of the whale individual is iteratively updated based on the position of the whale individual and the whale algorithm.

4. The signal processing method for a Coriolis flowmeter according to claim 1, characterized in that: With the goal of minimizing the fitness value, iteratively updating the position of the individual whale based on the whale algorithm includes: When the number of iteration steps does not exceed a preset threshold, selecting the prey encirclement algorithm to update the position of the individual whale; When the number of iteration steps exceeds a preset threshold, the bubble net attack algorithm or the random exploration algorithm is selected to update the position of the individual whale.

5. The signal processing method for a Coriolis flowmeter according to claim 4, characterized in that: When the number of iteration steps exceeds the preset threshold, selecting the bubble net attack algorithm or the random exploration algorithm to update the position of the individual whale includes: Generate random probability values; If the random probability value is less than 0.5, the bubble net attack algorithm is selected to update the position of the individual whale; If the random probability value is not less than 0.5, the random exploration algorithm is selected to update the position of the individual whale.

6. The signal processing method for a Coriolis flowmeter according to claim 1, characterized in that: The signal processing method further includes: If the position of the individual whale exceeds the preset range, the position of the individual whale is corrected.

7. The signal processing method for a Coriolis flowmeter according to claim 6, characterized in that: If the position of the individual whale exceeds the preset range, correcting the position of the individual whale includes taking the corrected position parameter of the individual whale as: Among them, X new is the corrected position parameter of the individual whale, X old is the original whale individual position parameter, L min is the minimum value of the preset range of the corresponding position parameter, L max The maximum value of the preset range of the corresponding position parameter.

8. The signal processing method for a Coriolis flowmeter according to claim 1, characterized in that: The signal processing method further includes: performing feedback control on the vibration amplitude of the Coriolis flowmeter based on the optimal coefficient, and obtaining a vibration signal of the Coriolis flowmeter, and calculating mass flow and / or density based on the vibration signal; and / or A vibration signal of the Coriolis flowmeter is acquired, mass flow and / or density is calculated based on the vibration signal, and the calculation result is corrected based on temperature.

9. A signal processing module for a Coriolis flowmeter, characterized in that: include: at least one processor; as well as A memory storing instructions, wherein when the instructions are executed by the at least one processor, the at least one processor executes the signal processing method for a Coriolis flowmeter according to any one of claims 1 to 8.

10. A control system for a Coriolis flowmeter, characterized in that: include: The signal processing module for a Coriolis flowmeter according to claim 9; as well as a temperature compensation module, connected to the signal processing module to sense the temperature and generate a temperature signal; and / or a signal acquisition module connected to the signal processing module and the Coriolis flowmeter to acquire vibration signals and send the vibration signals to the signal processing module; and / or A driving module is connected to the signal processing module and the Coriolis flowmeter to drive the Coriolis flowmeter to vibrate based on the control of the signal processing module.