Sensor filtering, fault tolerance and correction method based on water electrolysis hydrogen production equipment

Through recursive + weight mean filtering and three-redundant sensor configuration, the problem of unstable sensor signals of water electrolytic hydrogen production equipment is solved, online abnormality recognition and linear drift correction are realized, and the stable and safe operation of the hydrogen production system is ensured.

CN119043397AInactive Publication Date: 2024-11-29HYDROGEN NEW ENERGY TECHNOLOGY (CHANGSHU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411186362.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-11-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The sensors of water electrolytic hydrogen production equipment are prone to instability in signal due to interference, moisture, alkali leakage and corrosion during long-term operation, and cannot accurately monitor the equipment status, affecting the hydrogen production effect and safety. The existing PLC control system cannot be online. Process sensor data with clutter, identify exceptions and perform redundant fault-tolerant output.

Method used

The filtering method of recursive + weight mean is used to process the sensor data, identify signal abnormalities and linear drifts, realize fault-tolerant output through the three redundant sensor configuration, and perform linear drift deviation correction online through algorithm programs.

Benefits of technology

It realizes smooth and stable output of sensor data, ensures uninterrupted, accurate and redundant monitoring points, avoids the drawbacks of regular sensor calibration and replacement, and improves the automatic precise control and safety of hydrogen production systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119043397A_ABST
    Figure CN119043397A_ABST
Patent Text Reader

Abstract

The invention discloses a sensor filtering, fault tolerance and correction method based on water electrolysis hydrogen production equipment, and belongs to the technical field of sensor measurement. Comprising the following steps: a signal filtering process, an anomaly judgment process, a redundant fault-tolerant output process and a linear drift out-of-tolerance online correction process. According to the sensor filtering, fault-tolerant and correction method based on the water electrolysis hydrogen production equipment, the problems of data filtering, anomaly judgment, triple-redundancy fault-tolerant output and linear drift correction of the sensor can be processed online through an algorithm program. The defects caused by regular calibration and regular replacement of the sensor through manual disassembly during shutdown are avoided, and meanwhile, uninterrupted, stable, accurate and redundancy of monitoring point signal acquisition can be ensured through the algorithm program function. Guarantee is provided for realizing automatic and accurate control and stable, reliable and safe operation of the hydrogen production system, and further guarantee is provided for unattended operation of equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of sensor measurement technology, and in particular to a sensor filtering, fault tolerance and correction method based on water electrolysis hydrogen production equipment. Background Art

[0002] Hydrogen is a clean energy source, and water electrolysis is an efficient and clean hydrogen production technology. The control systems of current water electrolysis hydrogen production equipment all use PLC to control the automatic operation of the entire equipment. In order to achieve automatic and precise control, the system needs to be equipped with sensors to monitor the current status of the equipment in real time and feed back to the PLC control system. During long-term operation, the sensors in the system may cause signal instability, linear drift, performance degradation or even failure due to interference, moisture, alkali leakage and corrosion. Once the sensor is abnormal, the system will not be able to accurately know the current status of the equipment, which may cause the entire system control to be unstable or inactive, thereby affecting the hydrogen production effect and safety of the system.

[0003] Therefore, how the PLC control system processes sensor data with noise online, identifies sensor anomalies, redundant fault-tolerant outputs when abnormalities occur, and corrects linear drift, and how to ensure the continuity, stability, accuracy, and redundancy of data collection at monitoring points are all issues that need to be solved urgently.

[0004] At present, the traditional electrolytic hydrogen production PLC control system does not have the function of processing the above sensor problems through online algorithm programs. The sensor signal filtering is generally processed by isolation modules. The performance, reliability and accuracy of the sensor are generally guaranteed by regular calibration and regular replacement. However, this method has the following disadvantages:

[0005] 1) Although the isolation module can process the signal and deal with the noise, it cannot identify the abnormality of the sensor.

[0006] 2) Regular calibration of the sensor requires a certain amount of work, and in most cases the calibration results show that the sensor is in good condition.

[0007] 3) Sometimes the sensor needs to be removed for calibration and then installed again. During the removal and installation process, the sensor may be damaged or the sensor measurement data may be incorrect due to incorrect installation.

[0008] 4) Regular replacement is expensive, and sometimes even sensors in good condition are replaced.

[0009] 5) Sensor failure cannot be discovered in time and problems can only be discovered during regular calibration or replacement. Summary of the invention

[0010] The purpose of the present invention is to provide a method for filtering, fault tolerance and correction of sensors based on water electrolysis hydrogen production equipment, which can solve the problems of sensor noise data, abnormal identification, data redundant fault tolerance output and drift deviation correction that cannot be handled by the existing PLC control system through an algorithm program. The traditional method of regular calibration and regular replacement is too useless and cannot detect sensor failures in time.

[0011] To achieve the above object, the present invention provides a method for filtering, fault tolerance and correction of sensors of water electrolysis hydrogen production equipment, comprising the following process steps:

[0012] S1, signal filtering process, the PLC control system obtains the sensor data, uses recursion + weighted mean to filter these data and then outputs them. The purpose is to remove the sensor data with noise and make the output data smooth and stable, so as to prevent the control system from malfunctioning due to data fluctuations.

[0013] S2, abnormal judgment process, by comparing the sensor filtered value with the allowed value, identify the abnormal sensor and the abnormal type, match the corresponding redundant fault-tolerant output mode, and ensure uninterrupted, accurate and effective monitoring of the physical quantity of the monitoring point. The sensor abnormality is divided into two categories, the first category is the abnormal acquisition signal, and the second category is the linear drift tolerance.

[0014] S3, redundant fault-tolerant output process. The same monitoring point is equipped with three redundant sensors as a redundant configuration. The control system selects the corresponding redundant fault-tolerant output mode according to the abnormal situation of the sensor. If it is judged that the linear drift is out of tolerance in step S2, the system prompts whether to activate the linear drift out of tolerance correction process. If yes, enter step S4 to perform the linear drift deviation online correction process.

[0015] S4, the linear drift deviation online correction process, the control system performs comparative analysis through the algorithm program online, calculates the best function match and makes corrections.

[0016] Preferably, in process step S1, the specific steps of filtering the data collected by the sensor using the recursive weighted mean data processing method of the PLC control system are as follows:

[0017] Taking the first sensor as an example, the PLC control system obtains the sensor data AI(t) every 0.1S, recursively puts it into the array array(1-5) in a first-in-first-out manner, and then multiplies the value in the array address by the corresponding weight value to obtain the corresponding filtered value AO(t);

[0018] AI(t) refers to the sensor data collected at the current moment; AO(t) is the filtered value after recursive weighted mean data processing at the current moment; array array(1-5) is the memory address for storing the sensor data, which consists of five consecutive addresses: array(1), array(2), array(3), array(4), and array(5).

[0019] Preferably, in process step S2, the specific steps of the judgment process of the first type of abnormality, the abnormality of the collected signal are as follows:

[0020] The PLC control system compares the current data AI(t) with the filtered value AO(t-1) at the previous moment, such as l AI(t)-AO(t-1)|>allowable fluctuation value A ▲ , the abnormal cumulative value n will be accumulated by 1. When AI(t)-AO(t-1)l is greater than the allowable fluctuation value A for 20 consecutive moments ▲ , when the value of n is continuously accumulated to 20, the PLC control system will determine that the sensor acquisition signal is abnormal and match the corresponding redundant fault-tolerant output in the S3 triple redundant fault-tolerant output process step;

[0021] Where AI(t) refers to the sensor data acquired at the current moment;

[0022] AO(t) is the filtered value after recursive weighted mean data processing at the current moment;

[0023] AO(t-1) is the filtered value after recursive weighted mean data processing at the previous moment;

[0024] Allowable fluctuation value A ▲ The value of is an empirical value, defined as 1.5 times of AO(t).

[0025] Preferably, in process step S2, the specific steps of the judgment process of the second type of abnormality, linear drift out of tolerance are as follows:

[0026] The PLC control system locates the sensor that produces linear drift by comparing the filtered values ​​between them;

[0027] If the absolute difference between the filtered value of one sensor and the filtered values ​​of the other two sensors continues to be greater than the allowable deviation value P within the specified time T1 ▲ , it is determined that the sensor has linear drift out of tolerance and needs to be corrected;

[0028] The allowable deviation value P ▲ The value is an empirical value, which is defined as 1.5 times the accuracy of the sensor itself.

[0029] Preferably, in process step S3, the triple redundant fault-tolerant output is the PLC control system data acquired from three redundant sensors at the same monitoring point and the same installation position, wherein the three redundant sensors are three relatively independent sensors of the same model, and the monitoring points of the three relatively independent sensors of the same model are the same physical quantity.

[0030] Preferably, in process step S3, the specific steps of redundant fault-tolerant output in different situations are as follows:

[0031] If there is no abnormality in the three redundant sensor control systems at the same monitoring point, the redundant fault-tolerant output value of the monitoring point = (AO(t)+BO(t)+CO(t)) / 3;

[0032] If the first sensor at the same monitoring point is abnormal, the redundant fault-tolerant output value of the monitoring point = (BO(t)+CO(t)) / 2;

[0033] If the second sensor at the same monitoring point is abnormal, the redundant fault-tolerant output value of the monitoring point = (AO(t)+CO(t)) / 2;

[0034] If the third sensor at the same monitoring point is abnormal, the redundant fault-tolerant output value of the monitoring point = (AO(t)+BO(t)) / 2;

[0035] If at least two sensors at the same monitoring point are abnormal, the redundant fault-tolerant output value of the monitoring point will be 0, and the system will immediately shut down;

[0036] Where AO(t) is the filtered value of the first sensor at the current moment after recursive weighted mean data processing;

[0037] BO(t) is the filtered value of the second sensor at the current moment after recursive weighted mean data processing;

[0038] CO(t) is the filtered value of the third sensor at the current moment after recursive weighted mean data processing.

[0039] Preferably, in step S4, the specific steps of the linear drift excess online correction process are as follows:

[0040] When a sensor has a linear drift that exceeds the tolerance, the PLC control system will use the filtered value of the normal sensor as the reference value J(t) and the filtered value of the abnormal sensor as the abnormal value F(t). A set of data is obtained every 1 minute, and at least 10 sets are collected, n = 10;

[0041] The collected baseline values ​​and outliers are refitted with a linear function through a least squares algorithm, and the best function match for the data is found by minimizing the sum of squares of the errors between the outliers and the baseline values, and the optimal value of the objective function is obtained for correction.

[0042] Preferably, the steps of performing correction by the least squares algorithm are as follows:

[0043] Substitute the collected abnormal value and reference value data into the least squares algorithm derivation formula to calculate the k value and b value of the most fitting reference value;

[0044] The fitting straight line function is: y = kx + b

[0045] The algorithm derivation formula of the least squares method is as follows

[0046]

[0047] Among them, yi is the dependent variable, xi is the independent variable, k and b are the coefficients of the fitting curve, and the least squares method is to determine the optimal k and b values ​​by minimizing the square of the error to determine the best fitting line;

[0048] Substitute the calculated optimized k value and b value into the fitting straight line formula y=kx+b of the abnormal sensor, and recalibrate the collected data of the abnormal sensor.

[0049] Therefore, the present invention adopts a sensor filtering, fault tolerance and correction method based on water electrolysis hydrogen production equipment with the above structure, which has the following beneficial effects:

[0050] The present invention can process the data filtering, abnormality determination, triple-redundant fault-tolerant output, and linear drift correction problems of the sensor online through the algorithm program. It avoids the disadvantages of regular calibration and replacement of sensors by manual disassembly during shutdown. At the same time, the algorithm function of the program can ensure the uninterrupted, stable, accurate and redundant acquisition of monitoring point signals. It provides guarantee for the automatic and precise control, stable, reliable and safe operation of the hydrogen production system, and further guarantees the unattended operation of the equipment.

[0051] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a schematic diagram of the overall process of a method for filtering, fault tolerance and correction of sensors of a water electrolysis hydrogen production equipment according to the present invention;

[0053] Figure 2 It is a schematic diagram of a signal filtering process based on a sensor filtering, fault tolerance and correction method of a water electrolysis hydrogen production equipment according to the present invention;

[0054] Figure 3 It is a schematic diagram of a linear drift out-of-tolerance determination process based on a sensor filtering, fault tolerance and correction method of a water electrolysis hydrogen production equipment according to the present invention;

[0055] Figure 4 It is a schematic diagram of a triple redundant output process of a sensor filtering, fault tolerance and correction method of a water electrolysis hydrogen production equipment according to the present invention;

[0056] Figure 5 It is a schematic diagram of a linear drift out-of-tolerance correction process based on a sensor filtering, fault tolerance and correction method of a water electrolysis hydrogen production equipment according to the present invention;

[0057] Figure 6 A data processing schematic diagram of a recursive weighted mean value based on a sensor filtering, fault tolerance and correction method of a water electrolysis hydrogen production equipment according to the present invention;

[0058] Figure 7 It is a schematic diagram of a least squares fitting curve based on a sensor filtering, fault tolerance and correction method of a water electrolysis hydrogen production equipment according to the present invention. DETAILED DESCRIPTION

[0059] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.

[0060] Unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0061] Example

[0062] like Figure 1 As shown, the present invention provides a method for filtering, fault tolerance and correction of sensors of water electrolysis hydrogen production equipment, comprising the following steps:

[0063] S1, signal filtering process, the PLC control system obtains the sensor data, uses recursion + weighted mean to filter the tax bureau and then outputs it;

[0064] S2, abnormal judgment process, by comparing the sensor filtered value with the allowable value, identify the abnormal sensor and the abnormal type, and match the corresponding redundant fault-tolerant output mode. The sensor abnormality is divided into two categories, the first category is the acquisition signal abnormality, and the second category is the linear drift out of tolerance;

[0065] S3, redundant fault-tolerant output process, the same monitoring point is equipped with three redundant sensors as a redundant configuration, the control system selects the corresponding redundant fault-tolerant output mode according to the abnormal situation of the sensor, if the linear drift is judged to be out of tolerance in the process step S2, the system prompts whether to activate the linear drift out of tolerance correction process, if yes, then enter the process step S4, and perform the linear drift out of tolerance online correction process;

[0066] S4, the linear drift deviation online correction process, the control system performs comparative analysis through the algorithm program online, calculates the best function match and makes corrections.

[0067] S1, signal filtering process, combined Figure 2 , the S1 signal filtering process is further explained, taking the first sensor as an example.

[0068] First, in step S101 , the filtering function is triggered to start.

[0069] Then in step S102, the data collected by the sensor is transmitted to the PLC control system in the form of electrical signals.

[0070] Then in step S103, combined with Figure 6 The data processing method of recursive weighted mean is further explained. The PLC control system obtains the sensor data AI(t) every 0.1S, and recursively puts the latest data AI(t) into the array(1-5) address array(1) in a first-in-first-out manner. The original value in the array(1) address is moved back one place and put into the array(2) address. The original value in the array(2) address is moved back one place and put into the array(3) address. The original value in the array(3) address is moved back one place and put into the array(4). The original value in the array(4) address is moved back one place and put into the array(5). The original value overflow in the array(5) address is removed, and the values ​​are recursively put in order. Then the values ​​in the array addresses array(1) to array(5) are multiplied by the corresponding weight values ​​to obtain the corresponding filtered value AO(t).

[0071] The array array(1-5) is the memory address for storing the sensor collected values, and is composed of five consecutive addresses: array(1), array(2), array(3), array(4), and array(5).

[0072] In the subsequent step S104, because the monitored physical values ​​such as temperature, liquid level, pressure, flow rate, etc. in the electrolytic hydrogen production system will not continuously change with large values ​​in a very short time, the PLC control system compares the data AI(t) obtained at the current moment with the filtered value AO(t-1) at the previous moment.

[0073] If AI(t)-AO(t-1)l<allowable fluctuation value A ▲ , execute steps S105 and S106. The abnormal cumulative value n is cleared, the sensor is normal, and the filtered value AO(t) is output normally.

[0074] If l AI(t)-AO(t-1)|≥ allowed fluctuation value A ▲ , execute step S107, the system replaces the current collected value AI(t) with the filtered value AO(t-1) of the previous moment and puts it into the array array(1), and adds 1 to the abnormal cumulative value n to calculate the new filtered value AO(t).

[0075] At the next moment (0.1S later), if l AI(t)-AO(t-1)| is still ≥ the allowed fluctuation value A ▲ , then execute step S107. Repeat in sequence, if the value of AI(t)-AO(t-1)l exceeds the allowable fluctuation value A for 20 consecutive moments ▲ , when the abnormal cumulative value n accumulates to 20 continuously, steps S108 and S109 are executed, the PLC control system determines that the sensor acquisition signal is abnormal, the filter output value AO(t) is 0, and enters the S3 triple redundant fault-tolerant output process.

[0076] S2, abnormal judgment process, the PLC control system filters the acquired sensor data and compares it with the allowable value to identify the abnormal sensor and abnormal type, and then matches the corresponding redundant fault-tolerant output mode to ensure uninterrupted, accurate and effective monitoring of the monitoring point.

[0077] Sensor anomalies can be divided into two categories: the first category is acquisition signal anomalies, and the second category is linear drift excess anomalies.

[0078] Category 1: The acquisition signal is abnormal, combined with Figure 2 , determined through steps S104, S105, S107, and S108 in the S1 signal filtering process.

[0079] The second category: the linear drift deviation exceeds the tolerance. For three sensors of the same type installed at the same monitoring point and the same installation position, the PLC control system compares the filtered values ​​between them to locate the sensor that produces the linear drift. Figure 3 Further explanation will be given.

[0080] First, in step S201, the sensor linear drift out-of-tolerance determination process is activated.

[0081] Subsequently, in step S202, the PLC control system obtains the filtered values ​​of the three redundant sensors at the same monitoring point and the same installation position. Since the three redundant sensors at the same monitoring point have the same model type and installation position, their filtered values ​​are independent and basically consistent with each other, and are all within the allowable deviation value P. ▲ within the range.

[0082] There are three possibilities for linear drift of three redundant sensors:

[0083] In step S203, only one of the three redundant sensors has a linear drift error.

[0084] Step S206: At least two of the three redundant sensors have linear drift exceeding the tolerance.

[0085] In step S208, no linear drift exceeds the tolerance in the three redundant sensors.

[0086] The three linear drift out-of-tolerance possibilities of steps S203, S206, and S208 are further described:

[0087] In step S203, taking the first sensor as an example, if the triple redundant sensors continuously satisfy lAO(t)-BO(t)|>P within the specified time T1, ▲ ,|AO(t)-CO(t)|>P ▲ , l BO(t)-CO(t)|<P, then the process proceeds to step S204 to determine if the linear drift of the first sensor exceeds the tolerance, and then step S205 to select whether to activate the linear drift excess tolerance correction process S4.

[0088] Next, in step S206, the deviation value between the three redundant sensors continues to exceed the allowable deviation value P within the specified time T1. ▲ The PLC control system can determine that at least two sensors have linear drift error. Step S207 is executed to shut down the interlocking system. Then, step S210 is performed to select whether to activate the S4 linear drift error correction process.

[0089] Finally, in step S208, the deviation values ​​between the three redundant sensors are all kept within the allowable deviation value P ▲ Within the range, the sensor output is normal.

[0090] S3, triple redundant fault-tolerant output process, data is obtained from three sensors of the same type at the same monitoring point and the same installation position. It should be pointed out here that the sensors applicable to the present invention must be for the measurement of the same physical quantity, and there are more than three relatively independent sensors of the same model, that is, for the same physical quantity, the data measured by the three sensors of the same model are relatively independent and consistent.

[0091] The PLC control system selects the corresponding redundant fault-tolerant output mode according to the abnormal situation identified in the S2 abnormality identification process to ensure uninterrupted, accurate and effective monitoring of the monitoring point.

[0092] Combination Figure 4 To further explain:

[0093] First, in step S301, the triple-redundant fault-tolerant output process is activated.

[0094] Then, in step S302, the number of abnormal sensors identified in the S2 process is obtained, and a corresponding redundant output mode is selected.

[0095] For steps S303 and S306, if the three redundant sensors are normal, the redundant fault-tolerant output value of the monitoring point is the average value of the filtered values ​​of the three redundant sensors, that is, OUT = (AO(t) + BO(t) + CO(t)) / 3.

[0096] For steps S304 and S307, if one of the three redundant sensors is abnormal, the redundant fault-tolerant output value of the monitoring point is the average of the filtered values ​​of the two sensors without abnormalities. Assuming that the first sensor is abnormal, the redundant fault-tolerant output value OUT = BO(t) + CO(t)) / 2.

[0097] In steps S305 and S308, if at least two of the three redundant sensors are abnormal, the redundant fault-tolerant output value of the monitoring point is 0, and the interlocking system is shut down.

[0098] S4, Linear drift online correction process, because the model type and installation position of the three redundant sensors at the same monitoring point are consistent, the physical values ​​they monitor are relatively independent and consistent. When a sensor in the three redundant sensors has a linear drift error, the PLC control system will use the filtered value of the normal sensor as the reference value J(t), and the filtered value of the abnormal sensor as the abnormal value F(t), and obtain a set of data every 1 minute, and collect at least 10 sets (n=10). The collected reference value and abnormal value are refitted with a linear function through the least squares algorithm program for correction.

[0099] Combination Figure 5 , further explain the specific implementation method:

[0100] First, in step S401, when the sensor drift deviation exceeds the tolerance, the PLC control system activates the linear drift deviation correction activation process. Then, in step S402, the number of sensors exceeding the tolerance at the same monitoring point is obtained.

[0101] If the number of abnormal sensors = 1, then execute steps S403, S404, S405, S406, activate the function of automatically obtaining the reference value J(t) and the abnormal value F(t), and obtain the filtered values ​​of the three redundant sensors at the abnormal monitoring point. Assuming that the linear drift of the first sensor exceeds the tolerance, and the second and third sensors are normal, the PLC control system will use the average of the filtered values ​​of the second sensor and the filtered values ​​of the third sensor as the reference value J(t), that is, J(t) = (BO(t) + CO(t)) / 2, and the filtered value of the first sensor as the abnormal value F(t), F(t) = AO(t), and the system automatically obtains 1 set of data every 1 minute, and collects at least 10 sets (n = 10). When n=10, step S411 is executed, and the system substitutes the obtained 10 sets of reference values ​​J(t) into yi and the abnormal value F(t) into xi, and determines the optimal k value and b value by minimizing the square of the error through the least squares method, and substitutes the calculated b and k values ​​back into the fitting straight line formula y=kx+b of the first sensor to determine the best fitting straight line and recalibrate the collected data of the first sensor.

[0102] If the number of abnormal sensors is ≥ 2, the system will determine that the three redundant sensors all have linear drift errors. Before performing the correction, a mechanical measuring meter with higher accuracy than the three redundant sensors must be installed on the spare interface of the monitoring point. The reading of the mechanical measuring meter is used as the reference value, and then steps S407, S408, S409, and S410 are executed. First, the manual recording function is activated, and a group of filtered values ​​of the three redundant sensors are manually recorded every 1 minute as abnormal values, that is, F1(t) = AO(t), F2(t) = BO(t), and F3(t) = CO(t). At the same time, the reading of the mechanical measuring meter is recorded as the reference value J(t), and then the recorded data is manually entered into the system. After 10 sets of data are entered, when n=10, step S411 is executed. The system substitutes the entered 10 sets of reference values ​​J(t) into yi. Taking the first sensor as an example, the abnormal value F1(t) is substituted into xi. The optimal k and b values ​​are determined by minimizing the square error through the least square method. The calculated b and k values ​​are substituted into the fitting straight line formula y=kx+b of the first sensor to determine the best fitting straight line and recalibrate the collected data of the first sensor. The second and third sensors are also calibrated in this way.

[0103] Finally combined Figure 7, further explaining the algorithm derivation formula of the least squares method in step S411. The least squares method is a data fitting method, which finds the best function match for the data by minimizing the sum of squares of errors between the observed values ​​and the theoretical model values, obtains the optimal value of the objective function, and solves the data fitting and linear regression problems.

[0104] Substitute the 10 sets of benchmark values ​​J(t) collected into Yi, substitute the outlier values ​​F(t) into Xi, calculate the k value and b value, and use the least squares method to determine the optimal k and b values ​​by minimizing the sum of squares of the errors between the outlier values ​​and the benchmark values, thereby determining the best fitting straight line.

[0105] The fitting straight line function is: y = kx + b

[0106] The slope k of the fitted line is derived as follows:

[0107]

[0108] Use the method of undetermined coefficients to find the intercept b:

[0109]

[0110] Among them, yi is the dependent variable, xi is the independent variable, k and b are the coefficients of the fitting curve, n is the number of data sets, i = (1 ~ n), and Σ is the summation symbol.

[0111] Finally, substitute the calculated optimized k value and b value into the fitting straight line formula y=kx+b of the abnormal sensor, and recalibrate the collected data of the abnormal sensor. The filtered value of the abnormal sensor after recalibration will be close to the filtered values ​​of the other two normal sensors, which means that the drift correction is successful, the abnormal alarm is lifted, and the system returns to normal.

[0112] Therefore, the present invention adopts the above-mentioned method for filtering, fault tolerance and correction of sensors based on water electrolysis hydrogen production equipment, which can process the data filtering, abnormal judgment, three-redundant fault-tolerant output, and linear drift error correction problems of sensors online through algorithm programs. It avoids the disadvantages of regular calibration and replacement of sensors by manual disassembly during shutdown. At the same time, the algorithm program function can ensure the uninterrupted, stable, accurate and redundant acquisition of monitoring point signals. It provides guarantee for the automatic precise control, stable, reliable and safe operation of the hydrogen production system, and provides further guarantee for unattended operation of the equipment.

[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for filtering, fault tolerance and correction of sensors for water electrolysis hydrogen production equipment. It is characterized in that The process steps include: S1, signal filtering process, the PLC control system obtains the sensor data, uses recursion + weighted mean to filter the data and then outputs it; S2, abnormal judgment process, by comparing the sensor filtered value with the allowable value, identify the abnormal sensor and the abnormal type, and match the corresponding redundant fault-tolerant output mode. The sensor abnormality is divided into two categories, the first category is the acquisition signal abnormality, and the second category is the linear drift out of tolerance; S3, redundant fault-tolerant output process, the same monitoring point is equipped with three sensors as a redundant configuration, the control system selects the corresponding redundant fault-tolerant output mode according to the abnormal situation of the sensor, if the linear drift is judged to be out of tolerance in step S2, the system prompts whether to activate the linear drift out of tolerance correction process, if yes, then enter step S4, and perform the linear drift out of tolerance correction process; S4, linear drift error correction process, the control system performs comparative analysis online through an algorithm program, calculates the best function match and makes corrections.

2. According to claim 1, a method for filtering, fault tolerance and correction of sensors for water electrolysis hydrogen production equipment, Features: In step S1, the specific steps of filtering the data collected by the sensor using the recursive weighted mean data processing method of the PLC control system are as follows: The PLC control system obtains the sensor data AI(t) every 0.1S, and recursively puts it into the array array(1-5) in a first-in-first-out manner, and then multiplies the value in the array address by the corresponding weight value to obtain the corresponding filtered value AO(t); AI(t) refers to the sensor data collected at the current moment; AO(t) is the filtered value after recursive weighted mean data processing at the current moment; array array(1-5) is the memory address for storing the sensor data, which consists of five consecutive addresses: array(1), array(2), array(3), array(4), and array(5).

3. According to claim 1, a method for filtering, fault tolerance and correction of sensors for water electrolysis hydrogen production equipment, Features: In step S2, the specific steps of the judgment process of the first type of abnormality, the abnormality of the collected signal are as follows: The PLC control system compares the current data AI(t) with the filtered value AO(t-1) at the previous moment, such as |AI(t)-AO(t-1)|>allowable fluctuation value A ▲ , the abnormal cumulative value n will be accumulated by 1. When lAI(t)-AO(t-1)l is continuously greater than the allowable fluctuation value A for 20 consecutive moments ▲ , when the value of n is continuously accumulated to 20, the PLC control system will determine that the sensor acquisition signal is abnormal and match the corresponding redundant fault-tolerant output in the S3 triple redundant fault-tolerant output process; Where AI(t) refers to the sensor data acquired at the current moment; AO(t) is the filtered value after recursive weighted mean data processing at the current moment; AO(t-1) is the filtered value after recursive weighted mean data processing at the previous moment; Allowable fluctuation value A ▲ The value of is an empirical value, defined as 1.5 times of AO(t).

4. According to claim 1, a method for filtering, fault tolerance and correction of sensors for hydrogen production equipment based on water electrolysis, Features: In step S2, the specific steps of the second type of abnormality, the judgment process of linear drift out of tolerance are as follows: The PLC control system locates the sensor that produces linear drift by comparing the filtered values ​​between them; If the absolute difference between the filtered value of one sensor and the filtered values ​​of the other two sensors continues to be greater than the allowable deviation value P within the specified time T1 ▲ , it is determined that the linear drift of the sensor is out of tolerance and needs to be corrected; The allowable deviation value P ▲ The value is an empirical value, which is defined as 1.5 times the accuracy of the sensor itself.

5. According to claim 1, a method for filtering, fault tolerance and correction of sensors for water electrolysis hydrogen production equipment, Features: In step S3, triple redundant fault tolerance is that the PLC control system data is acquired from three redundant sensors at the same monitoring point and the same installation position, wherein the three redundant sensors are three relatively independent sensors of the same model, and the monitoring points of the three relatively independent sensors of the same model are the same physical quantity.

6. According to claim 1, a method for filtering, fault tolerance and correction of sensors for water electrolysis hydrogen production equipment, Features: In step S3, the specific steps of redundant fault-tolerant output in different situations are as follows: If there is no abnormality in the three redundant sensor control systems at the same monitoring point, the redundant fault-tolerant output value of the monitoring point = (AO(t)+BO(t)+CO(t)) / 3; If the first sensor at the same monitoring point is abnormal, the redundant fault-tolerant output value of the monitoring point = (BO(t)+CO(t)) / 2; If the second sensor at the same monitoring point is abnormal, the redundant fault-tolerant output value of the monitoring point = (AO(t)+CO(t)) / 2; If the third sensor at the same monitoring point is abnormal, the redundant fault-tolerant output value of the monitoring point = (AO(t)+BO(t)) / 2; If at least two sensors at the same monitoring point are abnormal, the redundant fault-tolerant output value of the monitoring point will be 0, and the system will immediately shut down; Where AO(t) is the filtered value of the first sensor at the current moment after recursive weighted mean data processing; BO(t) is the filtered value of the second sensor at the current moment after recursive weighted mean data processing; CO(t) is the filtered value of the third sensor at the current moment after recursive weighted mean data processing.

7. According to claim 1, a method for filtering, fault tolerance and correction of sensors for water electrolysis hydrogen production equipment, Features: In step S4, the specific steps of the linear drift deviation online correction process are as follows: When a sensor has a linear drift that exceeds the tolerance, the PLC control system will use the filtered value of the normal sensor as the reference value J(t) and the filtered value of the abnormal sensor as the abnormal value F(t). A set of data is obtained every 1 minute, and at least 10 sets are collected, n = 10; The collected baseline values ​​and outliers are refitted with a linear function through a least squares algorithm, and the best function match for the data is found by minimizing the sum of squared errors between the baseline values ​​and the outliers, and the optimal value of the objective function is obtained for correction.

8. A method for filtering, fault tolerance and correction of sensors for water electrolysis hydrogen production equipment according to claim 7, Features: The steps for correction using the least squares algorithm are as follows: Substitute the baseline value and abnormal value data collected at different times into the least squares algorithm derivation formula to calculate the k value and b value of the most fitting baseline value; The fitting straight line function is: y = kx + b The algorithm derivation formula of the least squares method is as follows Among them, yi is the dependent variable, xi is the independent variable, k and b are the coefficients of the fitting curve, and the least squares method is to determine the optimal k and b values ​​by minimizing the square of the error to determine the best fitting line; Substitute the calculated optimized k value and b value into the fitting straight line formula y=kx+b of the abnormal sensor, and recalibrate the collected data of the abnormal sensor.