Normalization algorithm-based concentrator temperature compensation method and device, and storage medium
By adopting a temperature compensation method based on a normalization algorithm, the metering accuracy problem of the concentrator in high and low temperature environments is solved, achieving accurate temperature compensation and resource saving, which is applicable to the field of intelligent power data processing.
Patent Information
- Application Number
- PCT/CN2024/136592
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-09
- Filing Date
- 2024-12-04
- Publication Date
- 2026-02-12
AI Technical Summary
The metering accuracy and performance of existing concentrators are affected by high or low temperature environments. Existing software compensation methods are not accurate enough, and hardware compensation methods are difficult to debug and consume a lot of computing resources.
A temperature compensation method based on a normalization algorithm is adopted. The normalization process is performed by reading the correction register value, calculating the voltage error attribute value and accumulating it to obtain the gain value, which is then written into the correction register for compensation.
It achieves precise compensation for any one of the three-phase voltage, current, active power, and reactive power, with the error controlled within 0.1%, saving computing resources and reducing hardware costs.
Smart Images

Figure CN2024136592_12022026_PF_FP_ABST
Abstract
Description
Concentrator temperature compensation method and device based on normalization algorithm and storage medium TECHNICAL FIELD
[0001] The present application belongs to the technical field of intelligent power data processing, and particularly relates to a concentrator temperature compensation method based on a normalization algorithm, a device and a storage medium. BACKGROUND
[0002] During use, the concentrator may be in an environment with excessively high or low temperature due to different installation environments and regions. In this case, the measurement accuracy and performance of the device may be adversely affected. For example, in a high-temperature environment, the performance of internal circuit components may deviate due to the heat generated by the device itself; in a low-temperature environment, the internal components of the device are prone to freezing, which also affects the measurement accuracy of the device. However, according to the corresponding standards, the concentrator is generally required to work in the range of -40℃ to 70℃, and good error stability can be achieved.
[0003] Due to the high (low) temperature characteristics of the mutual inductor and the chip, the voltage, current and power collected by the concentrator device may deviate with the change in temperature. The device has been calibrated at room temperature (25℃), but the corresponding relationship established is not applicable to high (low) temperature conditions. To maintain good error performance at high (low) temperature, temperature compensation is needed for the normal temperature calibration parameters.
[0004] The temperature compensation technology in the existing market can be divided into hardware compensation and software compensation. The principle of hardware compensation is to match the sampling signal deviation caused by temperature change by configuring a variable resistance bridge circuit or a thermistor on the hardware circuit. Although the hardware compensation method has fast response and high real-time performance, it is difficult to debug and has low precision. The principle of software compensation is to modify the value of the calibration register based on the existing error value through an algorithm. Software compensation can facilitate debugging, and with the aid of automated processes, it can also free up human resources and improve efficiency. Common software compensation methods include linear regression, neural network and least squares. Although linear regression analysis and least squares are relatively simple to implement, the error precision after compensation is not high. The neural network method uses more CPU resources, and the calculation matrix occupies more memory, which is not suitable for use on concentrators and other devices. SUMMARY
[0005] To solve the above problems, the software compensation method provided by the present application can be quickly implemented, has high precision, can be debugged, and does not require additional computing resources when the device is operating normally.
[0006] The first aspect of the present application provides a concentrator temperature compensation method based on a normalization algorithm, comprising the following processes:
[0007] S1, reading the value calreg_1 of the phase voltage correction register of the concentrator device; wherein the concentrator device is placed in a heating or cooling environment for a certain time and is powered on for a certain time;
[0008] S2, normalizing calreg_1 to obtain a signed value calreg_2 in a value range;
[0009] S3, mapping the original range of the original calreg_2 to -1~0 or 0~1 to obtain calreg_3, which facilitates the processing of data in different ranges to the same scale;
[0010] S4, calculating the error attribute value Err_a of the voltage correction register at room temperature:
[0011]
[0012] S5, obtaining the actual voltage value Ustd output by the standard table of the platform, and reading the current actual voltage value Ux of the concentrator device; the difference between the two is divided by the current actual voltage value of the concentrator device to obtain the voltage error proportion value Err_b of the current phase in the heating or cooling environment;
[0013] S6, accumulating the obtained Err_b and Err_a to obtain the comprehensive error attribute value Err_c of the phase voltage;
[0014] S7, performing the following formula operation on the comprehensive error attribute value Err_c of the phase voltage:
[0015]
[0016] to obtain the gain value Gain, the value range of Gain is -1~1;
[0017] S8, according to the positive and negative of Gain, calculating the final temperature compensation value calrega, and writing the value into the correction register corresponding to the phase voltage, completing the temperature compensation of the phase voltage channel.
[0018] Preferably, in S1, the concentrator device is placed in a high-low temperature box, the temperature of the high-low temperature box is set to heating or cooling, and the concentrator device is placed in a state without power for a certain time, and the concentrator device is powered by the platform device, the voltage, current and power factor are set to standard voltage, standard current and power factor 1.0, and the concentrator device is placed for a certain time.
[0019] Preferably, in S2, the following formula is used for normalization:
[0020]
[0021] wherein n is the length of the register bit.
[0022] Preferably, in the S3, the calreg_2 is calculated according to the following formula to obtain the calreg_3:
[0023]
[0024] wherein n is the length of the register bit.
[0025] Preferably, in the S8, the normalization processing is performed according to the following formula:
[0026]
[0027] The final temperature compensation value calrega is calculated.
[0028] Preferably, when the current channel compensation correction is performed, the settings of the table body remain unchanged, i.e. the voltage, current, and power factor levels remain unchanged, the corresponding values of the voltage channel are replaced by the values of the current channel, the corresponding voltage values on the table body are replaced by the current values, and finally the calculated compensation values are written into the correction registers corresponding to the current to complete the temperature compensation correction of the current channel.
[0029] Preferably, when the active phase compensation correction and the reactive phase compensation correction are performed, the power factor of the table body is set to 0.5L, and the other settings of the table body remain unchanged, i.e. the voltage and current levels remain unchanged; the corresponding values of the voltage channel are replaced by the values of the active phase and reactive phase channels, the corresponding voltage values on the table body are replaced by the active and reactive values, and finally the calculated compensation values are written into the active phase register and the reactive phase register, respectively, to complete the temperature compensation correction of the active phase and the reactive phase.
[0030] The second aspect of the present application provides a concentrator temperature compensation device based on a normalization algorithm, which comprises at least one processor and at least one memory, wherein the processor and the memory are coupled; the memory stores a computer execution program of the concentrator temperature compensation method according to the first aspect; and the processor executes the computer execution program stored in the memory, so that the processor executes a concentrator temperature compensation method based on a normalization algorithm.
[0031] The third aspect of the present application provides a computer readable storage medium, which stores a computer execution program of the concentrator temperature compensation method according to the first aspect, and the computer execution program is executed by a processor, so that the processor executes a concentrator temperature compensation method based on a normalization algorithm.
[0032] Compared with the prior art, the present application has the following beneficial effects:
[0033] 1. Precise single-phase compensation: Unlike previous schemes using the same temperature compensation parameter, the present application can perform point-to-point precise compensation on any one phase of three-phase voltage, current, active power and reactive power.
[0034] 2. High compensation accuracy: After the above temperature compensation, the error of AC sampling analog quantity at different temperatures can be controlled below 0.1%.
[0035] 3. No need for temperature compensation calculation during device operation, saving computing resources, and no need for configuration of hardware temperature compensation circuit, reducing hardware cost. BRIEF DESCRIPTION OF DRAWINGS
[0036] Figure 1 is a whole flow chart of the concentrator temperature compensation algorithm of the present application.
[0037] Figure 2 is a high-temperature temperature compensation error effect comparison chart.
[0038] Figure 3 is a low-temperature temperature compensation error effect comparison chart.
[0039] Figure 4 is a simple mechanism diagram of the concentrator temperature compensation device. EMBODIMENTS OF THE PRESENT INVENTION
[0040] The present application will be further described below in conjunction with examples. Obviously, the described examples are part of the embodiments of the present application, rather than all the embodiments. Based on the examples in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0041] Example 1:
[0042] In this embodiment, the premise of the temperature compensation scheme is that the concentrator device completes the table calibration at room temperature (25℃) and has obtained the table calibration parameters at room temperature. The devices and environment used are: high and low temperature environmental temperature test box (hereinafter referred to as high and low temperature box) and metering detection table body device (hereinafter referred to as table body). The high and low temperature box is used to set different high and low temperature environmental conditions, and the table body device provides different power supply environments.
[0043] For single-phase or three-phase devices, the correction principle and process of each phase channel are the same. In this embodiment, the temperature compensation algorithm proposed by the present application is mainly described in detail taking single-phase voltage temperature compensation as an example, and the whole process is shown in Figure 1.
[0044] 1, Put the concentrator device into the high-low temperature box, and use the tooling or special wire to draw out the voltage and current lines from the table body to the concentrator in the high-low temperature box. Set the temperature of the high-low temperature box to the high temperature or low temperature, and in the state of not being powered on, stand for a period of time, and wait for the overall temperature of the concentrator device to reach the predetermined state.
[0045] For example, for a three-phase device, three-phase voltage and three-phase current lines need to be drawn out from the table body to supply power to the device.
[0046] For example, the high temperature is set to 70°C, and the low temperature is set to -40°C. In the state of not being powered on, stand for 3-6 hours.
[0047] 2, Use the table body device to power the concentrator device, and set the voltage, current, and power factor values to the standard voltage range, standard current range, and power factor to 1.0. Stand for a period of time, and wait for the temperature of the concentrator device to stabilize.
[0048] For example, for a concentrator device with an electrical specification of 220V-1.5A, the voltage on the table body is 220V, the current is 1.5A, and the power factor is positive active 1.0. To maintain the stability of the temperature in the device, stand the concentrator for 30 minutes.
[0049] 3, Read the value calreg_1 of the concentrator device through the communication channel and communication protocol on the concentrator device. That is, the correction register value obtained by the concentrator device before temperature compensation at normal temperature.
[0050] For example, the data can be obtained using the upper computer software through the RS485 channel or RJ45 network port channel on the concentrator device, and the power industry standard protocol DL / T698.45 protocol to read the value calreg_1 of the concentrator device.
[0051] 4, The obtained calreg_1 is normalized according to the following method to obtain a signed value calreg_2 with a value range of its highest bit as a symbol number.
[0052] Wherein, n is the length of the register bit.
[0053] For example, taking the correction register data length of 2 bytes as an example, n is 16 bits, 2^16 is 65536, and 2^15 is 32768. Through the above formula calculation, a value calreg_2 with a value range of -32768-32767 can be obtained.
[0054] 5. Calculate calreg_3 using the formula below for the obtained value calreg_2. This maps the original range of calreg_2 to -1 to 0 or 0 to 1, making it easier to unify data from different ranges to the same scale for processing.
[0055]
[0056] Where n is the register bit length.
[0057] For example, assuming the calibration register data length is 2 bytes, n is 16. The value of calreg_3 is calreg_2 divided by 32768.
[0058] 6. Based on the obtained proportional value calreg_3, Err_a is calculated using the following formula. This value is the error attribute value of the voltage correction register at room temperature.
[0059]
[0060] 7. Check the actual voltage value Ustd output by the standard meter on the recording platform, and read the current actual voltage value Ux of the concentrator device for that phase. Divide the difference between the two by the current actual voltage value of the concentrator device to obtain the voltage error ratio Err_b of that phase under high (low) temperature conditions.
[0061]
[0062] For example, the actual voltage value Ux of the current phase of the concentrator equipment can be read through the power industry standard protocol DL / T698.45. The standard table value can be obtained through the platform function interface or by observation.
[0063] 8. The voltage error Err_b under high (low) temperature environment and the error Err_a under normal temperature are accumulated to obtain the comprehensive error attribute value Err_c of the phase voltage. This value reflects the error influence of high (low) temperature environment on the equipment sampling channel based on the error value under normal temperature environment.
[0064]
[0065] 9. The gain value Gain is obtained by performing the following formula on the phase voltage comprehensive error attribute value Err_c. The value of Gain ranges from -1 to 1. The gain value obtained in this calculation reflects the error ratio of temperature compensation.
[0066]
[0067] 10. According to the positive and negative of Gain, the final temperature compensation value calrega is calculated by normalization according to the following formula. The value is written into the correction register corresponding to the phase voltage, and the temperature compensation of the phase voltage channel is completed.
[0068]
[0069] Wherein, n is the length of the register bit.
[0070] For example, taking the correction register data length of 2 bytes as an example, the value range of calrega is 0-65535.
[0071] 11. Current channel compensation correction: the settings of the platform are unchanged, i.e. the voltage, current, and power factor levels are unchanged. The same principles as 3-10 above are used to replace the corresponding values of the voltage channel with the values of the current channel, and the corresponding voltage values on the platform are replaced with current values. Finally, the compensation value obtained by calculation is written into the correction register corresponding to the current, and the temperature compensation correction of the current channel is completed.
[0072] 12. Active phase compensation correction and reactive phase compensation correction: the power factor of the platform is set to 0.5L, and the other settings of the platform are unchanged, i.e. the voltage and current levels are unchanged. The same principles as 3-10 above are used to replace the corresponding values of the voltage channel with the values of the active phase and reactive phase channels, and the corresponding voltage values on the platform are replaced with active and reactive values. Finally, the compensation values obtained by calculation are written into the active phase register and the reactive phase register, respectively. The temperature compensation correction of the active phase and the reactive phase is completed.
[0073] The compensation correction of the phase register is to correct the accuracy of the phase difference between the voltage and the current. Therefore, the power factor of the platform is set to 0.5L to generate a phase difference between the voltage and the current, so that the phase correction data in the concentrator device can be compared and compensated.
[0074] As shown in FIG. 2, it can be seen that in a high-temperature environment, the concentrator table error continuously increases to about -0.35% as the temperature rises without compensation. After high-temperature compensation by the algorithm, the error can still be controlled within 0.1% at 70°C, and the compensation effect is good.
[0075] As shown in FIG. 3, it can be seen that in a low-temperature environment, the concentrator table error continuously increases to about -0.3% as the temperature decreases without compensation. After low-temperature compensation by the algorithm, the error can still be controlled within 0.1% at -40°C, and the compensation effect is good.
[0076] Example 2:
[0077] As shown in FIG. 4, the application also provides a concentrator temperature compensation device based on a normalization algorithm, which comprises at least one processor and at least one memory, and further comprises a communication interface and an internal bus; the memory stores a computer execution program; the memory stores a computer execution program of the concentrator temperature compensation method according to the embodiment 1; when the processor executes the computer execution program stored in the memory, the processor can execute a concentrator temperature compensation method based on a normalization algorithm. The internal bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, an.Xtended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, the bus in the drawings of the present application does not limit to only one bus or one type of bus. The memory can contain a high-speed RAM memory, and can also include a non-volatile storage NVM, such as at least one disk memory, and can also be a U disk, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0078] The device can be provided as a terminal, a server or other forms of devices. In the exemplary embodiments, the electronic device can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic elements for executing the above-mentioned methods.
[0079] Embodiment 3:
[0080] The application also provides a computer readable storage medium, which stores a computer execution program of the concentrator temperature compensation method according to the embodiment 1, and when the computer execution program is executed by a processor, the processor can execute a concentrator temperature compensation method based on a normalization algorithm.
[0081] Specifically, a system, device or equipment provided with a readable storage medium can be provided, in which a software program code for realizing the functions of any one of the above-mentioned embodiments is stored, and the computer or processor of the system, device or equipment reads and executes the instructions stored in the readable storage medium. In this case, the program code read from the readable medium itself can realize the functions of any one of the above-mentioned embodiments, and therefore the machine readable code and the readable storage medium storing the machine readable code constitute a part of the application.
[0082] The storage medium can be implemented by any type of volatile or non-volatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tape, etc. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0083] It should be understood that the storage medium is coupled to the processor, so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in the terminal or server.
[0084] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
[0085] Although the specific embodiments of the present application are described above, they are not intended to limit the scope of protection of the present application. Those skilled in the art should understand that various modifications or changes made on the basis of the technical solutions of the present application without creative labor are still within the protection scope of the present application.
Claims
1. A concentrator temperature compensation method based on a normalization algorithm, characterized in that, The process comprises the following steps: S1, reading the value calreg_1 of the phase voltage correction register of the concentrator device; Wherein the concentrator device is placed in a heating or cooling environment for a certain time, and powered on for a certain time; S2, calreg_1 is normalized to obtain a signed value calreg_2 with a value range, whose highest bit is used as a sign number; S3, the original range of the original calreg_2 is mapped to -1~0 or 0~1 to obtain calreg_3, which facilitates the processing of data in different ranges to the same scale; S4, the error attribute value Err_a of the voltage correction register at room temperature is calculated: S5, the actual voltage value Ustd output by the standard table of the recording platform is obtained, and the current actual voltage value Ux of the concentrator device is read out; The difference between the two is divided by the current actual voltage value of the concentrator device to obtain the voltage error proportion value Err_b of the current phase in the heating or cooling environment; S6, the obtained Err_b and Err_a are accumulated to obtain the comprehensive error attribute value Err_c of the phase voltage; S7, the phase voltage comprehensive error attribute value Err_c is calculated as follows: The gain value Gain is obtained, and the value range of Gain is -1~1; S8, according to the positive and negative of Gain, the final temperature compensation value calrega is calculated, which is written into the correction register corresponding to the phase voltage, and the temperature compensation of the phase voltage channel is completed.
2. The concentrator temperature compensation method based on normalization algorithm of claim 1, wherein: In S1, the concentrator device is placed in a high-low temperature box, the temperature of the high-low temperature box is set to heating or cooling, and the concentrator device is placed for a certain time without power supply; then the platform device is used to supply power to the concentrator device, and the voltage, current and power factor are set to standard voltage, standard current and power factor 1.0, respectively, and the concentrator device is placed for a certain time.
3. The concentrator temperature compensation method based on normalization algorithm of claim 1, wherein: In S2, the following formula is used for normalization: Wherein, n is the length of the register bit.
4. The concentrator temperature compensation method based on normalization algorithm of claim 1, wherein: In S3, calreg_3 is calculated according to the following formula: Wherein, n is the length of the register bit.
5. The concentrator temperature compensation method based on normalization algorithm as claimed in claim 1, wherein: In S8, the following formula is used for normalization: The final temperature compensation value calrega is calculated.
6. The concentrator temperature compensation method based on normalization algorithm as claimed in claim 1, wherein: When the current channel compensation correction is performed, the settings of the platform remain unchanged, i.e. the voltage, current and power factor remain unchanged, the corresponding values of the voltage channel are replaced by the values of the current channel, the corresponding voltage values on the platform are replaced by the current values, and finally the compensation value is written into the correction register corresponding to the current to complete the temperature compensation correction of the current channel.
7. The concentrator temperature compensation method based on normalization algorithm as claimed in claim 1, wherein: When the active phase compensation correction and the reactive phase compensation correction are performed, the power factor of the platform is set to 0.5L, and other settings of the platform remain unchanged, i.e. the voltage and current level settings remain unchanged; the corresponding values of the voltage channel are replaced by the values of the active phase and reactive phase channels, and the corresponding voltage values on the platform are replaced by the active and reactive values, and finally the compensation values obtained by calculation are written into the active phase register and the reactive phase register to complete the temperature compensation correction of the active phase and the reactive phase.
8. A normalizer algorithm based concentrator temperature compensation apparatus, characterized by: The device comprises at least one processor and at least one memory, and the processor and the memory are coupled; the memory stores a computer execution program of the concentrator temperature compensation method according to any one of claims 1 to 7; and the processor executes the computer execution program, so that the processor executes the concentrator temperature compensation method based on the normalization algorithm according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer execution program of the concentrator temperature compensation method according to any one of claims 1 to 7, and the computer execution program is executed by the processor, so that the processor executes the concentrator temperature compensation method based on the normalization algorithm according to any one of claims 1 to 7.
Citation Information
Patent Citations
Single-phase watt-hour meter temperature compensation method
CN104849523A
Calibration method for automatically compensating electric energy metering error of electric energy meter according to temperature
CN104965186A
Metering terminal precision correction method and device, electronic equipment and storage medium
CN115372885A
Concentrator temperature compensation method and device based on normalization algorithm and storage medium
CN118643261A
Digital phase locked loop circuit for PCR recovery
US6072369A