CN112667971A - Level error correction method, level error correction device, computer equipment and storage medium - Google Patents
Level error correction method, level error correction device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN112667971A CN112667971A CN202110282207.2A CN202110282207A CN112667971A CN 112667971 A CN112667971 A CN 112667971A CN 202110282207 A CN202110282207 A CN 202110282207A CN 112667971 A CN112667971 A CN 112667971A
- Authority
- CN
- China
- Prior art keywords
- level
- preset
- correction
- linear regression
- error
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Detection And Correction Of Errors (AREA)
Abstract
The present application relates to a level error correction method, apparatus, computer device, and storage medium, wherein the level error correction method includes: acquiring an initial correction set; obtaining a linear regression equation based on the initial correction set; obtaining an error value based on the initial correction set and the linear regression equation; comparing the error value with a preset error value; if the error value is smaller than the preset error value, correcting the preset level to be calibrated based on the linear regression equation; and if the error value is larger than the preset error value, turning to the step of obtaining a linear regression equation based on the initial correction set. According to the level error correction method, the level error correction device, the computer equipment and the storage medium, the error value is compared with the preset error value, the correction set with a smaller range is determined again based on the comparison result, the linear regression equations in different ranges are determined in an iterative mode, and the correction accuracy is improved.
Description
Technical Field
The present application relates to the field of digital testing technologies, and in particular, to a level error correction method, apparatus, computer device, and storage medium.
Background
In order to improve the integration level of a digital test channel, the design idea of the traditional digital board card is as follows: the digital test function is realized by the FPGA and a special PE (PE) (Pin electronic) chip, and then the digital test function can be realized by a peripheral power supply, an ADDA chip and the like. Therefore, the output accuracy of the digital test board card depends on the resolution and accuracy of the DAC of the PE chip on one hand and also depends on the circuit design of the digital test board card on the other hand, including the selection and design of the power supply of the PE chip, the design of an ADDA related circuit and a PCB.
The digital test board needs to improve the stability and precision of the channel through a calibration algorithm due to the limitation of the resolution and precision of the special PE chip and the ADDA chip. Most calibration algorithms approach the accuracy limit of hardware by calculating Gain and Offset of each channel, but the overall correction accuracy is poor.
At present, no effective solution is provided for the problem of poor level correction precision of a digital test system in the related art.
Disclosure of Invention
The embodiment of the application provides a level error correction method, a level error correction device, computer equipment and a storage medium, so as to at least solve the problem of poor level correction precision of a digital test system in the related art.
In a first aspect, an embodiment of the present application provides a level error correction method, including:
acquiring an initial correction set, wherein the initial correction set comprises a preset level and a corresponding actual output level;
obtaining a linear regression equation based on the initial correction set;
obtaining an error value based on the initial correction set and the linear regression equation;
comparing the error value with a preset error value;
if the error value is smaller than the preset error value, correcting the preset level to be calibrated based on the linear regression equation;
if the error value is greater than the preset error value, acquiring a preset level and an actual output level corresponding to the error value, acquiring a first correction set based on the preset level and the actual output level, wherein the first correction set belongs to the initial correction set, and turning to a step of acquiring a linear regression equation based on the initial correction set by taking the first correction set as the initial correction set.
In some of these embodiments, said obtaining a linear regression equation based on said initial set of corrections comprises:
establishing an ideal linear regression model of a preset level and a theoretical output level;
solving the ideal linear regression model based on the actual output level and the theoretical output level to obtain linear regression parameters;
and obtaining the linear regression equation based on the linear regression parameters and an ideal linear regression model.
In some embodiments, the comparing the error value with a preset error value further comprises:
sorting the initial correction set based on the size of a preset level, and binding the actual output level with the corresponding preset level to form a numerical value pair;
on the basis of the sorting result, sequentially selecting a preset number of value pairs in the initial correction set as a first set by taking the value pair with the preset level as the minimum value as a starting point, wherein the value pairs except the first set in the initial correction set are a second set;
taking the numerical value pair with the maximum preset level in the first set as a starting point, and sequentially comparing error values corresponding to the numerical value pairs in the first set with preset error values;
and taking the numerical value pair with the minimum preset level in the second set as a starting point, and sequentially comparing error values corresponding to the numerical value pairs in the second set with preset error values.
In some embodiments, the obtaining a preset level and an actual output level corresponding to the error value if the error value is greater than the preset error value further includes:
if the error value of the numerical value pair is larger than the preset error value, acquiring the numerical value pair corresponding to the error value as a deviation numerical value pair;
if the deviation value pair belongs to the first set, selecting a value pair of which the preset level is smaller than the preset level of the deviation value pair in the first set as a first correction set;
and if the deviation value pair belongs to the second set, selecting a value pair of which the preset level is greater than the preset level of the deviation value pair in the second set as a first correction set.
In some embodiments, the step of obtaining a linear regression equation based on the initial correction set with the first correction set as the initial correction set comprises:
and taking the first correction set as an initial correction set, and turning to the step of obtaining a linear regression equation based on the initial correction set for iteration until all error values in the initial correction set are smaller than preset error values.
In some embodiments, the step of obtaining a linear regression equation based on the initial correction set with the first correction set as the initial correction set further comprises:
if the deviation value pair belongs to the first set, binding a value pair of the preset level in the first set, which is greater than the preset level of the deviation value pair, with a corresponding linear regression equation to obtain first correction data;
and if the deviation value pair belongs to the second set, binding a value pair of which the preset level is smaller than the preset level of the deviation value pair in the second set with a corresponding linear regression equation to obtain second correction data.
In some embodiments, if the error value is smaller than the preset error value, the correcting the preset level to be calibrated based on the linear regression equation includes:
storing the first correction data in a first storage area and the second correction data in a second storage area;
acquiring a preset level to be calibrated, and comparing the preset level to be calibrated with the preset levels of the first correction data and the second correction data respectively to acquire a corresponding linear correction equation;
correcting the preset level to be calibrated based on the linear correction equation to obtain a corrected level;
and sending the correction level to a level output chip.
In a second aspect, an embodiment of the present application provides a level error correction apparatus, including:
the device comprises a set acquisition module, a correction module and a correction module, wherein the set acquisition module is used for acquiring an initial correction set, and the initial correction set comprises a preset level and an actual output level;
a linear regression equation determination module for obtaining a linear regression equation based on the initial correction set;
an error value obtaining module, configured to obtain an error value based on the initial correction set and the linear regression equation;
the comparison module is used for comparing the error value with a preset error value;
the correction module is used for correcting the preset level to be calibrated based on the linear regression equation if the error value is smaller than the preset error value;
and the iteration module is used for acquiring a preset level and an actual output level corresponding to the error value if the error value is greater than the preset error value, acquiring a first correction set based on the preset level and the actual output level, wherein the first correction set belongs to the initial correction set, taking the first correction set as the initial correction set, and turning to the step of acquiring a linear regression equation based on the initial correction set.
In a third aspect, an embodiment of the present application provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the level error correction method according to the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the level error correction method according to the first aspect.
Compared with the related art, the level error correction method, the level error correction device, the computer equipment and the storage medium provided by the embodiment of the application have the advantages that an initial correction set is obtained, and the initial correction set comprises a preset level and a corresponding actual output level; obtaining a linear regression equation based on the initial correction set; obtaining an error value based on the initial correction set and the linear regression equation; comparing the error value with a preset error value; if the error value is smaller than the preset error value, correcting the preset level to be calibrated based on the linear regression equation; if the error value is greater than the preset error value, acquiring a preset level and an actual output level corresponding to the error value, acquiring a first correction set based on the preset level and the actual output level, wherein the first correction set belongs to the initial correction set, taking the first correction set as the initial correction set, turning to a mode of acquiring a linear regression equation based on the initial correction set, iteratively determining linear regression equations in different ranges by comparing the error value with the preset error value and re-determining a correction set with a smaller range based on a comparison result, so that the correction precision is improved, and the problem of poor level correction precision of a digital test system in the related art is solved.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a block diagram of a digital test board according to a level error correction method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a level error correction method of a conventional digital test system;
FIG. 3 is a flow chart illustrating a level output of a conventional digital test system;
FIG. 4 is a flowchart illustrating a level error correction method according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a level error correction method according to another embodiment of the present invention;
FIG. 6 is a block diagram of a level error correction apparatus according to an embodiment of the present invention;
fig. 7 is a schematic hardware structure diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.
It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as referred to herein means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
Referring to fig. 1, fig. 1 is a block diagram of a digital test board for a level error correction method according to an embodiment of the invention. The digital test board card mainly comprises a master-slave FPGA module, a PE chip module and a peripheral power supply. The main FPGA is responsible for communicating with a system bus, controlling and monitoring the power supply of the slave FPGA and the power supply of the PE chip, and the main FPGA controls the calibration module to calibrate the level of the PE chip. The slave FPGA mainly realizes the logic control function of digital test and transmits signals to the PE chip to realize output. The PE chip can realize the setting of voltage and current for driving high and low levels, higher low levels, PMU functions and the like, which all belong to the level calibration range.
Referring to fig. 2 and 3, fig. 2 is a flow chart illustrating a level error correction method of a conventional digital test system, and fig. 3 is a flow chart illustrating a level output of the conventional digital test system. The PC software sets the output level of each channel of the digital test board card through the level control module. When the digital board card is in the calibration mode, the calibration module on the digital board card can output data through the ADC test channel, the data are sent back to the PC software data acquisition module, calibration is carried out according to the data obtained by testing and a calibration algorithm, and the calculated calibration value is written into the calibration data storage module on the slave. When the slave FPGA is in the channel output mode, the slave FPGA calculates each channel setting value according to the calibration data, and sends the channel setting value to the PE chip for output.
Through a large number of tests on the digital level, the fact that the linearity of the level is poor is found, the result is difficult to calibrate back in a linear calibration algorithm, and the overall correction precision is poor.
Referring to fig. 4, fig. 4 is a flowchart illustrating a level error correction method according to an embodiment of the invention.
In this embodiment, the level error correction method includes:
s401, an initial correction set is obtained, wherein the initial correction set comprises a preset level and a corresponding actual output level.
Illustratively, the preset level is an output level set by a user, and the actual output level is a real output level obtained by collection. It will be appreciated that the initial correction set comprises a plurality of sets of preset levels and corresponding actual output levels.
S402, acquiring a linear regression equation based on the initial correction set.
Exemplarily, assuming that the preset level and the corrected output level conform to a linear regression equation, a linear regression equation including an unknown number is established with the preset level and the corrected output level as arguments, an error between the actual output level and the corrected output level is set to be minimum, and the unknown number is solved to obtain the linear regression equation.
And S403, obtaining an error value based on the initial correction set and the linear regression equation.
Illustratively, the corrected output level is obtained based on a preset level and a linear regression equation, and the error value is obtained based on the corrected output level and an actual output level.
S404, comparing the error value with a preset error value.
It can be understood that the preset error value is a threshold value set by the user and required for the error value, and if the error value is smaller than the preset error value, the user requirement is met; and if the error value is greater than the preset error value, the user requirement is not met.
S405, if the error value is smaller than the preset error value, correcting the preset level to be calibrated based on the linear regression equation.
It can be understood that, if the error value is smaller than the preset error value, it indicates that the error value of the actual output level obtained based on the linear regression equation through correction meets the user requirement, so that the corresponding linear regression equation is retained to correct the preset level in the corresponding range to obtain the corrected level, so that the actual output level output based on the corrected level meets the requirement of the preset error value.
S406, if the error value is greater than the preset error value, acquiring a preset level and an actual output level corresponding to the error value, acquiring a first correction set based on the preset level and the actual output level, wherein the first correction set belongs to the initial correction set, and turning to the step of acquiring the linear regression equation based on the initial correction set by using the first correction set as the initial correction set.
Illustratively, if the error value is greater than the preset error value, it indicates that the error value of the actual output level obtained based on the linear regression equation correction does not meet the user requirement, and the linear regression equation does not meet the requirement, so the linear regression equation needs to be determined again. It will be appreciated that the correction set, which is a subset of the initial correction set, is re-determined based on the preset level corresponding to the error value and the actual output level, and the linear regression equation is re-determined based on the correction set in a smaller range to improve the accuracy of the linear regression equation and reduce the error between the actual output level and the preset level to meet the user requirement for the error value.
According to the level error correction method, an initial correction set is obtained, and the initial correction set comprises a preset level and a corresponding actual output level; acquiring a linear regression equation based on the initial correction set; obtaining an error value based on the initial correction set and the linear regression equation; comparing the error value with a preset error value; if the error value is smaller than the preset error value, correcting the preset level to be calibrated based on the linear regression equation; if the error value is larger than the preset error value, acquiring a preset level and an actual output level corresponding to the error value, acquiring a first correction set based on the preset level and the actual output level, wherein the first correction set belongs to the initial correction set, taking the first correction set as the initial correction set, turning to a method of acquiring a linear regression equation based on the initial correction set, iteratively determining linear regression equations in different ranges by comparing the error value with the preset error value and re-determining a correction set with a smaller range based on a comparison result, so that the correction precision is improved, and the problem that the level correction precision of a digital test system in the related technology is poor is solved.
In another embodiment, obtaining the linear regression equation based on the initial set of corrections includes the steps of:
step 1, establishing an ideal linear regression model of a preset level and a theoretical output level.
And 2, solving the ideal linear regression model based on the actual output level and the theoretical output level to obtain linear regression parameters.
And 3, obtaining a linear regression equation based on the linear regression parameters and the ideal linear regression model.
Illustratively, first, a desired level X is set, and a real output level Y is collected, and a calibration test value set is obtained as:
first, assume that the test values conform to a linear regression equationThen, an ideal linear regression model is establishedThe error between the true output level and the corrected output level is calculated as follows:
it will be appreciated that it is desirable to minimize the error, even if e is taken to a minimum, so that the error is derived to give the following system of equations:
values for a and b can be calculated by substituting the set of calibration test values into the system of equations.
In another embodiment, comparing the error value with the preset error value further comprises the following steps:
step 1, sequencing the initial correction set based on the size of a preset level, and binding an actual output level with a corresponding preset level to form a numerical value pair.
And 2, based on the sequencing result, sequentially selecting a preset number of value pairs in the initial correction set as a first set by taking the value pair with the preset level as the minimum value as a starting point, wherein the value pairs except the first set in the initial correction set are a second set.
And 3, taking the numerical value pair with the maximum preset level in the first set as a starting point, and sequentially comparing error values corresponding to the numerical value pairs in the first set with preset error values.
And 4, taking the numerical value pair with the minimum preset level in the second set as a starting point, and sequentially comparing error values corresponding to the numerical value pairs in the second set with preset error values.
Illustratively, the actual output level is mapped toThe preset levels are bound to form a numerical value pair, the numerical value pair is sorted based on the size of the preset levels, and the sorted numerical value pair is segmented into two parts. It can be understood that it is only necessary to ensure that each part has not less than 3 pairs of number values, which can be used to determine the linear regression equation. Preferably, the value pairs in the initial correction set are equally divided into two parts. In particular, the test value set is calibratedIs divided into two parts, which are respectively a first setAnd a second setTwo parts fromDot sumAnd (4) sequentially calculating the error value of each numerical value pair from the beginning, and respectively comparing the error values with the preset error value.
In another embodiment, if the error value is greater than the predetermined error value, the step of obtaining the predetermined level and the actual output level corresponding to the error value further includes the following steps:
step 1, if the error value of the numerical value pair is larger than the preset error value, obtaining the numerical value pair corresponding to the error value as a deviation numerical value pair.
And 2, if the deviation value pair belongs to the first set, selecting a value pair with a preset level smaller than that of the deviation value pair in the first set as a first correction set.
And 3, if the deviation value pair belongs to the second set, selecting a value pair with a preset level larger than that of the deviation value pair in the second set as a first correction set.
Illustratively, fromDot sumCalculating the error value of each numerical value pair in sequence, and comparing the error value with the preset error value respectively, so that if the deviation numerical value pair belongs to the first set, the numerical value pairs with the preset level higher than the deviation numerical value pair are compared, and the error values are smaller than the preset error value; similarly, if the deviation value pair belongs to the second set, the value pairs with the preset level smaller than the deviation value pair are compared, and the error values are smaller than the preset error value. Therefore, the value pair of the preset level in the first set, in which the preset level is smaller than the preset level of the deviation value pair, or the value pair of the preset level in the second set, in which the preset level is greater than the preset level of the deviation value pair, is selected as a new correction set to obtain the linear regression equation. In particular, for preset levels less thanPairs of values, e.g.If the calculated error is greater than the preset error, the test value set is usedRecalculating the linear regression equation by using the step S402 to obtain. For a preset level greater thanPairs of values, e.g.If the calculated error is greater than the preset error, the test value set is usedRecalculating the linear regression equation by using the step S402 to obtain。
In another embodiment, with the first correction set as the initial correction set, the step of obtaining the linear regression equation based on the initial correction set further comprises the steps of: and taking the first correction set as an initial correction set, and turning to the step of obtaining a linear regression equation based on the initial correction set for iteration until all error values in the initial correction set are smaller than preset error values.
It can be understood that, when all the error values in the initial correction set are smaller than the preset error values, it indicates that each preset electric average in the initial correction set can meet the user requirement under the correction of the corresponding linear regression equation, and the correction target is completed.
In another embodiment, the step of obtaining the linear regression equation based on the initial correction set further comprises the following steps before the step of taking the first correction set as the initial correction set:
step 1, if the deviation value pair belongs to the first set, binding a value pair of a preset level in the first set, wherein the preset level is greater than the deviation value pair, with a corresponding linear regression equation to obtain first correction data.
And 2, if the deviation value pair belongs to the second set, binding the value pair with the preset level, of which the preset level is smaller than the deviation value pair, in the second set with the corresponding linear regression equation to obtain second correction data.
Exemplarily, useComputingErrors of aggregation fromIs calculated downwards ifIf the calculated error is larger than the preset error, the subset is selectedRecalculating the linear regression equation by using the step S402 to obtain. Repeating the steps untilUntil the error meets the requirement, finally obtaining a group of first correction data。
Use ofComputingErrors of aggregation fromCalculate upwards ifIf the calculation error is larger than the preset error, the subset is selectedRecalculating the linear regression equation by using the step S402 to obtain. Repeating the steps untilUntil the error of (2) meets the requirement, finally obtaining a group of second correction data。
It can be understood that the first correction data and the second correction data both include a combination of a plurality of sets of preset levels and parameters of the linear regression equation, and the parameters of each set of linear regression equation correspond to the preset levels in a certain range, that is, the linear regression equation corresponding to each set of parameters can correct the preset levels in the certain range, so that an error value between the corrected output level and the preset level is smaller than a preset error value, that is, a requirement of a user on the level precision is met. Illustratively, in the embodiment, a piecewise correction mode is adopted to correct the linear regression equation corresponding to the preset electric average setting in each piecewise range, so that the correction precision is higher.
In another embodiment, if the error value is smaller than the predetermined error value, the calibrating the predetermined level based on the linear regression equation comprises the following steps:
step 1, storing first correction data in a first storage area, and storing second correction data in a second storage area;
step 2, acquiring a preset level to be calibrated, comparing the preset level to be calibrated with the preset levels of the first correction data and the second correction data respectively, and acquiring a corresponding linear correction equation;
step 3, correcting the preset level to be calibrated based on a linear correction equation to obtain a corrected level;
and 4, sending the correction level to a level output chip.
Illustratively, the correction data is divided into two portions, the first portion storing less thanThe second part stores data greater thanThe data of (1). And storing according to a 32bit format, taking three values of X, a and b every time, and performing subsequent calculation. Referring to table 1 and table 2, table 1 shows the first correction data, and table 2 shows the second correction data.
TABLE 1
TABLE 2
Illustratively, if the predetermined level to be corrected isThe level correction procedure is as follows:
obtaining from the first correction dataWill beAndmaking a comparison ifIs less thanThen will beContinue andcompare if, ifIs greater thanThen usePerforming calibration ifIs less thanAnd continuing to compare with the next preset level until the corresponding linear regression equation parameters are obtained and correcting.
If it is notIs greater thanThen will beAndcompare if, ifIs less thanThen usePerforming calibration ifIs greater thanThen continue with the next predictionAnd setting the level for comparison until the corresponding linear regression equation parameters are obtained, and correcting.
It can be understood that each digital channel performs parallel computation to obtain the preset level to be correctedCorrection value ofAnd sending the data to the PE chip for output.
The embodiment stores the correction data in a segmented storage mode, segmented correction can be performed during correction, each digital channel can be calculated in parallel, and correction efficiency is improved.
Referring to fig. 5, fig. 5 is a flowchart illustrating a level error correction method according to another embodiment of the invention.
In this embodiment, an initial correction set is obtained first, then linear fitting is performed on the initial correction set to obtain a linear regression equation, then the initial correction set is segmented, and whether a preset level is greater than a median of preset levels in the initial correction set is determinedIf the predetermined level is greater thanThen toSequentially calculating an error value of each numerical value pair upwards as a starting point, judging whether the error value is greater than a preset error value or not, if the error value is greater than the preset error value, selecting a subset from the initial correction set based on the position of the numerical value pair corresponding to the error value, performing linear fitting based on the subset to obtain a linear regression equation, continuing to judge the error value, and if the error value is greater than the preset error value, continuing to iterate until the error value is greater than the preset error valueIf the error values of all the above numerical value pairs are smaller than the preset error value, writing the preset level and the corresponding linear regression equation parameter as correction data into a storage area; if the preset level is less thanThen toSequentially calculating an error value of each numerical value pair downwards as a starting point, judging whether the error value is greater than a preset error value or not, if the error value is greater than the preset error value, selecting a subset from the initial correction set based on the position of the numerical value pair corresponding to the error value, performing linear fitting based on the subset to obtain a linear regression equation, continuing to judge the error value, and if the error value is greater than the preset error value, continuing to iterate until the error value is greater than the preset error valueAnd if the error values of all the downward numerical value pairs are smaller than the preset error value, writing the preset level and the corresponding linear regression equation parameter as the correction data into the storage area.
It should be noted that the steps illustrated in the above-described flow diagrams or in the flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order different than here.
The present embodiment further provides a level error correction apparatus, which is used to implement the foregoing embodiments and preferred embodiments, and the description of the level error correction apparatus is omitted for brevity. As used hereinafter, the terms "module," "unit," "subunit," and the like may implement a combination of software and/or hardware for a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 6 is a block diagram of a level error correction apparatus according to an embodiment of the present application, and as shown in fig. 6, the apparatus includes:
the set obtaining module 10 is configured to obtain an initial correction set, where the initial correction set includes a preset level and an actual output level.
And a linear regression equation determining module 20 for obtaining a linear regression equation based on the initial correction set.
The linear regression equation determination module 20 is further configured to:
establishing an ideal linear regression model of a preset level and a theoretical output level;
solving the ideal linear regression model based on the actual output level and the theoretical output level to obtain linear regression parameters;
and obtaining a linear regression equation based on the linear regression parameters and the ideal linear regression model.
An error value obtaining module 30 is configured to obtain an error value based on the initial correction set and the linear regression equation.
The comparison module 40 is configured to compare the error value with a preset error value.
The alignment module 40 is further configured to:
sorting the initial correction set based on the size of a preset level, and binding an actual output level with a corresponding preset level to form a numerical value pair;
on the basis of the sequencing result, taking the value pair with the preset level as the minimum value as a starting point, sequentially selecting the value pairs with the preset number in the initial correction set as a first set, and taking the value pairs except the first set in the initial correction set as a second set;
taking the numerical value pair with the maximum preset level in the first set as a starting point, and sequentially comparing error values corresponding to the numerical value pairs in the first set with preset error values;
and taking the numerical value pair with the minimum preset level in the second set as a starting point, and sequentially comparing error values corresponding to the numerical value pairs in the second set with preset error values.
And the correcting module 50 is configured to correct the preset level to be calibrated based on the linear regression equation if the error value is smaller than the preset error value.
A correction module 50, further configured to:
storing the first correction data in the first storage area and the second correction data in the second storage area;
acquiring a preset level to be calibrated, and comparing the preset level to be calibrated with the preset levels of the first correction data and the second correction data respectively to acquire a corresponding linear correction equation;
correcting the preset level to be calibrated based on a linear correction equation to obtain a corrected level;
the correction level is sent to the level output chip.
The iteration module 60 is configured to, if the error value is greater than the preset error value, obtain a preset level and an actual output level corresponding to the error value, obtain a first correction set based on the preset level and the actual output level, where the first correction set belongs to the initial correction set, use the first correction set as the initial correction set, and go to a step of obtaining a linear regression equation based on the initial correction set.
An iteration module 60, further configured to:
if the error value of the numerical value pair is larger than the preset error value, acquiring the numerical value pair corresponding to the error value as a deviation numerical value pair;
if the deviation value pair belongs to the first set, selecting a value pair with a preset level smaller than that of the deviation value pair in the first set as a first correction set;
and if the deviation value pair belongs to the second set, selecting a value pair with a preset level in the second set larger than the preset level of the deviation value pair as a first correction set.
The iteration module 60 is further configured to take the first correction set as an initial correction set, and go to a step of obtaining a linear regression equation based on the initial correction set to perform iteration until all error values in the initial correction set are smaller than preset error values.
The level error correction apparatus further includes: and a correction data acquisition module.
A correction data acquisition module to:
if the deviation value pair belongs to the first set, binding a value pair of a preset level of which the preset level is greater than the deviation value pair in the first set with a corresponding linear regression equation to obtain first correction data;
and if the deviation value pair belongs to the second set, binding the value pair with the preset level, of which the preset level is smaller than the deviation value pair, in the second set with the corresponding linear regression equation to obtain second correction data.
The above modules may be functional modules or program modules, and may be implemented by software or hardware. For a module implemented by hardware, the modules may be located in the same processor; or the modules can be respectively positioned in different processors in any combination.
In addition, the level error correction method of the embodiment of the present application described in conjunction with fig. 1 may be implemented by a computer device. Fig. 7 is a hardware structure diagram of a computer device according to an embodiment of the present application.
The computer device may comprise a processor 71 and a memory 72 in which computer program instructions are stored.
Specifically, the processor 71 may include a Central Processing Unit (CPU), or A Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of the embodiments of the present Application.
The memory 72 may be used to store or cache various data files that need to be processed and/or used for communication, as well as possible computer program instructions executed by the processor 71.
The processor 71 reads and executes computer program instructions stored in the memory 72 to implement any one of the level error correction methods in the above-described embodiments.
In some of these embodiments, the computer device may also include a communication interface 73 and a bus 70. As shown in fig. 7, the processor 71, the memory 72, and the communication interface 73 are connected via the bus 70 to complete mutual communication.
The communication interface 73 is used for realizing communication among modules, devices, units and/or equipment in the embodiment of the present application. The communication interface 73 may also enable communication with other components such as: the data communication is carried out among external equipment, image/data acquisition equipment, a database, external storage, an image/data processing workstation and the like.
The bus 70 comprises hardware, software, or both that couple the components of the computer device to one another. Bus 70 includes, but is not limited to, at least one of the following: data Bus (Data Bus), Address Bus (Address Bus), Control Bus (Control Bus), Expansion Bus (Expansion Bus), and Local Bus (Local Bus). By way of example, and not limitation, Bus 70 may include an Accelerated Graphics Port (AGP) or other Graphics Bus, an Enhanced Industry Standard Architecture (EISA) Bus, a Front-Side Bus (FSB), a Hyper Transport (HT) Interconnect, an ISA (ISA) Bus, an InfiniBand (InfiniBand) Interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a microchannel Architecture (MCA) Bus, a PCI (Peripheral Component Interconnect) Bus, a PCI-Express (PCI-X) Bus, a Serial Advanced Technology Attachment (SATA) Bus, a Video Electronics Bus (audio Electronics Association), abbreviated VLB) bus or other suitable bus or a combination of two or more of these. Bus 70 may include one or more buses, where appropriate. Although specific buses are described and shown in the embodiments of the application, any suitable buses or interconnects are contemplated by the application.
The computer device may execute the level error correction method in the embodiment of the present application based on the acquired computer program instruction, thereby implementing the level error correction method described in conjunction with fig. 1.
In addition, in combination with the level error correction method in the foregoing embodiments, the embodiments of the present application may be implemented by providing a computer-readable storage medium. The computer readable storage medium having stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the level error correction methods in the above embodiments.
According to the level error correction method, the level error correction device, the computer equipment and the storage medium, an initial correction set is obtained, and the initial correction set comprises a preset level and a corresponding actual output level; acquiring a linear regression equation based on the initial correction set; obtaining an error value based on the initial correction set and the linear regression equation; comparing the error value with a preset error value; if the error value is smaller than the preset error value, correcting the preset level to be calibrated based on the linear regression equation; if the error value is larger than the preset error value, acquiring a preset level and an actual output level corresponding to the error value, acquiring a first correction set based on the preset level and the actual output level, wherein the first correction set belongs to the initial correction set, taking the first correction set as the initial correction set, turning to a method of acquiring a linear regression equation based on the initial correction set, iteratively determining linear regression equations in different ranges by comparing the error value with the preset error value and re-determining a correction set with a smaller range based on a comparison result, so that the correction precision is improved, and the problem that the level correction precision of a digital test system in the related technology is poor is solved.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
1. A method of level error correction, comprising:
acquiring an initial correction set, wherein the initial correction set comprises a preset level and a corresponding actual output level;
obtaining a linear regression equation based on the initial correction set;
obtaining an error value based on the initial correction set and the linear regression equation;
comparing the error value with a preset error value;
if the error value is smaller than the preset error value, correcting the preset level to be calibrated based on the linear regression equation;
if the error value is greater than the preset error value, acquiring a preset level and an actual output level corresponding to the error value, acquiring a first correction set based on the preset level and the actual output level, wherein the first correction set belongs to the initial correction set, and turning to a step of acquiring a linear regression equation based on the initial correction set by taking the first correction set as the initial correction set.
2. The method of claim 1, wherein the obtaining a linear regression equation based on the initial set of corrections comprises:
establishing an ideal linear regression model of a preset level and a theoretical output level;
solving the ideal linear regression model based on the actual output level and the theoretical output level to obtain linear regression parameters;
and obtaining the linear regression equation based on the linear regression parameters and an ideal linear regression model.
3. The method as claimed in claim 1, wherein the comparing the error value with a predetermined error value further comprises:
sorting the initial correction set based on the size of a preset level, and binding the actual output level with the corresponding preset level to form a numerical value pair;
on the basis of the sorting result, sequentially selecting a preset number of value pairs in the initial correction set as a first set by taking the value pair with the preset level as the minimum value as a starting point, wherein the value pairs except the first set in the initial correction set are a second set;
taking the numerical value pair with the maximum preset level in the first set as a starting point, and sequentially comparing error values corresponding to the numerical value pairs in the first set with preset error values;
and taking the numerical value pair with the minimum preset level in the second set as a starting point, and sequentially comparing error values corresponding to the numerical value pairs in the second set with preset error values.
4. The method as claimed in claim 3, wherein if the error value is greater than the predetermined error value, obtaining a predetermined level and an actual output level corresponding to the error value, and obtaining the first correction set based on the predetermined level and the actual output level further comprises:
if the error value of the numerical value pair is larger than the preset error value, acquiring the numerical value pair corresponding to the error value as a deviation numerical value pair;
if the deviation value pair belongs to the first set, selecting a value pair of which the preset level is smaller than the preset level of the deviation value pair in the first set as a first correction set;
and if the deviation value pair belongs to the second set, selecting a value pair of which the preset level is greater than the preset level of the deviation value pair in the second set as a first correction set.
5. The method according to claim 4, wherein the step of obtaining a linear regression equation based on the initial correction set with the first correction set as the initial correction set comprises:
and taking the first correction set as an initial correction set, and turning to the step of obtaining a linear regression equation based on the initial correction set for iteration until all error values in the initial correction set are smaller than preset error values.
6. The method according to claim 4, wherein said step of obtaining a linear regression equation based on said initial correction set with said first correction set as said initial correction set further comprises:
if the deviation value pair belongs to the first set, binding a value pair of the preset level in the first set, which is greater than the preset level of the deviation value pair, with a corresponding linear regression equation to obtain first correction data;
and if the deviation value pair belongs to the second set, binding a value pair of which the preset level is smaller than the preset level of the deviation value pair in the second set with a corresponding linear regression equation to obtain second correction data.
7. The method according to claim 6, wherein the correcting the preset level to be calibrated based on the linear regression equation comprises:
storing the first correction data in a first storage area and the second correction data in a second storage area;
acquiring a preset level to be calibrated, and comparing the preset level to be calibrated with the preset levels of the first correction data and the second correction data respectively to acquire a corresponding linear correction equation;
correcting the preset level to be calibrated based on the linear correction equation to obtain a corrected level;
and sending the correction level to a level output chip.
8. A level error correction apparatus, comprising:
the device comprises a set acquisition module, a correction module and a correction module, wherein the set acquisition module is used for acquiring an initial correction set, and the initial correction set comprises a preset level and an actual output level;
a linear regression equation determination module for obtaining a linear regression equation based on the initial correction set;
an error value obtaining module, configured to obtain an error value based on the initial correction set and the linear regression equation;
the comparison module is used for comparing the error value with a preset error value;
the correction module is used for correcting the preset level to be calibrated based on the linear regression equation if the error value is smaller than the preset error value;
and the iteration module is used for acquiring a preset level and an actual output level corresponding to the error value if the error value is greater than the preset error value, acquiring a first correction set based on the preset level and the actual output level, wherein the first correction set belongs to the initial correction set, taking the first correction set as the initial correction set, and turning to the step of acquiring a linear regression equation based on the initial correction set.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the level error correction method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the level error correction method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110282207.2A CN112667971B (en) | 2021-03-16 | 2021-03-16 | Level error correction method, level error correction device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110282207.2A CN112667971B (en) | 2021-03-16 | 2021-03-16 | Level error correction method, level error correction device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112667971A true CN112667971A (en) | 2021-04-16 |
CN112667971B CN112667971B (en) | 2021-06-01 |
Family
ID=75399482
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110282207.2A Active CN112667971B (en) | 2021-03-16 | 2021-03-16 | Level error correction method, level error correction device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112667971B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116383624A (en) * | 2022-12-15 | 2023-07-04 | 中国石油大学(北京) | Demulsification voltage accurate correction method, processor, device and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101159967A (en) * | 2007-10-29 | 2008-04-09 | 中国移动通信集团设计院有限公司 | Method and device for using drive test data for propagation model revision |
CN101702018A (en) * | 2009-11-12 | 2010-05-05 | 中国电子科技集团公司第四十一研究所 | Calibrating method for big modulation bandwidth linear FM signal frequency response |
CN102204229A (en) * | 2008-11-03 | 2011-09-28 | 布鲁尔及凯尔声音及振动测量公司 | Test system with digital calibration generator |
CN202330684U (en) * | 2011-11-10 | 2012-07-11 | 北京自动测试技术研究所 | Calibration module for VXI (VME (Virtual Machine Environment) Extensions for Instrumentation) bus digital testing system |
CN104852776A (en) * | 2015-04-23 | 2015-08-19 | 中国电子科技集团公司第四十一研究所 | Radio-frequency signal calibration method based on virtual channels |
US9513332B2 (en) * | 2011-10-14 | 2016-12-06 | Taiwan Semiconductor Manufacturing Company, Ltd. | Probe card partition scheme |
-
2021
- 2021-03-16 CN CN202110282207.2A patent/CN112667971B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101159967A (en) * | 2007-10-29 | 2008-04-09 | 中国移动通信集团设计院有限公司 | Method and device for using drive test data for propagation model revision |
CN102204229A (en) * | 2008-11-03 | 2011-09-28 | 布鲁尔及凯尔声音及振动测量公司 | Test system with digital calibration generator |
CN101702018A (en) * | 2009-11-12 | 2010-05-05 | 中国电子科技集团公司第四十一研究所 | Calibrating method for big modulation bandwidth linear FM signal frequency response |
US9513332B2 (en) * | 2011-10-14 | 2016-12-06 | Taiwan Semiconductor Manufacturing Company, Ltd. | Probe card partition scheme |
CN202330684U (en) * | 2011-11-10 | 2012-07-11 | 北京自动测试技术研究所 | Calibration module for VXI (VME (Virtual Machine Environment) Extensions for Instrumentation) bus digital testing system |
CN104852776A (en) * | 2015-04-23 | 2015-08-19 | 中国电子科技集团公司第四十一研究所 | Radio-frequency signal calibration method based on virtual channels |
Non-Patent Citations (1)
Title |
---|
陈勇帆: "《集成电路自动测试设备接口板网表生成方法研究》", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116383624A (en) * | 2022-12-15 | 2023-07-04 | 中国石油大学(北京) | Demulsification voltage accurate correction method, processor, device and storage medium |
CN116383624B (en) * | 2022-12-15 | 2024-03-19 | 中国石油大学(北京) | Demulsification voltage accurate correction method, processor, device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112667971B (en) | 2021-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100899856B1 (en) | Testing apparatus and method | |
CN112667971B (en) | Level error correction method, level error correction device, computer equipment and storage medium | |
US10768855B1 (en) | Data reading method, storage controller and storage device | |
CN111899784A (en) | Method and device for measuring threshold voltage distribution in NAND flash memory and storage medium | |
US20190189226A1 (en) | Link training mechanism by controlling delay in data path | |
US20240069591A1 (en) | Clock calibration method and electronic device | |
CN111289873A (en) | Chip testing method, chip parameter setting method and chip | |
CN115114196B (en) | Semiconductor memory device, memory system, and control method | |
JP7097649B2 (en) | Filament current control method and equipment | |
US8839061B2 (en) | System and method for scan chain re-ordering | |
CN111610816B (en) | Power supply voltage calibration device and power supply voltage calibration method | |
US9791509B2 (en) | Monitoring microprocessor interface information for a preset service using an address based filter | |
CN110263417B (en) | Time sequence characteristic acquisition method and device and electronic equipment | |
CN110022178B (en) | Detection circuit and detection method of WiFi module | |
CN116366202A (en) | Baud rate self-adaptive adjustment method and device | |
CN114817218A (en) | Data verification method and system, electronic device and readable storage medium | |
CN108845765B (en) | NAND data reading method, system, device and storage medium | |
CN111143263B (en) | Signal delay calibration method and system and electronic equipment | |
CN116048868A (en) | Code generation method, device, equipment and storage medium | |
CN112926283A (en) | Layout design method and apparatus for integrated circuit, device and storage medium | |
CN113535722A (en) | DAG (demand directed Access control) source tracing sampling method, system, equipment and storage medium based on mapping | |
CN106330400A (en) | Rapid CRC method and device | |
CN112213615A (en) | Radio frequency circuit debugging method and device, electronic equipment and storage medium | |
CN117347940B (en) | Calibration method, device, equipment and storage medium for battery charging and discharging equipment | |
CN116880963B (en) | Method for detecting connection errors between multiple hardware simulation tools |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |