A pressure sensor compensation method based on small sample transfer algorithm

CN122591131APending Publication Date: 2026-08-18CENT FOR HYDROGEOLOGY & ENVIRONMENTAL GEOLOGY CGS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610746338.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-28
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0005]因此,本发明提供了一种基于小样本迁移算法的压力传感器补偿方法解决现有压力传感器补偿技术对密集温压标定数据依赖较强且在少量标定点条件下补偿参数难以快速确定的问题

Benefits of technology

[0024]作为本发明所述基于小样本迁移算法的压力传感器补偿方法的一种优选方案,其中:所述输出最终补偿压力值,具体步骤为:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122591131A_ABST
    Figure CN122591131A_ABST
Patent Text Reader

Abstract

The application discloses a pressure sensor compensation method based on a small sample migration algorithm, relates to the technical field of pressure sensor compensation, and comprises the following steps: pre-identification sampling is performed on a pressure sensor to be compensated; a prior compensation coefficient vector is determined; and a small sample set is formed according to an identification contribution value. The small sample set and the prior compensation coefficient vector are input into a hierarchical sparse mixed migration network, a difference basis offset is estimated, a complete compensation coefficient vector is reconstructed based on the difference basis offset, the prior compensation coefficient vector and the difference basis, and a final complete compensation coefficient vector is determined. The final complete compensation coefficient vector is written into an intelligent sensor, binary polynomial compensation is performed according to original output and environmental temperature, closed-loop micro-correction is performed on a binary polynomial compensation pressure value, and a final compensation pressure value is output. The method reduces subsequent calibration data requirements and improves the common rule reuse capability of similar pressure sensors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pressure sensor compensation technology, and in particular to a pressure sensor compensation method based on a few-sample migration algorithm. Background Technology

[0002] Pressure sensor compensation technology has wide applications in industrial process control, automotive electronics, energy equipment, aerospace, medical instruments, and smart meters. Because factors such as the characteristics of pressure-sensitive elements, bridge output nonlinearity, packaging stress, temperature drift, and device discreteness all affect sensor output, existing technologies typically focus on calibration and compensation under full temperature and full range conditions. This involves first collecting raw output, ambient temperature, and standard pressure data at multiple temperature and pressure points, then establishing a mapping relationship between the raw output and pressure value based on the calibration data, and obtaining compensation parameters using methods such as polynomial fitting, lookup table correction, piecewise regression, or data-driven modeling. These compensation parameters are then written into a microcontroller, signal conditioning unit, or smart sensor control terminal to achieve real-time compensation calculations during operation. This type of method features a clear model structure, mature deployment methods, and ease of integration with existing measurement circuits and factory calibration processes. In mass manufacturing scenarios, it also ensures standardized parameter management, convenient system integration, and stable engineering applications.

[0003] Conventional methods still face several challenges in practical applications. The compensation model typically relies on dense temperature and pressure calibration data, resulting in a long calibration cycle and high implementation costs. They also fail to fully utilize the common compensation patterns among pressure sensors of the same model, range, and manufacturing process. Furthermore, the compensation parameters of the pressure sensor to be compensated are difficult to determine quickly with a limited number of calibration points. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides a pressure sensor compensation method based on a small sample migration algorithm to solve the problem that existing pressure sensor compensation technologies are heavily dependent on dense temperature and pressure calibration data and that compensation parameters are difficult to determine quickly under conditions of a small number of calibration points.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: This invention provides a pressure sensor compensation method based on a few-sample migration algorithm, comprising: Collect all historical pressure sensor calibration data, establish a bivariate polynomial compensation surface, determine the compensation coefficient vector, extract the common mother vector and the difference basis through the compensation coefficient vector, and determine the identification contribution value based on the difference basis.

[0007] Pre-identification sampling is performed on the pressure sensor to be compensated to determine the prior compensation coefficient vector, and a small sample set is formed based on the identification contribution value.

[0008] A small sample set and the prior compensation coefficient vector are input into a hierarchical sparse hybrid transfer network to estimate the differential basis shift. Based on the differential basis shift, the prior compensation coefficient vector, and the differential basis, the complete compensation coefficient vector is reconstructed, and the final complete compensation coefficient vector is determined.

[0009] The final complete compensation coefficient vector is written into the smart sensor, and a binary polynomial compensation is performed based on the original output and ambient temperature. The binary polynomial compensation pressure value is then subjected to closed-loop micro-correction, and the final compensation pressure value is output.

[0010] As a preferred embodiment of the pressure sensor compensation method based on the small sample migration algorithm described in this invention, the specific steps for collecting historical pressure sensor full calibration data, establishing a bivariate polynomial compensation surface, and determining the compensation coefficient vector are as follows: Each historical pressure sensor in the historical pressure sensor set is fully calibrated to form a historical calibration record under a full temperature and pressure grid consisting of temperature nodes and pressure nodes.

[0011] The original output, ambient temperature, and standard pressure are normalized by sharing the upper and lower limits of linear normalization. A bivariate polynomial compensation surface is established in the two-dimensional space of the normalized original output and the normalized ambient temperature. The compensation coefficients are obtained by least squares global regression with stability constraints, and the compensation coefficient vector is formed in the order of characteristic terms.

[0012] As a preferred embodiment of the pressure sensor compensation method based on the small sample transfer algorithm described in this invention, the specific steps of extracting the common mother vector and the difference basis through the compensation coefficient vector, and determining the identification contribution value based on the difference basis are as follows: After the compensation coefficient vectors of all historical pressure sensors are determined, the common mother vector and the difference basis are extracted through the compensation coefficient vectors. Each temperature and pressure combination point in the full temperature and pressure grid is used as a candidate point, and the identification contribution value of each candidate point is determined based on the difference basis.

[0013] As a preferred embodiment of the pressure sensor compensation method based on the small sample transfer algorithm described in this invention, the steps of pre-identifying and sampling the pressure sensor to be compensated to determine the prior compensation coefficient vector are as follows: At the pre-identification point, the pressure sensor to be compensated is pre-identified and sampled. Based on the common linear normalization upper and lower limits, the original output in the pre-identification record is normalized. The normalized original output of the historical pressure sensor set at the pre-identification point is extracted. The normalized original output of the pressure sensor to be compensated at the pre-identification point is matched with the normalized original output of each historical pressure sensor at the same pre-identification point according to the point position order. The square root of the sum of the squares of the differences of the normalized original outputs of all pre-identification points is taken as the overall difference between the pressure sensor to be compensated and the corresponding historical pressure sensor.

[0014] Select the historical pressure sensor with the smallest overall difference, and determine the compensation coefficient vector of the historical pressure sensor with the smallest overall difference as the prior compensation coefficient vector of the pressure sensor to be compensated.

[0015] As a preferred embodiment of the pressure sensor compensation method based on the few-sample migration algorithm described in this invention, the specific steps of forming a few-sample set based on the identified contribution values ​​are as follows: After the prior compensation coefficient vector is determined, a small sample set is formed based on the identification contribution value. The pre-identified points are merged into the small sample set. The remaining candidate points are selected in sequence according to the identification contribution value and the distance to each point in the selected point set, until the number of points in the small sample set reaches the upper limit. Each small sample record in the small sample set is written as a combination of the original output, ambient temperature, standard pressure and corresponding identification contribution value.

[0016] As a preferred embodiment of the pressure sensor compensation method based on the few-sample transfer algorithm described in this invention, the step of inputting the few-sample set and the prior compensation coefficient vector into a hierarchical sparse hybrid transfer network to estimate the differential basis shift includes: Normalize each small sample record in the small sample set, determine the prior residual based on the prior compensation coefficient vector, and input the small sample set consisting of the normalized original output, normalized ambient temperature, normalized standard pressure, corresponding identification contribution value and corresponding prior residual into the hierarchical sparse hybrid transfer network.

[0017] The hierarchical sparse hybrid migration network adopts a serial structure of physical perception sparse tokenization, local fine-grained hybridization, global sparse hybridization, and adapter output. It outputs differential basis offset through adapter output and forms a universal compensation backbone for pressure sensors of the same model, range, and manufacturing process batch through source domain pre-training with historical pressure sensor sets as training objects.

[0018] As a preferred embodiment of the pressure sensor compensation method based on the small-sample transfer algorithm described in this invention, the step of inputting the small-sample set and the prior compensation coefficient vector into a hierarchical sparse hybrid transfer network, estimating the differential basis shift, and reconstructing the complete compensation coefficient vector based on the differential basis shift, the prior compensation coefficient vector, and the differential basis further includes: During the target domain adaptation phase, the general compensation backbone parameters of the hierarchical sparse hybrid transfer network are kept unchanged. Only the mapping matrix and bias vector in the adapter are updated. The mapping matrix and bias vector in the adapter are initialized with the corresponding mapping matrix and bias vector in the first and second layers of the adapter after the source domain pre-training is completed. The complete compensation coefficient vector is reconstructed based on the differential basis offset, the prior compensation coefficient vector and the differential basis.

[0019] The mean squared deviation is calculated on a small sample set based on the complete compensation coefficient vector, and the mapping matrix and bias vector in the adapter are updated by backpropagation using gradient descent based on the mean squared deviation.

[0020] As a preferred embodiment of the pressure sensor compensation method based on the few-sample migration algorithm described in this invention, the specific steps for determining the final complete compensation coefficient vector are as follows: When the mean squared deviation no longer decreases, the adapter update is stopped, and the complete compensation coefficient vector with the smallest mean squared deviation is selected from the complete compensation coefficient vectors obtained before the adapter update was stopped.

[0021] When there are multiple complete compensation coefficient vectors with the same mean square deviation, the complete compensation coefficient vector with the smallest sum of the absolute values ​​of the second-order differences is selected. If there are still multiple vectors, the complete compensation coefficient vector with the fewest changes in the sign of adjacent non-zero terms in the second-order difference sequence is selected and determined as the final complete compensation coefficient vector.

[0022] As a preferred embodiment of the pressure sensor compensation method based on the small sample migration algorithm described in this invention, the steps of writing the final complete compensation coefficient vector into the smart sensor, performing bivariate polynomial compensation based on the original output and ambient temperature, and performing closed-loop micro-correction on the bivariate polynomial compensated pressure value are as follows: The final complete compensation coefficient vector and the shared linear normalization upper and lower limits are written into the intelligent sensor control terminal according to the characteristic terms of the bivariate polynomial compensation surface.

[0023] The intelligent sensor control unit calculates the bivariate polynomial compensation pressure value based on the original output and ambient temperature by using the final complete compensation coefficient vector in the order of the characteristic terms of the bivariate polynomial compensation surface, and performs closed-loop micro-correction through three closed-loop micro-correction points in the full temperature and pressure grid.

[0024] As a preferred embodiment of the pressure sensor compensation method based on the few-sample migration algorithm described in this invention, the specific steps for outputting the final compensated pressure value are as follows: At the three closed-loop micro-correction points, the bivariate polynomial compensated pressure value is correlated with the corresponding standard pressure to determine the overall proportional correction and overall bias correction. In each pressure output cycle, the same overall proportional correction and the same overall bias correction are performed on the bivariate polynomial compensated pressure value to output the final compensated pressure value.

[0025] The beneficial effects of this invention are as follows: by extracting the common mother vector and the difference basis through the compensation coefficient vector, and calculating the identification contribution value of each candidate point based on the difference basis, the common compensation rules and individual discrete characteristics of the historical pressure sensor set are effectively characterized, reducing the need for subsequent calibration data; by inputting a small sample set and the prior compensation coefficient vector into a hierarchical sparse hybrid transfer network, the difference basis shift is estimated and the complete compensation coefficient vector is reconstructed, enabling the rapid determination of the compensation parameters of the pressure sensor to be compensated under the condition of a small number of calibration points, and improving the ability to reuse the common rules of similar pressure sensors. Attached Figure Description

[0026] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a flowchart of a pressure sensor compensation method based on a few-sample migration algorithm.

[0028] Figure 2 Flowchart for determining the prior compensation coefficient vector.

[0029] Figure 3 A flowchart for forming a small sample set.

[0030] Figure 4 Flowchart for sparse tokenization grouping of physical perception.

[0031] Figure 5 A graph showing the relationship between the number of points in a small sample set and the RMSE of the full temperature and pressure grid.

[0032] Figure 6 To adapt the convergence relationship between round number and mean squared deviation. Detailed Implementation

[0033] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0034] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0035] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0036] Reference Figures 1-6 This is one embodiment of the present invention, which provides a pressure sensor compensation method based on a few-sample migration algorithm, comprising the following steps: S1. Collect all historical pressure sensor calibration data, establish a bivariate polynomial compensation surface, determine the compensation coefficient vector, and extract the common mother vector and difference basis through the compensation coefficient vector. Based on the difference basis, determine the identification contribution value.

[0037] Historical pressure sensors of the same model, range, and manufacturing process batch are selected as a set of historical pressure sensors. Each historical pressure sensor is fully calibrated. The full calibration is performed by a full temperature and pressure grid composed of temperature nodes (e.g., 10) and pressure nodes (e.g., 11), so that each historical pressure sensor has a historical calibration record (e.g., 110 records). Each historical calibration record includes the raw output, ambient temperature, and standard pressure at the same time. During data acquisition, the temperature is kept constant at each temperature node. After the temperature stabilizes, the standard pressure corresponding to each pressure node is applied sequentially at the current temperature node. The raw output is continuously read at each pressure node and the average value is taken. The averaged raw output, the corresponding ambient temperature, and the corresponding standard pressure are written into the same historical calibration record.

[0038] Raw output refers to the original analog-to-digital conversion code value output by the pressure sensor under the current standard pressure and ambient temperature, without any compensation processing.

[0039] For each historical pressure sensor, the raw output, ambient temperature, and standard pressure are normalized. A bivariate polynomial compensation surface (e.g., fourteen terms) is established in the two-dimensional space of the normalized raw output and normalized ambient temperature. For each historical calibration record of the current historical pressure sensor, feature terms corresponding to the bivariate polynomial compensation surface are generated sequentially based on the normalized raw output and normalized ambient temperature. These feature terms sequentially include a constant term, a linear term for the raw output, a linear term for the ambient temperature, a quadratic term for the raw output, a linear intersection term for the raw output and ambient temperature, a quadratic term for the ambient temperature, a cubic term for the raw output, a linear intersection term for the raw output and ambient temperature, a cubic term for the raw output, a quartic term for the raw output, a cubic intersection term for the raw output and ambient temperature, a quadratic intersection term for the raw output and ambient temperature, and a cubic intersection term for the raw output and ambient temperature. The feature terms corresponding to each historical calibration record are written into a row of the feature matrix in the same order. The normalized standard pressure corresponding to the current historical calibration record is written into the corresponding position of the target vector. After all historical calibration records of the current historical pressure sensor have been written, the overall correlation between each feature term is calculated according to the feature matrix. The average value of the diagonal elements and the average value of the absolute values ​​of the off-diagonal elements of the overall correlation matrix are calculated. The product of the ratio of the average value of the absolute values ​​of the off-diagonal elements to the average value of the diagonal elements and the average value of the diagonal elements is used as the diagonal adjustment amount added to each diagonal position. The overall correlation matrix after adding the diagonal adjustment amount is combined with the target vector to perform least squares overall regression to obtain the compensation coefficient that minimizes the overall squared deviation between the compensation output and the corresponding normalized standard pressure. The compensation coefficients are arranged in order of feature terms to form the compensation coefficient vector corresponding to the current historical pressure sensor.

[0040] Normalizing the raw output, ambient temperature, and standard pressure of each historical pressure sensor involves using the common linear normalization upper and lower limits of historical pressure sensors of the same model, range, and manufacturing process batch. The ratio of the difference between the raw output in the current historical calibration record and the common raw output lower limit to the difference between the common raw output upper limit and the common raw output lower limit is used as the normalized raw output. Similarly, the ratio of the difference between the ambient temperature in the current historical calibration record and the common ambient temperature lower limit to the difference between the common ambient temperature upper limit and the common ambient temperature lower limit is used as the normalized ambient temperature. The ratio of the difference between the standard pressure in the historical calibration records and the lower limit of the common standard pressure to the difference between the upper limit of the common standard pressure and the lower limit of the common standard pressure is used as the normalized standard pressure. The lower limit of the common original output is taken as the minimum original output in all historical calibration records, and the upper limit of the common original output is taken as the maximum original output in all historical calibration records. The lower limit of the common ambient temperature is taken as the lowest temperature node in the full temperature and pressure grid, and the upper limit of the common ambient temperature is taken as the highest temperature node in the full temperature and pressure grid. The lower limit of the common standard pressure is taken as the lowest standard pressure in the current range, and the upper limit of the common standard pressure is taken as the highest standard pressure in the current range.

[0041] After determining the compensation coefficient vectors of all historical pressure sensors, the common mother vector and the difference basis are extracted from the compensation coefficient vectors, and the expression is as follows: ; ; ; ; in, This represents the common parent vector, which is the common compensation center of all historical pressure sensors in the compensation coefficient space. Indicates the number of historical pressure sensors. Indicates the first Only the compensation coefficient vector of the historical pressure sensor, This represents the covariance matrix of the compensation coefficients. Indicates the first 1 eigenvector Indicates the first The eigenvalues ​​corresponding to each eigenvector The difference basis retention dimension is defined as the number of eigenvectors corresponding to the eigenvalues ​​of the compensation coefficient covariance matrix, sorted from largest to smallest, and then taken as the difference basis retention dimension. Indicates from the previous The difference basis matrix is ​​composed of eigenvectors.

[0042] After determining the common mother vector and the differential basis, each temperature-pressure combination point in the full temperature-pressure grid is used as a candidate point. For each candidate point, the normalized raw output of the historical pressure sensor set at the current temperature-pressure combination point is extracted, and the average value of the normalized raw output of all historical pressure sensors at the current temperature-pressure combination point is determined as the normalized raw output at the current candidate point. The normalized ambient temperature corresponding to the current temperature-pressure combination point is determined as the normalized ambient temperature at the current candidate point. The identification contribution value of each candidate point is calculated based on the differential basis, expressed as: ; in, Indicates the first The identification contribution value of each candidate point Indicates from the previous An eigenvalue submatrix composed of eigenvalues Indicates the first The binary polynomial basis vectors corresponding to the candidate points at the normalized original output and the normalized ambient temperature location. Indicates the first The normalized raw output at each candidate point is the average normalized raw output of the historical pressure sensor set at the corresponding temperature and pressure combination point. Indicates the first Normalized ambient temperature at each candidate point.

[0043] S2. Perform pre-identification sampling on the pressure sensor to be compensated, determine the prior compensation coefficient vector, and form a small sample set based on the identification contribution value.

[0044] The pre-identification sampling uses nine pre-identification points. These nine pre-identification points are obtained by combining the lowest temperature node, the sixth temperature node sorted from low to high, and the highest temperature node in the full-scale temperature and pressure grid with the lowest standard pressure, the sixth pressure node sorted from low to high, and the highest standard pressure in the current range. The temperature is kept constant at each pre-identification point. After the temperature stabilizes, the corresponding standard pressure is applied at the current pre-identification point. The raw output is continuously read and averaged. The averaged raw output, the corresponding ambient temperature, and the corresponding standard pressure are written into the pre-identification record.

[0045] Based on the shared linear normalization upper and lower limits, the original outputs in the pre-identification records are normalized, and the normalized original outputs of the historical pressure sensor set at nine pre-identification points are extracted. The normalized original outputs of the pressure sensor to be compensated at the nine pre-identification points are matched with the normalized original outputs of each historical pressure sensor at the nine pre-identification points according to the point position order. The square root of the sum of squares of the differences between the normalized original outputs of all nine pre-identification points is taken as the overall difference between the pressure sensor to be compensated and the corresponding historical pressure sensor. The historical pressure sensor with the smallest overall difference is selected according to the overall difference from smallest to largest, and the compensation coefficient vector of the historical pressure sensor with the smallest overall difference is determined as the prior compensation coefficient vector of the pressure sensor to be compensated. When there are multiple historical pressure sensors with the same overall difference, the historical pressure sensor with the smaller sum of squares of the difference between the corresponding terms of the compensation coefficient vector and the common mother vector is selected first. If they are still the same, the historical pressure sensor with the smallest historical pressure sensor number is selected.

[0046] After the prior compensation coefficient vector is determined, a small sample set is formed based on the identification contribution value. The number of points in the small sample set is set to 55. Nine pre-identified points are incorporated into the small sample set, and the remaining 46 points are selected from the candidate points in the full-scale thermo-barometry grid, excluding the pre-identified points. The candidate points are selected and sorted in descending order of identification contribution value. The sorted results are then scanned sequentially. For the currently scanned candidate point, the distance between the current candidate point and each point in the selected point set is determined on the normalized original output and the normalized ambient temperature plane. If the distance between the current candidate point and any point in the selected point set is less than half of the average distance between adjacent candidate points in the full-scale thermo-barometry grid on the normalized original output and the normalized ambient temperature plane, the current candidate point is discarded, and the scan continues to the next candidate point. If the distance between the selected point and all selected points in the selected point set is not less than half the average distance between adjacent candidate points in the full temperature and pressure grid on the normalized original output and the normalized ambient temperature plane, then the current candidate point is added to the small sample set. This process is repeated until the number of points in the small sample set reaches fifty-five. When multiple candidate points have the same identification contribution value, the candidate point with the larger minimum distance to each point in the selected point set is selected first. If they are still the same, the candidate point with the lower temperature node is selected first. If they are still the same, the candidate point with the lower standard pressure is selected first. If the number of points in the small sample set still does not reach fifty-five after all candidate points have been scanned, the candidate points that have not been added to the small sample set are selected from the largest to the smallest identification contribution value until the number of points in the small sample set reaches fifty-five.

[0047] After the small sample set is formed, each small sample record in the small sample set is written as a combination of the original output, ambient temperature, standard pressure and corresponding identification contribution value, and output together with the prior compensation coefficient vector.

[0048] Figure 5 The horizontal axis represents the number of points in the small sample set, and the vertical axis represents the RMSE (root mean square error) of the full thermobaric grid. The four curves respectively represent the changes in the full thermobaric grid error under different small sample set conditions for the proposed method, the migration reconstruction method without prior compensation coefficient vectors, the uniform point selection method with direct bivariate polynomial fitting, and the random point selection method with direct bivariate polynomial fitting. Figure 5 As can be seen, the RMSE of the full temperature and pressure grid of each method gradually decreases as the number of points in the small sample set increases. However, the method of this invention maintains the lowest level in each range of point counts. This indicates that by calculating the identification contribution value through the common mother vector and the difference basis, and forming a small sample set accordingly, it can more effectively cover the temperature and pressure combination points that are most valuable for identifying compensation parameters under the condition of fewer small sample records, reducing the dependence on dense calibration data. As can be seen from the spacing between different curves, the method of this invention can still maintain a low error in the low point count range, indicating that this invention is more effective in reducing the need for subsequent calibration data.

[0049] S3. Input the small sample set and the prior compensation coefficient vector into the hierarchical sparse hybrid transfer network, estimate the differential basis shift, reconstruct the complete compensation coefficient vector based on the differential basis shift, the prior compensation coefficient vector and the differential basis, and determine the final complete compensation coefficient vector.

[0050] Based on the shared linear normalization upper and lower limits, the original output, ambient temperature, and standard pressure in each small sample record in the small sample set are normalized. Each small sample record is constructed with a feature term sequence according to the feature term order of the bivariate polynomial compensation surface. The feature term sequence and the prior compensation coefficient vector are multiplied from front to back according to their corresponding positions to obtain the normalized pressure estimate corresponding to the current small sample record. The difference between the normalized pressure estimate and the corresponding normalized standard pressure is used as the prior residual of the current small sample record. Each small sample record is uniformly rewritten as a combination of the normalized original output, normalized ambient temperature, normalized standard pressure, corresponding identification contribution value, and corresponding prior residual.

[0051] After all small sample records are rewritten, the small sample set is input into the hierarchical sparse hybrid transfer network. The training of the hierarchical sparse hybrid transfer network includes source domain pre-training and target domain adaptation. In the source domain pre-training stage, the historical pressure sensor set is used as the training object. Source domain training samples are constructed one by one according to the historical pressure sensor. For each historical pressure sensor used as the current training object, the current historical pressure sensor itself is first removed from the historical pressure sensor set. Based on pre-identification sampling and overall difference, the historical pressure sensor with the smallest overall difference from the current training object is determined from the remaining historical pressure sensors. The compensation coefficient vector of the historical pressure sensor with the smallest overall difference is determined as the prior compensation coefficient vector corresponding to the current training object. A small sample set is formed for the full calibration records of the current training object, and the prior residual is determined according to the prior compensation coefficient vector. The small sample set consisting of the normalized original output, normalized ambient temperature, normalized standard pressure, corresponding identification contribution value and corresponding prior residual, together with the corresponding prior compensation coefficient vector, is used as the network input. The compensation coefficient vector determined by the current training object is used as the supervision output. The transfer network is trained by using the overall magnitude of the difference between the corresponding compensation coefficients at the corresponding positions between the reconstructed complete compensation coefficient vector and the supervised output, as well as the mean squared deviation of the complete compensation coefficient vector on the corresponding small sample set, as the joint optimization objective. The parameters of the hierarchical sparse hybrid transfer network are updated through backpropagation. The source domain pre-training is performed cyclically for each historical pressure sensor. When the continuous decrease of the joint optimization objective decreases to a stable level or reaches the upper limit of the training rounds, the source domain pre-training is stopped, and the obtained network parameters are determined as the general compensation backbone for pressure sensors of the same model, range, and manufacturing process batch. In the target domain adaptation stage, the small sample set of the pressure sensor to be compensated and the prior compensation coefficient vector are input into the hierarchical sparse hybrid transfer network. The backbone parameters are kept unchanged, and only the adapter parameters are updated so that the differential basis offset of the adapter output gradually matches the individual offset of the pressure sensor to be compensated relative to the prior compensation coefficient vector. Based on the differential basis offset, the prior compensation coefficient vector, and the differential basis, the complete compensation coefficient vector of the pressure sensor to be compensated is reconstructed. After training and adaptation are completed, the reconstructed complete compensation coefficient vector is output.

[0052] The hierarchical sparse hybrid transfer network employs a four-segment cascaded structure: physically-aware sparse tokenization, local fine-grained hybrid, global sparse hybrid, and adapter output. Physically-aware sparse tokenization uses the two-dimensional location formed by the normalized original output and normalized ambient temperature of each small sample record as the partitioning criterion. The number of groups is determined by the dimension preserved by the difference basis. After sorting by identification contribution value from largest to smallest, the top-ranked, non-repeating small sample records are selected as the initial centers of each group. For each small sample record, the normalized original output and normalized output of the small sample record and each initial center are calculated separately. The distance on the normalized ambient temperature plane is used to determine the group corresponding to the initial center with the smallest distance. This group is then assigned to the current small sample record. When any small sample record has the same distance as multiple initial centers, it is preferentially assigned to the group with the larger identification contribution value in the group corresponding to the initial center. If they are still the same, it is assigned to the group with the lower ambient temperature in the group corresponding to the initial center. For each group, the normalized original output, normalized ambient temperature, normalized standard pressure, corresponding identification contribution value, and corresponding prior residual of all small sample records within the group are averaged to form sparse tokens.

[0053] After the sparse tokens are formed, local fine-grained mixing is performed within each sparse token. The five mean features within each sparse token are arranged in order to form an input vector. The first fully connected mapping is performed to transform the input vector into hidden features. The hidden features are then subjected to non-linear activation processing (e.g., Gaussian error linear unit activation processing). The second fully connected mapping is then performed to obtain the local fine-grained features of the current sparse token.

[0054] After local fine-grained mixing is completed, global sparsity mixing is performed. The distance between the group centers corresponding to each sparse token on the normalized original output and the normalized ambient temperature plane is calculated, and the average of the pairwise distances of all group centers is taken as the boundary distance. When the distance between the group centers corresponding to two sparse tokens is not greater than the boundary distance, the two sparse tokens are allowed to exchange information. When the distance between the group centers corresponding to two sparse tokens is greater than the boundary distance, the two sparse tokens are prohibited from directly exchanging information.

[0055] After global sparsity mixing is completed, the mixing results of all sparse tokens are concatenated and aggregated in sparse token order to obtain the global feature representation of the pressure sensor to be compensated in the current small sample set. The global feature representation is then input into the adapter to estimate the differential basis shift. The adapter adopts a two-layer mapping structure. The first layer maps the global feature representation to an intermediate representation with the same dimension as the differential basis retained. The second layer maps the intermediate representation to the differential basis shift, expressed as: ; in, Indicates differential basis shift. This represents the mapping matrix of the first layer of the adapter. This represents the mapping matrix of the second layer of the adapter. This indicates element-wise nonlinear activation. This represents the global feature representation. This represents the bias vector of the first layer of the adapter. This represents the bias vector of the second layer of the adapter.

[0056] During the target domain adaptation phase, a migration method involving backbone freezing and adapter updating is employed. Specifically, the backbone parameters responsible for physical perception sparse tokenization, local fine-grained mixing, and global sparse mixing in the hierarchical sparse hybrid transfer network remain unchanged. Only the mapping matrix and bias vector in the adapter are updated. These mapping matrices and bias vectors are initialized using the corresponding mapping matrices and bias vectors from the first and second layers of the adapter after pre-training in the source domain. After each adapter update, the complete compensation coefficient vector is reconstructed using the current differential basis offset, the prior compensation coefficient vector, and the differential basis. This complete compensation coefficient vector is then substituted into the binary polynomial. For the compensation surface, the compensation pressure value is calculated line by line at the normalized original output and normalized ambient temperature position corresponding to all small sample records. The difference between the compensation pressure value corresponding to each small sample record and the corresponding normalized standard pressure is calculated and squared. The average of all squared results is taken, and the result is determined as the mean squared deviation of the current complete compensation coefficient vector on the small sample set. Gradient descent is used for updating. The mapping matrix and bias vector in the adapter are updated by backpropagation based on the mean squared deviation, so that the differential basis offset of the adapter output approaches the true individual offset of the pressure sensor to be compensated relative to the prior compensation coefficient vector round by round.

[0057] Calculating the compensation pressure value line by line means generating feature terms that correspond to the binary polynomial compensation surface and are in the same order for each small sample record, and summing the products of each feature term and the corresponding compensation coefficient in the complete compensation coefficient vector as the compensation pressure value for the small sample record.

[0058] The complete compensation coefficient vector is reconstructed using the current differential basis offset, the prior compensation coefficient vector, and the differential basis. The expression is as follows: ; in, This represents the reconstructed complete compensation coefficient vector. This represents the vector of prior compensation coefficients.

[0059] After the complete compensation coefficient vector is reconstructed, a small sample set is used to determine the termination of the adaptation of the complete compensation coefficient vector. During the adapter update process, if the mean square deviation between the compensation pressure value corresponding to the current round and the corresponding normalized standard pressure is no longer smaller than the mean square deviation corresponding to the previous round, the adapter update is stopped. Among the complete compensation coefficient vectors obtained before the adapter update is stopped, the complete compensation coefficient vector with the smallest mean square deviation is selected. If there are multiple complete compensation coefficient vectors with the same mean square deviation, the second difference formed by the three adjacent compensation coefficients is calculated according to the order of compensation coefficients, and the complete compensation coefficient vector with the smallest absolute value of the second difference is selected. If there are still multiple, the complete compensation coefficient vector with the fewest changes in the sign of adjacent non-zero terms in the second difference sequence is selected and determined as the final complete compensation coefficient vector of the pressure sensor to be compensated.

[0060] Figure 6 The horizontal axis represents the number of adaptation rounds, and the vertical axis represents the mean squared deviation. The four curves respectively represent the convergence process of the method of this invention under the conditions of a 55-point small sample set and a 35-point small sample set, as well as the convergence process of the transfer reconstruction method without prior compensation coefficient vector under the conditions of a 55-point small sample set and a 35-point small sample set. Figure 6 As can be seen, the curve corresponding to the method of the present invention decreases faster in the early stage and enters the stable region earlier. This indicates that after the prior compensation coefficient vector and the small sample set are jointly input into the hierarchical sparse hybrid transfer network, the differential basis offset output by the adapter can more quickly approximate the actual individual offset of the pressure sensor to be compensated relative to the prior compensation coefficient vector, and reconstruct the complete compensation coefficient vector more quickly. At the same time, under the same number of adaptation rounds, the mean squared deviation of the method of the present invention is always lower than that of the transfer reconstruction method without the prior compensation coefficient vector. This indicates that the present invention makes fuller use of the common compensation law of similar pressure sensors. The initial high value reflects the degree of mismatch when the pressure sensor to be compensated and the prior compensation coefficient vector have not yet been adapted in the initial state, while the subsequent rapid decrease and early stabilization reflect the ability of the present invention to quickly determine the compensation parameters of the pressure sensor to be compensated under a small number of calibration points.

[0061] S4. Write the final complete compensation coefficient vector into the smart sensor, perform binary polynomial compensation based on the original output and ambient temperature, and perform closed-loop micro-correction on the binary polynomial compensation pressure value to output the final compensation pressure value.

[0062] Following the characteristic terms of the bivariate polynomial compensation surface, each compensation coefficient in the final complete compensation coefficient vector is sequentially written into the storage area of ​​the intelligent sensor control terminal. The shared original output lower limit, shared original output upper limit, shared ambient temperature lower limit, shared ambient temperature upper limit, shared standard pressure lower limit, and shared standard pressure upper limit are also written into the intelligent sensor control terminal. The compensation coefficients are saved in correspondence with the characteristic terms of the bivariate polynomial compensation surface. After writing, the intelligent sensor control terminal only calls the final complete compensation coefficient vector, the shared linear normalization upper and lower limits, and the characteristic terms of the bivariate polynomial compensation surface in sequence for compensation calculation during operation, and no longer calls the hierarchical sparse hybrid migration network.

[0063] The intelligent sensor control unit performs bivariate polynomial compensation based on the original output and ambient temperature. Within each pressure output cycle, the intelligent sensor control unit collects the current original output and current ambient temperature, normalizes the current original output and current ambient temperature according to the common linear normalization upper and lower limits, and then generates the feature term sequence corresponding to the current sampling point in the order of the feature terms of the bivariate polynomial compensation surface. The feature term sequence is then multiplied and accumulated with the corresponding compensation coefficients in the final complete compensation coefficient vector to obtain the normalized pressure estimate corresponding to the current sampling point. Based on the common standard pressure lower limit and the common standard pressure upper limit, the normalized pressure estimate is restored to the bivariate polynomial compensated pressure value corresponding to the current sampling point.

[0064] After the final complete compensation coefficient vector is written, a closed-loop micro-correction is performed on the bivariate polynomial compensation pressure value. Three closed-loop micro-correction points are used: the first closed-loop micro-correction point is composed of the lowest temperature node and the lowest standard pressure in the full temperature and pressure grid; the second closed-loop micro-correction point is composed of the standard pressure corresponding to the sixth temperature node after sorting from low to high temperature and the sixth pressure node after sorting from low to high pressure nodes; and the third closed-loop micro-correction point is composed of the highest temperature node and the highest standard pressure.

[0065] At three closed-loop micro-correction points, the original output and ambient temperature are collected respectively. Following a bivariate polynomial compensation process, the corresponding bivariate polynomial compensated pressure values ​​are obtained. These pressure values ​​at the three closed-loop micro-correction points are mapped one-to-one with their corresponding standard pressures. Using these pressure values ​​as inputs and the corresponding standard pressures as target values, a set of overall proportional correction and overall bias corrections are determined. The overall proportional correction corrects the overall slope of the bivariate polynomial compensated pressure value, while the overall bias correction corrects the overall zero point. Within each pressure output cycle, the intelligent sensor control terminal follows the bivariate polynomial compensation process to obtain the current sampling point's bivariate polynomial compensated pressure value. Then, the same overall proportional correction and the same overall bias correction are applied to the bivariate polynomial compensated pressure value, outputting the final compensated pressure value. The expression is: ; ; ; in, This indicates the overall proportional adjustment amount. This represents the overall bias correction amount. Indicates the first The bivariate polynomial compensation pressure value at each closed-loop micro-correction point. This represents the average value of the bivariate polynomial compensation pressure at the three closed-loop micro-correction points. Indicates the first The standard pressure corresponding to each closed-loop micro-correction point This represents the average standard pressure corresponding to the three closed-loop micro-correction points. This represents the final compensation pressure value after closed-loop micro-correction.

[0066] When the data of the three closed-loop micro-correction points are reacquired during subsequent maintenance or re-inspection, the overall proportional correction and overall bias correction will continue to be updated in the same way.

[0067] In summary, this invention achieves effective characterization of the common compensation patterns and individual discrete characteristics of historical pressure sensor sets by extracting common mother vectors and differential basis vectors from compensation coefficient vectors and calculating the identification contribution value of each candidate point based on the differential basis vectors, thereby reducing the need for subsequent calibration data. By inputting a small sample set and prior compensation coefficient vectors into a hierarchical sparse hybrid transfer network, the differential basis shift is estimated and the complete compensation coefficient vector is reconstructed, enabling rapid determination of the compensation parameters of the pressure sensor to be compensated under a small number of calibration points, thus improving the ability to reuse common patterns of similar pressure sensors.

[0068] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A pressure sensor compensation method based on a few-sample transfer algorithm, characterized in that, include: Collect all historical pressure sensor calibration data, establish a bivariate polynomial compensation surface, determine the compensation coefficient vector, extract the common mother vector and the difference basis through the compensation coefficient vector, and determine the identification contribution value based on the difference basis; Pre-identification sampling is performed on the pressure sensor to be compensated to determine the prior compensation coefficient vector, and a small sample set is formed based on the identification contribution value; A small sample set and the prior compensation coefficient vector are input into a hierarchical sparse hybrid transfer network to estimate the differential basis shift. Based on the differential basis shift, the prior compensation coefficient vector, and the differential basis, the complete compensation coefficient vector is reconstructed, and the final complete compensation coefficient vector is determined. The final complete compensation coefficient vector is written into the smart sensor, and a binary polynomial compensation is performed based on the original output and ambient temperature. The binary polynomial compensation pressure value is then subjected to closed-loop micro-correction, and the final compensation pressure value is output.

2. The pressure sensor compensation method based on the few-sample transfer algorithm as described in claim 1, characterized in that, The specific steps for collecting all historical pressure sensor calibration data, establishing a bivariate polynomial compensation surface, and determining the compensation coefficient vector are as follows: Perform full calibration on each historical pressure sensor in the historical pressure sensor set to form a historical calibration record under a full temperature and pressure grid consisting of temperature nodes and pressure nodes; The original output, ambient temperature, and standard pressure are normalized by sharing the upper and lower limits of linear normalization. A bivariate polynomial compensation surface is established in the two-dimensional space of the normalized original output and the normalized ambient temperature. The compensation coefficients are obtained by least squares global regression with stability constraints, and the compensation coefficient vector is formed in the order of characteristic terms.

3. The pressure sensor compensation method based on the few-sample migration algorithm as described in claim 2, characterized in that, The steps for extracting common mother vectors and difference basis through compensation coefficient vectors, and determining identification contribution values ​​based on difference basis, are as follows: After the compensation coefficient vectors of all historical pressure sensors are determined, the common mother vector and the difference basis are extracted through the compensation coefficient vectors. Each temperature and pressure combination point in the full temperature and pressure grid is used as a candidate point, and the identification contribution value of each candidate point is determined based on the difference basis.

4. The pressure sensor compensation method based on the few-sample migration algorithm as described in claim 1 or 3, characterized in that, The steps for pre-identifying and sampling the pressure sensor to be compensated to determine the prior compensation coefficient vector are as follows: At the pre-identification point, the pressure sensor to be compensated is pre-identified and sampled. Based on the common linear normalization upper and lower limits, the original output in the pre-identification record is normalized. The normalized original output of the historical pressure sensor set at the pre-identification point is extracted. The normalized original output of the pressure sensor to be compensated at the pre-identification point is matched with the normalized original output of each historical pressure sensor at the same pre-identification point according to the point position order. The square root of the sum of squares of the differences of the normalized original outputs of all pre-identification points is taken as the overall difference between the pressure sensor to be compensated and the corresponding historical pressure sensor. Select the historical pressure sensor with the smallest overall difference, and determine the compensation coefficient vector of the historical pressure sensor with the smallest overall difference as the prior compensation coefficient vector of the pressure sensor to be compensated.

5. The pressure sensor compensation method based on the few-sample migration algorithm as described in claim 4, characterized in that, The specific steps for forming a small sample set based on the identified contribution values ​​are as follows: After the prior compensation coefficient vector is determined, a small sample set is formed based on the identification contribution value. The pre-identified points are merged into the small sample set. The remaining candidate points are selected in sequence according to the identification contribution value and the distance to each point in the selected point set, until the number of points in the small sample set reaches the upper limit. Each small sample record in the small sample set is written as a combination of the original output, ambient temperature, standard pressure and corresponding identification contribution value.

6. The pressure sensor compensation method based on the few-sample migration algorithm as described in claim 1 or 5, characterized in that, The step of inputting a small sample set and a prior compensation coefficient vector into a hierarchical sparse hybrid transfer network to estimate the differential basis shift includes: Normalize each small sample record in the small sample set, determine the prior residual based on the prior compensation coefficient vector, and input the small sample set consisting of the normalized original output, normalized ambient temperature, normalized standard pressure, corresponding identification contribution value and corresponding prior residual into the hierarchical sparse hybrid transfer network. The hierarchical sparse hybrid migration network adopts a serial structure of physical perception sparse tokenization, local fine-grained hybridization, global sparse hybridization, and adapter output. It outputs differential basis offset through adapter output and forms a universal compensation backbone for pressure sensors of the same model, range, and manufacturing process batch through source domain pre-training with historical pressure sensor sets as training objects.

7. The pressure sensor compensation method based on the few-sample migration algorithm as described in claim 6, characterized in that, The step of inputting a small sample set and a prior compensation coefficient vector into a hierarchical sparse hybrid transfer network to estimate the differential basis shift, and reconstructing the complete compensation coefficient vector based on the differential basis shift, the prior compensation coefficient vector, and the differential basis, further includes: During the target domain adaptation phase, the general compensation backbone parameters of the hierarchical sparse hybrid transfer network are kept unchanged. Only the mapping matrix and bias vector in the adapter are updated. The mapping matrix and bias vector in the adapter are initialized with the corresponding mapping matrix and bias vector in the first layer and the second layer of the adapter after the source domain pre-training is completed. The complete compensation coefficient vector is reconstructed based on the differential basis offset, the prior compensation coefficient vector and the differential basis. The mean squared deviation is calculated on a small sample set based on the complete compensation coefficient vector, and the mapping matrix and bias vector in the adapter are updated by backpropagation using gradient descent based on the mean squared deviation.

8. The pressure sensor compensation method based on the few-sample migration algorithm as described in claim 7, characterized in that, The specific steps for determining the final complete compensation coefficient vector are as follows: When the mean squared deviation no longer decreases, stop the adapter update and select the complete compensation coefficient vector with the smallest mean squared deviation from the complete compensation coefficient vectors obtained before stopping the adapter update. When there are multiple complete compensation coefficient vectors with the same mean square deviation, the complete compensation coefficient vector with the smallest sum of the absolute values ​​of the second-order differences is selected. If there are still multiple vectors, the complete compensation coefficient vector with the fewest changes in the sign of adjacent non-zero terms in the second-order difference sequence is selected and determined as the final complete compensation coefficient vector.

9. The pressure sensor compensation method based on the few-sample migration algorithm as described in claim 1 or 8, characterized in that, The steps are as follows: First, the final complete compensation coefficient vector is written into the smart sensor. Then, bivariate polynomial compensation is performed based on the original output and ambient temperature. Finally, closed-loop micro-correction is applied to the bivariate polynomial compensated pressure value. Write the final complete compensation coefficient vector and the common linear normalization upper and lower limits into the intelligent sensor control terminal according to the characteristic terms of the bivariate polynomial compensation surface. The intelligent sensor control unit calculates the bivariate polynomial compensation pressure value based on the original output and ambient temperature by using the final complete compensation coefficient vector in the order of the characteristic terms of the bivariate polynomial compensation surface, and performs closed-loop micro-correction through three closed-loop micro-correction points in the full temperature and pressure grid.

10. The pressure sensor compensation method based on the few-sample migration algorithm as described in claim 9, characterized in that, The specific steps for outputting the final compensated pressure value are as follows: At the three closed-loop micro-correction points, the bivariate polynomial compensated pressure value is correlated with the corresponding standard pressure to determine the overall proportional correction and overall bias correction. In each pressure output cycle, the same overall proportional correction and the same overall bias correction are performed on the bivariate polynomial compensated pressure value to output the final compensated pressure value.