Electricity and carbon hybrid meter calibration device and calibration method
By combining a timing synchronization controller and a carbon factor injection gateway, time synchronization and error decoupling of the electric carbon fusion meter are achieved, solving the measurement error problem of the meter in dynamic verification in the existing technology and providing a quantifiable verification method.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HENAN PROVINCE INST OF METROLOGY
- Filing Date
- 2026-04-28
- Publication Date
- 2026-06-12
AI Technical Summary
Existing electricity-carbon fusion meters cannot accurately map the effective time of carbon factors to electrical energy during dynamic calibration due to real-time clock frequency drift and communication delay. This results in the inability to decouple electrical energy sampling errors from carbon measurement errors, making scientific and objective verification impossible.
A time synchronization controller is used to obtain global absolute time through a satellite time synchronization module and time synchronization is performed in combination with the IEEE 1588PTP protocol. A standard power reference module is used to output dynamic fluctuation electrical signals. The carbon factor injection gateway sends discrete carbon emission factor messages. Combined with the underlying hardware latch and timestamp technology, the time axis of high-frequency power and low-frequency carbon factor messages is aligned, and the decoupling error is calculated by first-order linear interpolation.
It enables the verification of the metering accuracy of the electric carbon fusion meter under dynamic load and abnormal network conditions, and can decouple the additional carbon metering error introduced by timing misalignment or communication delay, providing a quantifiable physical verification method.
Smart Images

Figure CN122194043A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power energy acquisition and monitoring technology at the terminal side of a power system, specifically to a calibration device and calibration method for a carbon-electricity fusion meter. Background Technology
[0002] With the development of new power systems, electricity-carbon integrated meters not only need to perform high-frequency continuous measurement of electrical energy, but also need to receive discrete carbon emission factors dynamically issued by the power grid via data links (e.g., periodically updated based on RS485 or HPLC communication protocols) to achieve joint measurement of electrical energy and carbon emissions. Traditional electricity meter calibration devices typically use a programmable power supply to output a steady-state electrical signal and compare the error of physical electricity consumption with that of a standard electricity meter.
[0003] However, existing technologies have the following core problems regarding the dynamic calibration of fusion meters for electricity and carbon dioxide: In actual operation, the load power of the power grid fluctuates in real time, and the carbon emission factor exhibits a step-like dynamic switching. Because the real-time clock (RTC) inside the electricity carbon fusion meter often has frequency offset drift, and the underlying serial communication inevitably has transmission delays or even packet loss, this will cause the meter to have a time delay of microseconds to milliseconds when receiving and applying new carbon factors.
[0004] Existing calibration devices lack a low-level hardware-level time synchronization mechanism for heterogeneous data (high-frequency continuous energy pulses and low-frequency discrete carbon factor messages), making it impossible to accurately map the effective time of carbon factors and transient energy onto the same absolute time axis. Therefore, when the meter under test incorrectly applies the carbon factor from the previous cycle during a certain period due to timing misalignment, existing testing equipment can only calculate a general total carbon emission error. It is completely unable to quantitatively decouple and separate the "background energy error" caused solely by inaccurate low-level energy sampling from the "additional carbon measurement error" introduced by the incorrect factor application due to clock drift or communication delay. This makes it impossible to scientifically and objectively verify the carbon traceability accuracy of the fusion meter under complex communication conditions. Summary of the Invention
[0005] To achieve the above objectives, the present invention provides the following technical solution: This invention provides a calibration method for an electric carbon fusion meter, applicable to a calibration system comprising a timing synchronization controller, a standard energy reference module, and a carbon factor injection gateway, comprising the following steps: S100: The time synchronization controller synchronizes the measured carbon fusion meter with time and controls the standard energy reference module to output test electrical signals. At the same time, the carbon factor injection gateway sends out test messages with discrete carbon emission factors. S200: When the timing synchronization controller outputs a second pulse signal, the current standard electrical energy is latched and the electrical energy timestamp is recorded; at the same time, when the carbon factor injection gateway recognizes the end of the frame of the test message, the absolute timestamp of the issued carbon emission factor is recorded and cached. S300. Based on the time difference between the electrical energy timestamp and the absolute timestamp, the standard electrical energy is mapped to the time domain in which the carbon emission factor is effective to generate a theoretical baseline carbon emission; and the measured cumulative carbon emission of the measured electrical carbon fusion meter is obtained. S400. Compare the measured cumulative carbon emissions with the theoretical baseline carbon emissions to obtain the total carbon emission error; extract the carbon factor switching time point of the measured electric carbon fusion meter, calculate the time drift difference between it and the corresponding absolute timestamp, and combine it with the electric power in that time period to decouple the additional carbon measurement error introduced by time misalignment or communication delay from the total carbon emission error.
[0006] Furthermore, the step of synchronizing the measured carbon fusion meter via a timing synchronization controller specifically includes: The timing synchronization controller obtains global absolute time through a built-in satellite time synchronization module; Based on the global absolute time, the timing synchronization controller uses the IEEE 1588PTP protocol or sends a timestamped broadcast synchronization message to the communication bus to forcibly overwrite the internal real-time clock of the tested carbon fusion meter, so as to eliminate the initial phase difference before the test starts.
[0007] Furthermore, the control standard electrical reference module outputs a test electrical signal and simultaneously controls the carbon factor injection gateway to send a test message with discrete carbon emission factors, specifically including: Based on a preset typical power grid load curve, the standard power reference module is controlled to output dynamically fluctuating voltage and current signals. At a preset time point when the voltage or current signal undergoes a step change, the carbon factor injection gateway is controlled to send a test message containing the latest carbon emission factor to the tested electrical carbon fusion meter according to the RS485 or HPLC communication protocol, so as to simulate the extreme test condition where the grid load and carbon factor change drastically and synchronously.
[0008] Furthermore, when the timing synchronization controller outputs a second pulse signal, the current standard electrical energy is latched and the electrical energy timestamp is recorded, specifically including: The calibration system uses an FPGA-based low-level hardware latch to monitor the rising edge of the second pulse signal; Upon capturing the rising edge, the underlying hardware latch synchronously triggers a read operation on the value of the internal accumulator register of the standard energy reference module to obtain the current standard energy. ; Simultaneously, the current system absolute timestamp is obtained from the timing synchronization controller and used as the corresponding power timestamp. And treat them as mapping tuples Stored in high-speed memory.
[0009] Furthermore, when the carbon factor injection gateway detects the end of the test message frame, it records and caches the absolute timestamp of the issued carbon emission factor, specifically including: The carbon factor injection gateway determines the end-of-frame character of the test message by parsing the physical layer signals of the sent message in real time. Upon detecting the end marker, immediately invoke a hardware counter to obtain the current system time, which will serve as the absolute timestamp for the carbon emission factor. ; The carbon emission factor in the current message payload With the corresponding absolute timestamp The data is associated with a FIFO buffer queue to eliminate the interference of transmission delay caused by serial communication baud rate on data validity.
[0010] Furthermore, based on the time difference between the electrical energy timestamp and the absolute timestamp, the standard electrical energy is mapped to the time domain in which the carbon emission factor takes effect, generating a theoretical baseline carbon emission, specifically including: The recorded electrical energy timestamp The discrete time series formed, and the absolute timestamp The effective time nodes are compared and aligned. Based on the alignment results, the time axis of the entire testing cycle is divided into n integral infinitesimal segments where the carbon emission factor remains constant. Among them, time nodes The absolute timestamp corresponding to the switch in carbon emission factors; Each integral infinitesimal segment is extracted through interpolation calculation. The cumulative increase of standard electrical energy within And match the carbon emission factors that are in effect during that period. ; The theoretical baseline carbon emissions were calculated and generated. : Where i is the index of the integral infinitesimal segment, and n is the total number of integral infinitesimal segments.
[0011] Furthermore, obtaining the measured cumulative carbon emissions of the measured carbon fusion meter specifically includes: At the trigger point at the end of the test cycle, the calibration system sends a freeze read command through the verification communication interface connected to the tested carbon fusion meter. The measured cumulative carbon emissions are calculated automatically by reading the internal register of the measured carbon fusion meter based on the locally received test electrical signals and test messages. .
[0012] Furthermore, the total carbon emission error is obtained by comparing the measured cumulative carbon emissions with the theoretical baseline carbon emissions, and the time-series drift difference is extracted, specifically including: According to the formula Error rate in calculating total carbon emissions ,in The measured cumulative carbon emissions, This is the theoretical baseline carbon emission level; The carbon emission factor recorded by the measured carbon fusion meter is read from its internal log, changing from the old factor. Switch to new factor Local switchover time point ; Retrieve the new factor The corresponding absolute timestamp The time-series drift difference of the measured carbon fusion meter was calculated. : ; The method of combining the electrical power during this period to decouple the additional carbon metering error introduced by timing misalignment or communication delay from the total carbon emission error specifically includes: The time drift difference Within the corresponding time window, the cumulative drift segment standard electrical energy output by the standard electrical energy reference module during this period is obtained. ; The absolute carbon error caused by misuse of carbon factors due to time misalignment. Calculate using the following formula: The absolute carbon error The additional carbon metering error rate introduced solely by timing misalignment or communication delay is calculated by stripping away the total carbon emission error. : ; Step S400 also includes low-level anomaly simulation and fault tolerance assessment steps: During the process of the standard power reference module outputting test electrical signals, the carbon factor injection gateway is controlled to cut off the level of the communication bus at the physical layer, or to tamper with the CRC checksum of the test message, so as to simulate packet loss and network outage faults in a real distribution network. Under the continued fault condition, the carbon emission forecast of the measured electrical carbon fusion meter is read based on its local algorithm to maintain operation. By comparing the fault-tolerant predicted carbon emissions with the theoretical baseline carbon emissions continuously generated by the calibration system, the anti-interference fault tolerance index of the measured electrical carbon fusion meter is output.
[0013] On the other hand, the calibration device for the electrocarbon fusion meter includes: The calibration device itself; The timing synchronization controller is used to construct the global absolute time, send a timing message to the measured carbon fusion meter for initial time synchronization, and output the global absolute time and second pulse signal to the device. A standard electrical energy reference module, connected to the timing synchronization controller, is used to output a dynamically fluctuating test electrical signal to the tested carbon fusion meter under the trigger of the second pulse signal. A carbon factor injection gateway, connected to the timing synchronization controller, is used to send a test message containing discrete carbon emission factors to the tested electric carbon fusion meter. The dual-track error decoupling analyzer is communicatively connected to the timing synchronization controller, the standard power reference module, and the carbon factor injection gateway, respectively. The dual-track error decoupling analyzer is configured to: latch the current standard electrical energy of the standard electrical energy reference module and record the corresponding electrical energy timestamp when the timing synchronization controller outputs the second pulse signal; obtain the carbon emission factor and its absolute timestamp cached by the carbon factor injection gateway when identifying the end of the test message frame; based on the time difference between the electrical energy timestamp and the absolute timestamp, map the standard electrical energy to the time domain in which the corresponding carbon emission factor is effective to generate a theoretical benchmark carbon emission; and read the measured cumulative carbon emission of the tested electrical carbon fusion meter via the verification communication bus, extract the timing drift difference of carbon factor switching by comparison, and decouple the additional carbon measurement error introduced by timing misalignment or communication delay from the total carbon emission error; Furthermore, the timing synchronization controller integrates: a satellite timing module for receiving and decoding satellite signals to obtain the global absolute time; a temperature-controlled crystal oscillator connected to the satellite timing module for generating a local reference clock signal based on the global absolute time; and an FPGA-based low-level control logic circuit for generating and distributing the second pulse signal to the device based on the local reference clock signal. The standard power reference module integrates: a digital signal processor for generating discrete load waveform sequences based on preset test conditions; a digital-to-analog converter and power amplifier connected to the digital signal processor for converting the discrete load waveform sequences into dynamically fluctuating test electrical signals; and a power accumulation register for accumulating standard power in real time and outputting the current standard power when a trigger signal is received from the FPGA underlying control logic circuit. The carbon factor injection gateway integrates: a protocol parsing processor for packaging and assembling the discrete carbon emission factors into data link layer messages; a physical layer transceiver connected to the protocol parsing processor, which includes an anomaly simulation circuit for converting the assembled message into a physical layer communication level for transmission, and for truncating the bus level or tampering with the CRC checksum of the message when a fault injection command is received; and a high-speed first input first output buffer for pushing the extracted carbon emission factors and the absolute timestamp tagged at the bottom layer into the buffer queue when the end-of-frame character of the test message is detected. The dual-track error decoupling analyzer integrates: a high-speed random access memory for centrally mapping and storing heterogeneous test data marked by the power timestamp and the absolute timestamp; a floating-point arithmetic unit for executing cascaded low-level subtraction and division instructions on the stored data to calculate the total carbon emission error; and an arithmetic logic unit, which works in conjunction with the floating-point arithmetic unit to perform first-order linear interpolation calculations and multiply-accumulate operations based on the time-series drift difference, accurately decoupling and separating the additional carbon measurement error.
[0014] Beneficial effects This invention introduces a low-level timing control architecture based on global absolute time and second pulse signals, combined with high-speed cache and heterogeneous data timestamp cross-mapping logic, to achieve precise calibration and alignment of high-frequency continuous electrical energy and low-frequency discrete carbon factor messages on the physical time axis. At the same time, relying on a multi-dimensional error decoupling calculation sequence that includes first-order linear interpolation and multiply-accumulate operations, this device can use the extracted timing drift difference to accurately decouple and isolate the additional carbon measurement error introduced by clock drift or communication delay from the total carbon emission error, providing a quantifiable and traceable physical verification method for the measurement accuracy of the electric carbon fusion meter under dynamic load and abnormal network conditions. Attached Figure Description
[0015] Figure 1 This is a diagram of the internal operating architecture of the device of the present invention; Figure 2 This is a three-dimensional structural diagram of the device of the present invention; Figure 3 This is a schematic diagram of the overall process of the method of the present invention; Figure 4This is a schematic diagram illustrating the heterogeneous data temporal cross-mapping and decoupling principle of the method of the present invention.
[0016] Legend: 100, Calibration device body; 110, Timing synchronization controller; 111, Satellite timing module; 112, Oven-controlled crystal oscillator; 113, FPGA low-level control logic circuit; 120, Standard power reference module; 121, Digital signal processor; 122, Digital-to-analog converter and power amplifier; 123, Power accumulation register; 130, Carbon factor injection gateway; 131, Protocol parsing processor; 132, Physical layer transceiver; 133, High-speed first input first output buffer; 140, Dual-track error decoupling analyzer; 141, Arithmetic logic unit; 142, Floating-point arithmetic unit; 143, High-speed random access; 200, Measured carbon fusion meter. Detailed Implementation
[0017] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0018] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but includes other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0019] The present invention will now be described in further detail with reference to the accompanying drawings: Example 1: like Figure 3-4 As shown, the calibration method for the fusion meter of electricity and carbon is applied to a calibration system that includes a timing synchronization controller, a standard energy reference module, and a carbon factor injection gateway, and includes the following steps: S100: The time synchronization controller synchronizes the measured carbon fusion meter with time and controls the standard energy reference module to output test electrical signals. At the same time, the carbon factor injection gateway sends out test messages with discrete carbon emission factors. S200: When the timing synchronization controller outputs a second pulse signal, it latches the current standard electrical energy and records the electrical energy timestamp; at the same time, when the carbon factor injection gateway recognizes the end of the test message frame, it records the absolute timestamp of the issued carbon emission factor and caches it. S300: Based on the time difference between the electrical energy timestamp and the absolute timestamp, the standard electrical energy is mapped to the time domain in which the carbon emission factor takes effect, generating a theoretical baseline carbon emission; and the measured cumulative carbon emission of the measured electrical carbon fusion meter is obtained. S400: Compare the measured cumulative carbon emissions with the theoretical baseline carbon emissions to obtain the total carbon emission error; extract the carbon factor switching time point of the measured electric carbon fusion meter, calculate the time series drift difference between it and the corresponding absolute timestamp, and combine it with the electric power in that period to decouple the additional carbon measurement error introduced by time series misalignment or communication delay from the total carbon emission error.
[0020] Furthermore, the specific implementation process of step S100 is as follows: First, the global physical time base is constructed. The timing synchronization controller within the calibration system receives satellite radio frequency signals through its integrated satellite timing module (using a BeiDou satellite navigation system receiver or a GPS receiver), extracts ephemeris data, and decodes it to obtain the UTC global absolute time. The high-precision oven-controlled crystal oscillator (OCXO) inside the timing synchronization controller is locked in a phase-locked loop (PLL) based on this UTC global absolute time, generating a local reference clock signal with nanosecond-level synchronization accuracy. This local reference clock signal serves as the sole clock source for the entire calibration system.
[0021] Based on the established local reference clock signal, the timing synchronization controller initiates a forced time synchronization procedure for the tested carbon fusion meter. Specifically, the timing synchronization controller sends synchronization and follow-up messages with precise timestamps to the tested carbon fusion meter via the system calibration communication interface using the IEEE 1588PTP protocol to measure and compensate for master-slave clock delays; alternatively, the timing synchronization controller broadcasts a forced time synchronization data frame with an absolute timestamp to the underlying calibration communication bus according to the specific communication baud rate of the tested carbon fusion meter. After the tested carbon fusion meter receives the aforementioned synchronization message or data frame in its communication module, its internal master microcontroller (MCU) parses the absolute time data in the payload and calls the underlying driver to overwrite the current count value of its internal real-time clock (RTC) by directly writing to the register. Through this forced write operation, the initial phase difference between the tested carbon fusion meter's local RTC and the calibration system's reference clock is cleared from the physical layer before entering the substantive signal output stage.
[0022] After aligning the global clock domain, the timing synchronization controller triggers the physical start of the joint test condition. The timing synchronization controller sends a command to the standard power reference module via its internal parallel bus to execute a preset typical grid load curve. Upon receiving the command, the digital signal processor (DSP) inside the standard power reference module reads the pre-stored discrete sequence of load waveforms from its memory, drives the digital-to-analog converter (DAC) and linear power amplifier circuit, and generates dynamically fluctuating voltage and current signals at the hardware output terminals. The preset typical grid load curve includes multiple power step abrupt change points set at specific time nodes. During execution, the standard power reference module strictly follows the beat of the local reference clock signal, updating the amplitude and phase angle variables of the output voltage and current, and outputting the corresponding analog electrical signals to the voltage and current sampling terminals of the measured carbon fusion meter.
[0023] On the same time axis as the standard power reference module outputs the analog electrical signal, the timing synchronization controller schedules the actions of the carbon factor injection gateway in parallel. The hardware counter inside the timing synchronization controller monitors the execution time of the preset typical power grid load curve in real time. When the count value of the hardware counter matches a preset time node where the voltage or current signal undergoes a step change, the timing synchronization controller immediately sends a high-level trigger interrupt to the control chip of the carbon factor injection gateway. The carbon factor injection gateway responds to the trigger signal in the interrupt service function and, according to the data link layer frame format specifications of DL / T698.45 or RS485 / HPLC communication protocols, packages the discrete carbon emission factor values corresponding to the current time domain in the preset sequence into the data payload, calculates and adds a CRC checksum, and assembles a complete test message. Subsequently, the underlying transceiver of the carbon factor injection gateway converts the assembled test message into the corresponding RS485 physical layer differential level signal or HPLC high-frequency carrier signal, and sends it to the communication receiving port of the tested carbon fusion meter through the communication physical medium. The absolute time interrupt triggering mechanism of the timing synchronization controller ensures that the frame header start time of the discrete data message sent by the carbon factor injection gateway and the physical time of the sudden change in the output electrical signal of the standard power reference module are strictly synchronized on the time axis.
[0024] Furthermore, the specific implementation process of step S200 is as follows: For the acquisition of standard energy data, the timing controller inside the FPGA continuously monitors the pulse-per-second (PPS) signal output from the global clock source via high-speed GPIO pins. When the FPGA's input detection circuit detects a transient level change at the rising edge of the PPS signal, the internal synchronous trigger logic immediately generates a hardware pulse signal, which directly acts on the latch control pin of the standard energy reference module. Upon receiving this trigger signal, the dedicated energy metering chip or high-speed DSP inside the standard energy reference module freezes the current value of its internal 32-bit or 64-bit high-precision energy accumulation register within nanoseconds and transfers it to the shadow register, thereby locking the current accumulated standard energy value. Meanwhile, the high-speed time counter inside the FPGA synchronously captures the current UTC absolute time value within the same system clock cycle and records it as the corresponding power timestamp. The system will then capture the cumulative value of standard electrical energy. With power timestamp Encapsulated as a set of data tuples, it is written into the high-speed random access memory (SRAM) inside the calibration system, realizing the physical-level binding of power pulse counting and absolute time.
[0025] For discrete test messages sent by the carbon factor injection gateway, the calibration system employs a hardware timestamp marking mechanism based on communication frame end detection. The protocol processor inside the carbon factor injection gateway (such as a hardware UART controller or HPLC media access control unit) parses the bitstream signal sent to the communication bus in real time. Taking RS485 serial communication as an example, the hardware logic circuit inside the gateway continuously monitors the physical level of the communication message through shift registers and comparators. When the circuit detects the end of the last stop bit of a test message frame, i.e., the physical falling edge transition of the end-of-frame marker (EOF), the hardware logic circuit immediately generates a capture interrupt. This interrupt signal directly triggers the time recording register inside the FPGA, locking the value of its currently running system absolute time counter as the absolute timestamp of the actual arrival and effectiveness of the carbon emission factor. .
[0026] While capturing the timestamp, the message parser extracts the currently effective carbon emission factor value from the data payload of the test message. To address the variability in serial communication caused by differences in baud rate and message length, the calibration system extracts the carbon emission factor value. The absolute timestamp associated with it The data is then pushed into a high-speed hardware first-in, first-out (FIFO) buffer with a preset depth of 256 levels, according to the issued sequence. Through this timestamp recording method triggered by physical layer signal transitions, the calibration system effectively avoids dynamic jitter and system interrupt response delays generated by the application layer software protocol stack when processing messages. This ensures that each discrete carbon emission factor has microsecond-level calibration accuracy on the time axis, providing accurate physical raw data for heterogeneous data alignment in subsequent step S300.
[0027] Furthermore, the implementation process of step S300 is as follows: During step S300, the microprocessor inside the calibration system calls the cross-mapping alignment algorithm to perform hard stitching and benchmark integration on the time axis of the previously captured heterogeneous frequency data.
[0028] The microprocessor continuously reads the power timestamps from the high-speed random access memory via its internal high-speed data bus. Standard cumulative electrical energy value The sequence is popped sequentially from the first in and first out buffer, each with an absolute timestamp. carbon emission factors Sequence. Due to power timestamps Generated by periodic triggering of hardware second pulses, while absolute timestamps... Generated by aperiodic triggering at the end of discrete message frames, the microprocessor employs data slicing logic anchored by low-frequency carbon data. The microprocessor extracts all absolute timestamps. The time nodes are arranged in ascending order to form a set. This set is used to divide the global absolute time axis of the entire calibration test cycle into n consecutive integral infinitesimal segments. In this division mechanism, time nodes A strict mapping equal to the absolute timestamp of the i-th carbon emission factor physically arriving from the communication bus and theoretically taking effect immediately. .
[0029] For any independent integral infinitesimal element The microprocessor searches for adjacent time nodes in the extracted electrical energy time series. and The data points at both ends. The arithmetic logic unit inside the microprocessor executes first-order linear interpolation calculation instructions, finely dividing the electrical energy according to the slope ratio, thereby calculating the data that strictly falls within this closed interval. The cumulative increase of standard electrical energy over a physical time span .
[0030] When the arithmetic logic unit (ALU) and floating-point unit (FPU) inside the microprocessor execute first-order linear interpolation calculation instructions, the specific underlying data processing and addressing logic unfolds as follows: For any independent integral infinitesimal element The microprocessor retrieves two consecutive electrical energy timestamps on either side of the boundary on the timeline using memory pointers, and records them as the preceding timestamps. With subsequent timestamps Satisfying physical time relationship The microprocessor synchronously reads the accumulated register value, which is physically mapped to the timestamps of both, representing the preceding standard electrical energy. With subsequent standard electrical energy Subsequently, the floating-point unit (FPU) inside the microprocessor first executes a hardware subtraction instruction to calculate the time difference of the power sampling period. and the absolute increase difference in electrical energy The FPU calls a hardware division instruction to calculate the slope parameter (i.e., the equivalent value of transient active power within this nanosecond interval) for this tiny time period. Based on this, the microprocessor's arithmetic logic unit (ALU) calculates the initial boundary. Physical time offset from the preceding timestamp It then invokes the multiply-accumulate (MAC) instruction to calculate the boundary conditions. Extremely precise equivalent cumulative electrical energy at any given moment: Similarly, regarding the time boundary of this integral infinitesimal segment... The microprocessor retrieves the preceding timestamps immediately adjacent to the boundary from the cache. With subsequent timestamps And extract the corresponding physical mapping energy value. and The FPU calculates the boundary values including the cutoff boundary based on the same subtraction and division calculation path. interval slope parameter Subsequently, the cutoff boundary was calculated using a multiply-accumulate calculation path. Precise equivalent cumulative electrical energy at any given moment: After completing the energy mapping and scaling operations at the absolute physical time boundaries at both ends of the interval, the Arithmetic Logic Unit (ALU) executes the final subtraction calculation instruction, subtracting the starting boundary energy value from the cutoff boundary energy value: Through the aforementioned underlying difference, division mapping, and multiplication-addition-integral steps, the microprocessor precisely isolates the regions that completely and strictly fall within the closed interval. Cumulative increase in standard electrical energy within the span The underlying arithmetic interpolation process transforms nanosecond-level time offset errors into extremely fine electrical energy slices, completely eliminating truncation errors caused by the physical asynchrony between the hardware pulse-per-second (PPS) period and the discrete communication message frame tail (EOF) from the underlying data structure mechanism.
[0031] Simultaneously, the microprocessor retrieves from memory a carbon emission factor that uniquely corresponds to that time span and remains constant and effective. After preparing the data for all n infinitesimal segments, the microprocessor's internal hardware floating-point unit triggers a multiply-accumulate (MAC) instruction stream, calling the specific formula: A discrete integral summation operation is performed cycle by cycle. In the formula, i is the cyclic cursor variable of the integral segment currently traversed by the microprocessor, and n is the total length of the segment recorded in memory. Through the above interpolation and accumulation operations under a pure hardware clock reference, the microprocessor outputs the theoretical reference carbon emissions. And store it in the high-order read-only register.
[0032] After completing the baseline truth value calculation, the main control computer of the calibration system sends a hexadecimal freeze read command to the tested electro-carbon fusion meter through its underlying verification communication interface. This command contains a high-priority forced freeze function code at the data link layer. After the receiving chip of the tested electro-carbon fusion meter parses and recognizes this function code, it sends a non-maskable interrupt (NMI) to its main control microcontroller through the internal bus, forcibly freezing the carbon emission count value independently calculated locally based on the received test electrical signal and test message. Subsequently, the main control computer sends a read request message containing an object-specific identifier (OAI) according to the object-oriented data exchange protocol stack, directly addresses and reads the data in the target address segment of the internal non-volatile memory of the tested electro-carbon fusion meter, parses it, and converts it into the measured cumulative carbon emissions in floating-point format. The data is then cached in the memory space of the main control computer for subsequent comparison and retrieval.
[0033] Furthermore, the specific implementation process of step S400 is as follows: In obtaining theoretical baseline carbon emissions Compared with measured cumulative carbon emissions Then, the high-speed floating-point unit (FPU) inside the microprocessor immediately takes over the data bus. The FPU reads data sequentially through register addressing. and The double-precision floating-point values are processed by cascading subtraction and division instructions, directly executing the formula at the underlying level. After the calculation is complete, the FPU will calculate the total carbon emission error rate. The numerical results are latched into the designated output result register area. This total error rate includes the inherent error of the electrical energy metering hardware itself, as well as the superimposed error caused by timing misalignment of heterogeneous data.
[0034] To achieve precise decoupling of timing errors, the main control computer sends a log read frame based on an object-oriented protocol (such as DL / T698.45) to the tested carbon fusion meter via the verification communication interface. The address code of this data frame directly points to the "carbon factor switching event record area" inside the tested meter. The microprocessor receives and parses the response message returned by the tested meter, extracting the carbon factor recorded by the tested meter's local main control chip, showing the change from the old factor. Switch to new factor Local switchover time point Simultaneously, the microprocessor retrieves and extracts the new factor from the system's internal random access memory based on the memory offset pointer. Physically bound absolute timestamp Subsequently, the arithmetic logic unit (ALU) inside the microprocessor loads these two timestamp data into the accumulator and executes a signed subtraction instruction. This allows for the calculation of the exact timing drift difference caused by the internal real-time clock (RTC) frequency offset or physical communication link blockage in the tested carbon fusion meter. .
[0035] Based on the calculated time drift difference Microprocessors use absolute timestamps Switching time points with local To define the physical time boundary, a dedicated "error calibration time window" is delineated within the global energy integration domain. The microprocessor reuses the underlying hardware first-order linear interpolation instructions to extract the energy accumulation register values at the two ends of the error calibration time window from the cache that records the standard energy time series. The FPU performs differential division to calculate the instantaneous equivalent power slope and calls the multiply-accumulate (MAC) instruction to interpolate and approximate the time boundary, accurately calculating the difference that completely falls within the time series drift. Cumulative increment of standard electrical energy of drift segment within physical span .
[0036] After completing the above energy domain feature extraction, the microprocessor's FPU retrieves the old factors. With new factors The subtraction instruction is performed to obtain the difference in factor application caused by the time misalignment. The FPU further calls a single-cycle hardware multiplication instruction to calculate the standard electrical energy of the drift segment. Multiply the difference by the factor and apply the closed-loop formula. At the underlying logic level, the absolute carbon error caused by the application of incorrect carbon data during the drift period is calculated. Ultimately, the FPU invokes the hardware division instruction to execute the formula. Calculate the additional carbon measurement error rate in a single dimension. The microprocessor will strip away the additional carbon metering error rate. Error rate with total carbon emissions The data is reassembled according to the preset verification report data structure, pushed into the direct memory access (DMA) channel, drives the local display control chip to refresh the interface, or sent to the upper-level verification management platform through the communication gateway, thus completing the entire closed-loop hardware-level calibration and error decoupling process.
[0037] Example 2: like Figure 1-2 As shown: The calibration device for the electrocarbon fusion meter includes: Calibration device body 100; The timing synchronization controller 110 is used to construct the global absolute time, send a timing message to the measured carbon fusion meter 200 for initial time synchronization, and output the global absolute time and second pulse signal to the device. The standard power reference module 120 is connected to the timing synchronization controller 110 and is used to output a dynamically fluctuating test electrical signal to the tested carbon fusion meter 200 under the trigger of the second pulse signal. The carbon factor injection gateway 130 is connected to the timing synchronization controller 110 and is used to send a test message containing discrete carbon emission factors to the tested electric carbon fusion meter 200. The dual-track error decoupling analyzer 140 is communicatively connected to the timing synchronization controller 110, the standard power reference module 120, and the carbon factor injection gateway 130, respectively. The dual-track error decoupling analyzer 140 is configured to: latch the current standard electrical energy of the standard electrical energy reference module 120 and record the corresponding electrical energy timestamp when the timing synchronization controller 110 outputs a second pulse signal; acquire the carbon emission factor and its absolute timestamp cached when the carbon factor injection gateway 130 identifies the end of the test message frame; based on the time difference between the electrical energy timestamp and the absolute timestamp, map the standard electrical energy to the time domain in which the corresponding carbon emission factor is effective to generate a theoretical reference carbon emission amount; and read the measured cumulative carbon emission amount of the tested electrical carbon fusion meter 200 via the verification communication bus, extract the timing drift difference of the carbon factor switching by comparison, and decouple the additional carbon measurement error introduced by timing misalignment or communication delay from the total carbon emission error; Furthermore, the timing synchronization controller 110 integrates: a satellite timing module 111, which receives and decodes satellite signals to obtain global absolute time; a temperature-controlled crystal oscillator 112, which is connected to the satellite timing module 111 and generates a local reference clock signal based on global absolute time phase lock; and an FPGA low-level control logic circuit 113, which generates and distributes second pulse signals to the device based on the local reference clock signal. The standard power reference module 120 integrates: a digital signal processor 121, used to generate discrete load waveform sequences according to preset test conditions; a digital-to-analog converter and power amplifier 122, connected to the digital signal processor 121, used to convert the discrete load waveform sequences into dynamically fluctuating test electrical signals; and a power accumulation register 123, used to accumulate standard power in real time, and output the current standard power when a trigger signal is received from the FPGA underlying control logic circuit 113. The carbon factor injection gateway 130 integrates: a protocol parsing processor 131, used to package and assemble discrete carbon emission factors into data link layer messages; a physical layer transceiver 132, connected to the protocol parsing processor 131, which contains an anomaly simulation circuit to convert the assembled message into a physical layer communication level for transmission, and to truncate the bus level or tamper with the CRC checksum of the message when a fault injection command is received; and a high-speed first input first output buffer 133, used to push the extracted carbon emission factors and the absolute timestamp of the underlying tag into the buffer queue when the end-of-frame marker of the test message is detected; The dual-track error decoupling analyzer 140 integrates: a high-speed random access memory 143 for centrally mapping and storing heterogeneous test data marked by power timestamps and absolute timestamps; a floating-point arithmetic unit 142 for executing cascaded low-level subtraction and division instructions on the stored data to calculate the total carbon emission error; and an arithmetic logic unit 141, which works in conjunction with the floating-point arithmetic unit 142 to perform first-order linear interpolation calculations and multiply-accumulate operations based on the timing drift difference, accurately decoupling and separating the additional carbon measurement error.
[0038] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A calibration method for an electrocarbon fusion meter, characterized in that, The calibration system, which includes a timing synchronization controller, a standard power reference module, and a carbon factor injection gateway, comprises the following steps: S100: The time synchronization controller synchronizes the measured carbon fusion meter with time and controls the standard energy reference module to output test electrical signals. At the same time, the carbon factor injection gateway sends out test messages with discrete carbon emission factors. S200: When the timing synchronization controller outputs a second pulse signal, the current standard electrical energy is latched and the electrical energy timestamp is recorded; at the same time, when the carbon factor injection gateway recognizes the end of the frame of the test message, the absolute timestamp of the issued carbon emission factor is recorded and cached. S300. Based on the time difference between the electrical energy timestamp and the absolute timestamp, the standard electrical energy is mapped to the time domain in which the carbon emission factor is effective to generate a theoretical baseline carbon emission; and the measured cumulative carbon emission of the measured electrical carbon fusion meter is obtained. S400. Compare the measured cumulative carbon emissions with the theoretical baseline carbon emissions to obtain the total carbon emission error; extract the carbon factor switching time point of the measured electric carbon fusion meter, calculate the time drift difference between it and the corresponding absolute timestamp, and combine it with the electric power in that time period to decouple the additional carbon measurement error introduced by time misalignment or communication delay from the total carbon emission error.
2. The calibration method for the electrocarbon fusion meter according to claim 1, characterized in that, The process of synchronizing the measured carbon fusion meter using a time synchronization controller specifically includes: The timing synchronization controller obtains global absolute time through a built-in satellite time synchronization module; Based on the global absolute time, the timing synchronization controller uses the IEEE 1588PTP protocol or sends a timestamped broadcast synchronization message to the communication bus to forcibly overwrite the internal real-time clock of the tested carbon fusion meter, so as to eliminate the initial phase difference before the test starts.
3. The calibration method for the electrocarbon fusion meter according to claim 2, characterized in that, The control standard electrical reference module outputs a test electrical signal and simultaneously controls the carbon factor injection gateway to send a test message with discrete carbon emission factors, specifically including: Based on a preset typical power grid load curve, the standard power reference module is controlled to output dynamically fluctuating voltage and current signals. At a preset time point when the voltage or current signal undergoes a step change, the carbon factor injection gateway is controlled to send a test message containing the latest carbon emission factor to the tested electrical carbon fusion meter according to the RS485 or HPLC communication protocol, so as to simulate the extreme test condition where the grid load and carbon factor change drastically and synchronously.
4. The calibration method for the electrocarbon fusion meter according to claim 3, characterized in that, When the timing synchronization controller outputs a second pulse signal, the current standard electrical energy is latched and the electrical energy timestamp is recorded, specifically including: The calibration system uses an FPGA-based low-level hardware latch to monitor the rising edge of the second pulse signal; Upon capturing the rising edge, the underlying hardware latch synchronously triggers a read operation on the value of the internal accumulator register of the standard energy reference module to obtain the current standard energy. ; Simultaneously, the current system absolute timestamp is obtained from the timing synchronization controller and used as the corresponding power timestamp. And treat them as mapping tuples Stored in high-speed memory.
5. The calibration method for the electrocarbon fusion meter according to claim 4, characterized in that, When the carbon factor injection gateway detects the end of the test message frame, it records and caches the absolute timestamp of the issued carbon emission factor, specifically including: The carbon factor injection gateway determines the end-of-frame character of the test message by parsing the physical layer signals of the sent message in real time. Upon detecting the end marker, immediately invoke a hardware counter to obtain the current system time, which will serve as the absolute timestamp for the carbon emission factor. ; The carbon emission factor in the current message payload With the corresponding absolute timestamp The data is associated with a FIFO buffer queue to eliminate the interference of transmission delay caused by serial communication baud rate on data validity.
6. The calibration method for the electrocarbon fusion meter according to claim 5, characterized in that, Based on the time difference between the electrical energy timestamp and the absolute timestamp, the standard electrical energy is mapped to the time domain in which the carbon emission factor takes effect, generating a theoretical baseline carbon emission, specifically including: The recorded electrical energy timestamp The discrete time series formed, and the absolute timestamp The effective time nodes are compared and aligned. Based on the alignment results, the time axis of the entire testing cycle is divided into n integral infinitesimal segments where the carbon emission factor remains constant. Among them, time nodes The absolute timestamp corresponding to the switch in carbon emission factors; Each integral infinitesimal segment is extracted through interpolation calculation. The cumulative increase of standard electrical energy within And match the carbon emission factors that are in effect during that period. ; The theoretical baseline carbon emissions were calculated and generated. : in, is the index of the integral infinitesimal segment, and n is the total number of integral infinitesimal segments.
7. The calibration method for the electrocarbon fusion meter according to claim 6, characterized in that, The acquisition of the measured cumulative carbon emissions from the measured carbon fusion meter specifically includes: At the trigger point at the end of the test cycle, the calibration system sends a freeze read command through the verification communication interface connected to the tested carbon fusion meter. The measured cumulative carbon emissions are calculated automatically by reading the internal register of the measured carbon fusion meter based on the locally received test electrical signals and test messages. .
8. The calibration method for the electrocarbon fusion meter according to claim 7, characterized in that, The total carbon emission error is calculated by comparing the measured cumulative carbon emissions with the theoretical baseline carbon emissions, and the time-series drift difference is extracted, specifically including: According to the formula Error rate in calculating total carbon emissions ,in The measured cumulative carbon emissions, This is the theoretical baseline carbon emission level; The carbon emission factor recorded by the measured carbon fusion meter is read from its internal log, changing from the old factor. Switch to new factor Local switchover time point ; Retrieve the new factor The corresponding absolute timestamp The time-series drift difference of the measured carbon fusion meter was calculated. : ; The method of combining the electrical power during this period to decouple the additional carbon metering error introduced by timing misalignment or communication delay from the total carbon emission error specifically includes: The time drift difference Within the corresponding time window, the cumulative drift segment standard electrical energy output by the standard electrical energy reference module during this period is obtained. ; The absolute carbon error caused by misuse of carbon factors due to time misalignment. Calculate using the following formula: The absolute carbon error The additional carbon metering error rate introduced solely by timing misalignment or communication delay is calculated by stripping away the total carbon emission error. : ; Step S400 also includes low-level anomaly simulation and fault tolerance assessment steps: During the process of the standard power reference module outputting test electrical signals, the carbon factor injection gateway is controlled to cut off the level of the communication bus at the physical layer, or to tamper with the CRC checksum of the test message, so as to simulate packet loss and network outage faults in a real distribution network. Under the continued fault condition, the carbon emission forecast of the measured electrical carbon fusion meter is read based on its local algorithm to maintain operation. By comparing the fault-tolerant predicted carbon emissions with the theoretical baseline carbon emissions continuously generated by the calibration system, the anti-interference fault tolerance index of the measured electrical carbon fusion meter is output.
9. A calibration device for an electrocarbon fusion meter, comprising the calibration method for an electrocarbon fusion meter according to any one of claims 1-8, characterized in that, include: Calibration device body (100); The timing synchronization controller (110) is used to construct the global absolute time, send a timing message to the measured carbon fusion meter (200) for initial time synchronization, and output the global absolute time and second pulse signal to the device. The standard energy reference module (120) is connected to the timing synchronization controller (110) and is used to output a dynamically fluctuating test electrical signal to the tested carbon fusion meter (200) under the trigger of the second pulse signal. A carbon factor injection gateway (130) is connected to the timing synchronization controller (110) and is used to send a test message containing discrete carbon emission factors to the tested electric carbon fusion meter (200). The dual-track error decoupling analyzer (140) is communicatively connected to the timing synchronization controller (110), the standard power reference module (120), and the carbon factor injection gateway (130), respectively. The dual-track error decoupling analyzer (140) is configured to latch the current standard energy of the standard energy reference module (120) and record the corresponding energy timestamp when the timing synchronization controller (110) outputs the second pulse signal. The carbon emission factor and its absolute timestamp are cached when the carbon factor injection gateway (130) identifies the end of the test message frame; Based on the time difference between the electrical energy timestamp and the absolute timestamp, the standard electrical energy is mapped to the time domain in which the corresponding carbon emission factor takes effect to generate a theoretical baseline carbon emission. The measured cumulative carbon emissions of the tested carbon fusion meter (200) are read via the verification communication bus. The time drift difference of carbon factor switching is extracted by comparison, and the additional carbon measurement error introduced by time misalignment or communication delay is decoupled from the total carbon emission error.
10. The calibration device for the electrocarbon fusion meter according to claim 9, characterized in that, The timing synchronization controller (110) integrates: a satellite timing module (111) for receiving and decoding satellite signals to obtain the global absolute time; a temperature-controlled crystal oscillator (112) connected to the satellite timing module (111) for generating a local reference clock signal based on the global absolute time; and an FPGA low-level control logic circuit (113) for generating and distributing the second pulse signal to the device based on the local reference clock signal. The standard power reference module (120) integrates: a digital signal processor (121) for generating a discrete load waveform sequence based on preset test conditions; and a digital-to-analog converter and power amplifier (122) connected to the digital signal processor (121) for converting the discrete load waveform sequence into the dynamically fluctuating test electrical signal. And an energy accumulation register (123) is used to accumulate standard energy in real time, and output the current standard energy when the trigger signal of the FPGA bottom control logic circuit (113) is received; The carbon factor injection gateway (130) integrates: a protocol parsing processor (131) for packaging and assembling the discrete carbon emission factors into data link layer messages; and a physical layer transceiver (132) connected to the protocol parsing processor (131), which contains an anomaly simulation circuit for converting the assembled message into a physical layer communication level for transmission, and for truncating the bus level or tampering with the CRC checksum of the message when a fault injection command is received. And a high-speed first input first output buffer (133) is used to push the extracted carbon emission factor and the absolute timestamp marked at the bottom layer into the buffer queue when the end-of-frame character of the test message is detected. The dual-track error decoupling analyzer (140) integrates: a high-speed random access memory (143) for centrally mapping and storing heterogeneous test data marked by the power timestamp and the absolute timestamp; a floating-point arithmetic unit (142) for executing cascaded low-level subtraction and division instructions on the stored data to calculate the total carbon emission error; and an arithmetic logic unit (141) in cooperation with the floating-point arithmetic unit (142) for executing first-order linear interpolation calculation and multiply-accumulate operation instructions based on the time drift difference to accurately decouple and remove the additional carbon measurement error.