Pressure compensation method and device and electronic equipment

By performing interpolation calculation and time fitting in the silicon piezoresistive pressure sensor, the influence of temperature on the accuracy of the pressure sensor is resolved, and high-precision pressure detection at different temperatures is achieved.

CN120820261APending Publication Date: 2025-10-21CHONG QING JIN XIN MAI SI CHUAN GAN QI JI SHU YOU XIAN GONG SI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510841951.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-10-21

AI Technical Summary

Technical Problem

Silicon piezoresistive pressure sensors are affected by temperature, resulting in reduced pressure detection accuracy and nonlinear output. Existing fitting methods cannot guarantee output accuracy at different temperatures.

Method used

By acquiring the sampling data of the pressure sensor within the preset ambient temperature range, interpolation calculation is performed, including voltage interpolation and time fitting code value, to determine the pressure compensation value, avoid a single fitting method, and improve output accuracy.

Benefits of technology

The output accuracy of the pressure sensor within the preset ambient temperature range is improved, the influence of temperature drift is reduced, and the accurate detection of the pressure sensor at different temperatures is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120820261A_ABST
    Figure CN120820261A_ABST
Patent Text Reader

Abstract

The invention provides a pressure compensation method and device and electronic equipment, and the method comprises the steps: obtaining the sampling data of a pressure sensor for pressure detection in a preset environment temperature range, recording an output voltage value corresponding to an environment temperature sampling value as a first output voltage value, carrying out the interpolation calculation of the first output voltage value, and obtaining a second output voltage value; calculating an output voltage value of the pressure sensor under the applied pressure based on the applied pressure sampling value and the sampling time, recording the output voltage value as a second output voltage value, carrying out interpolation calculation on the sampling time, obtaining a time fitting code value in the preset environment temperature range, and recording the time fitting code value as a second output voltage value; determining a pressure compensation value of the pressure sensor according to the voltage interpolation in the preset environment temperature range, the second output voltage value and the time fitting code value in the preset environment temperature range; according to the invention, temperature drift compensation in a single fitting mode is avoided, and the output precision of the pressure sensor in the preset environment temperature range is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of sensor detection technology, and in particular to a pressure compensation method, device and electronic equipment. Background Art

[0002] In the field of pressure sensors, due to the material properties of silicon piezoresistive pressure sensors, the output of the pressure core itself is not only related to pressure changes, but is also affected by temperature, which leads to the problem of decreased pressure detection accuracy due to temperature. Moreover, since the nonlinear characteristics of the pressure detection output are also different at different temperature points, the related technology uses a single fitting method to compensate for the influence of temperature drift, which cannot guarantee that the output accuracy of the pressure sensor at different temperatures reaches the expected level.

[0003] Therefore, it is necessary to improve the fitting method in the related art. Summary of the Invention

[0004] In view of the above-mentioned shortcomings of the prior art, the present application provides a pressure compensation method, device and electronic equipment to solve the above-mentioned technical problems.

[0005] According to one aspect of an embodiment of the present application, a pressure compensation method is provided, the method comprising: obtaining sampling data of pressure detection performed by a pressure sensor within a preset ambient temperature range; the sampling data comprising: an applied pressure sampling value, a sampling moment corresponding to the applied pressure sampling value, an ambient temperature sampling value, and an output voltage value corresponding to the ambient temperature sampling value; recording the output voltage value corresponding to the ambient temperature sampling value as a first output voltage value, and performing interpolation calculation on the first output voltage value to obtain a voltage interpolation value within the preset ambient temperature range; calculating the output voltage value of the pressure sensor under applied pressure based on the applied pressure sampling value and the sampling moment, and recording it as a second output voltage value; performing interpolation calculation on the sampling moment to obtain a time fitting code value within the preset ambient temperature range; determining the pressure compensation value of the pressure sensor within the preset ambient temperature range based on the voltage interpolation value within the preset ambient temperature range, the second output voltage value, and the time fitting code value within the preset ambient temperature range.

[0006] In one embodiment of the present application, the process of performing interpolation calculation on the first output voltage value includes: determining the starting output voltage value and the ending output voltage value within the preset ambient temperature range from the first output voltage values ​​in a sampling order; selecting a voltage value between the starting output voltage value and the ending output voltage value as the current output voltage value within the preset ambient temperature range; and performing interpolation calculation based on the current output voltage value within the preset ambient temperature range and the starting output voltage value to obtain a voltage interpolation value within the preset ambient temperature range.

[0007] In one embodiment of the present application, the calculation formula for voltage interpolation within the preset ambient temperature range is as follows: in, Indicates the voltage interpolation within the preset ambient temperature range, U T Indicates the current output voltage value within the preset ambient temperature range. Indicates the starting output voltage value within the preset ambient temperature range. represents the end output voltage value within the preset ambient temperature range, a0 represents the constant term coefficient corresponding to the preset ambient temperature range in the first preset interpolation coefficient, b0 represents the linear term coefficient corresponding to the preset ambient temperature range in the first preset interpolation coefficient, c0 represents the quadratic term coefficient corresponding to the preset ambient temperature range in the first preset interpolation coefficient, and d0 represents the cubic term coefficient corresponding to the preset ambient temperature range in the first preset interpolation coefficient.

[0008] In one embodiment of the present application, if the applied pressure sampling value includes: the current applied pressure value, then based on the applied pressure sampling value and the sampling moment, the process of calculating the output voltage value of the pressure sensor under applied pressure includes: taking the sampling moment corresponding to the current applied pressure value as the current sampling moment; and taking a preset number of sampling moments adjacent to the current sampling moment among the sampling moments as the target sampling moments; calculating the interpolation of the current applied pressure value, calculating the interpolation of the current sampling moment, and calculating the second output voltage value based on the interpolation of the current applied pressure value, the interpolation of the current sampling moment and the target sampling moment.

[0009] In one embodiment of the present application, the calculation formula of the second output voltage value is as follows: U P =f(p)+f(t c )+f(p)*t1+f(p)*t2, where U P represents the second output voltage value, f(·) represents the interpolation calculation function, p represents the current pressure value, t c Indicates the current sampling time, t1 indicates the time between the current sampling time and t c The second adjacent sampling time, t2, represents the current sampling time t c The third adjacent sampling moment.

[0010] In one embodiment of the present application, the calculation formula of the time fitting code value within the preset ambient temperature range includes: x =e2*(t c -t0)*(t c -t1)+e1*(t c -t0)+e0, where P_codex Indicates the time fitting code value within the preset ambient temperature range, t c Indicates the current sampling time, t0 indicates the time between the current sampling time and t c The first adjacent sampling time, t1, represents the time between the current sampling time t c The second adjacent sampling time, t2, represents the current sampling time t c At the adjacent third sampling moment, e0 represents the constant term coefficient in the second preset interpolation coefficient, e1 represents the first-order term coefficient in the second preset interpolation coefficient, and e2 represents the second-order term coefficient in the second preset interpolation coefficient.

[0011] In one embodiment of the present application, the calculation formula of the pressure compensation value within the preset ambient temperature range includes: Among them, P nihe Indicates the pressure compensation value within the preset ambient temperature range, P_code x Indicates the time fitting code value within the preset ambient temperature range, P_code x+1 Indicates the time fitting code value within the ambient temperature range adjacent to the preset ambient temperature range, U P represents the second output voltage, Indicates the voltage interpolation within the preset ambient temperature range, Indicates the voltage interpolation value within the ambient temperature range adjacent to the preset ambient temperature range.

[0012] In one embodiment of the present application, before obtaining sampling data of pressure detection performed by the pressure sensor within a preset ambient temperature range, the method further includes: obtaining the working ambient temperature range of the pressure sensor; dividing the working ambient temperature range to obtain multiple working ambient temperature sub-intervals, selecting a sub-interval from the multiple working ambient temperature sub-intervals as the preset ambient temperature range, and performing pressure detection on the pressure sensor within the preset ambient temperature range, and, during the pressure detection process, sampling the applied pressure value and the ambient temperature value to obtain the applied pressure sampling value and the ambient temperature sampling value, and using the applied pressure sampling value, the sampling time corresponding to the applied pressure sampling value, the ambient temperature sampling value, and the output voltage value corresponding to the ambient temperature sampling value as the sampling data.

[0013] According to one aspect of an embodiment of the present application, a pressure compensation device is provided, including: a data acquisition module, used to obtain sampling data of pressure detection performed by a pressure sensor within a preset ambient temperature range; the sampling data includes: a pressure sampling value, a sampling time corresponding to the pressure sampling value, an ambient temperature sampling value, and an output voltage value corresponding to the ambient temperature sampling value; a voltage interpolation calculation module, used to record the output voltage value corresponding to the ambient temperature sampling value as a first output voltage value, and perform interpolation calculation on the first output voltage value to obtain a voltage interpolation value within the preset ambient temperature range; a time interpolation calculation module, used to calculate the output voltage value of the pressure sensor under pressure based on the pressure sampling value and the sampling time, recorded as a second output voltage value; perform interpolation calculation on the sampling time to obtain a time fitting code value within the preset ambient temperature range; a pressure compensation calculation module, used to determine the pressure compensation value of the pressure sensor within the preset ambient temperature range based on the voltage interpolation value within the preset ambient temperature range, the second output voltage value and the time fitting code value within the preset ambient temperature range.

[0014] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements the pressure compensation method as described above.

[0015] The beneficial effects of the present application are as follows: The present application obtains sampling data of pressure detection performed by the pressure sensor within a preset ambient temperature range, records the output voltage value corresponding to the ambient temperature sampling value as the first output voltage value, and performs interpolation calculation on the first output voltage value to obtain the voltage interpolation within the preset ambient temperature range; based on the applied pressure sampling value and the sampling time, calculates the output voltage value of the pressure sensor under the applied pressure, which is recorded as the second output voltage value; performs interpolation calculation on the sampling time to obtain the time fitting code value within the preset ambient temperature range, and determines the pressure compensation value of the pressure sensor within the preset ambient temperature range based on the voltage interpolation within the preset ambient temperature range, the second output voltage value, and the time fitting code value within the preset ambient temperature range. In the above process, the pressure compensation value of the pressure sensor within the preset ambient temperature range is determined based on the voltage interpolation within the output voltage dimension, the applied pressure dimension, and the sampling time dimension, thereby avoiding compensating for temperature drift using a single fitting method and improving the output accuracy of the pressure sensor within the preset ambient temperature range.

[0016] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings are incorporated into and constitute a part of the specification, illustrating embodiments consistent with the present application and, together with the specification, serving to explain the principles of the present application. It is obvious that the drawings described below are merely some embodiments of the present application, and a person of ordinary skill in the art can derive other drawings based on these drawings without inventive effort. In the drawings:

[0018] Figure 1 is a schematic diagram of an exemplary system architecture shown in an exemplary embodiment of the present application;

[0019] Figure 2 is a flow chart of a pressure compensation method shown in an exemplary embodiment of the present application;

[0020] Figure 3 is a schematic diagram showing an output accuracy error of a pressure sensor after temperature compensation according to an exemplary embodiment of the present application;

[0021] Figure 4 is a schematic diagram showing a stability test of a pressure sensor according to an exemplary embodiment of the present application;

[0022] Figure 5 is a block diagram of a pressure compensation device shown in an exemplary embodiment of the present application;

[0023] Figure 6 It is a structural diagram of a computer system of an electronic device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0024] The following describes the embodiments of the present application through specific examples. Those skilled in the art can easily understand other advantages and functions of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present application. The following embodiments and features in the embodiments can be combined with each other without conflict.

[0025] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. The drawings only show components related to the present application and are not drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.

[0026] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present application difficult to understand.

[0027] Figure 1 It is a schematic diagram of an exemplary system architecture shown in an exemplary embodiment of the present application.

[0028] Reference Figure 1 As shown, the system architecture may include an acquisition device 101 and a computer device 102. The computer device 102 may be at least one of a desktop graphics processing unit (GPU) computer, a GPU computing cluster, a neural network computer, and the like. Relevant technicians may use the computer device 102 to obtain sampled data of pressure detection by the pressure sensor within a preset ambient temperature range, record the output voltage value corresponding to the ambient temperature sample value as a first output voltage value, and perform interpolation calculation on the first output voltage value to obtain a voltage interpolation value within the preset ambient temperature range. Based on the applied pressure sample value and the sampling time, the output voltage value of the pressure sensor under the applied pressure is calculated and recorded as a second output voltage value. Interpolation calculation is performed on the sampling time to obtain a time fitting code value within the preset ambient temperature range. Based on the voltage interpolation value within the preset ambient temperature range, the second output voltage value, and the time fitting code value within the preset ambient temperature range, the pressure compensation value of the pressure sensor within the preset ambient temperature range is determined. The acquisition device 101 is used to acquire the acquired data and provide it to the computer device 102 for processing.

[0029] Schematically, after obtaining the collected data from the collection device 101, the computer device 102 records the output voltage value corresponding to the ambient temperature sampling value as the first output voltage value, and performs interpolation calculation on the first output voltage value to obtain a voltage interpolation within a preset ambient temperature range. Based on the applied pressure sampling value and the sampling time, the output voltage value of the pressure sensor under the applied pressure is calculated and recorded as the second output voltage value; interpolation calculation is performed on the sampling time to obtain a time fitting code value within the preset ambient temperature range, and the pressure compensation value of the pressure sensor within the preset ambient temperature range is determined based on the voltage interpolation within the preset ambient temperature range, the second output voltage value, and the time fitting code value within the preset ambient temperature range. The above process, by performing interpolation calculation on the output voltage dimension, the applied pressure dimension, and the sampling time dimension, and determining the pressure compensation value of the pressure sensor within the preset ambient temperature range based on the voltage interpolation within the preset ambient temperature range, the second output voltage value, and the time fitting code value within the preset ambient temperature range, avoids compensating for temperature drift using a single fitting method, and improves the output accuracy of the pressure sensor within the preset ambient temperature range.

[0030] It should be noted that the pressure compensation method provided in the embodiment of the present application is generally executed by the computer device 102 , and accordingly, the pressure compensation device is generally provided in the computer device 102 .

[0031] The following is a detailed description of the implementation details of the technical solution of the embodiment of the present application:

[0032] Figure 2 is a flow chart of a pressure compensation method according to an exemplary embodiment of the present invention. The pressure compensation method can be executed by a computing and processing device. The computing and processing device can be Figure 1 The computer device 102 shown in FIG. Figure 2 As shown, the pressure compensation method includes at least steps S210 to S240, which are described in detail as follows:

[0033] In step S210, sampling data of pressure detection performed by the pressure sensor within a preset ambient temperature range is obtained. In one embodiment of the present application, the sampling data includes: an applied pressure sampling value, a sampling time corresponding to the applied pressure sampling value, an ambient temperature sampling value, and an output voltage value corresponding to the ambient temperature sampling value. The preset ambient temperature range is set according to actual conditions, for example, -40°C to -20°C. The applied pressure value and the ambient temperature value are sampled in a frequency-segmented manner within the preset ambient temperature range. For example, within the preset ambient temperature range, the applied pressure value is sampled 15 times to obtain the applied pressure sampling value; and the ambient temperature value is sampled once to obtain the ambient temperature sampling value. The applied pressure value is sampled by a pre-calibrated pressure sensor, and the ambient temperature value is sampled by a pre-calibrated temperature sensor.

[0034] In step S220, the output voltage value corresponding to the ambient temperature sampling value is recorded as the first output voltage value, and the first output voltage value is interpolated to obtain a voltage interpolation value within the preset ambient temperature range. In one embodiment of the present application, the process of interpolating the first output voltage value includes: determining the starting output voltage value and the ending output voltage value within the preset ambient temperature range from the first output voltage value in accordance with the sampling order; selecting a voltage value between the starting output voltage value and the ending output voltage value as the current output voltage value within the preset ambient temperature range; and performing interpolation based on the current output voltage value and the starting output voltage value within the preset ambient temperature range to obtain a voltage interpolation value within the preset ambient temperature range. The process of interpolating based on the current output voltage value and the starting output voltage value within the preset ambient temperature range is implemented by a cubic spline compensation algorithm, and the pressures within different preset ambient temperature ranges are fitted by the cubic spline compensation algorithm, which is beneficial to the continuity of the connection points between different preset ambient temperature ranges.

[0035] In step S230, based on the applied pressure sample value and the sampling time, the output voltage value of the pressure sensor under the applied pressure is calculated and recorded as the second output voltage value; the sampling time is interpolated to obtain a time fitting code value within a preset ambient temperature range. In one embodiment of the present application, if the applied pressure sample value includes: the current applied pressure value, then based on the applied pressure sample value and the sampling time, the process of calculating the output voltage value of the pressure sensor under the applied pressure includes: using the sampling time corresponding to the current applied pressure value as the current sampling time; and using a preset number of sampling times adjacent to the current sampling time as target sampling times; calculating the interpolation of the current applied pressure value, calculating the interpolation of the current sampling time, and calculating the second output voltage value based on the interpolation of the current applied pressure value, the interpolation of the current sampling time, and the target sampling time. Based on the current applied pressure value and the pressure values ​​adjacent to the current applied pressure value, the interpolation of the current applied pressure value is calculated. Based on the current sampling moment and the sampling moments adjacent to the current sampling moment, the interpolation of the current sampling moment is calculated. Here, the interpolation method for calculating the current applied pressure value and the interpolation method for calculating the current sampling moment are not limited.

[0036] In step S240, a pressure compensation value of the pressure sensor within the preset ambient temperature range is determined based on the voltage interpolation within the preset ambient temperature range, the second output voltage value, and the time fitting code value within the preset ambient temperature range. In one embodiment of the present application, by performing interpolation calculations in the output voltage dimension, the applied pressure dimension, and the sampling time dimension, and determining the pressure compensation value of the pressure sensor within the preset ambient temperature range based on the voltage interpolation within the preset ambient temperature range, the second output voltage value, and the time fitting code value within the preset ambient temperature range, the pressure compensation value of the pressure sensor within the preset ambient temperature range is avoided using a single fitting method to compensate for temperature drift, thereby improving the output accuracy of the pressure sensor within the preset ambient temperature range.

[0037] In one embodiment of the present application, the calculation formula of the pressure compensation value within the preset ambient temperature range is as follows:

[0038]

[0039] Among them, P nihe Indicates the pressure compensation value within the preset ambient temperature range, P_code x Indicates the time fitting code value within the preset ambient temperature range, P_code x+1 Indicates the time fitting code value within the ambient temperature range adjacent to the preset ambient temperature range, U P represents the second output voltage, Indicates the voltage interpolation within the preset ambient temperature range, Indicates the voltage interpolation value within the ambient temperature range adjacent to the preset ambient temperature range.

[0040] In one embodiment of the present application, if P_code x is the time fitting code value within the first preset ambient temperature range, then P_code x+1 is the time fitting code value within the second preset ambient temperature range; if is the voltage interpolation value within the first preset ambient temperature range, then is the voltage interpolation within the second preset ambient temperature range; if P_code x P_code is the time fitting code value within the last preset ambient temperature range. x+1 is the time fitting code value within the first preset ambient temperature range; if is the voltage interpolation value within the last preset ambient temperature range, then is the voltage interpolation value within the first preset ambient temperature range.

[0041] In one embodiment of the present application, the process of performing interpolation calculation on the first output voltage value includes:

[0042] A starting output voltage value and an ending output voltage value within a preset ambient temperature range are determined from the first output voltage values ​​in a sampling order; and a voltage value between the starting output voltage value and the ending output voltage value is selected as the current output voltage value within the preset ambient temperature range. In one embodiment of the present application, within the preset ambient temperature range, the output voltage value corresponding to the starting sampling point is used as the starting output voltage value, and the output voltage value corresponding to the ending sampling point is used as the ending output voltage value.

[0043] An interpolation calculation is performed based on the current output voltage value and the starting output voltage value within the preset ambient temperature range to obtain a voltage interpolation value within the preset ambient temperature range. In one embodiment of the present application, the calculation formula for the voltage interpolation value within the preset ambient temperature range is as follows:

[0044]

[0045] in, Indicates the voltage interpolation within the preset ambient temperature range, U T Indicates the current output voltage value within the preset ambient temperature range. Indicates the starting output voltage value within the preset ambient temperature range. represents the end output voltage value within the preset ambient temperature range, a0 represents the constant term coefficient corresponding to the preset ambient temperature range in the first preset interpolation coefficient, b0 represents the linear term coefficient corresponding to the preset ambient temperature range in the first preset interpolation coefficient, c0 represents the quadratic term coefficient corresponding to the preset ambient temperature range in the first preset interpolation coefficient, and d0 represents the cubic term coefficient corresponding to the preset ambient temperature range in the first preset interpolation coefficient.

[0046] In one embodiment of the present application, a calculation formula for voltage interpolation within an ambient temperature range adjacent to a preset ambient temperature range is as follows:

[0047]

[0048] in, Indicates the voltage interpolation within the ambient temperature range adjacent to the preset ambient temperature range, U T1 Indicates the current output voltage value within the ambient temperature range adjacent to the preset ambient temperature range. Indicates the starting output voltage value within the ambient temperature range adjacent to the preset ambient temperature range. represents the end output voltage value within the ambient temperature range adjacent to the preset ambient temperature range, a1 represents the constant term coefficient corresponding to the ambient temperature range adjacent to the preset ambient temperature range in the first preset interpolation coefficient, b1 represents the linear term coefficient corresponding to the ambient temperature range adjacent to the preset ambient temperature range in the first preset interpolation coefficient, c1 represents the quadratic term coefficient corresponding to the ambient temperature range adjacent to the preset ambient temperature range in the first preset interpolation coefficient, and d1 represents the cubic term coefficient corresponding to the ambient temperature range adjacent to the preset ambient temperature range in the first preset interpolation coefficient.

[0049] In one embodiment of the present application, the first preset interpolation coefficient is a number in a coefficient matrix in a cubic spline compensation algorithm, wherein different preset ambient temperature ranges correspond to coefficients in different rows of the coefficient matrix. The expression of the coefficient matrix is ​​as follows:

[0050]

[0051] Among them, M0 represents the coefficient matrix, a in Indicates the constant coefficient corresponding to the nth preset ambient temperature range, b in Indicates the linear coefficient corresponding to the nth preset ambient temperature range, c in Indicates the quadratic coefficient corresponding to the nth preset ambient temperature range, d in Indicates the cubic coefficient corresponding to the nth preset ambient temperature range.

[0052] In one embodiment of the present application, if the applied pressure sample value includes: a current applied pressure value, then the process of calculating the output voltage value of the pressure sensor under the applied pressure based on the applied pressure sample value and the sampling time includes:

[0053] The sampling moment corresponding to the current applied pressure value is used as the current sampling moment; and a preset number of sampling moments adjacent to the current sampling moment among the sampling moments are used as target sampling moments.

[0054] In one embodiment of the present application, the preset number can be set according to actual conditions, for example, the preset number is set to 3.

[0055] Calculate the interpolation of the current applied pressure value, calculate the interpolation of the current sampling time, and calculate the second output voltage value based on the interpolation of the current applied pressure value, the interpolation of the current sampling time, and the target sampling time. In one embodiment of the present application, the calculation formula of the second output voltage value is as follows:

[0056] U P =f(p)+f(t c )+f(p)*t1+f(p)*t2 Formula (5)

[0057] Among them, U P represents the second output voltage value, f(·) represents the interpolation calculation function, p represents the current pressure value, t c Indicates the current sampling time, t1 indicates the time between the current sampling time and t c The second adjacent sampling time, t2, represents the current sampling time t c The adjacent third sampling moments, the target sampling moments include: the second sampling moment t1 and the third sampling moment t2.

[0058] The calculation formula for the time fitting code value within the preset ambient temperature range is as follows:

[0059] P_code x =e2*(t c -t0)*(t c -t1)+e1*(t c -t0)+e0 Formula (6)

[0060] Among them, P_code x Indicates the time fitting code value within the preset ambient temperature range, t c Indicates the current sampling time, t0 indicates the time between the current sampling time and t c The first adjacent sampling time, t1, represents the time between the current sampling time t c The second adjacent sampling time, t2, represents the current sampling time t cAt the adjacent third sampling moment, e0 represents the constant term coefficient in the second preset interpolation coefficient, e1 represents the first-order term coefficient in the second preset interpolation coefficient, and e2 represents the second-order term coefficient in the second preset interpolation coefficient. The target sampling moments include: the first sampling moment t0, the second sampling moment t1, and the third sampling moment t2.

[0061] In one embodiment of the present application, P_code x+1 Indicates the time fitting code value within the ambient temperature range adjacent to the preset ambient temperature range. The calculation method of the time fitting code value within the ambient temperature range adjacent to the preset ambient temperature range is the same as the time fitting code value P_code within the preset ambient temperature range. x The second preset interpolation coefficient is the interpolation coefficient in the Newton interpolation algorithm, and the constant term coefficient, first-order term coefficient, and second-order term coefficient selected for different preset ambient temperature ranges are not repeated.

[0062] In one embodiment of the present application, before obtaining sampled data of pressure detection performed by the pressure sensor within a preset ambient temperature range, the pressure compensation method further includes:

[0063] Obtaining the operating environment temperature range of the pressure sensor. In one embodiment of the present application, the operating environment temperature range of the pressure sensor is determined according to the actual operating environment of the pressure sensor. For example, the operating environment temperature range is set to [-40° C. to 80° C.].

[0064] The operating environment temperature range is divided into multiple operating environment temperature subintervals, a subinterval is selected from the multiple operating environment temperature subintervals as a preset ambient temperature range, and pressure testing is performed on the pressure sensor within the preset ambient temperature range. During the pressure testing process, the applied pressure value and the ambient temperature value are sampled to obtain applied pressure sample values ​​and ambient temperature sample values, and the applied pressure sample values, the sampling time corresponding to the applied pressure sample values, the ambient temperature sample values, and the output voltage values ​​corresponding to the ambient temperature sample values ​​are used as sampled data. In one embodiment of the present application, the number of operating environment temperature subintervals is set to 7, that is, the operating environment temperature range is divided into 7 operating environment temperature subintervals, and the 7 operating environment temperature subintervals are [-40°C to -20°C), [-20°C to 0°C), [0°C to 20°C), [20°C to 40°C), [40°C to 60°C), and [60°C to 80°C]. The pressure sensor is pressure tested within the operating environment temperature subintervals to obtain sampled data within each operating environment temperature subinterval.

[0065] Figure 3 is a schematic diagram showing the output accuracy error of the pressure sensor after temperature compensation according to an exemplary embodiment of the present application. Figure 3In the present invention, when the working environment temperature is in the range of [-40℃~80℃], the output accuracy error of four pressure sensor prototypes is tested. Regardless of the positive stroke (i.e., the working environment temperature gradually increases) or the reverse stroke (i.e., the working environment temperature gradually decreases), the output accuracy error of the four pressure sensor prototypes is less than or equal to the product of the full scale and 0.05%, thereby verifying that the pressure compensation method in this application has a good pressure accuracy adjustment effect.

[0066] Figure 4 is a schematic diagram showing a stability test of a pressure sensor according to an exemplary embodiment of the present application. Figure 4 In the present invention, when the working environment temperature is in the range of [-40℃~80℃], the stability test is carried out on three pressure sensor prototypes. The stability test period is 30 days. The variation range of the output accuracy of the three pressure sensor prototypes is less than the product of the full scale and 0.05%, thereby verifying that the pressure compensation method in this application not only has a good adjustment effect on the output accuracy of the pressure sensor, but also can maintain the long-term stability of the output of the adjustment accuracy of the pressure sensor.

[0067] Compared with the single fitting method used in related technologies, the pressure compensation method proposed in this application has a better temperature drift compensation effect. The output accuracy error of the pressure sensor is reduced from the product of the full scale and 0.25% to the product of the full scale and 0.05%, thereby effectively solving the temperature drift effect caused by temperature on the core output, thereby ensuring the accuracy requirements of the pressure sensor during industrial field applications. At the same time, the solution proposed in this application can ensure that the adjustment accuracy of the pressure sensor has good stability.

[0068] The following describes an embodiment of the device of the present application, which can be used to perform the pressure compensation method in the above embodiment of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the pressure compensation method in the above embodiment of the present application.

[0069] Figure 5 This is a block diagram of a pressure compensation device shown in another exemplary embodiment of the present application. The device can be applied to Figure 1 The implementation environment shown is specifically configured in the computer device 102. The apparatus may also be applicable to other exemplary implementation environments and specifically configured in other devices. This embodiment does not limit the implementation environment to which the apparatus is applicable.

[0070] like Figure 5 As shown, the exemplary pressure compensation device 500 includes:

[0071] The data acquisition module 501 is used to obtain sampled data of pressure detection performed by the pressure sensor within a preset ambient temperature range.

[0072] The voltage interpolation calculation module 502 is configured to record the output voltage value corresponding to the ambient temperature sampling value as a first output voltage value, and perform interpolation calculation on the first output voltage value to obtain a voltage interpolation value within a preset ambient temperature range.

[0073] The time interpolation calculation module 503 is used to calculate the output voltage value of the pressure sensor under the applied pressure based on the pressure sampling value and the sampling time, recorded as the second output voltage value; interpolation calculation is performed on the sampling time to obtain the time fitting code value within the preset ambient temperature range.

[0074] The pressure compensation calculation module 504 is used to determine the pressure compensation value of the pressure sensor within the preset ambient temperature range based on the voltage interpolation within the preset ambient temperature range, the second output voltage value and the time fitting code value within the preset ambient temperature range.

[0075] In one embodiment of the present application, the sampling data includes: an applied pressure sampling value, a sampling time corresponding to the applied pressure sampling value, an ambient temperature sampling value, and an output voltage value corresponding to the ambient temperature sampling value. The preset ambient temperature range is set according to actual conditions, for example, -40°C to -20°C. Within the preset ambient temperature range, the applied pressure value and the ambient temperature value are sampled in a frequency-segmented manner. For example, within the preset ambient temperature range, the applied pressure value is sampled 15 times to obtain the applied pressure sampling value; and the ambient temperature value is sampled once to obtain the ambient temperature sampling value. The applied pressure value is sampled by a pre-calibrated pressure sensor, and the ambient temperature value is sampled by a pre-calibrated temperature sensor.

[0076] In one embodiment of the present application, the process of performing an interpolation calculation on the first output voltage value includes: determining a starting output voltage value and an ending output voltage value within a preset ambient temperature range from the first output voltage value in a sampling order; selecting a voltage value between the starting output voltage value and the ending output voltage value as the current output voltage value within the preset ambient temperature range; and performing an interpolation calculation based on the current output voltage value and the starting output voltage value within the preset ambient temperature range to obtain an interpolated voltage value within the preset ambient temperature range. The interpolation calculation based on the current output voltage value and the starting output voltage value within the preset ambient temperature range is implemented using a cubic spline compensation algorithm. The cubic spline compensation algorithm is used to fit the pressure within different preset ambient temperature ranges, which facilitates the continuity of the connection points between different preset ambient temperature ranges.

[0077] In one embodiment of the present application, if the applied pressure sample value includes: a current applied pressure value, then based on the applied pressure sample value and the sampling time, the process of calculating the output voltage value of the pressure sensor under applied pressure includes: using the sampling time corresponding to the current applied pressure value as the current sampling time; and using a preset number of sampling times adjacent to the current sampling time as target sampling times; calculating an interpolation of the current applied pressure value, calculating an interpolation of the current sampling time, and calculating a second output voltage value based on the interpolation of the current applied pressure value, the interpolation of the current sampling time, and the target sampling time. Calculating the interpolation of the current applied pressure value based on the current applied pressure value and the applied pressure values ​​adjacent to the current applied pressure value, and calculating the interpolation of the current sampling time based on the current sampling time and the sampling times adjacent to the current sampling time. Here, the interpolation method for calculating the current applied pressure value and the interpolation method for calculating the current sampling time are not limited.

[0078] In one embodiment of the present application, by performing interpolation calculations on the output voltage dimension, on the applied pressure dimension, and on the sampling time dimension, and based on the voltage interpolation within the preset ambient temperature range, the second output voltage value, and the time fitting code value within the preset ambient temperature range, the pressure compensation value of the pressure sensor within the preset ambient temperature range is determined, thereby avoiding compensating for temperature drift using a single fitting method and improving the output accuracy of the pressure sensor within the preset ambient temperature range.

[0079] In one embodiment of the present application, the calculation formula of the pressure compensation value within the preset ambient temperature range is shown in formula (1), which is not repeated here.

[0080] It should be noted that the pressure compensation device provided in the above-described embodiment and the pressure compensation method provided in the above-described embodiment are based on the same concept. The specific manner in which the various modules and units perform their operations has been described in detail in the method embodiments and will not be repeated here. In actual applications, the pressure compensation device provided in the above-described embodiment can, as needed, allocate the aforementioned functions to different functional modules. That is, the internal structure of the device can be divided into different functional modules to perform all or part of the functions described above. This is not a limitation herein.

[0081] An embodiment of the present application also provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, which, when executed by one or more processors, enables the electronic device to implement the pressure compensation method provided in the above-mentioned embodiments.

[0082] Figure 6 This is a structural diagram of a computer system of an electronic device according to another exemplary embodiment of the present application. Figure 6 The computer system 600 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0083] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage part 608 into the random access memory (RAM) 603, such as executing the method in the above embodiment. Various programs and data required for system operation are also stored in the RAM 603. The CPU 601, ROM 602 and RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0084] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, and the like; an output section 607 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. Removable media 611, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 610 as needed, so that computer programs read therefrom can be installed into the storage section 608 as needed.

[0085] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from a removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the various functions defined in the system of the present application are executed.

[0086] Another aspect of the present application provides a computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions are executed by a computer processor, the computer executes the pressure compensation method provided in each of the above embodiments. The computer-readable storage medium may be included in the electronic device described in the above embodiments, or may exist independently and not be incorporated into the electronic device.

[0087] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0088] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by one of ordinary skill in the art without departing from the spirit and technical concepts disclosed in this application shall be covered by the claims of this application.

Claims

1. A pressure compensation method, characterized in that: The method comprises: Acquire sampling data of pressure detection performed by the pressure sensor within a preset ambient temperature range; the sampling data includes: a pressure sampling value, a sampling time corresponding to the pressure sampling value, an ambient temperature sampling value, and an output voltage value corresponding to the ambient temperature sampling value; Recording the output voltage value corresponding to the ambient temperature sampling value as a first output voltage value, and performing interpolation calculation on the first output voltage value to obtain a voltage interpolation value within the preset ambient temperature range; Based on the applied pressure sample value and the sampling time, calculating the output voltage value of the pressure sensor under the applied pressure, which is recorded as a second output voltage value; performing interpolation calculation on the sampling time to obtain a time fitting code value within the preset ambient temperature range; A pressure compensation value of the pressure sensor within the preset ambient temperature range is determined according to the voltage interpolation within the preset ambient temperature range, the second output voltage value, and the time fitting code value within the preset ambient temperature range.

2. The pressure compensation method according to claim 1, characterized in that: The process of performing interpolation calculation on the first output voltage value includes: determining, in a sampling order, a starting output voltage value and an ending output voltage value within the preset ambient temperature range from the first output voltage values; and selecting a voltage value between the starting output voltage value and the ending output voltage value as the current output voltage value within the preset ambient temperature range; An interpolation calculation is performed based on the current output voltage value within the preset ambient temperature range and the initial output voltage value to obtain a voltage interpolation value within the preset ambient temperature range.

3. The pressure compensation method according to claim 2, characterized in that: The calculation formula for voltage interpolation within the preset ambient temperature range is as follows: in, Indicates the voltage interpolation within the preset ambient temperature range, U T Indicates the current output voltage value within the preset ambient temperature range. Indicates the starting output voltage value within the preset ambient temperature range. represents the end output voltage value within the preset ambient temperature range, a0 represents the constant term coefficient corresponding to the preset ambient temperature range in the first preset interpolation coefficient, b0 represents the linear term coefficient corresponding to the preset ambient temperature range in the first preset interpolation coefficient, c0 represents the quadratic term coefficient corresponding to the preset ambient temperature range in the first preset interpolation coefficient, and d0 represents the cubic term coefficient corresponding to the preset ambient temperature range in the first preset interpolation coefficient.

4. The pressure compensation method according to any one of claims 1 to 3, characterized in that: If the applied pressure sample value includes: a current applied pressure value, then the process of calculating the output voltage value of the pressure sensor under the applied pressure based on the applied pressure sample value and the sampling time includes: The sampling moment corresponding to the current applied pressure value is used as the current sampling moment; and a preset number of sampling moments adjacent to the current sampling moment among the sampling moments are used as target sampling moments; An interpolation value of the current applied pressure value is calculated, an interpolation value of the current sampling moment is calculated, and the second output voltage value is calculated based on the interpolation value of the current applied pressure value, the interpolation value of the current sampling moment, and the target sampling moment.

5. The pressure compensation method according to claim 4, characterized in that: The calculation formula of the second output voltage value is as follows: U P =f(p)+f(t c )+f(p)*t1+f(p)*t2, Among them, U P represents the second output voltage value, f(·) represents the interpolation calculation function, p represents the current pressure value, t c Indicates the current sampling time, t1 indicates the time between the current sampling time and t c The second adjacent sampling time, t2, represents the current sampling time t c The third adjacent sampling moment.

6. The pressure compensation method according to claim 4, characterized in that: The calculation formula of the time fitting code value within the preset ambient temperature range includes: P_code x =e2*(t c -t0)*(t c -t1)+e1*(t c -t0)+e0, Among them, P_code x Indicates the time fitting code value within the preset ambient temperature range, t c Indicates the current sampling time, t0 indicates the time between the current sampling time and t c The first adjacent sampling time, t1, represents the time between the current sampling time t c The second adjacent sampling time, t2, represents the current sampling time t c At the adjacent third sampling moment, e0 represents the constant term coefficient in the second preset interpolation coefficient, e1 represents the first-order term coefficient in the second preset interpolation coefficient, and e2 represents the second-order term coefficient in the second preset interpolation coefficient.

7. The pressure compensation method according to any one of claims 1 to 3, characterized in that: The calculation formula of the pressure compensation value within the preset ambient temperature range includes: Among them, P nihe Indicates the pressure compensation value within the preset ambient temperature range, P_code x Indicates the time fitting code value within the preset ambient temperature range, P_code x+1 Indicates the time fitting code value within the ambient temperature range adjacent to the preset ambient temperature range, U P represents the second output voltage, Indicates the voltage interpolation within the preset ambient temperature range, Indicates the voltage interpolation value within the ambient temperature range adjacent to the preset ambient temperature range.

8. The pressure compensation method according to any one of claims 1 to 3, characterized in that: Before acquiring sampling data of pressure detection performed by the pressure sensor within a preset ambient temperature range, the method further includes: Obtaining the operating environment temperature range of the pressure sensor; The working environment temperature range is divided to obtain multiple working environment temperature sub-intervals, a sub-interval is selected from the multiple working environment temperature sub-intervals as the preset ambient temperature range, and pressure detection is performed on the pressure sensor within the preset ambient temperature range. In addition, during the pressure detection process, the applied pressure value and the ambient temperature value are sampled to obtain the applied pressure sampling value and the ambient temperature sampling value, and the applied pressure sampling value, the sampling time corresponding to the applied pressure sampling value, the ambient temperature sampling value, and the output voltage value corresponding to the ambient temperature sampling value are used as the sampling data.

9. A pressure compensation device, characterized in that: include: A data acquisition module is used to obtain sampling data of pressure detection performed by the pressure sensor within a preset ambient temperature range; The sampling data includes: a pressure sampling value, a sampling time corresponding to the pressure sampling value, an ambient temperature sampling value, and an output voltage value corresponding to the ambient temperature sampling value; a voltage interpolation calculation module, configured to record the output voltage value corresponding to the ambient temperature sampling value as a first output voltage value, and perform interpolation calculation on the first output voltage value to obtain a voltage interpolation value within the preset ambient temperature range; a time interpolation calculation module, configured to calculate an output voltage value of the pressure sensor under the applied pressure based on the applied pressure sample value and the sampling time, recorded as a second output voltage value; and perform interpolation calculation on the sampling time to obtain a time fitting code value within the preset ambient temperature range; The pressure compensation calculation module is used to determine the pressure compensation value of the pressure sensor within the preset ambient temperature range based on the voltage interpolation within the preset ambient temperature range, the second output voltage value and the time fitting code value within the preset ambient temperature range.

10. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the pressure compensation method according to any one of claims 1 to 8.