Electrical quantity piecewise linear calibration method and device, computer equipment and storage medium

By segmenting the electrical quantity and calibrating it according to the two-point model, the problem that traditional models cannot effectively reduce hardware errors is solved, and high-precision calibration of the electrical quantity measurement system is achieved, making up for the differences between hardware systems and improving Measurement accuracy.

CN119165425APending Publication Date: 2024-12-20HANGZHOU SHENGHANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410754914.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Traditional calibration models cannot effectively reduce the measurement error caused by hardware, especially in electrical measurements. Since hardware errors are not only simple translation or zoom-in, the measurement results are insufficient accuracy.

Method used

The electrical quantity segmented linear calibration method is used to divide the entire range of electrical quantity into multiple linear intervals, obtain the standard value of the calibration point and calibrate according to the two-point model, and increase or decrease the calibration point according to the different ranges of electrical quantity to improve the Accuracy.

Benefits of technology

Through segmented calibration, the differences between hardware systems can be made up for, the measurement accuracy can be improved, and the hardware errors in the electrical quantity measurement system can be effectively avoided. In theory, the measurement system with any characteristic can be calibrated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119165425A_ABST
    Figure CN119165425A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of calibration, and relates to an electrical quantity piecewise linear calibration method and device, computer equipment and a storage medium, and the method comprises the steps: dividing an electrical quantity full-scale range into a plurality of segments according to precision grades, each segment being a linear interval, n points (x1, y1), (x2, y2), (x3, y3),..., (xn, yn) being in the electrical quantity full-scale range, and n being a natural number greater than 1; obtaining a calibration point standard value, forming a calibration point number pair by x and y, and storing the calibration point number pair; the measured value is calibrated according to a two-point model of (y2-y1) / (x2-x1) = (y-y1) / (x-x1), x is the measured value, and y is the standard value. Differences between hardware systems can be made up in a calibration mode; hardware errors in an electrical quantity measurement system are greatly avoided, and the measurement precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of calibration technology, and in particular to a piecewise linear calibration method, device, computer equipment and storage medium for electrical quantities. Background Art

[0002] In power products (such as circuit breakers, etc.), it is necessary to measure electrical quantities such as voltage and current, and the accumulated errors between actual hardware components will affect the final measurement results. If the accuracy and AD bit number of components are blindly improved, the production cost of the product will be greatly increased, so software calibration is generally used to eliminate the hardware errors of individual products.

[0003] In traditional calibration algorithms, the model is generally simplified to y=kx+b, where the input is set to 0, the output is measured to obtain the bias b, and then k is calculated at the rated input point. The underlying principle of this model is based on the premise that the error curve is simply translated up and down or scaled up and down, but in fact, the error caused by hardware is no longer a simple translation or scaling. For example: the measurement error near point 0 is 1A current, but the measured value at other current points may not be 1A larger, but may be 1A smaller, or proportionally larger or smaller. In this case, the traditional calibration model will not be able to effectively reduce the measurement error caused by the hardware. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a piecewise linear calibration method, device, computer equipment and storage medium for electrical quantities to solve the problem that the measurement error caused by hardware cannot be effectively reduced according to the traditional calibration model.

[0005] In order to solve the above technical problems, the present invention provides a piecewise linear calibration method for electrical quantities, which adopts the following technical solution, including:

[0006] The full range of electrical quantity is divided into multiple sections according to the accuracy level, and each section is regarded as a linear interval. There are n points in the full range of electrical quantity, namely (x1, y1), (x2, y2), (x3, y3), ..., (xn, yn), where n is a natural number greater than 1.

[0007] Get the standard value of the calibration point, combine x and y into a calibration point pair and save it;

[0008] The measured value is calibrated according to the two-point model of (y2-y1) / (x2-x1)=(y-y1) / (x-x1), where x is the measured value and y is the standard value.

[0009] Preferably, the step of dividing the full range of the electrical quantity into multiple sections according to the accuracy level, each section is regarded as a linear interval, and there are (x1, y1), (x2, y2), (x3, y3), ..., (xn, yn)n points in the full range of the electrical quantity, where n is a natural number greater than 1, specifically includes:

[0010] In the range of good linearity, reduce the calibration points, increase the interval range, and reduce the amount of calculation;

[0011] In the range with poor linearity, add calibration points to improve calibration accuracy.

[0012] Preferably, the step of obtaining the standard value of the calibration point, forming x and y into a calibration point number pair and saving the pair specifically comprises:

[0013] After completing the standard value calibration, the system stores multiple calibration point pairs (x1, y1), (x2, y2)… (xn, yn) internally. Connecting two adjacent points with a straight line forms a broken line, which is recorded as y = G(x).

[0014] During the operation of the system, assuming that the sampled measurement value at any time is x', the standard value is y' = G(x').

[0015] Preferably, the step of calibrating the measured value according to the two-point model of (y2-y1) / (x2-x1)=(y-y1) / (x-x1), wherein x is the measured value and y is the standard value, specifically comprises:

[0016] According to the divided calibration segments, the external current is first set to the first calibration point;

[0017] After receiving the standard current value, it forms the first calibration point pair (x1, y1) with its actual measured current value.

[0018] According to the number of calibration points, the calibration is finally completed according to the above two steps.

[0019] In order to solve the above technical problems, the present invention also provides an electrical quantity piecewise linear calibration device, which adopts the following technical solution, including:

[0020] The segmentation module is used to divide the full range of electrical quantities into multiple segments according to the accuracy level. Each segment is regarded as a linear interval. There are n points in the full range of electrical quantities, namely (x1, y1), (x2, y2), (x3, y3), ..., (xn, yn), where n is a natural number greater than 1.

[0021] The pairing module is used to obtain the standard value of the calibration point, combine x and y into a calibration point pair and save it;

[0022] The calibration module is used to calibrate the measured value according to the two-point model of (y2-y1) / (x2-x1)=(y-y1) / (x-x1), where x is the measured value and y is the standard value.

[0023] Preferably, the segmentation module comprises:

[0024] The first segmentation module is used to reduce the calibration points, increase the interval range, and reduce the amount of calculation in the range of good linearity;

[0025] The second segmentation module is used to add calibration points in a range with poor linearity to improve calibration accuracy.

[0026] Preferably, the pairing module comprises:

[0027] The connection module is used to complete the standard value calibration. After that, the system stores multiple calibration point pairs (x1, y1), (x2, y2)… (xn, yn). Connecting two adjacent points with a straight line forms a broken line, which is recorded as y = G(x).

[0028] The sampling module is used in the system operation process. Assuming that the sampling measurement value at any time is x', the standard value is y' =G(x').

[0029] Preferably, the calibration module comprises:

[0030] A setting module, used for first setting the external current to a first calibration point according to the divided calibration segments;

[0031] The first calibration point pair module is used to form the first calibration point number pair (x1, y1) with its own actual measured current value after receiving the standard current value;

[0032] The cyclic calibration module is used to complete the calibration according to the number of calibration points and the above two steps.

[0033] In order to solve the above technical problems, the present invention also provides a computer device, which adopts the technical solution described below, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, it implements the steps of the above-mentioned electrical quantity piecewise linear calibration method.

[0034] In order to solve the above technical problems, the present invention also provides a computer-readable storage medium, which adopts the technical solution described below, and stores computer-readable instructions on the computer-readable storage medium. When the computer-readable instructions are executed by the processor, the steps of the above-mentioned electrical quantity piecewise linear calibration method are implemented.

[0035] Compared with the prior art, the present invention has the following beneficial effects: the differences between hardware systems can be compensated by calibration, and the nonlinear deviations in the sampling scheme (such as the saturation characteristics of the mutual inductor) can be improved by increasing the calibration points. In theory, if there are enough calibration points, the measurement system of any characteristics can be calibrated; the hardware errors in the electrical quantity measurement system can be greatly avoided and the measurement accuracy can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the scheme in the present invention, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present invention. 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 paying any creative work.

[0037] Figure 1 is a flow chart of an embodiment of the electrical quantity piecewise linear calibration method of the present invention;

[0038] Figure 2 It is a structural schematic diagram of an embodiment of the electrical quantity piecewise linear calibration device of the present invention;

[0039] Figure 3 It is a schematic structural diagram of an embodiment of a computer device of the present invention. DETAILED DESCRIPTION

[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present invention; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention; the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present invention or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0041] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0042] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings.

[0043] It should be noted that the electrical quantity piecewise linear calibration method provided in the embodiment of the present invention is generally executed by a server / terminal device, and accordingly, the electrical quantity piecewise linear calibration device is generally arranged in the server / terminal device.

[0044] It should be understood that the number of terminal devices, networks and servers is only illustrative. Depending on the implementation requirements, there can be any number of terminal devices, networks and servers.

[0045] Embodiment 1

[0046] Please refer to Figure 1 , shows a flow chart of an embodiment of the electrical quantity piecewise linear calibration method of the present invention. The electrical quantity piecewise linear calibration method comprises the following steps:

[0047] Step S1, divide the full range of the electrical quantity into multiple sections according to the accuracy level, each section is regarded as a linear interval, and there are n points in the full range of the electrical quantity, namely (x1, y1), (x2, y2), (x3, y3), ..., (xn, yn), where n is a natural number greater than 1.

[0048] The density of the number of points depends on the actual accuracy requirements and electrical quantity characteristics. For example, in voltage sampling, if the linearity between the actual voltage value and the sampled value is good, a point can be selected near 0 and near the full scale for linear compensation. In current sampling, as the current increases, the current transformer will saturate, resulting in a lower linearity between the actual current and the sampled value. In this case, more points can be selected in the saturation area to improve the calibration accuracy.

[0049] In this embodiment, the electronic device (eg Figure 1 The server / terminal device shown in the figure can receive the piecewise linear calibration request of the electrical quantity through a wired connection or a wireless connection. It should be noted that the above wireless connection method can include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAXX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0050] In this embodiment, step S1, the full range of the electrical quantity is divided into multiple sections according to the accuracy level, each section is regarded as a linear interval, and there are (x1, y1), (x2, y2), (x3, y3), ..., (xn, yn)n points in the full range of the electrical quantity, where n is a natural number greater than 1. Specifically, the steps may also be included:

[0051] S11. In the range of good linearity, reduce the calibration points, increase the interval range, and reduce the amount of calculation.

[0052] Taking a protection transformer with a rated current In of 400A and a maximum protection current 14*In of 5600A as an example, affected by factors such as the core material and coil, the transformer has good linearity within the current range below 5*In = 2000A, that is, as the input current increases, the output current will increase linearly. Within this range, two calibration points such as 0 and 2000A can be selected.

[0053] S12. In the range of poor linearity, add calibration points to improve calibration accuracy.

[0054] Taking the above transformer as an example, in the range of 2000A - 5600A, due to the magnetic saturation of the transformer, as the input current increases, the output current no longer increases linearly, that is, the transformer linearity decreases. At this time, multiple calibration points such as 2000A, 2800A, 3600A, 4400A, 5200A, and 5600A can be selected.

[0055] Step S2, obtain the standard value of the calibration point, combine x and y into a calibration point number pair and save it.

[0056] In this embodiment, step S2, obtaining the standard value of the calibration point, forming x and y into a calibration point number pair and saving it, may also include the following steps:

[0057] S21. According to the divided calibration segments, firstly set the external current as the first calibration point.

[0058] The first calibration point is y1 = 0A. At this time, the standard current value (0A) will be obtained and can be input into the system.

[0059] S22. After receiving the standard current value, it forms the first calibration point pair (x1, y1) with its own actual measured current value.

[0060] The actual measured current value is x1, and x1 may be any number y1 near 0A. x1 and y1 form the first calibration point pair (x1, y1).

[0061] S23. Repeat steps S21 and S22 according to the number of calibration points to complete the calibration.

[0062] Step S3, calibrating the measured value according to the two-point model of (y2-y1) / (x2-x1)=(y-y1) / (x-x1), where x is the measured value and y is the standard value.

[0063] In this embodiment, step S3, calibrating the measured value according to the two-point model of (y2-y1) / (x2-x1)=(y-y1) / (x-x1), where x is the measured value and y is the standard value, may further include the following steps:

[0064] S31. After completing the standard value calibration, the system stores multiple calibration point pairs (x1, y1), (x2, y2)...(xn, yn) internally. Connecting two adjacent points with a straight line forms a broken line, which is recorded as y = G(x).

[0065] S32. During the operation of the system, assuming that the sampled measurement value at any time is x', the standard value is y' = G(x').

[0066] The specific calculation steps are as follows: first determine the segment to which x' belongs, assuming that x' is between the kth calibration point and the k+1th calibration point, that is, x' ≥ And x'< , then for ( , )and( , ) range according to the linear interpolation formula , Substituting x = x' into the formula, we get , which is the final standard value.

[0067] The use of the piecewise linear calibration method for electrical quantities is divided into two stages: the calibration stage and the calculation stage. The calibration stage refers to correcting the model based on external standard values ​​or higher-level measurement values. At this time, the algorithm saves the correspondence between its own sampling values ​​and standard values, that is, (x measurement, y standard), and calibrates each calibration point (x1, y1) - (xn, yn) selected for this product.

[0068] The calculation phase is the process of calculating the standard value y based on the saved coefficient value (x measurement, y standard) and the measured value x when the product is in normal operation.

[0069] Assuming that the sampled measurement value at any time is x', the standard value is y' = G(x'). The specific calculation steps are to first determine the segment to which x' belongs. Assuming that x' is between the kth calibration point and the k+1th calibration point, that is, x' ≥ And x'< , then for ( , )and( , ) range according to the linear interpolation formula , Substitute x = x' into the formula and we get , which is the final standard value.

[0070] The following circuit breaker performs piecewise linear calibration of current electrical quantities as an example:

[0071] Take the protection transformer with a rated current In of 400A and a maximum protection current 14*In of 5600A as an example. Affected by factors such as the core material and coil, the transformer has good linearity within the current range below 5*In = 2000A, that is, as the input current increases, the output current will increase linearly. Within this range, two calibration points such as 0 and 2000A can be selected. In the range of 2000A-5600A, due to the magnetic saturation of the transformer, as the input current increases, the output current no longer increases linearly, that is, the linearity of the transformer decreases. At this time, multiple calibration points such as 2000A, 2800A, 3600A, 4400A, 5200A, and 5600A can be selected.

[0072] The beneficial effects of implementing this embodiment are as follows: the differences between hardware systems can be compensated by calibration, and the nonlinear deviations in the sampling scheme (such as the saturation characteristics of the mutual inductor) can be improved in accuracy by adding calibration points. In theory, if there are enough calibration points, the measurement system of any characteristics can be calibrated; the hardware errors in the electrical quantity measurement system can be greatly avoided, and the measurement accuracy can be improved.

[0073] The present invention can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0074] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0075] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0076] Embodiment 2

[0077] Further references Figure 2 , as a response to the above Figure 1 The present invention provides an embodiment of a piecewise linear calibration device for electrical quantities. Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0078] like Figure 2 As shown, the electrical quantity piecewise linear calibration device 50 of this embodiment includes: a segmentation module 51, a pairing module 52 and a calibration module 53. Among them:

[0079] The segmentation module 51 is used to divide the full range of the electrical quantity into multiple segments according to the accuracy level, and each segment is regarded as a linear interval. The full range of the electrical quantity has (x1, y1), (x2, y2), (x3, y3), ..., (xn, yn)n points, where n is a natural number greater than 1;

[0080] A pairing module 52 is used to obtain the standard value of the calibration point, and to form a calibration point number pair of x and y and save it;

[0081] The calibration module 53 is used to calibrate the measured value according to the two-point model of (y2-y1) / (x2-x1)=(y-y1) / (x-x1), where x is the measured value and y is the standard value.

[0082] In specific implementation, the segmentation module 51 further includes:

[0083] The first segmentation module 511 is used to reduce the calibration points, increase the interval range, and reduce the amount of calculation in the range of good linearity;

[0084] The second segmentation module 512 is used to add calibration points in a range with poor linearity to improve calibration accuracy.

[0085] In specific implementation, the pairing module 52 further includes:

[0086] The connection module 521 is used to complete the standard value calibration. After that, the system stores multiple calibration point pairs (x1, y1), (x2, y2) ... (xn, yn) and connects two adjacent points with a straight line to form a broken line, which is recorded as y = G(x).

[0087] The sampling module 522 is used in the system operation process. Assuming that the sampled measurement value at any time is x', the standard value is y' = G(x').

[0088] In specific implementation, the calibration module 53 further includes:

[0089] A setting module 531 is used to first set the external current to a first calibration point according to the divided calibration sections;

[0090] The first calibration point pair module 532 is used to form a first calibration point pair (x1, y1) with the actual measured current value after receiving the standard current value;

[0091] The circular calibration module 533 is used to complete the calibration according to the number of calibration points and the above two steps.

[0092] The beneficial effects of implementing this embodiment are as follows: the differences between hardware systems can be compensated by calibration, and the nonlinear deviations in the sampling scheme (such as the saturation characteristics of the mutual inductor) can be improved in accuracy by adding calibration points. In theory, if there are enough calibration points, the measurement system of any characteristics can be calibrated; the hardware errors in the electrical quantity measurement system can be greatly avoided, and the measurement accuracy can be improved.

[0093] Embodiment 3

[0094] To solve the above technical problems, the embodiment of the present invention also provides a computer device. Figure 3 , Figure 3 This is a basic structural block diagram of the computer device in this embodiment.

[0095] The above-mentioned computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 6 having components of a memory 61, a processor 62, and a network interface 63, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application specific integrated circuit (ASIC), a programmable gate array (FPGA), a digital processor (DSP), an embedded device, etc.

[0096] The computer device may be a desktop computer, a notebook computer, a PDA, a cloud server, etc. The computer device may interact with the user through a keyboard, a mouse, a remote control, a touch pad, or a voice control device.

[0097] The memory 61 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 61 may be an internal storage unit of the computer device 6, such as a hard disk or memory of the computer device 6. In other embodiments, the memory 61 may also be an external storage device of the computer device 6, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 6. Of course, the memory 61 may also include both the internal storage unit of the computer device 6 and its external storage device. In this embodiment, the memory 61 is generally used to store the operating system and various application software installed on the computer device 6, such as computer-readable instructions of the piecewise linear calibration method of electrical quantities, etc. In addition, the memory 61 can also be used to temporarily store various types of data that have been output or are to be output.

[0098] In some embodiments, the processor 62 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 62 is generally used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is used to run the computer-readable instructions stored in the memory 61 or process data, such as running the computer-readable instructions of the electrical quantity piecewise linear calibration method.

[0099] The network interface 63 may include a wireless network interface or a wired network interface. The network interface 63 is generally used to establish a communication connection between the computer device 6 and other electronic devices.

[0100] The beneficial effects of implementing this embodiment are as follows: the differences between hardware systems can be compensated by calibration, and the nonlinear deviations in the sampling scheme (such as the saturation characteristics of the mutual inductor) can be improved in accuracy by adding calibration points. In theory, if there are enough calibration points, the measurement system of any characteristics can be calibrated; the hardware errors in the electrical quantity measurement system can be greatly avoided, and the measurement accuracy can be improved.

[0101] Embodiment 4

[0102] The present invention also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the electrical quantity piecewise linear calibration method as described above.

[0103] The beneficial effects of implementing this embodiment are as follows: the differences between hardware systems can be compensated by calibration, and the nonlinear deviations in the sampling scheme (such as the saturation characteristics of the mutual inductor) can be improved in accuracy by adding calibration points. In theory, if there are enough calibration points, the measurement system of any characteristics can be calibrated; the hardware errors in the electrical quantity measurement system can be greatly avoided, and the measurement accuracy can be improved.

[0104] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the various embodiment methods of the present invention.

[0105] Obviously, the embodiments described above are only some embodiments of the present invention, rather than all embodiments. The preferred embodiments of the present invention are given in the accompanying drawings, but they do not limit the patent scope of the present invention. The present invention can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive. Although the present invention has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific embodiments, or to perform equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of the present invention, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present invention.

Claims

1. A piecewise linear calibration method for electrical quantities, characterized in that: The steps include: The full range of electrical quantity is divided into multiple sections according to the accuracy level, and each section is regarded as a linear interval. There are n points in the full range of electrical quantity, namely (x1, y1), (x2, y2), (x3, y3), ..., (xn, yn), where n is a natural number greater than 1. Get the standard value of the calibration point, combine x and y into a calibration point pair and save it; The measured value is calibrated according to the two-point model of (y2-y1) / (x2-x1)=(y-y1) / (x-x1), where x is the measured value and y is the standard value.

2. The electrical quantity piecewise linear calibration method according to claim 1, characterized in that: The step of dividing the full range of the electrical quantity into multiple sections according to the accuracy level, each section is regarded as a linear interval, and there are (x1, y1), (x2, y2), (x3, y3), ..., (xn, yn)n points in the full range of the electrical quantity, where n is a natural number greater than 1, specifically includes: In the range of good linearity, reduce the calibration points, increase the interval range, and reduce the amount of calculation; In the range with poor linearity, add calibration points to improve calibration accuracy.

3. The electrical quantity piecewise linear calibration method according to claim 1, characterized in that: The steps of obtaining the standard value of the calibration point, forming x and y into a calibration point number pair and saving the pair specifically include: After completing the standard value calibration, the system stores multiple calibration point pairs (x1, y1), (x2, y2)… (xn, yn) internally. Connecting two adjacent points with a straight line forms a broken line, which is recorded as y = G(x). During the operation of the system, assuming that the sampled measurement value at any time is x', the standard value is y' = G(x').

4. The electrical quantity piecewise linear calibration method according to claim 1, characterized in that: The step of calibrating the measured value according to the two-point model of (y2-y1) / (x2-x1)=(y-y1) / (x-x1), wherein x is the measured value and y is the standard value, specifically includes: According to the divided calibration segments, the external current is first set to the first calibration point; After receiving the standard current value, it forms the first calibration point pair (x1, y1) with its actual measured current value. According to the number of calibration points, the calibration is finally completed according to the above two steps.

5. An electrical quantity piecewise linear calibration device, characterized in that: include: The segmentation module is used to divide the full range of electrical quantities into multiple segments according to the accuracy level. Each segment is regarded as a linear interval. There are n points in the full range of electrical quantities, namely (x1, y1), (x2, y2), (x3, y3), ..., (xn, yn), where n is a natural number greater than 1. The pairing module is used to obtain the standard value of the calibration point, combine x and y into a calibration point pair and save it; The calibration module is used to calibrate the measured value according to the two-point model of (y2-y1) / (x2-x1)=(y-y1) / (x-x1), where x is the measured value and y is the standard value.

6. The piecewise linear calibration device for electrical quantities according to claim 5, characterized in that: The segmentation module comprises: The first segmentation module is used to reduce the calibration points, increase the interval range, and reduce the amount of calculation in the range of good linearity; The second segmentation module is used to add calibration points in a range with poor linearity to improve calibration accuracy.

7. The piecewise linear calibration device for electrical quantities according to claim 5, characterized in that: The pairing module comprises: The connection module is used to complete the standard value calibration. After that, the system stores multiple calibration point pairs (x1, y1), (x2, y2)… (xn, yn). Connecting two adjacent points with a straight line forms a broken line, which is recorded as y = G(x). The sampling module is used in the system operation process. Assuming that the sampling measurement value at any time is x', the standard value is y' = G(x').

8. The piecewise linear calibration device for electrical quantities according to claim 5, characterized in that: The calibration module comprises: A setting module, used for first setting the external current to a first calibration point according to the divided calibration segments; The first calibration point pair module is used to form the first calibration point number pair (x1, y1) with its own actual measured current value after receiving the standard current value; The cyclic calibration module is used to complete the calibration according to the number of calibration points and the above two steps.

9. A computer device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the piecewise linear calibration method for electrical quantities as claimed in any one of claims 1 to 4 when executing the computer-readable instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the piecewise linear calibration method for electrical quantities according to any one of claims 1 to 4.