A method and system for assisting in the calibration of downhole sensors
By analyzing the data from the main sensor and auxiliary sensor in real time and adjusting the dynamic threshold, the problem of auxiliary sensor drift being difficult to detect was solved, thus improving the accuracy and sensitivity of sensor calibration.
Patent Information
- Application Number
- CN202511443089.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2045-10-10
AI Technical Summary
In existing technologies, the early warning threshold of auxiliary sensors is relatively weak, making it difficult to detect small-amplitude drifts immediately, which in turn affects the accuracy of the calibration results of the main sensor data.
By collecting data from the main sensor and auxiliary sensor in real time, performing Z-score standardization mapping to a unified space, analyzing deviation trends using a rolling window, and dynamically adjusting the alarm threshold of the auxiliary sensor, real-time calibration is achieved.
The alarm sensitivity of the auxiliary sensor was improved, enabling early detection and calibration of auxiliary sensor drift, and improving the accuracy of the main sensor data calibration results.
Smart Images

Figure CN120927052B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of sensor calibration, and particularly relates to an auxiliary underground sensor calibration method and system. BACKGROUND
[0002] The sensors in the coal mine underground are divided into main sensors and auxiliary sensors. The main sensors refer to a type of sensors for monitoring key parameters directly threatening the safety of the coal mine underground, including carbon monoxide sensors, gas sensors and the like. The auxiliary sensors refer to a type of special sensor equipment for supplementarily monitoring the complex environment, equipment state, safety risk or auxiliary production optimization in the underground, including dust sensors, temperature sensors, oxygen sensors and the like.
[0003] When calibrating the data collected by the sensors in the coal mine underground, a multi-sensor linkage calibration mode is usually adopted, that is, the data collected by the auxiliary sensors are used to algorithmically calibrate the data collected by the main sensors. However, at present, compared with the main sensors, the auxiliary sensors have weaker early warning criticality (not sensitive to small fluctuations in data), so that the small amplitude drift of the auxiliary sensors is not easy to be immediately discovered, and thus errors occur in the calibration results when the auxiliary sensor data directly calibrate the main sensor data. SUMMARY
[0004] To solve the above technical problems, the application realizes the following technical scheme:
[0005] In a first aspect, an auxiliary underground sensor calibration method is provided, comprising the following steps: S1: real-time collection of a plurality of main sensor data in a first historical period to establish a first data sequence; real-time collection of a plurality of auxiliary sensor data in the first historical period to establish a second data sequence; S2: mapping of the first data sequence and the second data sequence to a unified standardized space through Z-score standardization; S3: in the standardized space, obtaining a first data deviation of the first data sequence and the second data sequence at each sampling time in the first historical period to establish a third data sequence; S4: using a first rolling window to extract a first data deviation mean from the third data sequence, and storing the first data deviation mean in a fourth data sequence; S5: using a second rolling window to determine whether there are a plurality of continuous first data deviation means in the fourth data sequence that are greater than or equal to a corresponding drift judgment threshold; if yes, executing S6, and if no, returning to S1; S6: modifying a historical alarm threshold of the auxiliary sensor according to a current deviation support degree and a current environmental noise support degree to obtain a current alarm threshold of the auxiliary sensor; S7: judging whether the auxiliary sensor data at the current time exceeds the current alarm threshold; if yes, real-time calibration of the auxiliary sensor data; otherwise, returning to S1.
[0006] In a second aspect, an auxiliary downhole sensor calibration system is provided, comprising:
[0007] A first data acquisition module is configured to acquire a plurality of main sensor data in a first historical period in real time, and establish a first data sequence.
[0008] A second data acquisition module is configured to acquire a plurality of auxiliary sensor data in the first historical period in real time, and establish a second data sequence.
[0009] A first data processing module is configured to map the first data sequence and the second data sequence to a unified standardized space through Z-score standardization.
[0010] A second data processing module is configured to obtain a first data deviation between the first data sequence and the second data sequence at each sampling time in the first historical period in the standardized space, and establish a third data sequence.
[0011] A third data processing module is configured to extract a first data deviation mean from the third data sequence using a first rolling window, and store the first data deviation mean in a fourth data sequence.
[0012] A first analysis control module is configured to determine whether there are a plurality of first data deviation means greater than or equal to a corresponding drift determination threshold in the fourth data sequence using a second rolling window; if so, control a device calibration module to work; otherwise, control the first data acquisition module, the second data acquisition module, the first data processing module, the second data processing module, and the third data processing module to work in turn.
[0013] The device calibration module is configured to calibrate the auxiliary sensor data in real time.
[0014] In a third aspect, a computer device is provided, comprising a memory, a processor, and a transceiver connected in sequence, wherein the memory is configured to store a computer program, the transceiver is configured to transmit and receive data, and the processor is configured to read the computer program and execute the auxiliary downhole sensor calibration method according to the first aspect.
[0015] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores instructions, when the instructions are executed on a computer, the auxiliary downhole sensor calibration method according to the first aspect is executed.
[0016] In a fifth aspect, a computer program product comprising instructions is provided, when the instructions are executed on a computer, the computer is caused to execute the auxiliary downhole sensor calibration method according to the first aspect; the computer comprises a general-purpose computer, a special-purpose computer, or a programmable device.
[0017] Compared with the prior art, the application has the advantages and beneficial effects that the high sensitivity of the main sensor reversely improves the alarm sensitivity of the auxiliary sensor, and the auxiliary sensor data is calibrated in real time based on the corrected alarm sensitivity. Specifically, by analyzing the deviation trend of the auxiliary sensor data compared with the main sensor data in real time, the drift of the auxiliary sensor is monitored in real time. When the auxiliary sensor drifts, the alarm threshold of the auxiliary sensor is dynamically corrected, the current data fluctuation of the auxiliary sensor is analyzed based on the corrected alarm threshold, and the auxiliary sensor data is calibrated in real time based on the data fluctuation analysis result, so as to realize early detection and calibration of the auxiliary sensor drift, and further improve the accuracy of the calibration result of the main sensor data. BRIEF DESCRIPTION OF DRAWINGS
[0018] The accompanying drawings, which are included to provide a further understanding of the embodiments of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the principles of the application. In the drawings:
[0019] Figure 1 A flowchart of an auxiliary downhole sensor calibration method provided for the embodiment 1 of the application. DETAILED DESCRIPTION
[0020] In order to make the objects, technical schemes and advantages of the application clearer, further, the application is described in detail below in combination with embodiments, the illustrative embodiments of the application and the description thereof are only used to explain the application, and do not limit the application. The embodiments described below are part of the embodiments of the application, but not all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the application.
[0021] In the following description, a large number of specific details are set forth in order to provide a thorough understanding of the application. However, it is apparent to those skilled in the art that the application can be practiced without these specific details. In other embodiments, well-known structures, materials or methods are not specifically described in order to avoid obscuring the application. The materials, instruments and reagents used in the following embodiments, unless otherwise specified, can be obtained from commercial channels. The technical means used in the embodiments, unless otherwise specified, are conventional means known to those skilled in the art.
[0022] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0023] Example 1: A method for calibrating auxiliary downhole sensors is provided, including... Figure 1 The following steps are shown:
[0024] Step 1: Collect data from multiple main sensors in real time during the first historical period to establish a first data sequence; collect data from multiple auxiliary sensors in real time during the first historical period to establish a second data sequence.
[0025] The first historical time period mentioned in this step refers to the current data acquisition time. t temp A specific period of time prior (e.g., the past week).
[0026] The first data sequence established is as follows (1). Among them, t Indicates the first historical period. S m ( t ) represents the first data sequence. i For time variables, t i Indicates the first historical period i Each sampling time, s m ( t i ) indicates in t i The main sensor data is collected continuously. s m ( t n ) indicates in t n Data collected from the main sensor at all times.
[0027] The established second data sequence is as follows (2). Among them, S a ( t ) represents the second data sequence. j For time variables, t j Indicates the first in the second historical period j Each sampling time, s a ( tj ) represents the auxiliary sensor data collected at t j the moment, s a t m ) represents the auxiliary sensor data collected at t m the moment.
[0028] It should be noted that this step is to realize the real-time collection of the main sensor data and the auxiliary sensor data, so the start time and the end time of the first historical period (the past 1 week) also change in real time with the advancement of the current data collection time t temp . It is a dynamic process. The method described in this embodiment is based on the current data collection time t temp . It should be understood that: 1. The current data collection time t temp described in this embodiment can represent the time when the method is first performed; 2. There are also cases where each "current data collection time t temp " before the current data collection time t temp described in this embodiment has performed the auxiliary downhole sensor calibration method described in this embodiment.
[0029] Step 2: Use a moving average or Kalman filter to remove random noise in the first data sequence and the second data sequence.
[0030] Step 3: Map the first data sequence and the second data sequence to a unified standardized space through Z-score standardization.
[0031] Since the data collected by the main sensor and the data collected by the auxiliary sensor are different in dimension and range, it is necessary to map the main sensor data and the auxiliary sensor data to a unified standardized space, so that they can be compared, trend analyzed and drift detected in real time on the same scale.
[0032] The first data sequence can be Z-score standardized by using formula (3), and the second data sequence can be Z-score standardized by using formula (4).
[0033] (3). Wherein, represents the first data sequence after Z-score standardization, is the mean of the first data sequence, is the standard deviation of the first data sequence.
[0034] (4). Wherein, represents the second data sequence after Z-score standardization processing, is the mean of the second data sequence, is the standard deviation of the second data sequence.
[0035] After Z-score standardization processing, the data of the first data sequence and the data of the second data sequence are in the same scale (unit standard deviation), which is convenient for direct comparison and avoids deviation calculation errors caused by differences in measurement units or ranges.
[0036] Step 4: Align the time sequence of the second data sequence with the time sequence of the first data sequence by interpolation.
[0037] Because there is a difference between the sampling frequency of the main sensor and the sampling frequency of the auxiliary sensor (such as the main sensor sampling frequency is 1Hz, and the auxiliary sensor is 0.2Hz), therefore, under the same sampling time length, the amount of data collected by the main sensor is greater than the amount of data collected by the auxiliary sensor. In order to realize real-time comparison and analysis of the main sensor data and the auxiliary sensor data, it is necessary to align the time of the first data sequence and the second data sequence.
[0038] Use formula (5) to interpolate the second data sequence, and align the time sequence of the second data sequence with the time sequence of the first data sequence.
[0039] (5). Wherein, t j+1 represents t j the next sampling time after the sampling time, s a t j+1 represents the auxiliary sensor data collected at t j+1 .
[0040] Step 5: In the standardized space, obtain the first data deviation of the first data sequence and the second data sequence at each sampling time in the first historical period, and establish the third data sequence.
[0041] t i The first data deviation at the sampling time is: (6). Wherein, is the first data deviation at t i the sampling time.
[0042] The third data sequence can be represented as: (7). Wherein, represents the third data sequence, is t n the first data deviation at the sampling moment.
[0043] It should be noted that:
[0044] The data deviation in the third data sequence can be mapped to the interval [0, 1] by using formula (8), which is convenient for threshold control.
[0045] (8). Wherein, represents the third data sequence, represents the maximum first data deviation in the original third data sequence, represents the minimum first data deviation in the original third data sequence.
[0046] The unified mapped first data deviation can be directly used as the input of the auxiliary sensor dynamic threshold adjustment, which ensures the quantifiability and comparability of the deviation and drift trend in the unified space.
[0047] Step 6: Extract the first data deviation mean from the third data sequence using the first rolling window, and store the first data deviation mean in the fourth data sequence.
[0048] The window function of the first rolling window is: (9). Wherein, represents t the first data deviation mean at the moment (used to represent the change trend of the deviation between the auxiliary sensor data and the main sensor data at the moment t ); N is the size of the historical data period or the first rolling window, that is, from t-N to t a total of N +1 moment; t i-1 represents t i one sampling moment before the sampling moment; represents t i-1 the first data deviation at the moment.
[0049] It should be noted that the purpose of the first rolling window in this step is to obtain the first data deviation mean in real time, and to realize dynamic analysis of the change trend of the deviation between the auxiliary sensor data and the main sensor data. Specifically, the first rolling window will change with the current data collection moment t tempthe first data deviation mean extracted from the third data sequence using a window function refers to the current data acquisition time t temp the first data deviation mean corresponding to the previous time of the first data deviation mean stored in the fourth data sequence. In addition, based on the above step 1 explanation, the fourth data sequence may only store one first data deviation mean (corresponding to the first time the method is executed), or it may store multiple first data deviation means (corresponding to the case where the method has been executed multiple times before the current data acquisition time t temp ).
[0050] Step 7: Determine whether there are multiple first data deviation means in the fourth data sequence that are greater than or equal to the corresponding drift determination threshold using a second rolling window. If so, execute step 8, otherwise, return to step 1.
[0051] The window function of the second rolling window is: (10). Wherein, is the numerical comparison result between the first data deviation mean and the drift determination threshold, is the drift determination threshold.
[0052] Similarly, the purpose of using the second rolling window in this step is to dynamically monitor whether the auxiliary sensor has a drift potential by comparing the first data deviation mean with the drift determination threshold in real time.
[0053] Before that, the drift determination threshold needs to be set.
[0054] It should be noted that: the purpose of the method is to use the high sensitivity of the main sensor to reverse the alarm sensitivity of the auxiliary sensor, that is, to use the main sensor data as a reference benchmark, and to reversely limit the fluctuation range of the auxiliary sensor data within the allowed fluctuation range of the main sensor data (that is, the fluctuation amplitude of the auxiliary sensor data cannot exceed the fluctuation amplitude of the main sensor data). Further, the first data deviation mean is used to measure the deviation trend between the auxiliary sensor data and the main sensor data, so the drift determination threshold in this step is used to set the upper limit of the fluctuation amplitude of the first data deviation mean (deviation trend). Further, since the underground environment of the coal mine will have periodic or phased fluctuations, the drift determination threshold needs to be dynamically adjusted with the fluctuations of the underground environment; on the contrary, if the drift determination threshold is set to a fixed value, the following two situations will exist: 1. During the stable period of the underground mine, the main sensor data fluctuates little; in order to make the fluctuation range of the auxiliary sensor data not exceed the fluctuation range of the main sensor data, the drift determination threshold should be a small value in theory; if the drift determination threshold is set too large (that is, the allowed fluctuation range of the auxiliary sensor data is large) by setting a fixed threshold in the early stage, it is not conducive to monitoring whether the auxiliary sensor has drifted (early drift is easily missed). 2. During the fluctuation period of the underground mine, the main sensor data fluctuates greatly; in theory, as long as the fluctuation range of the auxiliary sensor data does not exceed the fluctuation range of the main sensor data, the purpose of the method can be achieved, that is, the fluctuation range of the auxiliary sensor data can increase with the increase of the fluctuation range of the main sensor data; if the drift determination threshold is set too small (that is, the fluctuation range of the main sensor data is small, and the auxiliary sensor data is almost not allowed to fluctuate) by setting a fixed threshold in the early stage, the auxiliary sensor will be frequently monitored to have drifted.
[0055] The specific method of dynamically setting the drift determination threshold is:
[0056] Step 7.1: Collect multiple main sensor data in a second historical period to establish a fifth data sequence; collect multiple auxiliary sensor data in the second historical period to establish a sixth data sequence.
[0057] The second historical period in this step refers to the period corresponding to the normal operation of the main sensor and the auxiliary sensor, and the normal operation refers to no data mutation and no device abnormality. The initial operation stage (such as 1 week after installation) of the main device and the auxiliary device after being installed into the coal mine can be taken as the second historical period.
[0058] The expression form of the collected fifth data sequence and sixth data sequence is referred to the above step 1. The random noise in the fifth data sequence and the sixth data sequence can be removed by referring to the method of the above step 2.
[0059] Step 7.2: Map the fifth data sequence and the sixth data sequence to a unified standardized space by Z-score standardization.
[0060] The Z-score standardization processing method is referred to step 3 above. The fifth data sequence and the sixth data sequence can be time series aligned by the method described in step 4 above.
[0061] Step 7.3: Obtain the second data deviation of the fifth data sequence and the sixth data sequence at each sampling time of the second historical period in the standardized space, and establish a seventh data sequence.
[0062] The method for obtaining the data deviation is described in step 5 above.
[0063] Step 7.4: Obtain the second data deviation mean and standard deviation of the seventh data sequence.
[0064] The second data deviation mean of the seventh data sequence can be calculated by referring to formula (9), and the standard deviation of the seventh data sequence can be calculated by referring to formula (3) or formula (4) above.
[0065] Step 7.5: Obtain the reference sensitivity coefficient according to the second data deviation mean and the standard deviation.
[0066] Since the main sensor data and the auxiliary sensor data collected in 7.1 are in normal operating state, they can be considered as not having drift, and the deviation (second data deviation) between the fluctuation amplitude of the main sensor data and the fluctuation amplitude of the auxiliary sensor data can be considered as relatively stable. Therefore, the reference sensitivity coefficient obtained according to the second data deviation mean and the standard deviation can provide a numerical reference for setting the drift determination threshold, which is the basic level of the drift determination threshold, and the drift determination threshold is the fluctuation upper limit of the reference sensitivity coefficient at a confidence level.
[0067] The reference sensitivity coefficient can be calculated by formula (11).
[0068] θ 0= μ + z · σ (11). Wherein, θ 0 is the reference sensitivity coefficient, μ is the second data deviation mean, z is the quantile of the standard normal distribution, σ is the standard deviation.
[0069] It should be noted that in statistics, the mean μ and the standard deviation σ of data can describe the fluctuation distribution, and if the data follows an approximate normal distribution, 95% of the data falls within μ ±1.96 σwithin 99.7% of the data μ ±3 σ within 99.7% of the data. This step sets a reasonable reference boundary for the drift determination threshold by setting the quantile so that the reference sensitivity factor obeys a normal distribution. Therefore, z Take 1.96 or 3.
[0070] Step 7.6: Establish the fluctuation interval of the first data deviation according to the second data deviation mean and standard deviation, obtain the adjustment factor of the reference sensitivity factor according to the fluctuation interval, and obtain the drift determination threshold according to the adjustment factor.
[0071] The calculation expression of the drift determination threshold is: θ = k · θ 0 (12); in formula (12), θ is the drift determination threshold, k is the adjustment factor.
[0072] The purpose of this step is to determine the adjustment proportion of the reference sensitivity factor, analyze the fluctuation of the historical data, and use the analysis result as a reference for the current data fluctuation to determine the size of the adjustment factor. Specifically, first, the second data deviation mean (reflecting the fluctuation trend of the historical data deviation) and the standard deviation (reflecting the fluctuation amplitude of the historical data) of the seventh data sequence are used to divide the historical data into three intervals, which are: the first fluctuation interval [0, the second data deviation mean), the second fluctuation interval [the second data deviation mean, the second data deviation mean + standard deviation), and the third fluctuation interval [the second data deviation mean + standard deviation, +∞).
[0073] Further, for the convenience of understanding, the first fluctuation interval is named as "low fluctuation interval", the second fluctuation interval is named as "medium fluctuation interval", and the third fluctuation interval is named as "high fluctuation interval". Then, it is judged in which fluctuation interval range the current value deviation of the auxiliary sensor and the main sensor (the first data deviation) falls, so as to reflect the fluctuation of the current first data deviation. If the first data deviation falls in the "low fluctuation interval", it indicates that the current value deviation is stable, according to the explanation in step 7 above, the drift determination threshold should take a smaller value, according to formula (12), the adjustment factor k should be correspondingly taken as a smaller value to reduce the size of the drift determination threshold, and then the sensitivity of the auxiliary sensor to the drift is improved, for example, the adjustment factor k is less than 1 (k=0.5). If the first data deviation falls in the "low fluctuation interval", it indicates that the current value deviation is intensified, according to the explanation in step 7 above, the drift determination threshold should be increased, and the adjustment factor k can be taken as 1. If the first data deviation falls in the "low fluctuation interval", it indicates that the current value deviation is obvious, according to the explanation in step 7 above, the drift determination threshold should be further increased, and the adjustment factor k can be taken as greater than 1 (k=1.5).
[0074] Based on the drift determination threshold determined in steps 7.1 to 7.6 above, it is judged whether there is a continuous plurality of first data deviation means greater than or equal to the corresponding drift determination threshold in the fourth data sequence using the second rolling window; if yes, it indicates that the auxiliary sensor has drift, and then the data collected by the auxiliary sensor is not suitable for calibrating the main sensor data, and the auxiliary sensor data needs to be further processed. Otherwise, return to step 1 to continue collecting data.
[0075] Step 8: According to the current deviation support degree and the current environmental noise support degree, the historical alarm threshold of the auxiliary sensor is corrected to obtain the current alarm threshold of the auxiliary sensor.
[0076] The purpose of this step is to dynamically adjust the alarm threshold of the auxiliary sensor according to the high sensitivity of the main sensor and the deviation trend of the auxiliary sensor, so that the auxiliary sensor can trigger a warning when a small drift occurs, and at the same time avoid false alarms. However, it should be noted that the current threshold of the auxiliary sensor should be dynamically adjusted according to the environmental change range of the main sensor, and the deviation trend of the auxiliary sensor relative to the main sensor should be considered, and the adjustment should prevent false alarms caused by short-term fluctuations.
[0077] This step is based on the results of the above step 7. If the auxiliary sensor drifts, it means that the historical alarm threshold of the auxiliary sensor is not sensitive enough to monitor the drift, and it needs to be corrected. This embodiment uses the current deviation support and the current environmental noise support to correct the historical alarm threshold of the auxiliary sensor. The principle is that the threshold (alarm point) of the sensor when it is shipped or initially set is a fixed value. However, in long-term use, the sensor will drift due to its own reasons and the influence of the downhole environment, and if it is not corrected, this threshold will gradually deviate from the true safety boundary. Further, the "current deviation support" can reflect the intensity of the deviation between the current main sensor data and the auxiliary sensor data relative to the historical range. If the current deviation is significantly beyond the historical distribution, it means that the sensor is likely to drift or be abnormal, and if the current deviation is still within the historical range, it means that the threshold is relatively reliable, so when correcting the threshold, the current deviation support can be used to determine the correction range of the threshold. In addition, the "current environmental noise support" can reflect the intensity of the recent environmental fluctuation of the main sensor relative to the historical range. If the current environmental fluctuation is large, the instantaneous deviation of the auxiliary sensor may be only a transient jitter caused by environmental disturbance, and the correction range should be weakened, if the current environment is stable (low noise), the sensor deviation is more likely to be a real drift, and the correction range should be increased, so when correcting the threshold, the current environmental noise support can be used to prevent "overcorrection".
[0078] Before correcting the historical alarm threshold of the auxiliary sensor, the current deviation support and the current environmental noise support need to be obtained in advance, and the specific method is as follows:
[0079] Step 8.1: Collect the main sensor data at the current time and the auxiliary sensor data at the current time.
[0080] Similarly, due to the difference in sampling frequency between the main field sensor and the auxiliary sensor, the auxiliary sensor data and the main sensor data can be time-aligned by interpolation if necessary. The time alignment method is referred to the above step 3.
[0081] Step 8.2: Map the main sensor data at the current time and the auxiliary sensor data at the current time to a unified standardized space through Z-score standardization.
[0082] When performing Z-score standardization, the main sensor data at the current time and the auxiliary sensor data at the current time can be combined with the corresponding historical data to form a data sequence, and then Z-score standardization is performed. The Z-score standardization processing method is referred to the above step 4.
[0083] Step 8.3 In the standardized space, obtain the third data deviation between the main sensor data at the current time and the auxiliary sensor data at the current time.
[0084] Step 8.4: Use the third scrolling window to extract the maximum and minimum first data deviations from the third data sequence, and obtain the current deviation support based on the current maximum, minimum, and third data deviations.
[0085] The window function for the third scrolling window is: (13). Among them, q 1 indicates the starting index. (14). Among them, m It is a local index within the third scroll window. This means "retain the sequence value at this position". This indicates "exclude the sequence value at this position".
[0086] When the third scroll window starts with "Index" q 1” When scrolling, the sequence covered by the third scroll window The range is D [ q 1], D [ q 1+1],…, D [ q 1+ N -1] (left-aligned window); after the window function truncation, the sequence fragment within the window is (because In reality, it is Find the maximum and minimum values for this segment using the reference formula (13).
[0087] The formula for calculating the current bias support is: (15). Among them, t Indicates the current moment. b ( t ) represents the current bias support. D max Indicates the maximum first data deviation. D min The table shows the minimum first data deviation. D ( t ) indicates the third data deviation.
[0088] The current bias support can be calculated through steps 8.1 to 8.4 above.
[0089] Step 8.5: Obtain the root mean square (RMS) and root mean square (RMS) of the second data sequence.
[0090] Step 8.6: Add the current main sensor data to the second data sequence to obtain the eighth data sequence, and use the fourth scrolling window to extract the root mean square of the current time from the eighth data sequence.
[0091] The window function of the fourth rolling window is (16). Wherein, q 2 represents the center index, when the fourth rolling window rolls with the "center index", it is assumed that N is odd, then the window symmetrically covers k -( N -1) / 2 to k +( N -1) / 2, and the sequence segment in the window is .
[0092] Step 8.7: Obtain the current environmental noise support according to the maximum root mean square, the minimum root mean square and the root mean square at the current moment.
[0093] The calculation expression of the current environmental noise support is: (17). Wherein, e ( t ) represents the current environmental noise support, RMS max represents the maximum root mean square, RMS min represents the minimum root mean square, RMS ( t ) represents the root mean square at the current moment.
[0094] The current environmental noise support can be calculated through the above steps 8.5 to 8.7.
[0095] On the basis of calculating the current bias support and the current environmental noise support, the model expression for correcting the current alarm threshold is: (18). Wherein, t represents the current moment, T a ’ ( t ) represents the corrected current alarm threshold, T a represents the current alarm threshold, is an adjustment coefficient, .
[0096] Step 9: Determine whether the auxiliary sensor data at the current moment exceeds the current alarm threshold; if yes, real-time calibration is performed on the auxiliary sensor data; otherwise, return to step 1.
[0097] The real-time calibration of the auxiliary sensor data includes the following steps:
[0098] Step 9.1: Establish a calibration model based on linear regression; the expression of the calibration model is: (19). Wherein, t represents the current moment, a correction value of the auxiliary sensor data, a raw data of the auxiliary sensor, a data bias compensation term, a proportional factor, a constant offset term. The coefficient and can be obtained by least square fitting the historical bias .
[0099] Step 9.2: Real-time calibration of auxiliary sensor data using the calibration model.
[0100] Step 10: Update the historical alarm threshold with the current alarm threshold, and update the real-time calibration result to the auxiliary sensor database.
[0101] In summary, the auxiliary downhole sensor calibration method provided by the embodiment first collects the historical data of the main sensor and the auxiliary sensor, establishes a mapping model between the two, interpolates the auxiliary sensor data to the main sensor time series, and realizes data alignment. Second, the bias trend and drift rate between the main and auxiliary sensors are calculated using a rolling window to obtain the current bias support. Third, based on the historical and real-time data of the main sensor, the environmental noise support is calculated to reflect the fluctuation level of the downhole environment. Finally, the bias support and environmental noise support are integrated into a dynamic threshold correction model to real-time correct the historical alarm threshold of the auxiliary sensor. The present application realizes the dynamic optimization of the sensor threshold by adaptively adjusting the correction amplitude in different environmental fluctuation intervals, avoids false positives and false negatives caused by relying solely on static thresholds, and improves the reliability and accuracy of downhole monitoring data.
[0102] Embodiment 2: Corresponding to the method described in embodiment 1, the present embodiment provides an auxiliary downhole sensor calibration system, characterized in that it comprises:
[0103] A first data acquisition module is configured to acquire a plurality of main sensor data in a first historical period in real time, and establish a first data sequence.
[0104] A second data acquisition module is configured to acquire a plurality of auxiliary sensor data in the first historical period in real time, and establish a second data sequence.
[0105] A first data processing module is configured to map the first data sequence and the second data sequence to a unified standardized space through Z-score standardization.
[0106] A second data processing module is configured to obtain a first data bias of the first data sequence and the second data sequence at each sampling time in the first historical period in the standardized space, and establish a third data sequence.
[0107] a third data processing module, configured to extract a first data bias mean from the third data sequence using a first rolling window, and store the first data bias mean into a fourth data sequence;
[0108] a first analysis control module, configured to determine whether there are continuous multiple first data bias means in the fourth data sequence which are greater than or equal to a corresponding drift judgment threshold using a second rolling window; if yes, control the device calibration module to work; otherwise, control the first data acquisition module, the second data acquisition module, the first data processing module, the second data processing module and the third data processing module to work in turn.
[0109] a device calibration module, configured to calibrate the auxiliary sensor data in real time.
[0110] In the auxiliary downhole sensor calibration system provided in the embodiment, the working principles and internal execution processes of the functional modules and functional units can refer to the above-mentioned embodiment 1, and the embodiment will not be described again.
[0111] In the method provided in the above-mentioned embodiment 1 and the system provided in the embodiment 2, the embodiment provides a computer device for executing the method described in the embodiment 1 or any possible method related to the method described in the embodiment 1, which comprises a memory, a processor and a transceiver which are connected in communication in turn. The memory is configured to store a computer program, the transceiver is configured to receive and send messages, and the processor is configured to read the computer program and execute the method described in the embodiment 1 or any possible method related to the method described in the embodiment 1. Specifically, the memory can include, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a flash memory, a first input first output (FIFO) memory and / or a first input last output (FILO) memory, etc.; and the processor can be, but is not limited to, a microprocessor with a model number of STM32F105 series. In addition, the computer device can further include, but is not limited to, a power module, a display screen and other necessary components.
[0112] The working process, working details and technical effects of the aforementioned computer device provided in the embodiment can refer to the method described in the embodiment 1 or any possible method related to the method described in the embodiment 1, and will not be described again.
[0113] Embodiment 4: This embodiment provides a computer readable storage medium storing instructions to perform the method as described in Embodiment 1 or any method that can involve the method as described in Embodiment 1. When the instructions are run on a computer, the computer performs the method as described in Embodiment 1 or any method that can involve the method as described in Embodiment 1. The computer readable storage medium refers to a carrier storing data, which can include, but is not limited to, floppy disks, optical disks, hard disks, flash memories, USB flash disks, Memory Sticks, and the like computer readable storage media. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
[0114] The working process, working details, and technical effects of the aforementioned computer readable storage medium provided by this embodiment can be referred to the method as described in Embodiment 1 or any method that can involve the method as described in Embodiment 1, which will not be repeated here.
[0115] Embodiment 5: This embodiment provides a computer program product containing instructions to perform the method as described in Embodiment 1 or any method that can involve the method as described in Embodiment 1. When the instructions are run on a computer, the computer performs the method as described in Embodiment 1 or any method that can involve the method as described in Embodiment 1. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
[0116] It should be understood that the terms “system”, “device”, “unit”, and / or “module” used in the specification are a method for distinguishing different components, elements, parts, sections, or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.
[0117] As shown in the specification and claims, unless the context clearly indicates otherwise, the words “one”, “a”, “an”, and / or “the” do not refer to the singular, but can also include the plural. Generally, the terms “comprise” and “include” only indicate the inclusion of the steps and elements explicitly identified, and these steps and elements do not constitute an exclusive list of steps or elements.
[0118] The above detailed description of the specific implementation of the present application further explains the purpose, technical solutions, and beneficial effects of the present application. It should be understood that the above detailed description is only a specific implementation of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
[0119] It should be noted that the structure, proportion, size, etc. shown in the drawings attached to the present specification are only used to cooperate with the content disclosed in the specification, so that those skilled in the art can understand and read, and are not used to limit the conditions that the present application can be implemented, so they do not have technical significance. Any modification of the structure, change of the proportion relationship or adjustment of the size, without affecting the effect and purpose that the present application can produce, should still fall within the scope of the technical content disclosed by the present application. At the same time, the terms such as "upper", "lower", "left", "right", "middle" and the like in the present specification are only for the convenience of clear description, and are not used to limit the scope of the present application, and the change or adjustment of the relative relationship is also considered as the implementation of the present application without substantial changes in technical content.
Claims
1. A method for calibrating auxiliary downhole sensors, characterized in that, Includes the following steps: S1: Collect data from multiple main sensors in real time during the first historical period to establish a first data sequence; collect data from multiple auxiliary sensors in real time during the first historical period to establish a second data sequence; S2: The first and second data sequences are mapped to a unified normalization space through Z-score normalization; S3: In the normalized space, obtain the first data deviation between the first data sequence and the second data sequence at each sampling moment in the first historical period, and establish the third data sequence; S4: Use the first scrolling window to extract the mean of the first data deviation from the third data sequence, and store the mean of the first data deviation into the fourth data sequence; S5: Use the second rolling window to determine whether there are multiple consecutive first data deviations with a mean greater than or equal to the corresponding drift judgment threshold in the fourth data sequence; if yes, execute S6; otherwise, return to S1. S6: Correct the historical alarm threshold of the auxiliary sensor based on the current deviation support and the current environmental noise support to obtain the current alarm threshold of the auxiliary sensor; S7: Determine whether the current auxiliary sensor data exceeds the current alarm threshold; If yes, perform real-time calibration on the auxiliary sensor data; otherwise, return to S1. Prior to S6, the following steps were also included: Collect the current data from the main sensor and the current data from the auxiliary sensor; Z-score standardization maps the current primary sensor data and the current auxiliary sensor data to a unified standardization space. In the standardized space, obtain the third data deviation between the current main sensor data and the current auxiliary sensor data; Use a third scrolling window to extract the maximum and minimum first data deviations from the third data sequence; The current bias support is obtained based on the current maximum first data bias, minimum first data bias, and third data bias; the formula for calculating the current bias support is: (15); In equation (15), t Indicates the current moment. b ( t ) represents the current bias support. D max Indicates the maximum first data deviation. D min The table shows the minimum first data deviation. D ( t ) indicates the third data deviation; Obtain the root mean square and root mean square of the second data sequence; The current main sensor data is added to the second data sequence to obtain the eighth data sequence; Use the fourth rolling window to extract the root mean square of the current time step from the eighth data sequence; The current environmental noise support is obtained based on the maximum root mean square, the minimum root mean square, and the root mean square at the current time. The expression for calculating the current environmental noise support is: (17); In equation (17), e ( t This indicates the current environmental noise support level. RMS max This represents the maximum root mean square. RMS min Represents the least mean square root. RMS ( t () represents the root mean square at the current time. The corrected formula for the current alarm threshold is: (18); In equation (18), t Indicates the current moment. This indicates the corrected current alarm threshold. Indicates the current alarm threshold. For adjustment coefficients, .
2. The auxiliary downhole sensor calibration method according to claim 1, characterized in that, Following S1, the steps include: removing random noise from the first and second data sequences using a moving average or Kalman filter.
3. The auxiliary downhole sensor calibration method according to claim 1 or 2, characterized in that, Following S2, the following steps are also included: aligning the time series of the second data sequence with the time series of the first data sequence through interpolation.
4. A method for calibrating auxiliary downhole sensors according to claim 1 or 2, characterized in that, Following S3, the following steps are also included: mapping the data deviations in the third data sequence to the [0,1] interval.
5. A method for calibrating auxiliary downhole sensors according to claim 1 or 2, characterized in that, Prior to S5, the following steps were also included: Collect data from multiple main sensors during the second historical period to establish a fifth data sequence; collect data from multiple auxiliary sensors during the second historical period to establish a sixth data sequence; Z-score normalization maps the fifth and sixth data sequences to a unified normalization space. In the standardized space, the second data deviation between the fifth and sixth data sequences at each sampling time in the second historical period is obtained to establish the seventh data sequence; Obtain the mean and standard deviation of the second data deviation of the seventh data sequence; The baseline sensitivity coefficient is obtained based on the mean and standard deviation of the second data. The fluctuation range of the first data deviation is established based on the mean and standard deviation of the second data deviation; The adjustment factor for the benchmark sensitivity coefficient is obtained based on the fluctuation range; The drift determination threshold is obtained based on the adjustment factor.
6. The auxiliary downhole sensor calibration method according to claim 5, characterized in that, The formula for calculating the baseline sensitivity coefficient is: (11); In equation (11), θ 0 is the baseline sensitivity coefficient. μ The mean of the second data deviation. z The quantiles of the standard normal distribution σ Standard deviation; The fluctuation range includes: the first fluctuation range, the second fluctuation range, and the third fluctuation range; the first fluctuation range is: [0, the mean of the second data deviation); the second fluctuation range is: [the mean of the second data deviation, the mean of the second data deviation + standard deviation); the third fluctuation range is: [the mean of the second data deviation + standard deviation, +∞); The adjustment factor for obtaining the benchmark sensitivity coefficient based on the fluctuation range includes the following steps: If the first data deviation is within the first fluctuation range, the adjustment factor is less than 1. If the first data deviation is within the second fluctuation range, the adjustment factor is set to 1. If the first data deviation is located in the third fluctuation range, the adjustment factor should be greater than 1. The expression for calculating the drift determination threshold is: (12); In equation (12), θ The threshold for determining drift. k It is a regulating factor.
7. A method for calibrating auxiliary downhole sensors according to claim 1 or 2, characterized in that, Real-time calibration of auxiliary sensor data includes the following steps: Establish a calibration model based on linear regression; the expression for the calibration model is: (19); In equation (19), t Indicates the current moment. This indicates the correction value for the auxiliary sensor data. This represents the raw data from the auxiliary sensor. For data deviation compensation items, As a scaling factor, This is a constant offset term; The calibration model is used to calibrate the auxiliary sensor data in real time.
8. A method for calibrating auxiliary downhole sensors according to claim 1 or 2, characterized in that, Following S7, the following steps are also included: Update historical alarm thresholds using current alarm thresholds; The real-time calibration results are updated to the auxiliary sensor database.
9. An auxiliary downhole sensor calibration system, characterized in that, A method for performing an auxiliary downhole sensor calibration as described in any one of claims 1-8, comprising: The first data acquisition module is used to collect data from multiple main sensors in real time during the first historical period and establish the first data sequence. The second data acquisition module is used to collect data from multiple auxiliary sensors in real time during the first historical period and establish a second data sequence. The first data processing module is used to map the first data sequence and the second data sequence to a unified standardized space through Z-score standardization; The second data processing module is used to obtain the first data deviation between the first data sequence and the second data sequence at each sampling time in the first historical period in the standardized space, and to establish the third data sequence. The third data processing module is used to extract the mean value of the first data deviation from the third data sequence using the first scrolling window, and store the mean value of the first data deviation into the fourth data sequence. The first analysis and control module is used to determine, using the second scrolling window, whether there are multiple consecutive first data deviations with an average value greater than or equal to the corresponding drift judgment threshold in the fourth data sequence; if so, the control device calibration module is activated; otherwise, the control module sequentially activates the first data acquisition module, the second data acquisition module, the first data processing module, the second data processing module, and the third data processing module. The equipment calibration module is used to calibrate auxiliary sensor data in real time.
10. A computer device, characterized in that, The device includes a memory, a processor, and a transceiver connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive data, and the processor is used to read the computer program and execute an auxiliary downhole sensor calibration method as described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, perform an auxiliary downhole sensor calibration method as described in any one of claims 1-8.
Citation Information
Patent Citations
Fault diagnosis method for sensors of cascade fixed set point control system
CN113791603A
Measurement system and method based on sensor array
CN117870745A