A method for detecting and correcting double Hall measurement anomalies
By recording and analyzing the pulse output moment of the Hall sensor, judging and correcting abnormalities, the abnormal problems that occur during the measurement process of the Hall sensor are solved, ensuring the accuracy of flow counting and the normal operation of the equipment.
Patent Information
- Application Number
- CN202111400659.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2041-11-24
AI Technical Summary
An abnormality may occur during the metrology process of Hall sensors, resulting in metrology errors, such as continuous generation of multiple pulse signals or no pulse signals, affecting the accuracy of flow counting.
By recording the Hall sensor output time in the last n metering cycles, analyzing the pulse number and time, determining which Hall sensor has abnormality, and correcting the flow value, ensuring the stability and accuracy of the metering cycle length.
Effectively detect and correct Hall sensor abnormalities, ensure the accuracy of flow counting, avoid metering errors, and extend the uptime of the equipment.
Smart Images

Figure CN114137465B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Hall measurement, and in particular to a method for detecting and correcting double Hall measurement anomalies. Background Art
[0002] Gas meters, water meters and other meters often use Hall sensors as metering elements. The gas or water in the meter drives the motion mechanism to do periodic motion. Magnets are usually placed on the motion mechanism. In each motion cycle, the magnets pass over the Hall sensor. In the process of passing over the Hall sensor, the Hall sensor generates a pulse signal. By detecting the output pulse and pulse cycle of the Hall sensor, the flow rate and flow velocity of the gas or water can be known. Each motion cycle is a metering cycle, and the flow rate in a metering cycle is recorded as a unit flow rate.
[0003] The so-called dual Hall metering generally places two independent Hall sensors on the periodic motion path of the motion mechanism. The magnet will pass through the two Hall sensors in turn, so that the two Hall sensors will output one pulse in turn in one metering cycle, forming a pulse sequence output by the first Hall sensor and the second Hall sensor in turn (referred to as Hall 1 and Hall 2 in the figure). One pulse sequence corresponds to one unit of flow value. The fluid drives the motion mechanism to move one circle, which is recorded as a metering cycle T, such as Figure 1 shown.
[0004] like Figure 1 , within a metering cycle, the pulses of the first Hall sensor and the second Hall sensor appear alternately. We record the length between two adjacent pulses of the first Hall sensor as T1, and the length between two adjacent pulses of the second Hall sensor as T2. When the flow in the pipeline is stable, and considering that the flow has a certain fluctuation, it can be considered that T1 and T2 should be roughly equal, that is, T1≈T2≈T. Within the time of one metering cycle, the pulse of the first Hall sensor and the pulse of the second Hall sensor will appear in sequence, and each will only appear once, forming a pulse sequence of the first Hall sensor-the second Hall sensor.
[0005] Due to possible manufacturing defects and component parameter errors in the Hall element, as well as electrical signal interference generated during the operation of the meter's electronic components or circuit failures, there is a certain probability that the Hall element will become abnormal during operation: when a magnet passes over the Hall sensor, the Hall sensor may generate multiple pulse signals in succession or no pulse signal, which may cause meter measurement errors. Summary of the invention
[0006] In order to overcome the deficiencies of the above technologies, the present invention provides a method for detecting and correcting dual Hall measurement anomalies.
[0007] The technical solution adopted by the present invention to overcome the technical problems is:
[0008] A method for detecting and correcting dual Hall measurement anomalies comprises the following steps:
[0009] Get the measurement cycle length T;
[0010] Record the output time of all pulses of the two Hall sensors in the latest n metering cycles, where n≥3;
[0011] Determine whether any Hall sensor is abnormal based on the number of pulses. If any Hall sensor is abnormal, proceed to the next step.
[0012] Analyze the output time of all pulses within the n metering cycles to determine which Hall sensor has an abnormality, and then further determine whether the flow value of the meter can be corrected.
[0013] Further, after the lengths of m consecutive metering cycles are stable, the metering cycle length T is obtained, wherein m≥3.
[0014] Furthermore, after each new metering cycle t, it is determined whether the difference between t and T exceeds a preset value:
[0015] If it exceeds, wait for the new metering cycle t to stabilize first. After t stabilizes for m consecutive times, update the metering cycle length T=t;
[0016] Otherwise, it is regarded as an occasional flow fluctuation and the metering cycle length T is maintained.
[0017] Furthermore, for civil meters with smaller flow rates, the preset difference between t and T is set to 10%; for commercial meters with larger flow rates, the preset difference between t and T is set to 20%.
[0018] Furthermore, in the process of recording the output times of all pulses of the two Hall sensors in the latest n metering cycles, after each metering cycle T, the pulse output time of the earliest recorded metering cycle within the n metering cycles is discarded, and the pulse output time of the most recently experienced metering cycle is added.
[0019] Furthermore, it is determined whether any Hall sensor is abnormal based on the number of pulses. Specifically, it is determined whether the number of pulses output by the two Hall sensors in n metering cycles is n:
[0020] If yes, then both Hall sensors are normal;
[0021] Otherwise, at least one Hall sensor is abnormal.
[0022] Furthermore, the output time of all pulses within the recorded n metering cycles is analyzed to determine which Hall sensor is abnormal, and then further determine whether the flow value of the meter can be corrected. Assuming that the two Hall sensors are the first Hall sensor and the second Hall sensor, the specific method includes:
[0023] If the first Hall sensor outputs n pulses, and the second Hall sensor outputs less than n pulses, it is determined that the second Hall sensor is abnormal;
[0024] According to the recorded pulse time, the position and number of the pulses missing from the second Hall sensor are known, and the flow value is supplemented, that is, the flow value is corrected.
[0025] Furthermore, the output time of all pulses within the recorded n metering cycles is analyzed to determine which Hall sensor is abnormal, and then further determine whether the flow value of the meter can be corrected. Assuming that the two Hall sensors are the first Hall sensor and the second Hall sensor, the specific method includes:
[0026] If the first Hall sensor outputs n pulses and the second Hall sensor outputs 0 pulses, it is determined that the second Hall sensor is abnormal;
[0027] Continue to check whether the pulse period of the first Hall sensor is stable. There are two situations:
[0028] First, if the first Hall sensor is stable for at least m consecutive pulse cycles, the flow value is first increased by m units, and then the flow value continues to be counted according to the pulse cycle of the first Hall sensor. The flow value is increased by 1 unit every time a pulse cycle passes;
[0029] Second, if the pulse period of the first Hall sensor is unstable, it is determined that the first Hall sensor is also abnormal or the flow is unstable, and the pulses of the first Hall sensor are not counted.
[0030] Furthermore, the output time of all pulses within the recorded n metering cycles is analyzed to determine which Hall sensor is abnormal, and then further determine whether the flow value of the meter can be corrected. Assuming that the two Hall sensors are the first Hall sensor and the second Hall sensor, the specific method includes:
[0031] If the first Hall sensor outputs n pulses, and the number of pulses output by the second Hall sensor is greater than n, it is determined that the second Hall sensor is abnormal;
[0032] Since the redundant pulses of the second Hall sensor and the normal pulses of the first Hall sensor do not form redundant first Hall sensor-second Hall sensor pulse sequences, the flow value of the meter does not have any additional increase and does not need to be corrected.
[0033] Furthermore, the output time of all pulses within the recorded n metering cycles is analyzed to determine which Hall sensor is abnormal, and then further determine whether the flow value of the meter can be corrected. Assuming that the two Hall sensors are the first Hall sensor and the second Hall sensor, the specific method includes:
[0034] If the number of pulses output by the first Hall sensor and the second Hall sensor is greater than n, there are two cases:
[0035] First, the metering cycle remains unchanged, and redundant pulses appear in at least n pulse cycles, then it is determined that both Hall sensors are abnormal. Since both the first Hall sensor and the second Hall sensor are abnormal, the flow value cannot be corrected;
[0036] Second, if the metering cycle becomes smaller and there are no extra pulses outside each pulse sequence, it is determined that the two Hall sensors are normal; the reason why the number of pulses of the two Hall sensors is greater than n is that the increase in flow rate causes the metering cycle of the two Hall sensors to become smaller. At this time, the flow value is normal and no correction is required.
[0037] Furthermore, the output time of all pulses within the recorded n metering cycles is analyzed to determine which Hall sensor is abnormal, and then further determine whether the flow value of the meter can be corrected. Assuming that the two Hall sensors are the first Hall sensor and the second Hall sensor, the specific method includes:
[0038] If the number of pulses output by the first Hall sensor and the second Hall sensor is less than n, there are two cases:
[0039] First, if the metering cycle remains unchanged, it is determined that both Hall sensors are abnormal. According to the recorded pulse time, the position and number of the missing pulses of the two Hall sensors are known, and the flow value is supplemented;
[0040] Second, if the metering cycle becomes longer, it is determined that both Hall sensors are normal. At this time, the flow value is normal and no correction is required.
[0041] The beneficial effects of the present invention are:
[0042] The method of the present invention can detect Hall sensor anomalies that occur during dual Hall metering, and when one of the Hall sensors is abnormal, correct the erroneous flow value caused by the anomaly, ensuring that normal counting can still be performed during the anomaly, so that the staff can ensure that the meter continues to operate normally before replacing the abnormal component. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 This is a schematic diagram of the pulse sequence normally output by two Hall sensors.
[0044] Figure 2The present invention is a flowchart of a method for detecting and correcting a dual-Hall metering anomaly according to an embodiment of the present invention.
[0045] Figure 3 This is a schematic diagram of two Hall sensors according to an embodiment of the present invention both outputting pulse sequences normally.
[0046] Figure 4 This is a schematic diagram of a first Hall sensor outputting a normal pulse sequence and a second Hall sensor missing pulses according to an embodiment of the present invention.
[0047] Figure 5 This is a schematic diagram of a first Hall sensor outputting a normal pulse sequence and a second Hall sensor outputting no pulse according to an embodiment of the present invention.
[0048] Figure 6 This is a schematic diagram of an embodiment of the present invention in which the pulse period of the first Hall sensor is unstable and the second Hall sensor has no pulse output.
[0049] Figure 7 This is a schematic diagram of a first Hall sensor outputting a normal pulse sequence and a second Hall sensor outputting redundant pulses according to an embodiment of the present invention.
[0050] Figure 8 This is a schematic diagram of a first Hall sensor and a second Hall sensor outputting redundant pulses according to an embodiment of the present invention.
[0051] Fig. 9 This is a schematic diagram showing that the metering periods of the first Hall sensor and the second Hall sensor according to an embodiment of the present invention are both reduced.
[0052] Fig.10 This is a schematic diagram of a first Hall sensor and a second Hall sensor both lacking pulses according to an embodiment of the present invention.
[0053] Fig.11 This is a schematic diagram showing that the metering periods of the first Hall sensor and the second Hall sensor according to an embodiment of the present invention are both enlarged. DETAILED DESCRIPTION
[0054] In order to facilitate those skilled in the art to better understand the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The following is only exemplary and does not limit the protection scope of the present invention.
[0055] This embodiment discloses a method for detecting and correcting dual Hall measurement anomalies, such as Figure 2 As shown, the following steps are included:
[0056] Step S1, obtaining the length T of the metering cycle.
[0057] Specifically, in step S1, after the length of m consecutive metering cycles is stable, the metering cycle length T is obtained and recorded, where m≥3. Generally, if the flow rate remains stable for three consecutive cycles (that is, the cycle T is stable), the flow rate is considered to be stable. After at least three cycles, the previous value, the current value and the next value can be seen, and the changing trend of T can be determined. For example, if T1=10s, T2=4s, and T3=1s, T is considered to have a decreasing trend. For example, if T1=10s, T2=4s, and T3=10s, it can be determined that T fluctuates and is unstable. Two cycles are too few, and the flow rate is considered to be stable only when there is no fluctuation for at least three cycles.
[0058] In order to ensure that the metering cycle length T is more accurate, in this embodiment, m=5 is preferably used, that is, the metering cycle length T is obtained after the lengths of five consecutive metering cycles are stable.
[0059] As a further preferred solution of this embodiment, after each new metering cycle t, it is determined whether the difference between t and T exceeds a preset value, that is, it is actually determined whether t has a large change relative to T:
[0060] a. If the difference exceeds the preset value, wait for the new metering cycle t to stabilize first. Generally, after t stabilizes for 5 consecutive times, that is, the length of 5 consecutive metering cycles is equal to t, the metering cycle length T=t is updated. For occasions with large flow fluctuations, the number of metering cycles for continuous judgment can be appropriately increased. For example, the flow is considered to be in a stable state only when it remains stable for 10 consecutive metering cycles.
[0061] b. Otherwise, it is regarded as an occasional flow fluctuation, and the metering cycle length T is maintained without updating.
[0062] Furthermore, for civil meters with a relatively small flow rate, the flow rate specifications are generally G4 and below, and the maximum flow rate of the G4 meter is 6m³ / h. In this embodiment, the preset difference between t and T is set to 10%, that is, the difference between t and T (increase or decrease) exceeds 10%*T, which is considered to be a large change. For commercial meters with a relatively large flow rate, commercial meters, whose flow rate specifications are generally G6 and above, and the maximum flow rate of the G6 meter is 10m³ / h. In this embodiment, the preset difference between t and T is set to 20%, that is, the difference between t and T (increase or decrease) exceeds 20%*T, which is considered to be a large change.
[0063] Step S2, recording the output time of all pulses of the two Hall sensors in the latest n metering cycles, where n≥3.
[0064] After the flow rate stabilizes in step S1, the pulses of the two Hall sensors in the latest n metering cycles are recorded. The more pulse cycles are recorded, the more data can be compared, and the changes in the pulse cycle can be judged more accurately, but more storage and steps are required. In this embodiment, n=10 is preferred, that is, 10 metering cycles are used as an example for detailed description. In the process of recording the output time of all pulses of the two Hall sensors in the latest 10 metering cycles, after each metering cycle T, the pulse output time of the earliest recorded metering cycle in the 10 metering cycles is discarded, and the pulse output time of the most recently experienced metering cycle is added.
[0065] Step S3: determine whether any Hall sensor is abnormal according to the number of pulses. If any Hall sensor is abnormal, execute the next step.
[0066] In this embodiment, it is determined whether there is an abnormality in the Hall sensor according to the number of pulses, specifically, whether the number of pulses output by the two Hall sensors in 10 metering cycles is 10: Under normal circumstances, there will be 10 pulse sequences in 10 metering cycles, and the number of pulses output by the two Hall sensors is also 10 each. Figure 3 As shown; otherwise, at least one Hall sensor is abnormal.
[0067] Step S4, analyzing the output time of all pulses within the 10 recorded metering cycles, determining which Hall sensor has an abnormality, and further determining whether the flow value of the meter can be corrected.
[0068] Assume that the two Hall sensors are the first Hall sensor and the second Hall sensor. For the convenience of description in the figure, Figure 3-Figure 11 In the figure, Hall 1 represents the first Hall sensor and Hall 2 represents the second Hall sensor. If a Hall sensor is abnormal, the positional relationship between the output pulses of the two Hall sensors on the time axis can be obtained based on the pulse output time points recorded in the last 10 metering cycles, and it can be determined which Hall sensor is abnormal. This embodiment includes the following situations:
[0069] (1) The first case is as follows:
[0070] If the first Hall sensor outputs 10 pulses and the second Hall sensor outputs less than 10 pulses, it is determined that the second Hall sensor is abnormal; then based on the recorded pulse time, the position and number of the missing pulses of the second Hall sensor can be known, and the flow value can be supplemented, that is, the flow value is corrected.
[0071] like Figure 4As shown, assuming that the second Hall sensor loses 2 pulses, according to the pulse timing, it can be found that there is no pulse sequence in the two metering cycles corresponding to the timings t5 and t6 of the first Hall sensor, resulting in the flow value being undercounted by 2 units. At this time, the flow value can be corrected: that is, the flow value is supplemented by 2 units.
[0072] If it is detected that a certain Hall sensor frequently loses pulses, the Hall sensor is recorded as an abnormal component and the metering state is recorded as abnormal.
[0073] (2) The second situation is as follows:
[0074] If the first Hall sensor outputs 10 pulses and the second Hall sensor outputs 0 pulses, that is, the second Hall sensor has no pulse output, such as Figure 5 As shown, the pulse sequence outputted by the first Hall sensor and the second Hall sensor in sequence cannot be formed, and the flow value will never increase. It is determined that the second Hall sensor is abnormal, and is marked as an abnormal element, and the metering state is recorded as abnormal.
[0075] Then, continue to check whether the pulse period of the first Hall sensor is stable, which can be divided into two cases:
[0076] First, if the first Hall sensor is stable for at least 5 consecutive pulse cycles, the flow value is first increased by 5 units, and then the flow value continues to be counted according to the pulse cycle of the first Hall sensor. The flow value is increased by 1 unit after each pulse cycle.
[0077] Second, if the first Hall sensor has a pulse output, but the pulse period of the first Hall sensor is unstable, such as Figure 6 As shown, it is determined that the first Hall sensor is also abnormal or the flow is unstable, and the pulses of the first Hall sensor are not counted at this time.
[0078] (3) The third situation is as follows:
[0079] If the first Hall sensor outputs 10 pulses, and the second Hall sensor outputs more than 10 pulses, Figure 7 As shown, since there is a pulse sequence output by the first Hall sensor and the second Hall sensor in sequence, counting is possible, but the second Hall sensor has become abnormal. After 10 consecutive abnormalities, the second Hall sensor is recorded as an abnormal element and the metering state is recorded as abnormal.
[0080] Because the first Hall sensor normally outputs 10 pulses, the extra pulses of the second Hall sensor and the normal pulses of the first Hall sensor do not form an extra first Hall sensor-second Hall sensor pulse sequence, so the flow value of the meter has no additional increase, that is, there is no over-counting, and there is no need to correct the flow value.
[0081] (4) The fourth situation is as follows:
[0082] If the number of pulses output by the first Hall sensor and the second Hall sensor are both greater than 10, there are two cases:
[0083] First, if the metering cycle remains unchanged and redundant pulses appear in at least 10 pulse cycles, it can be determined that both Hall sensors are abnormal, such as Figure 8 As shown, at this time, there will be a pulse sequence output by the first Hall sensor and the second Hall sensor in sequence, so it can be counted, but the Hall element has continuously abnormal output, and there may be multiple counts. It is necessary to record both Hall sensors as abnormal elements and the metering state as abnormal. At this time, because both the first Hall sensor and the second Hall sensor are abnormal, the flow value cannot be corrected.
[0084] Second, if the metering cycle becomes smaller and there are no extra pulses outside each pulse sequence, it is determined that both Hall sensors are normal. The reason why the number of pulses of both Hall sensors is greater than 10 is that the metering cycle of both Hall sensors becomes smaller due to the increase in flow rate. At this time, the flow value is normal and no correction is required. Fig. 9 shown.
[0085] Before the flow rate increases, the metering period T=T1=T2, where T1 and T2 refer to the metering periods of the first Hall sensor and the second Hall sensor, respectively.
[0086] When the flow rate increases, T1 and T2 will decrease, T>t1>t2>t3. After the flow rate stabilizes, the metering period stabilizes at t3, where t1 and t2 are the metering periods when the flow rate increases but is not yet stable.
[0087] (5) The fifth situation is as follows:
[0088] If the number of pulses output by the first Hall sensor and the second Hall sensor are both less than 10, there are two cases:
[0089] First, if the metering cycle remains unchanged, it is determined that both Hall sensors are abnormal and have pulses missing. According to the recorded pulse time, the position and number of the missing pulses of the two Hall sensors are known, and the flow value is supplemented. Fig.10 As shown, the first Hall sensor loses pulses at t6 and t7, and the second Hall sensor loses pulses at t5 and t6. As a result, only one pulse sequence is formed from t5 to t7, and the flow value only increases by 1 unit, so 2 units need to be added.
[0090] Second, if the measurement period becomes larger while the flow rate becomes smaller, it is determined that both Hall sensors are normal. At this time, the flow rate value is normal and no correction is required. For example, Fig.11 as shown.
[0091] Before the flow rate becomes smaller, the measurement period T = T1 = T2, where T1 and T2 respectively refer to the measurement periods of the first Hall sensor and the second Hall sensor.
[0092] After the flow rate becomes smaller, T1 and T2 will become larger, and T < t1 < t2 < t3. After the flow rate stabilizes, the measurement period stabilizes at t3, where t1 and t2 are the measurement periods in the unstable state after the flow rate becomes smaller.
[0093] Next, the present invention takes an intelligent gas meter using dual Hall measurement as an example. Gas with a certain flow rate is supplied to the gas meter. During the measurement process of the gas meter, the power supply of the Hall sensor can be artificially disconnected so that it cannot output pulses, and the power supply of the Hall sensor can also be artificially reconnected after disconnection; at the same time, a magnet can be artificially placed near or removed from the Hall sensor to induce it to generate pulses; the meter can determine which Hall sensor is abnormal based on the pulse output conditions of the two Hall sensors, and report a measurement abnormality warning to the data center at the same time, and correct the flow rate value in the abnormal situation.
[0094] The following details the abnormal detection and flow rate repair processes through examples:
[0095] Gas with a certain flow rate is supplied to the gas meter, and the flow rate is stable, so that the moving mechanism of the meter rotates once every 10 seconds for more than 50 seconds, and the meter can obtain the measurement period value T = 10 seconds.
[0096] Continue to supply gas for more than 100 seconds so that the meter can record the output times of all pulses of the two Hall sensors within the most recent 10 measurement periods (the time span is 10*T = 100 seconds).
[0097] a: Continue to supply gas and artificially disconnect the power supply of the second Hall sensor so that it cannot output pulses for 25 seconds. During this period, since the pulse sequence output by the first Hall sensor - the second Hall sensor cannot be generated, it should be possible to see that the flow rate value displayed on the meter no longer increases, and 2 units of flow rate will be lost.
[0098] b: Then, artificially reconnect the power supply of the second Hall sensor. It can be seen that the flow rate value on the meter continues to increase within 5 - 10 seconds: The meter automatically increases by 1 unit first according to the preset program, and then will increase by 2 more units, making up for the 2 units of flow rate lost in step a, realizing the correction of abnormal flow rate.
[0099] c: Continue to supply gas, artificially disconnect the power supply of the second Hall sensor so that it cannot output pulses for 50 seconds. During this period, since the pulse sequence output by the first Hall sensor and the second Hall sensor cannot be generated in sequence, it should be seen that the flow value displayed by the meter no longer increases; after 50 seconds, the meter will find that the second Hall sensor has no pulse output for 5 consecutive pulse cycles. The meter will first make up 5 units of flow value, and then continue to increase the flow value according to the pulse cycle of the first Hall sensor: the flow value increases by 1 unit for each pulse cycle. At the same time, the meter reports the abnormal measurement information to the data center, indicating that the second Hall sensor is abnormal.
[0100] d: Artificially place a magnet near the second Hall sensor for 0.5 seconds and then remove it to induce it to generate pulses. After waiting for 10 seconds, place the magnet near the second Hall sensor again for 0.5 seconds and then remove it. Repeat this operation for more than 10 times. The meter will detect that the second Hall sensor continuously generates abnormal pulses and report the metering abnormality information to the data center, indicating that the second Hall sensor is abnormal.
[0101] e: Artificially place a magnet near the first Hall sensor and the second Hall sensor respectively, keep it for 0.5 seconds and then remove it, induce them to generate pulses, wait for 5-10 seconds, then place the magnet near the first Hall sensor and the second Hall sensor again, keep it for 0.5 seconds and then remove it, and repeat this operation for more than 10 times. It can be seen that the flow value displayed on the meter will increase on the basis of normal measurement. At the same time, the meter will detect that the first Hall sensor and the second Hall sensor have continuous abnormal pulses, and will report the measurement abnormality information to the data center, indicating that both the first Hall sensor and the second Hall sensor have abnormalities.
[0102] f: Manually disconnect the power of the first Hall sensor and the second Hall sensor for 20 seconds, and then connect the power of the two Hall sensors at the same time. It can be found that within 20 seconds of disconnecting the power, the flow value of the meter does not increase. After the power is restored, the flow value of the meter increases by 1 unit and then increases by 2 units.
[0103] The above only describes the basic principles and preferred embodiments of the present invention. Those skilled in the art may make many changes and improvements based on the above description, and these changes and improvements should fall within the protection scope of the present invention.
Claims
1. A method for detecting and correcting dual Hall measurement anomalies, characterized in that: Includes steps: After the length of the metering cycle is stable for m consecutive times, the metering cycle length T is obtained, where m≥3. The fluid drives the motion mechanism to move one circle, which is recorded as a metering cycle T. After each new metering cycle t, it is determined whether the difference between t and T exceeds the preset value. If so, wait for the new metering cycle t to stabilize first. After t is stable for m consecutive times, the metering cycle length T=t is updated. Otherwise, it is regarded as an occasional flow fluctuation and the metering cycle length T is maintained. Record the output time of all pulses of the two Hall sensors in the latest n metering cycles, where n≥3; determine whether any Hall sensor is abnormal according to the number of pulses, and if any Hall sensor is abnormal, execute the next step; wherein, determine whether any Hall sensor is abnormal according to the number of pulses, specifically, determine whether the number of pulses output by the two Hall sensors in n metering cycles is n: if so, both Hall sensors are normal; otherwise, at least one Hall sensor is abnormal; Analyze the output time of all pulses within the recorded n metering cycles to determine which Hall sensor is abnormal, and then further determine whether the flow value of the meter can be corrected. Suppose the two Hall sensors are the first Hall sensor and the second Hall sensor, specifically including: (1) Case 1: If the first Hall sensor outputs n pulses, and the second Hall sensor outputs less than n pulses, it is determined that the second Hall sensor is abnormal; According to the recorded pulse time, the position and number of the missing pulses of the second Hall sensor are obtained, and the flow value is supplemented; (2) Second situation: If the first Hall sensor outputs n pulses and the second Hall sensor outputs 0 pulses, it is determined that the second Hall sensor is abnormal; Continue to check whether the pulse period of the first Hall sensor is stable. There are two situations: First, if the first Hall sensor is stable for at least m consecutive pulse cycles, the flow value is first increased by m units, and then the flow value continues to be counted according to the pulse cycle of the first Hall sensor. The flow value is increased by 1 unit every time a pulse cycle passes; Second, if the pulse period of the first Hall sensor is unstable, it is determined that the first Hall sensor is also abnormal or the flow is unstable, and the pulses of the first Hall sensor are not counted; (3) The third situation: If the first Hall sensor outputs n pulses, and the number of pulses output by the second Hall sensor is greater than n, it is determined that the second Hall sensor is abnormal; Since the redundant pulses of the second Hall sensor and the normal pulses of the first Hall sensor do not form redundant first Hall sensor-second Hall sensor pulse sequences, the flow value of the meter does not increase extra, and there is no need to correct the flow value; (4) The fourth situation: If the number of pulses output by the first Hall sensor and the second Hall sensor is greater than n, there are two cases: First, the metering cycle remains unchanged, and redundant pulses appear in at least n pulse cycles, then it is determined that both Hall sensors are abnormal. Since both the first Hall sensor and the second Hall sensor are abnormal, the flow value cannot be corrected; Second, if the metering cycle becomes smaller and there are no extra pulses outside each pulse sequence, it is determined that both Hall sensors are normal; (5) Fifth situation: If the number of pulses output by the first Hall sensor and the second Hall sensor is less than n, there are two cases: First, if the metering cycle remains unchanged, it is determined that both Hall sensors are abnormal. According to the recorded pulse time, the position and number of the missing pulses of the two Hall sensors are known, and the flow value is supplemented; Second, if the metering cycle becomes longer, it is determined that both Hall sensors are normal.
2. The method for detecting and correcting dual Hall measurement anomalies according to claim 1, characterized in that: For civil meters with smaller flow rates, the preset difference between t and T is set to 10%; For commercial meters with large traffic, the preset difference between t and T is set to 20%.
3. The method for detecting and correcting dual Hall measurement anomalies according to claim 1, characterized in that: In the process of recording the output times of all pulses of the two Hall sensors in the latest n metering cycles, after each metering cycle T, the pulse output time of the earliest recorded metering cycle in the n metering cycles is discarded, and the pulse output time of the latest metering cycle is added.
