An adaptive peak-finding method for overlapping spectral peaks in grating demodulation
Patent Information
- Application Number
- CN202611070384.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-18
- Publication Date
- 2026-10-16
AI Technical Summary
这使得仅凭单一光纤布拉格光栅的波长输出,无法区分波长漂移究竟来源于温度变化还是结构受力,导致即便找到重叠峰的位置也会因为波长漂移使得寻峰结果误差过大
通过双光栅参考法在硬件层面实现温度-应变的物理解耦,使传感光栅的波长漂移不再包含温度分量,从源头上解决了单一光栅无法区分波长漂移来源的问题,在此基础上,采用改进型质心法结合非线性拟合对温度补偿后的纯净应变光谱进行重叠峰高精度定位,避免了因温度漂移导致的累积寻峰误差,使各光栅中心波长的提取精度达到亚皮米级,且无需依赖大量训练数据。应变梯度物理校验进一步确保输出的应变值在空间分布上满足结构力学连续性约束,有效剔除因异常畸变导致的野值,从而提升了监测数据的可靠性与工程可信度。整套软硬件协同机制兼顾了解耦的物理完备性、寻峰的计算精度与实时性,为大跨度桥梁、超高层建筑等大型结构在昼夜温差大、监测点密集的实际工况下提供了一种可工程部署的高精度应变监测技术路径。
Smart Images

Figure CN122926028A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent sensor technology, and in particular to an adaptive peak-finding method for overlapping spectral peaks in grating demodulation. Background Technology
[0002] With the increasing service life of large buildings and the increasingly harsh service environments, ensuring their structural safety and durability has become a core concern in the engineering field. Traditional structural maintenance and management typically rely on periodic manual inspections and a limited number of point sensors to assess structural condition, making it difficult to achieve real-time, continuous, and full lifecycle status awareness. In recent years, with the advancement of urban renewal initiatives, the closed-loop management concept of monitoring, assessment, early warning, and feedback has gradually become an industry consensus, driving the transformation of structural health monitoring from problem-solving to problem prevention. Simultaneously, the integration of machine learning and digital twin technologies is significantly improving the accuracy and efficiency of monitoring, becoming an important development trend in this field.
[0003] In the existing technological system, fiber Bragg grating (FBG) sensing technology, with its core advantages such as resistance to electromagnetic interference, high sensitivity, small size, and the ability to achieve quasi-distributed measurement, has become one of the most promising sensing methods for health monitoring of large-scale building structures. Thanks to breakthroughs in key technologies such as online fabrication and femtosecond laser direct writing, tens of thousands or even hundreds of thousands of gratings can be fabricated with high consistency using a single optical fiber. Combined with high-capacity demodulation and multi-parameter networking mechanisms, large-scale grating array sensing networks suitable for long distances, wide areas, and complex environments have been successfully constructed. In practical engineering, FBG sensing networks have been widely used for real-time monitoring of multiple parameters such as strain, temperature, vibration, and displacement in large infrastructure such as bridges, tunnels, subways, and airport runways. However, the engineering deployment of FBG sensors still faces a series of technical challenges, the most fundamental and intractable of which is the cross-sensitivity problem of temperature and strain.
[0004] The basic sensing principle of fiber Bragg grating (FBG) sensors lies in the fact that changes in external physical quantities cause a shift in the center wavelength of the grating's reflection. By accurately measuring the wavelength shift, the magnitude of the measured physical quantity can be inferred. However, the reflected wavelength of a FBG is simultaneously affected by temperature and strain—temperature changes lead to the thermo-optical effect and thermal expansion effect of the fiber, while strain changes cause changes in the grating period and elastic-optical effect, both of which cause a center wavelength shift. Its typical cross-sensitivity is approximately 1°C, where a temperature change can produce a wavelength shift equivalent to 10 microstrain. In practical large-scale building monitoring scenarios, temperature and strain often change simultaneously and superimpose: the surface temperature gradient caused by sunlight, the ambient temperature fluctuations due to seasonal changes, and the mechanical responses of the structure itself, such as load strain, shrinkage, and creep, are completely coupled in the same wavelength shift signal. This makes it impossible to distinguish whether the wavelength shift originates from temperature changes or structural stress based solely on the wavelength output of a single FBG, resulting in excessively large errors in peak finding even when the location of overlapping peaks is found due to wavelength shift.
[0005] In view of this, the present invention proposes an adaptive peak-finding method for overlapping spectral peaks in grating demodulation to solve the above problems. Summary of the Invention
[0006] To overcome the aforementioned deficiencies of the prior art and to achieve the above objectives, the present invention provides the following technical solution: an adaptive peak-finding method for overlapping spectral peaks in grating demodulation, comprising: S1. Collect the current laser temperature, and according to the current laser temperature, send an instruction to the digital-to-analog converter to set the initial scan start wavelength and end wavelength of the tunable laser in the preset wavelength lookup table. The field-programmable gate array (FPGA) emits a synchronization pulse, triggering two independent photodetector channels. It then performs synchronous analog-to-digital conversion at a constant sampling rate to convert the two light intensity signals into a raw digital sequence. The FPGA preprocesses the raw digital sequence to obtain a clean reflectance spectrum sequence. S2. Perform cubic spline interpolation fitting on the reflectance spectrum sequence to accurately map the discrete scan points to the absolute wavelength, obtain the true spectral array with the horizontal axis in nanometers, determine the wavelength shift caused by the ambient temperature, and perform translation to obtain the compensated true spectral array; S3. Calculate the second derivative of the compensated true spectral array. The minimum point of the second derivative corresponds to the valley of the spectrum. Cut the entire broadband into N independent peak regions. Calculate the number of overlapping peaks in the peak regions. For each overlapping peak, calculate the initial center wavelength, initial linewidth, and initial amplitude. Based on the initial center wavelength, initial linewidth, and initial amplitude, construct a superimposed Gaussian model. Substitute the measured true spectral array and the superimposed Gaussian model into the iterator to determine the precise stress wavelength. S4. Retrieve strain values from adjacent measurement points in space, calculate the strain gradient, compare the strain gradient with the maximum shear strain threshold allowed by material mechanics, and determine whether the peak finding result is accurate based on the comparison result. If the peak finding result is inaccurate, return to S3, increase the damping coefficient of the iterator, and refit. If the peak finding result is accurate, write the new scanning center wavelength and scanning narrowband range into the hardware register for the next scan based on the actual peak wavelength position obtained in the current frame. During the next acquisition, the laser will only scan the narrowband interval containing these overlapping peaks.
[0007] Furthermore, the field-programmable gate array (FPGA) preprocesses the original digital sequence, including: The field-programmable gate array (FPGA) performs sliding median filtering on the original digital sequence to remove pulse spike noise, sets the average light intensity of the non-grating reflection area at the start of the scan to the baseline zero value, and normalizes the original digital sequence.
[0008] Furthermore, the wavelength shift caused by ambient temperature is determined, and a translation is performed to obtain the compensated true spectral array, including: The current center wavelength of the reference grating is determined using the centroid method. The difference between the current center wavelength and the initial wavelength calibrated at the factory is used to obtain the wavelength drift caused by the ambient temperature. Based on the temperature sensitivity coefficient of the grating, the horizontal axis of the true spectral array is shifted to the left by the wavelength drift unit to obtain the compensated true spectral array.
[0009] Furthermore, the number of overlapping peaks within the peak region is calculated, including: If a peak region contains only one peak, it is called a single-peak region. If a peak region contains multiple inflection points, it is called an overlapping peak region. Within the marked overlapping peak regions, the number of overlapping peaks is calculated using the improved centroid method. The specific steps for calculating the number of overlapping peaks are as follows: Calculate the wavelength spacing between the centroids of two adjacent clusters. If the wavelength spacing between the centroids of two adjacent clusters is less than the minimum wavelength resolution, then these two adjacent clusters are determined to belong to the same reflection peak and are merged. The number of clusters remaining after merging all clusters is recorded as the number of overlapping peaks accurately determined in the overlapping spectral region.
[0010] Furthermore, by substituting the measured true spectral array and the superimposed Gaussian model into the iterator, the precise force wavelength is determined, including: The algorithm uses local maxima within the region as the initial center wavelength, estimates the initial linewidth using the full width at half maximum (FWHM), and estimates the initial amplitude using the peak height. A superimposed Gaussian model is then constructed. The measured real spectral array and the superimposed Gaussian model are substituted into the iterator. The objective function is the sum of squared residuals. During the iteration process, the algorithm dynamically adjusts the initial amplitude, initial center wavelength, and initial linewidth. The algorithm stops when the rate of change of the sum of squared residuals is less than a preset threshold, and the initial center wavelength at this point is directly recorded as the precise stress wavelength.
[0011] Furthermore, strain values from adjacent measuring points in space are retrieved, and the strain gradient is calculated, including: After outputting the strain value of the current measuring point during the iterative peak finding process, the strain demodulation results of the fiber gratings that are spatially adjacent to the current measuring point on the same fiber are retrieved from the memory cache. The strain gradient of the local interval is obtained by calculating the difference between the strain value of the current measuring point and the strain value of the adjacent measuring point and dividing it by the actual physical distance between the two along the fiber laying direction.
[0012] Furthermore, the strain gradient is compared with the maximum permissible shear strain threshold in material mechanics, including: The calculated gradient value is compared with the maximum shear strain threshold allowed by the structural material in the elastic stage. If the strain gradient is less than or equal to the maximum shear strain threshold, the current peak finding result is determined to have passed the physical consistency check and is output. If the strain gradient exceeds the maximum shear strain threshold, the strain change at the current measuring point is determined to be inconsistent with the overall coordinated deformation law of the structure, the data point is marked as a suspicious outlier, and refitting is triggered.
[0013] Furthermore, the current center wavelength of the reference grating is determined using the centroid method. The difference between the current center wavelength and the initial wavelength calibrated at the factory is used to obtain the wavelength shift caused by the ambient temperature, including: The specific formula for determining the current center wavelength of the reference grating using the centroid method is as follows: ;in, The current center wavelength, To reference the wavelength value corresponding to the i-th sampling point in the grating reflection spectrum, Let p and q be the reflected light power intensity corresponding to the i-th sampling point, and p and q be the indices of the start and end sampling points of the reference grating reflection peak. The wavelength shift caused by ambient temperature is obtained by subtracting the initial wavelength specified at the factory from the wavelength specified at the factory. The specific formula is as follows: ;in, The initial center wavelength of the reference grating under factory calibration conditions, The wavelength shift of the reference grating caused by temperature changes.
[0014] Furthermore, using local maxima within the region as the initial center wavelength, the initial linewidth is estimated using the full width at half maximum (FWHM), and the initial amplitude is estimated using the peak height, including: Using the local maximum point in the region as the initial value of the center wavelength is as follows: within the wavelength range covered by the divided clusters, traverse all sampling points, find the point with the highest reflected light power, and use the wavelength corresponding to this point as the initial value of the center wavelength of the peak. The specific steps for estimating the initial linewidth using full width at half maximum (FWHM) are as follows: First, determine the maximum amplitude of the overlapping peak. Extend from the peak point to the left and right sides respectively to find the wavelength position when the reflected power drops to half of the maximum amplitude. Use linear interpolation to accurately interpolate the position of the FWHM between two adjacent sampling points. Record the wavelength difference between the left and right FWHM as the full width at half maximum (FWHM). The initial amplitude is estimated using the peak height by taking the reflected power value corresponding to the local maximum point within the cluster.
[0015] Furthermore, by calculating the difference between the strain value at the current measuring point and the strain values at adjacent measuring points, and dividing by the actual physical distance between them along the fiber optic laying direction, the strain gradient of this local interval is obtained, including: The pure strain value at the current measuring point is obtained through iterative fitting. Retrieve the strain value of the previous measuring point adjacent to the current measuring point along the fiber laying direction. and the strain value at the next measuring point And read the actual physical distance between two adjacent measuring points along the structural surface recorded during the deployment design. The specific calculation formula is as follows: ,in, This represents the local strain gradient at the current measuring point i.
[0016] The technical effects and advantages of the adaptive peak-finding method for overlapping spectral peaks in grating demodulation according to the present invention are as follows: By employing a dual-grating reference method, physical decoupling of temperature and strain is achieved at the hardware level. This eliminates the temperature component from the wavelength drift of the sensing grating, fundamentally solving the problem that a single grating cannot distinguish the source of wavelength drift. Building upon this, an improved centroid method combined with nonlinear fitting is used to precisely locate overlapping peaks in the temperature-compensated pure strain spectrum. This avoids cumulative peak-finding errors caused by temperature drift, achieving sub-picometer precision in extracting the center wavelength of each grating without relying on extensive training data. Physical verification of the strain gradient further ensures that the output strain values spatially satisfy structural mechanical continuity constraints, effectively eliminating outliers caused by abnormal distortion, thereby improving the reliability and engineering credibility of the monitoring data. This entire hardware and software collaborative mechanism balances the physical completeness of decoupling with the computational accuracy and real-time performance of peak finding, providing a deployable high-precision strain monitoring technology for large structures such as long-span bridges and super high-rise buildings under actual conditions of large diurnal temperature variations and dense monitoring points. Attached Figure Description
[0017] Figure 1 A flowchart of an adaptive peak finding method for overlapping spectral peaks in grating demodulation provided in this application embodiment; Figure 2 A schematic diagram illustrating the process of determining the wavelength shift caused by ambient temperature and shifting it to obtain a compensated true spectral array, as provided in this embodiment of the application. Figure 3 This is a schematic diagram illustrating the process of using local maxima within a region as the initial center wavelength, estimating the initial linewidth using the full width at half maximum (FWHM), and estimating the initial amplitude using the peak height, as provided in the embodiments of this application. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] This application provides an adaptive peak-finding method for overlapping spectral peaks in grating demodulation. Based on a laser temperature-to-wavelength lookup table, the scanning start and end wavelengths of the tunable laser are set via a digital-to-analog converter (DAC). A field-programmable gate array (FPGA) emits a synchronization pulse to trigger dual-channel synchronous sampling and analog-to-digital conversion. The original digital sequence undergoes sliding median filtering, baseline zeroing, and normalization preprocessing to output a clean reflection spectrum sequence. Cubic spline interpolation is performed on the spectral sequence to map the number of scan points to absolute wavelengths. The temperature drift is calculated using the difference between the centroid wavelength of the reference grating and the factory calibration value. The wavelength axis of the sensed spectrum is then shifted backward by this drift to obtain a compensated spectrum free from temperature effects. The second derivative of the compensated spectrum is calculated, and the minimum point of the second derivative is used as the valley to widen the spectrum. The system is divided into independent peak regions. Within the marked overlapping peak regions, an improved centroid method is used to determine the number of overlapping peaks. For each peak, the initial center wavelength is determined using local maxima, the initial linewidth is calculated using full width at half maximum (FWHM), and the initial amplitude is set using peak height. A superimposed Gaussian model is constructed and then fed into an iterator for nonlinear least-squares fitting. After convergence, the accurate stress wavelength is output. The strain gradient is calculated by retrieving strain values from adjacent spatial measurement points and compared with the maximum shear strain threshold allowed by material mechanics. If the threshold is exceeded, the system reverts to the fitting step, increases the damping coefficient, and iterates again. If the verification is successful, a new scanning center wavelength and narrowband range are written to the hardware register for the next scan based on the actual peak wavelength position of the current frame.
[0020] Please see Figure 1 This is a flowchart illustrating an adaptive peak-finding method for overlapping spectral peaks in grating demodulation provided in this application embodiment. The method includes the following steps: S1. Collect the current laser temperature, and according to the current laser temperature, send an instruction to the digital-to-analog converter to set the initial scan start wavelength and end wavelength of the tunable laser based on the corresponding initial scan start wavelength and end wavelength in the preset wavelength lookup table. The field-programmable gate array (FPGA) emits a synchronization pulse, triggering two independent photodetector channels. It then performs synchronous analog-to-digital conversion at a constant sampling rate to convert the two light intensity signals into a raw digital sequence. The FPGA preprocesses the raw digital sequence to obtain a clean reflectance spectrum sequence. S2. Perform cubic spline interpolation fitting on the reflectance spectrum sequence to accurately map the discrete scan points to the absolute wavelength, obtain the true spectral array with the horizontal axis in nanometers, determine the wavelength drift caused by the ambient temperature, and perform translation to obtain the compensated true spectral array; S3. Calculate the second derivative of the compensated true spectral array. The minimum point of the second derivative corresponds to the valley of the spectrum. Cut the entire broadband into N independent peak regions. Calculate the number of overlapping peaks in the peak regions. For each overlapping peak, calculate the initial center wavelength, initial linewidth, and initial amplitude. Based on the initial center wavelength, initial linewidth, and initial amplitude, construct a superimposed Gaussian model. Substitute the measured true spectral array and the superimposed Gaussian model into the iterator to determine the precise stress wavelength. S4. Retrieve strain values from adjacent measurement points in space, calculate the strain gradient, compare the strain gradient with the maximum shear strain threshold allowed by material mechanics, and determine whether the peak finding result is accurate based on the comparison result. If the peak finding result is inaccurate, return to S3, increase the damping coefficient of the iterator, and refit. If the peak finding result is accurate, write the new scanning center wavelength and scanning narrowband range into the hardware register for the next scan based on the actual peak wavelength position obtained in the current frame. During the next acquisition, the laser will only scan the narrowband interval containing these overlapping peaks.
[0021] Furthermore, the field-programmable gate array (FPGA) preprocesses the original digital sequence, including: The field-programmable gate array (FPGA) performs sliding median filtering on the original digital sequence to remove pulse spike noise, sets the average light intensity of the non-grating reflection area at the start of the scan to the baseline zero value, and normalizes the original digital sequence.
[0022] In this embodiment, the field-programmable gate array (FPGA) is embedded in the fiber Bragg grating demodulator as a high-speed data preprocessing unit. After the analog-to-digital converter (ADC) converts the two photoelectric detection signals into raw digital sequences at a sampling rate of 20 MHz, the FPGA reads five consecutive sampling points from the first-in-first-out (FIFO) buffer in real time during each sampling clock cycle, performs bubble sorting on them, and takes the median as the effective output of the current point. This allows the sliding median filtering to be completed before the next sampling point arrives, effectively eliminating narrow pulse spike noise caused by circuit jitter or strong electromagnetic interference. After filtering, the FPGA accumulates the sampling values of the initial scan segment and averages them, setting this average value as the baseline zero. This baseline value is then subtracted from all subsequent sampling points to eliminate the fixed bias caused by dark current and background light. Subsequently, the FPGA searches for the maximum value of all sampling points throughout the entire scan cycle, divides each sampling point by this maximum value, and compresses the amplitude to a normalized range of 0 to 1.
[0023] Sliding median filtering performs denoising at the hardware level with a nanosecond delay, avoiding the amplification of large impulse noise into spurious peaks during subsequent interpolation and fitting processes; baseline zeroing eliminates inconsistencies between channels and DC bias caused by temperature drift, ensuring that all spectral data have a unified reference benchmark; normalization eliminates the interference of light source output power fluctuations and fiber link loss variations on amplitude, making subsequent determination of overlapping peak counts and initial value estimation based on amplitude independent of absolute light intensity, thereby significantly improving the algorithm's adaptability and stability under different operating conditions.
[0024] Furthermore, the wavelength shift caused by ambient temperature is determined, and a translation is performed to obtain the compensated true spectral array, including: The current center wavelength of the reference grating is determined using the centroid method. The difference between the current center wavelength and the initial wavelength calibrated at the factory is used to obtain the wavelength drift caused by the ambient temperature. Based on the temperature sensitivity coefficient of the grating, the horizontal axis of the true spectral array is shifted to the left by the wavelength drift unit to obtain the compensated true spectral array.
[0025] In this embodiment, please refer to Figure 2 This is a flowchart illustrating the process of determining the wavelength shift caused by ambient temperature and performing a translation to obtain a compensated true spectral array, as provided in this embodiment of the application. During factory calibration, the initial center wavelength of the reference grating was precisely measured in a constant-temperature laboratory environment, with an initial value of 1550.123 nm. In the actual monitoring field, after acquiring the reflection spectrum of the reference grating at a constant sampling period, an effective data interval of twice the full width at half maximum (WHM) on both sides of the reference peak was extracted. The wavelength values of all sampling points within this interval were weighted and averaged according to their corresponding optical power (centroid method), yielding a current center wavelength of 1550.327 nm. Subtracting the factory calibration value from the current center wavelength yielded a wavelength shift of 0.204 nm caused by the ambient temperature change. The preset temperature sensitivity coefficient stored in the configuration file was read, and a horizontal coordinate translation operation was performed on the entire true spectral array of the sensing grating: for each sampling point in the array, its original wavelength value was subtracted by 0.204 nm. If the translated sampling point fell outside the original sampling grid, a compensated spectral array was obtained by resampling using cubic spline interpolation.
[0026] The centroid method effectively suppresses the influence of noise and asymmetric distortion on the determination of the center wavelength by performing a weighted average with optical power as the weight within the effective window, making the measurement accuracy of temperature drift better than 1 picometer. The overall translation of the horizontal axis directly eliminates the temperature interference at the physical level, so that the compensated spectral array only retains the wavelength change caused by strain, fundamentally solving the problem of wavelength ambiguity caused by temperature sensitivity. Moreover, this operation does not rely on any data-driven training or iterative optimization, has clear physical meaning and extremely high computational efficiency, and provides a pure spectral input for the accurate positioning of subsequent overlapping peaks.
[0027] Furthermore, the number of overlapping peaks within the peak region is calculated, including: If a peak region contains only one peak, it is called a single-peak region. If a peak region contains multiple inflection points, it is called an overlapping peak region. Within the marked overlapping peak regions, the number of overlapping peaks is calculated using the improved centroid method. The specific steps for calculating the number of overlapping peaks are as follows: Calculate the wavelength spacing between the centroids of two adjacent clusters. If the wavelength spacing between the centroids of two adjacent clusters is less than the minimum wavelength resolution, then these two adjacent clusters are determined to belong to the same reflection peak and are merged. The number of clusters remaining after merging all clusters is recorded as the number of overlapping peaks accurately determined in the overlapping spectral region.
[0028] In this embodiment, for each independent peak region cut off by the valley of the second derivative in the compensated sensing spectral array, the number of overlapping peaks is determined one by one. Taking a suspected overlapping region with a width of 0.8 nm as an example, the second derivative is first calculated for all sampling points in this region. Sampling points with negative second derivatives are selected, and their absolute values are taken as curvature intensity. An adaptive threshold of 8% of the maximum curvature value of this region is set, and all points with curvature intensity below this threshold are removed, retaining only candidate points with significant signal energy. Then, scanning is performed along the wavelength direction, and consecutive candidate points are merged into an initial cluster. Assuming that three clusters are obtained from the initial clustering, the software calculates the curvature-weighted average position of each cluster as the centroid of the cluster. The three centroids are located at 1549.920 nm, 1550.180 nm, and 1550.440 nm, respectively, with adjacent centroid distances of 0.260 nm and 0.260 nm, respectively. The preset minimum wavelength resolution threshold of 0.20 nm is read. This threshold is determined by half the bandwidth of a single fiber grating. In this embodiment, the bandwidth of a single grating is 0.40 nm. Therefore, 0.20 nm is the minimum spacing between two resolvable independent peaks. If the two centroids are closer than this value, they cannot be physically determined to be two independent gratings. The comparison results show that 0.260 nm is greater than 0.20 nm. Both spacings meet the independent peak determination condition. Therefore, all three clusters are retained, and the software outputs that the number of overlapping peaks in the overlapping region is 3.
[0029] By changing the judgment criterion from the power fluctuations of the original spectrum to the curvature distribution, it is possible to effectively distinguish the situation where the original spectrum only presents a broad and gentle convex hull when there is severe overlap, but actually contains multiple peaks. At the same time, the merging mechanism based on the centroid spacing avoids over-segmentation caused by the small fluctuations at the top of a single broad peak, ensuring the accuracy of the subsequent fitting order and fundamentally preventing fitting divergence or false peak output caused by incorrect peak number estimation.
[0030] Furthermore, by substituting the measured true spectral array and the superimposed Gaussian model into the iterator, the precise force wavelength is determined, including: The algorithm uses local maxima within the region as the initial center wavelength, estimates the initial linewidth using the full width at half maximum (FWHM), and estimates the initial amplitude using the peak height. A superimposed Gaussian model is then constructed. The measured real spectral array and the superimposed Gaussian model are substituted into the iterator. The objective function is the sum of squared residuals. During the iteration process, the algorithm dynamically adjusts the initial amplitude, initial center wavelength, and initial linewidth. The algorithm stops when the rate of change of the sum of squared residuals is less than a preset threshold, and the initial center wavelength at this point is directly recorded as the precise stress wavelength.
[0031] In this embodiment, after determining the number of overlapping peaks, initial parameters are determined for each of the three independent reflection peaks identified within the overlapping region. For the first peak, the sampling point with the highest reflection power is searched within the wavelength range of its cluster. This point is located at 1549.920 nm with an amplitude of 0.85. The software records this wavelength and amplitude as the initial center wavelength and initial amplitude of the peak, respectively. Extending outwards from the peak point, the left and right half-width wavelengths when the power drops to 0.425 (half of 0.85) are found. The full width at half-width is obtained as 0.35 nm through linear interpolation, which is then divided by 2.3548 to convert to an initial standard deviation of 0.149 nm. Similarly, after estimating the initial values for the other two peaks, a superimposed Gaussian model containing three Gaussian terms, with each term's initial parameter being its own measured value, is constructed as the initial fitting curve. All sampling points in the overlapping region of the compensated true spectral array are used as observations and substituted into the iterator along with the initial model. The objective function is set as the sum of squares of the differences between the measured values and the model predictions at each sampling point. The iterator calculates the residual sum of squares in the first round. In each iteration, the Jacobian matrix is calculated to determine the parameter update direction, and a damping coefficient is introduced to control the step size. Nine parameters, including the amplitude, center wavelength, and linewidth of each of the three peaks, are gradually adjusted. The iteration stops when the rate of change of the residual sum of squares is less than a preset threshold. The center wavelength parameter value of the first peak after iteration convergence is directly read and output as the accurate stress wavelength record of the grating in this frame scan.
[0032] By assigning reasonable initial values to each peak, the iterator starts from a position close to the true solution, avoiding convergence to local extrema or iteration divergence due to excessive deviation of the initial values. Nonlinear least squares fitting utilizes sampling point information across the entire band rather than relying solely on a single extremum point for judgment, enabling the final output center wavelength accuracy to reach sub-picometer level, far superior to the accuracy of traditional maximum value method or centroid method. It balances convergence speed and stability, meeting the dual requirements of real-time performance and accuracy for large-scale structural health monitoring.
[0033] Furthermore, strain values from adjacent measuring points in space are retrieved, and the strain gradient is calculated, including: After outputting the strain value of the current measuring point during the iterative peak finding process, the strain demodulation results of the fiber gratings that are spatially adjacent to the current measuring point on the same fiber are retrieved from the memory cache. The strain gradient of the local interval is obtained by calculating the difference between the strain value of the current measuring point and the strain value of the adjacent measuring point and dividing it by the actual physical distance between the two along the fiber laying direction.
[0034] In this embodiment, it is assumed that three fiber grating measurement points, numbered 15, 16, and 17, are sequentially connected in series along the fiber laying direction, with an adjacent spacing of 0.5 meters. After the iterator in step S3 completes the spectral fitting of measurement point 16, it outputs the strain value of this measurement point as 120 microstrain, and then triggers the physical consistency verification process. Immediately, the strain value of measurement point 15 (100 microstrain) and the strain value of measurement point 17 (145 microstrain), which have passed the previous verification, are read from the memory cache. Using the central difference method, the strain difference of measurement point 17 and measurement point 15 (45 microstrain) is divided by the span of the two points, 1.0 meter (i.e., twice 0.5 meters), to calculate the local strain gradient at measurement point 16 as 45 microstrain per meter. The software then compared the gradient value 45 with the maximum allowable shear strain gradient threshold of 40 microstrain per meter for the structural material in the elastic stage. It found that the gradient exceeded the allowable range of material mechanics, that is, the strain abrupt change at the measuring point did not conform to the deformation continuity law of the structure. The software determined that the current peak finding result was physically unreliable, so it marked the 16th measuring point as suspicious data and rolled back to step S3. The damping coefficient of the iterator was increased from the initial value of 0.001 to 0.01, and the spectrum of the measuring point was re-fitted nonlinearly until the fitting result passed the gradient verification or reached the maximum number of refits before being reported.
[0035] Strain gradient verification utilizes the prior physical knowledge of the inherent continuity of the deformation field of large structures under load. Without relying on any additional hardware, it can identify and eliminate outliers caused by severe spectral distortion or local convergence anomalies of the algorithm at the software level. This effectively prevents erroneous data from a single measuring point from polluting the entire strain field distribution, significantly improving the false alarm suppression capability and data output reliability of the monitoring system.
[0036] Furthermore, the strain gradient is compared with the maximum permissible shear strain threshold in material mechanics, including: The calculated gradient value is compared with the maximum shear strain threshold allowed by the structural material in the elastic stage. If the strain gradient is less than or equal to the maximum shear strain threshold, the current peak finding result is determined to have passed the physical consistency check and is output. If the strain gradient exceeds the maximum shear strain threshold, the strain change at the current measuring point is determined to be inconsistent with the overall coordinated deformation law of the structure, the data point is marked as a suspicious outlier, and refitting is triggered.
[0037] In this embodiment, after calculating the strain gradient at measuring point 16 to be 45 microstrains per meter, the allowable parameters of the steel used in the bridge structure in the elastic stage are immediately retrieved to determine the maximum shear strain threshold as 40 microstrains per meter. A comparison is performed: 45 is greater than 40, indicating that the strain abrupt change at this measuring point exceeds the allowable range of material mechanics. Specifically, the strain value of 120 microstrain at this point exhibits an excessively steep abrupt change compared to the 100 and 145 microstrains at its adjacent measuring points. This does not conform to the mechanical law that the strain field of a simply supported beam should exhibit a continuous parabolic distribution under this load condition. Therefore, this data point is marked as a suspicious outlier, not output to the monitoring database, and the refitting process is triggered. The damping coefficient of the iterator is automatically increased to 0.01 before the spectral data of this measuring point is refitted.
[0038] In another embodiment, if the strain gradient calculated at a certain measuring point is 25 microstrains per meter, which is less than the threshold of 40, the software determines that the current peak finding result meets the structural deformation continuity constraint, accepts it with confidence, and outputs the strain value. If the spectrum of the measuring point fails to pass the gradient verification after refitting due to low signal-to-noise ratio or severe spectral distortion, the software marks the measuring point as a sensor failure and reports an operation and maintenance alarm after three consecutive refitting failures.
[0039] By introducing a clear physical boundary condition—the maximum shear strain threshold allowed by mechanics of materials—the software can determine the validity of the fitted output values without additional hardware costs. Fitting results that do not conform to physical laws are intercepted and removed before data reporting, effectively preventing individual measurement point values from being misled by severe spectral distortion, thus significantly improving the engineering reliability and alarm accuracy of the monitoring data.
[0040] Furthermore, the current center wavelength of the reference grating is determined using the centroid method. The difference between the current center wavelength and the initial wavelength calibrated at the factory is used to obtain the wavelength shift caused by the ambient temperature, including: The specific formula for determining the current center wavelength of the reference grating using the centroid method is as follows: ;in, The current center wavelength, To reference the wavelength value corresponding to the i-th sampling point in the grating reflection spectrum, Let p and q be the reflected light power intensity corresponding to the i-th sampling point, and p and q be the indices of the start and end sampling points of the reference grating reflection peak. The wavelength shift caused by ambient temperature is obtained by subtracting the initial wavelength specified at the factory from the wavelength specified at the factory. The specific formula is as follows: ;in, The initial center wavelength of the reference grating under factory calibration conditions, The wavelength shift of the reference grating caused by temperature changes.
[0041] In this embodiment, after receiving the reflection spectrum array of the reference grating, a 2-nanometer range is selected on both sides of the initial center wavelength of 1550.000 nm, based on the factory-calibrated initial center wavelength of the grating, to eliminate interference from far-end noise. Within this window, all sampling points are traversed, and the wavelength value of each sampling point is weighted, multiplied, and accumulated with its corresponding reflected light power intensity. This sum is then divided by the accumulated light power intensity of all sampling points, and the center wavelength of the current reference grating's reflection peak is calculated to be 1550.235 nm using the centroid method formula. Subsequently, the software retrieves the factory-calibrated initial center wavelength of 1550.000 nm from the configuration file, subtracts the initial value from the current value, and obtains the wavelength shift caused by temperature, which is +0.235 nm. A positive value indicates that the current ambient temperature is higher than the factory-calibrated temperature, and the grating's reflection peak has redshifted towards longer wavelengths.
[0042] The centroid method calculates the center wavelength by power weighted averaging of all sampling points within the effective window. Even if the reflection spectrum of the reference grating has slight asymmetric distortion or random noise, the weighted averaging can effectively smooth these disturbances, making the positioning accuracy of the center wavelength much better than the method that simply relies on the maximum point. This ensures the accuracy and repeatability of the temperature drift calculation, providing a high-precision temperature reference for subsequent spectral shift compensation. Moreover, the entire calculation process does not require iteration, and the time taken for a single calculation is in the millisecond range, which fully meets the needs of real-time monitoring.
[0043] Furthermore, using local maxima within the region as the initial center wavelength, the initial linewidth is estimated using the full width at half maximum (FWHM), and the initial amplitude is estimated using the peak height, including: Using the local maximum point in the region as the initial value of the center wavelength is as follows: within the wavelength range covered by the divided clusters, traverse all sampling points, find the point with the highest reflected light power, and use the wavelength corresponding to this point as the initial value of the center wavelength of the peak. The specific steps for estimating the initial linewidth using full width at half maximum (FWHM) are as follows: First, determine the maximum amplitude of the overlapping peak. Extend from the peak point to the left and right sides respectively to find the wavelength position when the reflected power drops to half of the maximum amplitude. Use linear interpolation to accurately interpolate the position of the FWHM between two adjacent sampling points. Record the wavelength difference between the left and right FWHM as the full width at half maximum (FWHM). The initial amplitude is estimated using the peak height by taking the reflected power value corresponding to the local maximum point within the cluster.
[0044] In this embodiment, please refer to Figure 3 This is a flowchart illustrating the process of using local maxima within a region as the initial center wavelength, estimating the initial linewidth using the full width at half maximum (FWHM), and estimating the initial amplitude using the peak height, as provided in this embodiment of the application. For each independent cluster already divided within the overlapping region, let the wavelength range covered by the k-th cluster be... A local maximum point within a region is defined as a wavelength that satisfies the following condition: ;in, For the true spectral array, The wavelength value on the horizontal axis corresponding to the maximum value of reflected power; For the k-th cluster for The corresponding peak reflected power, the reflected power on both sides of the peak is exactly half of the peak. The two wavelength points are denoted as the left half-height wavelength. and the right half-high wavelength Obtained through linear interpolation : ,in, and The wavelengths of the two adjacent sampling points to the left of the peak value. and They are respectively and The corresponding reflected power value is based on the left half-high wavelength. and the right half-high wavelength The specific formula for calculating the full width at half height is: ,in, and The calculation is similar, but the interpolation direction is changed to the right of the peak. During the fitting process, the reflectance spectrum is modeled as a Gaussian function, with its linewidth parameter expressed in terms of standard deviation. (Standard deviation of the Gaussian function) There is a fixed proportional relationship between the half-height and full-width, specifically: Therefore, the formula for calculating the initial line width can be obtained as follows: ; The initial amplitude estimated using the peak height corresponds to the theoretical peak reflection power intensity of each independent reflection peak, while the peak reflection power recorded when the local maximum value is directly taken. .
[0045] Furthermore, by calculating the difference between the strain value at the current measuring point and the strain values at adjacent measuring points, and dividing by the actual physical distance between them along the fiber optic laying direction, the strain gradient of this local interval is obtained, including: The pure strain value at the current measuring point is obtained through iterative fitting. Retrieve the strain value of the previous measuring point adjacent to the current measuring point along the fiber laying direction. and the strain value at the next measuring point And read the actual physical distance between two adjacent measuring points along the structural surface recorded during the deployment design. The specific calculation formula is as follows: ,in, This represents the local strain gradient at the current measuring point i.
[0046] In this embodiment, the strain values on both sides of the current measuring point are used together in the calculation, which can more accurately reflect the local change trend at the current measuring point than using only one-sided difference. Furthermore, since the calculation process involves the mean effect of three measuring points, the influence of random noise at a single measuring point on the gradient result is effectively suppressed, improving the reliability of gradient determination. At the same time, the calculation only involves simple arithmetic operations, which can be completed in microseconds after each peak finding output, providing real-time and accurate physical quantity input for subsequent comparison with material thresholds.
[0047] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0048] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0049] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0050] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0051] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0052] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. An adaptive peak-finding method for overlapping spectral peaks in grating demodulation, characterized in that, Includes the following steps: S1. Collect the current laser temperature, and according to the current laser temperature, send an instruction to the digital-to-analog converter to set the initial scan start wavelength and end wavelength of the tunable laser in the preset wavelength lookup table. The field-programmable gate array (FPGA) emits a synchronization pulse, triggering two independent photodetector channels. It then performs synchronous analog-to-digital conversion at a constant sampling rate to convert the two light intensity signals into a raw digital sequence. The FPGA preprocesses the raw digital sequence to obtain a clean reflectance spectrum sequence. S2. Perform cubic spline interpolation fitting on the reflectance spectrum sequence to accurately map the discrete scan points to the absolute wavelength, obtain the true spectral array with the horizontal axis in nanometers, determine the wavelength shift caused by the ambient temperature, and perform translation to obtain the compensated true spectral array; S3. Calculate the second derivative of the compensated true spectral array. The minimum point of the second derivative corresponds to the valley of the spectrum. Cut the entire broadband into N independent peak regions. Calculate the number of overlapping peaks in the peak regions. For each overlapping peak, calculate the initial center wavelength, initial linewidth, and initial amplitude. Based on the initial center wavelength, initial linewidth, and initial amplitude, construct a superimposed Gaussian model. Substitute the measured true spectral array and the superimposed Gaussian model into the iterator to determine the precise stress wavelength. S4. Retrieve strain values from adjacent measurement points in space, calculate the strain gradient, compare the strain gradient with the maximum shear strain threshold allowed by material mechanics, and determine whether the peak finding result is accurate based on the comparison result. If the peak finding result is inaccurate, return to S3, increase the damping coefficient of the iterator, and refit. If the peak finding result is accurate, write the new scanning center wavelength and scanning narrowband range into the hardware register for the next scan based on the actual peak wavelength position obtained in the current frame. During the next acquisition, the laser will only scan the narrowband interval containing these overlapping peaks.
2. The adaptive peak-finding method for overlapping spectral peaks in grating demodulation as described in claim 1, characterized in that, The field-programmable gate array (FPGA) preprocesses the original digital sequence, including: The field-programmable gate array (FPGA) performs sliding median filtering on the original digital sequence to remove pulse spike noise, sets the average light intensity of the non-grating reflection area at the start of the scan to the baseline zero value, and normalizes the original digital sequence.
3. The adaptive peak-finding method for overlapping spectral peaks in grating demodulation as described in claim 1, characterized in that, The process of determining the wavelength shift caused by ambient temperature and then shifting it to obtain the compensated true spectral array includes: The current center wavelength of the reference grating is determined using the centroid method. The difference between the current center wavelength and the initial wavelength calibrated at the factory is used to obtain the wavelength drift caused by the ambient temperature. Based on the temperature sensitivity coefficient of the grating, the horizontal axis of the true spectral array is shifted to the left by the wavelength drift unit to obtain the compensated true spectral array.
4. The adaptive peak-finding method for overlapping spectral peaks in grating demodulation as described in claim 1, characterized in that, The number of overlapping peaks within the calculated peak region includes: If a peak region contains only one peak, it is called a single-peak region. If a peak region contains multiple inflection points, it is called an overlapping peak region. Within the marked overlapping peak regions, the number of overlapping peaks is calculated using the improved centroid method. The specific steps for calculating the number of overlapping peaks are as follows: Calculate the wavelength spacing between the centroids of two adjacent clusters. If the wavelength spacing between the centroids of two adjacent clusters is less than the minimum wavelength resolution, then these two adjacent clusters are determined to belong to the same reflection peak and are merged. The number of clusters remaining after merging all clusters is recorded as the number of overlapping peaks accurately determined in the overlapping spectral region.
5. The adaptive peak-finding method for overlapping spectral peaks in grating demodulation as described in claim 1, characterized in that, The step of substituting the measured real spectral array and the superimposed Gaussian model into the iterator to determine the precise force wavelength includes: The algorithm uses local maxima within the region as the initial center wavelength, estimates the initial linewidth using the full width at half maximum (FWHM), and estimates the initial amplitude using the peak height. A superimposed Gaussian model is then constructed. The measured real spectral array and the superimposed Gaussian model are substituted into the iterator. The objective function is the sum of squared residuals. During the iteration process, the algorithm dynamically adjusts the initial amplitude, initial center wavelength, and initial linewidth. The algorithm stops when the rate of change of the sum of squared residuals is less than a preset threshold, and the initial center wavelength at this point is directly recorded as the precise stress wavelength.
6. The adaptive peak-finding method for overlapping spectral peaks in grating demodulation as described in claim 1, characterized in that, The process of retrieving strain values from adjacent spatial measuring points and calculating the strain gradient includes: After outputting the strain value of the current measuring point during the iterative peak finding process, the strain demodulation results of the fiber gratings that are spatially adjacent to the current measuring point on the same fiber are retrieved from the memory cache. The strain gradient of the local interval is obtained by calculating the difference between the strain value of the current measuring point and the strain value of the adjacent measuring point and dividing it by the actual physical distance between the two along the fiber laying direction.
7. The adaptive peak-finding method for overlapping spectral peaks in grating demodulation as described in claim 1, characterized in that, The comparison of the strain gradient with the maximum permissible shear strain threshold in material mechanics includes: The calculated gradient value is compared with the maximum shear strain threshold allowed by the structural material in the elastic stage. If the strain gradient is less than or equal to the maximum shear strain threshold, the current peak finding result is determined to have passed the physical consistency check and is output. If the strain gradient exceeds the maximum shear strain threshold, the strain change at the current measuring point is determined to be inconsistent with the overall coordinated deformation law of the structure, the data point is marked as a suspicious outlier, and refitting is triggered.
8. The adaptive peak-finding method for overlapping spectral peaks in grating demodulation as described in claim 3, characterized in that, The process of determining the current center wavelength of the reference grating using the centroid method, and then subtracting the current center wavelength from the factory-calibrated initial wavelength to obtain the wavelength shift caused by ambient temperature, includes: The specific formula for determining the current center wavelength of the reference grating using the centroid method is as follows: ;in, The current center wavelength, To reference the wavelength value corresponding to the i-th sampling point in the grating reflection spectrum, Let p and q be the reflected light power intensity corresponding to the i-th sampling point, and p and q be the indices of the start and end sampling points of the reference grating reflection peak. The wavelength shift caused by ambient temperature is obtained by subtracting the initial wavelength specified at the factory from the wavelength specified at the factory. The specific formula is as follows: ;in, The initial center wavelength of the reference grating under factory calibration conditions, The wavelength shift of the reference grating caused by temperature changes.
9. The adaptive peak-finding method for overlapping spectral peaks in grating demodulation as described in claim 5, characterized in that, The method of using local maxima within the region as the initial center wavelength, estimating the initial linewidth using the full width at half maximum (FWHM), and estimating the initial amplitude using the peak height includes: Using the local maximum point in the region as the initial value of the center wavelength is as follows: within the wavelength range covered by the divided clusters, traverse all sampling points, find the point with the highest reflected light power, and use the wavelength corresponding to this point as the initial value of the center wavelength of the peak. The specific steps for estimating the initial linewidth using full width at half maximum (FWHM) are as follows: First, determine the maximum amplitude of the overlapping peak. Extend from the peak point to the left and right sides respectively to find the wavelength position when the reflected power drops to half of the maximum amplitude. Use linear interpolation to accurately interpolate the position of the FWHM between two adjacent sampling points. Record the wavelength difference between the left and right FWHM as the full width at half maximum (FWHM). The initial amplitude is estimated using the peak height by taking the reflected power value corresponding to the local maximum point within the cluster.
10. The adaptive peak-finding method for overlapping spectral peaks in grating demodulation as described in claim 6, characterized in that, The method of calculating the difference between the strain value at the current measuring point and the strain values at adjacent measuring points, and dividing it by the actual physical distance between them along the fiber optic laying direction, to obtain the strain gradient of the local interval, includes: The pure strain value at the current measuring point is obtained through iterative fitting. Retrieve the strain value of the previous measuring point adjacent to the current measuring point along the fiber laying direction. and the strain value at the next measuring point And read the actual physical distance between two adjacent measuring points along the structural surface recorded during the deployment design. The specific calculation formula is as follows: ,in, This represents the local strain gradient at the current measuring point i.