Measurement error correction method for CTD waterproof handset in high salinity environment
By combining stratified sampling, Fourier transform, and the SalCorrNet model, the measurement accuracy problem of the CTD waterproof handheld device in high-salinity environments was solved, high-precision measurement in high-salinity environments was achieved, and data support for marine scientific research and resource exploration was enhanced.
Patent Information
- Application Number
- CN202510837673.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-06-23
AI Technical Summary
The measurement accuracy of traditional waterproof CTD handheld devices decreases significantly in high-salinity environments. Existing error correction methods cannot effectively capture complex nonlinear error patterns and changes in electrode states, resulting in measurement errors of up to 5-10%, affecting the accuracy and reliability of marine hydrological data.
The stratified sampling method and Fourier transform analysis are used to extract the error spectrum characteristics. The nonlinear error mapping relationship is constructed by combining the pre-trained salinity error neural network model SalCorrNet. The error is corrected through an adaptive weight adjustment algorithm and a dynamic temperature and pressure compensation mechanism, and then integrated into the internal calibration module of the CTD waterproof handheld device.
Significantly reduce the error fluctuation of high salinity extreme points, improve measurement accuracy to within 1%, ensure measurement accuracy and data reliability in extreme marine environments, and provide more accurate hydrological data support.
Smart Images

Figure CN120760752A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of digital data processing, and specifically relates to a CTD waterproof handheld device measurement error correction method in a high-salinity environment. BACKGROUND
[0002] Ocean hydrological monitoring is an important foundation work for marine scientific research and marine resource development. The CTD (conductivity-temperature-depth) waterproof handheld device is widely used as a key equipment for measuring seawater parameters on site. Traditional CTD devices measure seawater conductivity, temperature, and depth, and calculate important hydrological indicators such as seawater salinity based on these parameters. These portable instruments have the characteristics of easy operation and rapid response, and can meet the needs of routine hydrological parameter monitoring in sea areas.
[0003] However, when the seawater salinity exceeds 35‰, the measurement accuracy of the traditional CTD waterproof handheld device decreases significantly. This is mainly due to the increase in ion concentration in the high-salinity environment, which causes the nonlinearity of conductivity measurement to increase, the electrode interface polarization effect to increase, and the response characteristics of the measurement circuit to change. The existing technology mainly uses linear calibration, piecewise fitting, and fixed parameter compensation methods for error correction, but these methods cannot effectively capture the complex nonlinear error patterns and electrode state changes in the high-salinity environment.
[0004] In particular, in the high-salinity extreme point area, the measurement error of the traditional CTD device can reach 5-10%, which seriously affects the accuracy and reliability of the ocean hydrological data in the high-salinity environment. How to improve the measurement accuracy of the CTD waterproof handheld device in the high-salinity (salinity value exceeding 35‰) environment and reduce the interference of environmental factors and device state on the measurement results has become a technical problem to be solved in the field of ocean hydrological monitoring. SUMMARY
[0005] Therefore, the present application provides a CTD waterproof handheld device measurement error correction method in a high-salinity environment, which can solve the technical problem of significant reduction in measurement accuracy of the CTD waterproof handheld device in a high-salinity environment in the prior art.
[0006] The present invention is implemented as follows: the present invention provides a measurement error correction method for a CTD waterproof handheld device in a high-salinity environment, comprising the following steps: collecting multiple groups of measurement data of the CTD waterproof handheld device in the high-salinity environment, recording deviations between actual salinity values and measured values as original error samples; using a stratified sampling method to divide the original error samples into a plurality of intervals according to a salinity concentration gradient; performing Fourier transform analysis on the original error samples in each salinity interval, extracting error spectrum characteristics, and establishing an error-salinity relationship model; calling a salinity error compensation function to perform error correction preprocessing; introducing a pre-trained salinity error neural network model SalCorrNet to analyze error spectrum characteristics and construct a nonlinear error mapping relationship; optimizing the salinity error correction function according to an output result of the SalCorrNet model, and using an adaptive weight adjustment algorithm to reduce error fluctuations at high-salinity extreme points; integrating the optimized salinity error correction function into an internal calibration module of the CTD waterproof handheld device; and establishing a dynamic temperature and pressure compensation mechanism to eliminate the influence of temperature and pressure changes on the accuracy of the salinity error correction function.
[0007] Among them, the stratified sampling method is used to divide the original error samples into several intervals according to the salinity concentration gradient to ensure that the data covers the entire measurement range.
[0008] The error spectrum characteristics refer to the periodic variation characteristics obtained by performing frequency domain analysis on the measurement error data, including amplitude, phase, and frequency distribution.
[0009] Among them, the adaptive weight adjustment algorithm refers to an algorithm that dynamically allocates correction parameter weights according to the error distribution characteristics in different salinity ranges to improve the measurement accuracy near the extreme points.
[0010] Among them, the dynamic temperature and pressure compensation mechanism refers to a measure to ensure the stability of measurement accuracy under various environmental conditions by making multi-parameter joint corrections to salinity measurement values based on real-time temperature and pressure change data.
[0011] The salinity error compensation function is used to preliminarily process the original error samples and calculate the error correction coefficients for each salinity interval. The input includes the original salinity value, measured salinity value, measured temperature value, measured depth value, and electrode state parameters. The output is the salinity interval error correction coefficient matrix and the error statistical eigenvector.
[0012] Among them, the specific structure of the SalCorrNet model is a deep learning architecture that combines a multi-layer perceptron and a recursive neural network. It includes a three-layer convolutional neural network for extracting local features of the error spectrum, a two-layer long short-term memory network for capturing the temporal variation pattern of the error, a one-layer multi-head attention mechanism for distinguishing between electrode contamination errors and nonlinear conductivity errors in high-salinity environments, and a three-layer fully connected network for outputting correction parameters.
[0013] Among them, the number of heads of the multi-head attention mechanism is determined according to the number of salinity intervals, the weight attenuation parameter is determined according to the characteristic amplitude distribution of the error spectrum, and the attention mask parameter is determined according to the fluctuation degree of the electrode state parameter.
[0014] Among them, the steps for establishing the training dataset during the pre-training process of the SalCorrNet model include collecting multi-depth salinity gradient measurement data in different sea areas and seasons, using high-precision laboratory-grade analytical instruments to obtain standard salinity values as true value references, recording measurement error cases in high-salinity environments under various electrode conditions, and marking the relationship between the degree of electrode contamination and the error type.
[0015] Among them, the training dataset establishment step during the SalCorrNet model pre-training process also includes constructing a supervised learning dataset containing the correspondence between the error spectrum feature vector and the correction parameter, applying data augmentation technology to simulate measurement scenarios under extreme salinity environments, and establishing validation and test sets for model evaluation and preventing overfitting.
[0016] Compared with the prior art, the present invention provides a method for correcting measurement errors of a CTD waterproof handheld device in a high salinity environment.
[0017] This paper proposes a data-driven method for correcting measurement errors in high-salinity environments using a waterproof CTD handheld device. By establishing a multi-stage error processing mechanism and an intelligent compensation algorithm, this method effectively addresses the measurement accuracy issues in high-salinity environments. The method first extracts error spectrum features through stratified sampling and Fourier transform analysis. A pretrained salinity error neural network model, SalCorrNet, is then introduced to construct a nonlinear error mapping relationship. Finally, a dynamic temperature and pressure compensation mechanism is used to achieve real-time data correction.
[0018] This method overcomes the accuracy limitations of traditional calibration methods in extreme point regions, significantly reducing error fluctuations at high-salinity extreme points through an adaptive weight adjustment algorithm. In particular, the introduced SalCorrNet model effectively distinguishes electrode contamination errors from nonlinear conductivity errors in high-salinity environments, resolving the technical limitation of traditional methods that cannot identify error sources. The application of a multi-head attention mechanism enables the system to dynamically adjust the correction strategy based on electrode status, thereby ensuring the reliability of the correction results.
[0019] By integrating a dynamic temperature and pressure compensation mechanism, the present invention achieves comprehensive correction of measurement errors under complex marine environmental conditions, controlling the measurement error in high-salinity environments (salinity values exceeding 35‰) to within 1%, significantly improving the measurement accuracy and data reliability of the CTD waterproof handheld device in extreme marine environments, and providing more accurate hydrological data support for marine scientific research and resource exploration. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0022] like Figure 1 FIG. 1 is a flow chart of a method for correcting measurement errors of a CTD waterproof handheld device in a high-salinity environment provided by the present invention. The method includes the following steps:
[0023] S01. Collect multiple sets of measurement data from a CTD waterproof handheld device in a high-salinity environment, and record the deviation between the actual salinity value and the measured value as the original error sample;
[0024] S02. Divide the original error sample into several intervals according to the salinity concentration gradient using a stratified sampling method to ensure that the data covers the entire measurement range;
[0025] S03, performing Fourier transform analysis on the original error samples in each salinity interval, extracting error spectrum features and establishing a relationship model between error and salinity;
[0026] S04. Call the salinity error compensation function to perform error correction preprocessing, calculate the error correction coefficient in each salinity range, and improve the accuracy of subsequent modeling;
[0027] S05, introducing a pre-trained salinity error neural network model SalCorrNet to analyze the error spectrum characteristics and construct a nonlinear error mapping relationship;
[0028] S06. Optimizing the salinity error correction function according to the output result of the SalCorrNet model, and using an adaptive weight adjustment algorithm to reduce the error fluctuation of high salinity extreme points;
[0029] S07, integrating the optimized salinity error correction function into the internal calibration module of the CTD waterproof handheld device to achieve real-time data correction;
[0030] S08. Establish a dynamic temperature and pressure compensation mechanism to eliminate the influence of temperature and pressure changes on the accuracy of the salinity error correction function, and obtain final detection data.
[0031] Among them, the CTD waterproof handheld device refers to a navigation instrument that measures water conductivity, temperature and depth parameters with an integrated design and a waterproof rating of IP68 or above, and is used for on-site marine hydrological monitoring operations.
[0032] Among them, high salinity environment refers to the environmental conditions where the salinity value exceeds 35‰, that is, each kilogram of seawater contains more than 35 grams of dissolved salt;
[0033] The error spectrum characteristics refer to the periodic variation characteristics obtained by frequency domain analysis of the measurement error data, including key parameters such as amplitude, phase, and frequency distribution;
[0034] Among them, the adaptive weight adjustment algorithm refers to an algorithm that dynamically allocates the correction parameter weights according to the error distribution characteristics in different salinity intervals to improve the measurement accuracy near the extreme points;
[0035] Among them, the dynamic temperature and pressure compensation mechanism refers to the multi-parameter joint correction of salinity measurement values based on real-time temperature and pressure change data to ensure the stability of measurement accuracy under various environmental conditions;
[0036] The salinity error compensation function is used to perform preliminary processing on the original error samples and calculate the error correction coefficients for each salinity interval. The input includes the original salinity value, the measured salinity value, the measured temperature value, the measured depth value, and the electrode state parameter. The output is the salinity interval error correction coefficient matrix and the error statistical eigenvector.
[0037] The specific structure of the SalCorrNet model is a deep learning architecture that combines a multi-layer perceptron and a recursive neural network, including a three-layer convolutional neural network for extracting local features of the error spectrum characteristics, a two-layer long short-term memory network for capturing the error temporal variation pattern, a one-layer multi-head attention mechanism for distinguishing electrode contamination errors from nonlinear errors of conductivity in high-salinity environments, and a three-layer fully connected network for outputting correction parameters. The number of heads of the multi-head attention mechanism is determined according to the number of salinity intervals, the weight attenuation parameter is determined according to the amplitude distribution of the error spectrum characteristics, and the attention mask parameter is determined according to the degree of fluctuation of the electrode state parameters.
[0038] Among them, the steps of establishing the training data set in the pre-training process of the SalCorrNet model specifically include collecting multi-depth salinity gradient measurement data in different sea areas and seasons, using high-precision laboratory-grade analytical instruments to obtain standard salinity values as true value references, recording measurement error cases in high-salinity environments under various electrode conditions, annotating the relationship between the degree of electrode contamination and the type of error, constructing a supervised learning data set containing the correspondence between the error spectrum feature vectors and the correction parameters, applying data enhancement technology to simulate measurement scenarios in extreme salinity environments, and establishing validation and test sets for model evaluation and preventing overfitting;
[0039] Among them, the pre-training steps of the SalCorrNet model specifically include initializing network parameters using standard normal distribution random values, setting the learning rate to 0.001 and adopting the cosine annealing learning rate scheduling strategy, using the batch gradient descent algorithm for parameter optimization, and the loss function using a combination of root mean square error and weighted cross entropy. During the training process, an early stopping strategy is introduced to avoid overfitting, and five-fold cross validation is used to evaluate the generalization ability of the model. Weight regularization is used to control the complexity of the model. After the training is completed, the model parameters are compressed by the quantization method to adapt to the resource limitations of the embedded system of the CTD waterproof handheld device.
[0040] The specific implementation of the above steps is described in detail below.
[0041] The specific implementation method of step S01 is to carry out data collection in the actual application environment. First, sea area test points with different salinity gradients are selected, including nearshore low-salinity areas (20‰~28‰), standard seawater areas (28‰~35‰) and high-salinity areas (35‰~45‰). After the CTD waterproof handheld device is initially calibrated using a standard solution, 10 sets of data are recorded at each test point, each set containing salinity values, temperature values, depth values measured by the instrument, and water samples collected simultaneously. The collected water samples are sent to the laboratory for precise salinity measurement using a Salino meter to obtain the true salinity value. By comparing the CTD waterproof handheld device readings with the laboratory measurement results, the original error sample is calculated and recorded as the difference between the measured value and the true value. The purpose of this step is to establish an original error database to provide basic data support for subsequent error analysis and correction models.
[0042] The specific implementation method of step S02 is to scientifically classify the original error samples obtained by S01 using a stratified sampling statistical method. First, according to the salinity range of 20‰ to 45‰, 5‰ is set as a gradient interval, which is divided into 5 main intervals: 20‰ to 25‰, 25‰ to 30‰, 30‰ to 35‰, 35‰ to 40‰ and 40‰ to 45‰. Taking into account that the error changes in high-salinity areas are more sensitive, the high-salinity intervals above 35‰ are further subdivided into sub-intervals of 2‰ intervals. No less than 30 sample points are randomly selected in each interval to ensure statistical significance, while ensuring that the proportion of the number of samples in each interval matches the actual measurement frequency. For extremely high salinity areas (42‰ to 45‰) where samples are scarce, oversampling technology is used to increase the number of samples. The purpose of this step is to ensure that the error samples are representative and balanced within the entire salinity range, laying the foundation for subsequent targeted error correction in different salinity intervals.
[0043] The specific implementation of step S03 is to perform frequency domain analysis on the original error samples within each salinity interval. First, the error data within each interval is arranged in ascending order according to the salinity value to form a time series sequence. The fast Fourier transform (FFT) algorithm is then used to convert the error data from the time domain to the frequency domain. During the conversion process, a Hanning window function is used to reduce the spectrum leakage effect, and the window length is set to 128 points. By analyzing the converted spectrum diagram, the main frequency components and corresponding amplitudes are extracted, and the first five frequency components with the largest amplitudes are defined as the main error spectrum characteristics. Based on these spectral characteristics, the spectral energy distribution and phase angle are calculated to construct the error spectrum feature vector. The relationship between the error spectrum characteristics and the salinity value of each salinity interval is then fitted using the least squares method to establish a polynomial regression model. The model order is determined by the goodness of fit, and is usually selected from 3 to 5 orders. The purpose of this step is to reveal the periodic variation pattern of measurement errors under different salinity environments from a frequency domain perspective, providing a spectral feature basis for subsequent error correction.
[0044] The specific implementation method of step S04 is to construct and call the salinity error compensation function for data preprocessing. The function first receives the original salinity value, measured temperature value, measured depth value and electrode state parameter as input parameters. For each salinity interval, the interval error correction coefficient is calculated, and the calculation formula is based on the functional relationship between temperature, salinity and electrode state. In the function design, different weight coefficients are used for different salinity intervals. The weight coefficient of the low-salinity interval (20‰~35‰) is 0.8, and the weight coefficient of the high-salinity interval (35‰~45‰) is 1.2 to balance the correction accuracy of different intervals. At the same time, the error statistical eigenvector is calculated, which includes four statistics: mean, standard deviation, skewness and kurtosis. For the error correction coefficient matrix of each salinity interval, it is solved by the least squares optimization method, and the number of matrix elements corresponds to the number of salinity intervals. The purpose of this step is to establish a preliminary error correction framework, provide basic error correction coefficients, and provide preprocessing data support for subsequent deep learning models.
[0045] The specific implementation of step S05 is to introduce a pre-trained SalCorrNet neural network model for deep error analysis. This model first reads the error spectrum feature vector extracted in S03 and inputs it into a three-layer convolutional neural network structure with convolution kernel sizes of 3×3, 3×3, and 2×2, respectively. The number of convolutional layer channels is 32, 64, and 128, respectively, and the activation function uses the ReLU function. After extracting the local pattern of the error spectrum characteristics through the convolutional layer, the feature map is flattened and input into a two-layer long short-term memory (LSTM) network with 256 hidden units to capture the dynamic temporal characteristics of the error as salinity changes. The LSTM output is then processed by a multi-head attention layer. The number of attention heads is set to 5 based on the number of salinity intervals, corresponding to the five major salinity intervals. Finally, a nonlinear error mapping relationship is constructed using a three-layer fully connected network (with 128, 64, and 32 hidden layer units, respectively). The output layer uses a linear activation function to predict the final error correction value. The purpose of this step is to use a deep learning model to extract complex nonlinear error patterns in high-salinity environments and construct a more accurate error mapping relationship.
[0046] The specific implementation of step S06 is to optimize the salinity error correction function based on the output results of the SalCorrNet model. First, the error correction value predicted by the model is weighted and fused with the preliminary correction coefficient in S04. The fusion weight is dynamically adjusted according to the confidence of the prediction error. For high-confidence predictions (confidence > 0.85), a higher weight (0.8-0.95) is assigned; for low-confidence predictions (confidence < 0.6), a lower weight (0.3-0.5) is assigned. To address the error fluctuation problem at high salinity extreme points (salinity > 42‰), an adaptive weight adjustment algorithm is introduced. This algorithm dynamically calculates the smoothing factor α based on the size of the local salinity gradient. The α value ranges from 0.1 to 0.9, and the larger the salinity gradient, the smaller the α value. Using the sliding window method (the window width is set to the salinity value ± 1‰), the error correction values of adjacent salinity points are locally weighted averaged to reduce the error mutation at the extreme points. Finally, an optimized salinity error correction function is formed, which has different correction strategies and parameters for different salinity ranges. The purpose of this step is to further optimize the error correction function, improve the correction accuracy at the extreme points, and reduce the error fluctuation under high salinity conditions.
[0047] The specific implementation of step S07 involves integrating the optimized salinity error correction function into the internal calibration module of the CTD waterproof handheld device. First, the error correction function is converted into a lookup table suitable for embedded systems to improve real-time computing efficiency. The lookup table uses a two-dimensional matrix structure, with salinity values (intervals of 0.5‰) on the horizontal axis and temperature values (intervals of 1°C) on the vertical axis. The matrix elements represent the correction coefficients for the corresponding conditions. For intermediate values not covered by the lookup table, a bilinear interpolation algorithm is used to calculate the correction coefficients. The integration of the correction function adopts a modular design and is embedded as an independent functional unit in the instrument's data processing flow. Error correction calculations are automatically performed after the raw measurement data is acquired and before the results are displayed. This integrated module includes a parameter update mechanism that supports updating the correction function parameters through firmware upgrades. The purpose of this step is to transform the theoretical correction method into a practical embedded algorithm, enabling real-time data correction for the CTD waterproof handheld device in high-salinity environments.
[0048] The specific implementation of step S08 is to build a dynamic temperature and pressure compensation mechanism to eliminate the influence of environmental factors on salinity error correction. First, a temperature influence model is established, and the influence coefficient β of temperature change on conductivity measurement is determined through experiments. T , β T The value has different values in different temperature ranges: the low temperature range (0℃~10℃) is 0.022~0.025 / ℃, the medium temperature range (10℃~25℃) is 0.018~0.022 / ℃, and the high temperature range (25℃~40℃) is 0.020~0.024 / ℃. Similarly, the pressure influence model is established to determine the pressure change influence coefficient β P , generally takes a value of 0.001 to 0.003 / m. Based on these influencing coefficients, a temperature and pressure compensation function is designed. This function receives real-time temperature T and depth D data and calculates the temperature and pressure compensation coefficient K TP The error correction value optimized in step S06 is then multiplied by the error correction value to obtain the final correction result after temperature and pressure compensation. This compensation mechanism uses an adaptive algorithm to dynamically adjust the compensation strength based on the rate of change of temperature and pressure, ensuring stable measurement accuracy even when temperature and pressure fluctuate drastically (such as crossing a thermocline). The purpose of this step is to eliminate the interference of temperature and pressure changes on salinity measurement through a multi-parameter joint correction method, thereby improving the stability and reliability of salinity measurement under various environmental conditions.
[0049] Optionally, the method also includes step S09, which involves conducting experimental verification, comparing the accuracy of the measured data before and after correction, and generating a correction method validation report. The specific implementation of this step involves conducting systematic experimental verification to evaluate the effectiveness of the correction method. First, at least three test points are selected in different sea areas, including typical high-salinity areas and areas with significant salinity gradients. At each test point, measurements are performed simultaneously using a waterproof CTD handheld device with integrated error correction and an uncorrected instrument of the same model, recording at least 50 sets of data. Water samples are simultaneously collected for laboratory analysis to obtain the true salinity value. The correction effect is evaluated by calculating the measurement errors before and after correction. Evaluation metrics include mean absolute error (MAE), root mean square error (RMSE), and maximum error (MaxE). Acceptance criteria are set as: a reduction of at least 50% in mean absolute error, a reduction of at least 40% in root mean square error, and a reduction of at least 30% in maximum error in a high-salinity environment (>35‰). A correction method validation report is compiled based on the validation results, detailing the test environment conditions, data comparison and analysis, and correction effect evaluation. The purpose of this step is to verify the actual effect of the correction method through experimental data to ensure that the method can significantly improve the measurement accuracy of the CTD waterproof handheld device in high salinity environments in practical applications.
[0050] The SalCorrNet model utilizes a multi-layer hybrid neural network architecture, encompassing three main functional modules: feature extraction, time series analysis, and output prediction. The feature extraction module consists of three convolutional neural network layers. The first convolutional layer uses 32 3×3 convolutional kernels with a stride of 1 and padding of 1; the second convolutional layer uses 64 3×3 convolutional kernels with a stride of 2 and padding of 1; and the third convolutional layer uses 128 2×2 convolutional kernels with a stride of 2 and no padding. Each convolutional layer is followed by a batch normalization layer and a Reluctant Unit (ReLU) activation function, and a max pooling layer (2×2, stride 2) is used to reduce the dimensionality of the feature map. The time series analysis module consists of two stacked LSTM layers, each with 256 hidden units. The input is the flattened convolutional features, with a dropout rate of 0.3 to prevent overfitting. The multi-head attention mechanism layer consists of five attention heads, corresponding to five major salinity ranges. Each attention head has a dimension of 64, and the scaling factor of the attention layer is set to 8. The mask parameters are dynamically adjusted based on the electrode state parameters. The output prediction module consists of a three-layer fully connected network with 128, 64, and 32 neurons. The first two layers use the ReLU activation function with a dropout rate of 0.2, and the last layer uses a linear activation function to output the final prediction value. The model has a total of approximately 2.4 million parameters, which are reduced to approximately 600,000 after quantization and compression, making it suitable for deployment in embedded systems.
[0051] The specific implementation of the SalCorrNet model training dataset begins with large-scale data collection. Sampling sites were selected across diverse waters, including the North Pacific, South China Sea, and Persian Gulf, ensuring coverage of the full salinity spectrum from 20‰ to 45‰. Data were collected at each sampling site during spring, summer, autumn, and winter, recording salinity gradients at various depths (0 to 200 meters, with intervals of 10 meters). An Autosal laboratory-grade salinity analyzer with an accuracy of ±0.001 was used as a reference standard. Experiments simulated varying degrees of electrode contamination (mild, moderate, and severe) to document the impact of contamination on measurement error. An initial dataset of 50,000 samples was constructed, each containing a 10-dimensional error spectrum feature vector and corresponding 5-dimensional correction parameters. Data augmentation techniques, including Gaussian noise addition (σ = 0.01 to 0.05), random scaling (with a factor ranging from 0.95 to 1.05), and simulation of extreme salinity fluctuations (±3‰), were applied to expand the dataset to 100,000 samples. The training set, validation set, and test set were divided into 8:1:1 ratios to ensure similar salinity distributions in each set.
[0052] The CTD waterproof handheld device described in this invention is a portable hydrological monitoring instrument with an integrated design. Its housing is a high-strength polycarbonate and stainless steel composite structure, with an IP68 waterproof rating and suitable for operation in water depths of 100 meters. It integrates three sensors, conductivity, temperature, and depth, along with a signal processing system. The conductivity sensor uses four-electrode conductivity measurement technology, with a measurement range of 0 to 70 millisiemen / cm and an accuracy of ±0.003 millisiemen / cm. The temperature sensor uses platinum resistance technology, with a measurement range of -5°C to 45°C and an accuracy of ±0.01°C. The depth sensor uses a silicon piezoresistive pressure sensor, with a measurement range of 0 to 100 meters and an accuracy of ±0.1 meter. The signal processing system utilizes a 32-bit ARM processor, 4GB of internal storage, a 2.8-inch color TFT display, a GPS positioning module, and a Bluetooth communication module. The power supply system uses a rechargeable lithium battery with a battery life of at least 12 hours. The software system integrates a salinity calculation module, an error correction module, and a data management module, supporting real-time data display, historical data query, and wireless data transmission.
[0053] The mathematical model or calculation process involved in the present invention is described in detail below.
[0054] In step S03, Fourier transform analysis is performed on the original error samples in each salinity interval to extract the error spectrum characteristics and establish a relationship model between error and salinity. The specific calculation process is as follows:
[0055] First, the error data in each salinity interval are arranged in ascending order of salinity value to form a time series, and the fast Fourier transform (FFT) algorithm is applied to convert the error data from the time domain to the frequency domain. The time domain error series is expressed as:
[0056] E={e1,e2,...,e N};
[0057] Where, E is the error sequence; e i is the error value of the i-th sampling point, that is, the difference between the measured salinity value and the actual salinity value; N is the sequence length.
[0058] Apply a Hanning window function to the error sequence to reduce the effects of spectral leakage:
[0059] E w ={e1·w1,e2·w2,...,e N w N};
[0060] Where, E w is the error sequence after windowing; w i is the i-th value of the Hanning window function, and the calculation formula is w i =0.5·(1-cos(2πi / (N-1))).
[0061] Perform a fast Fourier transform (FFT) on the windowed error sequence:
[0062] F=FFT(E w )={F0,F1,...,F N-1};
[0063] Where, F is the frequency domain representation; F k is the kth frequency component, which is a complex number and is expressed as F k =a k +b k j, where j is the imaginary unit.
[0064] Compute the spectrum magnitude and phase:
[0065]
[0066] φ k =arctan(b k / a k );
[0067] Where A k is the amplitude of the kth frequency component; φ k is the corresponding phase angle.
[0068] Extract the first five maximum amplitude frequency components as the main error spectrum features:
[0069]
[0070] Where A max is the maximum amplitude set; φ max is the corresponding phase angle set; i1, i2, ..., i5 are the first 5 frequency indices after amplitude sorting.
[0071] Calculate the spectral energy distribution:
[0072]
[0073] Where, E total is the total spectrum energy; E ratio is the energy proportion of the first five maximum amplitude frequency components.
[0074] Construct the error spectrum eigenvector:
[0075]
[0076] Where V spec is the error spectrum feature vector containing 15 elements.
[0077] Polynomial regression is used to establish the relationship model between the error spectrum characteristics and salinity values in each salinity interval:
[0078]
[0079] Where f(S) is the predicted error value; S is the salinity value; c j are the polynomial coefficients; n is the polynomial order, ranging from 3 to 5; ∈ is the error term, and its standard deviation is usually less than 0.01.
[0080] The polynomial coefficients are solved using the least squares method:
[0081] C=(X T X) -1 X T Y;
[0082] Where C is the coefficient vector [c0, c1, ..., c n ]; X is the design matrix of salinity values; Y is the actual error value vector.
[0083] The polynomial regression model takes into account the nonlinear relationship between error and salinity. Using a power form, it can better fit the error trends within each interval. High-order terms are used to capture sudden changes in error near salinity extremes, while low-order terms reflect the overall trend.
[0084] In step S04, the salinity error compensation function receives the original salinity value, the measured temperature value, the measured depth value, and the electrode state parameter as input, and calculates the interval error correction coefficient and the error statistical characteristic vector. The specific calculation process is as follows:
[0085] The input parameters of the salinity error compensation function include:
[0086] S0: original salinity value, unit ‰;
[0087] T: measured temperature value, unit: °C;
[0088] d: measured depth value, in meters;
[0089] E: Electrode state parameter, dimensionless, ranging from 0 to 1, where 0 indicates complete electrode contamination and 1 indicates optimal electrode state.
[0090] For each salinity interval i, the interval error correction coefficient K i The calculation formula is:
[0091] K i =α i ·[1+β T ·(TT ref )+β D ·(DD ref )]·(1-γ·(1-E));
[0092] Where, α i is the basic correction coefficient, which is related to the salinity range; β T is the temperature correction parameter, ranging from 0.01 to 0.03 / ℃; β D is the depth correction parameter, ranging from 0.001 to 0.003 / m; T ref is the reference temperature, usually 20℃; D ref is the reference depth, usually 0 meters; γ is the electrode state influence coefficient, ranging from 0.1 to 0.3.
[0093] Basic correction coefficient α i The value varies according to the salinity range:
[0094]
[0095] Where, is the average value of the error samples in interval i; w l is the weight coefficient of the low-salt interval, which is 0.8; w h is the weight coefficient of the high-salinity interval, and its value is 1.2.
[0096] Error statistical eigenvector V stat The calculation of is as follows:
[0097]
[0098]
[0099] V stat =[μ i ,σ i , skew i , kurt i ];
[0100] Where μ i is the mean of the error in interval i; σ i is the standard deviation; skew i is skewness; kurt i is the kurtosis; n i is the number of samples in interval i; e ij is the jth error sample value in interval i.
[0101] Construction of interval error correction coefficient matrix K:
[0102]
[0103] Where K i is the main correction coefficient for interval i; K ij is the cross correction coefficient between intervals i and j, which is used to smooth the correction effect at the interval boundary; m is the total number of salinity intervals, usually 5.
[0104] Cross correction coefficient K ij The calculation adopts the weighted average method:
[0105]
[0106] Where, d i and d j are the distances from the current salinity value to the center of intervals i and j, respectively.
[0107] This salinity error compensation function considers the combined effects of temperature, depth, and electrode condition on salinity measurement. By introducing different weighting coefficients, it balances the correction accuracy across different salinity ranges. The base correction coefficient reflects the average error level for each range. The temperature correction term accounts for the effect of temperature on conductivity measurement, the depth correction term accounts for the effect of pressure on conductivity measurement, and the electrode condition correction term accounts for the impact of electrode contamination on measurement accuracy.
[0108] In step S06, the adaptive weight adjustment algorithm is used to optimize the salinity error correction function, especially to reduce the error fluctuation at the high salinity extreme point. The calculation process is as follows:
[0109] First, the error correction value predicted by the SalCorrNet model is weightedly fused with the preliminary correction coefficient:
[0110] M fused =w pred ·M pred +(1-w pred )·K i ;
[0111] Where M fused is the correction value after fusion; M pred is the error correction value predicted by the SalCorrNet model; K i is the preliminary correction coefficient; w pred is the prediction weight, according to the prediction confidence C pred Dynamic adjustment.
[0112] Prediction weight w pred The calculation formula is:
[0113]
[0114] Where C pred It is the prediction confidence, output by the SalCorrNet model, and its value range is 0 to 1.
[0115] To address the error fluctuation problem at the extreme point of high salinity, an adaptive smoothing factor α is introduced:
[0116]
[0117] Where, α base is the basic smoothing factor, which takes a value of 0.5; β is the salinity gradient influence coefficient, which takes a value of 0.1; is the absolute value of the local salinity gradient, which is calculated by dividing the salinity difference between adjacent measurement points by the measurement interval.
[0118] The error correction values of adjacent salinity points are locally weighted averaged using the sliding window method:
[0119]
[0120] Where M final (S0) is the final correction value; M fused (S0) is the fusion correction value of the current salinity point; W is the sliding window centered on S0, and the window width is the salinity value ±1‰; w j is the weight of the jth point in the window, and the calculation formula is where σ w is the window weight attenuation parameter, with a value of 0.5.
[0121] The final optimized salinity error correction function is in the form of a piecewise function:
[0122]
[0123] Where, F corr (S) is the final error correction function value corresponding to salinity S; S min and S max are the minimum and maximum salinity values covered by the training data, usually S min =20‰, S max =45‰.
[0124] This adaptive weight adjustment algorithm balances the contributions of the model prediction value and the initial correction coefficient by dynamically adjusting the prediction weights. By introducing an adaptive smoothing factor, it reduces error fluctuations at high-salinity extremes while maintaining correction accuracy. A sliding window weighted average method achieves local smoothing without affecting the global trend. A piecewise function design ensures correction effectiveness across the entire salinity range. The power and reciprocal relationships in the algorithm primarily account for the nonlinear variation of errors in high-salinity environments, and the sliding window weighted average uses exponentially decaying weights to preserve local characteristics.
[0125] In step S08, the dynamic temperature and pressure compensation mechanism is used to eliminate the influence of temperature and pressure changes on salinity error correction. The calculation process is as follows:
[0126] First, a temperature influence model is established to determine the influence coefficient β of temperature change on conductivity measurement. T :
[0127]
[0128] Where, β T is the temperature influence coefficient, unit is / ℃; T is the measurement temperature, unit is ℃.
[0129] Similarly, a pressure impact model is established to determine the pressure change impact coefficient β P :
[0130]
[0131] Where, β P is the pressure influence coefficient, unit is / m; D is the measurement depth, unit is meter.
[0132] Based on these influence coefficients, calculate the temperature and pressure compensation coefficient K TP :
[0133] K TP =1+β T ·(TT ref )+β P·(DD ref );
[0134] Where, T ref is the reference temperature, usually 20℃; D ref The reference depth is usually 0 meters.
[0135] In order to cope with the situation of drastic changes in temperature and pressure, the adaptive factor λ is introduced:
[0136]
[0137] Where λ is the adaptive factor, ranging from 0 to 1; γ T is the temperature change rate influence coefficient, which is set to 0.5; γ P is the pressure change rate influence coefficient, which is 0.3; is the absolute value of the temperature change rate, in °C / second; is the absolute value of the depth change rate in meters per second.
[0138] The final correction result after temperature and pressure compensation is calculated as follows:
[0139]
[0140] Where, is the final correction result after temperature and pressure compensation; M final is the final correction value obtained in step S06.
[0141] This dynamic temperature and pressure compensation mechanism uses a piecewise function to describe the variation of the temperature influence coefficient within different temperature ranges, and a linear function to describe the variation of the pressure influence coefficient with depth. An adaptive factor is introduced to cope with drastic changes in temperature and pressure. The temperature influence model accounts for the nonlinear variation of conductivity with temperature, while the pressure influence model considers the impact of seawater compression on conductivity caused by increasing depth. The adaptive factor is designed to account for the hysteresis effect of drastic environmental changes on sensor response.
[0142] Specifically, the principle of the present invention is: the core technical principle of the present invention is based on a comprehensive correction strategy that combines error spectrum feature extraction and deep learning, and realizes the improvement of measurement accuracy in high salinity environment through multi-level error identification, modeling and compensation.
[0143] First, the present invention uses a stratified sampling method to divide the original error samples into several intervals according to the salinity concentration gradient, ensuring that the correction model can cover the entire measurement range and solving the problem of the traditional single calibration model's lack of adaptability in different salinity intervals. Fourier transform analysis is performed on the original error samples within each salinity interval, converting the time-domain error information into frequency-domain features. This effectively captures the periodic variation patterns and frequency distribution characteristics of the errors under different salinity environments. Compared with traditional time-domain analysis, this spectral analysis method can more accurately identify the inherent patterns of measurement errors in high-salinity environments.
[0144] Secondly, the present invention introduces a pre-trained SalCorrNet neural network model, which uses a deep learning architecture combining a multi-layer perceptron and a recurrent neural network to establish a nonlinear error mapping relationship. The SalCorrNet model's three-layer convolutional neural network is used to extract the local characteristics of the error spectrum, while a two-layer long-short-term memory network captures the temporal variation pattern of the error. A multi-head attention mechanism is used to distinguish between electrode contamination errors and nonlinear conductivity errors in high-salinity environments. This composite deep learning architecture enables the system to automatically learn the characteristic representations of different error types, thereby achieving more accurate error correction.
[0145] Finally, the present invention achieves real-time response and compensation for changing environmental factors through an adaptive weight adjustment algorithm and a dynamic temperature and pressure compensation mechanism. The adaptive weight adjustment algorithm dynamically assigns correction parameter weights based on the error distribution characteristics within different salinity intervals, effectively improving measurement accuracy near extreme points. The dynamic temperature and pressure compensation mechanism performs a multi-parameter joint correction of salinity measurements based on real-time temperature and pressure data, ensuring stable measurement accuracy under various environmental conditions.
[0146] Through this multi-level, multi-dimensional comprehensive correction strategy, the present invention achieves effective correction of the measurement error of the CTD waterproof handheld device in a high-salinity environment, and solves the technical problem of insufficient accuracy of traditional correction methods under extreme salinity conditions.
[0147] A specific embodiment 1 of the present invention is provided below. The specific implementation of each step in this embodiment 1 is described in detail as follows.
[0148] The specific implementation of step S01 is the same as above and will not be repeated here.
[0149] The specific implementation of step S03 is to perform frequency domain analysis on the original error samples within each salinity interval. First, the error data within each interval is arranged in ascending order of salinity value to form a time series. Then, the fast Fourier transform (FFT) algorithm is applied to convert the error data from the time domain to the frequency domain. The time domain error series is expressed as:
[0150] E={e1,e2,...,e N};
[0151] Where, E is the error sequence; e i is the error value of the i-th sampling point, that is, the difference between the measured salinity value and the actual salinity value; N is the sequence length.
[0152] The Hanning window function is used to reduce the spectrum leakage effect during the conversion process, and the window length is set to 128 points. The Hanning window function is applied to the error sequence:
[0153] E w ={e1·w1,e2·w2,...,e N w N};
[0154] Where, E w is the error sequence after windowing; w i is the i-th value of the Hanning window function, and the calculation formula is w i =0.5·(1-cos(2πi / (N-1))).
[0155] Perform fast Fourier transform on the windowed error sequence:
[0156] F=FFT(E w )={F0,F1,...,F N-1};
[0157] Where, F is the frequency domain representation; F k is the kth frequency component, which is a complex number and is expressed as F k =a k +b k j, where j is the imaginary unit.
[0158] Compute the spectrum magnitude and phase:
[0159]
[0160] φ k =arctan(b k / a k );
[0161] Where A k is the amplitude of the kth frequency component; φ k is the corresponding phase angle.
[0162] By analyzing the converted spectrum, the main frequency components and corresponding amplitudes are extracted, and the top five frequency components with the largest amplitudes are defined as the main error spectrum features:
[0163]
[0164]
[0165] Where A max is the maximum amplitude set; φ max is the corresponding phase angle set; i1, i2, ..., i5 are the first 5 frequency indices after amplitude sorting.
[0166] Calculate the spectrum energy distribution and energy proportion:
[0167]
[0168] Where, E total is the total spectrum energy; E ratio is the energy proportion of the first five maximum amplitude frequency components.
[0169] Based on these spectral features, the error spectrum feature vector is constructed:
[0170]
[0171] Where V spec is the error spectrum feature vector containing 15 elements.
[0172] Then, the least squares method is used to fit the relationship between the error spectrum characteristics of each salinity interval and the salinity value, and a polynomial regression model is established:
[0173]
[0174] Where f(S) is the predicted error value; S is the salinity value; c j are the polynomial coefficients; n is the polynomial order, usually 3 to 5; ∈ is the error term, and its standard deviation is usually less than 0.01.
[0175] The polynomial coefficients are solved using the least squares method:
[0176] C=(X T X) -1 X T Y;
[0177] Where C is the coefficient vector [c0, c1, ..., c n ]; X is the design matrix of salinity values; Y is the actual error value vector.
[0178] The purpose of this step is to reveal the periodic variation of measurement errors under different salinity environments from a frequency domain perspective, providing a spectral signature basis for subsequent error correction. The polynomial regression model takes into account the nonlinear relationship between error and salinity, and the power form is used to better fit the error variation trends within each interval.
[0179] The specific implementation of step S04 involves constructing and calling a salinity error compensation function to perform data preprocessing. This function first receives as input the original salinity value S0, the measured temperature value T, the measured depth value D, and the electrode state parameter E. The electrode state parameter E is a dimensionless parameter with a value range of 0 to 1, where 0 indicates complete electrode contamination and 1 indicates optimal electrode condition.
[0180] For each salinity interval i, calculate the interval error correction coefficient K i , the calculation formula is:
[0181] K i =α i ·[1+β T ·(TT ref )+β D ·(DD ref )]·(1-γ·(1-E));
[0182] Where, α i is the basic correction coefficient, which is related to the salinity range; β T is the temperature correction parameter, ranging from 0.01 to 0.03 / ℃; β D is the depth correction parameter, ranging from 0.001 to 0.003 / m; T ref is the reference temperature, usually 20℃; D ref is the reference depth, usually 0 meters; γ is the electrode state influence coefficient, ranging from 0.1 to 0.3.
[0183] Basic correction coefficient α i The value varies according to the salinity range:
[0184]
[0185] Where, is the average value of the error samples in interval i; w l is the weight coefficient of the low-salt interval, which is 0.8; w h is the weight coefficient of the high-salinity interval, and its value is 1.2.
[0186] At the same time, the error statistical eigenvector is calculated, including four statistics: mean, standard deviation, skewness and kurtosis:
[0187]
[0188] V stat =[μ i ,σ i , skew i , kurt i ];
[0189] Where μi is the mean of the error in interval i; σ i is the standard deviation; skew i is skewness; kurt i is the kurtosis; n i is the number of samples in interval i; e ij is the jth error sample value in interval i.
[0190] The error correction coefficient matrix for each salinity interval is constructed as follows:
[0191]
[0192] Where K i is the main correction coefficient for interval i; K i j is the cross correction coefficient between intervals i and j; m is the total number of salinity intervals, usually 5.
[0193] Cross correction coefficient K ij The calculation adopts the weighted average method:
[0194]
[0195] Where, d i and d j are the distances from the current salinity value to the center of intervals i and j, respectively.
[0196] The purpose of this step is to establish a preliminary error correction framework, provide basic error correction coefficients, and provide preprocessing data support for subsequent deep learning models. This salinity error compensation function considers the combined effects of temperature, depth, and electrode status on salinity measurement, and balances the correction accuracy in different salinity ranges by introducing different weight coefficients.
[0197] The specific implementation of step S05 is the same as above and will not be repeated here.
[0198] The specific implementation of step S06 is to optimize the salinity error correction function based on the output of the SalCorrNet model. First, the error correction value predicted by the model is weighted and fused with the preliminary correction coefficient in S04:
[0199] M fused =w pred ·M pred +(1-w pred )·K i ;
[0200] Where M fused is the correction value after fusion; M pred is the error correction value predicted by the SalCorrNet model; K iis the preliminary correction coefficient; w pred is the prediction weight, according to the prediction confidence C pred Dynamic adjustment.
[0201] Prediction weight w pred The calculation formula is:
[0202]
[0203] Where C pred It is the prediction confidence, output by the SalCorrNet model, and its value range is 0 to 1.
[0204] To address the error fluctuation problem at the extreme point of high salinity (salinity > 42‰), an adaptive smoothing factor α is introduced:
[0205]
[0206] Where, α base is the basic smoothing factor, which takes a value of 0.5; β is the salinity gradient influence coefficient, which takes a value of 0.1; is the absolute value of the local salinity gradient, which is calculated by dividing the salinity difference between adjacent measurement points by the measurement interval.
[0207] The error correction values of adjacent salinity points are locally weighted averaged using the sliding window method (the window width is set to salinity ±1‰):
[0208]
[0209] Where M final (S0) is the final correction value; M fused (S0) is the fusion correction value of the current salinity point; W is the sliding window centered on S0; w j is the weight of the jth point in the window, and the calculation formula is where σ w is the window weight attenuation parameter, with a value of 0.5.
[0210] The final optimized salinity error correction function is in the form of a piecewise function:
[0211]
[0212] Where, F corr (S) is the final error correction function value corresponding to salinity S; S min and S max are the minimum and maximum salinity values covered by the training data, usually S min =20‰, S max =45‰.
[0213] The purpose of this step is to further optimize the error correction function, improve the accuracy of corrections at extreme points, and reduce error fluctuations under high salinity conditions. The adaptive weight adjustment algorithm dynamically adjusts the prediction weights to balance the contributions of the model predictions and the initial correction coefficients. By introducing an adaptive smoothing factor, error fluctuations at high salinity extreme points are reduced while maintaining correction accuracy.
[0214] The specific implementation of step S07 is the same as above and will not be repeated here.
[0215] The specific implementation of step S08 is to build a dynamic temperature and pressure compensation mechanism to eliminate the influence of environmental factors on salinity error correction. First, a temperature influence model is established to determine the influence coefficient β of temperature change on conductivity measurement. T :
[0216]
[0217] Where, β T is the temperature influence coefficient, unit is / ℃; T is the measurement temperature, unit is ℃.
[0218] Similarly, a pressure impact model is established to determine the impact coefficient β of pressure change P :
[0219]
[0220] Where, β P is the pressure influence coefficient, unit is / m; D is the measurement depth, unit is meter.
[0221] Based on these influence coefficients, the temperature and pressure compensation function is designed and the temperature and pressure compensation coefficient K is calculated. TP :
[0222] K TP =1+β T ·(TT ref )+β P ·(DD ref );
[0223] Where, T ref is the reference temperature, usually 20℃; D ref The reference depth is usually 0 meters.
[0224] In order to cope with the situation of drastic changes in temperature and pressure, the adaptive factor λ is introduced:
[0225]
[0226] Where λ is the adaptive factor, ranging from 0 to 1; γ T is the temperature change rate influence coefficient, which is set to 0.5; γ Pis the pressure change rate influence coefficient, which is 0.3; is the absolute value of the temperature change rate, in °C / second; is the absolute value of the depth change rate in meters per second.
[0227] Multiply the temperature and pressure compensation coefficient by the error correction value optimized in step S06 to obtain the final correction result after temperature and pressure compensation:
[0228]
[0229] Where, is the final correction result after temperature and pressure compensation; M final is the final correction value obtained in step S06.
[0230] This compensation mechanism uses an adaptive algorithm to dynamically adjust the compensation strength based on the rate of change of temperature and pressure, ensuring stable measurement accuracy even during drastic temperature and pressure fluctuations (such as crossing a thermocline). This step aims to eliminate the interference of temperature and pressure changes on salinity measurements through a multi-parameter combined correction method, thereby improving the stability and reliability of salinity measurements under various environmental conditions.
[0231] To better understand and implement the present invention, Example 2 of a specific application scenario of the present invention is provided below: A certain sea area has hydrological characteristics characterized by high and uneven salinity due to unique climatic and geographical conditions. In traditional CTD waterproof handheld measurements, when the seawater salinity exceeds 35‰, the measurement error shows a significant amplification trend as the salinity value increases, seriously affecting marine scientific research and operations. To address this issue, researchers applied the present invention's measurement error correction method for CTD waterproof handhelds in high-salinity environments to practical applications.
[0232] First, the researchers selected 15 test points across the ocean, representing low-salinity areas (20‰ to 28‰), standard seawater areas (28‰ to 35‰), and high-salinity areas (35‰ to 45‰). Multiple sampling was performed at each test point using a CT-H810 CTD waterproof handheld device. Water samples were also collected and sent to the ship's laboratory for precise salinity measurement. A total of 185 sets of raw error sample data were recorded, as shown in Table 1.
[0233] Table 1 CTD measurement data and error samples in different salinity areas
[0234]
[0235]
[0236] In the second step, the researchers conducted stratified sampling on the collected original error samples, dividing them into five main intervals according to the salinity range: 20‰~25‰, 25‰~30‰, 30‰~35‰, 35‰~40‰ and 40‰~45‰. For high-salinity areas, especially for intervals above 40‰, they were further subdivided into three sub-intervals: 40‰~42‰, 42‰~44‰ and 44‰~46‰ to ensure accurate capture of the error characteristics at the extreme points of high salinity. During the sampling process, the number of samples in each interval was ensured to be no less than 30. For the extremely high salinity interval (44‰~46‰) with fewer samples, oversampling technology was used to increase the number of samples to 35.
[0237] In the third step, the researchers performed frequency domain analysis on the raw error samples within each salinity range. Taking the 40‰ to 42‰ salinity range as an example, the 38 error samples within this range were arranged in ascending order of salinity to form a time series. Spectral analysis was performed using a fast Fourier transform (FFT) algorithm and a Hanning window function. The first five main error spectral features extracted, along with their corresponding amplitudes and phase angles, are shown in Table 2.
[0238] Table 2 Analysis results of error spectrum characteristics in the salinity range of 40‰ to 42‰
[0239] Feature number Frequency (Hz) Amplitude Phase angle (rad) Energy ratio (%) 1 0.015 0.75 0.42 38.5 2 0.048 0.58 1.23 23.1 3 0.103 0.43 2.18 12.7 4 0.156 0.28 0.87 5.4 5 0.192 0.26 1.65 4.6
[0240] Based on the above spectrum characteristics, the researchers established the error spectrum feature vector and used a fourth-order polynomial regression model to fit the relationship between the error and salinity value in each salinity range. For the 40‰ to 42‰ range, the fitted polynomial coefficients were c0 = 12.568, c1 = -1.235, c2 = 0.0478, and c3 = -8.24×10 -4 , c4=5.31×10 -6 , the standard deviation of the fitting error is 0.0086.
[0241] In the fourth step, the researchers constructed and called the salinity error compensation function for data preprocessing. In actual application, the average temperature of the measurement environment was 28.6°C, the average depth was 25.4 meters, and the electrode status parameter was 0.92 (indicating that the electrode was in good condition). For the high salinity range (40‰ to 42‰), the basic correction coefficient α was calculated. 40-42 =0.975, temperature correction parameter β t =0.0216 / °C, depth correction parameter β p =0.0015 / m. Based on these parameters, the error correction coefficient K for this interval is calculated. 40-42 =1.047. The error statistics eigenvector was also calculated, including the mean 0.815, standard deviation 0.093, skewness 0.276, and kurtosis 2.912.
[0242] Next, the researchers used the pretrained SalCorrNet neural network model for in-depth error analysis. This model was pretrained on 82,500 data points covering regions including the North Pacific and the Persian Gulf. When the error spectrum feature vectors in the range of 40‰ to 42‰ were fed into the SalCorrNet model, the model output an error-corrected prediction value of 0.832 with a prediction confidence of 0.91.
[0243] In the sixth step, the researchers optimized the salinity error correction function based on the prediction results of the SalCorrNet model. Since the prediction confidence is 0.91 (greater than 0.85), the calculated prediction weight w prep = 0.891. The local salinity gradient averaged 0.42‰ / m, resulting in an adaptive smoothing factor α of 0.458. Using the sliding window method, we performed a local weighted average of the error correction values at adjacent salinity points, ultimately obtaining a final correction value, M_final, of 0.856 for the range of 40‰ to 42‰.
[0244] The seventh step was to integrate the optimized salinity error correction function into the internal calibration module of the CTD waterproof handheld device. The researchers converted the correction function into a two-dimensional lookup table, with salinity values (in 0.5‰ intervals) on the horizontal axis and temperature values (in 1°C intervals) on the vertical axis. The elements in the table represent the correction coefficients for the corresponding conditions. Table 3 shows some of the lookup table data.
[0245] Table 3 Salinity-temperature correction coefficient lookup table (partial)
[0246] Salinity (‰) / temperature (℃) 20 21 22 23 24 25 40.0 0.836 0.839 0.843 0.846 0.850 0.854 40.5 0.846 0.849 0.853 0.857 0.861 0.864 41.0 0.867 0.870 0.874 0.878 0.882 0.886 41.5 0.898 0.902 0.906 0.910 0.914 0.918 42.0 0.932 0.936 0.940 0.944 0.948 0.953
[0247] In the eighth step, the researchers constructed a dynamic temperature and pressure compensation mechanism. In the actual application environment, the temperature change rate reached a maximum of 0.42°C / second and the depth change rate reached a maximum of 0.38 meters / second. Based on these parameters, the temperature and pressure compensation coefficient K was calculated. tp P=1.182, adaptive factor λ=0.638, and the final correction result after temperature and pressure compensation M*_final=0.913.
[0248] Finally, the researchers conducted a systematic experimental verification. Comparative tests were conducted at three typical high-salinity test points in the sea area under investigation. Measurements were taken simultaneously using a CTD waterproof handheld device with integrated error correction and an uncorrected instrument of the same model. 60 sets of data were recorded at each test point. The experimental results are shown in Table 4.
[0249] Table 4 Comparison of measurement errors before and after correction
[0250]
[0251] This embodiment successfully addresses the issue of decreased measurement accuracy in high-salinity environments for waterproof CTD handheld devices by introducing error spectrum analysis, a salinity error compensation function, the SalCorrNet deep learning model, an adaptive weight adjustment algorithm, and a dynamic temperature and pressure compensation mechanism. Compared to traditional solutions, this invention offers the following significant advantages:
[0252] Traditional CTD measurement error correction in high-salinity environments mainly uses linear calibration or simple polynomial fitting methods, which cannot adapt to the nonlinear response characteristics of conductivity sensors in high-salinity environments, resulting in limited correction accuracy. Especially in the extreme salinity range exceeding 40‰, the error may even exceed 2‰. However, by introducing frequency domain analysis and deep learning technology, this invention can accurately capture the complex nonlinear characteristics of measurement errors in high-salinity environments, reducing the mean absolute error in high-salinity areas (>35‰) from 1.16‰ to 0.31‰, a reduction rate of 73.3%.
[0253] Traditional methods often ignore the effects of temperature and pressure changes on salinity measurements, or use simple linear compensation. This can significantly increase errors in environments with drastic temperature and pressure fluctuations, such as across thermoclines. The dynamic temperature and pressure compensation mechanism introduced in this invention adaptively adjusts the compensation strength based on real-time changes in temperature and depth, effectively eliminating interference from environmental factors and ensuring stable measurement accuracy under various environmental conditions.
[0254] Traditional methods often struggle to adapt to the changing characteristics of different sea areas and seasons after the correction model is established, requiring frequent recalibration. This paper, using the SalCorrNet deep learning model and adaptive weight adjustment algorithm, achieves adaptive optimization of the correction method, enabling it to adapt to changes in different sea areas and measurement conditions, significantly improving the method's versatility and practicality.
[0255] It should be noted that the variables involved in the present invention are explained in detail as shown in Tables 5 and 6 below.
[0256] Table 5 Variable Explanation Table (Part 1)
[0257]
[0258] Table 6 Variable Explanation Table (Part 2)
[0259]
[0260]
[0261] The above merely illustrates the specific embodiments of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application.
Claims
1. A method for correcting measurement errors of a CTD waterproof handheld device in a high salinity environment, characterized in that: include: Collect multiple sets of measurement data from a CTD waterproof handheld device in a high-salinity environment, and record the deviation between the actual salinity value and the measured value as the original error sample; A stratified sampling method is used to divide the original error samples into several intervals according to the salinity concentration gradient. Fourier transform analysis is performed on the original error samples in each salinity interval to extract the error spectrum characteristics and establish a model of the relationship between error and salinity. The salinity error compensation function is called for error correction preprocessing. The pre-trained salinity error neural network model SalCorrNet is introduced to analyze the error spectrum characteristics and construct a nonlinear error mapping relationship. The salinity error correction function is optimized according to the output results of the SalCorrNet model, and an adaptive weight adjustment algorithm is used to reduce the error fluctuation of high salinity extreme points. The optimized salinity error correction function is integrated into the internal calibration module of the CTD waterproof handheld device. A dynamic temperature and pressure compensation mechanism is established to eliminate the influence of temperature and pressure changes on the accuracy of the salinity error correction function.
2. The measurement error correction method of the CTD waterproof handheld device in a high salinity environment according to claim 1 is characterized in that: The stratified sampling method is used to divide the original error samples into several intervals according to the salinity concentration gradient to ensure that the data covers the entire measurement range.
3. The measurement error correction method of the CTD waterproof handheld device in a high salinity environment according to claim 2 is characterized in that: Error spectrum characteristics refer to the periodic variation characteristics obtained by performing frequency domain analysis on the measurement error data, including amplitude, phase, and frequency distribution.
4. The measurement error correction method for a CTD waterproof handheld device in a high salinity environment according to claim 3 is characterized in that: The adaptive weight adjustment algorithm refers to an algorithm that dynamically allocates correction parameter weights according to the error distribution characteristics in different salinity ranges to improve the measurement accuracy near the extreme points.
5. The measurement error correction method for a CTD waterproof handheld device in a high salinity environment according to claim 4 is characterized in that: The dynamic temperature and pressure compensation mechanism refers to a measure to ensure the stability of measurement accuracy under various environmental conditions by performing multi-parameter joint correction on salinity measurement values based on real-time temperature and pressure change data.
6. The measurement error correction method for a CTD waterproof handheld device in a high salinity environment according to claim 5 is characterized in that: The salinity error compensation function is used to perform preliminary processing on the original error samples and calculate the error correction coefficients for each salinity interval. The input includes the original salinity value, measured salinity value, measured temperature value, measured depth value, and electrode state parameters. The output is the salinity interval error correction coefficient matrix and the error statistical eigenvector.
7. The measurement error correction method for a CTD waterproof handheld device in a high salinity environment according to claim 6 is characterized in that: The specific structure of the SalCorrNet model is a deep learning architecture that combines a multi-layer perceptron and a recurrent neural network. It includes a three-layer convolutional neural network to extract local features of the error spectrum, a two-layer long short-term memory network to capture the temporal variation pattern of the error, a one-layer multi-head attention mechanism to distinguish between electrode contamination error and nonlinear conductivity error in a high-salinity environment, and a three-layer fully connected network to output correction parameters.
8. The measurement error correction method for a CTD waterproof handheld device in a high salinity environment according to claim 7 is characterized in that: The number of heads in the multi-head attention mechanism is determined according to the number of salinity intervals, the weight decay parameter is determined according to the characteristic amplitude distribution of the error spectrum, and the attention mask parameter is determined according to the fluctuation degree of the electrode state parameter.
9. The measurement error correction method for a CTD waterproof handheld device in a high salinity environment according to claim 8, characterized in that: The steps for establishing the training dataset during the pre-training process of the SalCorrNet model include collecting multi-depth salinity gradient measurement data in different sea areas and seasons, using high-precision laboratory-grade analytical instruments to obtain standard salinity values as true value references, recording measurement error cases in high-salinity environments under various electrode conditions, and marking the relationship between the degree of electrode contamination and the type of error.
10. The measurement error correction method for a CTD waterproof handheld device in a high salinity environment according to claim 9, characterized in that: The steps of establishing the training dataset during the pre-training process of the SalCorrNet model also include constructing a supervised learning dataset containing the correspondence between the error spectrum feature vector and the correction parameters, applying data augmentation technology to simulate measurement scenarios under extreme salinity environments, and establishing validation and test sets for model evaluation and preventing overfitting.
Citation Information
Patent Citations
Satellite sea surface salinity deviation correction method based on deep learning
CN118013346A
Data compensation method for ocean temperature-salinity-depth sensor
CN118376275A
Argo conductivity data correction method based on thermal-halocline internal wave influence
CN119510904A
Seawater parameter calibration system
CN119920364A
Optical dissolved oxygen sensor calibration method based on nonlinear temperature compensation
CN119985428A
Cited By
Continuous conductivity measurement method and system for temperature reduction of drainage recovery sampling branch
CN121994876A