Data Processing Method, Data Processing Device and Instrument of a Measuring Device
By using n metering sensors and magnetic components with different polarities in the smart water meter, the forward and reverse rotation rules are defined, and the signal state is continuously sampled and detected, which solves the measurement error problem caused by magnetic interference and improves the measurement accuracy.
Patent Information
- Application Number
- CN202411677163.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2044-11-22
AI Technical Summary
Smart water meters are prone to more measurements or less measurements in magnetic interference environments, resulting in large cumulative measurement errors.
Using n metering sensors and the first and second magnetic components of different polarities, the rules of forward and reverse rotation are defined, and the signal state results are detected by continuously sampling, and the counting of unit flow is performed only when the rules are met.
It reduces the impact of external signal interference on the measurement results and improves the measurement accuracy.
Smart Images

Figure CN119202515B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to measurement technology, and in particular to a data processing method, a data processing device and an instrument for measurement equipment. Background Art
[0002] With the rapid development of water supply management informatization, smart water meters have been widely used in smart water services, improving the efficiency of water resource management.
[0003] Currently, smart water meters incorporate an electromechanical converter into a mechanical water meter. By installing a magnet on a gear within the meter's base, the converter samples changes in water volume through magnetic induction and then calculates the water consumption using these values. In practice, the electromechanical converter is susceptible to magnetic interference in the meter's operating environment, generating multiple interference pulses that can lead to over- or under-metering. This results in significant cumulative metering errors in smart water meters. Summary of the Invention
[0004] The present application provides a data processing method, a data processing device and an instrument for metering equipment, which are used to solve the problem of large cumulative metering errors of smart water meters.
[0005] In a first aspect, the present application provides a data processing method for a metering device, the metering device comprising n metering sensors and a first magnetic component and a second magnetic component having different polarities fixed to a rotatable column, the n metering sensors being configured to output a pulse signal based on an induced magnetic field; wherein n is a positive integer greater than or equal to 2; the method comprising:
[0006] Sampling the pulse signals actually output by the n measuring sensors;
[0007] Based on the signal state results obtained by N consecutive samplings, whether the signal state results comply with the forward rule or the reverse rule; wherein N is a positive integer; the forward rule represents the pulse signal state that the metering sensor should output during one forward rotation of the column; and the reverse rule represents the pulse signal state that the metering sensor should output during one reverse rotation of the column;
[0008] If the signal status result does not meet any rule, the counting of the unit flow is not performed; the counting result of the unit flow represents the number of rotations of the column and is used to calculate the metering result.
[0009] Optionally, the method further includes:
[0010] When the signal status result meets the forward rule, the forward count value of the unit flow is increased by one;
[0011] When the signal status result meets the reverse rule, the reverse count value of the unit flow is increased by one.
[0012] Optionally, the rule includes N sub-rules in a sequential order; wherein each sub-rule represents a pulse signal state that the n measuring sensors should output when the magnetic component passes through the n measuring sensors during the rotation of the column.
[0013] Optionally, detecting whether the signal status result complies with a forward rule or a reverse rule specifically includes:
[0014] Comparing the sub-data in the signal status result with the sub-rules in the forward rule or the reverse rule;
[0015] When the sub-data is consistent with any sub-rule, the forward count value or the reverse count value of the unit flow is increased by 1 / N.
[0016] Optionally, the sub-rule includes flip information of the pulse signals output by the n measuring sensors; and the sampling of the pulse signals actually output by the n measuring sensors specifically includes:
[0017] For each metering sensor, if it is detected that the pulse signal output by the metering sensor is reversed, the reversal information is recorded;
[0018] According to the order in which the reversals occur, the reversal information of two adjacent records is integrated to obtain the sub-data.
[0019] Optionally, the number of the metering sensors is two; and the value of N is 4.
[0020] Optionally, the sub-rules of the forward rule include: ab, bA, AB, Ba; the sub-rules of the reverse rule include: ba, aB, BA, Ab; wherein, a represents that the pulse signal output by the first metering sensor undergoes a forward reversal, b represents that the pulse signal output by the second metering sensor undergoes a forward reversal, A represents that the pulse signal output by the first metering sensor undergoes a reverse reversal, and B represents that the pulse signal output by the second metering sensor undergoes a reverse reversal.
[0021] Optionally, the sub-rule includes level status information of the pulse signals output by the n measurement sensors; and the sampling of the pulse signals actually output by the n measurement sensors specifically includes:
[0022] For each metering sensor, if it is detected that the level of the pulse signal output by any metering sensor changes, the level information of the pulse signal output by each metering sensor is recorded;
[0023] The level information of the n measurement sensors recorded each time is integrated according to the order of recording to obtain the sub-data.
[0024] Optionally, the sub-rules of the forward rule include: 10, 11, 01, 00; the sub-rules of the reverse rule include: 00, 01, 11, 10; wherein 1 indicates that the pulse signal output by the first metering sensor / the second metering sensor is a high level, and 0 indicates that the pulse signal output by the first metering sensor / the second metering sensor is a low level.
[0025] Optionally, the angle between the two metering sensors is 90 degrees.
[0026] Optionally, the first metering sensor includes a bipolar latching magnetoresistive sensor, a first capacitor, and a first filtering circuit; the power supply end of the bipolar latching magnetoresistive sensor is connected to a power supply and is connected to the ground through the first capacitor; the ground end of the bipolar latching magnetoresistive sensor is connected to the ground; and the output end of the bipolar latching magnetoresistive sensor outputs a pulse signal through the first filtering circuit.
[0027] Optionally, the first filtering circuit includes: a first resistor and a second capacitor; one end of the first resistor is connected to the output end of the bipolar latch magnetoresistive sensor; the other end of the first resistor is connected to one end of the second capacitor; the other end of the second capacitor is grounded; the other end of the first resistor is used to output a pulse signal.
[0028] Optionally, the method further includes:
[0029] For the same measuring sensor, if the time between the current sampling and the last sampling is less than the preset time, the current sampling will be ignored.
[0030] In a second aspect, the present application provides a data processing device for a metering device, the metering device comprising n metering sensors and a first magnetic component and a second magnetic component having different polarities fixed to a rotatable column, the n metering sensors being configured to output a pulse signal based on an induced magnetic field; wherein n is a positive integer greater than or equal to 2; the data processing device comprising:
[0031] A sampling module, used for sampling the pulse signals actually output by the n measuring sensors;
[0032] The detection module is configured to detect whether the signal state result obtained by continuous N samplings conforms to a forward rule or a reverse rule; wherein N is a positive integer; the forward rule represents the pulse signal state that the metering sensor should output during one forward rotation of the column; and the reverse rule represents the pulse signal state that the metering sensor should output during one reverse rotation of the column;
[0033] An execution module is used for not executing the counting of the unit flow if the signal status result does not meet any rule; the counting result of the unit flow represents the number of rotations of the column and is used to calculate the measurement result.
[0034] In a third aspect, the present application provides a meter comprising a metering device and a data processing apparatus as described in the second aspect.
[0035] The data processing method, data processing device, and instrument for metering equipment provided in this application define forward rules based on the pulse signal state that the metering sensor should output during the forward rotation of the column; and define reverse rules based on the pulse signal state that the metering sensor should output during the reverse rotation of the column. Signal state results are obtained by continuously sampling the pulse signals actually output by n metering sensors and compared with the forward and reverse rules. If the signal state results do not meet either rule, the number of column rotations and thus the unit flow rate are not counted. This reduces the impact of external signal interference on the metering result and improves metering accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0037] Figure 1 A schematic diagram of the structure of a metering device provided in an embodiment of the present application;
[0038] Figure 2 A flow chart of a data processing method for a metering device provided in an embodiment of the present application;
[0039] Figure 3 A schematic structural diagram of a second metering device provided in an embodiment of the present application;
[0040] Figure 4 A schematic structural diagram of a metering sensor provided in an embodiment of the present application;
[0041] Figure 5 A flow chart of a data processing method for a second metering device provided in an embodiment of the present application;
[0042] Figure 6 A schematic diagram of a pulse signal state output by a metering sensor provided in an embodiment of the present application;
[0043] Figure 7 A schematic diagram of the pulse signal state output by the second metering sensor provided in an embodiment of the present application;
[0044] Figure 8A schematic diagram of the pulse signal state output by the third metering sensor provided in an embodiment of the present application;
[0045] Figure 9 A schematic diagram of the pulse signal state output by the fourth metering sensor provided in an embodiment of the present application;
[0046] Figure 10 A schematic diagram of the pulse signal state output by the fifth metering sensor provided in an embodiment of the present application;
[0047] Figure 11 A schematic structural diagram of a data processing device for a metering device provided in an embodiment of the present application.
[0048] Description of reference numerals:
[0049] 1: Measuring sensor; 2: First magnetic component; 3: Second magnetic component; 4: Column; 11: First filter circuit; 12: Second filter circuit.
[0050] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0051] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0052] With the rapid development of water supply management informatization, smart water meters have been widely used in smart water services, improving the efficiency of water resource management.
[0053] Currently, smart water meters incorporate an electromechanical converter into a mechanical water meter. By installing a magnet on a gear within the meter's base, the converter samples changes in water volume through magnetic induction and then calculates the water consumption using these samples. In practical applications, the electromechanical converter is susceptible to magnetic interference in the meter's operating environment, generating multiple interference pulses that can lead to over- or under-metering, resulting in significant cumulative metering errors.
[0054] Therefore, how to reduce the impact of magnetic interference on measurement results and improve the accuracy of measurement results has become an urgent problem to be solved.
[0055] Figure 1 This is a schematic diagram of the structure of a metering device provided in an embodiment of the present application. Figure 1 As shown, the measuring device includes n measuring sensors 1 and a first magnetic component 2 and a second magnetic component 3 with different polarities fixed to a rotatable column 4. The n measuring sensors 1 are used to output pulse signals according to the induced magnetic field; wherein n is a positive integer greater than or equal to 2.
[0056] The metering sensor 1 may be any device that outputs a high-level or low-level signal when sensing a magnetic field and maintains the high-level or low-level signal output until sensing a magnetic field of opposite polarity, and may include, for example, a double-latch magnetic resistor. For example, the metering sensor 1 may output a high-level signal when sensing a South Pole magnetic field and maintain the high-level signal output until sensing a North Pole magnetic field; output a low-level signal when sensing a North Pole magnetic field and maintain the low-level signal output until sensing a South Pole magnetic field; or output a low-level signal when sensing a South Pole magnetic field and maintain the low-level signal output until sensing a North Pole magnetic field; and output a high-level signal when sensing a North Pole magnetic field and maintain the high-level signal output until sensing a South Pole magnetic field.
[0057] The first magnetic component 2 and the second magnetic component 3 are any components capable of generating a magnetic field, such as magnets, magnetic steel, etc. For example, the first magnetic component 2 may be a north pole magnetic component, and the second magnetic component 3 may be a south pole magnetic component; or the first magnetic component 2 may be a south pole magnetic component, and the second magnetic component 3 may be a north pole magnetic component.
[0058] The first magnetic component 2 and the second magnetic component 3 can be symmetrically arranged relative to the pillar 4, or asymmetrically arranged relative to the pillar 4; the first magnetic component 2 and the second magnetic component 3 can be on a straight line, or at a certain angle between the first magnetic component 2 and the second magnetic component 3. This embodiment of the present application is not limited to this. Figure 1 The first magnetic component 2 and the second magnetic component 3 are arranged on a straight line and symmetrically with respect to the pillar 4 as an example for schematic description.
[0059] N metering sensors 1 can be arranged above the first magnetic component 2 and the second magnetic component 3, or, the n metering sensors 1 can be arranged outside the circle centered on the column 4; the n metering sensors 1 can be distributed on the entire circumference centered on the column 4, or, the n metering sensors 1 can be distributed on half the circumference centered on the column 4. The embodiment of the present application does not limit this. In actual applications, the arrangement of n metering sensors 1, the first magnetic component 2, and the second magnetic component 3 satisfies the requirement that the n metering sensors 1 can sense the magnetic fields generated by the first magnetic component 2 and the second magnetic component 3 at different times, and only one metering sensor 1 can sense the magnetic field generated by the same magnetic component at the same time. Figure 1 An example is given for schematically explaining that n measuring sensors 1 are arranged outside the circumference of the first magnetic component 2 and the second magnetic component 3 and are distributed on a half circumference centered on the column 4 .
[0060] The column 4 can be any column that rotates based on the flow of liquid or gas. For example, it can be the dial wheel on a mechanical water meter. The column 4 can drive the first magnetic component 2 and the second magnetic component 3 to rotate. During the rotation of the column 4, the first magnetic component 2 and the second magnetic component 3 can pass by n metering sensors 1.
[0061] The n metering sensors 1 are configured to output pulse signals when sensing the magnetic field of the first magnetic component 2 or the magnetic field of the second magnetic component 3. For example, each metering sensor 1 can output a high-level signal when sensing the first magnetic component 2 and a low-level signal when sensing the second magnetic component 3; alternatively, each metering sensor 1 can output a low-level signal when sensing the first magnetic component 2 and a high-level signal when sensing the second magnetic component 3. During one rotation of the column 4, the n metering sensors 1 can each generate two low-level signals and two high-level signals. Based on the number and order of the low-level and high-level signals, it can be determined whether the column 4 has rotated forward or reverse one revolution.
[0062] In one example, when the metering device is subject to magnetic interference, the n metering sensors 1 may also generate high-level signals or low-level signals when they do not sense the first magnetic component 2 and the second magnetic component 3, and an error will occur in the calculation of the number of rotations of the column 4, thereby causing a metering error when measuring the water consumption based on the number of rotations of the column 4.
[0063] In light of this, the present application proposes a data processing method for metering equipment. A forward rule is defined based on the pulse signal state that the metering sensor should output during the column's forward rotation; a reverse rule is defined based on the pulse signal state that the metering sensor should output during the column's reverse rotation. Signal state results are obtained by continuously sampling the pulse signals actually output by n metering sensors. These results are then compared with the forward and reverse rules. If the signal state result does not meet either rule, the column rotation count and, consequently, the unit flow rate count, are not performed, thus preventing external signal interference from affecting the metering result.
[0064] It should be understood that Figure 1 The following examples illustrate the use of metering sensors 1 as metering sensors L, M, and K. Metering sensors L, M, and K do not limit the number of metering sensors 1. In practical applications, two, three, or more metering sensors 1 may be used as needed. This is not a limitation in the present embodiment.
[0065] It should be understood that the metering device provided in the embodiment of the present application can be used to collect data from mechanical water meters, and can also be used to collect data from gas meters.
[0066] It should be understood that the execution subject of the embodiments of the present application may be, for example, a processor, which may be, for example, any device capable of receiving a pulse signal and performing data processing based on the pulse signal, such as a single-chip microcomputer, an embedded processor, a programmable logic device, or any other processing unit. Optionally, in addition to the processing unit, peripheral circuit units of the processing unit may also be included.
[0067] For ease of explanation, the embodiment of the present application is illustrated by taking the first magnetic component 2 as the North Pole magnetic component, the second magnetic component 3 as the South Pole magnetic component, and n measuring sensors 1 outputting a high-level signal when sensing the North Pole magnetic field and outputting a low-level signal when sensing the South Pole magnetic field as an example.
[0068] The following specific embodiments describe in detail how the present application performs energy storage. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The following embodiments of the present application are described in conjunction with the accompanying drawings.
[0069] Figure 2 A flow chart of a data processing method for a metering device provided in an embodiment of the present application. Figure 1 The metering equipment shown, such as Figure 2 As shown, the method may include the following steps:
[0070] S201 : The processor samples the pulse signals actually output by n measuring sensors 1 .
[0071] The pulse signals actually output by the n measuring sensors 1 may be sampled, for example, by level sampling or edge sampling.
[0072] S202. The processor detects whether the signal state result conforms to the forward rule or the reverse rule based on the signal state result obtained by N consecutive samplings; wherein N is a positive integer; the forward rule represents the pulse signal state that the metering sensor 1 should output during one forward rotation of the column 4; the reverse rule represents the pulse signal state that the metering sensor 1 should output during one reverse rotation of the column 4.
[0073] The value of N may be related to the number of metering sensors 1. For example, N may be twice the number of metering sensors 1. When the number of metering sensors 1 is 2, the value of N may be 4. When the number of metering sensors 1 is 3, the value of N may be 6. The processor may sample the different pulse signals output by each metering sensor 1 during one rotation of the column 4.
[0074] The clockwise rotation of the column 4 may represent forward rotation, and the counterclockwise rotation of the column 4 may represent reverse rotation; alternatively, the counterclockwise rotation of the column 4 may represent forward rotation, and the clockwise rotation of the column 4 may represent reverse rotation. In the embodiment of the present application, the clockwise rotation of the column 4 represents forward rotation, and the counterclockwise rotation of the column 4 represents reverse rotation as an example for illustration.
[0075] Continue as Figure 1 As shown, during one forward rotation of the column 4, the pulse signal states that the metering sensor L, the metering sensor M, and the metering sensor K should output are: the metering sensor L outputs a high-level signal, the metering sensor M outputs a high-level signal, the metering sensor K outputs a high-level signal, the metering sensor L outputs a low-level signal, the metering sensor M outputs a low-level signal, and the metering sensor K outputs a low-level signal.
[0076] During one reverse rotation of the column 4, the pulse signal states that the metering sensor L, metering sensor M, and metering sensor K should output are: metering sensor K outputs a low-level signal, metering sensor M outputs a low-level signal, metering sensor L outputs a low-level signal, metering sensor K outputs a high-level signal, metering sensor M outputs a high-level signal, and metering sensor L outputs a high-level signal.
[0077] It should be understood that when the metering sensors L, M and K are located at different positions of the first magnetic component 2 and the second magnetic component 3, the states of the pulse signals that the metering sensors L, M and K should output may be different. Figure 1 The following description will be made by taking the example of the metering sensor L, metering sensor M and metering sensor K being distributed on a half circumference with the column 4 as the center.
[0078] S203. If the signal status result does not meet any rule, the processor does not perform the counting of the unit flow rate; the counting result of the unit flow rate represents the number of rotations of the column 4 and is used to calculate the measurement result.
[0079] The unit flow rate can be, for example, the flow rate of the object to be measured corresponding to one rotation of the column 4. For example, when the metering device is used to calculate the water consumption / gas consumption, one rotation of the column 4 can correspond to a water / gas flow rate of 1 liter (L) or 10L, etc., and the unit flow rate can be 1L or 10L, etc.
[0080] In one example, when the signal status result meets the forward rule, it means that the column 4 has rotated one circle forward, and the forward count value of the unit flow rate can be increased by 1. When the signal status result meets the reverse rule, it means that the column 4 has rotated one circle backward, and the reverse count value of the unit flow rate can be increased by 1.
[0081] In another example, when the signal status result meets the forward rule, it means that the column 4 has rotated one circle in the forward direction, and the reverse count value of the unit flow rate can be increased by 1. When the signal status result meets the reverse rule, it means that the column 4 has rotated one circle in the reverse direction, and the forward count value of the unit flow rate can be increased by 1.
[0082] For example, when the signal status result meets the forward rule, the forward count value increases by one; when the signal status result meets the reverse rule, the reverse count value increases by one. Increasing the forward count value by one represents an increase in flow rate, while increasing the reverse count value by one represents a decrease in flow rate. The difference between the forward and reverse count values represents the number of flow rate units actually used.
[0083] When this metering device is used to calculate water / gas consumption, the measurement result can represent the actual water / gas consumption. The measurement result can be expressed, for example, as follows: measurement result = (forward count value - reverse count value) * unit flow rate.
[0084] For example, when the unit flow rate is 1L, if the forward count value is ten and the reverse count value is one, the measurement result can be 9L.
[0085] If the signal status result does not meet any of the rules, it indicates that the signal obtained by sampling the pulse signals actually output by the n metering sensors 1 may have been interfered with by external signals, and the sampled pulse signals were interfered with. In this case, the unit flow rate is not counted to avoid the influence of external signal interference on the metering result.
[0086] In summary, the data processing method for metering equipment provided in the embodiments of the present application defines a forward rule based on the pulse signal state that the metering sensor should output during the forward rotation of the column; and defines a reverse rule based on the pulse signal state that the metering sensor should output during the reverse rotation of the column. Signal state results are obtained by continuously sampling the pulse signals actually output by n metering sensors and compared with the forward and reverse rules, respectively. If the signal state result does not meet either rule, the number of column rotations is not counted, and thus the unit flow rate is not counted. This reduces the impact of external signal interference on the metering result and improves metering accuracy.
[0087] In one possible implementation, the rule may include N sub-rules in a sequential order; wherein each sub-rule represents the pulse signal state that the n metering sensors 1 should output when the magnetic component passes through the n metering sensors 1 during the rotation of the column 4.
[0088] Continue as Figure 1 As shown, when the column 4 rotates forward, the first magnetic component 2 and the second magnetic component 3 may successively pass through the metering sensor L, metering sensor M, and metering sensor K. When the first magnetic component 2 passes through the metering sensor L, metering sensor L should output a high-level signal, while metering sensors M and K should output low-level signals. When the first magnetic component 2 passes through the metering sensor M, metering sensors L and M should output high-level signals, while metering sensor K should output low-level signals. When the first magnetic component 2 passes through the metering sensor K, metering sensors L, M, and K should output high-level signals. When the second magnetic component 3 passes through the metering sensor L, metering sensor L should output a low-level signal, while metering sensors M and K should output high-level signals. When the second magnetic component 3 passes through the metering sensor M, metering sensors L and M should output low-level signals, while metering sensor K should output a high-level signal. When the second magnetic component 3 passes through the metering sensor K, metering sensors L, M, and K should output low-level signals.
[0089] When the column 4 rotates in the opposite direction, the second magnetic component 3 and the first magnetic component 2 may successively pass through the metering sensor K, metering sensor M, and metering sensor L. When the second magnetic component 3 passes through the metering sensor K, metering sensor K should output a low-level signal, and metering sensors L and M should output high-level signals. When the second magnetic component 3 passes through the metering sensor M, metering sensors M and K should output low-level signals, and metering sensor L should output a high-level signal. When the second magnetic component 3 passes through the metering sensor L, metering sensors L, M, and K should output low-level signals. When the first magnetic component 2 passes through the metering sensor K, metering sensor K should output a high-level signal, and metering sensors L and M should output low-level signals. When the first magnetic component 2 passes through the metering sensor M, metering sensors M and K should output high-level signals, and metering sensor L should output a low-level signal. When the first magnetic component 2 passes through the metering sensor L, metering sensors L, M, and K should output high-level signals.
[0090] The sub-rules of the forward rule may include: when the first magnetic component 2 / the second magnetic component 3 passes through the metering sensor L, the metering sensor M, and the metering sensor K, the pulse signal states that the metering sensor L, the metering sensor M, and the metering sensor K should output.
[0091] The sub-rules of the reverse rule may include: when the second magnetic component 3 / the first magnetic component 2 passes through the metering sensor K, the metering sensor M, and the metering sensor L, the pulse signal states that the metering sensor L, the metering sensor M, and the metering sensor K should output.
[0092] In one example, the sub-rule includes the flip information of the pulse signals output by n metering sensors 1. The flip information of the pulse signal can include, for example, forward flip and reverse flip. Forward flip of the pulse signal indicates that the pulse signal changes from a low level to a high level, and reverse flip of the pulse signal indicates that the pulse signal changes from a high level to a low level. For example, when the column 4 rotates forward, the order in which the pulse signals output by the metering sensor 1 flip should be: metering sensor L flips forward, metering sensor M flips forward again, metering sensor K flips forward, then metering sensor L flips reversely, metering sensor M flips reversely again, metering sensor K flips reversely, then metering sensor L flips forward, and then metering sensor 1 flips in sequence according to the above rule.
[0093] When the metering sensor L should flip forward, it can be expressed as a; when the metering sensor L should flip backward, it can be expressed as A; when the metering sensor M should flip forward, it can be expressed as b; when the metering sensor M should flip backward, it can be expressed as B; when the metering sensor K should flip forward, it can be expressed as q; when the metering sensor L should flip backward, it can be expressed as Q.
[0094] Each sub-rule may include the flipping information of the pulse signals of n metering sensors 1 whose pulse signals should be flipped one after another. For example, each sub-rule may include the flipping information of the pulse signals of two metering sensors 1 whose pulse signals should be flipped one after another, or each sub-rule may include the flipping information of the pulse signals of three metering sensors 1 whose pulse signals should be flipped one after another. The embodiment of the present application does not limit the number of flipping information of the pulse signals of the metering sensors 1 included in the sub-rules, and the specific number can be set according to actual conditions. The embodiment of the present application does not limit this. Taking the example that each sub-rule may include the flipping information of the pulse signals of two metering sensors 1 whose pulse signals should be flipped one after another, the sub-rules of the forward rule may include: ab, bq, qA, AB, BQ, Qa; the sub-rules of the reverse rule may include: QB, BA, Aq, qb, ba, aQ.
[0095] Sampling the pulse signals actually output by the n metering sensors 1 specifically includes: for each metering sensor 1, if it is detected that the pulse signal output by the metering sensor 1 is reversed, recording the reverse information, thereby improving the sampling accuracy of the pulse signal.
[0096] For example, when the pulse signal output by the metering sensor L flips forward, the flip information can be recorded as a; when the pulse signal output by the metering sensor L flips backward, the flip information can be recorded as A; when the pulse signal output by the metering sensor M flips forward, the flip information can be recorded as b; when the pulse signal output by the metering sensor M flips backward, the flip information can be recorded as B; when the pulse signal output by the metering sensor K flips forward, the flip information can be recorded as q; when the pulse signal output by the metering sensor L flips backward, the flip information can be recorded as Q.
[0097] According to the order in which the pulse signals output by the metering sensor 1 are reversed, the N consecutive recorded reversal information of each metering sensor 1 is integrated to obtain the signal status result. For example, when each sub-rule includes the reversal information of the pulse signals of two metering sensors 1 whose pulse signals should be reversed in succession, each two reversal information can be integrated according to the order in which the reversals occur to obtain the signal status result. Alternatively, when each sub-rule includes the reversal information of the pulse signals of three metering sensors 1 whose pulse signals should be reversed, each three reversal information can be integrated as a group according to the order in which the reversals occur to obtain the signal status result. For example, when the column 4 rotates in the forward direction, each two reversal information can be integrated according to the order in which the pulse signals output by the metering sensor 1 are reversed, and the signal status results obtained can be: ab, bq, qA, AB, BQ, Qa.
[0098] In another example, a sub-rule may include information about the level status of pulse signals output by n metering sensors 1. The pulse signal level status information may include, for example, high or low level. As previously described, when the column 4 rotates forward or reverse, metering sensors L, M, and K should output corresponding high or low level signals. A high level output from metering sensor 1 can be represented by 1, while a low level output from metering sensor 1 can be represented by 0.
[0099] Each sub-rule may include level status information for n metering sensors 1 that should output pulse signals. For example, each sub-rule may include level status information for all metering sensors 1 that should output pulse signals, or each sub-rule may include level status information for two metering sensors 1 that should have their levels changed successively and should output pulse signals, or each sub-rule may include level status information for three metering sensors 1 that should have their levels changed successively and should output pulse signals. Taking the example that each sub-rule may include level status information for all metering sensors 1 that should output pulse signals, and the number of metering sensors 1 being 3, the sub-rules of the forward rule may include: 100, 110, 111, 011, 001, 000. The sub-rules of the reverse rule may include: 011, 001, 000, 100, 110, 111.
[0100] Sampling the pulse signals actually output by the n metering sensors 1 specifically includes: for each metering sensor 1 , if it is detected that the level of the pulse signal output by any metering sensor 1 changes, recording the level information of the pulse signal currently output by each metering sensor 1 .
[0101] For example, when the pulse signal output by the metering sensor L changes from a low level to a high level, and the pulse signals output by the metering sensors M and K are low levels, the current level information of the metering sensor L can be recorded as 1, and the level information of the metering sensors M and K can be recorded as 0.
[0102] Integrate the level information recorded N times consecutively for each metering sensor 1 in the order in which they were recorded to obtain a signal status result. For example, if each sub-rule includes level status information indicating that all metering sensors 1 should output pulse signals, the level information recorded for all metering sensors 1 can be integrated to obtain a signal status result. Alternatively, if each sub-rule includes level status information indicating that two metering sensors 1 should undergo level changes and output pulse signals, the level information recorded for these two metering sensors 1 that have undergone level changes can be integrated to obtain a signal status result. Alternatively, if each sub-rule includes level status information indicating that three metering sensors 1 should undergo level changes and output pulse signals, the level information recorded for these three metering sensors 1 that have undergone level changes can be integrated to obtain a signal status result. For example, when the column 4 rotates in the forward direction, the level information recorded for all metering sensors 1 can be integrated to obtain the signal status results: 100, 110, 111, 011, 001, 000.
[0103] Furthermore, detecting whether the signal status result complies with the forward rule or the reverse rule specifically includes: comparing the sub-data in the signal status result with the sub-rule in the forward rule or the reverse rule; when the sub-data is consistent with any sub-rule, adding 1 / N to the forward count value or the reverse count value of the unit flow.
[0104] For example, the signal status result includes 6 sub-data, and the forward rule or reverse rule includes 6 sub-rules. The 1st to 6th sub-data are compared with the sub-rules of the forward rule or reverse rule respectively. When the sub-data is consistent with any sub-rule of the forward rule, the forward count value of the unit flow is increased by 1 / 6; when the sub-data is consistent with any sub-rule of the reverse rule, the reverse count value of the unit flow is increased by 1 / 6. For the convenience of counting, the forward count value of the unit flow can also be increased by 1. When the forward count value of the unit flow reaches 6, the forward count value of the unit flow is increased by 1; or the reverse count value of the unit flow can be increased by 1. When the reverse count value of the unit flow reaches 6, the reverse count value of the unit flow is increased by 1.
[0105] By comparing the sub-data with the sub-rules, the rotated portion of the column 4 can be counted when the column 4 rotates less than one circle, and the measurement error is 1 / N circle, which further improves the measurement accuracy.
[0106] The following description is made by taking a scenario in which there are two corresponding measuring sensors 1 , the first magnetic component 2 being a north pole magnet and the second magnetic component 3 being a south pole magnet as an example.
[0107] Figure 3 This is a schematic diagram of the structure of the second metering device provided in the embodiment of the present application. Figure 3 As shown, the metering device includes two metering sensors 1, corresponding to metering sensor L and metering sensor M; a first magnetic component 2 and a second magnetic component 3 with different polarities, fixed to a rotatable column 4. The first magnetic component 2 is a north pole magnet, and the second magnetic component 3 is a south pole magnet. The north pole and south pole magnets are located at opposite ends of the column 4, forming a symmetrical structure, with the column 4 as the central axis, driving the north pole and south pole magnets in circular motion.
[0108] Optionally, the angle between metering sensor L and metering sensor M can be 90 degrees. When the angle between metering sensor L and metering sensor M is 90 degrees, during the rotation of column 4, the interval between changes in the pulse signal output by metering sensor L and changes in the pulse signal output by metering sensor M is equal to the time required for a quarter rotation of column 4, facilitating the calculation of metering results. The following embodiments are illustrated using the example of a 90-degree angle between metering sensor L and metering sensor M.
[0109] Metering sensors L and M are located on a circumference centered on column 4. The distance between metering sensors L and M and column 4 is greater than the distance between the north pole and south pole magnets and column 4. That is, metering sensors L and M are located outside the north pole and south pole magnets. This location of metering sensors L and M outside the north pole and south pole magnets increases the distance between the two metering sensors 1 when the angle between them is fixed, reducing interference between the two metering sensors 1.
[0110] The metrology sensors L and M are used to output pulse signals based on the sensed magnetic field. For example, the metrology sensors L and M output a high-level signal when sensing a magnetic field from the North Pole, and a low-level signal when sensing a magnetic field from the South Pole.
[0111] Figure 4 This is a schematic diagram of the structure of a metering sensor provided in an embodiment of the present application. Figure 4As shown, the first metering sensor 1 includes: a bipolar latching magnetoresistive sensor U1, a first capacitor C1, and a first filtering circuit 11; the power supply terminal VCC of the bipolar latching magnetoresistive sensor U1 is connected to the power supply LI-PWR and is connected to the ground through the first capacitor C2; the ground terminal GND of the bipolar latching magnetoresistive sensor U1 is connected to the ground; the output terminal Vout of the bipolar latching magnetoresistive sensor U1 outputs a pulse signal MCU-PULSE-1 to the processor U3 through the first filtering circuit 11.
[0112] The second metering sensor 1 includes: a bipolar latching magnetoresistive sensor U2, a third capacitor C3, and a second filtering circuit 12; the power supply terminal VCC of the bipolar latching magnetoresistive sensor U2 is connected to the power supply LI-PWR and is connected to the ground through the third capacitor C3; the ground terminal GND of the bipolar latching magnetoresistive sensor U2 is connected to the ground; the output terminal Vout of the bipolar latching magnetoresistive sensor U2 outputs a pulse signal MCU-PULSE-2 to the processor U3 through the second filtering circuit 12.
[0113] The first filter circuit 11 and the second filter circuit 12 can both be low-pass filters, for example, and can include any one of an RC filter, an RL filter, and an RLC filter. The first filter circuit 11 and the second filter circuit 12 are used to filter out high-frequency signals from the signal output from the output terminal Vout. The structures of the first filter circuit 11 and the second filter circuit 12 can be the same or different. For example, the first filter circuit 11 can include an RC filter, the second filter circuit 12 can include an RL filter, or both the first filter circuit 11 and the second filter circuit 12 can include RC filters. This embodiment of the present application is not limited to this.
[0114] Furthermore, the first filter circuit 11 includes a first resistor R1 and a second capacitor C2. One end of the first resistor R1 is connected to the output terminal Vout of the bipolar latching magnetoresistive sensor U1. The other end of the first resistor R1 is connected to one end of the second capacitor C2. The other end of the second capacitor C2 is grounded. The other end of the first resistor R1 is used to output a pulse signal. The first filter circuit 11 has a simple structure and is easy to implement.
[0115] The second filter circuit 12 includes a second resistor R2 and a fourth capacitor C4. One end of the second resistor R2 is connected to the output terminal Vout of the bipolar latching magnetoresistive sensor U2. The other end of the second resistor R2 is connected to one end of the fourth capacitor C4. The other end of the fourth capacitor C4 is grounded. The other end of the second resistor R2 is used to output a pulse signal. The second filter circuit 12 has a simple structure and is easy to implement.
[0116] The bipolar latching magnetoresistive sensor U1 and the bipolar latching magnetoresistive sensor U2 can output a high-level signal to the processor U3 through the output terminal Vout when sensing a North Pole magnetic field; and output a low-level signal to the processor U3 through the output terminal Vout when sensing a South Pole magnetic field. Alternatively, the bipolar latching magnetoresistive sensor U1 and the bipolar latching magnetoresistive sensor U2 can output a low-level signal to the processor U3 through the output terminal Vout when sensing a North Pole magnetic field; and output a high-level signal to the processor U3 through the output terminal Vout when sensing a South Pole magnetic field. The present embodiment of the application uses the example of the bipolar latching magnetoresistive sensor U1 and the bipolar latching magnetoresistive sensor U2 outputting a high-level signal to the processor U3 through the output terminal Vout when sensing a North Pole magnetic field; and outputting a low-level signal to the processor U3 through the output terminal Vout when sensing a South Pole magnetic field as an example.
[0117] Before processing data from the metering device, forward and reverse rules can be defined. For example, the forward rule specifies the pulse signal state that metering sensor 1 should output during one forward rotation of column 4; the reverse rule specifies the pulse signal state that metering sensor 1 should output during one reverse rotation of column 4.
[0118] exist Figure 3 In a scenario involving two measuring sensors, the rule may include four sub-rules in a sequential order. Each sub-rule represents the pulse signal state that should be output by measuring sensor L and measuring sensor M when the north pole magnet or south pole magnet passes through measuring sensor L or measuring sensor M during the rotation of column 4.
[0119] In one example, the sub-rules of the forward rule include: ab, bA, AB, Ba; the sub-rules of the reverse rule include: ba, aB, BA, Ab; among them, a represents that the pulse signal output by the first metering sensor 1 is forwardly reversed, b represents that the pulse signal output by the second metering sensor 1 is forwardly reversed, A represents that the pulse signal output by the first metering sensor 1 is reversed, and B represents that the pulse signal output by the second metering sensor 1 is reversed.
[0120] In another example, the sub-rules of the forward rule include: 10, 11, 01, 00; the sub-rules of the reverse rule include: 00, 01, 11, 10; among them, 1 indicates that the pulse signal output by the first metering sensor 1 / the second metering sensor 1 is a high level, and 0 indicates that the pulse signal output by the first metering sensor 1 / the second metering sensor 1 is a low level.
[0121] The following describes a scenario in which the first metering sensor 1 is, for example, a metering sensor L and the second metering sensor 1 is, for example, a metering sensor M, corresponding to the two sub-rules respectively, and describes a method for processing data of a metering device.
[0122] Figure 5 This is a flow chart of a data processing method for a second metering device provided in an embodiment of the present application. Figure 3 and Figure 4 The metering device shown in FIG. 1 includes two metering sensors 1, corresponding to metering sensor L and metering sensor M. Figure 5 As shown, the sub-rules corresponding to the forward rule include: ab, bA, AB, Ba; the sub-rules corresponding to the reverse rule include: ba, aB, BA, Ab. The method may include the following steps:
[0123] S501: The processor detects whether the pulse signal output by the metering sensor 1 is reversed.
[0124] For example, the processor can detect whether the pulse signal output by the metering sensor 1 is reversed by edge sampling. For example, when the pulse signal output by the metering sensor 1 is reversed in the positive direction or reverse direction, it is considered that the pulse signal output by the metering sensor 1 is reversed.
[0125] If it is detected that the pulse signal output by any metering sensor 1 is reversed, step S502 is executed.
[0126] S502: The processor records the current flip information.
[0127] For example, when the pulse signal output by the metering sensor L is reversed in the forward direction, it is recorded as a; when the pulse signal output by the metering sensor M is reversed in the forward direction, it is recorded as b; when the pulse signal output by the metering sensor L is reversed in the reverse direction, it is recorded as A; when the pulse signal output by the metering sensor M is reversed in the reverse direction, it is recorded as B.
[0128] S503: The processor integrates the flip information of two adjacent records according to the order in which the flips occur, to obtain sub-data.
[0129] Figure 6 This is a schematic diagram of the pulse signal state output by a metering sensor provided in an embodiment of the present application. Figure 6 As shown, by integrating the flip information of two adjacent records of the metering sensor L and the metering sensor M, the sub-data of the signal state result can be obtained as follows: ab, bA, AB, Ba.
[0130] Figure 7 This is a schematic diagram of the pulse signal state output by the second metering sensor provided in the embodiment of the present application. Figure 7 As shown, by integrating the flip information of two adjacent records of the metering sensor L and the metering sensor M, the sub-data of the signal state result can be obtained as follows: ba, aB, BA, Ab.
[0131] S504: The processor compares the sub-data with the sub-rules in the forward rule or the reverse rule.
[0132] When the sub-data meets any positive sub-rule, step S505 is executed; when the sub-data meets any negative sub-rule, step S507 is executed; when the sub-data does not meet any rule, step S509 is executed.
[0133] S505: When the sub-data meets any positive sub-rule, the processor adds 1 to the positive count value of the unit flow.
[0134] In an example, Figure 6 The signal state result obtained by the pulse signal state shown has the first sub-data ab, which is consistent with the first sub-rule of the forward rule, and the forward count value is increased by 1; the second sub-data is bA, which is consistent with the second sub-rule of the forward rule, and the forward count value is increased by 1; the third sub-data is AB, which is consistent with the third sub-rule of the forward rule, and the forward count value is increased by 1; the fourth sub-data is Ba, which is consistent with the fourth sub-rule of the forward rule, and the forward count value is increased by 1.
[0135] S506 : When the forward count value accumulates to 4, the processor increases the forward count value of the unit flow by one.
[0136] When the forward count reaches 4, the forward flow has accumulated for one full rotation. The forward count for the unit flow rate increases by one. This means that if the signal condition meets the forward rule, the forward count for the unit flow rate increases by one. This increment indicates that the flow rate of the object being measured increases by one unit flow rate during one forward rotation of the column.
[0137] S507: When the sub-data meets any reverse sub-rule, the processor adds 1 to the reverse count value of the unit flow.
[0138] In an example, Figure 7 The first sub-data of the signal state result obtained by the pulse signal state shown is ba, which is consistent with the first sub-rule of the reverse rule, and the reverse count value is increased by 1; the second sub-data is aB, which is consistent with the second sub-rule of the reverse rule, and the reverse count value is increased by 1; the third sub-data is BA, which is consistent with the third sub-rule of the reverse rule, and the reverse count value is increased by 1; the fourth sub-data is Ab, which is consistent with the fourth sub-rule of the reverse rule, and the reverse count value is increased by 1.
[0139] S508 : When the reverse count value accumulates to 4, the processor increases the reverse count value of the unit flow by one.
[0140] When the reverse count reaches 4, the reverse flow has accumulated for one full rotation. The reverse count value for the unit flow rate increases by one. This means that if the signal condition meets the reverse rule, the reverse count value for the unit flow rate increases by one. This increment indicates that the flow rate of the object being measured has decreased by one unit flow rate during one full rotation of the column in the reverse direction.
[0141] S509: If the sub-data does not comply with any sub-rule, the processor does not perform the counting of the unit flow.
[0142] S510: The processor calculates a measurement result based on the counting result of the unit flow.
[0143] For example, when the unit flow rate corresponding to one rotation of the column 4 is 1 L, if the forward count value is ten and the reverse count value is one, the measurement result is 9 L.
[0144] In summary, the data processing method of the metering equipment provided in the embodiment of the present application defines forward rules and sub-rules according to the pulse signal states that the two metering sensors should output during the forward rotation of the column; and defines reverse rules and sub-rules according to the pulse signal states that the two metering sensors should output during the reverse rotation of the column. Sub-data of the signal state results are obtained by continuous sampling of the pulse signals actually output by the two metering sensors, and are compared with the sub-rules respectively. When the sub-data meets the sub-rules, the count values are accumulated, thereby improving the metering accuracy to 1 / 4 circle. If the sub-data does not meet any of the sub-rules, the count value accumulation is not performed, and thus the counting of the unit flow is not performed, thereby reducing the influence of external signal interference on the metering results.
[0145] Figure 8 This is a schematic diagram of the pulse signal state output by the third metering sensor provided in the embodiment of the present application. Figure 8 As shown, the flip information output by the metering sensor L and the metering sensor M is integrated, and the sub-data in the signal status result can be: ab, bA, AB, Ba, bB, ba, aB, BA, Ab. Among them, the sub-data ab, bA, AB, Ba all comply with the sub-rules of the forward rule. Each time the processor detects a sub-data, the forward count value can be increased by 1; the sub-data ba, aB, BA, Ab all comply with the sub-rules of the reverse rule. Each time the processor detects a sub-data, the reverse count value can be increased by 1. The sub-data bB appears between the sub-data of the forward rule and the reverse rule, which may be caused by flow reversal and is a normal phenomenon. Flow reversal will only produce one burr, and two or more burrs can be defined as unilateral interference signals. When the flow reverses, the processing method of the metering device proposed in this application only has one burr caused by the reversal not counted. When the angle between the two metering sensors 1 is 90 degrees, the counting error of the unit flow can be reduced to 1 / 4 circle, thereby improving the metering accuracy.
[0146] Figure 9 This is a schematic diagram of the pulse signal state output by the fourth metering sensor provided in the embodiment of the present application. Figure 9 As shown, multiple glitch signals appear in the middle of the normal signal. The flip information output by the metering sensor L and the metering sensor M is integrated, and the sub-data in the signal status result can be: ab, bA, AB, Ba, ba, aB, BA, Ab, aA, Aa, bB, Bb.
[0147] When the sub-data meets any sub-rule in the forward rule, the forward count value is increased by 1; when the sub-data meets any sub-rule in the reverse rule, the reverse count value is increased by 1.
[0148] That is, when the sub-data is any of the following: ab, bA, AB, or Ba, the forward count value increases by 1. When the sub-data is any of the following: ba, aB, BA, or Ab, the reverse count value increases by 1. When the sub-data is any of the following: aA, Aa, bB, or Bb, the count value does not increase. For example, if two consecutive sub-data are aA, Aa, or bB, Bb, the first sub-data can be considered to be caused by commutation, and the second sub-data can be considered to be a glitch caused by external interference signals.
[0149] If the sub-data does not meet any of the forward and reverse rules, counting is not performed, which can reduce the impact of external signal interference on the measurement results. When the angle between the two metering sensors 1 is 90 degrees, the counting error per unit flow rate can be reduced to 1 / 4 of a turn, improving measurement accuracy.
[0150] Continue as Figure 5 As shown, when the sub-rules of the forward rule include: 10, 11, 01, 00; and the sub-rules of the reverse rule include: 00, 01, 11, 10, as an example, steps S501-S503 may include the following operations:
[0151] S501: The processor detects whether the level of the pulse signal output by the metering sensor 1 changes.
[0152] For example, the processor can detect whether the level of the pulse signal output by the metering sensor 1 has changed by level sampling. For example, when the pulse signal output by the metering sensor 1 changes from a high level to a low level, or from a low level to a high level, it is considered that the level of the pulse signal output by the metering sensor 1 has changed.
[0153] If it is detected that the level of the pulse signal output by any metering sensor 1 changes, step S502 is executed.
[0154] S502 : The processor records the level information of the pulse signals output by the two measuring sensors 1 .
[0155] For example, when the pulse signal output by the metering sensor L changes from a low level to a high level, the level information output by the metering sensor L is recorded as 1, and the level information output by the metering sensor M is recorded; when the pulse signal output by the metering sensor M changes from a low level to a high level, the level information output by the metering sensor M is recorded as 1, and the level information output by the metering sensor L is recorded; when the pulse signal output by the metering sensor L changes from a high level to a low level, the level information output by the metering sensor L is recorded as 0, and the level information output by the metering sensor M is recorded; when the pulse signal output by the metering sensor M changes from a high level to a low level, the level information output by the metering sensor M is recorded as 0, and the level information output by the metering sensor L is recorded.
[0156] S503: The processor integrates the level information of the two measuring sensors recorded each time according to the order of recording to obtain sub-data.
[0157] Continue as Figure 6 As shown, by integrating the level information recorded four times in succession by the metering sensor L and the metering sensor M, the sub-data of the signal state result can be obtained as follows: 10, 11, 01, 00.
[0158] Continue as Figure 7 As shown, by integrating the level information recorded four times in succession by the metering sensor L and the metering sensor M, the sub-data of the signal state result can be obtained as follows: 01, 11, 10, 00.
[0159] As an example, steps S505-S506 may further include the following operations.
[0160] In an example, Figure 6 The signal state result obtained from the pulse signal state shown has the first sub-data of 10, which is consistent with the first sub-rule of the forward rule, and the forward count value is increased by 1. The second sub-data is 11, which is consistent with the second sub-rule of the forward rule, and the forward count value is increased by 1. The third sub-data is 01, which is consistent with the third sub-rule of the forward rule, and the forward count value is increased by 1. The fourth sub-data is 00, which is consistent with the fourth sub-rule of the forward rule, and the forward count value is increased by 1. When the forward count reaches 4, it means that the forward flow has accumulated one cycle. The forward count value of each unit flow rate increases by one.
[0161] As an example, steps S507-S508 may also include the following operations.
[0162] In an example, Figure 7The signal status result obtained from the pulse signal state shown has the first sub-data value of 01, which is consistent with the first sub-rule of the reverse rule, and the reverse count value is increased by 1. The second sub-data value is 11, which is consistent with the second sub-rule of the reverse rule, and the reverse count value is increased by 1. The third sub-data value is 10, which is consistent with the third sub-rule of the reverse rule, and the reverse count value is increased by 1. The fourth sub-data value is 00, which is consistent with the fourth sub-rule of the reverse rule, and the reverse count value is increased by 1. When the reverse count reaches 4, it means that the reverse flow has accumulated one cycle. The reverse count value of each unit flow rate increases by one.
[0163] Continue as Figure 8 As shown, by integrating the level information output by metering sensors L and M, the sub-data in the signal status result can be in the following order: 10, 11, 01, 00, 10, 11, 10, 00, 01, 11, 10, 00. The change sequence of sub-data 10, 11, 01, and 00 conforms to the sub-rules of the forward rule. The processor increments the forward count by 1 each time it detects a sub-data. The change sequence of sub-data 10, 00, 01, and 11 conforms to the sub-rules of the reverse rule. The processor increments the reverse count by 1 each time it detects a sub-data. The presence of two identical sub-data 10s before and after 11 indicates that the level of metering sensor L has not changed in three consecutive sub-data periods. This is likely due to flow reversal and is a normal phenomenon. Flow reversal only produces one glitch. Two or more glitches are considered unilateral interference signals.
[0164] Continue as Figure 9 As shown, the level information output by metering sensor L and metering sensor M is integrated, and the order of sub-data in the obtained signal status result can be: 10, 11, 01, 00, 10, 11, 01, 00, 10, 00, 10, 00, 01, 11, 10, 00, 01, 11, 10, 00, 01, 00, 01, 00. Sub-data 10 has two identical sub-data 00s before and after it, and sub-data 00 has two identical sub-data 10s before and after it, indicating that the level of metering sensor M has not changed in five consecutive sub-data. From the fourth sub-data onwards, it can be considered that the burr is caused by the external interference signal. Sub-data 01 has two identical sub-data 00s before and after it, and sub-data 00 has two identical sub-data 01s before and after it, indicating that the level of metering sensor L has not changed in five consecutive sub-data. From the fourth sub-data onwards, it can be considered that the burr is caused by the external interference signal.
[0165] When the sub-data is not a glitch and conforms to the sub-rule sequence in the forward rule, the forward count value is increased by 1; when the sub-data is not a glitch and conforms to the sub-rule sequence in the reverse rule, the reverse count value is increased by 1.
[0166] When the sub-data does not conform to the sub-rule sequence of the forward rule and the sub-rule sequence of the reverse rule, counting is not performed, thereby preventing glitches caused by external signal interference from affecting the measurement results.
[0167] Furthermore, for the same measuring sensor 1 , if the time between the current sampling and the last sampling is less than the preset time, the current sampling is ignored.
[0168] Figure 10 This is a schematic diagram of the pulse signal state output by the fifth metering sensor provided in the embodiment of the present application. Figure 10 As shown, assuming a flow rate of 10 cubic meters per hour, when one rotation of the column 4 corresponds to a unit flow rate of 1 liter, the time it takes for the column 4 to rotate once is 360 milliseconds (ms). The time it takes for the column 4 to rotate once corresponds to a sampling period T for each metering sensor 1. The transition time between the high and low level signals of a metering sensor 1 should be T / 2, or 180 ms. In this case, a preset duration can be set to 120 ms or 150 ms. No transition between high and low level signals should occur within a time period t that is less than the preset duration. If the time between the current sampling and the previous sampling is less than the preset duration, the sampling is considered invalid and ignored. Accordingly, when one rotation of the column 4 corresponds to a unit flow rate of 10 liters, the time it takes for the column 4 to rotate once is 3.6 seconds (s). The preset duration can be set to 1.2 s or 1.5 s. The present embodiment does not limit the value of the preset duration; it can be set based on actual needs.
[0169] If the time between the current sampling and the last sampling is less than the preset time, the current sampling is ignored, which can avoid the influence of high-frequency glitches caused by external signal interference and reduce measurement errors.
[0170] Figure 11 A schematic diagram of a data processing device for a metering device according to an embodiment of the present application. The metering device includes n metering sensors 1, and a first magnetic component 2 and a second magnetic component 3 of different polarities fixed to a rotatable column 4. The n metering sensors 1 are configured to output pulse signals based on the sensed magnetic field; n is a positive integer greater than or equal to 2.
[0171] like Figure 11 As shown, the data processing device may include, for example: a sampling module 1101 , a detection module 1102 , and an execution module 1103 .
[0172] The sampling module 1101 is used to sample the pulse signals actually output by the n measuring sensors 1;
[0173] The detection module 1102 is configured to detect whether the signal state result obtained by N consecutive samplings conforms to the forward rule or the reverse rule, wherein N is a positive integer; the forward rule represents the pulse signal state that the metering sensor 1 should output during one forward rotation of the column 4; and the reverse rule represents the pulse signal state that the metering sensor 1 should output during one reverse rotation of the column 4.
[0174] The execution module 1103 is configured to not execute the counting of the unit flow if the signal status result does not meet any rule; the counting result of the unit flow represents the number of rotations of the column 4 and is used to calculate the measurement result.
[0175] In a possible implementation, the execution module 1103 is further configured to: when the signal status result meets the forward rule, increase the forward count value of the unit flow by one; when the signal status result meets the reverse rule, increase the reverse count value of the unit flow by one.
[0176] In one possible implementation, the rule includes N sub-rules in a sequential order; wherein each sub-rule represents the pulse signal state that the n measuring sensors 1 should output when the magnetic component passes through the n measuring sensors 1 during the rotation of the column 4.
[0177] A possible implementation method is detection module 1102, which is specifically used to: compare the sub-data in the signal status result with the sub-rules in the forward rule or reverse rule in sequence; when the sub-data is consistent with any sub-rule, add 1 / N to the forward count value or reverse count value of the unit flow.
[0178] In one possible implementation, the sub-rules include the flip information of the pulse signals output by n metering sensors 1; the sampling module 1101 is specifically used to: for each metering sensor 1, if it is detected that the pulse signal output by the metering sensor 1 has flipped, record the flip information; and integrate the flip information of two adjacent records in the order in which the flips occurred to obtain sub-data.
[0179] In a possible implementation, the number of metering sensors 1 is two; the value of N is 4.
[0180] In one possible implementation method, the sub-rules of the forward rule include: ab, bA, AB, Ba; the sub-rules of the reverse rule include: ba, aB, BA, Ab; among them, a represents that the pulse signal output by the first metering sensor 1 is forwardly reversed, b represents that the pulse signal output by the second metering sensor 1 is forwardly reversed, A represents that the pulse signal output by the first metering sensor 1 is reversed, and B represents that the pulse signal output by the second metering sensor 1 is reversed.
[0181] In one possible implementation, the sub-rule includes level status information of pulse signals output by n metering sensors 1; the sampling module 1101 is specifically used to: for each metering sensor 1, if a change in the level of the pulse signal output by any metering sensor 1 is detected, record the level information of the pulse signal currently output by each metering sensor 1; and integrate the level information of the n metering sensors recorded each time in the order of recording to obtain sub-data.
[0182] In one possible implementation, the sub-rules of the forward rule include: 10, 11, 01, 00; the sub-rules of the reverse rule include: 00, 01, 11, 10; wherein 1 indicates that the pulse signal output by the first metering sensor 1 / the second metering sensor 1 is a high level, and 0 indicates that the pulse signal output by the first metering sensor 1 / the second metering sensor 1 is a low level.
[0183] In a possible implementation, the angle between the two metering sensors 1 is 90 degrees.
[0184] In one possible implementation, the first metering sensor 1 includes a bipolar latching magnetoresistive sensor, a first capacitor, and a first filtering circuit 11; the power supply end of the bipolar latching magnetoresistive sensor is connected to a power supply and is connected to the ground through the first capacitor; the ground end of the bipolar latching magnetoresistive sensor is connected to the ground; and the output end of the bipolar latching magnetoresistive sensor outputs a pulse signal through the first filtering circuit.
[0185] In one possible implementation, the first filtering circuit 11 includes: a first resistor and a second capacitor; one end of the first resistor is connected to the output end of the bipolar latch magnetoresistive sensor; the other end of the first resistor is connected to one end of the second capacitor; the other end of the second capacitor is grounded; and the other end of the first resistor is used to output a pulse signal.
[0186] In a possible implementation, the sampling module 1101 is further configured to: for the same measuring sensor 1, if the time between the current sampling and the last sampling is less than a preset time, ignore the current sampling.
[0187] The data processing device of the metering equipment provided in the embodiment of the present application can perform the actions in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here.
[0188] The present application also provides a meter, including a metering device and a data processing device for the metering device.
[0189] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0190] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A data processing method for a measuring device, characterized in that: The metering device includes two metering sensors and a first magnetic component and a second magnetic component fixed to a rotatable column and having different polarities. The first magnetic component and the second magnetic component rotate under the drive of the column and pass through the two metering sensors. The two metering sensors are configured to output different pulse signals when respectively sensing the magnetic field of the first magnetic component and the magnetic field of the second magnetic component. The method includes: For each metering sensor, if it is detected that the pulse signal output by the metering sensor is reversed, the reversal information is recorded; Integrate the flip information of two adjacent records according to the order in which the flips occurred to obtain sub-data; for the same measuring sensor, if the time between the current detection and the previous detection is less than the preset time, the current detection will be ignored; According to the sub-data obtained from four consecutive tests, the sub-data are compared with the sub-rules in the forward rule or the sub-rules in the reverse rule; When the sub-data is consistent with any sub-rule, the forward count value or reverse count value of the unit flow is increased by 1 / 4; the forward rule represents the pulse signal state that should be output by the two measuring sensors when the two magnetic components pass through the two measuring sensors in succession during one forward rotation of the column; the reverse rule represents the pulse signal state that should be output by the two measuring sensors when the two magnetic components pass through the two measuring sensors in succession during one reverse rotation of the column; If the sub-data does not meet any of the rules, the unit flow rate is not counted; the counting result of the unit flow rate represents the number of rotations of the column and is used to calculate the metering result; The rule includes 4 sub-rules in a sequential order; the sub-rules of the forward rule include: ab, bA, AB, Ba; the sub-rules of the reverse rule include: ba, aB, BA, Ab; among them, a represents that the pulse signal output by the first metering sensor is forwardly reversed, b represents that the pulse signal output by the second metering sensor is forwardly reversed, A represents that the pulse signal output by the first metering sensor is reversely reversed, and B represents that the pulse signal output by the second metering sensor is reversely reversed.
2. The method according to claim 1, characterized in that The method further comprises: When the sub-data meets the forward rule, the forward count value of the unit flow is increased by one; When the sub-data conforms to the reverse rule, the reverse count value of the unit flow is increased by one.
3. The method according to claim 1, characterized in that The angle between the two metering sensors is 90 degrees.
4. The method according to claim 3, characterized in that The first metering sensor includes a bipolar latching magnetoresistive sensor, a first capacitor, and a first filtering circuit; the power supply end of the bipolar latching magnetoresistive sensor is connected to a power supply and is connected to the ground through the first capacitor; the ground end of the bipolar latching magnetoresistive sensor is connected to the ground; and the output end of the bipolar latching magnetoresistive sensor outputs a pulse signal through the first filtering circuit.
5. The method according to claim 4, characterized in that The first filtering circuit includes: a first resistor and a second capacitor; one end of the first resistor is connected to the output end of the bipolar latch magnetoresistive sensor; the other end of the first resistor is connected to one end of the second capacitor; the other end of the second capacitor is grounded; the other end of the first resistor is used to output a pulse signal.
6. A data processing device for a measuring device, characterized in that: The metering device includes two metering sensors and a first magnetic component and a second magnetic component fixed to a rotatable column and having different polarities. The first magnetic component and the second magnetic component rotate under the drive of the column and pass through the two metering sensors. The two metering sensors are configured to output different pulse signals when they respectively sense the magnetic field of the first magnetic component and the magnetic field of the second magnetic component. The data processing device includes: The sampling module is used to record the reversal information if it detects that the pulse signal output by each metering sensor has reversed. Integrate the flip information of two adjacent records according to the order in which the flips occurred to obtain sub-data; for the same measuring sensor, if the time between the current detection and the previous detection is less than the preset time, the current detection will be ignored; A detection module, configured to compare the sub-data obtained from four consecutive detections with the sub-rules in the forward rule or the sub-rules in the reverse rule; When the sub-data is consistent with any sub-rule, the forward count value or reverse count value of the unit flow is increased by 1 / 4; the forward rule represents the pulse signal state that should be output by the two measuring sensors when the two magnetic components pass through the two measuring sensors in succession during one forward rotation of the column; the reverse rule represents the pulse signal state that should be output by the two measuring sensors when the two magnetic components pass through the two measuring sensors in succession during one reverse rotation of the column; an execution module, configured to not execute the counting of the unit flow if the sub-data does not conform to any rule; the counting result of the unit flow represents the number of rotations of the column, which is used to calculate the metering result; The rule includes 4 sub-rules in a sequential order; the sub-rules of the forward rule include: ab, bA, AB, Ba; the sub-rules of the reverse rule include: ba, aB, BA, Ab; among them, a represents that the pulse signal output by the first metering sensor is forwardly reversed, b represents that the pulse signal output by the second metering sensor is forwardly reversed, A represents that the pulse signal output by the first metering sensor is reversely reversed, and B represents that the pulse signal output by the second metering sensor is reversely reversed.
7. An instrument, characterized in that: The method comprises a metering device and a data processing apparatus as claimed in claim 6.
Citation Information
Patent Citations
Water meter based on latch type magnetoresistive sensor
CN116558584A