A multi-scale fiber grating multi-peak demodulation method fusing an attention mechanism
Patent Information
- Application Number
- CN202610144273.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-02
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2046-02-02
AI Technical Summary
传统解调算法主要包括质心法、多项式拟合法、高斯拟合法等,这些方法在理想光谱条件下能够实现较高精度,但在实际工程应用中面临严峻挑战:首先,光源不稳定、传输链路损耗及环境噪声等因素导致反射谱信噪比下降;其次,为实现多点测量而采用的波分复用技术易引起反射谱重叠,形成复杂多峰结构;再者,传感器封装、结构非均匀受力等因素会引起光谱畸变,破坏其理想高斯线型
[0042] The multi-scale fiber grating multi-peak demodulation method proposed in this invention, which integrates an attention mechanism, exhibits superior demodulation performance and strong application potential. Its core advantage lies in the introduction of multi-scale feature extraction and a dual attention mechanism, constructing a highly robust analytical framework against spectral aliasing, thus overcoming the performance bottleneck of traditional methods when FBG spectra overlap. Experimental verification shows that this method achieves near-zero error (0.0000-0.0002 nm) ultra-high precision demodulation in extreme scenarios with complete overlap, highlighting its powerful signal separation capability. In scenarios with partial overlap and multiple FBGs (2-4) in parallel sensing, the demodulation error is effectively suppressed to the sub-nanometer level (maximum 0.0844 nm), demonstrating excellent anti-interference capability and stability. In summary, this method possesses high precision, strong robustness, and good scalability, making it particularly suitable for FBG sensor networks in high-density, high-interference environments, providing a reliable technical solution for accurate measurement under complex conditions.
Smart Images

Figure CN122023834B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fiber Bragg grating sensor technology, and in particular to a multi-scale fiber Bragg grating multi-peak demodulation method that incorporates an attention mechanism. Background Technology
[0002] Fiber Bragg grating (FBG) sensors are widely used in aerospace, civil engineering, and energy and power industries due to their advantages such as resistance to electromagnetic interference, corrosion resistance, and ease of networking. FBG sensors detect changes in physical quantities such as temperature and strain by shifting the reflection center wavelength; therefore, the wavelength demodulation accuracy directly determines the performance of the sensing system. Traditional demodulation algorithms mainly include the centroid method, polynomial fitting method, and Gaussian fitting method. These methods can achieve high accuracy under ideal spectral conditions, but they face serious challenges in practical engineering applications: First, factors such as unstable light sources, transmission link losses, and environmental noise lead to a decrease in the signal-to-noise ratio of the reflection spectrum; second, wavelength division multiplexing (WDM) technology used to achieve multi-point measurements easily causes reflection spectrum overlap, forming a complex multi-peak structure; third, sensor packaging and non-uniform structural stress can cause spectral distortion, destroying its ideal Gaussian line shape. Although existing improved algorithms can improve accuracy to some extent, they still suffer from poor adaptability, weak anti-interference ability, and limited demodulation accuracy when dealing with severely overlapping peaks, distorted peaks, and low signal-to-noise ratio spectra. In recent years, although some studies have attempted to incorporate deep learning technology, most network models suffer from limitations such as single feature extraction and insufficient synergistic utilization of local and global spectral features, making it difficult to meet the demands for high-precision, adaptive demodulation of multi-peak reflectance spectra under complex operating conditions. Therefore, developing a demodulation algorithm that can effectively fuse multi-scale features, adaptively focus on key spectral regions, and possess strong noise resistance has become crucial for further advancements in fiber Bragg grating sensing technology. Summary of the Invention
[0003] The technical solution of this invention to solve the above-mentioned technical problems is to provide a multi-scale fiber grating multi-peak demodulation method that integrates an attention mechanism, comprising the following steps:
[0004] Step 1: Perform data preprocessing on the fiber Bragg grating multi-peak reflectance spectral data;
[0005] Step 2: Perform multi-scale feature extraction on the preprocessed spectral data;
[0006] Step 3: Apply a dual attention mechanism to process the extracted multi-scale features;
[0007] Step 4: Fuse the multi-scale features processed by the attention mechanism;
[0008] Step 5: Adaptive peak detection based on fusion features;
[0009] Step 6: Post-process the detected peak values;
[0010] The multi-scale feature extraction includes extracting multi-scale time-frequency features through continuous wavelet transform, extracting local features through a one-dimensional convolutional neural network, and extracting global statistical features through global context analysis; the dual attention mechanism includes a channel attention mechanism and a spatial attention mechanism.
[0011] Furthermore, the data preprocessing in step 1 specifically includes:
[0012] Spectral normalization: The original reflectance spectral signal is normalized to its maximum value, compressing the reflectance range to the [0,1] interval; and all spectral data are unified to the same wavelength range. The spectral normalization process uses the following formula:
[0013] ;
[0014] Where x is the original data, and x′ is the normalized result value. and These are the minimum and maximum values of the original data, respectively.
[0015] Noise filtering: Noise suppression is achieved using moving average filtering. The moving average filtering algorithm is as follows:
[0016] ;
[0017] in: The result after applying the sliding filter algorithm to this point; {x1,x2,…,xn} represents the point that has undergone the sliding mean filter and its n-1 adjacent data points;
[0018] Baseline correction: The background baseline is estimated using polynomial fitting, and the corrected spectrum is obtained by subtracting the fitted baseline.
[0019] Furthermore, the multi-scale feature extraction in step 2 specifically includes:
[0020] Continuous wavelet transform feature extraction: Perform continuous wavelet transform at multiple different scales, extract the modulus maxima at each scale, and construct a multi-scale time-frequency feature map; the continuous wavelet transform feature extraction formula is:
[0021] ;
[0022] ;
[0023] in, It is the mother wavelet function; a is the scaling parameter, b is the translation parameter, and its corresponding wavelength in the spectrum. It is the normalization factor, and * denotes the complex conjugate of the mother wavelet function. The intensity corresponds to the spectrum;
[0024] One-dimensional convolutional neural network feature extraction: Multiple convolutional kernels of different sizes are used for parallel processing, and multi-level features are constructed through convolutional operations at different levels;
[0025] ;
[0026] Where * denotes a one-dimensional convolution operation, and N is the number of input channels. and , where are the weights and biases of the k-th convolutional kernel, and f is the activation function;
[0027] Global context feature extraction: Global average pooling is performed on the feature map to obtain the overall statistical features of the spectrum, and the mean, variance, skewness and kurtosis statistics of the spectrum are calculated.
[0028] Furthermore, the dual attention mechanism in step 3 specifically includes:
[0029] Channel attention mechanism: Global average pooling is performed on each feature channel to obtain channel statistical descriptors. The importance weights of each channel are learned through a fully connected network to achieve feature selection in the channel dimension.
[0030] Spatial attention mechanism: Max pooling and average pooling are performed on the feature map along the channel dimension to generate spatial descriptors. Spatial attention weight maps are generated through convolutional layers and activation functions to enhance the feature response of key regions.
[0031] Dual attention fusion: The channel attention and spatial attention weights are multiplied element-wise, and the fused attention weights are applied to recalibrate the original features.
[0032] Furthermore, the multi-scale feature fusion in step 4 specifically includes: unifying all feature maps to the same size through upsampling or downsampling, and stitching them together in the channel dimension; designing a feature interaction module to promote information flow between features of different scales, and using a gating mechanism to control the information flow during the feature fusion process; performing layer normalization on the fused features, and using adaptive pooling to compress the feature maps to a fixed size.
[0033] Furthermore, the adaptive peak detection in step 5 specifically includes:
[0034] Coarse localization of candidate peaks: Local maxima are detected on the fused feature response map, an adaptive threshold is set to filter weak response candidate peaks, and redundant detection is eliminated by neighborhood non-maximum suppression;
[0035] Asymmetric Gaussian fitting: The reflection peak is modeled using Gaussian functions with different left and right standard deviations. The fitting parameters are initialized based on the candidate peak position and characteristic response. An optimization algorithm is used to perform nonlinear least squares fitting.
[0036] ,
[0037] Where A is the height of the peak, μ is the center position of the peak, and σl and σr are the width parameters on the left and right sides of the center, respectively;
[0038] Confidence assessment system: Calculate the root mean square error of the fitting residuals to assess the fitting quality, check the consistency of the detection peaks across multiple scales, and calculate the confidence score by integrating multiple factors; set a dynamic threshold based on the confidence score to filter low-confidence detections.
[0039] Furthermore, the post-processing in step 6 specifically includes: achieving sub-pixel-level peak positioning through parabolic interpolation, calculating the center wavelength, and outputting the detection results.
[0040] Furthermore, it also includes:
[0041] Step 7: Implement online adaptive optimization of the algorithm through a feedback optimization mechanism, including confidence feedback adjustment and adaptive parameter update.
[0042] The multi-scale fiber grating multi-peak demodulation method proposed in this invention, which integrates an attention mechanism, exhibits superior demodulation performance and strong application potential. Its core advantage lies in the introduction of multi-scale feature extraction and a dual attention mechanism, constructing a highly robust analytical framework against spectral aliasing, thus overcoming the performance bottleneck of traditional methods when FBG spectra overlap. Experimental verification shows that this method achieves near-zero error (0.0000-0.0002 nm) ultra-high precision demodulation in extreme scenarios with complete overlap, highlighting its powerful signal separation capability. In scenarios with partial overlap and multiple FBGs (2-4) in parallel sensing, the demodulation error is effectively suppressed to the sub-nanometer level (maximum 0.0844 nm), demonstrating excellent anti-interference capability and stability. In summary, this method possesses high precision, strong robustness, and good scalability, making it particularly suitable for FBG sensor networks in high-density, high-interference environments, providing a reliable technical solution for accurate measurement under complex conditions. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0044] Figure 1 This is a schematic diagram showing two non-overlapping FBGs;
[0045] Figure 2 This is a schematic diagram showing the partial overlap of two FBGs;
[0046] Figure 3 This is a schematic diagram of two FBGs completely overlapping;
[0047] Figure 4 This is a schematic diagram showing three non-overlapping FBGs;
[0048] Figure 5 This is a schematic diagram showing the partial overlap of three FBGs;
[0049] Figure 6 A schematic diagram showing three FBGs completely overlapping;
[0050] Figure 7 This is a schematic diagram showing four non-overlapping FBGs.
[0051] Figure 8 This is a schematic diagram showing the partial overlap of four FBGs;
[0052] Figure 9 This is a schematic diagram showing four FBGs completely overlapping. Detailed Implementation
[0053] This invention proposes a multi-scale fiber grating multi-peak demodulation method that integrates attention mechanism, aiming to overcome the demodulation problem of traditional methods when fiber grating spectra overlap, and can still achieve high-precision demodulation with near-zero error, especially in extreme scenarios of complete overlap.
[0054] The multi-scale fiber grating multi-peak demodulation method with fused attention mechanism proposed in this invention will be described below in specific embodiments:
[0055] In the technical solution of this embodiment, such as Figure 1 As shown, a multi-scale fiber grating multi-peak demodulation method incorporating an attention mechanism includes the following steps:
[0056] Step 1: Perform data preprocessing on the fiber Bragg grating multi-peak reflectance spectrum data;
[0057] Step 2: Perform multi-scale feature extraction on the preprocessed spectral data;
[0058] Step 3: Apply a dual attention mechanism to process the extracted multi-scale features;
[0059] Step 4: Fuse the multi-scale features processed by the attention mechanism;
[0060] Step 5: Adaptive peak detection based on fusion features;
[0061] Step 6: Post-process the detected peak values;
[0062] The multi-scale feature extraction includes extracting multi-scale time-frequency features through continuous wavelet transform, extracting local features through a one-dimensional convolutional neural network, and extracting global statistical features through global context analysis; the dual attention mechanism includes a channel attention mechanism and a spatial attention mechanism.
[0063] Furthermore, the data preprocessing in step 1 specifically includes:
[0064] Spectral normalization: The original reflectance spectral signal is normalized to its maximum value, compressing the reflectance range to the [0,1] interval; and all spectral data are unified to the same wavelength range. The spectral normalization process uses the following formula:
[0065] ;
[0066] Where x is the original data, and x′ is the normalized result value. and These are the minimum and maximum values of the original data, respectively.
[0067] Noise filtering: Noise suppression is achieved using moving average filtering. The moving average filtering algorithm is as follows:
[0068] ;
[0069] in: The result after applying the sliding filter algorithm to this point; {x1,x2,…,xn} represents the point that has undergone the sliding mean filter and its n-1 adjacent data points;
[0070] Baseline correction: The background baseline is estimated using polynomial fitting, and the corrected spectrum is obtained by subtracting the fitted baseline.
[0071] ;
[0072] In the formula, These are the coefficients obtained by solving using the least squares method.
[0073] Furthermore, the multi-scale feature extraction in step 2 specifically includes:
[0074] Continuous wavelet transform feature extraction: Perform continuous wavelet transform at multiple different scales, extract the modulus maxima at each scale, and construct a multi-scale time-frequency feature map; the continuous wavelet transform feature extraction formula is:
[0075] ;
[0076] ;
[0077] in, It is the mother wavelet function; a is the scaling parameter, b is the translation parameter, and its corresponding wavelength in the spectrum. It is the normalization factor, and * denotes the complex conjugate of the mother wavelet function. The intensity corresponds to the spectrum;
[0078] One-dimensional convolutional neural network feature extraction: Multiple convolutional kernels of different sizes are used for parallel processing, and multi-level features are constructed through convolutional operations at different levels;
[0079] ;
[0080] Where * denotes a one-dimensional convolution operation, and N is the number of input channels. and , where are the weights and biases of the k-th convolutional kernel, and f is the activation function;
[0081] Global context feature extraction: Global average pooling is performed on the feature map to obtain the overall statistical features of the spectrum, and the mean, variance, skewness and kurtosis statistics of the spectrum are calculated.
[0082] Furthermore, the dual attention mechanism in step 3 specifically includes:
[0083] Channel attention mechanism: Global average pooling is performed on each feature channel to obtain channel statistical descriptors. The importance weights of each channel are learned through a fully connected network to achieve feature selection in the channel dimension.
[0084] Spatial attention mechanism: Max pooling and average pooling are performed on the feature map along the channel dimension to generate spatial descriptors. Spatial attention weight maps are generated through convolutional layers and activation functions to enhance the feature response of key regions.
[0085] Dual attention fusion: The channel attention and spatial attention weights are multiplied element-wise, and the fused attention weights are applied to recalibrate the original features.
[0086] Furthermore, the multi-scale feature fusion in step 4 specifically includes: unifying all feature maps to the same size through upsampling or downsampling, and stitching them together in the channel dimension; designing a feature interaction module to promote information flow between features of different scales, and using a gating mechanism to control the information flow during the feature fusion process; performing layer normalization on the fused features, and using adaptive pooling to compress the feature maps to a fixed size.
[0087] Furthermore, the adaptive peak detection in step 5 specifically includes:
[0088] Coarse localization of candidate peaks: Local maxima are detected on the fused feature response map, an adaptive threshold is set to filter weak response candidate peaks, and redundant detection is eliminated by neighborhood non-maximum suppression;
[0089] Asymmetric Gaussian fitting: The reflection peak is modeled using Gaussian functions with different left and right standard deviations. The fitting parameters are initialized based on the candidate peak position and characteristic response. An optimization algorithm is used to perform nonlinear least squares fitting.
[0090] ,
[0091] Where A is the height of the peak, μ is the center position of the peak, and σl and σr are the width parameters on the left and right sides of the center, respectively;
[0092] Confidence assessment system: Calculate the root mean square error of the fitting residuals to assess the fitting quality, check the consistency of the detection peaks across multiple scales, and calculate the confidence score by integrating multiple factors; set a dynamic threshold based on the confidence score to filter low-confidence detections.
[0093] Furthermore, the post-processing in step 6 specifically includes: achieving sub-pixel-level peak positioning through parabolic interpolation, calculating the center wavelength, and outputting the detection results.
[0094] Furthermore, it also includes:
[0095] Step 7: Implement online adaptive optimization of the algorithm through a feedback optimization mechanism, including confidence feedback adjustment and adaptive parameter update.
[0096] Verification experiment:
[0097] Figure 1 This diagram illustrates the non-overlapping nature of two FBGs in this invention, showcasing the spectral demodulation effect of the two non-overlapping fiber Bragg gratings: The upper figure shows the overall spectrum, with the black curve representing the measured spectrum and the dashed line corresponding to the theoretical spectra of FBG1 and FBG2. The true center wavelengths of the two FBGs are 1544.000 nm and 1544.500 nm, respectively, and the demodulated predicted values are completely consistent with the true values. The lower figure shows a magnified view of the spectra of the two FBGs, further clarifying the correspondence between the measured spectrum, the theoretical spectrum, and the peak wavelength. The demodulation error is 0.0000 nm, verifying the high-precision demodulation capability of this method for non-overlapping FBG spectra.
[0098] Figure 2The diagram below shows a partial overlap of two FBGs. The top image represents the overall spectrum, with the black curve representing the measured spectrum. The dashed and dotted lines correspond to the theoretical spectra of FBG1 and FBG2, respectively. The true center wavelengths of the two FBGs are 1544.250 nm (FBG1) and 1544.500 nm (FBG2). Their spectra overlap in the 1544.3–1544.4 nm range, but the demodulated predicted peak values perfectly match the true values, with an error of 0.0000 nm. The enlarged view below further clarifies that even in the spectral overlap region, this method can accurately distinguish between the measured and theoretical spectra of the two FBGs and achieve unbiased identification of characteristic wavelengths, demonstrating its strong anti-interference demodulation capability for partially overlapping FBG spectra.
[0099] Figure 3 This diagram illustrates the demodulation effect of two completely overlapping fiber Bragg gratings (FBGs) according to the present invention. The top image shows the overall spectrum, with the black curve representing the measured spectrum. The dashed and dotted lines correspond to the theoretical spectra of FBG1 and FBG2, respectively. The true center wavelength of both FBGs is 1544.500 nm (spectral overlap is complete), and the demodulated predicted peak value is completely consistent with the true value, with an error of 0.0000 nm. The enlarged view in the bottom image further clarifies that even with completely overlapping spectra and the characteristic peaks fused into a single waveform, this method can still accurately separate and identify the theoretical spectrum and characteristic wavelength of each FBG, achieving unbiased demodulation of completely overlapping FBGs and verifying its strong robustness in extreme overlap scenarios.
[0100] Figure 4 This diagram illustrates the non-overlapping nature of the three FBGs in this invention. The figure showcases the demodulation performance of the three spectrally non-overlapping fiber Bragg grating (FBG) sensing units: the top image shows the overall spectrum, the black curve represents the measured spectrum, and the dashed, dotted, and short dashed lines correspond to the theoretical spectra of FBG1, FBG2, and FBG3, respectively. The true center wavelengths of the three FBGs are 1543.700 nm, 1544.200 nm, and 1544.700 nm, respectively, with demodulation prediction errors of 0.1492 nm, 0.1492 nm, and 0.3060 nm. The enlarged view in the bottom image further clarifies the correspondence between the measured spectrum, theoretical spectrum, and peak wavelength of each FBG. Even in multi-FBG parallel sensing scenarios, this method can still effectively distinguish and quantitatively demodulate the characteristic wavelengths of each FBG, verifying its adaptability to non-overlapping multi-FBG systems.
[0101] Figure 5This is a schematic diagram illustrating the partial overlap of the three FBGs in this invention. The top image shows the overall spectrum, with the black curve representing the measured spectrum. The dashed line, dotted line, and short dashed line correspond to the theoretical spectra of FBG1, FBG2, and FBG3, respectively. The true center wavelengths of the three FBGs are 1544.300 nm, 1544.500 nm, and 1544.700 nm, respectively, and the errors between the demodulation prediction and the true values are 0.0003 nm, 0.0385 nm, and 0.0411 nm, respectively. The enlarged view in the bottom image further demonstrates that even with overlapping interference in the 1544.3–1544.6 nm range of the three FBGs, this method can still accurately separate the theoretical and measured spectra of each FBG and achieve low-bias identification of characteristic wavelengths. Combined with the error data in the figure, it can be seen that the demodulation deviations of the three partially overlapping FBGs are all within a very small order of magnitude (maximum error 0.0411 nm).
[0102] Figure 6 This is a schematic diagram showing the complete overlap of the three FBGs in this invention. The top image shows the overall spectrum, with the black curve representing the measured spectrum. The dashed line, dotted line, and short dashed line correspond to the theoretical spectra of FBG1, FBG2, and FBG3, respectively. The true center wavelength of all three FBGs is 1544.500 nm (the spectra are completely fused into a single waveform), and the demodulated predicted peak value is completely consistent with the true value, with an error of 0.0000 nm. The enlarged partial view in the bottom image further demonstrates that even with the complete overlap of the spectra of the three FBGs and the indistinguishability of the characteristic peaks, this method can still accurately separate the theoretical spectrum corresponding to each FBG and achieve unbiased identification of the characteristic wavelengths of each sensing unit.
[0103] Figure 7 This is a schematic diagram illustrating the non-overlapping nature of the four FBGs in this invention. The top figure shows the overall spectrum, with the black curve representing the measured spectrum. The dashed lines, dotted lines, short dashes, and long dashes correspond to the theoretical spectra of FBG1 through FBG4, respectively. The true center wavelengths of the four FBGs are 1543.600 nm, 1544.100 nm, 1544.600 nm, and 1545.100 nm, respectively. The errors between the demodulation prediction and the true values are 0.0498 nm (FBG1), 0.0001 nm (FBG2), 0.0422 nm (FBG3), and 0.2727 nm (FBG4), respectively. The enlarged partial view in the bottom figure further clarifies the correspondence between the measured spectra, theoretical spectra, and peak wavelengths of FBG1 through FBG3. Even in a 4-channel FBG parallel sensing scenario, this method can still effectively distinguish the characteristic wavelengths of each unit and achieve low-bias demodulation. As can be seen from the error data, the demodulation deviations of the four non-overlapping FBGs are all on the order of small magnitude, with the maximum error being 0.2727nm.
[0104] Figure 8This is a schematic diagram showing the partial overlap of the four FBGs in this invention. The top figure shows the overall spectrum, with the black curve representing the measured spectrum. The dashed lines, dotted lines, short dashes, and long dashes correspond to the theoretical spectra of FBG1 to FBG4, respectively. The true center wavelengths of the four FBGs are 1544.100 nm, 1544.300 nm, 1544.500 nm, and 1544.700 nm, respectively. The errors between the demodulation prediction and the true values are 0.0189 nm (FBG1), 0.0226 nm (FBG2), 0.0274 nm (FBG3), and 0.0844 nm (FBG4), respectively. The enlarged view in the bottom figure further shows that the spectra of the four FBGs have significant overlap and interference in the 1544.1~1544.6 nm range. However, this method can still accurately separate the theoretical and measured spectra of each FBG, achieving low-bias identification of characteristic wavelengths. The demodulation error shows that the deviations of the four partially overlapping FBGs are all within a very small range (the maximum error is only 0.0844nm).
[0105] Figure 9 This is a schematic diagram of the four completely overlapping FBGs of this invention. The top image shows the overall spectrum, with the black curve representing the measured spectrum. Different styles of dashed lines correspond to the theoretical spectra of FBG1 to FBG4, respectively. The true center wavelength of all four FBGs is 1544.500 nm (the spectra are completely fused into a single waveform). The error between the demodulated predicted peak and the true value is only 0.0001~0.0002 nm, which is negligible. The enlarged view in the bottom image further demonstrates that even if the spectra of the four FBGs have no visual distinction, this method can still accurately separate the theoretical spectrum corresponding to each FBG and achieve near-zero deviation identification of the characteristic wavelengths of each sensing unit. The demodulation results show that, in the extreme scenario of four completely overlapping FBGs, the proposed method achieves near-zero error demodulation performance.
[0106] In summary, the method of this invention performs best in the extreme case where the FBG spectra are completely overlapping. Regardless of whether there are 2, 3, or 4 FBGs, the demodulation error is close to or equal to zero (0.0000 - 0.0002 nm), demonstrating the method's powerful ability to accurately separate and identify the characteristic wavelengths of each FBG from a fused single spectral waveform.
[0107] In partially overlapping scenarios, this method can effectively overcome the mutual interference between spectra. For example... Figure 2 , 5 As shown in Figure 8, even with obvious overlapping regions, the demodulation error can still be kept at an extremely low level (maximum error 0.0844 nm), achieving accurate differentiation and low-bias demodulation of adjacent FBG characteristic wavelengths.
[0108] As the number of FBG sensing units increases (from 2 to 4), the method maintains reliable demodulation performance in both non-overlapping and partially overlapping scenarios. Although the error increases slightly with the number of units (especially in the non-overlapping 4FBG scenario), the overall deviation is manageable, verifying its effective adaptability to multi-FBG parallel sensing systems.
[0109] In all test scenarios, the demodulation error was generally in the sub-nanometer or even picometer range. Especially in cases of high overlap, the accuracy was even better, indicating that the core advantage of this method lies in handling spectral aliasing, rather than simply measuring isolated peaks.
[0110] The FBG demodulation method proposed in this application exhibits high precision, strong anti-interference capabilities, and excellent robustness. Its performance does not decrease with the increase of FBG spectral overlap; on the contrary, it shows near-perfect demodulation capability under extreme conditions of complete overlap, breaking through the limitations of traditional demodulation methods in spectral overlap. It is very suitable for use in FBG sensor networks in high-density, high-interference environments.
[0111] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A multi-scale fiber grating multi-peak demodulation method incorporating an attention mechanism, characterized in that, Includes the following steps: Step 1: Perform data preprocessing on the fiber Bragg grating multi-peak reflectance spectrum data; Step 2: Perform multi-scale feature extraction on the preprocessed spectral data; Step 3: Apply a dual attention mechanism to process the extracted multi-scale features; Step 4: Fuse the multi-scale features processed by the attention mechanism; Step 5: Adaptive peak detection based on fusion features; Step 6: Post-process the detected peak values; Step 7: Implement online adaptive optimization of the algorithm through a feedback optimization mechanism, including confidence feedback adjustment and adaptive parameter update; The multi-scale feature extraction includes extracting multi-scale time-frequency features through continuous wavelet transform, extracting local features through a one-dimensional convolutional neural network, and extracting global statistical features through global context analysis; the dual attention mechanism includes a channel attention mechanism and a spatial attention mechanism. The adaptive peak detection in step 5 specifically includes: Coarse localization of candidate peaks: Local maxima are detected on the fused feature response map, an adaptive threshold is set to filter weak response candidate peaks, and redundant detection is eliminated by neighborhood non-maximum suppression; Asymmetric Gaussian fitting: The reflection peak is modeled using Gaussian functions with different left and right standard deviations. The fitting parameters are initialized based on the candidate peak position and characteristic response. An optimization algorithm is used to perform nonlinear least squares fitting. , Where A is the peak height, μ is the center position of the peak, and σ l and σ r These are the width parameters for the left and right sides of the center, respectively; Confidence assessment system: Calculate the root mean square error of the fitting residuals to assess the fitting quality, check the consistency of the detection peaks across multiple scales, and calculate the confidence score by integrating multiple factors; set a dynamic threshold based on the confidence score to filter low-confidence detections.
2. The method according to claim 1, characterized in that, The data preprocessing in step 1 specifically includes: Spectral normalization: The original reflectance spectral signal is normalized to its maximum value, compressing the reflectance range to the [0,1] interval; and all spectral data are unified to the same wavelength range. The spectral normalization process uses the following formula: ; Where x is the original data, and x′ is the normalized result value. and These are the minimum and maximum values of the original data, respectively. Noise filtering: Noise suppression is achieved using moving average filtering. The moving average filtering algorithm is as follows: ; in: The result after applying the sliding filter algorithm to this point; {x1,x2,…,xn} represents the point that has undergone the sliding mean filter and its n-1 adjacent data points; Baseline correction: The background baseline is estimated using polynomial fitting, and the corrected spectrum is obtained by subtracting the fitted baseline.
3. The method according to claim 1, characterized in that, The multi-scale feature extraction in step 2 specifically includes: Continuous wavelet transform feature extraction: Perform continuous wavelet transform at multiple different scales, extract the modulus maxima at each scale, and construct a multi-scale time-frequency feature map; the continuous wavelet transform feature extraction formula is: ; ; in, It is the mother wavelet function; a is the scaling parameter, b is the translation parameter, and its corresponding wavelength in the spectrum. It is the normalization factor, and * denotes the complex conjugate of the mother wavelet function. The intensity corresponds to the spectrum; One-dimensional convolutional neural network feature extraction: Multiple convolutional kernels of different sizes are used for parallel processing, and multi-level features are constructed through convolutional operations at different levels; ; Where * denotes a one-dimensional convolution operation, and N is the number of input channels. and , where are the weights and biases of the k-th convolutional kernel, and f is the activation function; Global context feature extraction: Global average pooling is performed on the feature map to obtain the overall statistical features of the spectrum, and the mean, variance, skewness and kurtosis statistics of the spectrum are calculated.
4. The method according to claim 1, characterized in that, The dual attention mechanism in step 3 specifically includes: Channel attention mechanism: Global average pooling is performed on each feature channel to obtain channel statistical descriptors. The importance weights of each channel are learned through a fully connected network to achieve feature selection in the channel dimension. Spatial attention mechanism: Max pooling and average pooling are performed on the feature map along the channel dimension to generate spatial descriptors. Spatial attention weight maps are generated through convolutional layers and activation functions to enhance the feature response of key regions. Dual attention fusion: The channel attention and spatial attention weights are multiplied element-wise, and the fused attention weights are applied to recalibrate the original features.
5. The method according to claim 1, characterized in that, The multi-scale feature fusion in step 4 specifically includes: unifying all feature maps to the same size through upsampling or downsampling, and stitching them together in the channel dimension; designing a feature interaction module to promote information flow between features of different scales, and using a gating mechanism to control the information flow during the feature fusion process; performing layer normalization on the fused features, and using adaptive pooling to compress the feature maps to a fixed size.
6. The method according to claim 1, characterized in that, The post-processing in step 6 specifically includes: achieving sub-pixel-level peak localization through parabolic interpolation, calculating the center wavelength, and outputting the detection results.
Citation Information
Patent Citations
Raman spectrum characteristic peak segmentation method based on distance vector and probability vector output
CN120892805A
Fiber bragg grating multi-peak spectrum demodulation method and system
CN121231810A