Calibration method for improving consistency of hardware circuit

Through the calibration method of neural network model, the deficiency in temperature correction of integrated circuit testing equipment is solved, the calibration accuracy and stability of hardware circuits are improved, and the adaptability and flexibility to different ambient temperatures are achieved.

CN119312869AInactive Publication Date: 2025-01-14上海宏泰芯半导体科技有限公司

Patent Information

Application Number
CN202411373607.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing integrated circuit testing equipment failed to effectively correct the external ambient temperature during the calibration process, resulting in the impact of the hardware calibration accuracy and the inability to meet the requirements of high-precision signal generation.

Method used

The neural network model is used for hardware circuit calibration. By establishing a three-layer fully connected neural network structure, combining StandardScaler data preprocessing and Adam algorithm training model, considering temperature factors, training samples are regularly updated to improve calibration accuracy and adaptability.

Benefits of technology

It improves the calibration accuracy and stability of hardware circuits at different ambient temperatures, enhances the reliability and flexibility of the system, and ensures high-precision calibration of hardware circuits in long-term use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119312869A_ABST
    Figure CN119312869A_ABST
Patent Text Reader

Abstract

The invention discloses a calibration method for improving the consistency of a hardware circuit. The calibration method comprises the following steps: establishing a neural network model, acquiring data, and acquiring original data of a hardware circuit device under each gear as training data of the neural network model; model training: firstly preprocessing the training sample in the step 2 by using a StandScaler method, inputting the preprocessed training sample into a neural network, and training by using an Adam algorithm; application and calibration are carried out, and after the neural network model is obtained, neural network model calibration and correction are carried out on output and measurement of a calibration hardware circuit. According to the method, training samples of the neural network are gradually expanded in the periodic calibration process, the adaptability of the neural network to different environment temperatures is improved, the calibration accuracy is improved, a hardware circuit can still keep high calibration precision in the long-term use process, and the stability and reliability of a system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of integrated circuit automatic testing, and in particular to a calibration method for improving the consistency of hardware circuits. Background Art

[0002] There are a large number of circuits in integrated circuit test equipment that need to be calibrated, including voltage sources, current sources, arbitrary waveform generators, etc., which are usually mainly composed of AD, DA, operational amplifiers and other circuits. Because such devices need to provide accurate voltage and current signals to the device under test, but because the components such as AD, DA and operational amplifiers they contain have linear or nonlinear errors, the original circuit devices cannot meet the high-precision signal generation capabilities. Therefore, each device needs to be specially calibrated before actual use, and the calibration method will be used.

[0003] The calibration method of the prior art usually regards the circuit device composed of AD, DA and operational amplifier as a linear signal generating device, and then obtains the gain and deviation of the linear system composed of the input and output of the device under the condition of meeting the accuracy requirements through the linear regression method, and operates on the input x, and uses the calculation formula gain*x+offset to obtain the calibrated output y, and then the calibration result can be obtained.

[0004] However, this calibration method does not correct or adapt to the external ambient temperature during the calibration process, which affects the calibration accuracy of the hardware. Summary of the invention

[0005] The object of the present invention is to provide a calibration method for improving the consistency of a hardware circuit, so as to solve the problems raised in the above background technology.

[0006] To achieve the above object, the present invention provides the following technical solution: a calibration method for improving the consistency of a hardware circuit, comprising the following specific steps:

[0007] Step 1: Establish the neural network model;

[0008] Step 2: Data acquisition, the original data of the hardware circuit device at each gear is acquired as training data for the neural network model;

[0009] Step 3: Model training. First, the training samples in step 2 are preprocessed using the StandardScaler method, and the preprocessed training samples are input into the neural network for training using the Adam algorithm.

[0010] Step 4: Apply and calibrate. After obtaining the neural network model, calibrate the hardware circuit output and measure to perform neural network model calibration correction, set the calibration cycle time, regularly obtain the original calibration data, and train the neural network model based on the updated data set.

[0011] Preferably, in the step one, when correcting the measurement of the hardware circuit device, for the neural network model, the hardware circuit measurement value, gear position and temperature value need to be used as the input of the model at the same time, and the multimeter measurement value is used as the expected value of the neural network output. At the same time, for the nonlinear output segment or measurement segment of the device, due to the characteristics of the neural network model itself, fitting is performed. The model establishment method in the step one is to take the output of the corrected hardware circuit device as an example. For the neural network model, the actual output value, gear position and temperature of the hardware circuit need to be used as the input of the model at the same time, and the expected value specified by the user is used as the expected value of the neural network output. Then, the neural network model adopts a three-layer fully connected neural network structure, the nodes are linearly linked, and an activation function is added between the input layer and the hidden layer.

[0012] Preferably, in the step 2, when the control circuit device is output or measured, it is not corrected. When calibrating the output, its output is connected to a multimeter, and the multimeter measurement value is recorded as a reference value. Then the calibration measurement is performed, and the external input is measured using a multimeter, and the multimeter measurement value is recorded as a reference value. In the step 2, the hardware circuit device is controlled to apply or measure each applied value or measured value of the required calibration gear to form a sufficient number of training samples, and each training data is recorded. The training data acquisition in the step 2 simultaneously acquires the training sample data output or measured by the control circuit device, and stores the acquired data in a database to ensure that the data accuracy is not lost. In the step 2, the preprocessed data is randomly divided into two groups, a training set and a test set, with a ratio of 8:2. The test set data does not participate in the training process, so as to be used as a reference for judging whether the accuracy of the neural network reaches the threshold during training. In the step 3, the parameters of the training model are acquired after the training is completed, and saved to the host computer for subsequent applications.

[0013] Preferably, the hardware circuit board card in step 2 has different characteristics, so that each gear of the board card contains a series of parameters for calculating the applied value or measured value used in the calibration process. Taking the forward voltage gear of this board card as an example, the applied value is calculated as follows:

[0014]

[0015] Among them, Limit PosHigh is the positive maximum coefficient, Limit PosLow is the minimum positive coefficient, V range is the gear value, nPosSample is the number of points taken in the forward direction, i∈[0,n Possample ].

[0016] Preferably, in the step 2, when the calibration hardware circuit is output, a piece of data in the training sample includes the expected value, gear, temperature and the final actual output value of the hardware circuit specified by the user; when the calibration hardware circuit is measured, a piece of data in the training sample includes the hardware circuit measurement value, gear, temperature and multimeter measurement value; in the step 4, the original data obtained during the periodic calibration is additionally saved in the host computer database or the storage Flash chip carried by the hardware circuit to meet the certain calibration cycle of the hardware circuit with precision requirements.

[0017] Preferably, the StandardScaler method in step 3 converts the input data into normally distributed data with a mean of 0 and a standard deviation of 1, and its formula is expressed as:

[0018]

[0019] Among them, σ represents the data mean and μ represents the standard deviation.

[0020] Preferably, the Adam algorithm in step three is specifically to set the learning rate to 0.0001 and the number of training samples batch_size to 64 during training, and the iteration termination condition is set to the accuracy of the test set data calculated by the neural network model is less than the set threshold, and finally the neural network model parameters are calculated.

[0021] Preferably, the application of the step 4 when calibrating the output of the hardware circuit is to apply the neural network model through the host computer, and the expected value, gear position and collected temperature information of the user input obtained by the host computer are used as the input of the neural network model, and the corrected device input value is deduced to control the calibration of the circuit device, or the neural network model is sent to the FPGA, and the host computer sends instructions to control the circuit device to output as before, and then the process of deriving the corrected hardware circuit input value by the neural network model according to the temperature information, gear position and expected value is completed in the FPGA.

[0022] Preferably, the model training in step three is performed using normalized data. If the parameters of the model are directly saved, the normalized parameters need to be saved separately in actual application, and the normalized neural network input value needs to be calculated before forward propagation and denormalized after the output result is obtained by forward propagation calculation. There are two methods for actual calibration correction: software calibration and hardware FPGA calibration. For the 3-layer neural network model used for calibration in this method, as an example, assuming that the number of nodes in the first layer is n. l, according to the forward propagation formula and the formula of the StandardScaler normalization method, the calculation formula for each node in the second layer is:

[0023]

[0024] Among them, f (2) Use the activation function for the second layer, is the weight from the jth node in the first layer to the ith node in the second layer, is the bias of the i-th node in the second layer, is the jth node in the first layer, i.e. the jth input, μ j is the mean of the input data of the jth node in the input layer, σ j is the standard deviation of the jth node in the input layer;

[0025] Similarly, for the third layer, there is only one output node and no activation function, that is, the final calibration correction result formula is:

[0026]

[0027] Among them, μ out is the mean of the input data of the output layer node, σ out is the standard deviation of the output layer nodes.

[0028] Preferably, the application of the step 4 in the measurement of the calibrated hardware circuit is to apply the neural network model through the host computer, the hardware circuit directly returns the unprocessed original measurement value, the host computer processes the original measurement value, the gear position and the collected temperature information as the input of the neural network model, and derives the corrected measurement value for calibration, or the neural network model is sent to the FPGA, the host computer sends instructions to control the circuit device to measure as before, and then the process of deriving the corrected hardware circuit measurement value from the neural network model according to the temperature information, gear position and the hardware circuit measurement value is completed in the FPGA.

[0029] Technical effects and advantages of the present invention:

[0030] (1) The present invention can increase the adaptability of the neural network to different ambient temperatures and improve the accuracy of calibration by gradually expanding the training samples of the neural network during the periodic calibration process, thereby facilitating the hardware circuit to maintain a high calibration accuracy during long-term use, thereby improving the stability and reliability of the system;

[0031] (2) The present invention can model and correct these nonlinear relationships through a method based on a neural network model, making the calibration more accurate and reliable, which is beneficial to correct the nonlinear relationship of the hardware circuit to increase the accuracy of the hardware circuit calibration;

[0032] (3) The present invention can calibrate the output or measurement of multiple gears, thereby making the hardware circuit more flexible and applicable to different scenarios in practical applications, thereby increasing the advantages in the storage and use process;

[0033] (4) The method based on the neural network model of the present invention can calibrate the output and measurement of multiple gears at the same time, taking the temperature factor into consideration, taking the temperature factor as input, and establishing a cyclic calibration mechanism, which is beneficial to improving the consistency of the output or measurement of the hardware circuit device under different ambient temperatures, making the hardware circuit perform more stably and reliably under different environmental conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 Schematic diagram of the neural network calibration ATE control flow of the present invention.

[0035] Figure 2 Schematic diagram of the neural network calibration process of the present invention.

[0036] Figure 3 Schematic diagram of the neural network model training process of the present invention.

[0037] Figure 4 It is a schematic diagram of the forward propagation and reverse propagation process of the present invention.

[0038] Figure 5 This is a schematic diagram of the output flow of the circuit device for calibrating neural network parameters according to the present invention.

[0039] Figure 6 This is a schematic diagram of the measurement process of the circuit device for calibrating the neural network model of the present invention.

[0040] Figure 7 Schematic diagram of the training mechanism for acquiring and preserving raw data in the periodic calibration of the present invention.

[0041] Figure 8 This is a schematic diagram of the calibration and linear calibration of the neural network model under temperature variation with an output of 0.45V according to the present invention.

[0042] Fig. 9 This is a schematic diagram of the calibration and linear calibration of the neural network model under temperature variation with an output of 0.85V according to the present invention.

[0043] Fig.10 This is a schematic diagram of the nonlinear output section of a hardware circuit calibrated using a neural network model in the present invention.

[0044] Fig.11 This is a schematic diagram of the calibration and linear calibration of the neural network model under temperature variation with an output of -8.5V according to the present invention.

[0045] Fig.12This is a schematic diagram of the calibration and linear calibration of the neural network model under temperature variation with an output of 2.25V according to the present invention. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] Embodiment 1

[0048] The present invention provides Figure 1-12 A calibration method for improving the consistency of hardware circuits shown in the figure includes establishing a neural network model. Taking the output of a hardware circuit device as an example, for the neural network model, the actual output value, gear position and temperature of the hardware circuit need to be used as the input of the model at the same time, and the expected value specified by the user is used as the output of the neural network as the expected value. Then, the neural network model adopts a three-layer fully connected neural network structure, with linear links between nodes, and an activation function is added between the input layer and the hidden layer. The activation function is ReLU. When correcting the measurement of the hardware circuit device, for the neural network model, the hardware circuit measurement value, gear position and temperature value need to be used as the input of the model at the same time, and the multimeter measurement value is used as the output of the neural network as the expected value. At the same time, for the nonlinear output segment or measurement segment of the device, due to the characteristics of the neural network model itself, fitting is performed, wherein Figure 8 The expected output voltage is 0.45V. Fig.11 To measure -8.5V using the 10V range, Fig.12 To measure 2.25V using the 5V range, Figure 5 and Figure 6 Corresponding to two upper computer operation modes respectively. Figure 5 Output and measure for the test project or user in the host computer, Figure 6 Measure and obtain data for users in the host computer and send measurement instructions. Figure 5 and Figure 6 The a's are all applied by software calibration, and the b's are all applied by board FPGA.

[0049] The original calibration data is obtained, and the original data of the hardware circuit device at each gear is obtained as the training data of the neural network model. At the same time, the training sample data output or measured by the control circuit device is obtained, and the obtained data is stored in the database to ensure that the data accuracy is not lost. When the control circuit device is output or measured, it is not corrected. When calibrating the output, its output is connected to a multimeter, and the multimeter measurement value is recorded as a reference value, and then the calibration measurement is performed. At the same time, the multimeter is used to measure the external input, and the multimeter measurement value is recorded as a reference value. In the step 2, the hardware circuit device is controlled to apply or Measure the applied values ​​or measured values ​​of the required calibration gears to form a sufficient number of training samples, and record each piece of training data. When outputting the calibration hardware circuit, one piece of data in the training sample includes the user-specified expected value, gear, temperature and the final actual output value of the hardware circuit. When measuring the calibration hardware circuit, one piece of data in the training sample includes the hardware circuit measurement value, gear, temperature and multimeter measurement value. The hardware circuit board itself has different characteristics. Each gear of the board contains a series of parameters for calculating the applied value or measured value used in the calibration process. Taking the forward voltage gear of this board as an example, the applied value calculation method is as follows:

[0050]

[0051] Among them, Limit PosHigh is the positive maximum coefficient, Limit PosLow is the minimum positive coefficient, V range is the gear value, n PosSample is the number of points taken in the forward direction, i∈[0,n Possample ].

[0052] These parameters are saved in the calibration parameter database. When the upper computer executes the calibration project, they are read and used according to the calibration gear executed. The output end of the hardware circuit device is connected to the multimeter. During the calibration process, the multimeter measurement value is used as a reference value. The calibration project is executed cyclically according to the set parameters to collect raw data. During the execution process, the user-specified expected value, gear, temperature, and the final actual output value of the hardware circuit are recorded, and the above training samples are stored in the database.

[0053] For single neural network model training, the training samples in step 2 are first preprocessed using the StandardScaler method, and the preprocessed data are randomly divided into two groups: training set and test set, with a ratio of 8:2. The test set data does not participate in the training process, but is used as a reference for judging whether the accuracy of the neural network reaches the threshold during training. The preprocessed training samples are then input into the neural network for training using the Adam algorithm. After the training, the parameters of the training model are obtained and saved to the host computer for subsequent applications. The Adam algorithm specifically sets the learning rate to 0.0001 and the batch_size of the number of training samples to 64 during training. At the same time, the iteration termination condition is set to the accuracy of the test set data calculated by the neural network model is less than the set threshold. Finally, the neural network model parameters are calculated, as shown in Figure 3 As shown, the StandardScaler method converts the input data into normally distributed data with a mean of 0 and a standard deviation of 1. The formula is:

[0054]

[0055] Among them, σ represents the data mean and μ represents the standard deviation.

[0056] Since the training process uses normalized data for training, if the model parameters are saved directly, the normalized parameters need to be saved separately in actual application, and the normalized neural network input value needs to be calculated before forward propagation and denormalized after the output result is obtained by forward propagation calculation. There are two methods for actual calibration correction: software calibration and hardware FPGA calibration. For the 3-layer neural network model used in this method, let the number of nodes in the lth layer be n. l , according to the forward propagation formula and the formula of the StandardScaler normalization method, the calculation formula for each node in the second layer is:

[0057]

[0058] Among them, f (2) Use the activation function for the second layer, is the weight from the jth node in the first layer to the ith node in the second layer, is the bias of the i-th node in the second layer, is the jth node in the first layer, i.e. the jth input, μ j is the mean of the input data of the jth node in the input layer, σ j is the standard deviation of the jth node in the input layer.

[0059] Similarly, for the third layer, there is only one output node and no activation function, that is, the final calibration correction result formula is:

[0060]

[0061] Among them, μ out is the mean of the input data of the output layer node, σ out is the standard deviation of the output layer nodes.

[0062] For the parameters W of the neural network model used here (2) , b (2) , W (3) , b (3) , after integrating the normalized parameters:

[0063]

[0064]

[0065]

[0066]

[0067] According to the above method, the neural network model parameters with the original data scale as input and output can be obtained and saved to the host computer for subsequent use.

[0068] The application of the neural network model, after obtaining the neural network model, calibrates the hardware circuit output and measures to perform the neural network model calibration and correction application. When calibrating the hardware circuit output, the neural network model is applied through a host computer. The expected value, gear position and temperature information of the user input processed by the host computer are used as the input of the neural network model to deduce the corrected device input value to control the circuit device calibration, or the neural network model is sent to the FPGA. The host computer sends instructions to control the circuit device to output as before. Then, according to the temperature information, gear position and expected value, the process of deriving the corrected hardware circuit input value from the neural network model is completed in the FPGA. When calibrating the hardware circuit measurement, the neural network model is applied through a host computer. The hardware circuit directly returns the unprocessed original measurement value. The host computer processes the original measurement value, gear position and temperature information collected as the input of the neural network model to deduce the corrected measurement value for calibration, or the neural network model is sent to the FPGA. The host computer sends instructions to control the circuit device to measure as before. Then, according to the temperature information, gear position and the hardware circuit measurement value, the process of deriving the corrected hardware circuit measurement value from the neural network model is completed in the FPGA.

[0069] like Figure 5As shown in the flowchart a above, when executing user instructions, there will be an additional software correction process before sending the original instructions to the circuit device. Specifically, the software first reads the neural network model parameters saved in the previous step. Before executing the test project and sending the instructions, it will read the current temperature once, and use the expected output, gear position and temperature contained in the original user instructions as the input of the neural network, and obtain the output value corrected by the neural network through forward propagation calculation.

[0070] Apply and calibrate, set the calibration cycle time, regularly obtain the original calibration data, and train the neural network model based on the updated data set. The regularly obtained original calibration data is added and saved in the host computer database or the storage Flash chip carried by the hardware circuit to meet the hardware circuit with accuracy requirements. There is a certain calibration cycle. The process of obtaining, saving and using the original calibration data during periodic calibration is as follows: Figure 7 As shown, the actual operation steps of periodic calibration are the same as those of single calibration. The calibration project is also used to obtain the original calibration data. At this time, it will be added and saved in the database, and then the neural network model is trained using the method described in step three to obtain a new set of neural network model parameters for calibrating the hardware circuit. In order to verify the advantages of this invention method, the Gain-Offset method is also used to calibrate the board, that is, the original linear correction method is used to correct the expected output of the control hardware circuit device to compare the effects of the two calibrations, and the ambient temperature is slowly changed in the process to more clearly compare the advantages and disadvantages of the two calibration methods. The comparison results are shown in the attached figure. Figure 8 and attached Fig. 9 As shown, the horizontal axis represents temperature and the vertical axis represents output voltage. Here, the output voltages of the two output values ​​of the 1V gear of this board are measured after calibration in two ways at different temperatures. The horizontal solid line is the expected value, and the two horizontal dotted lines are the accuracy thresholds set by the board. It can be seen that calibration using a neural network can largely correct the impact of temperature on circuit devices and keep the output accuracy within the accuracy threshold range.

[0071] Embodiment 2

[0072] In contrast to the first embodiment, in this embodiment, a neural network model is used in FPGA to process user instructions issued by a host computer, and a neural network is used directly at the FPGA level to correct circuit devices.

[0073] The entire calibration process is similar to that shown in Example 1. Figure 2 process Figure 1 In the calibration correction steps, refer to Figure 6 The flowchart shown in b will pass the neural network model parameters to the FPGA in advance when the circuit device is powered on.

[0074] When the host computer sends a user instruction to the test equipment, the FPGA will read the temperature and use the gear position and expected output contained in the instruction as the input value of the neural network. After forward propagation calculation, it obtains the corrected circuit device input and controls the circuit device to make the specified output.

[0075] As described in the parameter acquisition in Example 1, since the neural network model parameters obtained by machine learning training have been merged with the normalized parameters, the resource usage overhead of the FPGA can be greatly reduced during FPGA storage and calculation.

[0076] Embodiment 3

[0077] In order to better verify and illustrate the beneficial effects obtained by the technical method adopted in the method of the present invention, the circuit device selected in this embodiment has an obvious nonlinear output relationship in its usage gear, so as to verify that the nonlinear output relationship of the circuit device can also be calibrated and corrected by the method of the present invention.

[0078] When the original Gain-Offset method is used to calibrate the board, only the linear relationship segment of the board can be used for rough correction. For its nonlinear relationship segment, the expected accuracy is still not met when the Gain-Offset calibration method is used.

[0079] After the steps of data acquisition, model training and calibration correction, the neural network model parameters are obtained and used to correct the device. At the same time, the original Gain-Offset linear correction method is also used to perform output calibration correction on the device.

[0080] The comparison results are as follows Fig.10 As shown, the horizontal axis is the expected output and the vertical axis is the actual output. Since the Gain-Offset method is still a linear correction for the output, the device has an obvious nonlinear output relationship between 0-6V in the positive direction that cannot be calibrated and corrected. It can be clearly observed that after applying the neural network model used in the method of the present invention, the original nonlinear output relationship of the circuit device can be calibrated and corrected, showing the advantage of neural network model calibration in calibrating the nonlinear output segment of hardware circuit devices.

[0081] Embodiment 4

[0082] In this embodiment, a neural network is used to calibrate each gear of the circuit device during measurement. Figure 2 The neural network calibration flow chart shown is calibrated. The difference from the first embodiment is that in this embodiment, since the measurement gear is calibrated, the training data, model input and output are different.

[0083] In the first stage of data acquisition, the data required to be recorded for the original training samples are changed to the board self-test value, gear position, temperature and multimeter measurement value. In the second stage of model training, the input required as the input of the neural network model is the board self-test value, gear position and temperature, and the multimeter measurement value is the output of the neural network.

[0084] Then, during the third stage of calibration, use the attached Figure 6 The process shown in FIG. 1 is used to calibrate and correct the measured value. As in the first and second embodiments, when the neural network is used to calibrate and correct the measured gear, software calibration or FPGA calibration can also be used. For the specific process, see the attached Figure 6 As shown in a and b above.

[0085] In this embodiment, software calibration is used as an example. After the hardware circuit obtains the original measurement data, the ATE control software applies the neural network model and uses the original measurement value, gear position and temperature as model input to obtain the corrected measurement value. At the same time, the data obtained by using the traditional Gain-Offset calibration method are compared. The comparison results are shown in Fig.11 and Fig.12 In the figure, the horizontal axis represents temperature, and the vertical axis represents the measurement accuracy. Fig.11 In the figure, the 10V measurement gear is used for measurement, and the measured voltage is -8.5V. Under different ambient temperatures, the accuracy difference between the Gain-Offset calibration method and the calibration using the neural network model is compared. The two horizontal dotted lines represent the accuracy threshold of the gear setting. Fig.12 In the figure, the 5V measuring gear is used for measurement, and the measured voltage is 2.25V. By comparing the values ​​under different ambient temperatures, it can be clearly seen that the self-test value obtained by the neural network model described in the method of the present invention can well eliminate the influence of temperature and maintain good accuracy. Figure 6 The method of using FPGA to calibrate the circuit measurement gear position shown in b above is roughly the same as that in this embodiment, and will not be elaborated here.

[0086] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A calibration method for improving the consistency of a hardware circuit, characterized in that: The specific steps include: Step 1: Establish the neural network model; Step 2: Data acquisition, the original data of the hardware circuit device at each gear is acquired as training data for the neural network model; Step 3: Model training. First, the training samples in step 2 are preprocessed using the StandardScaler method, and the preprocessed training samples are input into the neural network for training using the Adam algorithm. Step 4: Apply and calibrate. After obtaining the neural network model, calibrate the hardware circuit output and measure to perform neural network model calibration correction, set the calibration cycle time, regularly obtain the original calibration data, and train the neural network model based on the updated data set.

2. A calibration method for improving the consistency of a hardware circuit according to claim 1, characterized in that: When correcting the measurement of the hardware circuit device in the step one, for the neural network model, the hardware circuit measurement value, gear position and temperature value need to be used as the input of the model at the same time, and the multimeter measurement value is used as the expected value of the neural network output. At the same time, for the nonlinear output segment or measurement segment of the device, due to the characteristics of the neural network model itself, fitting is performed. The model establishment method in the step one is to take the output of the corrected hardware circuit device as an example. For the neural network model, the actual output value, gear position and temperature of the hardware circuit need to be used as the input of the model at the same time, and the expected value specified by the user is used as the expected value of the neural network output. Then, the neural network model adopts a three-layer fully connected neural network structure, the nodes are linearly linked, and an activation function is added between the input layer and the hidden layer.

3. A calibration method for improving the consistency of a hardware circuit according to claim 1, characterized in that: In the step 2, when the control circuit device is output or measured, it is not corrected. When calibrating the output, its output is connected to a multimeter, and the multimeter measurement value is recorded as a reference value. Then the calibration measurement is performed, and the external input is measured using a multimeter, and the multimeter measurement value is recorded as a reference value. In the step 2, the hardware circuit device is controlled to apply or measure each applied value or measured value of the required calibration gear to form a sufficient number of training samples, and each training data is recorded. The training data acquisition in the step 2 simultaneously acquires the training sample data output or measured by the control circuit device, and stores the acquired data in a database to ensure that the data accuracy is not lost. In the step 2, the pre-processed data is randomly divided into two groups, a training set and a test set, with a ratio of 8:

2. The test set data does not participate in the training process, so as to be used as a reference for judging whether the accuracy of the neural network reaches the threshold during training. In the step 3, the parameters of the training model are acquired after the training is completed, and saved to the host computer for subsequent applications.

4. A calibration method for improving the consistency of a hardware circuit according to claim 1, characterized in that: The hardware circuit board in step 2 has different characteristics, so each gear of the board contains a series of parameters for calculating the applied value or measured value used in the calibration process. Taking the forward voltage gear of this board as an example, the applied value is calculated as follows: Among them, Limit PosHigh is the positive maximum coefficient, Limit PosLow is the minimum positive coefficient, V range is the gear value, n PosSample is the number of points taken in the forward direction, i∈[0,n Possample ].

5. A calibration method for improving the consistency of a hardware circuit according to claim 1, characterized in that: In the step 2, when the calibration hardware circuit is output, a piece of data in the training sample includes the expected value, gear, temperature and the final actual output value of the hardware circuit specified by the user; when the calibration hardware circuit is measured, a piece of data in the training sample includes the hardware circuit measurement value, gear, temperature and multimeter measurement value; in the step 4, the original data obtained during the periodic calibration is additionally saved in the host computer database or the storage Flash chip carried by the hardware circuit to meet the certain calibration cycle of the hardware circuit with precision requirements.

6. A calibration method for improving the consistency of a hardware circuit according to claim 1, characterized in that: The StandardScaler method in step 3 converts the input data into normally distributed data with a mean of 0 and a standard deviation of 1. The formula is: Among them, σ represents the data mean and μ represents the standard deviation.

7. A calibration method for improving the consistency of a hardware circuit according to claim 1, characterized in that: The Adam algorithm in step three specifically sets the learning rate to 0.0001 and the batch_size of the number of training samples to 64 during training, and the iteration termination condition is set to the accuracy of the test set data calculated by the neural network model is less than the set threshold, and finally the neural network model parameters are calculated.

8. A calibration method for improving the consistency of a hardware circuit according to claim 1, characterized in that: The application of the step 4 when calibrating the output of the hardware circuit is to apply the neural network model through the host computer, and the expected value, gear position and temperature information of the user input obtained by the host computer are used as the input of the neural network model, and the corrected device input value is deduced to control the calibration of the circuit device, or the neural network model is sent to the FPGA, and the host computer sends instructions to control the circuit device to output as before, and then the process of deriving the corrected hardware circuit input value by the neural network model according to the temperature information, gear position and expected value is completed in the FPGA.

9. A calibration method for improving the consistency of a hardware circuit according to claim 1, characterized in that: The model training in step three is trained using normalized data. If the parameters of the model are saved directly, the normalized parameters need to be saved separately in actual application, and the normalized neural network input value needs to be calculated before forward propagation and denormalized after the output result is obtained by forward propagation calculation. There are two methods for actual calibration correction: software calibration and hardware FPGA calibration. For the 3-layer neural network model used for calibration in this method, assume that the number of nodes in the lth layer is n. l , according to the forward propagation formula and the formula of the StandardScaler normalization method, the calculation formula for each node in the second layer is: Among them, f (2) Use the activation function for the second layer, is the weight of the jth node in the first layer to the ith node in the second layer, is the bias of the i-th node in the second layer, is the jth node in the first layer, i.e. the jth input, μ j is the mean of the input data of the jth node in the input layer, σ j is the standard deviation of the jth node in the input layer; Similarly, for the third layer, there is only one output node and no activation function, that is, the final calibration correction result formula is: Among them, μ out is the mean of the input data of the output layer node, σ out is the standard deviation of the output layer nodes.

10. A calibration method for improving hardware circuit consistency according to claim 1, characterized in that: The application of the step 4 in the calibration hardware circuit measurement is to apply the neural network model through the host computer, the hardware circuit directly returns the unprocessed original measurement value, the host computer processes the original measurement value, the gear position and the collected temperature information as the input of the neural network model, and derives the corrected measurement value for calibration, or the neural network model is sent to the FPGA, the host computer sends instructions to control the circuit device to measure as before, and then the process of deriving the corrected hardware circuit measurement value from the neural network model based on the temperature information, gear position and hardware circuit measurement value is completed in the FPGA.

Citation Information

Patent Citations

  • Method for detecting current in inductor

    CN115684706A

  • Method and device for acquiring output current of direct current source

    CN116719378A

  • Hardware circuit calibration method and device based on machine learning

    CN118095384A

Cited By

  • Method and system for automatically testing parameters of circuit board

    CN120870831A