Crop spectrometer temperature drift calibration method based on dynamic temperature drift compensation

By constructing a nonlinear mapping model using a BP neural network model, the wavelength drift of crop spectrometers can be predicted and corrected in real time, solving the problem of low temperature drift calibration accuracy in existing technologies and achieving dynamic compensation and stability improvement across the entire temperature range.

CN121230870BActive Publication Date: 2026-02-13WUXI ZHONGKE OPTOELECTRONICS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511811420.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-04
Publication Date
2026-02-13
Estimated Expiration
2045-12-04

AI Technical Summary

Technical Problem

Existing crop spectrometer temperature drift calibration methods have low accuracy and cannot respond to dynamic temperature changes in real time, resulting in wavelength drift that affects the accuracy of reflectance and chlorophyll fluorescence parameters.

Method used

A dynamic temperature drift compensation method based on a BP neural network model is adopted. By collecting characteristic spectral line data at different temperature points, a nonlinear mapping model is constructed to predict and correct wavelength drift in real time, thereby achieving dynamic compensation across the entire temperature range.

Benefits of technology

It improves the accuracy and stability of spectrometer temperature drift calibration, ensures wavelength stability in complex field environments, enhances the measurement accuracy of reflectance and chlorophyll fluorescence parameters, and reduces the frequency of manual calibration and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121230870B_ABST
    Figure CN121230870B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of spectrometer temperature drift calibration, and particularly relates to a crop spectrometer temperature drift calibration method based on dynamic temperature drift compensation, comprising the following steps: obtaining actual wavelength drift deviation values under each temperature measuring point and each characteristic spectral line; obtaining predicted wavelength drift deviation values under each temperature measuring point and each characteristic spectral line; performing calibration processing on the crop spectrometer according to the deviations; and obtaining corrected wavelengths. The present application collects original data under different temperature points and different characteristic spectral lines, and captures the nonlinear relationship between temperature and wavelength drift, so as to extend the wavelength drift to the full wavelength band. Compared with the existing crop spectrometer temperature drift calibration method, the present application can obtain the wavelength drift in the full temperature range, and consider the nonlinear relationship between temperature and wavelength drift, so as to improve the accuracy and stability of the spectrometer temperature drift calibration.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of spectrometer temperature drift calibration, and particularly relates to a crop spectrometer temperature drift calibration method based on dynamic temperature drift compensation. BACKGROUND

[0002] The crop spectrometer is a core device for high-standard farmland monitoring. By monitoring the reflection spectrum, sunlight-induced chlorophyll fluorescence (SIF) and other parameters of the crop canopy, quantitative evaluation of the growth state (for example, growth vigor, nutrient content, etc.) of the crop is achieved. The crop spectrometer needs to maintain the stability of the wavelength (i.e., temperature drift is less than or equal to 0.5 nm) in the environment of-20 DEG C to 60 DEG C. Otherwise, it will cause the reflection rate monitoring deviation and the SIF peak wavelength identification error, and further affect the evaluation of the photosynthetic efficiency of the crop. The dynamic change of the temperature in the field environment is the main cause of the wavelength drift. The thermal expansion characteristics of the internal optical machine structure will cause the light path to change and cause the wavelength to shift by 0.3 nm to 0.5 nm when the temperature changes by 10 DEG C, which directly affects the accurate identification of the spectral feature peaks (for example, the 550 nm green peak and the 680 nm red light peak).

[0003] At present, the crop spectrometer temperature drift calibration method includes the following methods:

[0004] 1. Fixed point calibration method: single point calibration at room temperature is adopted, and the wavelength is corrected by storing a fixed compensation value. However, this method cannot cope with the dynamic change of the temperature, and the compensation error is more than 2 nm at-20 DEG C or 60 DEG C, and the compensation accuracy is not enough.

[0005] 2. Piecewise linear compensation method: linear interpolation compensation (for example, -20 DEG C, 20 DEG C and 60 DEG C) is adopted for calibration at 3 to 5 temperature points. However, this method ignores the nonlinear relationship between the temperature and the drift, and the compensation accuracy can only reach 1.2 nm to 1.5 nm, and the stability is insufficient.

[0006] 3. Artificial calibration method: this method needs to be calibrated regularly, and needs to be calibrated by manual operation and comparison with the standard crop spectrometer according to the requirements of the field test. However, the time interval is long, the drift caused by the sudden change of the temperature cannot be corrected in real time, and the labor cost is increased. SUMMARY

[0007] The technical problem to be solved by the present application is to solve the technical problem of low accuracy of the existing crop spectrometer temperature drift calibration. The present application provides a crop spectrometer temperature drift calibration method based on dynamic temperature drift compensation. The accuracy of the spectrometer temperature drift calibration is improved by improving the crop spectrometer temperature drift calibration method.

[0008] The technical solution adopted by the present application to solve the technical problem is a crop spectrometer temperature drift calibration method based on dynamic temperature drift compensation, comprising the following steps:

[0009] S1, acquiring wavelength values of characteristic spectral lines of the crop spectrometer at 25℃,

[0010] S2, constructing a non-linear mapping model by using a BP neural network model, training the non-linear mapping model to obtain an optimal non-linear mapping model, and using the optimal non-linear mapping model to predict wavelength drift deviation values at temperature points

[0011] S3, acquiring wavelength values of characteristic spectral lines corresponding to the crop spectrometer at a temperature

[0012] S4, acquiring wavelength values of characteristic spectral lines corresponding to the crop spectrometer at a working temperature

[0013] ​​​​​​​​​​​​​​​​​​​​​​​​​​​Thus, by collecting original data at different temperature points and under different characteristic spectral lines, and capturing the nonlinear relationship between temperature and wavelength drift amount, the wavelength drift amount is extended to the full wavelength band. Compared with the existing crop spectrometer temperature drift calibration method, this method can obtain the wavelength drift amount in the full temperature range, and consider the nonlinear relationship between temperature and wavelength drift amount, to improve the accuracy and stability of the spectrometer temperature drift calibration. At the same time, it can realize real-time dynamic compensation of wavelength drift in the full temperature range, ensure the stability of the wavelength of the crop spectrometer in the complex field environment, improve the measurement accuracy of reflectivity, chlorophyll fluorescence and other parameters, and meet the technical requirements of high-standard farmland monitoring.

[0014] Further, in S1, the wavelength indication values at temperature points and characteristic spectral lines are calculated. The calculation formula of the wavelength indication values is:

[0015] ;

[0016] The calculation formula of the actual wavelength drift deviation value is:

[0017] ;

[0018] Wherein, n represents the number of measurements.

[0019] Further, in S1, the temperature points include: a temperature point of -20℃, a temperature point of 0℃, a temperature point of 20℃, a temperature point of 40℃, and a temperature point of 60℃.

[0020] The package fields of the characteristic spectral lines are 435.833nm, 546.074nm, 696.543nm, 763.511nm, and 912.297nm, respectively.

[0021] Further, the S2 includes the following steps:

[0022] S2-1, BP neural network model parameter definition: input layer: temperature point , output layer: wavelength drift deviation value ;

[0023] S2-2, BP neural network model network structure design: adopt a two-layer full connection structure, the first hidden layer is used to receive the temperature signal of the input layer and enhance the fitting ability of the nonlinear relationship between temperature and drift amount, and the second hidden layer is used for secondary feature extraction of the output of the first hidden layer and capturing the drift mutation characteristics when the temperature changes sharply.

[0024] ​S2-3, data preprocessing before training of the nonlinear mapping model: using the criterion to remove outliers from the wavelength shift deviation values in S1

[0025] S2-4, training and optimization of the nonlinear mapping model: using the wavelength shift deviation values after removing outliers in S2-3 , the Levenberg-Marquardt optimization algorithm is used to train and optimize the nonlinear mapping model to obtain an optimized nonlinear mapping model;

[0026] S2-5, index verification of the nonlinear mapping model: if the average absolute error of the test set is ≤0.1 nm and if the prediction error of each characteristic spectral line is ≤0.1 nm and the prediction error of the temperature points not involved in training is ≤0.1 nm, then the optimized nonlinear mapping model meets the requirements, i.e., it is the optimal nonlinear mapping model, and S2-6 is executed; if the average absolute error of the test set is >0.1 nm or if the prediction error of each characteristic spectral line is >0.1 nm or the prediction error of the temperature points not involved in training is >0.1 nm, then the optimized nonlinear mapping model does not meet the requirements, and S2-2 is returned until the optimized nonlinear mapping model meets the requirements, i.e., it is the optimal nonlinear mapping model, and S2-6 is executed again;

[0027] S2-6, using the optimal nonlinear mapping model in S2-5 to predict the wavelength shift deviation values at the temperature points , characteristic spectral lines to obtain the predicted wavelength shift deviation values at the temperature points , characteristic spectral lines . .

[0028] Further, in S2-1, the input layer is a single neuron, and the output layer is neurons.

[0029] Further, in S2-2, the first hidden layer and the second hidden layer each contain 16 neurons; the first hidden layer is processed by a ReLU activation function to enhance the fitting ability of the nonlinear relationship between temperature and shift; the second hidden layer is processed by a ReLU activation function to capture the shift mutation characteristics when the temperature changes sharply; the input layer and the first hidden layer, and the first hidden layer and the second hidden layer are connected in a full connection manner, and the weight initialization uses a Xavier normal distribution.

[0030] Further, in S2-4, the mean square error ​​As a performance index, the performance index requirement is:

[0031] ;

[0032] Mean square error The calculation formula of is:

[0033] ;

[0034] Wherein: Indicates the number of samples.

[0035] Further, in S3, the actual wavelength drift bias value The calculation formula of is:

[0036] ;

[0037] Bias The calculation formula of is:

[0038] .

[0039] Further, the S3 comprises the following steps:

[0040] S3-1, if the bias , it indicates that the prediction accuracy of the optimal nonlinear mapping model meets the requirements, and there is no need to adjust the parameters;

[0041] S3-2, if the bias , the output layer weight of the BP neural network model is adjusted, and the incremental learning is carried out to adapt to the adjusted drift characteristics;

[0042] S3-3, if the bias , the connection weight between the input layer and the first hidden layer is adjusted to update the parameters of the output layer;

[0043] S3-4, if the bias for three times in succession

[0044] Further, in S4, the calculation formula of the corrected wavelength is:

[0045] .

[0046] Compared with the prior art, the beneficial effects of the present application are:

[0047] Compared with the temperature drift calibration method of the existing crop spectrometer, the wavelength drift amount in the full temperature domain can be obtained, and the non-linear relationship between the temperature and the wavelength drift amount is considered, so as to improve the accuracy and stability of the wavelength drift calibration of the spectrometer, meanwhile, the real-time dynamic compensation of the wavelength drift in the full temperature domain can be realized, the stability of the wavelength of the crop spectrometer in the complex field environment is ensured, the measurement accuracy of the reflectivity, chlorophyll fluorescence and other parameters is improved, and the technical requirements of high-standard farmland monitoring are met. BRIEF DESCRIPTION OF DRAWINGS

[0048] The application will be further described below in combination with the drawings and examples.

[0049] Fig. 1 A flowchart of the crop spectrometer wavelength drift calibration method based on dynamic wavelength drift compensation of the application;

[0050] Fig. 2 A corresponding relationship diagram of the wavelength and the wavelength drift amount under different temperatures and different characteristic spectral lines of the application. DETAILED DESCRIPTION

[0051] The application will be further described below in combination with the drawings and examples.

[0052] In the description of the application, it should be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only used to facilitate the description of the application and simplify the description, and therefore cannot be understood as indicating or implying that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the application. In addition, the features defined as "first", "second" can explicitly or implicitly include one or more of the features. In the description of the application, unless otherwise stated, the meaning of "a plurality of" is two or more.

[0053] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0054] like Figs. 1-2 The diagram shows the preferred embodiment of the present invention. This embodiment of the crop spectrometer temperature drift calibration method based on dynamic temperature drift compensation includes the following steps:

[0055] S1. Obtain crop spectrometer readings at 25℃. Wavelength indications under each characteristic spectral line ,exist Each temperature point, Wavelength indications under each characteristic spectral line The actual wavelength drift deviation value at each temperature measurement point and under each characteristic spectral line was calculated. ;

[0056] S2. Construct a nonlinear mapping model using a BP neural network model, and train this nonlinear mapping model to obtain the optimal nonlinear mapping model. Use this optimal nonlinear mapping model to apply the temperature point... Characteristic spectral lines The wavelength drift deviation value is used to predict the temperature point. Characteristic spectral lines Predicted wavelength drift deviation value ;

[0057] S3, Real-time acquisition of crop spectrometer data at temperature Down Wavelength values ​​corresponding to each characteristic spectral line And the actual wavelength drift deviation value is calculated. And the wavelength drift deviation value predicted by the optimal nonlinear mapping model. The deviation was calculated. , if the deviation If the requirements are met, proceed to step S4; if there is a deviation... If the requirements are not met, the crop spectrometer should be calibrated until the deviation is corrected. Once the requirements are met, proceed to step S4.

[0058] S4. Real-time acquisition of the operating temperature of the crop spectrometer Down Wavelength values ​​corresponding to each characteristic spectral line and output the temperature by using the optimal nonlinear mapping model in S2 The lower The predicted wavelength shift deviation value corresponding to the characteristic spectrum line The wavelength is then corrected to obtain the corrected wavelength Therefore, by collecting original data at different temperature points and under different characteristic spectrum lines, and capturing the nonlinear relationship between temperature and wavelength shift, the wavelength shift can be extended to the full wavelength band. Compared with the existing crop spectrometer wavelength shift calibration method, the wavelength shift in the full temperature range (i.e. -20℃ to 60℃) can be obtained, and the nonlinear relationship between temperature and wavelength shift is considered to improve the accuracy and stability of the spectrometer wavelength shift calibration. At the same time, real-time dynamic compensation of wavelength shift in the full temperature range can be realized to ensure the stability of the wavelength of the crop spectrometer in complex field environments, improve the measurement accuracy of reflectivity, chlorophyll fluorescence, and other parameters, and meet the technical requirements of high-standard farmland monitoring.

[0059] In other words, the existing fixed-point calibration method cannot cope with dynamic temperature changes, and the compensation accuracy is not enough. The segmented linear compensation method ignores the nonlinear relationship between temperature and shift, and the stability is insufficient. Artificial periodic calibration has a long interval, cannot correct the shift caused by sudden temperature changes in real time, and increases the labor cost. The calibration method of the present application can break through the limitations of static compensation, realize dynamic real-time compensation of wavelength shift in the full temperature range, control the shift within 0.5nm, and consider the nonlinear relationship between temperature and wavelength shift to improve the compensation accuracy and stability. At the same time, an adaptive correction mechanism is established to automatically match the aging shift of the crop spectrometer during long-term use, reduce the frequency of artificial calibration by more than 90%, and reduce the maintenance cost in the field.

[0060] In other words, by real-time temperature monitoring and real-time dynamic shift correction, the present application can cope with sudden temperature rise and sudden temperature drop in farmland to solve the problem of static compensation hysteresis and avoid data invalidation due to untimely calibration.

[0061] In other words, the present application reduces labor costs and reduces field operation workload by adaptive correction to ensure that spectral data at different temperatures and different time periods remain consistent, providing a reliable data foundation for long-term trend analysis.

[0062] It should be noted that: the present application overcomes the precision limitation of traditional static calibration in wide temperature range scene, and the problems of high maintenance cost and response lag caused by artificial periodic calibration; in actual application, the wavelength drift is controlled within 0.5nm (such as Fig. 2 shown) in the full temperature range, which provides a "temperature-drift-correction" closed-loop control mode for field crop spectrum monitoring, ensures the measurement accuracy of key parameters such as reflectivity and chlorophyll fluorescence, and provides high-reliability data support for crop growth state evaluation, nutrient diagnosis and other agricultural decisions.

[0063] Specifically, before obtaining the wavelength indication data, a mercury argon lamp is selected as a wavelength calibration light source of the crop spectrometer, and is connected to the crop spectrometer and the photosynthesis observation instrument to ensure stable light connection; the photosynthesis observation instrument is installed in the test box and fixed firmly, the target temperature of the test box is adjusted to 25℃, and the temperature control system is started; after the temperature in the test box is stabilized at 25℃, the temperature state is maintained for 2 hours, so that the observation instrument system fully adapts to the temperature environment, and then the wavelength indication data of the crop spectrometer is used.

[0064] Specifically, in S1, the wavelength drift raw data under different temperature points and different characteristic spectral lines are obtained to construct a thermal integral database covering the working temperature range of the crop spectrometer.

[0065] Specifically, in S2, a non-linear mapping model is constructed based on a BP neural network model, which can accurately capture the non-linear correlation between temperature and wavelength drift to form a general prediction model in the full temperature range.

[0066] In this embodiment, in S1, the wavelength indication data under temperature points, characteristic spectral lines are calculated according to the following formula:

[0067] ;

[0068] The calculation formula of the actual wavelength drift deviation value is as follows:

[0069] ;

[0070] Wherein: represents the number of measurements;

[0071] The temperature points include: a temperature point of -20℃, a temperature point of 0℃, a temperature point of 20℃, a temperature point of 40℃, and a temperature point of 60℃. ​The field envelopes of the characteristic spectral lines are: 435.833 nm (blue-violet peak), 546.074 nm (green peak), 696.543 nm (red peak), 763.511 nm (near-infrared peak), and 912.297 nm (mid-near-infrared peak). Specifically, using a mercury-argon lamp as the standard light source, the actual wavelengths at 435.833 nm, 546.074 nm, 696.543 nm, 763.511 nm, and 912.297 nm were collected.

[0072] In this embodiment, S2 includes the following steps:

[0073] S2-1, BP neural network model parameter definition: Input layer: temperature point Output layer: Wavelength drift deviation value ;

[0074] S2-2, BP Neural Network Model Network Structure Design: A two-layer fully connected structure is adopted. The first hidden layer is used to receive the temperature signal from the input layer and enhance the fitting ability of the nonlinear relationship between temperature and drift. The second hidden layer is used for secondary feature extraction of the output of the first hidden layer and to capture the drift mutation features when the temperature changes drastically.

[0075] S2-3, Data preprocessing before training the nonlinear mapping model: using... Criterion for wavelength drift deviation value in S1 Outlier removal is performed to obtain the wavelength drift deviation value after outlier removal. ;

[0076] S2-4 Training and Optimization of Nonlinear Mapping Model: Using the wavelength drift deviation value after outlier removal in S2-3 The Levenberg-Marquardt optimization algorithm is used to train and optimize the nonlinear mapping model to obtain the optimized nonlinear mapping model.

[0077] S2-5, Verification of the nonlinear mapping model: If the mean absolute error of the test set is ≤0.1nm and the prediction error of each feature spectral line is ≤0.1nm and the prediction error of the temperature points not involved in the training is ≤0.1nm, then the optimized nonlinear mapping model meets the requirements and is the optimal nonlinear mapping model. Then execute S2-6. If the mean absolute error of the test set is >0.1nm or the prediction error of each feature spectral line is >0.1nm or the prediction error of the temperature points not involved in the training is >0.1nm, then the optimized nonlinear mapping model does not meet the requirements. Then return to S2-2 until the optimized nonlinear mapping model meets the requirements and is the optimal nonlinear mapping model. Then execute S2-6 again.

[0078] S2-6. Using the optimal nonlinear mapping model in S2-5 to analyze the temperature points. Characteristic spectral lines The wavelength drift deviation value is used to predict the temperature point. Characteristic spectral lines Predicted wavelength drift deviation value ;

[0079] In S2-1, the input layer is a single neuron, and the output layer is: One neuron;

[0080] In S2-2, both the first and second hidden layers contain 16 neurons. The first hidden layer is processed using the ReLU activation function to enhance the fitting ability of the nonlinear relationship between temperature and drift. The second hidden layer is processed using the ReLU activation function to capture the drift mutation features when the temperature changes drastically. The input layer and the first hidden layer, as well as the first hidden layer and the second hidden layer, are fully connected, and the weights are initialized using a Xavier normal distribution.

[0081] In this embodiment, in S2-4, the mean square deviation is used. As a performance indicator, the performance requirements are as follows:

[0082] ;

[0083] Root mean square The calculation formula is:

[0084] ;

[0085] in: This indicates the number of samples. Specifically, in S2-3, if the sample drift exceeds ±3 times the standard deviation of the mean at the same temperature point, it is considered an anomaly, and a sliding window is used for data imputation. The Levenberg-Marquardt optimization algorithm has fast convergence speed and high accuracy, and is suitable for training small to medium-sized networks. The ratio of training set to test set is 7:3. In S2-5, if the mean absolute error of the test set is ≤0.1nm, it indicates... The absolute deviation between the predicted drift of each characteristic spectral line and the measured value is no more than 0.1 nm. If the prediction error of each characteristic spectral line is ≤0.1 nm, it is verified separately to avoid excessive error of a certain spectral line. The prediction error of temperature points not involved in the training is ≤0.1 nm to ensure the generality of the nonlinear mapping model in the full temperature range from -20℃ to 60℃.

[0086] In this embodiment, in S3, the actual wavelength drift deviation value The calculation formula is:

[0087] ;

[0088] deviation The calculation formula is:

[0089] ;

[0090] S3 comprises the following steps:

[0091] S3-1, if the deviation , it indicates that the prediction accuracy of the optimal nonlinear mapping model meets the requirements, and there is no need to adjust the parameters;

[0092] S3-2, if the deviation , the output layer weight of the BP neural network model is adjusted, and the incremental learning is performed to adapt to the adjusted drift characteristics;

[0093] S3-3, if the deviation , the connection weight between the input layer and the first hidden layer is adjusted to update the parameters of the output layer;

[0094] S3-4, if the deviation , an alarm is triggered to prompt the user to check the optical components of the crop spectrometer. Specifically, in S3-3, the purpose of adjustment is to adapt the nonlinear mapping model to the change of drift characteristics caused by the aging of the crop spectrometer; in S3-4, the purpose of checking the optical components of the crop spectrometer is to avoid the failure of correction caused by hardware failure.

[0095] In this embodiment, in S4, the wavelength The calculation formula is:

[0096] .

[0097] Specifically, in S4, the temperature sensor is used to realize real-time sensing of the temperature of the crop spectrometer, and the spectral interpolation method is used to expand the feature spectral line drift to the full waveband, and then the dynamic correction is performed to realize real-time calibration of the spectral data.

[0098] Specifically, in S4, the temperature sensor installed on one side of the crop spectrometer is used to collect the working temperature of the crop spectrometer in real time, and the real-time collected temperature is input into the optimal nonlinear mapping model, the drift of the five feature spectral lines under the current temperature is input, and the drift distribution of the full spectrum (400nm-900nm) is obtained through the interpolation method.

[0099] To sum up, the present application can obtain the wavelength drift amount in the full temperature range, and consider the nonlinear relationship between the temperature and the wavelength drift amount, so as to improve the accuracy and stability of the wavelength drift calibration of the spectrometer, and meanwhile, can realize the real-time dynamic compensation of the wavelength drift in the full temperature range, ensure the stability of the wavelength of the crop spectrometer in the complex field environment, improve the measurement accuracy of the reflectivity, chlorophyll fluorescence and other parameters, and meet the technical requirements of high-standard farmland monitoring.

[0100] The above-mentioned ideal embodiments according to the present application are for inspiration, and through the above-mentioned description, relevant personnel can make various changes and modifications without deviating from the technical idea of the present application. The technical scope of the present application is not limited to the content in the specification, and must be determined by the scope of the claims.

Claims

1. A method for calibrating temperature drift in a crop spectrometer based on dynamic temperature drift compensation, characterized in that, Includes the following steps: S1. Obtain crop spectrometer readings at 25℃. Wavelength indications under each characteristic spectral line ,exist Each temperature point, Wavelength indications under each characteristic spectral line The actual wavelength drift deviation value at each temperature measurement point and under each characteristic spectral line was calculated. ; S2. Construct a nonlinear mapping model using a BP neural network model, and train this nonlinear mapping model to obtain the optimal nonlinear mapping model. Use this optimal nonlinear mapping model to apply the temperature point... Characteristic spectral lines The wavelength drift deviation value is used to predict the temperature point. Characteristic spectral lines Predicted wavelength drift deviation value ; S3, Real-time acquisition of crop spectrometer data at temperature Down Wavelength values ​​corresponding to each characteristic spectral line And the actual wavelength drift deviation value was calculated. And the wavelength drift deviation value predicted by the optimal nonlinear mapping model. The deviation was calculated. , if the deviation If the requirements are met, proceed to step S4; if there is a deviation... If the requirements are not met, the crop spectrometer should be calibrated until the deviation is corrected. Once the requirements are met, proceed to step S4. S4. Real-time acquisition of the operating temperature of the crop spectrometer Down Wavelength values ​​corresponding to each characteristic spectral line The temperature is output using the optimal nonlinear mapping model in S2. Down Predicted wavelength drift deviation value corresponding to each characteristic spectral line Then, a correction process is performed to obtain the corrected wavelength. ; S2 includes the following steps: S2-1, BP neural network model parameter definition: Input layer: temperature point Output layer: Wavelength drift deviation value ; S2-2, BP Neural Network Model Network Structure Design: A two-layer fully connected structure is adopted. The first hidden layer is used to receive the temperature signal from the input layer and enhance the fitting ability of the nonlinear relationship between temperature and drift. The second hidden layer is used for secondary feature extraction of the output of the first hidden layer and to capture the drift mutation features when the temperature changes drastically. S2-3, Data preprocessing before training the nonlinear mapping model: using... Criterion for wavelength drift deviation value in S1 Outlier removal is performed to obtain the wavelength drift deviation value after outlier removal. ; S2-4 Training and Optimization of Nonlinear Mapping Model: Using the wavelength drift deviation value after outlier removal in S2-3 The Levenberg-Marquardt optimization algorithm is used to train and optimize the nonlinear mapping model to obtain the optimized nonlinear mapping model. S2-5, Verification of the nonlinear mapping model: If the mean absolute error of the test set is ≤0.1nm and the prediction error of each feature spectral line is ≤0.1nm and the prediction error of the temperature points not involved in the training is ≤0.1nm, then the optimized nonlinear mapping model meets the requirements and is the optimal nonlinear mapping model. Then execute S2-6. If the mean absolute error of the test set is >0.1nm or the prediction error of each feature spectral line is >0.1nm or the prediction error of the temperature points not involved in the training is >0.1nm, then the optimized nonlinear mapping model does not meet the requirements. Then return to S2-2 until the optimized nonlinear mapping model meets the requirements and is the optimal nonlinear mapping model. Then execute S2-6 again. S2-6. Using the optimal nonlinear mapping model in S2-5 to analyze the temperature points. Characteristic spectral lines The wavelength drift deviation value is used to predict the temperature point. Characteristic spectral lines Predicted wavelength drift deviation value .

2. The crop spectrometer temperature drift calibration method based on dynamic temperature drift compensation according to claim 1, characterized in that, In S1, Each temperature point, Wavelength indications under each characteristic spectral line The calculation formula is: ; Actual wavelength drift deviation value The calculation formula is: ; in: Indicates the number of measurements.

3. The crop spectrometer temperature drift calibration method based on dynamic temperature drift compensation according to claim 1, characterized in that, In S1, The temperature points include: Temperature points at -20℃, 0℃, 20℃, 40℃, and 60℃; The envelopes of the characteristic spectral lines are as follows: 435.833nm, 546.074nm, 696.543nm, 763.511nm, 912.297nm.

4. The crop spectrometer temperature drift calibration method based on dynamic temperature drift compensation according to claim 1, characterized in that, In S2-1, the input layer is a single neuron, and the output layer is: One neuron.

5. The crop spectrometer temperature drift calibration method based on dynamic temperature drift compensation according to claim 1, characterized in that, In S2-2, both the first hidden layer and the second hidden layer contain 16 neurons. The first hidden layer is processed using the ReLU activation function to enhance the fitting ability of the nonlinear relationship between temperature and drift. The second hidden layer is processed using the ReLU activation function to capture drift abrupt changes in temperature. The input layer and the first hidden layer, as well as the first hidden layer and the second hidden layer, are all fully connected, and the weights are initialized using a Xavier normal distribution.

6. The crop spectrometer temperature drift calibration method based on dynamic temperature drift compensation according to claim 1, characterized in that, In S2-4, the mean squared error is used. As a performance indicator, the performance requirements are as follows: ; Mean squared deviation The calculation formula is: ; in: Indicates the number of samples.

7. The crop spectrometer temperature drift calibration method based on dynamic temperature drift compensation according to claim 1, characterized in that, In S3, the actual wavelength drift deviation value The calculation formula is: ; deviation The calculation formula is: 。 8. The crop spectrometer temperature drift calibration method based on dynamic temperature drift compensation according to claim 1, characterized in that, S3 includes the following steps: S3-1. If there is a deviation If the result is positive, it indicates that the prediction accuracy of the optimal nonlinear mapping model meets the requirements, and no parameter adjustment is needed. S3-2. If there is a deviation Then, the output layer weights of the BP neural network model are adjusted, and incremental learning is used to adapt to the adjusted drift characteristics. S3-3. If there is a deviation If so, the connection weights between the input layer and the first hidden layer are adjusted to update the parameters of the output layer; S3-4, If three times in a row If this occurs, an alarm will be triggered, prompting the user to check the optical components of the crop spectrometer.

9. The crop spectrometer temperature drift calibration method based on dynamic temperature drift compensation according to claim 1, characterized in that, In S4, the corrected wavelength The calculation formula is: 。

Citation Information

Patent Citations

  • Short wave infrared laboratory spectrum calibration and correction method for hyper spectral imager

    CN102538966A

  • Fourier infrared spectrometer and temperature drift online correction method thereof

    CN115015120A