Current test device self-calibration method, device and equipment
By analyzing the target environment parameter information, generating a training data set and training a neural network, and establishing a target error prediction model, the test error problem of the current test device in a complex environment is solved, and high-precision testing in a complex and changing environment is achieved.
Patent Information
- Application Number
- CN202510405442.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-04-02
AI Technical Summary
Existing current test device calibration methods cannot cope with complex and changing working environments, resulting in large errors in test results.
By analyzing the target environmental parameter information, generating a training data set and training a neural network, a target error prediction model is established, and the test error of the current test device is dynamically adjusted.
In a complex and changing working environment, the test error of the current test device is dynamically adjusted to improve the test accuracy.
Smart Images

Figure CN119916282B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of current testing, and in particular to a method, device and equipment for self-calibration of a current testing device. Background Art
[0002] Current test devices are widely used in power systems, electronic equipment, laboratory measurements, and other fields to accurately measure current. With the rapid development of modern industrial automation, the Internet of Things, and smart grids, the accuracy and stability of current test devices are particularly important. However, the test results of current test devices may be affected by a variety of environmental factors, such as temperature, humidity, atmospheric pressure, and electromagnetic interference. These factors affect the test accuracy of the current test device. Existing calibration methods for current test devices usually use fixed calibration values to correct the test results of the current test device. This calibration method cannot cope with complex and changing working environments, which in turn leads to large errors in the test results of the current test device. Summary of the Invention
[0003] The present application provides a current test device self-calibration method, device and equipment to solve the problems raised by the above background technology.
[0004] In a first aspect, the present application provides a current testing device self-calibration method, comprising:
[0005] Analyzing target environmental parameter information related to a test error of the current test device; the target environmental parameter information includes a plurality of target environmental parameters;
[0006] respectively determining a parameter range corresponding to each target environmental parameter in the working environment of the current testing device;
[0007] A training data set is generated based on the current value range of the current testing device and the parameter interval corresponding to each of the target environmental parameters; wherein the training data set includes a plurality of mapping relationships, each of which is a mapping relationship between an independent variable data group and its corresponding test error, and each of the independent variable data groups includes a parameter value corresponding to each of the target environmental parameters and a current test value;
[0008] Training a preset neural network based on the training data set to obtain a target error prediction model;
[0009] During the operation of the current testing device, the test value of the current testing device is calibrated based on the target error prediction model.
[0010] In a possible implementation, analyzing target environmental parameter information related to a test error of the current testing device includes:
[0011] Connecting the current testing device to a preset test circuit and inputting a constant current into the current testing device through the test circuit; the test circuit is located in a closed space with adjustable environmental conditions;
[0012] For any environmental parameter, the environmental state in the enclosed space is adjusted based on the environmental parameter change curve corresponding to the environmental parameter, and the parameter values of the remaining environmental parameters in the enclosed space except the environmental parameter are kept unchanged. In the process of adjusting the environmental state in the enclosed space, it is determined whether the current test value output by the current testing device has changed. If the current test value output by the current testing device has changed, the environmental parameter is determined to be the target environmental parameter; each of the target environmental parameters constitutes the target environmental parameter information.
[0013] In a possible implementation, generating a training data set based on the current value range of the current testing device and the parameter interval corresponding to each target environmental parameter includes:
[0014] Determining a plurality of current standard values within the current value range with a step size of 0.001 A to obtain a current standard value set;
[0015] For each of the target environmental parameters, determining a plurality of parameter values in a parameter interval corresponding to the target environmental parameter with a preset step size corresponding to the target environmental parameter, to obtain a parameter value set corresponding to the target environmental parameter;
[0016] Performing a Cartesian product operation on the current standard value set and each parameter value set to obtain a plurality of independent variable data groups;
[0017] For each of the independent variable data groups, a test error corresponding to the independent variable data group is generated based on a preset test error generation method, and a mapping relationship between the independent variable data group and the test error is constructed; each of the mapping relationships constitutes the training data set.
[0018] In a possible implementation, generating the test error corresponding to the independent variable data set based on a preset test error generation method includes:
[0019] Connecting the current testing device to a preset test circuit; the test circuit is located in a closed space with adjustable environmental conditions;
[0020] For each of the independent variable data groups, the environmental state of the enclosed space is set based on the environmental parameter values corresponding to the independent variable data group, and a current whose current value is the current standard value corresponding to the independent variable data group is input into the current testing device through the test circuit, and the current test value output by the current testing device is obtained, and the current standard value is used to subtract the current test value to obtain the test error corresponding to the independent variable data group.
[0021] In one possible implementation, the training of a preset neural network based on the training data set to obtain a target error prediction model includes:
[0022] Dividing the training data set into a training set and a validation set;
[0023] For each mapping relationship in the training set, the independent variable data group corresponding to the mapping relationship is used as the input of the neural network, and the test error corresponding to the mapping relationship is used as the output of the neural network to train the neural network to obtain an initial error prediction model;
[0024] The model parameters of the initial error prediction model are optimized based on a preset annealing algorithm and the verification set to obtain the target error prediction model.
[0025] In one possible implementation, optimizing the model parameters of the initial error prediction model based on a preset annealing algorithm and the validation set to obtain the target error prediction model includes:
[0026] Calculate the initial mean square error corresponding to the initial error prediction model based on the validation set;
[0027] Randomly perturb each model parameter of the initial error prediction model based on a preset random perturbation algorithm to generate a first parameter solution; the first parameter solution includes first intermediate parameters corresponding to each model parameter of the initial error prediction model;
[0028] Calculate a first intermediate mean square error corresponding to the first parameter solution based on the verification set;
[0029] comparing the initial mean square error with the first intermediate mean square error;
[0030] Determining a second parameter solution and a first target mean square error based on a comparison result of the initial mean square error and the first intermediate mean square error, and determining a first target temperature based on a preset cooling algorithm and an initial temperature; the second parameter solution includes second intermediate parameters corresponding to each model parameter of the initial error prediction model;
[0031] Calculate a second intermediate mean square error corresponding to the second parameter solution based on the verification set;
[0032] comparing the first target mean square error with the second intermediate mean square error;
[0033] determining a third parameter solution and a second target mean square error based on a comparison result of the first target mean square error and the second intermediate mean square error, and determining a second target temperature based on a preset cooling algorithm and the first target temperature;
[0034] iteratively determining the second parameter solution and the first target mean square error based on the comparison result of the initial mean square error and the first intermediate mean square error, and determining the first target temperature based on a preset cooling algorithm and the initial temperature until the final target temperature is less than the preset temperature, and determining the parameter solution corresponding to the target mean square error corresponding to the final target temperature as the target parameter solution;
[0035] The model parameters of the initial error prediction model are updated based on the target parameter solution to obtain the target error prediction model.
[0036] In one possible implementation, determining the second parameter solution and the first target mean square error based on a comparison result of the initial mean square error and the first intermediate mean square error, and determining the first target temperature based on a preset cooling algorithm and an initial temperature includes:
[0037] If the first intermediate mean square error is not greater than the initial mean square error;
[0038] Randomly perturb each model parameter of the first parameter solution based on the random perturbation algorithm to generate a second parameter solution, and determine the first intermediate mean square error as the first target mean square error, and determine the initial temperature as the first target temperature;
[0039] If the first intermediate mean square error is greater than the initial mean square error, based on
[0040] Calculate the selection probability of the first parameter solution; wherein, is the selection probability, is the difference between the first intermediate mean square error and the initial mean square error, is the initial temperature;
[0041] Randomly generate a target value in the interval (0, 1), and compare the target value with the selection probability;
[0042] If the selection probability is not greater than the target value, randomly perturb each model parameter of the initial error prediction model based on the random perturbation algorithm to generate a second parameter solution, and determine the initial mean square error as the first target mean square error, and determine the initial temperature as the first target temperature;
[0043] If the selection probability is greater than the target value, the model parameters of the first parameter solution are randomly perturbed based on the random perturbation algorithm to generate a second parameter solution, and the first intermediate mean square error is determined to be the first target mean square error, and the initial temperature is cooled based on a preset cooling coefficient to obtain the first target temperature.
[0044] In a second aspect, the present application provides a current testing device self-calibration device, comprising:
[0045] An analysis module, configured to analyze target environment parameter information related to a test error of the current test device; the target environment parameter information includes a plurality of target environment parameters;
[0046] A determination module, configured to respectively determine a parameter range corresponding to each target environmental parameter in the working environment of the current testing device;
[0047] a generating module, configured to generate a training data set based on the current value range of the current testing device and the parameter interval corresponding to each of the target environmental parameters; wherein the training data set includes a plurality of mapping relationships, each of which is a mapping relationship between an independent variable data group and its corresponding test error, and each of the independent variable data groups includes a parameter value corresponding to each of the target environmental parameters and a current test value;
[0048] A training module, configured to train a preset neural network based on the training data set to obtain a target error prediction model;
[0049] A calibration module is used to calibrate the test value of the current testing device based on the target error prediction model during the operation of the current testing device.
[0050] In a third aspect, the present application provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the self-calibration method of the current testing device as described in any one of the above items is implemented.
[0051] The present application provides a method, apparatus, and device for self-calibration of a current test device, the method comprising: analyzing target environment parameter information related to the test error of the current test device; the target environment parameter information comprising a plurality of target environment parameters; respectively determining the parameter interval corresponding to each of the target environment parameters in the working environment of the current test device; generating a training data set based on the current value range of the current test device and the parameter interval corresponding to each of the target environment parameters; wherein the training data set comprises a plurality of mapping relationships, the mapping relationships being mapping relationships between an independent variable data set and its corresponding test error, the independent variable data set comprising parameter values corresponding to each of the target environment parameters and current test values; training a preset neural network based on the training data set to obtain a target error prediction model; and calibrating the test value of the current test device based on the target error prediction model during the operation of the current test device. This method achieves dynamic adjustment of the test error of the current test device in a complex and changing working environment, which helps to improve the test accuracy of the current test device. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0053] Figure 1 A schematic diagram of a flow chart of a self-calibration method for a current testing device provided in an embodiment of the present application;
[0054] Figure 2 A schematic block diagram of the structure of a self-calibration device for a current test device provided in an embodiment of the present application;
[0055] Figure 3 A schematic block diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0057] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.
[0058] It should also be understood that the terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0059] It should be further understood that the term "and / or" used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0060] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments may be combined with each other.
[0061] See also Figure 1 , Figure 1 A flow chart of a self-calibration method for a current test device provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the current testing device self-calibration method provided in the embodiment of the present application includes steps S1 to S5.
[0062] Step S1: Analyze target environment parameter information related to a test error of a current test device; the target environment parameter information includes a plurality of target environment parameters.
[0063] The target environmental parameters include but are not limited to temperature, humidity, light intensity and atmospheric pressure.
[0064] Specifically, step S1 includes the following steps:
[0065] Connecting the current testing device to a preset test circuit and inputting a constant current into the current testing device through the test circuit; the test circuit is located in a closed space with adjustable environmental conditions, and the closed space is provided with an environmental condition adjustment device, the environmental condition adjustment device including but not limited to a temperature adjustment module, a humidity adjustment module, a light intensity adjustment module, and an atmospheric pressure adjustment module;
[0066] For any environmental parameter, the environmental state in the enclosed space is adjusted based on the environmental parameter change curve corresponding to the environmental parameter, and the parameter values of the remaining environmental parameters in the enclosed space except the environmental parameter are kept unchanged. In the process of adjusting the environmental state in the enclosed space, it is determined whether the current test value output by the current testing device has changed. If the current test value output by the current testing device has changed, the environmental parameter is determined to be the target environmental parameter; each of the target environmental parameters constitutes the target environmental parameter information.
[0067] It can be understood that the above-mentioned method of analyzing target environmental parameter information related to the test error of the current testing device can effectively identify the target environmental parameters related to the measurement error of the current testing device, and on the one hand, provides a reliable basis for the subsequent training of the target error prediction model.
[0068] Step S2: respectively determining the parameter range corresponding to each target environmental parameter in the working environment of the current testing device.
[0069] Specifically, historical parameter value information of each environmental parameter in the working environment where the current testing device is located is obtained, and for each environmental parameter, the interval between the minimum value and the maximum value in the historical parameter value information corresponding to the environmental parameter is determined as the parameter interval corresponding to the environmental parameter.
[0070] Step S3, generating a training data set based on the current value range of the current testing device and the parameter interval corresponding to each of the target environmental parameters; wherein the training data set includes multiple mapping relationships, the mapping relationship is a mapping relationship between an independent variable data group and its corresponding test error, and the independent variable data group includes the parameter value corresponding to each of the target environmental parameters and the current test value.
[0071] Specifically, step S3 includes the following steps:
[0072] Determining a plurality of current standard values within the current value range with a step size of 0.001 A to obtain a current standard value set;
[0073] For each of the target environmental parameters, determining a plurality of parameter values in a parameter interval corresponding to the target environmental parameter with a preset step size corresponding to the target environmental parameter, to obtain a parameter value set corresponding to the target environmental parameter;
[0074] Performing a Cartesian product operation on the current standard value set and each of the parameter value sets to obtain a plurality of independent variable data sets; wherein the result of the Cartesian product operation is all possible sets obtained by arbitrarily extracting a parameter value from each of the current standard value set and each of the parameter value sets;
[0075] For each of the independent variable data groups, a test error corresponding to the independent variable data group is generated based on a preset test error generation method, and a mapping relationship between the independent variable data group and the test error is constructed; each of the mapping relationships constitutes the training data set.
[0076] It can be understood that the above-mentioned method of generating a training data set based on the current value range of the current testing device and the parameter interval corresponding to each target environmental parameter determines the current standard value set and the parameter value set corresponding to each target environmental parameter, and performs Cartesian product operations on the current standard value set and each parameter value set to obtain multiple independent variable data groups. It can systematically cover the effective test conditions, ensure the integrity and representativeness of the training data set, help enhance the reliability of the training data, and thus help train a more accurate target error prediction model.
[0077] The method for generating the test error corresponding to the independent variable data set based on a preset test error generation method includes the following steps:
[0078] Connecting the current testing device to a preset test circuit; the test circuit is located in a closed space with adjustable environmental conditions;
[0079] For each of the independent variable data groups, the environmental state of the enclosed space is set based on the environmental parameter values corresponding to the independent variable data group, and a current whose current value is the current standard value corresponding to the independent variable data group is input into the current testing device through the test circuit, and the current test value output by the current testing device is obtained, and the current standard value is used to subtract the current test value to obtain the test error corresponding to the independent variable data group.
[0080] Step S4: training a preset neural network based on the training data set to obtain a target error prediction model.
[0081] Specifically, step S4 includes the following steps:
[0082] Dividing the training data set into a training set and a validation set;
[0083] For each mapping relationship in the training set, the independent variable data group corresponding to the mapping relationship is used as the input of the neural network, and the test error corresponding to the mapping relationship is used as the output of the neural network to train the neural network to obtain an initial error prediction model;
[0084] The model parameters of the initial error prediction model are optimized based on a preset annealing algorithm and the verification set to obtain the target error prediction model.
[0085] It can be understood that the above-mentioned method of training the preset neural network based on the training data set to obtain the target error prediction model uses the global search capability of the annealing algorithm to find the approximately optimal model parameters in the parameter space corresponding to the initial error prediction model, which helps to improve the prediction accuracy of the target error prediction model.
[0086] The step of optimizing the model parameters of the initial error prediction model based on the preset annealing algorithm and the validation set to obtain the target error prediction model includes the following steps:
[0087] Calculate the initial mean square error corresponding to the initial error prediction model based on the validation set; specifically, by Calculate the initial mean square error corresponding to the initial error prediction model, where: is the initial mean square error, Representative validation set includes A mapping relationship, Indicates the validation set The standard error value corresponding to the mapping relationship is Indicates that the validation set The prediction error value obtained by inputting the independent variable data group corresponding to the mapping relationship into the initial error prediction model;
[0088] Randomly perturb each model parameter of the initial error prediction model based on a preset random perturbation algorithm to generate a first parameter solution; the first parameter solution includes a first intermediate parameter corresponding to each model parameter of the initial error prediction model; specifically, based on the random perturbation algorithm, each model parameter of the initial error prediction model is increased or decreased by a small variable, wherein the small variable is no greater than 0.1;
[0089] Calculating a first intermediate mean square error corresponding to the first parameter solution based on the validation set; specifically, updating model parameters of the initial error prediction model based on the first parameter solution to obtain an updated error prediction model, and calculating a first intermediate mean square error corresponding to the updated error prediction model based on the validation set. It should be noted that the calculation method of the first intermediate mean square error refers to the calculation method of the initial mean square error described above and will not be repeated here.
[0090] comparing the initial mean square error with the first intermediate mean square error;
[0091] Determining a second parameter solution and a first target mean square error based on a comparison result of the initial mean square error and the first intermediate mean square error, and determining a first target temperature based on a preset cooling algorithm and an initial temperature; the second parameter solution includes second intermediate parameters corresponding to each model parameter of the initial error prediction model;
[0092] Calculating a second intermediate mean square error corresponding to the second parameter solution based on the validation set; specifically, updating the model parameters of the initial error prediction model based on the second parameter solution to obtain an updated error prediction model, and calculating a second intermediate mean square error corresponding to the updated error prediction model based on the validation set. It should be noted that the calculation method of the second intermediate mean square error refers to the calculation method of the initial mean square error described above and will not be repeated here;
[0093] comparing the first target mean square error with the second intermediate mean square error;
[0094] determining a third parameter solution and a second target mean square error based on a comparison result of the first target mean square error and the second intermediate mean square error, and determining a second target temperature based on a preset cooling algorithm and the first target temperature;
[0095] iteratively determining the second parameter solution and the first target mean square error based on the comparison result of the initial mean square error and the first intermediate mean square error, and determining the first target temperature based on a preset cooling algorithm and the initial temperature until the final target temperature is less than the preset temperature, and determining the parameter solution corresponding to the target mean square error corresponding to the final target temperature as the target parameter solution; for example, if the final target temperature is the eighth target temperature, determining the parameter solution corresponding to the eighth target mean square error as the target parameter solution;
[0096] The model parameters of the initial error prediction model are updated based on the target parameter solution to obtain the target error prediction model.
[0097] The step of determining a second parameter solution and a first target mean square error based on a comparison result of the initial mean square error and the first intermediate mean square error, and determining a first target temperature based on a preset cooling algorithm and an initial temperature, includes the following steps:
[0098] If the first intermediate mean square error is not greater than the initial mean square error;
[0099] Randomly perturb each model parameter of the first parameter solution based on the random perturbation algorithm to generate a second parameter solution, and determine the first intermediate mean square error as the first target mean square error, and determine the initial temperature as the first target temperature;
[0100] If the first intermediate mean square error is greater than the initial mean square error, based on
[0101] Calculate the selection probability of the first parameter solution; wherein, is the selection probability, is the difference between the first intermediate mean square error and the initial mean square error, is the initial temperature;
[0102] Randomly generate a target value in the interval (0, 1), and compare the target value with the selection probability;
[0103] If the selection probability is not greater than the target value, randomly perturb each model parameter of the initial error prediction model based on the random perturbation algorithm to generate a second parameter solution, and determine the initial mean square error as the first target mean square error, and determine the initial temperature as the first target temperature;
[0104] If the selection probability is greater than the target value, the model parameters of the first parameter solution are randomly perturbed based on the random perturbation algorithm to generate a second parameter solution, and the first intermediate mean square error is determined to be the first target mean square error, and the initial temperature is cooled based on a preset cooling coefficient to obtain the first target temperature.
[0105] The step of determining a third parameter solution and a second target mean square error based on a comparison result between the first target mean square error and the second intermediate mean square error, and determining a second target temperature based on a preset cooling algorithm and the first target temperature, includes the following steps:
[0106] If the second intermediate mean square error is not greater than the first target mean square error;
[0107] Randomly perturb each model parameter of the second parameter solution based on the random perturbation algorithm to generate a third parameter solution, and determine the second intermediate mean square error as the second target mean square error, and determine the first target temperature as the second target temperature;
[0108] If the second intermediate mean square error is greater than the first target mean square error, based on
[0109] Calculate the selection probability of the first parameter solution; wherein, is the selection probability, is the difference between the second intermediate mean square error and the first target mean square error, is the first target temperature;
[0110] Randomly generate a target value in the interval (0, 1), and compare the target value with the selection probability;
[0111] If the selection probability is not greater than the target value, randomly perturb the parameter solution corresponding to the first target mean square error based on the random perturbation algorithm to generate a second parameter solution, and determine the first target mean square error to be the second target mean square error, and determine the first target temperature to be the second target temperature;
[0112] If the selection probability is greater than the target value, the model parameters of the second parameter solution are randomly perturbed based on the random perturbation algorithm to generate a third parameter solution, and the second intermediate mean square error is determined to be the second target mean square error, and the first target temperature is cooled based on a preset cooling coefficient to obtain the second target temperature.
[0113] Step S5: During the operation of the current testing device, calibrate the test value of the current testing device based on the target error prediction model.
[0114] Specifically, the environmental parameter value information corresponding to the target environmental parameter information is obtained through a preset environmental parameter detection device, and the current test value of the current testing device is obtained, and the environmental parameter value information and the current test value are input into the target error prediction model to obtain a test error value, and the test error value is added to the current test value to achieve calibration of the current test value.
[0115] The method provided in this embodiment realizes dynamic adjustment of the test error of the current test device in a complex and changeable working environment, which helps to improve the test accuracy of the current test device.
[0116] See also Figure 2 , Figure 2 This is a schematic block diagram of the structure of the current test device self-calibration device 100 provided in an embodiment of the present application, as shown in FIG. Figure 2 As shown, the current test device self-calibration device 100 provided in the embodiment of the present application includes:
[0117] The analysis module 110 is configured to analyze target environment parameter information related to the test error of the current test device; the target environment parameter information includes a plurality of target environment parameters.
[0118] The determination module 120 is configured to respectively determine a parameter range corresponding to each of the target environmental parameters in the working environment of the current testing device.
[0119] The generation module 130 is used to generate a training data set based on the current value range of the current testing device and the parameter interval corresponding to each of the target environmental parameters; wherein the training data set includes multiple mapping relationships, the mapping relationships are mapping relationships between independent variable data groups and their corresponding test errors, and the independent variable data groups include parameter values corresponding to each of the target environmental parameters and current test values.
[0120] The training module 140 is used to train a preset neural network based on the training data set to obtain a target error prediction model.
[0121] The calibration module 150 is configured to calibrate the test value of the current testing device based on the target error prediction model during the operation of the current testing device.
[0122] It should be noted that those skilled in the art will clearly understand that for the sake of convenience and brevity of description, the specific working processes of the above-described device and each module can refer to the process in the aforementioned current testing device self-calibration method embodiment, and will not be repeated here.
[0123] The current test device self-calibration device 100 provided in the above embodiment can be implemented in the form of a computer program. The computer program can be used in Figure 3 The system is run on the terminal device 200 shown.
[0124] See also Figure 3 , Figure 3 This is a schematic block diagram of the structure of a terminal device 200 provided in an embodiment of the present application. The terminal device 200 includes a processor 201 and a memory 202. The processor 201 and the memory 202 are connected via a device bus 203, wherein the memory 202 may include a non-volatile storage medium and an internal memory.
[0125] The non-volatile storage medium may store a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by the processor 201 , the processor 201 may execute any of the above-mentioned current test device self-calibration methods.
[0126] The processor 201 is used to provide computing and control capabilities to support the operation of the entire terminal device 200.
[0127] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor 201, the processor 201 can execute any of the above-mentioned current test device self-calibration methods.
[0128] Those skilled in the art will understand that Figure 3The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the terminal device 200 involved in the solution of the present application. The specific terminal device 200 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0129] It should be understood that the processor 201 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0130] In some embodiments, the processor 201 is configured to execute a computer program stored in the memory to implement the following steps:
[0131] Analyzing target environmental parameter information related to a test error of the current test device; the target environmental parameter information includes a plurality of target environmental parameters;
[0132] respectively determining a parameter range corresponding to each target environmental parameter in the working environment of the current testing device;
[0133] A training data set is generated based on the current value range of the current testing device and the parameter interval corresponding to each of the target environmental parameters; wherein the training data set includes a plurality of mapping relationships, each of which is a mapping relationship between an independent variable data group and its corresponding test error, and each of the independent variable data groups includes a parameter value corresponding to each of the target environmental parameters and a current test value;
[0134] Training a preset neural network based on the training data set to obtain a target error prediction model;
[0135] During the operation of the current testing device, the test value of the current testing device is calibrated based on the target error prediction model.
[0136] It should be noted that those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the terminal device 200 described above can refer to the corresponding process of the aforementioned current testing device self-calibration method, which will not be repeated here.
[0137] An embodiment of the present application further provides a computer-readable storage medium storing a computer program. When the computer program is executed by one or more processors, the one or more processors implement the current testing device self-calibration method provided in the embodiment of the present application.
[0138] The computer-readable storage medium may be an internal storage unit of the terminal device 200 in the aforementioned embodiment, such as a hard disk or memory of the terminal device 200. The computer-readable storage medium may also be an external storage device of the terminal device 200, such as a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, a flash card, etc., equipped with the terminal device 200.
[0139] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A self-calibration method for a current test device, characterized in that: include: Analyzing target environmental parameter information related to test errors of the current test device; The target environment parameter information includes a plurality of target environment parameters; respectively determining a parameter range corresponding to each target environmental parameter in the working environment of the current testing device; A training data set is generated based on the current value range of the current testing device and the parameter interval corresponding to each of the target environmental parameters; wherein the training data set includes a plurality of mapping relationships, each of which is a mapping relationship between an independent variable data group and its corresponding test error, and each of the independent variable data groups includes a parameter value corresponding to each of the target environmental parameters and a current test value; Training a preset neural network based on the training data set to obtain a target error prediction model; During operation of the current testing device, calibrating a test value of the current testing device based on the target error prediction model; The step of generating a training data set based on the current value range of the current testing device and the parameter interval corresponding to each target environmental parameter includes: Determining a plurality of current standard values within the current value range with a step size of 0.001 A to obtain a current standard value set; For each of the target environmental parameters, determining a plurality of parameter values in a parameter interval corresponding to the target environmental parameter with a preset step size corresponding to the target environmental parameter, to obtain a parameter value set corresponding to the target environmental parameter; Performing a Cartesian product operation on the current standard value set and each parameter value set to obtain a plurality of independent variable data groups; For each of the independent variable data groups, a test error corresponding to the independent variable data group is generated based on a preset test error generation method, and a mapping relationship between the independent variable data group and the test error is constructed; each of the mapping relationships constitutes the training data set; The generating of the test error corresponding to the independent variable data group based on a preset test error generating method includes: Connecting the current testing device to a preset test circuit; the test circuit is located in a closed space with adjustable environmental conditions; For each of the independent variable data groups, the environmental state of the enclosed space is set based on the environmental parameter values corresponding to the independent variable data group, and a current whose current value is the current standard value corresponding to the independent variable data group is input into the current testing device through the test circuit, and the current test value output by the current testing device is obtained, and the current standard value is used to subtract the current test value to obtain the test error corresponding to the independent variable data group.
2. The self-calibration method for a current test device according to claim 1, characterized in that: The analyzing target environmental parameter information related to the test error of the current test device includes: Connecting the current testing device to a preset test circuit and inputting a constant current into the current testing device through the test circuit; the test circuit is located in a closed space with adjustable environmental conditions; For any environmental parameter, the environmental state in the enclosed space is adjusted based on the environmental parameter change curve corresponding to the environmental parameter, and the parameter values of the remaining environmental parameters in the enclosed space except the environmental parameter are kept unchanged. In the process of adjusting the environmental state in the enclosed space, it is determined whether the current test value output by the current testing device has changed. If the current test value output by the current testing device has changed, the environmental parameter is determined to be the target environmental parameter; each of the target environmental parameters constitutes the target environmental parameter information.
3. The self-calibration method for a current test device according to claim 1, characterized in that: The step of training a preset neural network based on the training data set to obtain a target error prediction model includes: Dividing the training data set into a training set and a validation set; For each mapping relationship in the training set, the independent variable data group corresponding to the mapping relationship is used as the input of the neural network, and the test error corresponding to the mapping relationship is used as the output of the neural network to train the neural network to obtain an initial error prediction model; The model parameters of the initial error prediction model are optimized based on a preset annealing algorithm and the verification set to obtain the target error prediction model.
4. The self-calibration method for a current test device according to claim 3, characterized in that: The optimizing the model parameters of the initial error prediction model based on the preset annealing algorithm and the validation set to obtain the target error prediction model includes: Calculate the initial mean square error corresponding to the initial error prediction model based on the validation set; Randomly perturb each model parameter of the initial error prediction model based on a preset random perturbation algorithm to generate a first parameter solution; the first parameter solution includes first intermediate parameters corresponding to each model parameter of the initial error prediction model; Calculate a first intermediate mean square error corresponding to the first parameter solution based on the verification set; comparing the initial mean square error with the first intermediate mean square error; Determining a second parameter solution and a first target mean square error based on a comparison result of the initial mean square error and the first intermediate mean square error, and determining a first target temperature based on a preset cooling algorithm and an initial temperature; the second parameter solution includes second intermediate parameters corresponding to each model parameter of the initial error prediction model; Calculate a second intermediate mean square error corresponding to the second parameter solution based on the verification set; comparing the first target mean square error with the second intermediate mean square error; determining a third parameter solution and a second target mean square error based on a comparison result of the first target mean square error and the second intermediate mean square error, and determining a second target temperature based on a preset cooling algorithm and the first target temperature; iteratively determining the second parameter solution and the first target mean square error based on the comparison result of the initial mean square error and the first intermediate mean square error, and determining the first target temperature based on a preset cooling algorithm and the initial temperature until the final target temperature is less than the preset temperature, and determining the parameter solution corresponding to the target mean square error corresponding to the final target temperature as the target parameter solution; The model parameters of the initial error prediction model are updated based on the target parameter solution to obtain the target error prediction model.
5. The self-calibration method for a current test device according to claim 4, characterized in that: The determining of a second parameter solution and a first target mean square error based on a comparison result of the initial mean square error and the first intermediate mean square error, and determining a first target temperature based on a preset cooling algorithm and an initial temperature, includes: If the first intermediate mean square error is not greater than the initial mean square error; Randomly perturb each model parameter of the first parameter solution based on the random perturbation algorithm to generate a second parameter solution, and determine the first intermediate mean square error as the first target mean square error, and determine the initial temperature as the first target temperature; If the first intermediate mean square error is greater than the initial mean square error, based on Calculate the selection probability of the first parameter solution; wherein, is the selection probability, is the difference between the first intermediate mean square error and the initial mean square error, is the initial temperature; Randomly generate a target value in the interval (0, 1), and compare the target value with the selection probability; If the selection probability is not greater than the target value, randomly perturb each model parameter of the initial error prediction model based on the random perturbation algorithm to generate a second parameter solution, and determine the initial mean square error as the first target mean square error, and determine the initial temperature as the first target temperature; If the selection probability is greater than the target value, the model parameters of the first parameter solution are randomly perturbed based on the random perturbation algorithm to generate a second parameter solution, and the first intermediate mean square error is determined to be the first target mean square error, and the initial temperature is cooled based on a preset cooling coefficient to obtain the first target temperature.
6. A current test device self-calibration device, characterized in that: include: an analysis module, configured to analyze target environmental parameter information related to a test error of the current test device; The target environment parameter information includes a plurality of target environment parameters; A determination module, configured to respectively determine a parameter range corresponding to each target environmental parameter in the working environment of the current testing device; a generating module, configured to generate a training data set based on the current value range of the current testing device and the parameter interval corresponding to each of the target environmental parameters; wherein the training data set includes a plurality of mapping relationships, each of which is a mapping relationship between an independent variable data group and its corresponding test error, and each of the independent variable data groups includes a parameter value corresponding to each of the target environmental parameters and a current test value; A training module, configured to train a preset neural network based on the training data set to obtain a target error prediction model; a calibration module, configured to calibrate a test value of the current testing device based on the target error prediction model during operation of the current testing device; The step of generating a training data set based on the current value range of the current testing device and the parameter interval corresponding to each target environmental parameter includes: Determining a plurality of current standard values within the current value range with a step size of 0.001 A to obtain a current standard value set; For each of the target environmental parameters, determining a plurality of parameter values in a parameter interval corresponding to the target environmental parameter with a preset step size corresponding to the target environmental parameter, to obtain a parameter value set corresponding to the target environmental parameter; Performing a Cartesian product operation on the current standard value set and each parameter value set to obtain a plurality of independent variable data groups; For each of the independent variable data groups, a test error corresponding to the independent variable data group is generated based on a preset test error generation method, and a mapping relationship between the independent variable data group and the test error is constructed; each of the mapping relationships constitutes the training data set; The generating of the test error corresponding to the independent variable data group based on a preset test error generating method includes: Connecting the current testing device to a preset test circuit; the test circuit is located in a closed space with adjustable environmental conditions; For each of the independent variable data groups, the environmental state of the enclosed space is set based on the environmental parameter values corresponding to the independent variable data group, and a current whose current value is the current standard value corresponding to the independent variable data group is input into the current testing device through the test circuit, and the current test value output by the current testing device is obtained, and the current standard value is used to subtract the current test value to obtain the test error corresponding to the independent variable data group.
7. A terminal device, characterized in that: The terminal device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the current testing device self-calibration method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Test data processing method and device, electronic equipment and storage medium
CN114185765A
Prediction model for optimizing BP neural network through simulated annealing algorithm
CN115062757A
Electric power intelligent terminal metering error calibration system and method under temperature influence
CN117607782A
Multimeter calibration detection method and device, product and storage medium
CN118938112A
Measurement error prediction method and system of current transformer, equipment and storage medium
CN119646508A