Current measurement method, device, computer equipment and computer readable storage medium
By establishing a linear-error mapping relationship in the current measuring device, the error problem of the current measuring device during high current measurement is solved, achieving higher accuracy and efficiency.
Patent Information
- Application Number
- CN202211096379.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-06
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-09-06
AI Technical Summary
Existing current measuring equipment is prone to core saturation when measuring large currents, which leads to increased measurement errors, poor accuracy, and low efficiency.
By acquiring the measurement range and calibration points corresponding to multiple measurement ranges of the current measuring device, the linear mapping relationship and the error mapping relationship are determined, an error compensation mechanism is constructed, and the current to be measured is measured based on the linear and error mapping relationships.
It improves the accuracy and range of current measurement, and enhances the efficiency of current measurement.
Smart Images

Figure CN116106611B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a current measurement method and device, computer equipment and computer readable storage medium. BACKGROUND
[0002] With the development of communication technology, various measurement devices appear in people's life, such as micro current transformer and other current measurement devices, which can be applied to various current measurement scene terminals such as automobile charging pile, intelligent electric meter and power meter.
[0003] In the existing current measurement method, the current measurement device such as current transformer has a fixed rated current when working, and when the current measured by the current measurement device is too large, the core of the current measurement device will be oversaturated, which will increase the error of current measurement, reduce the accuracy of current measurement, and reduce the efficiency of current measurement. SUMMARY
[0004] The current measurement method and device, computer equipment and computer readable storage medium provided by the present application can improve the accuracy of current measurement, and improve the measurement range of current measurement, thereby improving the efficiency of current measurement.
[0005] The present application provides a current measurement method, comprising:
[0006] Obtaining the measurement range corresponding to each measurement gear in the current measurement device and the calibration point, wherein the calibration point includes the calibration input value corresponding to each gear and the corresponding calibration output value;
[0007] Inputting a plurality of input currents in the measurement range in the current measurement device to obtain the measurement output value corresponding to the current input value of the measurement gear based on the input current;
[0008] Based on the calibration input value and the calibration output value, determining the linear mapping relationship corresponding to each gear, and based on the linear mapping relationship, calculating the input error corresponding to the current input value;
[0009] According to the measurement output value and the input error, the error mapping relationship corresponding to each gear is constructed;
[0010] Based on the linear mapping relationship and the error mapping relationship, the to-be-measured current is measured.
[0011] Correspondingly, the present application provides a current measurement device, comprising:
[0012] The acquisition unit is configured to acquire measurement ranges corresponding to a plurality of measurement ranges in a current measurement device and calibration points, the calibration points including a calibration input value corresponding to each range and a corresponding calibration output value;
[0013] The input unit is configured to input a plurality of input currents within the measurement ranges in the current measurement device to obtain a measurement output value corresponding to a current input value of the measurement range based on the input currents;
[0014] The determination unit is configured to determine a linear mapping relationship corresponding to each range based on the calibration input value and the calibration output value, and calculate an input error corresponding to the current input value based on the linear mapping relationship;
[0015] The construction unit is configured to construct an error mapping relationship corresponding to each range according to the measurement output value and the input error;
[0016] The measurement unit is configured to measure a to-be-measured current based on the linear mapping relationship and the error mapping relationship.
[0017] In an embodiment, the measurement unit includes:
[0018] The input subunit is configured to input a to-be-measured current in the current measurement device to obtain a device output value;
[0019] The first determination subunit is configured to determine a current true value corresponding to the to-be-measured current based on the linear mapping relationship when the device output value is within a rated output range corresponding to the current measurement device;
[0020] The second determination subunit is configured to determine a current true value corresponding to the to-be-measured current based on the linear mapping relationship and the error mapping relationship when the device output value exceeds the rated output range corresponding to the current measurement device.
[0021] In an embodiment, the second determination subunit includes:
[0022] The theoretical input value identification module is configured to identify a device theoretical input value corresponding to the device output value based on the linear mapping relationship;
[0023] The device input error identification module is configured to identify a device input error corresponding to the device output value according to the error mapping relationship;
[0024] The current true value determination module is configured to determine a current true value of the to-be-measured current based on the device theoretical input value and the device input error.
[0025] In an embodiment, the determination unit includes:
[0026] a theoretical input value determination subunit configured to determine a theoretical input value corresponding to the measurement output value based on the linear mapping relationship;
[0027] an input error calculation subunit configured to calculate an input error corresponding to the current input value based on the current input value and the theoretical input value.
[0028] In an embodiment, the input unit comprises:
[0029] a rated input range acquisition subunit configured to acquire a rated input range corresponding to the current measurement device;
[0030] a current input value determination subunit configured to determine a current input value corresponding to the input current based on the rated input range, the current input value exceeding the rated input range;
[0031] a measurement output value measurement subunit configured to input the input current into the current measurement device to obtain a measurement output value corresponding to the input current based on the measurement range.
[0032] In an embodiment, the current input value determination subunit comprises:
[0033] a target range identification module configured to identify a target range in the measurement range exceeding the rated input range based on the rated input range and the measurement range;
[0034] a first current input value determination module configured to determine a current input value corresponding to the input current according to the measurement range of the target range.
[0035] In an embodiment, the current input value determination subunit comprises:
[0036] a target measurement range acquisition module configured to acquire a target measurement range, the maximum measurement value of the target measurement range exceeding the measurement range determined by the current measurement device based on the measurement range;
[0037] an updating module configured to update the measurement range corresponding to the measurement range with the largest measurement value in the measurement range based on the target measurement range, to obtain an updated measurement range corresponding to the measurement range;
[0038] a second current input value determination module configured to determine a current input value corresponding to the input current according to the updated measurement range and the rated input range.
[0039] Further, an embodiment of the present application also provides a computer readable storage medium, which stores a plurality of instructions, and the instructions are adapted to be loaded by a processor to execute steps in any current measurement method provided by the embodiment of the present application.
[0040] Further, an embodiment of the present application also provides a computer device, which comprises a processor and a memory, the memory stores an application program, and the processor is used to run the application program in the memory to implement the current measurement method provided by the embodiment of the present application.
[0041] The embodiment of the present application also provides a computer program product or a computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to make the computer device execute steps in the current measurement method provided by the embodiment of the present application.
[0042] The embodiment of the present application acquires the measurement ranges corresponding to a plurality of measurement ranges in a current measurement device and calibration points, wherein the calibration points comprise calibration input values and corresponding calibration output values corresponding to each range; inputs a plurality of input currents in the measurement ranges in the current measurement device to obtain measurement output values corresponding to current input values of the input currents based on the measurement ranges; determines linear mapping relationships corresponding to each range based on the calibration input values and the calibration output values, and calculates input errors corresponding to the current input values based on the linear mapping relationships; constructs error mapping relationships corresponding to each range according to the measurement output values and the input errors; and measures a to-be-measured current based on the linear mapping relationships and the error mapping relationships. In this way, the measurement output values actually output by each range in the current measurement device for the input currents are measured, and the input errors between the theoretical input currents and the actual input currents corresponding to each measurement output value are determined according to the calibration points of each range, so that the measurement results of the to-be-measured current measured by the current measurement device based on the linear mapping relationships are compensated according to the error mapping relationships between the measurement output values and the input errors, thereby improving the accuracy of current measurement, improving the measurement range of current measurement, and further improving the efficiency of current measurement. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0044] Figure 1is a current measurement method implementation scenario provided by an embodiment of the present application;
[0045] Figure 2 is a flowchart of a current measurement method provided by an embodiment of the present application;
[0046] Figure 3 is a specific flowchart of a current measurement method provided by an embodiment of the present application;
[0047] Figure 4 is another flowchart of a current measurement method provided by an embodiment of the present application;
[0048] Figure 5 is a structural diagram of a current measurement device provided by an embodiment of the present application;
[0049] Figure 6 is a structural diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0050] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0051] The present application provides a current measurement method, device, computer device and computer readable storage medium. The current measurement device can be integrated in a computer device, which can be a server or a terminal device.
[0052] The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms, etc. The terminal can be a smart TV, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart phone, etc. which can measure current, but is not limited to this. The terminal and the server can be directly or indirectly connected through wired or wireless communication, which is not limited in the present application.
[0053] Please refer to Figure 1 For example, the current measurement device is integrated in the terminal, Figure 1The implementation scene of the current measurement method provided by the embodiment of the present application is shown in the figure. The terminal can be a smart television, a smart phone, a tablet computer, a notebook computer, a desktop computer, and various computer devices, but is not limited thereto. The terminal can obtain the measurement ranges corresponding to the multiple measurement ranges in the current measurement device and the calibration points, wherein the calibration points include the calibration input values corresponding to each range and the corresponding calibration output values. The multiple input currents within the measurement range are input into the current measurement device to obtain the measurement output values corresponding to the current input values of the measurement range based on the input currents. Based on the calibration input values and the calibration output values, the linear mapping relationship corresponding to each range is determined, and the input error corresponding to the current input value is calculated based on the linear mapping relationship. According to the measurement output values and the input error, the error mapping relationship corresponding to each range is constructed. The to-be-measured current is measured based on the linear mapping relationship and the error mapping relationship.
[0054] It should be noted that, Figure 1 The implementation environment scene of the current measurement method is shown in the figure, which is only an example. The implementation environment scene of the current measurement method described in the embodiment of the present application is used to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided by the embodiment of the present application. It is known to those skilled in the art that, as the current measurement evolves and new business scenarios appear, the technical solution provided by the present application is also applicable to similar technical problems.
[0055] The following will be described in detail. It should be noted that the description order of the following embodiments is not limited as the preferred order of the embodiments.
[0056] The embodiment will be described from the perspective of the current measurement device, which can be integrated in a computer device, which can be a terminal, and the present application is not limited thereto.
[0057] Please refer to Figure 2 , Figure 2 The flowchart of the current measurement method provided by the embodiment of the present application is shown in the figure. The current measurement method comprises the following steps.
[0058] In step 101, the measurement ranges corresponding to the multiple measurement ranges in the current measurement device and the calibration points are obtained.
[0059] The current measurement device can be a device for measuring current, and the measurement range can be a plurality of different current measurement units configured by the current measurement device, each measurement range corresponding to a measurement range, responsible for measuring the current in the measurement range. When measuring the current using the current measurement device, the user can select the appropriate measurement range according to the estimated current size and other actual conditions. The measurement range can be the measurement range corresponding to the measurement range. The calibration point can be a measurement point for calibrating the measurement result of the current measurement device, used to calibrate the measurement standard of each measurement range. The calibration point can be determined according to the actual measurement parameters of the current measurement device to control the measurement result of the current in each measurement range within the error range. The calibration point can include a calibration input value corresponding to each range and a corresponding calibration output value. The calibration input value can be the current value of the current input to the current measurement device corresponding to the calibration point. The calibration output value can be the measurement result output by the current measurement device based on the current input of the calibration input value.
[0060] Optionally, the current measurement device can be a device for measuring current using a current transformer. In order to balance the accuracy and range of the current measurement, the output of the current transformer in the current measurement device can pass through an amplification circuit, so that the amplification coefficient can be changed by switching the resistance based on the multi-way selection switch (such as CD4052) in the amplification circuit, thereby realizing gear shifting of different measurement ranges, and then realizing small current measurement range for small current measurement, small current measurement range, but high measurement accuracy, large current measurement range for large current measurement, large current measurement range, but low measurement accuracy, etc. Therefore, the appropriate measurement range can be selected according to the actual measurement situation to improve the accuracy of current measurement. In addition, the output of the amplification circuit can be transmitted to the electric energy metering chip to obtain the output of the current measurement device.
[0061] In step 102, a plurality of input currents within the measurement range are input into the current measurement device to obtain a measurement output value corresponding to a current input value of the measurement range based on the input current.
[0062] The input current can be the current input into the current measurement device, the current input value can be the current value of the input current, and the measurement output value can be the output result obtained by the current measurement device based on the input current.
[0063] Optionally, for each measurement range, the input current value can be input into the input current within the measurement range corresponding to each measurement range, so that the input current can be measured by the current measurement device to obtain the measurement output value measured by the current measurement device for each input current corresponding to each range.
[0064] In step 103, a linear mapping relationship corresponding to each gear is determined based on the calibration input value and the calibration output value, and an input error corresponding to the current input value is calculated based on the linear mapping relationship.
[0065] The linear mapping relationship can be a first-order function relationship between the input and the output of the current measurement device corresponding to each gear determined based on the calibration points, that is, a linear mapping relationship between the input and the output, which can be in the form of a specific formula to represent the linear mapping relationship corresponding to each gear. The input error can be the difference between the input and the actual input determined based on the linear mapping relationship.
[0066] The manner of calculating the input error corresponding to the current input value based on the linear mapping relationship can be various, for example, the theoretical input value corresponding to each measurement output value can be calculated according to the linear mapping relationship, and then the current input value and the theoretical input value corresponding to each measurement output value are subtracted to obtain the input error corresponding to each current input value of each measurement gear.
[0067] Alternatively, the input error of each measurement gear can be calculated, or only the input error of a target measurement gear in the measurement range that exists in the saturation interval of the current measurement device can be calculated. The manner of determining the target measurement gear in the measurement range that exists in the saturation interval of the current measurement device can be various, for example, the rated input range of the current measurement device can be obtained, so that the measurement gear in the measurement range that exists in the range greater than the rated input range can be determined as the target measurement gear. In addition, a standard current source can be used to provide a determined current input value to the current measurement device, the current value of the input current is slowly increased, and the measurement output value corresponding to each current input value is recorded, so that the linear interval and the saturation interval of the current measurement device can be determined according to the mapping relationship between the current input value and the corresponding measurement output value, and the measurement gear whose measurement range is greater than the saturation interval or whose measurement range intersects with the saturation interval can be determined as the target measurement gear. The saturation interval can be an input interval in which the core of the current transformer in the current measurement device is in a saturated state due to too large input current, at this time, the input and output of the current measurement device are not in a linear relationship, and the linear interval can be an input interval in which the input current is in the rated input range of the current measurement device, at this time, the input and output of the current measurement device are in a linear relationship.
[0068] In step 104, an error mapping relationship corresponding to each gear is constructed according to the measurement output value and the input error.
[0069] The error mapping relationship can be a mapping relationship between a measurement output value corresponding to the current measurement device and an input error. Based on the error mapping relationship, a unique input error corresponding to the measurement output value can be determined. Optionally, the error mapping relationship corresponding to each gear can be represented in the form of a fitting formula based on the measurement output value and the input error.
[0070] The error mapping relationship corresponding to each gear can be constructed in various ways based on the measurement output value and the input error. For example, a mathematical software (MATLAB) can be used to construct the error mapping relationship corresponding to each gear. Specifically, the measurement output value and the input error of each measurement point can be input into the MATLAB, and then the Curve Fitting Tool of the MATLAB can be opened. The X data can be selected as the measurement output value of the measurement point, and the Y data can be selected as the input error corresponding to the measurement point. The fitting function type can be selected as the Polynomial type, and the degree of the polynomial can be selected according to the calculation capability of the current device. However, since the measurement output value and the input error are not in a linear relationship, the degree must be greater than 1, for example, 2. Thus, a fitting curve formula between the measurement output value and the input error can be obtained, and the input error of the current measurement device outside the rated input can be obtained by using the measurement output value through the fitting curve formula.
[0071] In step 105, the current to be measured is measured based on the linear mapping relationship and the error mapping relationship.
[0072] The current to be measured can be a current to be measured.
[0073] The current to be measured can be a current to be measured.
[0074] In an embodiment, please refer to Figure 3 , Figure 3The specific flowchart of the current measurement method provided by the embodiment of the present application is shown in the figure. When the current measurement device only has one gear, a standard current source can be used to input an input current within the rated input range to the current measurement device. According to the current input value of the input current and the measurement output value corresponding to the output of the current measurement device for the input current, the linear mapping relationship corresponding to the current measurement device can be determined according to the current input value and the corresponding measurement output value. Then, the input current is continuously increased so that the current input value corresponding to the input current is greater than the rated input range, and the measurement output value corresponding to the output of the current measurement device for the input current is continuously recorded. Then, the theoretical input value corresponding to each measurement output value is calculated according to the linear mapping relationship, so that the actual current input value corresponding to each measurement output value and the theoretical input value are calculated, and the input error corresponding to each measurement output value is calculated. Then, the error mapping relationship is constructed according to the measurement output value and the corresponding input error, so that the to-be-measured current can be measured according to the error mapping relationship and the linear mapping relationship.
[0075] Optionally, when recording the measurement results corresponding to the input current greater than the rated input range, the size range of the input input current can be determined according to the desired measurement range, so that the measurement range of the current measurement device for current measurement can be improved.
[0076] As can be seen from the above, the present application obtains the measurement range corresponding to each measurement gear in the current measurement device and the calibration point, wherein the calibration point includes the calibration input value corresponding to each gear and the corresponding calibration output value. The input current within the measurement range is input into the current measurement device to obtain the measurement output value corresponding to the current input value of the input current based on the input current of the measurement gear. The linear mapping relationship corresponding to each gear is determined based on the calibration input value and the calibration output value, and the input error corresponding to the current input value is calculated based on the linear mapping relationship. The error mapping relationship corresponding to each gear is constructed according to the measurement output value and the input error. The to-be-measured current is measured based on the linear mapping relationship and the error mapping relationship. In this way, by measuring the measurement output value actually output by each gear of the current measurement device for the input current, and determining the input error between the theoretical input current and the actual input current corresponding to each measurement output value according to the calibration point of each gear, the measurement result of the to-be-measured current based on the linear mapping relationship of the current measurement device is compensated according to the error mapping relationship between the measurement output value and the input error, thereby improving the accuracy of current measurement, improving the measurement range of current measurement, and further improving the efficiency of current measurement.
[0077] According to the method described in the above embodiment, the following examples will be further described in detail.
[0078] In this embodiment, the current measurement device is specifically integrated in a terminal as an example for specific description.
[0079] For better description of the embodiments of the present application, please refer to Figure 4 . As Figure 4 shown, Figure 4 another flowchart of the current measurement method provided by the embodiments of the present application. The specific process is as follows:
[0080] In step 201, the terminal acquires the measurement ranges corresponding to the multiple measurement ranges in the current measurement device and the calibration points, and acquires the rated input range corresponding to the current measurement device.
[0081] The rated input range can be the measurement range of the specified current measurement device, or the rated input range corresponding to the current transformer in the current measurement device. Within the rated input range, the input and output of the current measurement device are in a linear relationship. When the input exceeds the rated input range, the input and output of the current measurement device will not be in a linear relationship, at which time there will be a large error in measurement using the current measurement device.
[0082] In step 202, the terminal determines the current input value corresponding to the input current based on the rated input range, inputs the input current into the current measurement device, and obtains the measurement output value corresponding to the input current based on the measurement range.
[0083] Since the input exceeds the rated input range of the current measurement device, the input and output of the current measurement device will not be in a linear relationship, at which time there will be a large error in measurement using the current measurement device. Therefore, in order to still be able to accurately measure the current when the input of the current measurement device exceeds the rated input range, the actual output of the current measurement device based on the input current exceeding the rated input range can be measured, so that the measurement result can be compensated according to the relationship between the input and the output. For specific instructions, please continue to refer to the following specific steps.
[0084] The current input value can exceed the current value of the rated input range, i.e. the current value of the input current is greater than the rated input corresponding to the current measurement device, at which time it can be in the saturation interval of the current measurement device. The number of current input values of the input current can be selected according to the actual situation, for example, when the current measurement accuracy requirement is high, more current input values can be selected to obtain more measurement points to more accurately fit the mapping relationship between the input and the output, when the current measurement accuracy requirement is low, fewer current input values can be selected, etc. The present application does not limit this.
[0085] The terminal can determine the current input value corresponding to the input current in multiple ways based on the rated input range. For example, the terminal can identify a target range in the measurement range that exceeds the rated input range based on the rated input range and the measurement range, and determine the current input value corresponding to the input current according to the measurement range of the target range.
[0086] The target range can be a range in the measurement range that exceeds the rated input range. For example, assume that the current measurement device has three measurement ranges, the measurement range of Range 1 is 0-2A, the measurement range of Range 2 is 2-5A, and the measurement range of Range 3 is 5-10A, and the rated input range of the current measurement device is 4A. The measurement range of Range 2 is 5A, which is greater than 4A, and the measurement range of Range 3 is 10A, which is greater than 4A. Therefore, Range 2 and Range 3 are target ranges.
[0087] The terminal can determine the current input value corresponding to the input current in multiple ways based on the rated input range. For example, the terminal can identify a target range in the measurement range that exceeds the rated input range based on the rated input range and the measurement range, and determine the current input value corresponding to the input current according to the measurement range of the target range.
[0088] Optionally, the measurement range of the current measurement device can be increased based on the measurement range of the current measurement device determined based on the original measurement range of the current measurement device. For example, the target measurement range can be obtained based on the rated input range and the way of determining the current input value corresponding to the input current. The measurement range corresponding to the measurement range with the largest measurement value in the measurement range can be updated based on the target measurement range, to obtain the updated measurement range corresponding to the measurement range. The current input value corresponding to the input current can be determined according to the updated measurement range and the rated input range.
[0089] The target measurement range can be a desired measurement range, and a maximum measurement value of the target measurement range exceeds a measurement range determined by the current measurement device based on the measurement range. For example, assuming that the current measurement device has three measurement ranges, the measurement range of range 1 is 0-2A, the measurement range of range 2 is 2-5A, and the measurement range of range 3 is 5-10A, the measurement range determined by the current measurement device based on the measurement range is 0-10A, that is, the highest measurement value (10A) corresponding to the highest range (range 3) of the current measurement device. At this time, the target measurement range can be a range greater than 10A, for example, 15A, 20A, etc., so as to increase the measurement range of the current measurement device from 10A to 15A, 20A, etc. The specific value can be selected according to actual needs.
[0090] The measurement range corresponding to the measurement range with the maximum measurement value in the measurement range can be updated based on the target measurement range, and the updated measurement range corresponding to the measurement range can be obtained. For example, assuming that the measurement range with the maximum measurement value in the current measurement device is range 3, that is, the measurement range is 5-10A, and the target measurement range is 0-15A, the measurement range corresponding to range 3 can be updated based on the target measurement range, and the updated measurement range corresponding to range 3 is 5-15A.
[0091] After updating the measurement range corresponding to the measurement range with the maximum measurement value in the measurement range based on the target measurement range, the current input value corresponding to the input current can be determined according to the updated measurement range and the rated input range. The current input value corresponding to the input current can be determined according to the updated measurement range and the rated input range in various ways. For example, assuming that the updated measurement range corresponding to the current measurement device is 0-15A, the rated input range corresponding to the current measurement device is 4A, range 2 and range 3 are target ranges, the updated measurement range of range 2 is 2-5A, and the updated measurement range of range 3 is 5-15A. For range 2, the current input value of the input current can be 2-5A or 4-5A, which can be set according to actual conditions. For range 3, the current input value of the input current can be 5-15A, etc.
[0092] In step 203, the terminal determines a linear mapping relationship corresponding to each range based on the calibration input value and the calibration output value, determines a theoretical input value corresponding to the measurement output value based on the linear mapping relationship, and calculates an input error corresponding to the current input value based on the current input value and the theoretical input value.
[0093] The theoretical input value can be an input value corresponding to the measurement output value determined according to the linear mapping relationship.
[0094] The input error corresponding to the current input value can be calculated in various ways based on the current input value and the theoretical input value. For example, the input error corresponding to the current input value can be obtained by subtracting the current input value from the theoretical input value.
[0095] In step 204, the terminal constructs an error mapping relationship corresponding to each gear according to the measurement output value and the input error, inputs the to-be-measured current in the current measurement device, and obtains a device output value.
[0096] The device output value can be a measurement value output by the current measurement device for the input to-be-measured current. In this case, the device output value is a measurement value that has not been compensated.
[0097] In step 205, when the device output value is within the rated output range corresponding to the current measurement device, the terminal determines a current true value corresponding to the to-be-measured current based on the linear mapping relationship.
[0098] The current true value is the current value of the to-be-measured current. When the device output value is within the rated output range corresponding to the current measurement device, it indicates that the input to-be-measured current is within the rated input range. In this case, there is a linear relationship between the input and output of the current measurement device, and the input value corresponding to the device output value can be directly calculated according to the linear mapping relationship, that is, the current true value corresponding to the to-be-measured current is obtained.
[0099] In step 206, when the device output value exceeds the rated output range corresponding to the current measurement device, the terminal determines a current true value corresponding to the to-be-measured current based on the linear mapping relationship and the error mapping relationship.
[0100] When the device output value exceeds the rated output range corresponding to the current measurement device, it indicates that the input to-be-measured current is not within the rated input range. In this case, the input and output of the current measurement device are not linearly related. In this case, the terminal can compensate the linear mapping relationship according to the error mapping relationship to determine the current true value corresponding to the to-be-measured current.
[0101] The current true value corresponding to the to-be-measured current can be determined in various ways based on the linear mapping relationship and the error mapping relationship. For example, the device theoretical input value corresponding to the device output value can be identified based on the linear mapping relationship; the device input error corresponding to the device output value can be identified according to the error mapping relationship; and the current true value of the to-be-measured current can be determined based on the device theoretical input value and the device input error.
[0102] The device theoretical input value can be a theoretical input value corresponding to the device output value determined according to the linear mapping relationship, and the device input error can be an input error corresponding to the device output value determined according to the error mapping relationship.
[0103] The current true value of the to-be-measured current can be determined in various ways based on the device theoretical input value and the device input error. For example, when the input error in the error mapping relationship is the value of the theoretical input value minus the actual input value, the current true value of the to-be-measured current can be obtained by subtracting the device input error from the device theoretical input value. When the input error in the error mapping relationship is the value of the actual input value minus the theoretical input value, the current true value of the to-be-measured current can be obtained by adding the device theoretical input value and the device input error.
[0104] As can be seen from the above, the terminal obtains the measurement ranges corresponding to the plurality of measurement ranges in the current measurement device and the calibration points, and obtains the rated input range corresponding to the current measurement device. The terminal determines the current input value corresponding to the input current based on the rated input range, inputs the input current into the current measurement device to obtain the measurement output value corresponding to the input current based on the measurement range, and determines the linear mapping relationship corresponding to each range based on the calibration input value and the calibration output value. The terminal determines the theoretical input value corresponding to the measurement output value based on the linear mapping relationship, calculates the input error corresponding to the current input value based on the current input value and the theoretical input value, and constructs the error mapping relationship corresponding to each range according to the measurement output value and the input error. The terminal inputs the to-be-measured current into the current measurement device to obtain the device output value. When the device output value is within the rated output range corresponding to the current measurement device, the terminal determines the current true value corresponding to the to-be-measured current based on the linear mapping relationship. When the device output value exceeds the rated output range corresponding to the current measurement device, the terminal determines the current true value corresponding to the to-be-measured current based on the linear mapping relationship and the error mapping relationship. In this way, the measurement output value actually output by each range of the current measurement device for the input current is measured, and the input error between the theoretical input current corresponding to each measurement output value and the actual input current is determined according to the calibration points of each range. The measurement result of the to-be-measured current by the current measurement device based on the linear mapping relationship is compensated according to the error mapping relationship between the measurement output value and the input error, thereby improving the accuracy of current measurement, improving the measurement range of current measurement, and further improving the efficiency of current measurement.
[0105] In order to better implement the above method, an embodiment of the present application further provides a current measurement device which can be integrated in a terminal.
[0106] For example, as shown in Figure 5 FIG. 1 is a structural schematic diagram of a current measurement device provided by an embodiment of the present application. The current measurement device can include an obtaining unit 301, an input unit 302, a determining unit 303, a constructing unit 304, and a measuring unit 305, as follows:
[0107] The acquisition unit 301 is configured to acquire a plurality of measurement ranges corresponding to a plurality of measurement gears in a current measurement device and a calibration point, the calibration point including a calibration input value corresponding to each gear and a corresponding calibration output value.
[0108] The input unit 302 is configured to input a plurality of input currents in the measurement range in the current measurement device to obtain a measurement output value corresponding to a current input value of the input current based on the measurement gear;
[0109] The determination unit 303 is configured to determine a linear mapping relationship corresponding to each gear based on the calibration input value and the calibration output value, and calculate an input error corresponding to the current input value based on the linear mapping relationship.
[0110] The construction unit 304 is configured to construct an error mapping relationship corresponding to each gear according to the measurement output value and the input error.
[0111] The measurement unit 305 is configured to measure a to-be-measured current based on the linear mapping relationship and the error mapping relationship.
[0112] In an embodiment, the measurement unit 305 includes:
[0113] The input subunit is configured to input the to-be-measured current in the current measurement device to obtain a device output value.
[0114] The first determination subunit is configured to determine a current true value corresponding to the to-be-measured current based on the linear mapping relationship when the device output value is within a rated output range corresponding to the current measurement device.
[0115] The second determination subunit is configured to determine a current true value corresponding to the to-be-measured current based on the linear mapping relationship and the error mapping relationship when the device output value exceeds the rated output range corresponding to the current measurement device.
[0116] In an embodiment, the second determination subunit includes:
[0117] The theoretical input value identification module is configured to identify a device theoretical input value corresponding to the device output value based on the linear mapping relationship.
[0118] The device input error identification module is configured to identify a device input error corresponding to the device output value according to the error mapping relationship.
[0119] The current true value determination module is configured to determine the current true value of the to-be-measured current based on the device theoretical input value and the device input error.
[0120] In an embodiment, the determination unit 303 includes:
[0121] The theoretical input value determination sub-unit is configured to determine a theoretical input value corresponding to the measurement output value based on the linear mapping relationship.
[0122] The input error calculation sub-unit is configured to calculate an input error corresponding to the current input value based on the current input value and the theoretical input value.
[0123] In an embodiment, the input unit 302 comprises:
[0124] The rated input range acquisition sub-unit is configured to acquire a rated input range corresponding to the current measurement device;
[0125] The current input value determination sub-unit is configured to determine a current input value corresponding to the input current based on the rated input range, the current input value exceeding the rated input range;
[0126] The measurement output value measurement sub-unit is configured to input the input current into the current measurement device to obtain a measurement output value corresponding to the input current based on the measurement range.
[0127] In an embodiment, the current input value determination sub-unit comprises:
[0128] The target range identification module is configured to identify a target range in the measurement range exceeding the rated input range based on the rated input range and the measurement range in the measurement range;
[0129] The first current input value determination module is configured to determine a current input value corresponding to the input current according to the measurement range of the target range.
[0130] In an embodiment, the current input value determination sub-unit comprises:
[0131] The target measurement range acquisition module is configured to acquire a target measurement range, a maximum measurement value of the target measurement range exceeding a measurement range determined by the current measurement device based on the measurement range;
[0132] The update module is configured to update a measurement range corresponding to a measurement range with the largest measurement value in the measurement range based on the target measurement range, to obtain an updated measurement range corresponding to the measurement range;
[0133] The second current input value determination module is configured to determine a current input value corresponding to the input current according to the updated measurement range and the rated input range.
[0134] In implementation, each of the above units can be implemented as an independent entity, or can be combined as the same or several entities, and the specific implementation of each of the above units can refer to the method embodiments described above, which will not be described here.
[0135] From the above, the embodiment of the application obtains the measurement range corresponding to a plurality of measurement ranges in the current measurement device and the calibration point by the acquisition unit 301, wherein the calibration point includes the calibration input value corresponding to each range and the corresponding calibration output value; the input unit 302 inputs a plurality of input currents in the measurement range in the current measurement device, obtains the measurement output value corresponding to the current input value of the measurement range based on the input current; the determination unit 303 determines the linear mapping relationship corresponding to each range based on the calibration input value and the calibration output value, and calculates the input error corresponding to the current input value based on the linear mapping relationship; the construction unit 304 constructs the error mapping relationship corresponding to each range according to the measurement output value and the input error; the measurement unit 305 measures the current to be measured based on the linear mapping relationship and the error mapping relationship. In this way, by measuring the measurement output value actually output by each range in the current measurement device for the input current, and determining the input error between the theoretical input current and the actual input current corresponding to each measurement output value according to the calibration point of each range, the result of measuring the current to be measured by the current measurement device based on the linear mapping relationship is compensated according to the error mapping relationship between the measurement output value and the input error, thereby improving the accuracy of current measurement, and improving the measurement range of current measurement, and further improving the current measurement efficiency.
[0136] The embodiment of the application also provides a computer device, as shown in the figure, which shows the structural schematic diagram of the computer device related to the embodiment of the application. The computer device can be a terminal, specifically: Figure 6
[0137] The computer device can include a processor 401 with one or more processing cores, a memory 402 with one or more computer readable storage media, a power supply 403, and an input unit 404. Those skilled in the art can understand that the computer device structure shown in the figure does not constitute a limitation on the computer device, and can include more or fewer components than the figure, or combine certain components, or different component arrangements. Among them: Figure 6
[0138] The processor 401 is the control center of the computer device, connects the various parts of the computer device through various interfaces and lines, and performs various functions and processes data of the computer device by running or executing software programs and / or modules stored in the memory 402 and calling data stored in the memory 402, thereby overall monitoring the computer device. Optionally, the processor 401 can include one or more processing cores; preferably, the processor 401 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 401.
[0139] The memory 402 can be used to store software programs and modules, and the processor 401 executes various functions and current measurements by running the software programs and modules stored in the memory 402. The memory 402 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc.; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 402 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory 402 can also include a memory controller to provide access for the processor 401 to the memory 402.
[0140] The computer device further includes a power supply 403 for powering various components, and preferably the power supply 403 can be logically connected to the processor 401 through a power management system, so as to realize functions such as management of charging, discharging and power consumption management through the power management system. The power supply 403 can also include one or more than one direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power state indicator, etc. Any component.
[0141] The computer device can also include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0142] Although not shown, the computer device can also include a display unit, etc., which will not be described here. Specifically, in the present embodiment, the processor 401 in the computer device will load the executable file corresponding to the process of one or more than one application program into the memory 402 according to the following instructions, and run the application program stored in the memory 402 by the processor 401, thereby realizing various functions, as follows:
[0143] obtaining a plurality of measurement ranges corresponding to a plurality of measurement ranges in a current measurement device and calibration points, wherein the calibration points include a calibration input value corresponding to each range and a corresponding calibration output value; inputting a plurality of input currents within the measurement range in the current measurement device to obtain a measurement output value corresponding to a current input value of the measurement range based on the input current; determining a linear mapping relationship corresponding to each range based on the calibration input value and the calibration output value, and calculating an input error corresponding to the current input value based on the linear mapping relationship; constructing an error mapping relationship corresponding to each range according to the measurement output value and the input error; and measuring a to-be-measured current based on the linear mapping relationship and the error mapping relationship.
[0144] The specific implementation of each operation can be referred to the foregoing embodiments, which will not be described herein. It should be noted that the computer device provided by the embodiments of the present application and the current measurement method in the foregoing embodiments belong to the same concept, and the specific implementation process is described in the foregoing method embodiments, which will not be described herein.
[0145] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by instructions controlling related hardware, which can be stored in a computer readable storage medium and loaded and executed by a processor.
[0146] Therefore, the embodiments of the present application provide a computer readable storage medium, which stores a plurality of instructions. The instructions can be loaded by a processor to execute the steps in any current measurement method provided by the embodiments of the present application. For example, the instructions can execute the following steps:
[0147] obtaining a plurality of measurement ranges corresponding to a plurality of measurement ranges in a current measurement device and calibration points, wherein the calibration points include a calibration input value corresponding to each range and a corresponding calibration output value; inputting a plurality of input currents within the measurement range in the current measurement device to obtain a measurement output value corresponding to a current input value of the measurement range based on the input current; determining a linear mapping relationship corresponding to each range based on the calibration input value and the calibration output value, and calculating an input error corresponding to the current input value based on the linear mapping relationship; constructing an error mapping relationship corresponding to each range according to the measurement output value and the input error; and measuring a to-be-measured current based on the linear mapping relationship and the error mapping relationship.
[0148] The computer readable storage medium can include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0149] Due to the instructions stored in the computer readable storage medium, the steps in any of the current application embodiments provided current application embodiments can be implemented. The beneficial effects of any of the current application embodiments provided current application embodiments can be achieved. Details are described above, and will not be repeated here.
[0150] According to an aspect of the present application, a computer program product or computer program is provided, which includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium. The processor executes the computer instructions, so that the computer device executes the method provided in the various optional implementation manners provided in the above embodiments.
[0151] The above describes the current application embodiments in detail. The principles and implementation manners of the present application are described by applying specific examples. The above embodiment descriptions are only used to help understand the method and core idea of the present application. Meanwhile, for those skilled in the art, the specific implementation manners and application range can be changed according to the idea of the present application. The above description should not be understood as a limitation of the present application.
Claims
1. A current measurement method, characterized by, The method comprises: obtaining a plurality of measurement ranges corresponding to a plurality of measurement ranges in a current measurement device and a plurality of calibration points, the calibration points comprising a calibration input value corresponding to each range and a corresponding calibration output value; inputting a plurality of input currents within the measurement range in the current measurement device to obtain a measurement output value corresponding to a current input value of the input current based on the measurement range; based on the calibration input value and the calibration output value, determining a linear mapping relationship corresponding to each range, and based on the linear mapping relationship, calculating an input error corresponding to the current input value; according to the measurement output value and the input error, constructing an error mapping relationship corresponding to each range; based on the linear mapping relationship and the error mapping relationship, measuring a to-be-measured current.
2. The current measurement method of claim 1, wherein, The method of measuring the to-be-measured current based on the linear mapping relationship and the error mapping relationship comprises: inputting the to-be-measured current in the current measurement device to obtain a device output value; when the device output value is within the rated output range corresponding to the current measurement device, determining a current true value corresponding to the to-be-measured current based on the linear mapping relationship; when the device output value exceeds the rated output range corresponding to the current measurement device, determining a current true value corresponding to the to-be-measured current based on the linear mapping relationship and the error mapping relationship.
3. The current measurement method of claim 2, wherein, The method of determining the current true value corresponding to the to-be-measured current based on the linear mapping relationship and the error mapping relationship comprises: based on the linear mapping relationship, identifying a device theoretical input value corresponding to the device output value; according to the error mapping relationship, identifying a device input error corresponding to the device output value; based on the device theoretical input value and the device input error, determining the current true value of the to-be-measured current.
4. The current measurement method of claim 1, wherein, The method of calculating the input error corresponding to the current input value based on the linear mapping relationship comprises: based on the linear mapping relationship, determining a theoretical input value corresponding to the measurement output value; based on the current input value and the theoretical input value, calculating the input error corresponding to the current input value.
5. The current measurement method of claim 1, wherein, The method of inputting a plurality of input currents within the measurement range in the current measurement device to obtain a measurement output value corresponding to a current input value of the input current based on the measurement range comprises: obtaining a rated input range corresponding to the current measurement device; based on the rated input range, determining a current input value corresponding to the input current, the current input value exceeding the rated input range; inputting the input current into the current measurement device to obtain a measurement output value corresponding to the input current in the measurement range.
6. The current measurement method of claim 5, wherein, The method of determining a current input value corresponding to an input current based on a rated input range comprises: based on the rated input range and the measurement range, identifying a target range in the measurement range whose measurement range exceeds the rated input range; determining a current input value corresponding to the input current according to the measurement range of the target range.
7. The current measurement method of claim 5, wherein, The method of determining a current input value corresponding to an input current based on a rated input range comprises: obtaining a target measurement range, a maximum measurement value of the target measurement range exceeding a measurement range of the current measurement device determined based on the measurement gears; updating a measurement range corresponding to a measurement gear with a maximum measurement value in the measurement gears based on the target measurement range, to obtain an updated measurement range corresponding to the measurement gear; determining a current input value corresponding to an input current according to the updated measurement range and a rated input range.
8. A current measuring device, characterized by comprising: an obtaining unit, configured to obtain measurement ranges corresponding to a plurality of measurement gears in a current measurement device and calibration points, the calibration points including a calibration input value corresponding to each gear and a corresponding calibration output value; an input unit, configured to input a plurality of input currents in the measurement ranges in the current measurement device, to obtain measurement output values corresponding to current input values of the input currents based on the measurement gears; a determining unit, configured to determine a linear mapping relationship corresponding to each gear based on the calibration input value and the calibration output value, and calculate input errors corresponding to the current input values based on the linear mapping relationship; a constructing unit, configured to construct an error mapping relationship corresponding to each gear according to the measurement output values and the input errors; a measuring unit, configured to measure a current to be measured based on the linear mapping relationship and the error mapping relationship.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a plurality of instructions, which are adapted to be loaded by a processor to execute the steps in the current measurement method of any one of claims 1 to 7.
10. A computer device, comprising: comprising a memory and a processor; the memory stores an application program, and the processor is used to run the application program in the memory to execute the steps in the current measurement method of any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for calibrating current and method for detecting current
CN105589051A
Nixie tube display instrument and online calibration device thereof
CN114236215A