CN109164404B - System and method for automatically calibrating sampling circuit in circuit board - Google Patents

System and method for automatically calibrating sampling circuit in circuit board Download PDF

Info

Publication number
CN109164404B
CN109164404B CN201810909289.7A CN201810909289A CN109164404B CN 109164404 B CN109164404 B CN 109164404B CN 201810909289 A CN201810909289 A CN 201810909289A CN 109164404 B CN109164404 B CN 109164404B
Authority
CN
China
Prior art keywords
control terminal
sampling circuit
upper computer
computer control
circuit board
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.)
Active
Application number
CN201810909289.7A
Other languages
Chinese (zh)
Other versions
CN109164404A (en
Inventor
李威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Changjiang Computing Technology Co ltd
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN201810909289.7A priority Critical patent/CN109164404B/en
Publication of CN109164404A publication Critical patent/CN109164404A/en
Application granted granted Critical
Publication of CN109164404B publication Critical patent/CN109164404B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R35/00Testing or calibrating of apparatus covered by the other groups of this subclass
    • G01R35/005Calibrating; Standards or reference devices, e.g. voltage or resistance standards, "golden" references

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Tests Of Electronic Circuits (AREA)

Abstract

The invention discloses a system and a method for automatically calibrating a sampling circuit in a circuit board, and relates to the field of automatic calibration of the sampling circuit in the circuit board. The system comprises an upper computer control terminal, a program-controlled direct-current power supply, a voltage acquisition device and a direct-current electronic load, wherein the voltage acquisition device is connected at two ends of a sampling resistor of a sampling circuit, the measured data are transmitted to the upper computer control terminal in real time, the upper computer control terminal controls the calibration process in a centralized manner, the number of data acquisition times is preset, after data acquisition is completed, the upper computer control terminal performs data analysis according to a specified algorithm, a report form of error compensation is automatically generated, MCU of the sampling circuit in a circuit board is upgraded, and calibration of the sampling circuit is completed. The invention can quickly and accurately complete the upgrade and calibration work of the sampling circuit in the circuit board and improve the calibration accuracy of the sampling circuit in the circuit board.

Description

System and method for automatically calibrating sampling circuit in circuit board
Technical Field
The invention relates to the field of automatic calibration of a sampling circuit in a circuit board, in particular to a system and a method for automatically calibrating the sampling circuit in the circuit board.
Background
Power consumption is a key parameter for power supply design and even board level circuit design, and is usually calculated indirectly by calculating current using power sensing of a single power rail in the circuit, i.e. voltage measurement across a sampling resistor. These voltage measurements are made using an on-board micro control unit and analog-to-digital conversion circuitry. The sampling circuit in the calibrated circuit board includes a sampling resistor and a circuit connected to an MCU (Micro Control Unit), where usually, two ends of the sampling resistor in the circuit are connected to a differential operational amplifier circuit or an ADC (Analog-Digital Converter), and the differential operational amplifier circuit or the Analog-Digital Converter (ADC) converts the voltage Analog signals at two ends of the sampling resistor into Digital signals and sends the Digital signals to the MCU. By digitizing the voltage across the sampling resistor, the voltage and current of the power rail on which the sampling resistor is located can be calculated, and the power consumption of the power supply can be calculated. However, the measured and calculated value of the sampling circuit is often different from the actual value, and there is still a system scheme for automatically calibrating the circuit applying the sampling resistor in the actual circuit board.
Most of the retrieved patent applications use a special calibration circuit in the whole circuit to realize error compensation, and are specific to each specific application, the calibration circuits in the patent applications are complex in realization, various in types, without universality, increase in material cost, and possibly bring new errors, so that the calibration circuits are not suitable for being applied to sampling circuits of circuit boards of a plurality of power supply tree networks.
According to the scheme, a power supply is a constant current power supply of 1 ampere, the deviation condition of the resistance value of the tested sampling resistor is judged through the indication of an LED lamp, the sampling circuit in the circuit board is not tested and calibrated under different voltage and current, and the program upgrading of the sampling circuit cannot be carried out, so that the measurement accuracy of the voltage and current power consumption in the circuit is improved.
In the other scheme, calibration parameters are obtained only through data of two points and by adopting a linear function of y-kx + b, data processing is not accurate enough, and the correlation and the fitting degree can not meet the requirement of accurate measurement of voltage, current and power consumption values of different power supply circuits in different power supply tree networks on a circuit board under specific loads.
The selected measuring point data in the existing automatic calibration method is few, only calibration parameters can be simply calculated, and other circuits formed by attached components are generally adopted for calibrating the sampling circuit in the existing circuit board to carry out error compensation, so that the calibration accuracy of the sampling circuit in the circuit board is difficult to meet.
Disclosure of Invention
The present invention is directed to overcome the above drawbacks of the prior art, and provides a system and a method for automatically calibrating a sampling circuit in a circuit board, which can quickly and accurately complete the calibration and upgrade of the sampling circuit in the circuit board, and improve the calibration accuracy of the sampling circuit in the circuit board.
The invention provides a system for automatically calibrating a sampling circuit, wherein the sampling circuit in a circuit board comprises a Micro Control Unit (MCU) and a sampling resistor, the system comprises an upper computer control terminal, a program-controlled direct-current power supply, a voltage acquisition device and a direct-current electronic load, the voltage acquisition device is connected to two ends of the sampling resistor of the sampling circuit, and measurement data are transmitted to the upper computer control terminal in real time; the upper computer control terminal controls the calibration process in a centralized manner, data acquisition is completed according to preset data acquisition times, data analysis is performed according to a specified algorithm, a report form of error compensation is automatically generated, program upgrading is performed on an MCU of the sampling circuit in the circuit board, and calibration of the sampling circuit is completed.
On the basis of the technical scheme, the upper computer control terminal sends parameters of the program-controlled direct-current power supply, the voltage acquisition device and the direct-current electronic load at a specified time, triggers the measurement equipment and starts a calibration action; and the MCU of the sampling circuit in each measuring device and the circuit board transmits the measured data back to the upper computer control terminal in real time.
On the basis of the technical scheme, the upper computer control terminal collects and records data of each calibration action, selects a proper calibration strategy, performs error analysis and compensation, and updates the result into the program of the MCU of the sampling circuit in the circuit board.
On the basis of the technical scheme, the upper computer control terminal is unified and coordinated, the output of the program-controlled direct-current power supply and the load of the direct-current electronic load are set, and the voltage at two ends of the sampling resistor is measured; after the one-time wiring is finished, the upper computer control terminal performs data acquisition for multiple times according to presetting, after all data acquisition is finished, the upper computer control terminal provides multiple algorithms for data analysis, data reports containing voltage current values, power values and error compensation values in multiple formats are generated by one key, the MCU program of the sampling circuit in the circuit board is upgraded, and the calibration of the sampling circuit is completed.
On the basis of the technical scheme, the algorithm provided by the upper computer control terminal comprises a linear, quadratic polynomial, an exponential function and a moving average fitting algorithm, the upper computer control terminal carries out calibration curve and error compensation, a least square method is used as a basic criterion, the correlation coefficient and the mean square error of each algorithm are calculated, the fitting degrees of different algorithms are compared, and the most accurate fitting algorithm for the sampling circuit is selected.
The invention also provides a method for automatically calibrating the sampling circuit in the circuit board based on the system, which comprises the following steps:
connecting a host computer control terminal, a program-controlled direct-current power supply, a voltage acquisition device and a direct-current electronic load by using a system bus, connecting two ends of a sampling resistor in a sampling circuit of a circuit board with the voltage acquisition device, connecting one end of a cable with the program-controlled direct-current power supply, and connecting the other end of the cable with the direct-current electronic load;
starting each instrument, starting a control terminal of an upper computer, and setting related parameters;
the upper computer control terminal centrally controls the calibration process, calculates the power consumption value after completing data acquisition according to the preset data acquisition times, performs data analysis according to the specified algorithm, automatically generates an error compensation report, performs program upgrade on the MCU of the sampling circuit in the circuit board, and completes the calibration of the sampling circuit.
On the basis of the technical scheme, the process of completing data acquisition comprises the following steps:
the upper computer control terminal controls the output voltage of the program-controlled direct-current power supply and the load current of the direct-current electronic load, acquires a voltage value, a current value and a power consumption value from the MCU of the sampling circuit according to the preset data acquisition times, reads the voltage value from the voltage acquisition device and reads the current value from the program-controlled direct-current power supply.
On the basis of the technical scheme, when data analysis is carried out according to a specified algorithm, the algorithm provided by the upper computer control terminal comprises a linear first-order polynomial, a second-order polynomial, an exponential function and a moving average fitting algorithm, the upper computer control terminal carries out calibration curve and error compensation, a least square method is used as a basic criterion, the correlation coefficient and the mean square error of each algorithm are calculated, the fitting degrees of different algorithms are compared, and the most accurate fitting algorithm for the sampling circuit is selected.
On the basis of the technical scheme, the method further comprises the following steps: when the upper computer control terminal is started, the upper computer control terminal carries out system self-check, sends an instruction to each instrument device connected to the system bus, receives information returned by each instrument device, detects system connectivity and judges whether the whole system is ready to finish.
On the basis of the technical scheme, when the upper computer control terminal is started, the following relevant parameters are set: measuring range, resolution, testing step length, up-down stroke selection and cycle number.
Compared with the prior art, the invention has the following advantages:
the upper computer control terminal of the invention combines all instruments and devices with the sampling circuit in the circuit board to be calibrated to form a specific loop through a system bus, the specific loop is started and operated by one key, the data collection in the calibration process is realized, a proper algorithm is selected, the calibration curve and error compensation data are obtained according to the requirements of the sampling circuit in the actual circuit board, a report is generated, the error analysis and compensation are carried out, the corresponding error compensation data table in the report is extracted, the error compensation data table is downloaded to a micro control unit MCU of the sampling circuit through the upper computer control terminal for program upgrading, the upgrading and calibration work of the sampling circuit in the circuit board is rapidly and accurately completed, compared with the error compensation of other circuits which are usually formed by accessory components and parts in the calibration of the sampling circuit in the existing circuit board, the invention is beneficial to realizing the precise measurement of parameters such as current, the accuracy of the calibration of the sampling circuit in the circuit board can be improved.
Drawings
Fig. 1 is a block diagram of a system for automatically calibrating a sampling circuit in a circuit board according to an embodiment of the present invention.
Fig. 2 is a schematic connection diagram for calibrating a sampling circuit in a circuit board according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the figures and the embodiments.
Example 1
Referring to fig. 1, an embodiment of the present invention provides a system for automatically calibrating a sampling circuit in a circuit board, where the sampling circuit in the circuit board includes a Micro Control Unit (MCU), an Analog-to-Digital Converter (ADC), and a sampling resistor, which are connected in sequence, the system includes an upper computer Control terminal, a program-controlled dc power supply, a voltage acquisition device, and a dc electronic load, a system loop is connected and networked by an RS232 or GPIB bus, and the voltage acquisition device is a voltmeter or a data acquisition card, and is connected to two ends of the sampling resistor of the sampling circuit, and sends measurement data to the upper computer Control terminal in real time.
The upper computer control terminal centrally controls the calibration process, each time data acquisition is sent by the upper computer control terminal, the program-controlled direct-current power supply provides proper current and voltage, the electronic load provides proper load pulling, and the voltmeter or the data acquisition card sends the measurement data to the upper computer control terminal in real time.
And after the upper computer control terminal finishes data acquisition according to the preset data acquisition times, performing data analysis according to a specified algorithm, automatically generating an error compensation report, and performing program upgrading on the MCU of the sampling circuit in the circuit board to finish the calibration of the sampling circuit.
The upper computer control terminal forms a specific loop with all instrument equipment and sampling circuits in a circuit board to be calibrated through a system bus, the specific loop is connected, one-key starting and operation are performed, data collection in the calibration process is achieved, a proper algorithm is selected, calibration curves and error compensation data are obtained according to the requirements of the sampling circuits in the actual circuit board, a report is generated, error analysis and compensation are performed, a corresponding error compensation data table in the report is extracted, the error compensation data table is downloaded to a Micro Control Unit (MCU) of the sampling circuits through the upper computer control terminal, program upgrading is performed, and upgrading and calibration work of the sampling circuits in the circuit board is completed quickly and accurately.
Compared with the prior art that the calibration of the sampling circuit in the circuit board usually adopts other circuits composed of auxiliary components for error compensation, the embodiment of the invention is beneficial to realizing the precise measurement of parameters such as current, power and the like, and can improve the calibration accuracy of the sampling circuit in the circuit board.
Example 2
In addition to embodiment 1, the upper computer control terminal can be developed on a PC by C language, LabVIEW (virtual instrument development environment), or the like. The upper computer control terminal sends parameters of the program-controlled direct-current power supply, the data acquisition card and the electronic load at a specified time, and triggers the devices to start a calibration action; each measuring device and the MCU transmit measured data back to the upper computer control terminal in real time through a communication network (such as RS232, USB, TCP/IP and the like). The most important function of the upper computer control terminal is to collect and record data of each calibration action, select a proper calibration strategy (such as various fitting algorithms) to carry out error analysis and compensation, and update the result into the program of the MCU. For example, after the relevant equipment is connected, the corresponding option of the software is clicked to test the connectivity, the corresponding tab is observed, and the test strategy is selected.
The programmable dc power supply is selected according to the requirements of the actual circuit, and generally a power supply with a suitable voltage and current supply capability is selected, for example: agilent E3634A (0-25V, 7A/0-50V, 4A). Before each system calibration action is started, the upper computer control terminal is required to send an instruction to the power supply setting determination value. For example, when the test is performed in the through-current 1A, 1A needs to be clicked or input in a corresponding space in the software power tab, or an automatic test is clicked, the through-current step length is set, and the program automatically sets the output size of the program-controlled dc power supply.
Selecting a digital voltmeter or a data acquisition card with proper voltage measurement capability according to the requirements of an actual circuit, for example: agilent 34970A/34902A modules (16channels) has the precision of more than 6 bits and can simultaneously transmit multiple paths of measurement data to a host computer control terminal.
According to the requirements of the actual circuit, selecting a direct current electronic load with proper voltage and current extraction capacity, such as: chroma 63640-5E-load or Faith FT6301A (120V, 30A, 150W) to simulate real workloads to calibrate the sampling circuits in the circuit board.
Common measuring instruments support RS232 or GPIB (General-Purpose Interface Bus) protocols, are provided with interfaces of two buses in a rear-mounted mode, and are also provided with development routines when leaving factories. The upper computer control terminal can be conveniently bridged with the test instrument through system buses such as a USB Hub (USB interface Hub), a USB-to-RS 232 cable, a USB-to-GPIB cable and the like. The control software develops a driver based on RS232 and GPIB, and can be compatible with the system bus to complete the control and data collection of the instrument and equipment.
Example 3
On the basis of the embodiment 1, the upper computer control terminal is unified and coordinated, the output of the program-controlled direct-current power supply and the load of the electronic load can be set at one time, and the voltage at two ends of the sampling resistor is measured; after once wiring is completed, the upper computer control terminal can simultaneously carry out a plurality of data acquisition processes according to presetting, thereby reducing the error probability and improving the working efficiency.
After all data are collected, the upper computer control terminal provides a plurality of algorithms for a user to select for data analysis, the algorithms provided by the upper computer control terminal comprise a linear polynomial, a second-order polynomial, an exponential function and a moving average fitting algorithm, the upper computer control terminal carries out calibration curve and error compensation, a least square method is used as a basic criterion, a correlation coefficient and a mean square error of each algorithm are calculated, fitting degrees of different algorithms are compared, and the most accurate fitting algorithm for a sampling circuit is selected.
The upper computer control terminal generates data report tables with various formats, including voltage current values, power values, error compensation values and the like, by one key, a user can directly extract data, upgrade the program of a micro control unit in the system and finish the calibration of the sampling circuit. Compared with the prior art that the calibration of the sampling circuit in the circuit board usually adopts other circuits composed of auxiliary components for error compensation, the embodiment of the invention is beneficial to realizing the precise measurement of parameters such as current, power and the like, and can improve the calibration accuracy of the sampling circuit in the circuit board.
Example 4
The embodiment of the invention provides a method for automatically calibrating a sampling circuit in a circuit board based on the system in the embodiment 1, which comprises the following steps:
referring to fig. 2, a system bus is used to connect an upper computer control terminal, a program-controlled dc power supply, a voltage acquisition device and a dc electronic load, two ends of a sampling resistor in a sampling circuit of a circuit board are connected to the voltage acquisition device, one end of a cable is connected to the program-controlled dc power supply, and the other end of the cable is connected to the dc electronic load;
starting each instrument, starting an upper computer control terminal, and setting the following relevant parameters: measuring range, resolution, testing step length, up-down stroke selection and cycle number;
the upper computer control terminal centrally controls the calibration process, calculates the power consumption value after completing data acquisition according to the preset data acquisition times, performs data analysis according to the specified algorithm, automatically generates an error compensation report, performs program upgrade on the MCU of the sampling circuit in the circuit board, and completes the calibration of the sampling circuit.
The upper computer control terminal forms a specific loop by all the instrument devices and the sampling circuit in the circuit board to be calibrated through a system bus, and the specific loop is connected, started and operated by one key, so that the collection of data in the calibration process is realized, a proper algorithm is selected, and aiming at the requirement of the sampling circuit in the actual circuit board, obtaining a calibration curve and error compensation data, generating a report, carrying out error analysis and compensation, extracting a corresponding error compensation data table in the report, the program is upgraded by downloading the program to a micro control unit MCU of the sampling circuit through a control terminal of an upper computer, the upgrading and calibration work of the sampling circuit in the circuit board is rapidly and accurately completed, compared with the prior art that the calibration of the sampling circuit in the circuit board usually adopts other circuits composed of auxiliary components for error compensation, the embodiment of the invention is beneficial to realizing the precise measurement of parameters such as current, power and the like, and can improve the calibration accuracy of the sampling circuit in the circuit board.
Example 5
On the basis of embodiment 4, when the upper computer control terminal is started, the upper computer control terminal performs system self-check, sends an instruction to each instrument device connected to the system bus, receives information returned by each instrument device, detects system connectivity, and determines whether the whole system is ready to be completed.
The process of finishing data acquisition by the upper computer control terminal comprises the following steps:
the upper computer control terminal controls the output voltage of the program-controlled direct-current power supply and the load current of the direct-current electronic load, acquires a voltage value, a current value and a power consumption value from the MCU of the sampling circuit according to the preset data acquisition times, reads the voltage value from the voltage acquisition device and reads the current value from the program-controlled direct-current power supply.
When the upper computer control terminal analyzes data according to a specified algorithm, the algorithm provided by the upper computer control terminal comprises a linear, a second-order polynomial, an exponential function and a moving average fitting algorithm, the upper computer control terminal makes a calibration curve and error compensation, a least square method is used as a basic criterion, a correlation coefficient and a mean square error of each algorithm are calculated, fitting degrees of different algorithms are compared, and the most accurate fitting algorithm for a sampling circuit is selected.
Example 6
The embodiment of the invention provides a method for automatically calibrating a sampling circuit in a circuit board based on the system in the embodiment 1, which comprises the following steps:
1) in actual operation, the required equipment is prepared according to the mode shown in fig. 2, a GPIB bus is connected to an upper computer control terminal, a program-controlled dc power supply, a data acquisition card and a dc electronic load, two ends of a sampling resistor in a sampling circuit on a circuit board are connected to the data acquisition card, one end of a cable is connected to the program-controlled dc power supply, and the other end of the cable is connected to the dc electronic load; and after preheating each instrument for five minutes, starting a control terminal of the upper computer, clicking the system for self-checking, sending an instruction to each instrument connected to the bus by the program, receiving information returned by each instrument, detecting the connectivity of the system, and judging whether the whole calibration system is ready to be finished. The apparatus in fig. 2 needs to have performance under specific conditions to meet the test requirements.
2) Opening an upper computer control terminal, and setting related parameters: measuring range, resolution, testing step length, up-down stroke selection, cycle number and the like; for example: when calibrating a power sampling circuit with normal working voltage V and maximum working current I, the voltage measurement range can be set to 0.9V-1.1V, the voltage test step length can be set to 0.1V, the current test range can be set to 0-1.2I, the current test step length can be set to 0.2A, the upstroke (namely, the voltage is supplied from low to high and the current is supplied from small to large) is selected, and the cycle number is set to 2.
3) The upper computer control terminal starts to control the output voltage of the program-controlled direct-current power supply to be 0.9V, sends an instruction to enable the load current of the direct-current electronic load to be 0, obtains a voltage value A11, a current value B11 and a power consumption value C11 from an MCU of the sampling circuit, and simultaneously reads a voltage value X11, a current value Y11 and a power consumption value Z11 from the data acquisition card.
4) According to the test of the up stroke, the upper computer control terminal respectively sends commands to enable the direct current electronic load to be in a load current range of 0.2I, 0.4I, 0.6I, 0.8I, 1.0I and 1.2I, respectively obtains voltage values A12, … and A17, current values B12, … and B17 and power consumption values C12, … and C17 from the sampling circuit MCU, reads voltage values X12, … and X17 from the data acquisition card, reads current values Y12, … and Y17 from the program control direct current power supply, and calculates power consumption values Z12, … and Z17.
5) The upper computer control terminal controls the program-controlled direct current power supply to output 1.0V and 1.1V according to the test of the upper stroke, and respectively sends instructions to enable the load current of the direct current electronic load to be 0.2I, 0.4I, 0.6I, 0.8I, 1.0I and 1.2I, and respectively obtains a voltage value, a current value and a power consumption value from a sampling circuit MCU of the circuit board, as shown in the following table:
TABLE 1 Voltage, Current, Power consumption values obtained from the sampling Circuit MCU of the Circuit Board
Figure BDA0001761364540000111
The upper computer control terminal respectively obtains a voltage value, a current value and a power consumption value from the data acquisition card and the program-controlled direct-current power supply as shown in the following table:
TABLE 2 obtaining voltage, current and power consumption values from the data acquisition card
Figure BDA0001761364540000112
Figure BDA0001761364540000121
6) After data acquisition is finished, the upper computer control terminal selects different algorithms, such as: linear first order, polynomial second order, exponential function, moving average fitting and other algorithms,making calibration curve and error compensation, and calculating correlation coefficient (R) of each algorithm by using least square method as basic criterion2) And the mean square error (RMSE) is used as an index, the fitting degrees of different algorithms are compared, and the most accurate fitting algorithm for the power supply sampling circuit is selected, so that the power consumption of the ground voltage and the current can be accurately calculated at the later stage.
For example: recording the data obtained in step 5, taking the voltage value calibration as an example, according to a linear function relation of X ═ kA + d, where X represents the voltage value obtained from the data acquisition card, k represents the coefficient of the first term of the voltage value calibration, a represents the voltage value obtained from the sampling circuit MCU of the circuit board, and d is the constant term of the voltage value calibration, substituting two groups of data (a11, …, a17), (X11, …, X17) at 0.9V voltage into operation, and calculating parameters k and b according to the rule of least squares method, thereby obtaining (X11 ', …, X17') according to the relation of X '═ kA + d, and X' is the voltage value obtained according to the linear algorithm calibration, and obtaining (X11 ', …, X17') according to the correlation coefficient R2And calculating R obtained by fitting a linear algorithm by using a calculation formula of a mean square error (RMSE)1 2Sum mean square error RMSE1
Figure BDA0001761364540000131
Figure BDA0001761364540000132
Where i represents the number of measurements.
7) The upper computer control terminal sets lA according to the second-order polynomial function relation2+ mA + n, X represents the voltage value obtained from the data acquisition card, l represents the quadratic term coefficient of the voltage value calibration, A represents the voltage value obtained from the sampling circuit MCU of the circuit board, m represents the first order coefficient of the voltage value calibration, n is the constant term of the voltage value calibration, two groups of data (A11, …, A17), (X11, …, X17) under the voltage of 0.9V are substituted into the operation, parameters l, m and n are calculated according to the criterion of the least square method, and the relation X is lA ″2+ mA + n yields the voltage values (X11 ', …, X17') calibrated according to a second order polynomial functional relation algorithm, according to the correlation coefficient R2And a calculation formula of mean square error RMSE, and calculating a correlation coefficient R obtained by selecting a second-order polynomial function to fit2 2Sum mean square error RMSE2
Figure BDA0001761364540000133
Figure BDA0001761364540000134
Where i represents the number of measurements.
If R is2 2Greater than R1 2,RMSE2Less than RMSE1Then, the algorithm of the second-order polynomial function relation is selected to be used as the fitting of the 0.9V voltage more accurately, and the sampling circuit is closer to the true value after the algorithm is adopted for error compensation.
8) And according to the step 6 and the step 7, the upper computer control terminal respectively adopts different algorithms to compare to obtain a fitting algorithm and error compensation data which are most suitable for the current value and the power consumption value of the power supply under the voltage of 0.9V.
9) And (3) automatically calculating all fitting algorithm parameters and error compensation data of the power supply under 1.0V and 1.1V according to the setting of the step (2) by a program established by the upper computer control terminal.
10) Because the working voltage and the working current of different power supply circuits on the circuit board are different, the parameter setting of the step 2 is needed in the calibration process of each power supply sampling circuit, so that the calibration process of the sampling circuit can cover the actual power supply working condition, and the sampling accuracy of the calibrated sampling circuit is realized. Meanwhile, a software interface of the upper computer control terminal provides recommended set values of different voltages of different power supply circuits.
11) After all the test works are completed, the required report formats, such as txt, xls, pdf and the like, are selected in the report option card, and the positions for storing the reports can be selected. The upper computer control terminal records the time, the specific test data, the error compensation data and the like of all test items, and the generated report structure is as follows:
TABLE 3 time, specific test data and error compensation data for all test items
Figure BDA0001761364540000141
Figure BDA0001761364540000151
12) And extracting the corresponding error compensation data table in the report, downloading the error compensation data table to a Micro Control Unit (MCU) through an upper computer control terminal, and upgrading the program to finish the calibration work.
Compared with the prior method for calibrating the sampling circuit in the circuit board by adopting other circuits formed by auxiliary components for error compensation, the method provided by the embodiment of the invention can quickly and accurately finish the upgrading and calibrating work of the sampling circuit in the circuit board, can obviously improve the working efficiency, increases the accuracy of calculating and measuring parameters such as current, power consumption and the like, and improves the accuracy of calibrating the sampling circuit in the circuit board.
Various modifications and variations of the embodiments of the present invention may be made by those skilled in the art, and they are also within the scope of the present invention, provided they are within the scope of the claims of the present invention and their equivalents.
What is not described in detail in the specification is prior art that is well known to those skilled in the art.

Claims (8)

1. The utility model provides a system to sampling circuit automatic calibration in circuit board, sampling circuit in the circuit board includes little the control unit MCU, sampling resistor, its characterized in that: the system comprises an upper computer control terminal, a program-controlled direct-current power supply, a voltage acquisition device and a direct-current electronic load, wherein the voltage acquisition device is connected to two ends of a sampling resistor of a sampling circuit and transmits measurement data to the upper computer control terminal in real time; the upper computer control terminal centrally controls the calibration process, performs data analysis according to a specified algorithm after completing data acquisition according to preset data acquisition times, automatically generates an error compensation report, performs program upgrade on an MCU of a sampling circuit in a circuit board, and completes calibration of the sampling circuit;
the upper computer control terminal sends parameters of the program-controlled direct-current power supply, the voltage acquisition device and the direct-current electronic load at a specified time, triggers the measurement equipment and starts a calibration action; the MCU of the sampling circuit in each measuring device and the circuit board transmits the measured data back to the upper computer control terminal in real time;
and the upper computer control terminal collects and records data of each calibration action, selects a proper calibration strategy, performs error analysis and compensation, and updates the result into the program of the MCU of the sampling circuit in the circuit board.
2. The system for automatically calibrating a sampling circuit in a circuit board of claim 1, wherein: the upper computer control terminal is coordinated in a unified way, the output of the program control direct current power supply and the load of the direct current electronic load are set, and the voltage at two ends of the sampling resistor is measured; after the one-time wiring is finished, the upper computer control terminal performs data acquisition for multiple times according to presetting, after all data acquisition is finished, the upper computer control terminal provides multiple algorithms for data analysis, data reports containing voltage current values, power values and error compensation values in multiple formats are generated by one key, the MCU program of the sampling circuit in the circuit board is upgraded, and the calibration of the sampling circuit is completed.
3. The system for automatically calibrating a sampling circuit in a circuit board of claim 2, wherein: the algorithm provided by the upper computer control terminal comprises a linear polynomial, a second-order polynomial, an exponential function and a moving average fitting algorithm, the upper computer control terminal carries out calibration curve and error compensation, a least square method is used as a basic criterion, the correlation coefficient and the mean square error of each algorithm are calculated, the fitting degrees of different algorithms are compared, and the most accurate fitting algorithm for the sampling circuit is selected.
4. The system of claim 1, further comprising a method for automatically calibrating the sampling circuit in the circuit board, the method comprising the steps of:
connecting a host computer control terminal, a program-controlled direct-current power supply, a voltage acquisition device and a direct-current electronic load by using a system bus, connecting two ends of a sampling resistor in a sampling circuit of a circuit board with the voltage acquisition device, connecting one end of a cable with the program-controlled direct-current power supply, and connecting the other end of the cable with the direct-current electronic load;
starting each instrument, starting a control terminal of an upper computer, and setting related parameters;
the upper computer control terminal centrally controls the calibration process, calculates the power consumption value after completing data acquisition according to the preset data acquisition times, performs data analysis according to the specified algorithm, automatically generates an error compensation report, performs program upgrade on the MCU of the sampling circuit in the circuit board, and completes the calibration of the sampling circuit.
5. The method of automatically calibrating a sampling circuit in a circuit board of claim 4, wherein: the process of completing data acquisition comprises the following steps:
the upper computer control terminal controls the output voltage of the program-controlled direct-current power supply and the load current of the direct-current electronic load, acquires a voltage value, a current value and a power consumption value from the MCU of the sampling circuit according to the preset data acquisition times, reads the voltage value from the voltage acquisition device and reads the current value from the program-controlled direct-current power supply.
6. The method of automatically calibrating a sampling circuit in a circuit board of claim 4, wherein: when data analysis is carried out according to a specified algorithm, the algorithm provided by the upper computer control terminal comprises a linear, quadratic polynomial, an exponential function and a moving average fitting algorithm, the upper computer control terminal carries out calibration curve and error compensation, a least square method is used as a basic criterion, the correlation coefficient and the mean square error of each algorithm are calculated, the fitting degrees of different algorithms are compared, and the most accurate fitting algorithm for the sampling circuit is selected.
7. The method of automatically calibrating a sampling circuit in a circuit board of claim 4, wherein: the method further comprises the following steps: when the upper computer control terminal is started, the upper computer control terminal carries out system self-check, sends an instruction to each instrument device connected to the system bus, receives information returned by each instrument device, detects system connectivity and judges whether the whole system is ready to finish.
8. The method of automatically calibrating a sampling circuit in a circuit board of claim 4, wherein: when the upper computer control terminal is started, the following relevant parameters are set: measuring range, resolution, testing step length, up-down stroke selection and cycle number.
CN201810909289.7A 2018-08-10 2018-08-10 System and method for automatically calibrating sampling circuit in circuit board Active CN109164404B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810909289.7A CN109164404B (en) 2018-08-10 2018-08-10 System and method for automatically calibrating sampling circuit in circuit board

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810909289.7A CN109164404B (en) 2018-08-10 2018-08-10 System and method for automatically calibrating sampling circuit in circuit board

Publications (2)

Publication Number Publication Date
CN109164404A CN109164404A (en) 2019-01-08
CN109164404B true CN109164404B (en) 2020-12-01

Family

ID=64895491

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810909289.7A Active CN109164404B (en) 2018-08-10 2018-08-10 System and method for automatically calibrating sampling circuit in circuit board

Country Status (1)

Country Link
CN (1) CN109164404B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110261792A (en) * 2019-06-18 2019-09-20 深圳市嘉兆鸿电子有限公司 DC power supply detection method, device, test terminal and readable storage medium storing program for executing
CN111273208B (en) * 2020-03-11 2022-05-10 深圳市金锐显数码科技有限公司 Precision automatic correction method and system based on electronic load
CN113884960A (en) * 2020-07-02 2022-01-04 广州雷迅创新科技股份有限公司 High-precision calibration method for current measured by shunt method
CN112187263B (en) * 2020-08-28 2022-07-01 国电南瑞南京控制系统有限公司 AD sampling value compensation coefficient iteration method and system for resistance voltage division sampling technology
CN113094230B (en) * 2021-03-31 2024-03-12 宁畅信息产业(北京)有限公司 Power consumption monitoring method and power consumption monitoring main board
CN113433899A (en) * 2021-06-16 2021-09-24 南京航空航天大学 Signal detection and control method based on serial communication
CN113433501B (en) * 2021-06-24 2023-06-02 紫光展讯通信(惠州)有限公司 Current calibration method, system, medium and calibration plate
CN115840181A (en) * 2023-02-16 2023-03-24 南方电网产业投资集团有限责任公司 Charging pile high-voltage sampling calibration circuit and method and electronic equipment
CN116585696B (en) * 2023-05-26 2024-01-30 衡阳鸿运电子有限公司 Game paddle maintenance calibration system

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102798654A (en) * 2012-09-08 2012-11-28 无锡隆盛科技股份有限公司 Heating control method for nitrogen oxygen sensor
CN102998644A (en) * 2012-11-23 2013-03-27 浙江省电力公司电力科学研究院 Calibration system for direct current resistance tester
CN103048542A (en) * 2011-10-14 2013-04-17 鸿富锦精密工业(深圳)有限公司 Device and system for measuring current calibration resistor
CN103487778A (en) * 2013-10-12 2014-01-01 南京深科博业电气股份有限公司 Analog quantity correcting method and single-CPU (Central Processing Unit) low-pressure protector based on analog quantity correcting method
CN103576064A (en) * 2013-10-28 2014-02-12 惠州市亿能电子有限公司 Insulation detection circuit with calibration module and calibration method thereof
CN103675461A (en) * 2013-12-20 2014-03-26 北京航天测控技术有限公司 Resistance measurement method and device based on adjustable current source
CN104181489A (en) * 2014-09-04 2014-12-03 国家电网公司 Calibration system for substation alternating-current sampling and measuring device
CN105811981A (en) * 2016-03-09 2016-07-27 深圳市博巨兴实业发展有限公司 Automatic test platform for high-precision ADC measurement
US9568581B2 (en) * 2012-07-16 2017-02-14 Fujitsu Limited Signal sampler with a calibration circuit
CN106872748A (en) * 2015-12-13 2017-06-20 李福来 Insulation Resistance Tester high voltage controllable power supply and range switch circuit

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103048542A (en) * 2011-10-14 2013-04-17 鸿富锦精密工业(深圳)有限公司 Device and system for measuring current calibration resistor
US9568581B2 (en) * 2012-07-16 2017-02-14 Fujitsu Limited Signal sampler with a calibration circuit
CN102798654A (en) * 2012-09-08 2012-11-28 无锡隆盛科技股份有限公司 Heating control method for nitrogen oxygen sensor
CN102998644A (en) * 2012-11-23 2013-03-27 浙江省电力公司电力科学研究院 Calibration system for direct current resistance tester
CN103487778A (en) * 2013-10-12 2014-01-01 南京深科博业电气股份有限公司 Analog quantity correcting method and single-CPU (Central Processing Unit) low-pressure protector based on analog quantity correcting method
CN103576064A (en) * 2013-10-28 2014-02-12 惠州市亿能电子有限公司 Insulation detection circuit with calibration module and calibration method thereof
CN103675461A (en) * 2013-12-20 2014-03-26 北京航天测控技术有限公司 Resistance measurement method and device based on adjustable current source
CN104181489A (en) * 2014-09-04 2014-12-03 国家电网公司 Calibration system for substation alternating-current sampling and measuring device
CN106872748A (en) * 2015-12-13 2017-06-20 李福来 Insulation Resistance Tester high voltage controllable power supply and range switch circuit
CN105811981A (en) * 2016-03-09 2016-07-27 深圳市博巨兴实业发展有限公司 Automatic test platform for high-precision ADC measurement

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
便携式太阳电池特性参数获取系统;肖文波等;《北京航空航天大学学报》;20140630;第40卷(第6期);全文 *

Also Published As

Publication number Publication date
CN109164404A (en) 2019-01-08

Similar Documents

Publication Publication Date Title
CN109164404B (en) System and method for automatically calibrating sampling circuit in circuit board
CN108089141B (en) Error correction method and device of current measuring device based on current divider
CN101334457B (en) Multichannel multi-parameter electric measuring meter test system and full-automatic test method
CN108445292A (en) Resistance measurement method based on error correction and device
WO2020028314A1 (en) Current sensor configuration and calibration
CN104330096B (en) A kind of rectification building-out of measurement signal and the method and device of automatic Calibration
CN109324282A (en) A kind of spectrum measurement method and test macro for PCBA board
CN210346590U (en) Wireless static strain tester and wireless static strain test system
CN114659479B (en) Intelligent linear displacement sensor testing method
CN112311399A (en) Analog-digital converter testing device and method
CN201281755Y (en) Assay system for multichannel multi-parameter electric measuring meter
CN113970679B (en) Automatic debugging table and debugging method for angle precision of shaft angle-digital converter
CN115770930A (en) Welding machine equipment and voltage calibration method and device thereof
CN110045311A (en) Metering secondary global error on-the-spot test method and its system
CN112923967B (en) Instrument calibration system supporting rapid assessment of instrument calibration uncertainty
CN104316889A (en) Virtual load method-based generator rotor alternating current impedance tester calibration device
CN107800434A (en) A kind of fast A/D C method of testings based on parameter extraction
CN110609243B (en) Method and system for testing CPU power supply efficiency and related components
CN112798135A (en) Temperature sensor algorithm
CN101093251A (en) Real time online method and device for monitoring and measuring error of voltage drop electric energy at secondary loop of voltage transformer in high voltage
CN211627856U (en) Automatic verification system for seismic geoelectric precursor measuring instrument
CN115166537B (en) Battery current calibration method capable of flexibly configuring detection steps
CN204631240U (en) Electricity three shows automatic verification system
CN116585696B (en) Game paddle maintenance calibration system
CN208820792U (en) A kind of efficient WiFi module test macro

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240627

Address after: 430000 No. 6, High-tech Fourth Road, Donghu High-tech Development Zone, Wuhan City, Hubei Province

Patentee after: FIBERHOME TELECOMMUNICATION TECHNOLOGIES Co.,Ltd.

Country or region after: China

Patentee after: Wuhan Changjiang Computing Technology Co.,Ltd.

Address before: 430000 No. 6, High-tech Fourth Road, Donghu High-tech Development Zone, Wuhan City, Hubei Province

Patentee before: FIBERHOME TELECOMMUNICATION TECHNOLOGIES Co.,Ltd.

Country or region before: China