Nonlinear compensation method and device for analog-to-digital conversion acquisition precision
By adopting a nonlinear compensation method in the analog-to-digital converter and using fitted polynomials inside and outside the interval for compensation, the problem of large error in the accuracy compensation of analog-to-digital conversion in the prior art is solved, and higher accuracy and adaptability are achieved.
Patent Information
- Application Number
- CN202411804575.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-18
AI Technical Summary
There are shortcomings in the design and manufacturing process of existing analog-to-digital converter chips, resulting in low acquisition accuracy. The existing first-order linear compensation method cannot effectively reduce compensation errors.
By using the nonlinear compensation method, the actual output value of the analog-to-digital converter is obtained, input it into the compensation model, and the fitted polynomial of the corresponding interval is called to determine the compensation output value. The compensation model includes fitted polynomials of the first interval and the second interval, the first interval adopts linear interpolation, and the second interval adopts nonlinear interpolation.
Through the nonlinear compensation method, the compensation error of analog-to-digital conversion acquisition accuracy is significantly reduced, the compensation accuracy of acquisition accuracy is improved, and while ensuring low operation complexity, it can adapt to the error distribution characteristics of different regions.
Smart Images

Figure CN119853684A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of direct current transmission control and protection, and in particular to a method, device, computer equipment, computer-readable storage medium and computer program product for nonlinear compensation of analog-to-digital conversion acquisition accuracy. Background Art
[0002] When the distance between the distribution area of energy resources and the concentrated area of load center is far, it is necessary to rely on high-voltage direct current transmission. High-voltage direct current transmission can realize long-distance and large-capacity power transmission, which is suitable for asynchronous operation between large regional power grids. It has the advantages of low loss, low line cost, flexible and fast adjustment. The control and protection system is the "brain" of high-voltage direct current transmission and the core of realizing and ensuring the safe and stable operation of direct current transmission. The direct current transmission control and protection system is essentially a high-performance distributed computing system, so a large number of high-speed data acquisition, fast calculation and processing chips are used. Among them, the analog-to-digital converter chip is one of the core components of the high-voltage direct current transmission control and protection system. Under the control of the field programmable gate array chip, it realizes the real-time acquisition and conversion of the electrical analog signal, and transmits the high-speed data to the processor for calculation, thereby realizing various high-speed protection and closed-loop control functions. The acquisition accuracy of the analog-to-digital converter refers to the ability of the analog-to-digital converter to restore the true value of the signal in the process of converting the analog signal into a digital signal. It is one of the key indicators to measure the performance of the analog-to-digital converter.
[0003] However, the current chip design and manufacturing process of analog-to-digital converters are insufficient, and the acquisition accuracy is low. Therefore, it is necessary to compensate for the acquisition accuracy of analog-to-digital conversion. The current compensation method for analog-to-digital conversion acquisition accuracy usually adopts a first-order linear compensation scheme, which assumes that the acquisition error of the analog-to-digital converter is linear, that is, y=ax+b, where x is the initial acquisition result, y is the output after compensation, a is the compensation coefficient, and b is the compensation gain. However, since many error characteristics of the analog-to-digital converter do not conform to the linear law, the compensation error of the analog-to-digital conversion acquisition accuracy is large. Summary of the invention
[0004] Based on this, it is necessary to provide a nonlinear compensation method, device, computer equipment, computer-readable storage medium and computer program product for analog-to-digital conversion acquisition accuracy that can reduce the compensation error of analog-to-digital conversion acquisition accuracy in response to the above technical problems.
[0005] In a first aspect, the present application provides a nonlinear compensation method for analog-to-digital conversion acquisition accuracy, comprising:
[0006] Get the actual output value of the analog-to-digital converter;
[0007] Inputting the actual output value of the analog-to-digital converter into the compensation model, calling the fitting polynomial corresponding to the interval where the actual output value is located through the compensation model, and determining the compensated output value of the analog-to-digital converter according to the actual output value and the fitting polynomial;
[0008] The compensation model includes a fitting polynomial corresponding to a first interval and a fitting polynomial corresponding to a second interval; the fitting polynomial corresponding to the first interval is a fitting polynomial constructed according to a standard input value and a corresponding output value of the analog-to-digital converter by linear interpolation, and the fitting polynomial corresponding to the second interval is a fitting polynomial constructed according to the standard input value and the corresponding output value by nonlinear interpolation;
[0009] The first interval is an interval of an adjacent range outside the numerical range of the standard input value, and the second interval is an interval within the numerical range of the standard input value.
[0010] In one embodiment, the first interval includes an interval [x0, x1) and an interval [x7, x8]; x1 is the minimum value among the plurality of standard input values, x0 is less than x1, and the difference between x1 and x0 is a preset difference; x7 is the maximum value among the plurality of standard input values, x7 is less than x8, and the difference between x8 and x7 is the preset difference;
[0011] The fitting polynomial corresponding to the first interval is expressed as:
[0012] ;
[0013] Among them, the is the fitting polynomial corresponding to the interval [x0, x1), is the fitting polynomial corresponding to the interval [x7, x8], y0 is the output value corresponding to x0, y1 is the output value corresponding to x1, y7 is the output value corresponding to x7, and y8 is the output value corresponding to x8.
[0014] In one embodiment, the fitting polynomial corresponding to the second interval is expressed as:
[0015] ;
[0016] Among them, x i is any one of the plurality of standard input values; For the interval [x i , x i+1 ) corresponding fitting polynomial; the a i 、b i 、ci d i For the The polynomial coefficients of .
[0017] In one embodiment, the fitting polynomial corresponding to the first interval and the fitting polynomial corresponding to the second interval satisfy data point fitting conditions, derivative continuity conditions and boundary conditions;
[0018] Wherein, the data point fitting condition is expressed as:
[0019] ;
[0020] Among them, y i For x i The corresponding output value, the y i+1 For the x i+1 The corresponding output value;
[0021] The derivative continuity condition is expressed as:
[0022] ;
[0023] Wherein, the boundary condition is expressed as:
[0024] ;
[0025] in, , .
[0026] In one embodiment, the a i It is expressed as:
[0027] ;
[0028] The b i It is expressed as:
[0029] ;
[0030] The c i It is expressed as:
[0031] ;
[0032] The d i It is expressed as:
[0033] ;
[0034] in, , ; The M i It is determined by parameter solution model;
[0035] The parameter solution model is expressed as:
[0036] .
[0037] In one embodiment, the compensation model is expressed as:
[0038] .
[0039] In a second aspect, the present application further provides a nonlinear compensation device for analog-to-digital conversion acquisition accuracy, comprising:
[0040] An acquisition module is used to obtain the actual output value of the analog-to-digital converter;
[0041] A compensation module, used for inputting the actual output value of the analog-to-digital converter into a compensation model, calling a fitting polynomial corresponding to the interval in which the actual output value is located through the compensation model, and determining a compensated output value of the analog-to-digital converter according to the actual output value and the fitting polynomial;
[0042] The compensation model includes a fitting polynomial corresponding to a first interval and a fitting polynomial corresponding to a second interval; the fitting polynomial corresponding to the first interval is a fitting polynomial constructed according to a standard input value and a corresponding output value of the analog-to-digital converter by linear interpolation, and the fitting polynomial corresponding to the second interval is a fitting polynomial constructed according to the standard input value and the corresponding output value by nonlinear interpolation;
[0043] The first interval is an interval of an adjacent range outside the numerical range of the standard input value, and the second interval is an interval within the numerical range of the standard input value.
[0044] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0045] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0046] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.
[0047] The nonlinear compensation method, device, computer equipment, computer-readable storage medium and computer program product for the acquisition accuracy of analog-to-digital conversion obtain the actual output value of the analog-to-digital converter; input the actual output value of the analog-to-digital converter into the compensation model, call the fitting polynomial corresponding to the interval where the actual output value is located through the compensation model, and determine the compensated output value of the analog-to-digital converter according to the actual output value and the fitting polynomial; wherein the compensation model includes a fitting polynomial corresponding to a first interval and a fitting polynomial corresponding to a second interval; the fitting polynomial corresponding to the first interval is a fitting polynomial constructed by linear interpolation according to the standard input value and the corresponding output value of the analog-to-digital converter, and the fitting polynomial corresponding to the second interval is a fitting polynomial constructed by nonlinear interpolation according to the standard input value and the corresponding output value; wherein the first interval is an interval of an adjacent range outside the numerical range of the standard input value, and the second interval is an interval within the numerical range of the standard input value. By adopting a linear interpolation fitting model outside the interval and a nonlinear interpolation fitting model within the interval, the compensation model can more flexibly adapt to the error distribution characteristics of different regions, achieve accurate correction of complex nonlinear errors, and improve the compensation accuracy of the analog-to-digital conversion acquisition accuracy; and, by utilizing a segmented compensation mechanism of multi-segment fitting polynomials, the compensation error of the analog-to-digital conversion acquisition accuracy is greatly reduced while ensuring low computational complexity. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 A diagram of an application environment of a nonlinear compensation method for analog-to-digital conversion acquisition accuracy in one embodiment;
[0050] Figure 2 It is a schematic flow chart of a nonlinear compensation method for analog-to-digital conversion acquisition accuracy in one embodiment;
[0051] Figure 3 It is a structural block diagram of a nonlinear compensation device for analog-to-digital conversion acquisition accuracy in one embodiment;
[0052] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0054] The nonlinear compensation method for analog-to-digital conversion acquisition accuracy provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 obtains the actual output value of the analog-to-digital converter; the terminal 102 inputs the actual output value of the analog-to-digital converter into the compensation model, calls the fitting polynomial corresponding to the interval where the actual output value is located through the compensation model, and determines the compensated output value of the analog-to-digital converter according to the actual output value and the fitting polynomial; wherein the compensation model includes a fitting polynomial corresponding to the first interval and a fitting polynomial corresponding to the second interval; the fitting polynomial corresponding to the first interval is a fitting polynomial constructed by linear interpolation according to the standard input value and the corresponding output value of the analog-to-digital converter, and the fitting polynomial corresponding to the second interval is a fitting polynomial constructed by nonlinear interpolation according to the standard input value and the corresponding output value; wherein the first interval is an interval of an adjacent range outside the numerical range of the standard input value, and the second interval is an interval within the numerical range of the standard input value. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.
[0055] In an exemplary embodiment, Figure 2 As shown, a nonlinear compensation method for analog-to-digital conversion acquisition accuracy is provided. Figure 1 The terminal 102 in FIG. 1 is used as an example for explanation, including:
[0056] Step S202, obtaining the actual output value of the analog-to-digital converter.
[0057] Among them, the analog-to-digital converter (ADC) is an electronic component that converts analog signals (such as voltage and current) into digital signals and is used for signal processing in digital systems. The acquisition accuracy of analog-to-digital conversion refers to the ability of the analog-to-digital converter to restore the true value when converting analog signals into digital signals, reflecting the error between the input signal and the output signal.
[0058] The actual output value of the analog-to-digital converter is the digital output generated by the analog-to-digital converter after collecting the signal and performing digital processing. It is the uncompensated initial data and may contain errors.
[0059] Step S204, input the actual output value of the analog-to-digital converter into the compensation model, call the fitting polynomial corresponding to the interval where the actual output value is located through the compensation model, and determine the compensated output value of the analog-to-digital converter based on the actual output value and the fitting polynomial.
[0060] Among them, the compensation model includes a fitting polynomial corresponding to the first interval and a fitting polynomial corresponding to the second interval; the fitting polynomial corresponding to the first interval is a fitting polynomial constructed by linear interpolation according to the standard input value and the corresponding output value of the analog-to-digital converter, and the fitting polynomial corresponding to the second interval is a fitting polynomial constructed by nonlinear interpolation according to the standard input value and the corresponding output value.
[0061] The first interval is an interval of an adjacent range outside the numerical range of the standard input value, and the second interval is an interval within the numerical range of the standard input value.
[0062] The compensated output value is the output value of the analog-to-digital converter after being corrected by the compensation model, which is used to be as close to the actual input signal as possible and reduce the acquisition error.
[0063] The standard input value may be a preset analog signal value, which is usually used as a reference for calibrating and testing an analog-to-digital converter, such as -5V, -2V, -1V, 0V, +1V, +2V, +5V and other known voltage values.
[0064] The fitting polynomial is a mathematical model used to describe the relationship between the analog signal and the digital signal. The fitting polynomials in different intervals are constructed by linear interpolation or nonlinear interpolation, reflecting the error characteristics of the analog-to-digital converter.
[0065] Among them, linear interpolation can refer to fitting data using the straight line equation between two points, which is suitable for intervals with relatively gentle changes and simple error patterns.
[0066] Among them, nonlinear interpolation can refer to the use of complex curves to fit data, which is suitable for intervals with complex and variable error characteristics. Optionally, nonlinear interpolation can include cubic spline interpolation. Cubic spline interpolation is a method of passing a series of shape points to form a smooth curve. The curve function is obtained by solving a set of three bending moment equations. Mathematically, it is implemented through piecewise cubic polynomials. In actual calculations, boundary conditions need to be introduced to complete the calculation.
[0067] Among them, the interval is the input value range divided by the numerical range. The first interval is an interval outside the numerical range of the standard input value and adjacent to the numerical range of the standard input value; the second interval is an interval within the numerical range of the standard input value. Exemplarily, assuming that the standard input value is -5V, -2V, -1V, 0V, +1V, +2V, +5V, the first interval can be [-10V, -5V], [5V, 10V], and the second interval can include [-5V, -2V], [-2V, -1V], [-1V, 0V], [0V, +1V], [+1V, +2V], [+2V, +5V] and other intervals composed of multiple adjacent standard input values.
[0068] In a specific implementation, the actual output value collected by the analog-to-digital converter can be input into the compensation model. The actual output value may deviate from the true value due to the nonlinear characteristics, offset error or gain error of the analog-to-digital converter. The compensation model determines whether the actual output value belongs to the first interval or the second interval according to the size of the actual output value. If the actual output value is outside the numerical range of the standard input value, it is determined to be the first interval; if the actual output value is within the numerical range of the standard input value, it is determined to be the second interval. According to the interval in which the actual output value is located, the corresponding fitting polynomial is called, wherein the first interval (linear interpolation) describes the error change with a linear equation based on the standard input value and output value, and the second interval (nonlinear interpolation) uses complex nonlinear interpolation (such as cubic spline interpolation) to construct a fitting polynomial to accurately describe the nonlinear error; the actual output value is substituted into the selected fitting polynomial to calculate the compensated output value.
[0069] Exemplarily, when constructing the compensation model, the reference voltage VREF of the analog-to-digital converter can be set to 5 volts (V), a standard voltage signal source is applied to each channel of the analog-to-digital converter, and the output value corresponding to the analog-to-digital converter under the conditions of standard input values such as -5V, -2V, -1V, 0V, +1V, +2V, and +5V is recorded. The reference voltage VREF is used to define the full-scale input range of the analog-to-digital converter. Then the standard input value is divided into outside the interval (linear characteristics) and inside the interval (non-linear characteristics), and different interpolation methods are used respectively, thereby improving the adaptability and accuracy of the compensation model.
[0070] According to the linear and nonlinear error characteristics of the analog-to-digital converter, a suitable fitting polynomial is constructed to accurately compensate for the error. Simple linear interpolation is used outside the interval with small errors to reduce the calculation complexity; nonlinear interpolation is used within the interval with complex errors to improve the compensation accuracy.
[0071] In the above-mentioned nonlinear compensation method for analog-to-digital conversion acquisition accuracy, the actual output value of the analog-to-digital converter is obtained; the actual output value of the analog-to-digital converter is input into the compensation model, the fitting polynomial corresponding to the interval where the actual output value is located is called through the compensation model, and the compensated output value of the analog-to-digital converter is determined according to the actual output value and the fitting polynomial; wherein the compensation model includes a fitting polynomial corresponding to a first interval and a fitting polynomial corresponding to a second interval; the fitting polynomial corresponding to the first interval is a fitting polynomial constructed according to the standard input value and the corresponding output value of the analog-to-digital converter through linear interpolation, and the fitting polynomial corresponding to the second interval is a fitting polynomial constructed according to the standard input value and the corresponding output value through nonlinear interpolation; wherein the first interval is an interval of an adjacent range outside the numerical range of the standard input value, and the second interval is an interval within the numerical range of the standard input value. By adopting a linear interpolation fitting model outside the interval and a nonlinear interpolation fitting model within the interval, the compensation model can more flexibly adapt to the error distribution characteristics of different regions, achieve accurate correction of complex nonlinear errors, and improve the compensation accuracy of the analog-to-digital conversion acquisition accuracy; and, by utilizing a segmented compensation mechanism of multi-segment fitting polynomials, the compensation error of the analog-to-digital conversion acquisition accuracy is greatly reduced while ensuring low computational complexity.
[0072] In another embodiment, the first interval includes an interval [x0, x1) and an interval [x7, x8]; x1 is the minimum value among a plurality of standard input values, x0 is less than x1, and the difference between x1 and x0 is a preset difference; x7 is the maximum value among a plurality of standard input values, x7 is less than x8, and the difference between x8 and x7 is a preset difference;
[0073] The fitting polynomial corresponding to the first interval is expressed as:
[0074] ;
[0075] in, is the fitting polynomial corresponding to the interval [x0, x1), is the fitting polynomial corresponding to the interval [x7, x8], y0 is the output value corresponding to x0, y1 is the output value corresponding to x1, y7 is the output value corresponding to x7, and y8 is the output value corresponding to x8.
[0076] For example, assuming that the standard input values are -5V, -2V, -1V, 0V, +1V, +2V, +5V, then [x0, x1) can be [-10V, -5V), and [x7, x8] can be [5V, 10V]. x0 is a value obtained by offsetting the value of the standard input value outside the numerical range by a preset difference based on the minimum value in the standard input value; x8 is a value obtained by offsetting the value of the standard input value outside the numerical range by a preset difference based on the maximum value in the standard input value. Using linear interpolation on the interval [x0, x1) and the interval [x7, x8], the fitting polynomial corresponding to the first interval can be obtained.
[0077] The technical solution of this embodiment directly adopts linear interpolation calculation in the compensation process of the boundary interval (first interval), avoiding complex nonlinear calculation operations, reducing the real-time requirements of the compensation calculation while ensuring basic accuracy, making it easier to implement in embedded or real-time systems.
[0078] In another embodiment, the fitting polynomial corresponding to the second interval is expressed as:
[0079] ;
[0080] Among them, x i Any one of multiple standard input values; For the interval [x i , x i+1 ) The corresponding fitting polynomial; a i 、b i 、c i d i for The polynomial coefficients of .
[0081] For example, assuming the standard input values are -5V, -2V, -1V, 0V, +1V, +2V, +5V, then 7 corresponding output values can be obtained, i.e. 7 data points , so 6 fitting polynomials can be generated , that is, 6 cubic polynomials. Using cubic spline interpolation on the interval [x1, x7], the fitting generates , , , , , .
[0082] The technical solution of this embodiment uses cubic polynomial fitting to better describe the nonlinear relationship between input and output, especially the complex error characteristics within the standard input range. The high-order terms of the polynomial can effectively capture the curvature of the error curve, thereby improving the accuracy of compensation; through the flexible adjustment of the polynomial coefficients, it can adapt to the error characteristics of different analog-to-digital converters; through the cubic polynomial fitting model, an efficient, accurate and easy-to-implement nonlinear compensation method is provided for the error distribution characteristics of the analog-to-digital converter within the standard input range.
[0083] In another embodiment, the fitting polynomial corresponding to the first interval and the fitting polynomial corresponding to the second interval satisfy the data point fitting condition, the derivative continuity condition and the boundary condition;
[0084] The data point fitting condition is expressed as:
[0085] ;
[0086] Among them, y i For x i The corresponding output value, y i+1 For x i+1 The corresponding output value;
[0087] The derivative continuity condition is expressed as:
[0088] ;
[0089] The boundary conditions are expressed as:
[0090] ;
[0091] in, , .
[0092] In the specific implementation, the data point fitting condition can ensure that each fitting polynomial In the corresponding interval [x i , x i+1 ) through the data point exactly at the end point and , which can ensure the overall correctness of the fitting curve corresponding to the fitting polynomial, that is, the fitting curve can accurately describe the relationship between input and output.
[0093] In the specific implementation, the derivative continuity condition is used to ensure the continuity of the first-order derivative and the second-order derivative of the fitting curve corresponding to the fitting polynomial. is the first-order derivative, is the second-order derivative. The continuity of the first-order derivative ensures that the fitting curve is at the interval connection point The slope of the curve is continuous, ensuring the smoothness of the curve; the second-order derivative continuity ensures the curvature of the fitting curve at the connection point is continuous, avoiding unnatural shape changes. The derivative continuity condition ensures the continuity and smoothness of the fitting curve.
[0094] In the specific implementation, the boundary conditions define the boundary derivative values of the fitting curve corresponding to the fitting polynomial in the first and last segments, and k1 and k6 are preset derivative values (slopes), which represent the trend of the fitting curve at the boundary points.
[0095] The technical solution of this embodiment, through the combined effect of data point fitting conditions, derivative continuity conditions and boundary conditions, constitutes a fitting curve model that meets high precision, high smoothness and physical consistency, that is, an accurate compensation model.
[0096] In another embodiment, a i It is expressed as:
[0097] ;
[0098] b i It is expressed as:
[0099] ;
[0100] c i It is expressed as:
[0101] ;
[0102] d i It is expressed as:
[0103] ;
[0104] in, , ;M i It is determined by parameter solution model;
[0105] The parameter solution model is expressed as:
[0106] .
[0107] For example, assuming the standard input values are -5V, -2V, -1V, 0V, +1V, +2V, +5V, then 7 corresponding output values can be obtained, i.e. 7 data points , 6 fitting polynomials can be generated , since each fitting polynomial Including 4 unknown polynomial coefficients, these 6 fitting polynomials This corresponds to 12 data point fitting conditions, 10 derivative continuity conditions, and 2 boundary conditions, for a total of 24 unknown parameters. , At this time, the parameter solution model is used to solve M i , and substitute into the above a i 、b i 、c i and d i The calculation formula is used to obtain the values of these polynomial coefficients, and then substitute them into the constructed fitting polynomial , the compensation model can be obtained.
[0108] The technical solution of this embodiment adopts a diagonal matrix structure to solve the polynomial coefficients, which can quickly complete the parameter calculation with fewer computing resources and greatly reduce the calculation complexity.
[0109] In another embodiment, the compensation model is expressed as:
[0110] .
[0111] Therefore, when the actual output value of the analog-to-digital converter is obtained, the actual output value can be substituted into the x in the fitting polynomial corresponding to the interval in the compensation model to obtain the compensated output value.
[0112] The compensation model uses linear interpolation for compensation outside the standard input value range (interval [x0, x1) and interval [x7, x8]). The linear interpolation calculation complexity is low, which is suitable for the error characteristics of these boundary intervals and ensures the accuracy of the boundary intervals. Within the standard input value range (interval [x1, x7)), a cubic polynomial fitting model is used to more accurately describe the nonlinear error characteristics of the analog-to-digital converter, thereby significantly improving the compensation accuracy. By using a combination of linear interpolation and cubic polynomial fitting in different intervals, the model maintains the continuity of the first-order derivative and the second-order derivative at the junction of the intervals, ensuring the smooth transition of the fitting curve. The smooth compensation curve can better reflect the changing characteristics of the real signal and avoid errors introduced by sharp inflection points or discontinuities. By dividing the intervals, the complex cubic polynomial fitting is limited to the standard input range, and the boundary interval only requires simple linear interpolation calculations, which reduces the overall calculation complexity. This segmented processing strategy is particularly suitable for embedded systems or real-time control scenarios and meets the needs of resource-constrained environments. Different compensation strategies are designed for each interval. This flexibility enables the model to adapt to different types of analog-to-digital converters or error distributions with different characteristics. By adjusting the polynomial coefficients and the slope parameters of linear interpolation, the model can be further optimized to adapt to specific application scenarios.
[0113] The technical solution of this embodiment is that since the error characteristics of many analog-to-digital converter chips do not conform to the linear law, the error is large in the small signal area and the error degree is different in the full input range. The traditional first-order linear compensation method will cause a large compensation error in the analog-to-digital conversion acquisition accuracy. To address this problem, a nonlinear compensation solution that mixes two compensation methods, nonlinear least squares method and piecewise interpolation method, is proposed, which reduces the computational complexity while ensuring a low error level.
[0114] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0115] Based on the same inventive concept, the embodiment of the present application also provides a nonlinear compensation device for analog-to-digital conversion acquisition accuracy for implementing the nonlinear compensation method for analog-to-digital conversion acquisition accuracy involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more nonlinear compensation devices for analog-to-digital conversion acquisition accuracy provided below can refer to the limitations of the nonlinear compensation method for analog-to-digital conversion acquisition accuracy above, and will not be repeated here.
[0116] In an exemplary embodiment, Figure 3 As shown, a nonlinear compensation device for analog-to-digital conversion acquisition accuracy is provided, comprising:
[0117] An acquisition module 310 is used to acquire an actual output value of the analog-to-digital converter;
[0118] The compensation module 320 is used to input the actual output value of the analog-to-digital converter into the compensation model, call the fitting polynomial corresponding to the interval where the actual output value is located through the compensation model, and determine the compensated output value of the analog-to-digital converter according to the actual output value and the fitting polynomial;
[0119] The compensation model includes a fitting polynomial corresponding to a first interval and a fitting polynomial corresponding to a second interval; the fitting polynomial corresponding to the first interval is a fitting polynomial constructed according to a standard input value and a corresponding output value of the analog-to-digital converter by linear interpolation, and the fitting polynomial corresponding to the second interval is a fitting polynomial constructed according to the standard input value and the corresponding output value by nonlinear interpolation;
[0120] The first interval is an interval of an adjacent range outside the numerical range of the standard input value, and the second interval is an interval within the numerical range of the standard input value.
[0121] In one embodiment, the first interval includes an interval [x0, x1) and an interval [x7, x8]; x1 is the minimum value among the plurality of standard input values, x0 is less than x1, and the difference between x1 and x0 is a preset difference; x7 is the maximum value among the plurality of standard input values, x7 is less than x8, and the difference between x8 and x7 is the preset difference;
[0122] The fitting polynomial corresponding to the first interval is expressed as:
[0123] ;
[0124] Among them, the is the fitting polynomial corresponding to the interval [x0, x1), is the fitting polynomial corresponding to the interval [x7, x8], y0 is the output value corresponding to x0, y1 is the output value corresponding to x1, y7 is the output value corresponding to x7, and y8 is the output value corresponding to x8.
[0125] In one embodiment, the fitting polynomial corresponding to the second interval is expressed as:
[0126] ;
[0127] Among them, x i is any one of the plurality of standard input values; For the interval [x i , x i+1 ) corresponding fitting polynomial; the a i 、b i 、c i d i For the The polynomial coefficients of .
[0128] In one embodiment, the fitting polynomial corresponding to the first interval and the fitting polynomial corresponding to the second interval satisfy data point fitting conditions, derivative continuity conditions and boundary conditions;
[0129] Wherein, the data point fitting condition is expressed as:
[0130] ;
[0131] Among them, y i For x i The corresponding output value, the y i+1 For the x i+1 The corresponding output value;
[0132] The derivative continuity condition is expressed as:
[0133] ;
[0134] Wherein, the boundary condition is expressed as:
[0135] ;
[0136] in, , .
[0137] In one embodiment, the a i It is expressed as:
[0138] ;
[0139] The b i It is expressed as:
[0140] ;
[0141] The c i It is expressed as:
[0142] ;
[0143] The d i It is expressed as:
[0144] ;
[0145] in, , ; The M i It is determined by parameter solution model;
[0146] The parameter solution model is expressed as:
[0147] .
[0148] In one embodiment, the compensation model is expressed as:
[0149] .
[0150] Each module in the above-mentioned nonlinear compensation device for analog-to-digital conversion acquisition accuracy can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0151] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 4 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a nonlinear compensation method for analog-to-digital conversion acquisition accuracy is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0152] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0153] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0154] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0155] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0156] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0157] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0158] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0159] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A nonlinear compensation method for analog-to-digital conversion acquisition accuracy, characterized in that: The method comprises: Get the actual output value of the analog-to-digital converter; Inputting the actual output value of the analog-to-digital converter into the compensation model, calling the fitting polynomial corresponding to the interval where the actual output value is located through the compensation model, and determining the compensated output value of the analog-to-digital converter according to the actual output value and the fitting polynomial; The compensation model includes a fitting polynomial corresponding to a first interval and a fitting polynomial corresponding to a second interval; the fitting polynomial corresponding to the first interval is a fitting polynomial constructed according to a standard input value and a corresponding output value of the analog-to-digital converter by linear interpolation, and the fitting polynomial corresponding to the second interval is a fitting polynomial constructed according to the standard input value and the corresponding output value by nonlinear interpolation; The first interval is an interval of an adjacent range outside the numerical range of the standard input value, and the second interval is an interval within the numerical range of the standard input value.
2. The method according to claim 1, characterized in that The first interval includes an interval [x0, x1) and an interval [x7, x8]; x1 is the minimum value among the plurality of standard input values, x0 is less than x1, and the difference between x1 and x0 is a preset difference; x7 is the maximum value among the plurality of standard input values, x7 is less than x8, and the difference between x8 and x7 is the preset difference; The fitting polynomial corresponding to the first interval is expressed as: ; Among them, the is the fitting polynomial corresponding to the interval [x0, x1), is the fitting polynomial corresponding to the interval [x7, x8], y0 is the output value corresponding to x0, y1 is the output value corresponding to x1, y7 is the output value corresponding to x7, and y8 is the output value corresponding to x8.
3. The method according to claim 2, characterized in that The fitting polynomial corresponding to the second interval is expressed as: ; Among them, x i is any one of the plurality of standard input values; For the interval [x i , x i+1 ) corresponding fitting polynomial; the a i , b i 、c i ,d i For the The polynomial coefficients of .
4. The method according to claim 3, characterized in that The fitting polynomial corresponding to the first interval and the fitting polynomial corresponding to the second interval satisfy the data point fitting condition, the derivative continuity condition and the boundary condition; Wherein, the data point fitting condition is expressed as: ; Among them, y i For x i The corresponding output value, the y i+1 For the x i+1 The corresponding output value; The derivative continuity condition is expressed as: ; Wherein, the boundary condition is expressed as: ; in, , .
5. The method according to claim 4, characterized in that The a i It is expressed as: ; The b i It is expressed as: ; The c i It is expressed as: ; The d i It is expressed as: ; in, , ; The M i It is determined by parameter solution model; The parameter solution model is expressed as: 。 6. The method according to claim 5, characterized in that The compensation model is expressed as: 。 7. A nonlinear compensation device for analog-to-digital conversion acquisition accuracy, characterized in that: The device comprises: An acquisition module is used to obtain the actual output value of the analog-to-digital converter; A compensation module, used for inputting the actual output value of the analog-to-digital converter into a compensation model, calling a fitting polynomial corresponding to the interval in which the actual output value is located through the compensation model, and determining a compensated output value of the analog-to-digital converter according to the actual output value and the fitting polynomial; The compensation model includes a fitting polynomial corresponding to a first interval and a fitting polynomial corresponding to a second interval; the fitting polynomial corresponding to the first interval is a fitting polynomial constructed according to a standard input value and a corresponding output value of the analog-to-digital converter by linear interpolation, and the fitting polynomial corresponding to the second interval is a fitting polynomial constructed according to the standard input value and the corresponding output value by nonlinear interpolation; The first interval is an interval of an adjacent range outside the numerical range of the standard input value, and the second interval is an interval within the numerical range of the standard input value.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Analog-to-digital conversion module, and transfer function compensation device and method
CN104980153A
Analog-to-digital converter with expected value nonlinearity calibration
US9219493B1