Nonlinear compensation method and device for analog-to-digital conversion acquisition accuracy
By using a nonlinear compensation method and fitting a polynomial to perform precise compensation in different ranges of the analog-to-digital converter, the problem of low acquisition accuracy of the analog-to-digital converter is solved, and high-precision acquisition accuracy compensation for analog-to-digital conversion is achieved.
Patent Information
- Application Number
- CN202411804575.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2044-12-10
AI Technical Summary
Existing analog-to-digital converter (ADC) chip designs suffer from low acquisition accuracy, and traditional first-order linear compensation methods cannot effectively reduce the compensation error in ADC acquisition accuracy.
A nonlinear compensation method is adopted. By obtaining the actual output value of the analog-to-digital converter, nonlinear interpolation and linear interpolation are performed using the fitting polynomial in the compensation model. Accurate compensation is performed in different intervals, including linear interpolation in the vicinity outside the standard input value range and nonlinear interpolation in the standard input value range.
It improves the compensation accuracy of analog-to-digital conversion acquisition precision, reduces the compensation error of analog-to-digital conversion acquisition precision, adapts to the error distribution characteristics of different regions, and reduces computational complexity.
Smart Images

Figure CN119853684B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of DC transmission control and protection technology, and in particular to a nonlinear compensation method, device, computer equipment, computer-readable storage medium, and computer program product for analog-to-digital conversion acquisition accuracy. Background Technology
[0002] In situations where the distance between energy resource distribution areas and load center concentration areas is large, high-voltage direct current (HVDC) transmission is necessary. HVDC transmission enables long-distance, high-capacity power transmission, is suitable for asynchronous operation between large regional power grids, and has advantages such as low loss, low line cost, and flexible and rapid regulation. The control and protection system is the "brain" of HVDC transmission, and is the core component for achieving and ensuring the safe and stable operation of HVDC transmission. Essentially, the HVDC control and protection system is a high-performance distributed computing system, therefore employing numerous high-speed data acquisition and fast processing chips. Among them, the analog-to-digital converter (ADC) chip is one of the core components of the HVDC control and protection system. Under the control of a field-programmable gate array (FPGA) chip, it realizes real-time acquisition and conversion of analog power signals, transmits high-speed data to the processor for calculation, and thus realizes various high-speed protection and closed-loop control functions. The acquisition accuracy of the ADC refers to its ability to reproduce the true value of the signal during the process of converting analog signals into digital signals, and is one of the key indicators for measuring the performance of the ADC.
[0003] However, current analog-to-digital converter (ADC) chip design and manufacturing processes have shortcomings, resulting in low acquisition accuracy. Therefore, it is necessary to compensate for the acquisition accuracy of ADCs. Currently, the compensation method for ADC acquisition accuracy typically employs a first-order linear compensation scheme, assuming that the acquisition error of the ADC is linear, i.e., y = ax + b, where x is the initial acquisition result, y is the compensated output, a is the compensation coefficient, and b is the compensation gain. However, because many error characteristics of ADCs do not conform to linear laws, the compensation error for ADC acquisition accuracy is relatively large. Summary of the Invention
[0004] Therefore, it is necessary to provide a nonlinear compensation method, apparatus, 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 order to address the above-mentioned technical problems.
[0005] Firstly, this application provides a nonlinear compensation method for analog-to-digital conversion acquisition accuracy, including:
[0006] Obtain the actual output value of the analog-to-digital converter;
[0007] The actual output value of the analog-to-digital converter is input into the compensation model. The compensation model calls the fitting polynomial corresponding to the interval where the actual output value is located. Based on the actual output value and the fitting polynomial, the compensated output value of the analog-to-digital converter is determined.
[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 by linear interpolation based on 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 based on the standard input value and the corresponding output value.
[0009] Wherein, the first interval is the interval of the adjacent range outside the numerical range of the standard input value, and the second interval is the interval within the numerical range of the standard input value.
[0010] In one embodiment, the first interval includes the interval [x0, x1) and the 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 The fitting polynomial corresponding to the interval [x0, x1) is... Let y0 be the fitting polynomial corresponding to the interval [x7, x8], y1 be the output value corresponding to x0, y7 be the output value corresponding to x7, and y8 be the output value corresponding to x8.
[0014] In one embodiment, the fitting polynomial corresponding to the second interval is expressed as:
[0015] ;
[0016] Where, x i It can be any one of the multiple standard input values; For the interval [x i x i+1 The corresponding fitting polynomial; the a i b i ci d i For the The polynomial coefficients.
[0017] In one embodiment, the fitting polynomials corresponding to the first interval and the fitting polynomials corresponding to the second interval satisfy the data point fitting condition, the derivative continuity condition, and the boundary condition.
[0018] The data point fitting condition is expressed as follows:
[0019] ;
[0020] Among them, y i For x i The corresponding output value, y i+1 For the x i+1 The corresponding output value;
[0021] The derivative continuity condition is expressed as:
[0022] ;
[0023] The boundary conditions are expressed as follows:
[0024] ;
[0025] in, , .
[0026] In one embodiment, the a i Represented as:
[0027] ;
[0028] The b i Represented as:
[0029] ;
[0030] The c i Represented as:
[0031] ;
[0032] The d i Represented as:
[0033] ;
[0034] in, , The M i It is determined through the parameter solving model;
[0035] The parameter solution model is expressed as follows:
[0036] .
[0037] In one embodiment, the compensation model is represented as:
[0038] .
[0039] Secondly, this application also provides a nonlinear compensation device for analog-to-digital conversion acquisition accuracy, comprising:
[0040] The acquisition module is used to acquire the actual output value of the analog-to-digital converter;
[0041] The compensation module 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 based on 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 by linear interpolation based on 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 based on the standard input value and the corresponding output value.
[0043] Wherein, the first interval is the interval of the adjacent range outside the numerical range of the standard input value, and the second interval is the interval within the numerical range of the standard input value.
[0044] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.
[0045] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0046] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.
[0047] The aforementioned nonlinear compensation method, device, computer equipment, computer-readable storage medium, and computer program product for analog-to-digital converter (ADC) acquisition accuracy obtain the actual output value of the ADC; input the actual output value of the ADC into a 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 ADC based on 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 based on the standard input value and the corresponding output value of the ADC, and the fitting polynomial corresponding to the second interval is a fitting polynomial constructed by nonlinear interpolation based on the standard input value and the corresponding output value; wherein, the first interval is the interval adjacent to the numerical range outside the standard input value, and the second interval is the interval within the numerical range of the standard input value. By employing 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, achieving accurate correction of complex nonlinear errors and improving the compensation accuracy of analog-to-digital conversion acquisition. Furthermore, by utilizing the piecewise compensation mechanism of multi-segment fitting polynomials, the compensation error of analog-to-digital conversion acquisition accuracy is greatly reduced while ensuring low computational complexity. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 This is an application environment diagram of a nonlinear compensation method for analog-to-digital conversion acquisition accuracy in one embodiment;
[0050] Figure 2 This is a flowchart illustrating a nonlinear compensation method for analog-to-digital conversion acquisition accuracy in one embodiment.
[0051] Figure 3 This is a structural block diagram of a nonlinear compensation device for analog-to-digital conversion acquisition accuracy in one embodiment;
[0052] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0054] The nonlinear compensation method for analog-to-digital conversion acquisition accuracy provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Terminal 102 obtains the actual output value of the analog-to-digital converter (ADC); terminal 102 inputs the actual output value of the ADC into a 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 ADC based on 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 based on the standard input value and the corresponding output value of the ADC, and the fitting polynomial corresponding to the second interval is a fitting polynomial constructed by nonlinear interpolation based on the standard input value and the corresponding output value; wherein, the first interval is the interval adjacent to the numerical range of the standard input value, and the second interval is the interval within the numerical range of the standard input value. The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle systems, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. The server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0055] In one exemplary embodiment, such as Figure 2 As shown, a nonlinear compensation method for analog-to-digital conversion acquisition accuracy is provided, and this method is applied to... Figure 1 Taking terminal 102 as an example, the explanation includes:
[0056] Step S202: Obtain the actual output value of the analog-to-digital converter.
[0057] An analog-to-digital converter (ADC) is an electronic component that converts analog signals (such as voltage and current) into digital signals for signal processing in digital systems. The acquisition accuracy of an ADC refers to its ability to reproduce the true value of an analog signal when converting it to a digital signal; it reflects the magnitude of the error between the input and output signals.
[0058] The actual output value of the analog-to-digital converter is the digital output generated by the converter after acquiring the signal and processing it digitally. 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] The compensation model includes a fitting polynomial for the first interval and a fitting polynomial for the second interval. The fitting polynomial for the first interval is a fitting polynomial constructed by linear interpolation based on the standard input value and the corresponding output value of the analog-to-digital converter, and the fitting polynomial for the second interval is a fitting polynomial constructed by nonlinear interpolation based on the standard input value and the corresponding output value.
[0061] The first interval is the range adjacent to the standard input value's numerical range, and the second interval is the range within the standard input value's numerical range.
[0062] The compensated output value is the analog-to-digital converter output value after being corrected by the compensation model, which is used to approximate the real input signal as closely as possible and reduce acquisition errors.
[0063] The standard input value can be a preset analog signal value, which is usually used as a reference for calibrating and testing analog-to-digital converters, such as known voltage values like -5V, -2V, -1V, 0V, +1V, +2V, and +5V.
[0064] Among them, the fitting polynomial is a mathematical model used to describe the relationship between analog signals and digital signals. The fitting polynomial in different intervals is constructed by linear interpolation or nonlinear interpolation, reflecting the error characteristics of the analog-to-digital converter.
[0065] Linear interpolation refers to fitting data using the equation of a straight line between two points, and is suitable for intervals with relatively gentle changes and simple error patterns.
[0066] Nonlinear interpolation can refer to the use of complex curve fitting 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 that uses a smooth curve through a series of shape points to obtain the curve function by solving a system of three moment equations. Mathematically, it is implemented through piecewise cubic polynomials. In actual calculations, boundary conditions also need to be introduced to complete the calculation.
[0067] Here, an interval is a range of input values divided according to their numerical range. The first interval is the interval outside the numerical range of the standard input values but adjacent to the numerical range of the standard input values; the second interval is the interval within the numerical range of the standard input values. For example, assuming the standard input values are -5V, -2V, -1V, 0V, +1V, +2V, and +5V, then the first interval could be [-10V, -5V] or [5V, 10V], and the second interval could include multiple intervals composed of adjacent standard input values such as [-5V, -2V], [-2V, -1V], [-1V, 0V], [0V, +1V], [+1V, +2V], and [+2V, +5V].
[0068] In practice, the actual output value acquired by the analog-to-digital converter (ADC) 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 ADC. The compensation model determines whether the actual output value belongs to the first interval or the second interval based on its magnitude. If the actual output value is outside the range of the standard input value, it is determined to be in the first interval; if the actual output value is within the range of the standard input value, it is determined to be in the second interval. Based on the interval in which the actual output value is located, the corresponding fitting polynomial is called. The first interval (linear interpolation) describes the error change with a linear equation based on the standard input and output values, while 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] For example, when constructing the compensation model, the reference voltage VREF of the analog-to-digital converter (ADC) can be set to 5 volts (V). A standard voltage signal source is applied to each channel of the ADC, and the corresponding output values of the ADC under standard input values of -5V, -2V, -1V, 0V, +1V, +2V, and +5V are recorded. This reference voltage VREF is used to define the full-scale input range of the ADC. Then, the standard input values are divided into out-of-range (linear characteristics) and in-range (nonlinear characteristics), and different interpolation methods are used for each, improving the adaptability and accuracy of the compensation model.
[0070] To accurately compensate for the linear and nonlinear error characteristics of analog-to-digital converters (ADCs), a suitable fitting polynomial is constructed. Simple linear interpolation is used outside the range of small errors to reduce computational complexity, while nonlinear interpolation is used within the range of complex errors to improve compensation accuracy.
[0071] In the aforementioned nonlinear compensation method for analog-to-digital converter (ADC) acquisition accuracy, the actual output value of the ADC is obtained; the actual output value of the ADC is input into the compensation model; the compensation model calls the fitting polynomial corresponding to the interval where the actual output value is located; and the compensated output value of the ADC is determined based on 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 constructed using linear interpolation based on the standard input value and the corresponding output value of the ADC, and the fitting polynomial corresponding to the second interval is constructed using nonlinear interpolation based on the standard input value and the corresponding output value. The first interval is the interval adjacent to the numerical range of the standard input value, and the second interval is the interval within the numerical range of the standard input value. By employing 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, achieving accurate correction of complex nonlinear errors and improving the compensation accuracy of analog-to-digital conversion acquisition. Furthermore, by utilizing the piecewise compensation mechanism of multi-segment fitting polynomials, the compensation error of analog-to-digital conversion acquisition accuracy is greatly reduced while ensuring low computational complexity.
[0072] In another embodiment, the first interval includes the interval [x0, x1) and the interval [x7, x8]; x1 is the minimum value among multiple 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 multiple 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, Let x0 be the fitting polynomial for the interval [x0, x1). Let y0 be the fitting polynomial for the interval [x7, x8], y1 be the output value corresponding to x0, y7 be the output value corresponding to x7, and y8 be the output value corresponding to x8.
[0076] For example, assuming the standard input values are -5V, -2V, -1V, 0V, +1V, +2V, and +5V, then [x0, x1) can be [-10V, -5V), and [x7, x8] can be [5V, 10V]. x0 is the value offset by a preset difference from the minimum value among the standard input values; x8 is the value offset by a preset difference from the maximum value among the standard input values. By using linear interpolation on the intervals [x0, x1) and [x7, x8], the fitting polynomial corresponding to the first interval can be obtained.
[0077] The technical solution of this embodiment directly uses linear interpolation calculation in the compensation process of the boundary interval (first interval), avoiding complex nonlinear calculation operations. While ensuring basic accuracy, it reduces the real-time requirements of the compensation calculation, 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] Where, x i It can be any one of the 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.
[0081] For example, assuming the standard input values are -5V, -2V, -1V, 0V, +1V, +2V, and +5V, then seven corresponding output values, or seven data points, can be obtained. Therefore, six fitting polynomials can be generated. That is, 6 cubic polynomials. Cubic spline interpolation is used on the interval [x1, x7] to fit and generate... , , , , , .
[0082] The technical solution of this embodiment uses cubic polynomial fitting, which can better describe the nonlinear relationship between input and output, especially the complex error characteristics within the standard input range. The higher-order terms of the polynomial can effectively capture the curvature of the error curve, thereby improving the accuracy of compensation. By flexibly adjusting the polynomial coefficients, it can adapt to the error characteristics of different analog-to-digital converters. Through the cubic polynomial fitting model, a highly efficient, accurate and easy-to-implement nonlinear compensation method is provided for the error distribution characteristics of analog-to-digital converters 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 follows:
[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 condition for continuity of the derivative is expressed as:
[0088] ;
[0089] The boundary conditions are expressed as follows:
[0090] ;
[0091] in, , .
[0092] In practice, the data point fitting conditions can guarantee that each fitting polynomial In its corresponding interval [x i x i+1 The endpoints are precisely traversed through the data points. and This ensures the overall correctness of the fitting curve corresponding to the fitting polynomial, meaning that the fitting curve can accurately describe the relationship between the input and output.
[0093] In practice, the derivative continuity condition is used to ensure the continuity of the first and second derivatives of the fitted curve corresponding to the fitted polynomial. The first derivative, This is the second derivative. The continuity of the first derivative ensures that the fitted curve remains constant at the interval connection points. The slope continuity ensures the smoothness of the curve; the second derivative continuity ensures the continuity of the curvature of the fitted curve at the connection points, avoiding unnatural shape changes. The derivative continuity condition guarantees the continuity and smoothness of the fitted 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. k1 and k6 are preset derivative values (slopes) that represent the trend of the fitting curve at the boundary points.
[0095] The technical solution in this embodiment, through the combined effect of data point fitting conditions, derivative continuity conditions, and boundary conditions, constitutes a fitting curve model that satisfies high precision, high smoothness, and physical consistency, namely, an accurate compensation model.
[0096] In another embodiment, a i Represented as:
[0097] ;
[0098] b i Represented as:
[0099] ;
[0100] c i Represented as:
[0101] ;
[0102] d i Represented as:
[0103] ;
[0104] in, , M i It is determined through the parameter solving model;
[0105] The parametric solution model is expressed as follows:
[0106] .
[0107] For example, assuming the standard input values are -5V, -2V, -1V, 0V, +1V, +2V, and +5V, then seven corresponding output values, or seven data points, can be obtained. It can generate 6 fitting polynomials. Since each fitting polynomial Including 4 unknown polynomial coefficients, these 6 fitted polynomials This corresponds to 12 data point fitting conditions, 10 derivative continuity conditions, and 2 boundary conditions, resulting in a total of 24 unknown parameters. Therefore, let... , At this point, M is solved using a parametric solution model. 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, which are then substituted into the constructed fitting polynomial. The compensation model can then be obtained.
[0108] The technical solution in this embodiment uses a diagonal matrix structure to solve for polynomial coefficients, which can quickly complete parameter calculations with less computational resources and significantly reduce computational 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] This compensation model employs linear interpolation for compensation outside the standard input range (intervals [x0, x1) and [x7, x8]), which has low computational complexity and is suitable for the error characteristics of these boundary intervals, ensuring accuracy within these intervals. Within the standard input 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, thus significantly improving compensation accuracy. By combining linear interpolation and cubic polynomial fitting in different intervals, the model maintains the continuity of the first and second derivatives at interval boundaries, ensuring a smooth transition of the fitted curve. A smooth compensation curve can better reflect the changing characteristics of the real signal, avoiding errors introduced by sharp inflection points or discontinuities. By dividing the intervals, the complex cubic polynomial fitting is confined to the standard input range, while only simple linear interpolation calculations are required for the boundary intervals, reducing the overall computational complexity. This piecewise processing strategy is particularly suitable for embedded systems or real-time control scenarios, meeting the needs of resource-constrained environments. By designing different compensation strategies for each interval, this flexibility allows 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 in this embodiment addresses the issue that many analog-to-digital converter (ADC) chips exhibit non-linear error characteristics, resulting in large errors in the small-signal region and varying error levels across the entire input range. Traditional first-order linear compensation methods can lead to significant compensation errors in the ADC acquisition accuracy. To address this problem, a nonlinear compensation scheme that combines nonlinear least squares and piecewise interpolation methods is proposed. This scheme reduces computational complexity while maintaining a low error level.
[0114] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0115] Based on the same inventive concept, this application also provides a nonlinear compensation device for analog-to-digital conversion (ADC) acquisition accuracy to implement the aforementioned nonlinear compensation method for ADC acquisition accuracy. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the nonlinear compensation device for ADC acquisition accuracy provided below can be found in the limitations of the nonlinear compensation method for ADC acquisition accuracy described above, and will not be repeated here.
[0116] In one exemplary embodiment, such as Figure 3 As shown, a nonlinear compensation device for analog-to-digital conversion acquisition accuracy is provided, comprising:
[0117] The acquisition module 310 is used to acquire the 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 based on 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 by linear interpolation based on 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 based on the standard input value and the corresponding output value.
[0120] Wherein, the first interval is the interval of the adjacent range outside the numerical range of the standard input value, and the second interval is the interval within the numerical range of the standard input value.
[0121] In one embodiment, the first interval includes the interval [x0, x1) and the 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 The fitting polynomial corresponding to the interval [x0, x1) is... Let y0 be the fitting polynomial corresponding to the interval [x7, x8], y1 be the output value corresponding to x0, y7 be the output value corresponding to x7, and y8 be the output value corresponding to x8.
[0125] In one embodiment, the fitting polynomial corresponding to the second interval is expressed as:
[0126] ;
[0127] Where, x i It can be any one of the multiple standard input values; For the interval [x i x i+1 The corresponding fitting polynomial; the a i b i c i d i For the The polynomial coefficients.
[0128] In one embodiment, the fitting polynomials corresponding to the first interval and the fitting polynomials corresponding to the second interval satisfy the data point fitting condition, the derivative continuity condition, and the boundary condition.
[0129] The data point fitting condition is expressed as follows:
[0130] ;
[0131] Among them, y i For x i The corresponding output value, y i+1 For the x i+1 The corresponding output value;
[0132] The derivative continuity condition is expressed as:
[0133] ;
[0134] The boundary conditions are expressed as follows:
[0135] ;
[0136] in, , .
[0137] In one embodiment, the a i Represented as:
[0138] ;
[0139] The b i Represented as:
[0140] ;
[0141] The c i Represented as:
[0142] ;
[0143] The d i Represented as:
[0144] ;
[0145] in, , The M i It is determined through the parameter solving model;
[0146] The parameter solution model is expressed as follows:
[0147] .
[0148] In one embodiment, the compensation model is represented as:
[0149] .
[0150] Each module in the aforementioned nonlinear compensation device for analog-to-digital conversion acquisition accuracy can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0151] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a non-linear compensation method for analog-to-digital conversion acquisition accuracy. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0152] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0153] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0154] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0155] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[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, data stored, data displayed, 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 the relevant data must comply with relevant regulations.
[0157] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this 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. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0158] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A nonlinear compensation method for analog-to-digital conversion acquisition accuracy, characterized in that, The method includes: Obtain the actual output value of the analog-to-digital converter; The actual output value of the analog-to-digital converter is input into the compensation model. The compensation model calls the fitting polynomial corresponding to the interval where the actual output value is located. Based on the actual output value and the fitting polynomial, the compensated output value of the analog-to-digital converter is determined. The compensation model includes a fitting polynomial for a first interval and a fitting polynomial for a second interval. The fitting polynomial for the first interval is constructed by linear interpolation based on the standard input value and the corresponding output value of the analog-to-digital converter (ADC). The fitting polynomial for the second interval is constructed by nonlinear interpolation based on the standard input value and the corresponding output value. The standard input value and the corresponding output value are obtained by applying a standard voltage signal source to each channel of the ADC and recording the corresponding output value of the ADC under multiple standard input values. Among them, the fitting polynomials corresponding to the first interval and the fitting polynomials corresponding to the second interval satisfy the data point fitting condition, the derivative continuity condition and the boundary condition. The data point fitting condition is expressed as follows: ; Among them, y i For x i The corresponding output value, y i+1 For the x i+1 The corresponding output value; The derivative continuity condition is expressed as: ; The boundary conditions are expressed as follows: ; in, , ; Among them, the multiple standard input values are respectively , For any one of the plurality of standard input values, the The minimum value among the plurality of standard input values, The maximum value among the plurality of standard input values; Smaller than the And the With the The difference is a preset difference; the Smaller than the And the With the The difference is the preset difference value; For the The corresponding output value, For the The corresponding output value; Wherein, the first interval is the interval of the adjacent range outside the numerical range of the standard input value, the second interval is the interval within the numerical range of the standard input value, and the polynomial coefficients of the fitting polynomial corresponding to the second interval are obtained by constructing a parameter solution model based on the data point fitting conditions, the derivative continuity conditions and the boundary conditions, and by solving the parameter solution model.
2. The method according to claim 1, characterized in that, The first interval includes the interval [x0, x1) and the interval [x7, x8]; The fitting polynomial corresponding to the first interval is expressed as: ; Among them, the The fitting polynomial corresponding to the interval [x0, x1) is... Let y0 be the fitting polynomial corresponding to the interval [x7, x8], y1 be the output value corresponding to x0, y7 be the output value corresponding to x7, and y8 be 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: ; Where, x i It can be any one of the multiple standard input values; For the interval [x i x i+1 The corresponding fitting polynomial; the a i b i c i d i For the The polynomial coefficients.
4. The method according to claim 3, characterized in that, The a i Represented as: ; The b i Represented as: ; The c i Represented as: ; The d i Represented as: ; in, , The M i It is determined through the parameter solving model; The parameter solution model is expressed as follows: 。 5. The method according to claim 4, characterized in that, The compensation model is expressed as follows: 。 6. A nonlinear compensation device for analog-to-digital conversion acquisition accuracy, characterized in that, The device includes: The acquisition module is used to acquire the actual output value of the analog-to-digital converter; The compensation module 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 based on the actual output value and the fitting polynomial. The compensation model includes a fitting polynomial for a first interval and a fitting polynomial for a second interval. The fitting polynomial for the first interval is constructed by linear interpolation based on the standard input value and the corresponding output value of the analog-to-digital converter (ADC). The fitting polynomial for the second interval is constructed by nonlinear interpolation based on the standard input value and the corresponding output value. The standard input value and the corresponding output value are obtained by applying a standard voltage signal source to each channel of the ADC and recording the corresponding output value of the ADC under multiple standard input values. Among them, the fitting polynomials corresponding to the first interval and the fitting polynomials corresponding to the second interval satisfy the data point fitting condition, the derivative continuity condition and the boundary condition. The data point fitting condition is expressed as follows: ; Among them, y i For x i The corresponding output value, y i+1 For the x i+1 The corresponding output value; The derivative continuity condition is expressed as: ; The boundary conditions are expressed as follows: ; in, , ; Among them, the multiple standard input values are respectively , For any one of the plurality of standard input values, the The minimum value among the plurality of standard input values, The maximum value among the plurality of standard input values; Smaller than the And the With the The difference is a preset difference; the Smaller than the And the With the The difference is the preset difference value; For the The corresponding output value, For the The corresponding output value; Wherein, the first interval is the interval of the adjacent range outside the numerical range of the standard input value, the second interval is the interval within the numerical range of the standard input value, and the polynomial coefficients of the fitting polynomial corresponding to the second interval are obtained by constructing a parameter solution model based on the data point fitting conditions, the derivative continuity conditions and the boundary conditions, and by solving the parameter solution model.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Analog-to-digital conversion module, and transfer function compensation device and method
CN104980153A
