Electrode dirt detection method and system in electromagnetic flowmeter

By collecting electrode resistance values, extracting feature matrix and calculating Riemann Center methods in electromagnetic flowmeters, the timeliness of electrode dirt detection are solved, and online rapid detection and dirt type analysis are realized, which improves detection efficiency and accuracy.

CN114777886BActive Publication Date: 2025-03-18CHONGQING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210510275.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-11
Publication Date
2025-03-18
Estimated Expiration
2042-05-11

AI Technical Summary

Technical Problem

The prior art is difficult to detect dirt attached to the electrodes in time during the electromagnetic flowmeter operation, resulting in measurement errors and oscillation and drift of the instrument output.

Method used

By collecting the resistance values ​​between the electrode and the ground, extracting the characteristic matrix, and calculating the Riemann Center, comparing the similarity between the characteristic matrix of the sample to be tested and the characteristic matrix in different situations under online working conditions, and determining the type and existence of the electrode dirt.

Benefits of technology

It realizes rapid online detection of electrode dirt in electromagnetic flowmeters, improves detection efficiency and accuracy, and can promptly detect and analyze the types of dirt attached to the electrodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114777886B_ABST
    Figure CN114777886B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and system for detecting electrode dirt in an electromagnetic flowmeter, and belongs to the field of electromagnetic flowmeter fault diagnosis. The method comprises: in three different situations, when the electromagnetic flowmeter is offline and there is no dirt on the electrode, when it is offline and different dirt is attached to the electrode, and when the electromagnetic flowmeter is online, respectively collecting the resistance value between the electrode and the ground to form a first data set, a second data set, and a sample to be tested, respectively extracting the positive definite characteristic matrix corresponding to each batch of samples and calculating its Riemann center; calculating the similarity index between the sample characteristic matrix and each first and second characteristic matrix; extracting the l characteristic matrices with the largest similarity index and calculating their local Riemann centers; calculating the proximity between the local Riemann center and each second Riemann center, and judging the dirt attachment corresponding to the electrode of the sample to be tested with the largest proximity. The method of the present invention can realize online rapid detection of electrode dirt in an electromagnetic flowmeter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electromagnetic flowmeter fault diagnosis, and in particular to a method and system for detecting electrode dirt in an electromagnetic flowmeter. Background Art

[0002] If the medium measured by the electromagnetic flowmeter is relatively dirty for a long time, dirt will be generated on the electrodes of the electromagnetic flowmeter after working for a period of time. When the conductivity of the dirt material is different from the conductivity of the measured medium, it will cause measurement errors. The adhesion of sludge and oil to the electrodes will also cause the meter output to swing and drift. However, there is currently no very effective method to detect the attachment on the electrode. It can only be detected manually offline, and it is impossible to find problems in time during the operation of the electromagnetic flowmeter. Summary of the invention

[0003] The object of the present invention is to provide a method and system for detecting electrode contamination in an electromagnetic flowmeter, so as to realize online rapid detection of electrode contamination in the electromagnetic flowmeter.

[0004] To achieve the above object, the present invention provides the following solutions:

[0005] A method for detecting electrode dirt in an electromagnetic flowmeter, comprising:

[0006] When the electromagnetic flowmeter is offline and there is no dirt on the electrode, the resistance value between the electrode and the ground is collected to form a first data set;

[0007] Extracting a first feature matrix corresponding to each batch of samples in the first data set;

[0008] Calculate the first Riemann centers of all first feature matrices corresponding to all batches of samples in the first data set;

[0009] When the electromagnetic flowmeter is offline and different dirt is attached to the electrode, the resistance value between the electrode and the ground is collected to form a second data set;

[0010] Extracting a second feature matrix corresponding to each batch of samples in a second data set corresponding to different pollutants;

[0011] Calculate the second Riemann centers of all second feature matrices corresponding to all batches of samples in the second data set;

[0012] When the electromagnetic flowmeter is working online, the resistance value between the electrode and the ground is collected to form a sample to be tested, and a sample feature matrix of the sample to be tested is extracted;

[0013] Calculate the similarity index between the sample feature matrix and the first feature matrix and the second feature matrix respectively;

[0014] Extracting a preset number of feature matrices with the largest similarity index, and calculating the local Riemann centers of the preset number of feature matrices;

[0015] Calculate the proximity of the local Riemann center to the first Riemann center and the second Riemann center respectively;

[0016] The dirt detection result of the electrode corresponding to the sample to be tested is determined according to the data set corresponding to the Riemann center with the greatest proximity.

[0017] Optionally, extracting a first feature matrix corresponding to each batch of samples in the first data set specifically includes:

[0018] Using formula Extract the first feature matrix corresponding to each batch of samples in the first data set; where Ω i is the i-th batch sample in the first data set, Ω i =[σ i (1),σ i (2),...,σ i (n)]∈R m×n , σ i (n) is Ω i The nth resistance value data in the data; n is the number of data samples for each batch of samples, m is the dimension of the resistance value data, R m×n is an m×n vector space; P i is the i-th batch sample Ω in the first data set i The corresponding first characteristic matrix.

[0019] Optionally, calculating the first Riemann centers of all first feature matrices corresponding to all batches of samples in the first data set specifically includes:

[0020] Using formula Calculate the first Riemann center P of all first feature matrices corresponding to all batches of samples in the first data set g ; where P j is the jth batch sample Ω in the first data set j The corresponding first characteristic matrix; d R (P i , P j ) is P i and P j The Riemann distance between them; N is the number of sample batches in the first data set.

[0021] Optionally, respectively calculating similarity indices between the sample feature matrix and the first feature matrix and the second feature matrix includes:

[0022] Using formula Calculate the sample feature matrix Q separately cThe similarity index S between the first feature matrix and the second feature matrix oz ; where P z represents the zth characteristic matrix in the set of the first characteristic matrix and the second characteristic matrix; λ a (Q c ,P z ) is Q c -1 P z The characteristic value of .

[0023] Optionally, respectively calculating the proximity of the local Riemann center to the first Riemann center and the second Riemann center, specifically including:

[0024] Using formula and Calculate the local Riemann center P separately g0 With the first Riemann center P g and the second Riemann center P gc The degree of closeness α.

[0025] An electrode dirt detection system in an electromagnetic flowmeter, comprising:

[0026] A first data set acquisition module, used for acquiring the resistance value between the electrode and the ground to form a first data set when the electromagnetic flowmeter is offline and there is no dirt on the electrode;

[0027] A first feature matrix extraction module, used to extract a first feature matrix corresponding to each batch of samples in the first data set;

[0028] A first Riemann center calculation module, used to calculate the first Riemann centers of all first feature matrices corresponding to all batches of samples in the first data set;

[0029] A second data set acquisition module, used for acquiring the resistance value between the electrode and the ground to form a second data set when the electromagnetic flowmeter is offline and different dirt is attached to the electrode;

[0030] A second feature matrix extraction module, used to extract a second feature matrix corresponding to each batch of samples in a second data set corresponding to different pollutants;

[0031] A second Riemann center calculation module, used to calculate the second Riemann centers of all second feature matrices corresponding to all batches of samples in the second data set;

[0032] The sample characteristic matrix extraction module is used to collect the resistance value between the electrode and the ground to form a sample to be tested, and extract the sample characteristic matrix of the sample to be tested when the electromagnetic flowmeter is working online;

[0033] A similarity index calculation module, used to calculate the similarity index between the sample feature matrix and the first feature matrix and the second feature matrix respectively;

[0034] A local Riemann center calculation module is used to extract a preset number of feature matrices with the largest similarity index and calculate the local Riemann centers of the preset number of feature matrices;

[0035] A proximity calculation module, used to calculate the proximity of the local Riemann center to the first Riemann center and the second Riemann center respectively;

[0036] The dirt detection result determination module is used to determine the dirt detection result of the electrode corresponding to the sample to be tested according to the data set corresponding to the Riemann center with the greatest proximity.

[0037] Optionally, the first feature matrix extraction module specifically includes:

[0038] The first feature matrix extraction unit is used to use the formula Extract the first feature matrix corresponding to each batch of samples in the first data set; where Ω i is the i-th batch sample in the first data set, Ω i =[σ i (1),σ i (2),...,σ i (n)]∈R m×n , σ i (n) is Ω i The nth resistance value data in the data; n is the number of data samples for each batch of samples, m is the dimension of the resistance value data, R m×n is an m×n vector space; P i is the i-th batch sample Ω in the first data set i The corresponding first characteristic matrix.

[0039] Optionally, the first Riemann center calculation module specifically includes:

[0040] The first Riemann center calculation unit is used to adopt the formula Calculate the first Riemann center P of all first feature matrices corresponding to all batches of samples in the first data set g ; where P j is the jth batch sample Ω in the first data set j The corresponding first characteristic matrix; d R (P i , P j ) is P i and P j The Riemann distance between them; N is the number of sample batches in the first data set.

[0041] Optionally, the similarity index calculation module specifically includes:

[0042] Similarity index calculation unit, used to use the formula Calculate the sample feature matrix Q separately c The similarity index S between the first feature matrix and the second feature matrix oz ; where P z represents the zth characteristic matrix in the set of the first characteristic matrix and the second characteristic matrix; λ a (Q c ,P z ) is Q c -1 P z The characteristic value of .

[0043] Optionally, the proximity calculation module specifically includes:

[0044] Proximity calculation unit, used to use the formula and Calculate the local Riemann center P separately g0 With the first Riemann center P g and the second Riemann center P gc The degree of closeness α.

[0045] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0046] The present invention provides a method and system for detecting electrode contamination in an electromagnetic flowmeter. The method comprises: when the electromagnetic flowmeter is offline and there is no contamination on the electrode, collecting the resistance value between the electrode and the ground to form a first data set; extracting the first characteristic matrix corresponding to each batch of samples in the first data set; calculating the first Riemann center of all the first characteristic matrices corresponding to all the batches of samples in the first data set; when the electromagnetic flowmeter is offline and different contamination is attached to the electrode, collecting the resistance value between the electrode and the ground to form a second data set; extracting the second characteristic matrix corresponding to each batch of samples in the second data set corresponding to different contamination; calculating the second Riemann center of all the second characteristic matrices corresponding to all the batches of samples in the second data set; when the electromagnetic flowmeter is online, collecting the resistance value between the electrode and the ground to form a sample to be tested, and extracting the sample characteristic matrix of the sample to be tested; respectively calculating the similarity index between the sample characteristic matrix and the first characteristic matrix and the second characteristic matrix; extracting a preset number of characteristic matrices with the largest similarity index, and calculating the local Riemann centers of the preset number of characteristic matrices; respectively calculating the proximity between the local Riemann center and the first Riemann center and the second Riemann center; and determining the contamination detection result of the electrode corresponding to the sample to be tested according to the data set corresponding to the Riemann center with the largest proximity. The method of the present invention can realize online rapid detection of electrode dirt in an electromagnetic flowmeter. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0048] Figure 1 A flow chart of a method for detecting electrode contamination in an electromagnetic flowmeter according to the present invention;

[0049] Figure 2 It is a schematic diagram of the principle of a method for detecting electrode dirt in an electromagnetic flowmeter of the present invention;

[0050] Figure 3 The present invention is a schematic diagram of the structure of an electrode contamination detection system in an electromagnetic flowmeter. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in 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 creative work are within the scope of protection of the present invention.

[0052] The object of the present invention is to provide a method and system for detecting electrode contamination in an electromagnetic flowmeter, so as to realize online rapid detection of electrode contamination in the electromagnetic flowmeter.

[0053] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0054] Figure 1 This is a flow chart of a method for detecting electrode contamination in an electromagnetic flowmeter according to the present invention. Figure 2 The schematic diagram of the principle of a method for detecting electrode dirt in an electromagnetic flowmeter of the present invention. Figure 1 and Figure 2 The present invention provides a method for detecting electrode dirt in an electromagnetic flowmeter, comprising:

[0055] Step 101: When the electromagnetic flowmeter is offline and there is no dirt on the electrode, the resistance value between the electrode and the ground is collected to form a first data set.

[0056] The method of the present invention detects the resistance value of the electrode to the ground under three different conditions, and determines whether the instrument itself has a fault according to the change of the resistance value. The first condition is that the electromagnetic flowmeter is offline and there is no dirt on the electrode, the second condition is that the electromagnetic flowmeter is offline and there are different dirt attached to the electrode, and the third condition is that the electromagnetic flowmeter is online. In the above three different conditions, the resistance value between the electrode and the ground is collected to form a first data set, a second data set and a sample to be tested.

[0057] Specifically, when the electromagnetic flowmeter is offline and there is no dirt on the electrode, the resistance value between the electrode and the ground is collected to form the first data set Ω g ={Ω1,Ω2,...,Ω N}; First data set Ω g There are N batches of samples Ω1, Ω2, ..., Ω N . Where Ω i =[σ i (1),σ i (2),...,σ i (n)]∈R m×n Denotes the first data set Ω g The subscript i represents the i-th batch of process data recorded, i = 1, 2, ..., N. n is the number of samples in a single batch, and m is the dimension of the measurement vector. σ i (n) is Ω i The nth sampled resistance value data in .

[0058] Step 102: extracting a first feature matrix corresponding to each batch of samples in the first data set.

[0059] Calculate Ω for each batch of samples from the first dataset i The positive definite characteristic matrix extracted from i :

[0060]

[0061] Where i = 1, 2, ..., N, where N records the number of samples and is usually large enough to cover all possible situations under normal circumstances.

[0062] The obtained positive definite characteristic matrix P i Encapsulate in the first database, name it as the database in normal case.

[0063] Therefore, the step 102 extracts the first feature matrix corresponding to each batch of samples in the first data set, specifically including:

[0064] Using formula Extract the first feature matrix corresponding to each batch of samples in the first data set; where Ω i For the first data set Ω g The i-th batch of samples in Ω i =[σ i (1),σ i (2),...,σ i (n)]∈R m ×n , σ i (n) is Ω i The nth resistance value data in the data; n is the number of data samples for each batch of samples, m is the dimension of the resistance value data, R m×n is an m×n vector space; P i For the first data set Ω g The i-th batch of samples in Ω i The corresponding first characteristic matrix.

[0065] Step 103: Calculate the first Riemann centers of all first feature matrices corresponding to all batches of samples in the first data set.

[0066] Extract the first dataset Ω g All Ω i The corresponding first characteristic matrix P i Encapsulate in the first database and calculate its corresponding first Riemann center P g :

[0067]

[0068] P g That is, all positive definite feature matrices P in the database under normal circumstances i The Riemann center is the point on the Riemann manifold that minimizes the sum of the squares of the Riemann distances from this point to the given positive definite matrices. argmin is defined as the value of the variable when the subsequent formula reaches the minimum value. R (P i ,P j ) is the Riemann distance, which can be calculated by the following formula:

[0069]

[0070] Where Log(·) represents the matrix logarithm; λ a (P i ,P j ), a=1, ..., m is P i -1 P j The characteristic value of .

[0071] Therefore, the step 103 of calculating the first Riemann centers of all first feature matrices corresponding to all batches of samples in the first data set specifically includes:

[0072] Using formula Calculate the first data set Ω g The first Riemann center P of all first feature matrices corresponding to all batches of samples in g ; where P j is the jth batch sample Ω in the first dataset j The corresponding first characteristic matrix; d R (P i , P j ) is P i and P j The Riemann distance between them; N is the number of sample batches in the first data set.

[0073] Step 104: When the electromagnetic flowmeter is offline and different dirt is attached to the electrode, the resistance value between the electrode and the ground is collected to form a second data set.

[0074] Similar to the first case described in step 101, when the electromagnetic flowmeter is offline and different types of dirt are attached to the electrode, the resistance value between the electrode and the ground is measured to form a second data set. Specifically, when the electromagnetic flowmeter is offline and the c-th type of dirt is attached to the electrode, the resistance value between the electromagnetic flowmeter electrode and the ground is collected to form the c-th second data set Ω gc ={Ω 1c ,Ω 2c ,...,Ω Mc}; where c = 1, 2, ..., C, where C refers to the number of types of dirt. That is, a second data set is collected for each type of dirt, and the second data set corresponding to the cth type of dirt is recorded as Ω gc , a total of C second data sets are collected. The different types or types of dirt refer to scale, oxide film, organic oil, inorganic pollutants, etc. that are easily attached to the electrodes of the electromagnetic flowmeter.

[0075] The second data set Ω corresponding to the c-th type of dirt gc There are M batches of samples Ω 1c ,Ω 2c ,...,Ω Mc . Where Ω ic ={σ ic (1),σ ic (2),...,σ ic (n)}∈R m×n Denotes the second data set Ω gcThe subscript i represents the i-th batch of process data recorded, i = 1, 2, ..., M. n is the number of samples in a single batch, and m is the dimension of the measurement vector. σ ic (n) is Ω ic The nth sampled resistance value data in .

[0076] Step 105: extracting a second feature matrix corresponding to each batch of samples in a second data set corresponding to different pollutants.

[0077] The second data set Ω corresponding to the c-th type of dirt gc Each batch of samples in Ω ic , extract its corresponding positive definite characteristic matrix as the second characteristic matrix P ic :

[0078]

[0079] Where i = 1, 2, ..., M, M records the number of samples, which is usually large enough. c = 1, 2, ..., C should cover all possible types of electrode contamination.

[0080] All the second characteristic matrices P obtained for each type of pollution ic The second characteristic matrix P calculated from the second data set corresponding to different types of contaminants such as scale, oxide film, organic oil, and inorganic pollutants is encapsulated in the second database and named as the database with contaminants attached. ic Separate packaging makes it easier to detect what type of dirt it is later.

[0081] Step 106: Calculate the second Riemann centers of all second feature matrices corresponding to all batches of samples in the second data set.

[0082] Extract the second dataset Ω gc All batch samples in Ω ic All corresponding second characteristic matrices P ic Encapsulated in a second database, and the Riemann center P of each type of dirt data set is calculated gc :

[0083]

[0084] Where P gc is the second data set Ω corresponding to the c-th type of dirt gc The Riemann centers of all second feature matrices corresponding to all batches of samples in , in order to be consistent with the first Riemann center P g To distinguish, P gc It is called the second Riemann center. c = 1, 2, ..., C, where C refers to the number of types of dirt.ic For the second data set Ω gc The i-th batch of samples in Ω ic The corresponding second characteristic matrix; P jc For the second data set Ω gc The jth batch of samples in Ω jc The corresponding second characteristic matrix; d R (P ic ,P jc ) is P ic and P jc The Riemann distance between them; M is the second data set Ω gc The number of sample batches in .

[0085] Step 107: When the electromagnetic flowmeter is working online, the resistance value between the electrode and the ground is collected to form a sample to be tested, and a sample feature matrix of the sample to be tested is extracted.

[0086] Similar to the first two cases described in steps 101 and 104, when the electromagnetic flowmeter is working online, the resistance value between the acquisition electrode and the ground constitutes the sample to be tested Ω=[Ω(1),...,Ω(n)]∈R m×n , where Ω(n) is the nth sampled resistance value data in the sample to be tested Ω, and the sample to be tested Ω is a batch data set of m-dimensional measurement vectors obtained by sampling per unit time.

[0087] When the electromagnetic flowmeter is working online, a new data set is collected as the sample to be tested Ω, and the sample feature matrix Q of the sample to be tested Ω is extracted c :

[0088]

[0089] Where n is the number of samples of this set of data, Q c is the sample feature matrix of the sample to be tested Ω.

[0090] Step 108: Calculate similarity indices between the sample feature matrix and the first feature matrix and the second feature matrix respectively.

[0091] Calculate the sample feature matrix Q of the sample to be tested Ω respectively c With each first characteristic matrix P i And each second characteristic matrix P ic The similarity index S between oz , similarity index S oz Defined as:

[0092]

[0093] Where P z YesPi With P ic The zth characteristic matrix in the set of components; z = 1, 2, ..., N + M × C. Where λ a (Q c ,P z ), a=1, ..., m is Q c -1 P z The eigenvalue of S, m is the number of eigenvalues. oz Q c With P z The similarity index between .

[0094] Therefore, the step 108 of respectively calculating the similarity indexes between the sample feature matrix and the first feature matrix and the second feature matrix specifically includes:

[0095] Using formula Calculate the sample feature matrix Q respectively c The similarity index S between the first feature matrix and the second feature matrix oz ; where P z represents the zth characteristic matrix in the set of the first characteristic matrix and the second characteristic matrix; λ a (Q c ,P z ) is Q c -1 P z The characteristic value of .

[0096] Step 109: extracting a preset number of feature matrices with the largest similarity index, and calculating the local Riemann centers of the preset number of feature matrices.

[0097] For the sample feature matrix Q c With each P i , P ic The similarity index S between oz The largest l feature matrices P z Extract and use the similarity index S oz The largest l P z Calculate its local Riemann center P g0 :

[0098]

[0099] Where l is the preset number; P iz and P jz are the i-th and j-th feature matrices in the preset number of feature matrices respectively; d R (P iz ,P jz) is P iz and P jz The Riemann distance between .

[0100] Step 110: Calculate the proximity of the local Riemann center to the first Riemann center and the second Riemann center respectively.

[0101] Calculate the local Riemann center P g0 and P g And each P gc The degree of closeness is determined by the percentage α:

[0102]

[0103] or

[0104]

[0105] The case with the largest α is judged to be the case corresponding to the sample to be tested.

[0106] Therefore, the step 110 of respectively calculating the proximity between the local Riemann center and the first Riemann center and the second Riemann center specifically includes:

[0107] Using formula and Calculate the local Riemann center P respectively g0 With the first Riemann center P g And the second Riemann center P gc The degree of closeness α.

[0108] Step 111: Determine the dirt detection result of the electrode corresponding to the sample to be tested according to the data set corresponding to the Riemann center with the greatest proximity.

[0109] The dirt detection result of the electrode corresponding to the sample Ω to be tested is determined based on the data set corresponding to the Riemann center with the largest proximity α. For example, if the Riemann center with the largest proximity α is P g , then it is determined that the dirt detection result of the electrode corresponding to the sample Ω to be tested is that there is no dirt on the electrode. If the Riemann center with the largest proximity degree α is P gc , it is determined that there is dirt attached to the electrode, and it can be determined based on P gc The corresponding dataset Ω gc Determine the cth type of dirt attached to the electrode corresponding to the sample Ω to be tested. For example, if the Riemann center with the largest proximity α is P g1 , then find P g1 The corresponding second data set Ω g1The corresponding first type of dirt is the dirt detection result of the electrode corresponding to the sample Ω to be tested. Then different types of dirt are removed by using different decontaminants to achieve a better decontamination effect.

[0110] The present invention discloses a method for detecting electrode dirt in an electromagnetic flowmeter, comprising: collecting the resistance value between the electrode and the ground to form a first data set Ω when the electrode is offline and there is no dirt on the electrode. g ={Ω1,Ω2,...,Ω N}, extract Ω i The corresponding positive definite characteristic matrix P i Encapsulate in the first database and calculate its Riemann center P g When the dirt is attached to the electrode and the electrode is offline, the resistance between the electrode and the ground is measured to form a second data set Ω. gc ={Ω 1c ,Ω 2c ,...,Ω Mc}, extract Ω ic The corresponding positive definite characteristic matrix P ic And encapsulate it in the second database, and calculate its Riemann center P gc ; When the electromagnetic flowmeter is working online, the new data sample Ω=[Ω(1),...,Ω(n)]∈R m×n When the feature matrix Q of the sample Ω to be tested is extracted c ; Calculate the sample feature matrix Q of the new data set c With P i , P ic The similarity index S between oz ; for Q c Similarity index S oz The largest l P z Extraction; for l P z Calculate its local Riemann center P g0 ; Calculate the local Riemann center P g0 and P g , P gc The proximity of the electrodes is determined, and the electrode with the greatest proximity is determined to be the electrode corresponding to the sample to be tested. The method of the present invention can not only quickly determine whether there is dirt attached to the electrode online, but also further accurately analyze what type of dirt is attached to the electrode, and distinguish them by their different resistance values, effectively improving the efficiency of electrode dirt detection in the electromagnetic flowmeter and the accuracy of the detection results.

[0111] Based on the method provided by the present invention, the present invention also provides an electrode dirt detection system in an electromagnetic flowmeter, see Figure 3 , the system comprising:

[0112] The first data set acquisition module 301 is used to acquire the resistance value between the electrode and the ground to form a first data set when the electromagnetic flowmeter is offline and there is no dirt on the electrode;

[0113] A first feature matrix extraction module 302 is used to extract a first feature matrix corresponding to each batch of samples in the first data set;

[0114] A first Riemann center calculation module 303, used to calculate the first Riemann centers of all first feature matrices corresponding to all batches of samples in the first data set;

[0115] The second data set acquisition module 304 is used to acquire the resistance value between the electrode and the ground to form a second data set when the electromagnetic flowmeter is offline and different dirt is attached to the electrode;

[0116] The second feature matrix extraction module 305 is used to extract the second feature matrix corresponding to each batch of samples in the second data set corresponding to different pollutants;

[0117] A second Riemann center calculation module 306, used to calculate the second Riemann centers of all second feature matrices corresponding to all batches of samples in the second data set;

[0118] The sample characteristic matrix extraction module 307 is used to collect the resistance value between the electrode and the ground to form a sample to be tested, and extract the sample characteristic matrix of the sample to be tested when the electromagnetic flowmeter is working online;

[0119] A similarity index calculation module 308 is used to calculate similarity indexes between the sample feature matrix and the first feature matrix and the second feature matrix respectively;

[0120] A local Riemann center calculation module 309 is used to extract a preset number of feature matrices with the largest similarity index, and calculate the local Riemann centers of the preset number of feature matrices;

[0121] A proximity calculation module 310, used to calculate the proximity of the local Riemann center to the first Riemann center and the second Riemann center respectively;

[0122] The dirt detection result determination module 311 is used to determine the dirt detection result of the electrode corresponding to the sample to be tested according to the data set corresponding to the Riemann center with the greatest proximity.

[0123] The first feature matrix extraction module 302 specifically includes:

[0124] The first feature matrix extraction unit is used to use the formula Extract the first feature matrix corresponding to each batch of samples in the first data set; where Ω i is the i-th batch sample in the first data set, Ωi =[σ i (1),σ i (2),...,σ i (n)]∈R m×n , σ i (n) is Ω i The nth resistance value data in the data; n is the number of data samples for each batch of samples, m is the dimension of the resistance value data, R m×n is an m×n vector space; P i is the i-th batch sample Ω in the first data set i The corresponding first characteristic matrix.

[0125] The first Riemann center calculation module 303 specifically includes:

[0126] The first Riemann center calculation unit is used to adopt the formula Calculate the first Riemann center P of all first feature matrices corresponding to all batches of samples in the first data set g ; where P j is the jth batch sample Ω in the first data set j The corresponding first characteristic matrix; d R (P i , P j ) is P i and P j The Riemann distance between them; N is the number of sample batches in the first data set.

[0127] The similarity index calculation module 308 specifically includes:

[0128] Similarity index calculation unit, used to use the formula Calculate the sample feature matrix Q separately c The similarity index S between the first feature matrix and the second feature matrix oz ; where P z represents the zth characteristic matrix in the set of the first characteristic matrix and the second characteristic matrix; λ a (Q c ,P z ) is Q c -1 P z The characteristic value of .

[0129] The proximity calculation module 310 specifically includes:

[0130] Proximity calculation unit, used to use the formula and Calculate the local Riemann center P separately g0 With the first Riemann center P g and the second Riemann center Pgc The degree of closeness α.

[0131] As for the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.

[0132] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for detecting electrode contamination in an electromagnetic flowmeter, characterized in that: include: When the electromagnetic flowmeter is offline and there is no dirt on the electrode, the resistance value between the electrode and the ground is collected to form a first data set; Extracting a first feature matrix corresponding to each batch of samples in the first data set; Calculate the first Riemann centers of all first feature matrices corresponding to all batches of samples in the first data set; When the electromagnetic flowmeter is offline and different dirt is attached to the electrode, the resistance value between the electrode and the ground is collected to form a second data set; specifically, when the electromagnetic flowmeter is offline and the c-th type of dirt is attached to the electrode, the resistance value between the electromagnetic flowmeter electrode and the ground is collected to form the c-th second data set Ω gc ={Ω 1c ,Ω 2c ,...,Ω Mc }; where c = 1, 2, ..., C, where C refers to the number of types of dirt; a second data set is collected for each type of dirt, and the second data set corresponding to the cth type of dirt is recorded as Ω gc , a total of C second data sets are collected; the different types or types of dirt refer to scale, oxide film, organic oil and inorganic pollutants that are easily attached to the electrodes of the electromagnetic flowmeter; Extract the second feature matrix corresponding to each batch of samples in the second data set corresponding to different pollutants; for the second data set Ω corresponding to the cth type of pollutant gc Each batch sample in Ω ic , extract its corresponding positive definite characteristic matrix as the second characteristic matrix P ic : Where i = 1, 2, ..., M, M records the number of samples; c = 1, 2, ..., C should cover all possible types of electrode contamination; All the second characteristic matrices P obtained for each type of pollution ic The second characteristic matrix P calculated from the second data set corresponding to different types of contaminants such as scale, oxide film, organic oil and inorganic pollutants is encapsulated in the second database and named as the database with contaminants attached. ic Separate packaging; Calculate the second Riemann centers of all second feature matrices corresponding to all batches of samples in the second data set; When the electromagnetic flowmeter is working online, the resistance value between the electrode and the ground is collected to form a sample to be tested, and a sample feature matrix of the sample to be tested is extracted; Calculating similarity indices between the sample feature matrix and the first feature matrix and the second feature matrix respectively; Extracting a preset number of feature matrices with the largest similarity index, and calculating the local Riemann centers of the preset number of feature matrices; For the sample feature matrix Q c With each P i , P ic The similarity index S between oz The largest l feature matrices P z Extract and use the similarity index S oz The largest l P z Calculate its local Riemann center P g0 : Where l is the preset number; P iz and P jz are respectively the i-th and j-th feature matrices among the preset number of feature matrices; d R (P iz ,P jz ) is P iz and P jz The Riemann distance between i is the first feature matrix corresponding to each batch of samples in the first data set; respectively calculating the proximity of the local Riemann center to the first Riemann center and the second Riemann center; The respectively calculating the proximity between the local Riemann center and the first Riemann center and the second Riemann center specifically includes: Using formula and Calculate the local Riemann center P respectively g0 With the first Riemann center P g And the second Riemann center P gc The degree of closeness α; Determine the dirt detection result of the electrode corresponding to the sample to be tested according to the data set corresponding to the Riemann center with the greatest proximity; Determine the dirt detection result of the electrode corresponding to the sample Ω to be tested according to the data set corresponding to the Riemann center with the largest proximity α; if the Riemann center with the largest proximity α is P g , then it is determined that the dirt detection result of the electrode corresponding to the sample to be tested Ω is that there is no dirt on the electrode; if the Riemann center with the largest proximity degree α is P gc , it is determined that there is dirt attached to the electrode, and according to P gc The corresponding dataset Ω gc Determine the cth type of dirt attached to the electrode corresponding to the sample Ω to be tested.

2. The method according to claim 1, characterized in that: The extracting a first feature matrix corresponding to each batch of samples in the first data set specifically includes: Using formula Extract the first feature matrix corresponding to each batch of samples in the first data set; where Ω i is the i-th batch of samples in the first data set, Ω i =[σ i (1),σ i (2),...,σ i (n)]∈R m×n , σ i (n) is Ω i The nth resistance value data in the data; n is the number of data samples for each batch of samples, m is the dimension of the resistance value data, R m×n is an m×n vector space; P i is the i-th batch sample Ω in the first data set i The corresponding first characteristic matrix.

3. The method according to claim 2, characterized in that The calculating the first Riemann centers of all first feature matrices corresponding to all batches of samples in the first data set specifically includes: Using formula Calculate the first Riemann center P of all first feature matrices corresponding to all batches of samples in the first data set g ; where P j is the jth batch sample Ω in the first dataset j The corresponding first characteristic matrix; d R (P i , P j ) is P i and P j The Riemann distance between them; N is the number of sample batches in the first data set.

4. The method according to claim 3, characterized in that The respectively calculating the similarity indexes between the sample feature matrix and the first feature matrix and the second feature matrix specifically includes: Using formula Calculate the sample feature matrix Q respectively c The similarity index S between the first feature matrix and the second feature matrix oz ; where P z represents the zth characteristic matrix in the set of the first characteristic matrix and the second characteristic matrix; λ a (Q c ,P z ) is Q c -1 P z The characteristic value of .

5. An electrode dirt detection system in an electromagnetic flowmeter, characterized in that: include: A first data set acquisition module, used for acquiring the resistance value between the electrode and the ground to form a first data set when the electromagnetic flowmeter is offline and there is no dirt on the electrode; A first feature matrix extraction module, used to extract a first feature matrix corresponding to each batch of samples in the first data set; A first Riemann center calculation module, used to calculate the first Riemann centers of all first feature matrices corresponding to all batches of samples in the first data set; The second data set acquisition module is used to acquire the resistance value between the electrode and the ground to form a second data set when the electromagnetic flowmeter is offline and different dirt is attached to the electrode; specifically, when the electromagnetic flowmeter is offline and the c-th type of dirt is attached to the electrode, the resistance value between the electrode and the ground of the electromagnetic flowmeter is acquired to form the c-th second data set Ω gc ={Ω 1c ,Ω 2c ,...,Ω Mc }; where c = 1, 2, ..., C, where C refers to the number of types of dirt; a second data set is collected for each type of dirt, and the second data set corresponding to the cth type of dirt is recorded as Ω gc , a total of C second data sets are collected; the different types or types of dirt refer to scale, oxide film, organic oil and inorganic pollutants that are easily attached to the electrodes of the electromagnetic flowmeter; The second feature matrix extraction module is used to extract the second feature matrix corresponding to each batch of samples in the second data set corresponding to different pollutants; for the second data set Ω corresponding to the cth type of pollutant gc Each batch sample in Ω ic , extract its corresponding positive definite characteristic matrix as the second characteristic matrix P ic : Where i = 1, 2, ..., M, M records the number of samples; c = 1, 2, ..., C should cover all possible types of electrode contamination; All the second characteristic matrices P obtained for each type of pollution ic The second characteristic matrix P calculated from the second data set corresponding to different types of contaminants such as scale, oxide film, organic oil and inorganic pollutants is encapsulated in the second database and named as the database with contaminants attached. ic Separate packaging; A second Riemann center calculation module, used to calculate the second Riemann centers of all second feature matrices corresponding to all batches of samples in the second data set; The sample characteristic matrix extraction module is used to collect the resistance value between the electrode and the ground to form a sample to be tested, and extract the sample characteristic matrix of the sample to be tested when the electromagnetic flowmeter is working online; A similarity index calculation module, used to calculate similarity indexes between the sample feature matrix and the first feature matrix and the second feature matrix respectively; A local Riemann center calculation module, used to extract a preset number of feature matrices with the largest similarity index, and calculate the local Riemann centers of the preset number of feature matrices; For the sample feature matrix Q c With each P i , P ic The similarity index S between oz The largest l feature matrices P z Extract and use the similarity index S oz The largest l P z Calculate its local Riemann center P g0 : Where l is the preset number; P iz and P jz are respectively the i-th and j-th feature matrices among the preset number of feature matrices; d R (P iz ,P jz ) is P iz and P jz The Riemann distance between i is the first feature matrix corresponding to each batch of samples in the first data set; A proximity calculation module, used to calculate the proximity of the local Riemann center to the first Riemann center and the second Riemann center respectively; The proximity calculation module specifically includes: Proximity calculation unit, used to use the formula and Calculate the local Riemann center P respectively g0 With the first Riemann center P g And the second Riemann center P gc The degree of closeness α; A dirt detection result determination module, used to determine the dirt detection result of the electrode corresponding to the sample to be tested according to the data set corresponding to the Riemann center with the greatest proximity; Determine the dirt detection result of the electrode corresponding to the sample Ω to be tested according to the data set corresponding to the Riemann center with the largest proximity α; if the Riemann center with the largest proximity α is P g , then it is determined that the dirt detection result of the electrode corresponding to the sample to be tested Ω is that there is no dirt on the electrode; if the Riemann center with the largest proximity degree α is P gc , it is determined that there is dirt attached to the electrode, and according to P gc The corresponding dataset Ω gc Determine the cth type of dirt attached to the electrode corresponding to the sample Ω to be tested.

6. The system according to claim 5, characterized in that The first feature matrix extraction module specifically includes: The first feature matrix extraction unit is used to use the formula Extract the first feature matrix corresponding to each batch of samples in the first data set; where Ω i is the i-th batch of samples in the first data set, Ω i =[σ i (1),σ i (2),...,σ i (n)]∈R m×n , σ i (n) is Ω i The nth resistance value data in the data; n is the number of data samples for each batch of samples, m is the dimension of the resistance value data, R m×n is an m×n vector space; P i is the i-th batch sample Ω in the first data set i The corresponding first characteristic matrix.

7. The system according to claim 6, characterized in that The first Riemann center calculation module specifically includes: The first Riemann center calculation unit is used to adopt the formula Calculate the first Riemann center P of all first feature matrices corresponding to all batches of samples in the first data set g ; where P j is the jth batch sample Ω in the first dataset j The corresponding first characteristic matrix; d R (P i , P j ) is P i and P j The Riemann distance between them; N is the number of sample batches in the first data set.

8. The system according to claim 7, characterized in that The similarity index calculation module specifically includes: Similarity index calculation unit, used to use the formula Calculate the sample feature matrix Q respectively c The similarity index S between the first feature matrix and the second feature matrix oz ; where P z represents the zth characteristic matrix in the set of the first characteristic matrix and the second characteristic matrix; λ a (Q c ,P z ) is Q c -1 P z The characteristic value of .

Citation Information

Patent Citations

  • Method and device for measuring foreign bodies in the measuring medium

    CN101424652A

  • Spacecraft fault detection method based on Riemannian measurement

    CN113495550A