Distributed fiber grating temperature sensor calibration method based on random forest algorithm
By constructing a calibration model using the random forest algorithm, the measurement deviation problem of distributed fiber optic temperature sensors in coal mines was solved, achieving high-precision and stable calibration of the sensors in complex environments, which is suitable for coal mine safety monitoring.
Patent Information
- Application Number
- CN202511681005.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-02-03
AI Technical Summary
Existing distributed fiber Bragg grating temperature sensors suffer from measurement deviations in coal mine field applications, particularly due to inaccuracies caused by improper selection of calibration points and nonlinear characteristics.
A calibration method for fiber Bragg grating temperature sensors using the random forest algorithm is proposed. By collecting temperature and center wavelength data in a constant temperature chamber, a calibration model is constructed. Then, the sensor is automatically calibrated using ensemble learning of multiple decision trees to reduce errors and improve measurement accuracy.
It enables the capture of nonlinear error characteristics of fiber Bragg grating temperature sensors in complex environments, enhances measurement accuracy and stability, reduces maintenance costs and manpower burden, and is suitable for harsh working conditions in coal mines.
Smart Images

Figure CN121453221A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of temperature sensor calibration technology, and relates to the calibration of distributed fiber Bragg grating temperature sensors, specifically to a calibration method for distributed fiber Bragg grating temperature sensors based on the random forest algorithm. Background Technology
[0002] Distributed fiber Bragg grating (FBG) sensing technology, with its characteristics of electromagnetic interference resistance, intrinsic safety, and high precision, has become an important tool for coal mine safety monitoring, especially performing exceptionally well in harsh environments such as high temperatures and flammable / explosive conditions. In monitoring mining faces and equipment, FBG temperature sensors can monitor high-temperature areas of equipment such as coal mining machines and tunneling machines in real time, achieving accurate temperature measurement through changes in reflected wavelengths to prevent accidents caused by overheating. In cable and fire early warning systems, distributed FBG temperature sensors can cover cable trays, providing early fire warnings through multi-level alarm mechanisms (constant temperature, differential temperature, and excessively rapid temperature rise), reducing the intensity of manual inspections. However, due to objective factors such as manufacturing technology, transportation conditions, storage and working environments, and device aging, FBG temperature sensors generally exhibit a certain degree of measurement deviation in field applications in coal mines. Therefore, ensuring the accuracy and stability of FBG temperature sensor measurements is a crucial issue that urgently needs to be addressed.
[0003] Temperature calibration is a significant factor contributing to measurement deviations. Currently, the calibration method for fiber Bragg grating temperature sensors follows the traditional method for platinum resistance temperature sensors, performing calibration at specific calibration points within a specific temperature range. While this standardization has been achieved, several challenges remain. For instance, the selection of calibration points relies on empirical judgment specific to traditional platinum resistance temperature sensors, lacking tailored selection methods for the error characteristics of fiber Bragg grating temperature sensors, leading to an unreasonable distribution of calibration points. Furthermore, the nonlinear characteristics of fiber Bragg grating temperature sensors result in different calibration requirements for different temperature ranges, further increasing the challenge of calibration work.
[0004] Random forest is an ensemble learning method whose core idea is to improve model performance by constructing multiple decision trees and combining the prediction results of each tree. Random forest not only effectively handles linear problems but also exhibits good adaptability to complex nonlinear relationships, thus performing exceptionally well in classification and regression tasks. Furthermore, by integrating the advantages of multiple models, random forest significantly improves prediction accuracy and model stability. Therefore, based on the advantages of random forest in handling nonlinear relationships, high-dimensional data, and noise resistance, choosing this algorithm to solve the calibration problem of distributed fiber Bragg grating temperature sensors is an important research direction. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a calibration method for a distributed fiber Bragg grating temperature sensor based on the random forest algorithm. The random forest algorithm is used to correct accumulated errors, solve errors caused by device aging, differences in device processing, and temperature measurement algorithms, and improve the accuracy of the distributed fiber Bragg grating temperature sensor.
[0006] To achieve the above objectives, the present invention provides the following technical solution: A calibration method for a distributed fiber Bragg grating temperature sensor based on a random forest algorithm, comprising: Multiple fiber Bragg grating temperature sensors are placed in a constant temperature chamber, and the temperature inside the chamber is gradually increased. A temperature measurement point is set at certain temperature intervals, and the temperature value inside the constant temperature chamber and the center wavelength of each fiber Bragg grating temperature sensor are collected at the temperature measurement point. Data is preprocessed after collection; The preprocessed data is imported into a calibration model based on the random forest algorithm to train the calibration model; After training, the temperature value of the fiber Bragg grating temperature sensor is predicted by the calibration model, and the deviation between the predicted temperature value and the actual temperature value is calculated. If the deviation value does not meet the requirements, the calibration model is optimized. Repeat the calculation of the deviation value until the deviation value meets the requirements to obtain the final calibration model, which is then used to calibrate the measured values of the fiber Bragg grating temperature sensor.
[0007] Furthermore, inside the constant temperature chamber, the temperature was gradually increased from -50℃ to 450℃.
[0008] Furthermore, during the temperature rise process inside the constant temperature chamber, a temperature measurement point is set up every 10°C increase, and multiple sets of data are collected at the temperature measurement point. Each set of data includes the temperature value inside the constant temperature chamber and the center wavelength of each fiber optic temperature sensor.
[0009] Furthermore, the preprocessing of the collected data includes imputation of missing values. The imputation method is as follows: for two adjacent temperature measurement points, a temperature value and a center wavelength are randomly selected from multiple sets of data collected at each temperature measurement point as sample points; the difference between the temperature and the center wavelength between the two sample points is calculated; the difference is divided multiple times according to the accuracy requirements; and the smaller temperature value and the smaller center wavelength value in the two sample points are added to the divided difference to form a new data sample point.
[0010] Furthermore, the preprocessed data forms the original dataset, and the calibration model is trained using the original dataset, including: extracting B subsets with replacement from the original dataset. , Each subset contains N data samples; For each subset A decision tree is trained using the random forest algorithm. During the construction of each decision tree, the construction of the decision tree is stopped when the data error value is small enough, the number of samples is too small, or the depth of the tree reaches the preset maximum value. After constructing B decision trees to form a random forest, the average output of each decision tree is calculated and used as the output of the calibration model.
[0011] Furthermore, during the construction of each decision tree, a random feature selection mechanism is used when splitting nodes. Starting from the root node, the mean squared error or mean absolute error is selected as the splitting threshold based on the principle of minimizing the error of the data within the subset.
[0012] Furthermore, when optimizing the calibration model, optimization can be achieved by changing the depth of the tree or altering the feature splitting mechanism.
[0013] The beneficial effects of this invention are as follows: (1) This invention employs the random forest algorithm, which integrates multiple decision trees to capture the nonlinear error characteristics of fiber optic temperature sensors in complex environments and overcomes the problem of unreasonable distribution caused by relying on experience to select calibration points in traditional calibration methods. The random forest algorithm is trained on a large amount of temperature points and wavelength data to adaptively learn the sensor bias patterns, thereby compensating for systematic errors caused by manufacturing defects, device aging, and environmental factors. Ultimately, this makes the measurement results more accurate and reliable, and enhances the long-term stability of the sensor under harsh working conditions in coal mines.
[0014] (2) Unlike traditional methods that rely on the experience of platinum resistance temperature sensors, this invention automates the construction of a calibration model through standardized data acquisition and preprocessing steps, reducing reliance on professional knowledge and manual intervention. The entire process only requires collecting temperature-wavelength data in a constant temperature chamber and using a random forest model for training and optimization. It is simple to operate, requires no complex equipment or frequent adjustments, and makes calibration work easy to promote in the field, effectively reducing maintenance costs and manpower burden.
[0015] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0016] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein: Figure 1This is a schematic diagram of a calibration method for a distributed fiber Bragg grating temperature sensor based on a random forest algorithm according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the training process for a calibration model based on the random forest algorithm. Figure 3 This is a schematic diagram of the output process for the calibration model; Figure 4 This is a schematic diagram of the decision tree prediction process. Detailed Implementation
[0017] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0018] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0019] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0020] This invention provides a calibration method to improve the measurement accuracy of a distributed fiber Bragg grating temperature sensor. This method improves the accuracy of the temperature measurement output data by fitting the linear and nonlinear range portions of the temperature data using a random forest algorithm.
[0021] like Figure 1 As shown, a distributed fiber Bragg grating temperature sensor calibration method according to an embodiment of the present invention includes the following steps: 1. Place multiple fiber Bragg grating temperature sensors in a constant temperature oven with a temperature fluctuation less than 0.05 °C to collect actual temperature data.
[0022] 2. Collect the backward reflected light returned by the fiber Bragg grating and calculate the central wavelength of the fiber Bragg grating temperature sensor.
[0023] 3. After placing the fiber Bragg grating temperature sensor in the constant temperature oven for 5 min, record the actual temperature T and the central wavelength λ of multiple sensors.
[0024] 4. Change the temperature of the constant temperature oven, gradually increase it from -50 °C to 450 °C, set a temperature measurement point every 10 °C increase, maintain an interval of 30 seconds at each temperature measurement point, and collect 10 groups of data at each temperature measurement point. Each group of data includes the temperature in the constant temperature oven and the central wavelength of each fiber Bragg grating temperature sensor.
[0025] 5. Preprocess the data, remove outliers, handle missing values, and perform data normalization.
[0026] In the process of data preprocessing, a key step is to supplement missing values. The purpose of supplementing missing values is to reduce errors and prevent all outputs from converging near the sampling points.
[0027] The specific method for supplementing missing values is as follows: 1) Calculate the wavelength and temperature differences between two sample points respectively. 2) Determine the number of divisions n between two adjacent temperature points according to the temperature accuracy required by the project. For example, T1 and T2 are two adjacent temperature points (T1 < T2), and n uniform divisions are made to pursue accuracy.
[0028] 3) Form new data by adding the difference to the smaller value.
[0029] For example, the difference between two adjacent temperature points T1 and T2 is ΔT, and the difference between the wavelengths λ1 and λ2 corresponding to the two temperature points is Δλ. Then, for the first sample point to be supplemented (T1 + ΔT / (n + 1)), the corresponding wavelength is (λ1 + Δλ / (n + 1)); for the second sample point (T1 + 2 * ΔT / (n + 1)), the corresponding wavelength is (λ1 + 2 * Δλ / (n + 1)). And so on, until the Nth sample point (T1 + n * ΔT / (n + 1)), the corresponding wavelength is (λ1 + n * Δλ / (n + 1)).
[0030] It should be noted that in the calculation of the difference, the temperature sample point is two adjacent values (i.e., two adjacent temperature measurement points, such as -40℃ and -30℃); at the same time, the method for selecting the target value for the difference is as follows: for temperature data, one is randomly selected from the 10 temperature values collected at each temperature measurement point; for wavelength data, one is randomly selected from the multiple center wavelengths collected at each temperature measurement point.
[0031] 6. Import the data into the calibration model based on the random forest algorithm. The imported data can be represented as a two-dimensional vector. Calibration is performed using a pre-trained calibration model.
[0032] The training process of the calibration model is as follows: Figure 2 As shown, temperature and wavelength are combined to form a vector. The training process involves handling temperature. T This is to obtain a set of wavelengths output by the model at the same temperature.
[0033] The specific training process is as follows: from the original dataset... Extracting B subsets with replacement ( ), Each subset contains N 1 sample. For each subset A decision tree is trained using the random forest algorithm. In the process of constructing each decision tree, a random feature selection mechanism is adopted when splitting nodes. That is, based on mean squared error (MSE) and mean absolute error (MAE), the optimal splitting feature is selected from these two candidate features to split the nodes.
[0034] In the process of recursively splitting the dataset to construct a decision tree, mean squared error and mean absolute error are used as splitting criteria, which are expressed as follows: (1) (2) in, Representing a subset The mean of all data in the dataset.
[0035] When constructing a decision tree, starting from the root node, a splitting threshold is selected based on the principle of "minimizing the error of data within a subset" to split the data. Training stops when the data error value is sufficiently small, the number of samples is too small, or the tree depth reaches a preset maximum value. After training the decision tree, for new input samples, the tree traverses downwards from the root node according to feature rules, eventually landing on a leaf node. The target mean of all training samples at that leaf node is the prediction result of the tree.
[0036] The model output process is as follows Figure 3 , Figure 4 As shown, Figure 4 In the diagram, the nodes highlighted in red represent the nodes with the smallest mean squared error. Figure 4 This demonstrates a method for handling situations where multiple nodes in a given layer have the same minimum mean square error.
[0037] After constructing B trees according to the above process to form a random forest, the average output of each tree is taken as the final output of the model, expressed as: (3) in, For the first t The predicted value for each tree.
[0038] 7. Conduct experimental retests, compare the predicted values with the actual values to obtain the deviation value of the retest. If the deviation value is too large, further optimize the original model.
[0039] When optimizing the model, one can consider changing the depth of the tree or altering the feature splitting mechanism.
[0040] 8. Repeat step 7 until the error meets expectations.
[0041] In summary, this invention provides a calibration method for distributed fiber Bragg grating temperature sensors based on the random forest algorithm. This invention uses machine learning algorithms to compensate for errors, effectively improving the measurement accuracy of distributed fiber Bragg grating temperature sensors and significantly reducing the impact of errors caused by aging, defects in the temperature measurement algorithm, and device defects. Furthermore, the calibration method provided by this invention is simple to implement, low in cost, and easy to operate, providing a paradigm for intelligent calibration of distributed fiber Bragg grating sensors.
[0042] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A calibration method for a distributed fiber Bragg grating temperature sensor based on a random forest algorithm, characterized in that, The method includes: Multiple fiber Bragg grating temperature sensors are placed in a constant temperature chamber, and the temperature inside the chamber is gradually increased. A temperature measurement point is set at certain temperature intervals, and the temperature value inside the constant temperature chamber and the center wavelength of each fiber Bragg grating temperature sensor are collected at the temperature measurement point. Preprocessing is performed after data collection is completed; The preprocessed data is imported into a calibration model based on the random forest algorithm to train the calibration model; After training, the temperature value of the fiber Bragg grating temperature sensor is predicted by the calibration model, and the deviation between the predicted temperature value and the actual temperature value is calculated. If the deviation value does not meet the requirements, the calibration model is optimized. Repeat the calculation of the deviation value until the deviation value meets the requirements to obtain the final calibration model, which is then used to calibrate the measured values of the fiber Bragg grating temperature sensor.
2. The method according to claim 1, characterized in that, Inside the incubator, the temperature was gradually increased from -50℃ to 450℃.
3. The method according to claim 2, characterized in that, During the temperature rise process inside the constant temperature chamber, a temperature measurement point is set up every 10°C increase, and multiple sets of data are collected at the temperature measurement point. Each set of data includes the temperature value inside the constant temperature chamber and the center wavelength of each fiber optic temperature sensor.
4. The method according to claim 1, characterized in that, Preprocessing the collected data includes imputing missing values. The imputation method is as follows: for two adjacent temperature measurement points, a temperature value and a center wavelength are randomly selected from multiple sets of data collected at each temperature measurement point as sample points. Calculate the temperature and center wavelength differences between the two sample points respectively; divide the differences multiple times according to the accuracy requirements; add the smaller temperature value and smaller center wavelength value of the two sample points to the divided differences to form new data sample points.
5. The method according to claim 4, characterized in that, The original dataset is constructed based on the preprocessed data. The calibration model is trained using the original dataset, including: extracting B subsets with replacement from the original dataset. , Each subset contains N data samples; For each subset A decision tree is trained using the random forest algorithm. During the construction of each decision tree, the construction of the decision tree is stopped when the data error value is small enough, the number of samples is too small, or the depth of the tree reaches the preset maximum value. After constructing B decision trees to form a random forest, the average output of each decision tree is calculated and used as the output of the calibration model.
6. The method according to claim 5, characterized in that, During the construction of each decision tree, a random feature selection mechanism is used when splitting nodes. Starting from the root node, the node splits nodes based on the principle of minimizing the error of the data within the subset. The mean squared error or mean absolute error is selected as the splitting threshold.
7. The method according to claim 1 or 6, characterized in that, When optimizing the calibration model, optimization can be achieved by changing the depth of the tree or by altering the feature splitting mechanism.