Method for interpolating sensor signals, sensor, terminal device, and storage medium
The non-equidistant interpolation method addresses Runge oscillations in sensor signals by calculating N measurement points and performing polynomial interpolation, resulting in improved sensor accuracy and signal reproduction.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- HUNAN QITAI INFORMATION TECH
- Filing Date
- 2023-09-05
- Publication Date
- 2026-07-02
AI Technical Summary
Conventional equidistant interpolation methods in sensor signals lead to Runge oscillations, causing inaccuracies and deviations in sensor performance, especially for complex signals.
A non-equidistant interpolation method is employed, using the formula \( x_i = \sin((i-0.5) \pi N / M \cos(i \pi / (N+1) \) to calculate N measurement points, followed by polynomial interpolation to establish a precise functional relationship between the measured signal and electrical signal.
This approach effectively avoids Runge oscillations, enhancing fitting accuracy and enabling more accurate sensor measurements by accurately reproducing the original signal, thus improving sensor performance.
Smart Images

Figure 2026521970000001_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of sensor technology, and more specifically relates to an interpolation method used for sensor signals, a sensor using the interpolation method, a terminal device, and a storage medium.
Background Art
[0002] A sensor is a device or apparatus that senses a specified measured signal and converts it into a usable signal according to certain rules, and is usually composed of a sensitive element or a combination of a sensitive element and a conversion element. The sensitive element directly senses the information of the measured signal and outputs a physical quantity signal or an electrical signal having a definite relationship with the measured signal. The conversion element can convert the physical quantity signal output by the sensitive element into an electrical signal, and then perform operations such as adjustment, amplification, and conversion on the electrical signal output by the conversion element through a subsequent conversion circuit to output a standardized voltage, current, or digital signal. Since there is inconsistency in the original output signal, it is necessary to adjust the electrical signal output during the manufacturing process of the sensor so as to obtain a standardized voltage, current, or digital signal. Commonly used current signals are 4 - 20 mA, or voltage signals are 0.5 - 4.5 V, etc., and the measured signal corresponds to one current or voltage value. Generally, the measured signal x has a maximum value M, which is referred to as a range. When the sensitive element operates, the output electrical signal y and x have a functional relationship, which can be expressed as y = f(x). However, since the functional relationship of y = f(x) is unknown or inaccurate before the adjustment of the sensor signal, the functional relationship y = f(x) between y and x can be obtained by finite sampling points x i and their corresponding electrical signal values y i and then, by adjusting any electrical signal y output by the sensor based on y = f(x) (for example, non-linear compensation), a target signal convenient for subsequent processing and use can be generated. Currently, basically polynomial interpolation is adopted to obtain the functional formula of y = f(x).
[0003] In the current interpolation or calibration theory, basically equidistant sampling is adopted, that is, xi = iM / (N - 1), where i = 0, 1, ..., N - 1, and N represents the number of sampling or interpolation points. The distances between adjacent points at these sampling points are all the same (equidistant interpolation), and each is M / (N - 1). The output sensor signal is mainly linear and approximates a line segment. Such a sampling method is simple, but for complex signals, there may be a Runge oscillation phenomenon. That is, as N increases, the value of the interpolation function deviates greatly from the original signal, and the processed data deviates from the actual data, thus affecting the performance of the sensor.
Summary of the Invention
Problems to be Solved by the Invention
[0004] This application provides an interpolation method for sensor signals, a sensor, a terminal device, and a storage medium using the interpolation method, so that the signal output by the sensor becomes more accurate.
Means for Solving the Problems
[0005] In the first aspect, this application provides an interpolation method for sensor signals, including the following steps: Using a non - equidistant interpolation method to calculate N measurement points x of the measured signal x i , and the calculation formula is JPEG2026521970000002.jpg15148, and In formula (1), "sin" represents the sine function, "cos" represents the cosine function, N is the number of measurement points, and M is the range of the measured signal of the sensor. The N measurement points x obtained by formula (1) 0、 x1,..., x N-1 are converted to obtain N corresponding electrical signals y i , x i and y i are configured into data pairs to obtain N interpolation points (x i , y i ), where i = 0, 1, ..., N - 1, and the above - mentioned N interpolation points (x i , y iBased on this, polynomial interpolation is performed, and the interpolation function y=f(x) is calculated. The sensor obtains the value of the measured signal x by solving an equation for the electrical signal y based on the interpolation function y=f(x), and establishes a correspondence between the electrical signal y and the measured signal x.
[0006] In a second aspect, the present invention provides a sensor that can be applied to the interpolation method of the sensor signal as described above. A sensing element that detects the signal x to be measured and converts the signal x to be measured into an electrical signal y, According to equation (1), N measurement points x of the signal to be measured are calculated. i Calculate (i=0,1,...,N-1) and the corresponding electrical signals y of the N sensing elements. i After being converted to x i and y i The data is constructed into pairs, and N interpolation points (x i ,y i An interpolation point acquisition module that obtains (i=0,1,...,N-1), The N interpolation points (x i ,y i The system comprises an interpolation function module that calculates the interpolation function y=f(x) according to the method shown in equation (2), then obtains the value of the signal under test x by solving the equation for the electrical signal y based on the interpolation function y=f(x), and constructs a correspondence between the electrical signal y and the signal under test x.
[0007] In a third aspect, the present invention provides other sensors and applies to the interpolation method of sensor signals as described above. A sensing element for sensing the signal x to be measured and outputting a physical quantity signal that has a deterministic relationship with the signal x to be measured, A conversion element for converting a physical quantity signal output by a sensing element into an electrical signal y, According to equation (1), N measurement points x of the signal to be measured are calculated. i、 Calculate (i=0,1,...,N-1) and the corresponding electrical signals y of the N sensing elements. i After being converted to x i and yi The data is constructed into pairs, and N interpolation points (x i ,y i An interpolation point acquisition module that obtains (i=0,1,...,N-1), The N interpolation points (x i ,y i The system comprises an interpolation function module that calculates the interpolation function y=f(x) according to the method shown in equation (2), then obtains the value of the signal under test x by solving the equation for the electrical signal y based on the interpolation function y=f(x), and constructs a correspondence between the electrical signal y and the signal under test x.
[0008] In a fourth aspect, the present invention provides a terminal device comprising memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the sensor signal interpolation method described in the first aspect when executing the computer program.
[0009] In a fifth aspect, the present invention provides a computer-readable storage medium in which a computer program is stored, and when the computer program is executed by a processor, the interpolation method for sensor signals described in the first aspect is realized. [Effects of the Invention]
[0010] The sensor signal interpolation method according to this invention calculates interpolation points using a non-equal interval interpolation method, overcoming the errors caused by equal interval interpolation in conventional techniques, effectively avoiding the effects of Runge vibration phenomena, improving fitting accuracy, reducing errors, and enabling a deeper reproduction of the original signal collected by the sensor's sensing element. This allows the sensor to obtain more accurate measurements, thereby improving sensor accuracy. [Brief explanation of the drawing]
[0011] [Figure 1] This is a flowchart of the sensor signal interpolation method according to the present invention. [Figure 2A]This is a comparison diagram of the original signal at N=15 in Embodiment 1 of the present invention and the signal of the equi-interpolated function in the prior art. [Figure 2B] This is a comparison diagram of the original signal at N=15 in Embodiment 1 of the present invention and the non-equally spaced interpolation function signal of the present invention. [Figure 3A] Figure 1 shows a comparison between the original signal at N=16 in Embodiment 2 of this application and the equally spaced interpolation function signal in the prior art. [Figure 3B] Figure 1 shows a comparison between the original signal at N=16 in Embodiment 2 of the present invention and the non-equally spaced interpolation function signal of the present invention. [Figure 4A] Figure 2 shows a comparison between the original signal at N=16 in Embodiment 2 of this application and the equally spaced interpolation function signal in the prior art. [Figure 4B] Figure 2 shows a comparison between the original signal at N=16 in Embodiment 2 of the present invention and the non-equally spaced interpolation function signal of the present invention. [Figure 5A] Figure 3 shows a comparison between the original signal at N=16 in Embodiment 2 of this application and the equally spaced interpolation function signal in the conventional technique. [Figure 5B] Figure 3 shows a comparison between the original signal at N=16 in Embodiment 2 of the present invention and the non-equally spaced interpolation function signal of the present invention. [Figure 6A] Figure 4 shows a comparison between the original signal at N=16 in Embodiment 2 of this application and the equally spaced interpolation function signal in the prior art. [Figure 6B] Figure 4 shows a comparison between the original signal at N=16 in Embodiment 2 of the present invention and the non-equally spaced interpolation function signal of the present invention. [Figure 7] This is a schematic diagram of a sensor embodiment according to the present invention. [Figure 8] This is a schematic diagram of another sensor embodiment according to the present invention. [Figure 9] This is a schematic diagram of an embodiment of a terminal device according to the present invention. [Modes for carrying out the invention]
[0012] The following description includes, but is not limiting, specific technical features and other characteristics for illustrative purposes to ensure a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application can be realized in other embodiments that do not possess these specific technical features. In other cases as well, detailed descriptions of commonly known systems, apparatus, circuits, and methods are omitted so as not to interfere with the description of the present application.
[0013] When used in the specification and claims of this application, the term “inclusive” means that the described features, wholes, steps, operations, elements, etc. exist, but it should be understood that this does not exclude the existence or addition of one or more other features, wholes, steps, operations, elements and / or sets thereof.
[0014] Referring to Figure 1, the present invention first provides a method for interpolating a sensor signal, which includes the following steps. In S01, the N measurement points x of the signal x to be measured are obtained using the non-equally spaced interpolation method. i Calculate. The formula is: The file is JPEG2026521970000004.jpg14133, In equation (1), "sin" represents the sine function, "cos" represents the cosine function, N is the number of measurement points, and M is the range of the sensor's measured signal x.
[0015] The sensor senses external information, such as force, distance, temperature, light, sound, and chemical components (measured signal x), using a sensing element, and calculates N measurement points x of the measured signal x according to the above calculation formula (1). i It is possible to obtain each measurement point x i The information is input to the sensing element.
[0016] The aforementioned sensors include, but are not limited to, pressure sensors, displacement sensors, image sensors, velocity sensors, strain sensors, temperature sensors, and humidity sensors.
[0017] Using a pressure sensor as an example, if N=5 and M(range)=1(MPa), then using the above calculation formula (1), the following measurement points x i An approximate value can be obtained. {0, 0.190983, 0.5, 0.809017, 1} {0, 0.2, 0.5, 0.8, 1} {0, 0.19, 0.5, 0.81, 1} {0, 0.191, 0.5, 0.809, 1} {0, 0.19098, 0.5, 0.80902, 1}.
[0018] When N=6 and M is arbitrary, M here may be any physical quantity that the sensor-sensitive element can measure, and the above calculation formula (1) is adopted, and the following measurement points x i An approximate value can be obtained. {0, 0.133975M, 0.366025M, 0.633975M, 0.866025M, M} {0, 0.13M, 0.37M, 0.63M, 0.87M, M} {0, 0.134M, 0.366M, 0.634M, 0.866M, M} {0, 0.13398M, 0.36603M, 0.63398M, 0.86603M, M}.
[0019] When N=7 and M is arbitrary, M here may be any physical quantity that the sensor-sensitive element can measure, and the above calculation formula (1) is adopted, and the following measurement points x i An approximate value can be obtained. {0, 0.0990311M, 0.277479M, 0.5M, 0.722521M, 0.900969M, M} {0, 0.1M, 0.3M, 0.5M, 0.7M, 0.9M, M} {0, 0.10M, 0.28M, 0.5M, 0.72M, 0.90M, M} {0, 0.099M, 0.277M, 0.5M, 0.723M, 0.901M, M} {0, 0.0990M, 0.2775M, 0.5M, 0.7225M, 0.9010M, M}.
[0020] In S02, the N measurement points x obtained by the above formula (1) are 0、 x1,..., x N-1 Convert and N corresponding electrical signals y i You can obtain this.
[0021] This step involves using a sensing element to obtain N measurement points x obtained by the above calculation formula (1). 0、 x1,...,x N-1 Corresponding electrical signal y 0、 y1,...,y N-1 It may also be converted to the above formula (1) and the N measurement points x obtained using the sensing element 0、 x1,...,x N-1 to x 0、 x1,...,x N-1 The physical quantity signal is initially converted to a signal having a deterministic relationship with the corresponding electrical signal y using a conversion element. 0、 y1,...,y N-1 It may be converted to this.
[0022] If the electrical signal y is very weak and may not be usable for direct acquisition, the signal can be amplified via an amplification circuit.
[0023] In S03, x i and y i The data is constructed into pairs, and N interpolation points (x i We obtain ,yi)(i=0,1,...,N-1).
[0024] In S04, the above N interpolation points (x i ,y i Polynomial interpolation is performed according to the formula, and the interpolation function y=f(x) is calculated.
[0025] The specific calculation formula is: JPEG2026521970000005.jpg29141
[0026] For the sake of explanation, we will use the following formula: JPEG2026521970000006.jpg11133
[0027] If we continue using a pressure sensor as an example and N=5, then equation (3) is the following five quartic polynomial functions: JPEG2026521970000007.jpg114170
[0028] Equation (2) is, The file is JPEG2026521970000008.jpg10153, In S05, the sensor aims to obtain the value of the measured signal x by solving an equation for the electrical signal y based on the interpolation function y=f(x), establish a correspondence between the electrical signal y and the measured signal x, and obtain the size of the object being measured corresponding to any given electrical signal y.
[0029] In this invention, after the interpolation method described above is completed, the electrical signal y may be adjusted and, if necessary, converted to a voltage, current, or digital signal for output, thereby improving the adaptability and usability of the sensor signal.
[0030] Specific adjustments include, but are not limited to, nonlinear compensation, and / or zeroing out air-load output, and / or signal amplification, and / or conversion to standard digital current or voltage. Various adjustments can be implemented individually or in combination as needed.
[0031] The adjustment of sensor signals may also include processes such as isolation and protection.
[0032] The above method is suitable for interpolating the electrical signal output at each step of the sensor, and is applicable to both analog and digital sensors.
[0033] In the above method of this application, equation (1) measurement point x iThe polynomial interpolation function signal obtained from equation (2) does not exhibit Runge oscillations and can accurately reproduce the original signal collected by the sensor's sensing element, thus enabling the sensor to obtain more accurate measurements.
[0034] The interpolation method described above makes it possible to perform final adjustments to the sensor, which opens up possibilities for designing and developing calibration software and designing and manufacturing inspection equipment, among other things, and is expected to bring about broad prospects.
[0035] It should be noted that the above description represents some basic steps of the present application, and the order of these steps does not strictly represent the order of steps of the method protected by the present application. A person skilled in the art may add, change, merge, or divide the order of these steps depending on the actual situation, and the above steps are merely an example of one order in the interpolation method.
[0036] An example of the interpolation method of the present invention.
[0037] Example 1: Signal source R(x)=1 / (1+30(x-0.5) 2 When N=15, i.e., 15 interpolation points, equal-interval interpolation is performed using conventional techniques, the original signal image and the interpolation function signal image are shown in Figure 2A. When the non-equally-interval interpolation method of the present invention is adopted for the interpolation points, the original signal image and the interpolation function signal images are shown in Figure 2B. In the figures, the solid line represents the original signal R(x), and the dotted line represents the interpolation signal.
[0038] As can be seen from Figure 2A, when equal-interval interpolation is used, the interpolated function signal (dotted line) has clear peak values at both ends of the original signal (solid line), meaning that the equally-interval interpolated function signal exhibits Runge oscillations, and the large difference between the interpolated function signal and the original signal causes the processed data to deviate from the actual data. Figure 2B shows the non-equal-interval interpolation of the present invention, where the function signal (dotted line) almost overlaps with the original signal (solid line), meaning that Runge oscillations do not occur in the interpolated signal of the function fitting using the non-equal-interval interpolation of the present invention, and the original signal can be reproduced accurately in principle.
[0039] Example 2: To avoid irreparable influences due to measurement errors, four signal sources distributed in the interval [0,1] were used.
[0040] Specifically, select the following primitive signals: In equation (5) of JPEG2026521970000009.jpg, sin represents the sine function and cos represents the cosine function. In equation (8) of JPEG2026521970000010.jpg, "arctan" represents the inverse tangent function.
[0041] Figures 3A, 4A, 5A, and 6A show images obtained when N=16 using the original signal and the equally spaced interpolation function. The original signal in Figure 3A is f1(x) in equation (5), the original signal in Figure 4A is f2(x) in equation (6), the original signal in Figure 5A is f3(x) in equation (7), and the original signal in Figure 6A is f4(x) in equation (8). The solid line represents the original signal, and the dotted line represents the equally spaced interpolation function signal. As can be seen from the figure, when the original signal is f1(x), the function signal obtained by employing equal-interpolation closely matches the original signal (see Figure 3A), and no Runge oscillation occurs. However, when the original signals are f2(x), f3(x), and f4(x), the equally-interpolated function signal differs significantly from the original signal, causing a shift at both ends of the graph and the appearance of a certain peak value (see Figures 4A, 5A, and 6A). In other words, when the original signals are f2(x), f3(x), and f4(x), a strong Runge oscillation occurs, and the sensor accuracy decreases.
[0042] At N=16, images of the original signal and the non-equally spaced interpolation function according to this invention are shown in Figures 3B, 4B, 5B, and 6B. Similarly, the original signal in Figure 3B is f1(x) in equation (5), the original signal in Figure 4B is f2(x) in equation (6), the original signal in Figure 5B is f3(x) in equation (7), and the original signal in Figure 6B is f4(x) in equation (8). The solid line represents the original signal, and the dotted line represents the non-equally spaced interpolation function signal. As can be seen from the figures, the original signals in Figures 3B, 5B, and 6B almost overlap with the non-equally spaced interpolation function signals, meaning that the Runge oscillation phenomenon does not occur in the function signals using non-equally spaced interpolation. In Figure 4B, the original signal does not completely overlap with the original signal, but the Runge oscillation phenomenon does not occur, and its non-equally spaced interpolation function signal is very close to the graph of the original signal, with a very small deviation from the original signal.
[0043] Therefore, the measurement point x in formula (1) of this application i The polynomial interpolation function signal obtained by equation (2) no longer exhibits Runge oscillations.
[0044] For N interpolation points, L N Let (f) be denoted as the interpolation function, which is y in equation (2) above, and Max|L N (f)-f (x) The | symbol indicates the maximum error between the interpolated signal and the original signal, and can be understood as the accuracy of the sensor. Based on the original signal equations f1(x) in equation (5), f2(x) in equation (6), f3(x) in equation (7), and f4(x) in equation (8), the calculation results for N taking values of 8, 12, 16, and 20 are shown in Table 1.
[0045] Table 1: Maximum interpolation error JPEG2026521970000011.jpg91167
[0046] In Table 1, the "equally spaced nodes" are represented by the polynomial equation L, which is interpolated using the equally spaced sampling points of the conventional technique. N (F) and JPEG2026521970000012.jpg12157 "Unequally spaced nodes" are measured points x calculated using equation (1) i The polynomial expression L obtained by interpolationN (F) and JPEG2026521970000013.jpg12157
[0047] As can be seen from Table 1, the data based on non-uniformly spaced interpolation points is far superior to the data based on equally spaced interpolation points. Even in the case of f1(x) where the Runge oscillation phenomenon does not occur, as shown in Figures 3A and 3B (N=16), the difference between the two is not visible in the figures, but as is clear from the results in Table 1, the results based on non-uniformly spaced interpolation points show an order of magnitude improvement compared to the results based on equally spaced interpolation points. In the case of f2(x), f3(x), and f4(x) where the Runge oscillation occurs, when the equally spaced interpolation function is used, the Runge oscillation phenomenon is relatively clear and the error is in a divergent state, while in the case of non-uniformly spaced interpolation points, the Runge oscillation phenomenon disappears and the error gradually decreases as N increases. When the number of interpolation points N approaches infinity, the non-uniformly spaced interpolated signal perfectly matches the original signal. For this reason, the sensor can obtain accurate measurements using the interpolated signal calculated using the non-uniformly spaced interpolation function of this application.
[0048] Referring to Figure 7, the present application further provides an embodiment of a sensor 10 constructed based on the above method. Each module included in the sensor 10 of this embodiment is used to perform each step in the embodiment corresponding to Figure 1. For convenience of explanation, only the parts relevant to this embodiment are shown.
[0049] The aforementioned sensor 10 is A sensing element 101 for sensing target object measurement information (measured signal x), such as physical, chemical, or biological information, and then converting these measured signals x into corresponding electrical signals y, First, according to equation (1), we find the N measurement points x of the signal under test. i、 Calculate (i=0,1,...,N-1), and then the N measurement points x calculated above. i Select the appropriate electrical signal y, and the sensing element 101 will receive the corresponding electrical signal y i After converting to (i=0,1,...,N-1), the measurement point x i and electrical signal y i The data is constructed into pairs, and N interpolation points (xi ,y i An interpolation point acquisition module 103 that obtains (i=0,1,...,N-1), The N interpolation points (x i ,y i The system comprises an interpolation function module 104 that calculates the interpolation function y=f(x) according to the method shown in equation (2), then obtains the value of the measured signal x by solving the equation for the electrical signal y based on the interpolation function y=f(x), and constructs a correspondence between the electrical signal y and the measured signal x.
[0050] Referring to Figure 8, the present invention further provides other embodiments of the sensor 11 constructed based on the method described above. Each module included in the sensor 11 of this embodiment is used to perform each step in the embodiment corresponding to Figure 1. For convenience of explanation, only the parts relevant to this embodiment are shown.
[0051] The aforementioned sensor 11 is A sensing element 111 for sensing target object measurement information (measured signal x), such as physical, chemical, or biological information, and then converting it into a physical quantity signal that has a deterministic relationship with the measured signal x, A conversion element 112 converts the physical quantity signal output by the sensing element 111 into an electrical signal y, First, according to equation (1), we find the N measurement points x of the signal under test. i Calculate (i=0,1,...,N-1), and then the N measurement points x calculated above. i Select the sensor element 111 and measure point x i The signal is converted into a physical quantity signal, and the conversion element 112 measures N measurement points x i The corresponding electrical signal y i Convert to (i=0,1,...,N-1), and finally measure the x i and electrical signal y i The data is constructed into pairs, and N interpolation points (x i ,y i An interpolation point acquisition module 113 obtains (i=0,1,...,N-1), The N interpolation points (x i ,yi The system may also include an interpolation function module 114 that calculates the interpolation function y=f(x) according to the method shown in equation (2), then obtains the value of the signal under test x by solving the equation for the electrical signal y based on the interpolation function y=f(x), and constructs a correspondence between the electrical signal y and the signal under test x.
[0052] The sensors 10 and 11 described above may include a post-processing module, and may be a single or multiple module or combination of circuits, and are used to perform nonlinear compensation and / or air-load output zeroing and / or signal amplification and / or conversion to a standard digital current or voltage for the electrical signal y.
[0053] Figure 9 is a structural block diagram of a terminal device according to the present invention. As shown in Figure 9, the terminal device 20 of this embodiment includes a processor 201, a memory 202, and a computer program 203 stored in the memory 202 that enables the processor 201 to operate the sensor signal interpolation method. When the processor 201 executes the computer program 203, it realizes the steps in each embodiment of the sensor signal interpolation method, or when the processor 201 executes the computer program 203, it realizes the functions of each module in the embodiments corresponding to Figures 7 and 8.
[0054] To make it understandable, the computer program 203 is divisible into one or more modules, one or more of which are stored in memory 202 and executed by the processor 201 to implement the sensor signal interpolation method according to the present invention. One or more modules may be a set of instruction segments of the computer program capable of completing a specific function, and such instruction segments are used to describe the execution process of the computer program 203 on the terminal device 20. For example, the computer program 203 can implement the sensor signal interpolation method according to an embodiment of the present invention.
[0055] The terminal device 20 includes, but is not limited to, a processor 201 and memory 202. As those skilled in the art will understand, Figure 9 is merely an example of a terminal device 20 and does not constitute a limitation on the terminal device 20. It may include more or fewer components than shown, or some components or different components may be combined. For example, the terminal device may also include input / output devices, network access devices, buses, etc.
[0056] The processor 201 may be a central processing unit, another general-purpose processor, or a digital signal processor. The general-purpose processor may be a microprocessor, or it may be any ordinary processor.
[0057] The memory 202 may be an internal storage unit of the terminal device 20, such as a hard disk or memory, or it may be an internal storage unit and / or external storage device mounted on the terminal device 20.
[0058] This invention further provides a computer-readable storage medium comprising a memory, a processor, and a computer program stored in the memory and operable by the processor, thereby realizing the interpolation method of sensor signals in each of the above embodiments when the processor executes the computer program.
[0059] Furthermore, the present invention can also provide a computer program product, which, when running on a terminal device, causes the terminal device to execute the sensor signal interpolation method described in each of the above embodiments.
[0060] The above embodiments are not intended to be limiting, but are used solely to illustrate the technical solutions of the present application. While the present application has been described in detail with reference to the above embodiments, those skilled in the art will understand that it is still possible to modify the technical solutions described in the above embodiments or to substitute some of the technical features therein, and such modifications or substitutions should all be within the scope of protection of the present application, without the essence of the corresponding technical solutions departing from the spirit and scope of the technical solutions of each embodiment of the present application.
Claims
1. A method for interpolating sensor signals, comprising the following steps: N measurement points x of the signal x to be measured using non-equal interval interpolation i The calculation formula is: And, In equation (1), "sin" represents the sine function, "cos" represents the cosine function, N is the number of measurement points, and M is the range of the signal being measured by the sensor. The N measurement points x obtained from equation (1) 0、 x 1 , . . . , x N-1 Convert the following, and obtain N corresponding electrical signals y i Obtained, x i and y i are configured into a data pair, and N interpolation points (x i , y i )(i = 0, 1,..., N - 1) are obtained. The above N interpolation points (x i , y i Based on this, polynomial interpolation is performed to calculate the interpolation function y = f(x), The sensor is characterized by an interpolation method for sensor signals, in which the value of the signal to be measured x is obtained by solving an equation for the electrical signal y based on the interpolation function y = f(x), and a correspondence relationship is established between the electrical signal y and the signal to be measured x.
2. The interpolation method for a sensor signal according to claim 1, characterized in that, after establishing a correspondence between an electrical signal y and a signal to be measured x, the electrical signal y is adjusted.
3. The interpolation method for a sensor signal according to claim 2, characterized in that the adjustment to the electrical signal y includes nonlinear compensation and / or zeroing out the air-load output and / or signal amplification and / or conversion to a standard digital current or voltage.
4. N measurement points x of the signal x being measured by the sensor i According to the calculation formula (1), if N=5 and M=1, the following measurement points x i We obtained an approximate value of, {0, 0.190983, 0.5, 0.809017, 1} {0, 0.2, 0.5, 0.8, 1} {0, 0.19, 0.5, 0.81, 1} {0, 0.191, 0.5, 0.809, 1} {0, 0.19098, 0.5, 0.80902, 1} The interpolation method for sensor signals according to any one of claims 1-3, characterized in that it is the same as the above.
5. N measurement points x of the signal x being measured by the sensor i According to the calculation formula (1), if N = 6 and M is arbitrary, the following measurement points x i Obtain an approximate value, {0, 0.133975M, 0.366025M, 0.633975M, 0.866025M, M} {0, 0.13M, 0.37M, 0.63M, 0.87M, M} {0, 0.134M, 0.366M, 0.634M, 0.866M, M} {0, 0.13398M, 0.36603M, 0.63398M, 0.86603M, M} The interpolation method for sensor signals according to any one of claims 1-3, characterized in that it is the same as the above.
6. N measurement points x of the signal x being measured by the sensor i According to the calculation formula (1), if N = 7 and M is arbitrary, the following measurement points x i Obtain an approximate value, {0, 0.0990311M, 0.277479M, 0.5M, 0.722521M, 0.900969M, M} {0, 0.1M, 0.3M, 0.5M, 0.7M, 0.9M, M} {0, 0.10M, 0.28M, 0.5M, 0.72M, 0.90M, M} {0, 0.099M, 0.277M, 0.5M, 0.723M, 0.901M, M} {0, 0.0990M, 0.2775M, 0.5M, 0.7225M, 0.9010M, M} The interpolation method for sensor signals according to any one of claims 1-3, characterized in that it is the same as the above.
7. A sensor to be applied to the interpolation method of a sensor signal according to any one of claims 1 to 6, A sensing element that detects the signal x to be measured and converts the signal x to be measured into an electrical signal y, According to equation (1), N measurement points x of the signal to be measured are calculated. i (i=0, 1 , , , N-1) is calculated, and the corresponding electrical signal y of the N sensing elements is calculated. i After being converted to x i and y i The data is constructed into pairs, and N interpolation points (x i , y i An interpolation point acquisition module that obtains (i = 0, 1, ..., N-1), The N interpolation points (x) obtained by the interpolation point acquisition module i , y i A sensor characterized by comprising: an interpolation function module that calculates an interpolation function y = f(x) according to the method shown in equation (2), then obtains the value of the signal to be measured x by solving an equation for the electrical signal y based on the interpolation function y = f(x), and constructs a correspondence between the electrical signal y and the signal to be measured x.
8. A sensor to be applied to the interpolation method of a sensor signal according to any one of claims 1 to 6, A sensing element for detecting a signal x to be measured and outputting a physical quantity signal that has a deterministic relationship with the signal x to be measured, A conversion element for converting a physical quantity signal output by a sensing element into an electrical signal y, According to equation (1), N measurement points x of the signal to be measured are calculated. i、 (i=0, 1 , , , N-1) is calculated, and the corresponding electrical signal y of the N sensing elements is calculated. i After being converted to x i and y i The data is constructed into pairs, and N interpolation points (x i , y i An interpolation point acquisition module that obtains (i = 0, 1, ..., N-1), The N interpolation points (x) obtained by the interpolation point acquisition module i , y i A sensor characterized by comprising: an interpolation function module that calculates an interpolation function y = f(x) according to the method shown in equation (2), then obtains the value of the signal to be measured x by solving an equation for the electrical signal y based on the interpolation function y = f(x), and constructs a correspondence between the electrical signal y and the signal to be measured x.
9. A terminal device comprising memory, a processor, and a computer program stored in the memory and operable on the processor, characterized in that the processor implements the sensor signal interpolation method described in any one of claims 1-6 when executing the computer program.
10. A computer-readable storage medium in which a computer program is stored, characterized in that the interpolation method for sensor signals described in any one of claims 1 to 6 is realized when the computer program is executed by a processor.