Vehicle-mounted bidirectional rapid metering direct-current electric energy meter and metering method

By using a heterogeneous architecture of FPGA and dual-core MCU and a sliding window algorithm, the metering delay and error problems of traditional DC energy meters in the charging and discharging process of new energy electric vehicles are solved. This achieves millisecond-level seamless switching and 0.5-second-level accurate metering of electric vehicle power batteries, meeting the needs of electricity billing and battery life cycle monitoring.

CN121899482APending Publication Date: 2026-04-21CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD
Filing Date
2025-12-03
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Traditional DC energy meters suffer from problems such as metering delay, large error, frequent bit errors and device drift during the charging and discharging process of new energy electric vehicles. They cannot achieve accurate measurement of bidirectional energy flow of power batteries and cannot meet the needs of electricity billing and battery life cycle monitoring.

Method used

Employing a heterogeneous architecture of FPGA and dual-core MCU, combined with a high-speed sampling unit, range/power flow switching unit, bidirectional metering unit, isolated communication unit, and temperature noise compensation unit, it achieves millisecond-level seamless switching and 0.5S-level accurate metering, and performs real-time error compensation through a sliding window algorithm and feedforward control network.

Benefits of technology

It achieves millisecond-level seamless switching and 0.5-second-level precise metering of electric vehicle power batteries under complex operating conditions, providing highly reliable real-time data support and providing credible data support for vehicle energy consumption management and battery life cycle monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121899482A_ABST
    Figure CN121899482A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle-mounted bidirectional rapid metering direct-current electric energy meter and a metering method, and the electric energy meter comprises a main control unit which serves as a control and calculation core of the electric energy meter; the high-speed sampling unit is used for digitally sampling the voltage and current analog signals and transmitting sampled data to the main control unit; the measuring range / power flow switching unit is used for receiving a switching instruction of the main control unit and executing measuring range switching and charging and discharging direction switching; the bidirectional metering unit is used for acquiring the sampling data from the main control unit and performing accumulation metering of bidirectional electric energy based on the sampling data; the isolation communication unit is used for performing electrical isolation and protocol conversion on the metering result of the two-way metering unit and then outputting the metering result outwards; the temperature noise compensation unit is used for monitoring the environment temperature and the chip temperature in real time and dynamically compensating the data gain and the data offset of the high-speed sampling unit and the bidirectional metering unit; and the power supply management unit is used for providing multi-path isolated stable working voltage for all units in the electric energy meter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electric vehicle energy metering technology, specifically to an on-board bidirectional fast-metering DC energy meter and metering method. Background Technology

[0002] Under the strategic backdrop of "dual-carbon" and "new power system," DC power distribution and utilization, including new energy electric vehicles, photovoltaic power generation, and energy storage connected to the grid, are booming. The high proportion of new energy sources and power electronic equipment connected to the DC distribution network leads to increased fluctuations in DC signal voltage and current, as well as greater randomness in these fluctuations.

[0003] Taking the charging and discharging of new energy electric vehicles as an example, the current varies within the range of 1A to 800A throughout the entire charging and discharging process, and may fluctuate significantly within 0.1s. For such a wide range of current changes, DC energy meters need to switch between different ranges and achieve accurate measurement of electrical energy according to the actual business needs of charging and discharging.

[0004] Traditional solutions use relays to switch ranges, with switching times ranging from 1 to 3 seconds. This leads to a loss of accumulated energy during this period, causing errors that degrade the entire metering process. Furthermore, electric vehicles experience millisecond-level power fluctuations during charging. Traditional DC energy meters have relatively low sampling frequencies and slow switching speeds, requiring hundreds of milliseconds for reversal between charging and discharging, resulting in data loss and frequent errors. Existing onboard energy metering units suffer from device drift and communication errors under wide-voltage transient and strong electromagnetic interference environments. They lack compensation and isolation designs for temperatures ranging from -40°C to 85°C, making it impossible to accurately record the bidirectional energy flow of the power battery in real time. This makes it difficult to meet the needs of range estimation, electricity billing, and traceability for secondary use.

[0005] Therefore, based on the above problems, there is an urgent need to develop a vehicle-mounted bidirectional fast metering energy meter to achieve accurate measurement of electrical energy during the charging and discharging process of power batteries. Summary of the Invention

[0006] This application provides a vehicle-mounted bidirectional fast-metering DC energy meter and metering method, enabling seamless switching of electric vehicle power batteries at the millisecond level and accurate metering at the 0.5-second level under complex operating conditions, providing highly reliable and traceable real-time data support for vehicle energy consumption management, bidirectional charging and discharging settlement, and battery life cycle monitoring.

[0007] To achieve the above objectives, this application adopts the following technical solution:

[0008] In a first aspect, this application provides a vehicle-mounted bidirectional fast-metering DC energy meter, comprising: a main control unit, a high-speed sampling unit, a range / power flow switching unit, a bidirectional metering unit, an isolation communication unit, a power management unit, and a temperature noise compensation unit;

[0009] The main control unit adopts a heterogeneous architecture of FPGA and dual-core MCU as the control and calculation core of the energy meter;

[0010] The high-speed sampling unit is connected to the FPGA of the main control unit via the LVDS differential serial bus. It is used to digitally sample voltage and current analog signals and transmit the sampled data to the main control unit.

[0011] The range / power flow switching unit is connected to the FPGA of the main control unit via a parallel control bus. It is used to receive switching commands from the main control unit and perform range switching and charging / discharging direction switching.

[0012] The bidirectional metering unit is connected to the dual-core MCU of the main control unit via the SPI interface. It is used to obtain sampling data from the main control unit and perform bidirectional cumulative metering of electrical energy based on the sampling data.

[0013] The isolation communication unit is connected to the dual-core MCU of the main control unit via the SPI interface. It is used to electrically isolate and convert the measurement results of the bidirectional metering unit before outputting them to the outside.

[0014] The temperature noise compensation unit is connected to the dual-core MCU of the main control unit via the SPI interface. It is used to monitor the ambient temperature and chip temperature in real time, and to dynamically compensate for the data gain and data offset of the high-speed sampling unit and the bidirectional metering unit.

[0015] The power management unit is used to obtain a wide voltage input from the vehicle battery and provide stable operating voltages with multiple isolation channels for all units in the energy meter.

[0016] Secondly, this application provides a metering method for a vehicle-mounted bidirectional fast-metering DC energy meter, comprising the following steps:

[0017] S1: Synchronous sampling step: The clock management submodule of the main control unit generates a synchronous clock, drives the high-speed sampling unit to synchronously sample the voltage and current analog signals, and transmits the sampled data to the main control unit in real time through the LVDS differential serial bus. The main control unit includes an FPGA and a dual-core MCU.

[0018] S2: Flow direction identification and judgment steps: The FPGA sends the sampled data to the bidirectional metering unit. The bidirectional metering unit performs zero-crossing detection and instantaneous power threshold judgment on the sampled data, and then sends a flow direction mark signal to the dual-core MCU.

[0019] S3: Switching control and execution steps: The dual-core MCU sends a switching command to the range / power flow switching unit through the parallel control bus according to the flow direction flag signal. The range / power flow switching unit performs a fast switch, and the FPGA freezes the power register at the same time.

[0020] S4: Power Calculation and Energy Accumulation Steps: After the switching is completed, the bidirectional metering unit uses a sliding window multiplier array to calculate the instantaneous power in real time and accumulates the bidirectional electrical energy through a dedicated accumulator state machine.

[0021] S5: Real-time error compensation step: The temperature noise compensation unit monitors the ambient temperature and chip operating temperature in real time, and performs real-time compensation for the data gain and data offset of the high-speed sampling unit and the bidirectional metering unit.

[0022] In this embodiment, by employing a heterogeneous architecture of "FPGA + dual-core MCU," real-time comparison of current polarity and instantaneous automatic reversal of metering direction are achieved at the hardware level, completely eliminating the metering delay and energy underestimation problems caused by traditional relay switching. By utilizing a sliding window power algorithm, active power and dynamic instantaneous power are calculated simultaneously without delay, effectively suppressing PWM ripple while accurately capturing transient energy consumption details. Through a built-in feedforward control network and standard pulse self-checking mechanism, metering errors are monitored and corrected in real-time across all temperatures and ranges, achieving self-maintained accuracy throughout the entire battery lifecycle. In summary, this application ensures that electric vehicles can achieve millisecond-level seamless switching and 0.5-second-level accurate metering under complex operating conditions such as rapid acceleration and deceleration, energy recovery, and V2G, providing continuous, reliable, and traceable data support for vehicle energy consumption management, bidirectional charging and discharging settlement, and battery lifecycle monitoring.

[0023] Other features and advantages of this application will be described in detail in the following detailed description section. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a schematic diagram of the structure of a vehicle-mounted bidirectional fast-metering DC energy meter provided in an embodiment of this application;

[0026] Figure 2 This is a schematic diagram of the structure of the high-speed sampling unit provided in the embodiments of this application;

[0027] Figure 3 A schematic diagram of the range / power flow switching unit provided in the embodiments of this application;

[0028] Figure 4 This is a schematic diagram of the structure of the bidirectional metering unit provided in the embodiments of this application;

[0029] Figure 5 This is a schematic flowchart illustrating the metering method for a vehicle-mounted bidirectional fast-metering DC energy meter provided in an embodiment of this application. Detailed Implementation

[0030] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. At the same time, in the description of the embodiments of this application, the terms "first," "second," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0031] Figure 1 This is a schematic diagram of the structure of a vehicle-mounted bidirectional fast-metering DC energy meter provided in an embodiment of this application.

[0032] The vehicle-mounted bidirectional fast-metering DC energy meter includes a main control unit, a high-speed sampling unit, a range / power flow switching unit, a bidirectional metering unit, an isolation communication unit, a power management unit, and a temperature noise compensation unit.

[0033] The main control unit adopts a heterogeneous architecture of FPGA and dual-core MCU as the control and calculation core of the energy meter.

[0034] The high-speed sampling unit is connected to the FPGA of the main control unit via the LVDS differential serial bus. It is used to digitally sample voltage and current analog signals and transmit the sampled data to the main control unit.

[0035] The range / power flow switching unit is connected to the FPGA of the main control unit via a parallel control bus. It is used to receive switching commands from the main control unit and perform range switching and charge / discharge direction switching.

[0036] The bidirectional metering unit is connected to the dual-core MCU of the main control unit via an SPI interface. It is used to obtain sampling data from the main control unit and perform bidirectional cumulative metering of electrical energy based on the sampling data.

[0037] The isolation communication unit is connected to the dual-core MCU of the main control unit via the SPI interface. It is used to electrically isolate and convert the measurement results of the bidirectional metering unit before outputting them to the outside.

[0038] The temperature noise compensation unit is connected to the dual-core MCU of the main control unit via the SPI interface. It is used to monitor the ambient temperature and chip temperature in real time, and to dynamically compensate for the data gain and data offset of the high-speed sampling unit and the bidirectional metering unit.

[0039] The power management unit is used to obtain a wide voltage input from the vehicle battery and provide stable operating voltages with multiple isolation channels for all units in the energy meter.

[0040] In this embodiment, as Figure 1 As shown, the main control unit includes an FPGA and a dual-core MCU.

[0041] The FPGA integrates a clock management submodule and a serial-to-parallel conversion submodule.

[0042] The clock management submodule is used to generate a synchronous sampling clock, SPI clock, and data recovery clock, providing a synchronous clock reference for each unit;

[0043] The serial-to-parallel conversion submodule is used to perform high-speed serial data interaction with the high-speed sampling unit and the range / power flow switching unit via the LVDS bus, so as to realize the reception of sampling data and the transmission of control commands;

[0044] Dual-core MCU, with an integrated data processing submodule and bidirectional metering drive submodule;

[0045] The data processing submodule is used to buffer and process the sampled data sent by the FPGA;

[0046] The bidirectional metering drive submodule is used to generate flow direction judgment and range switching instructions based on the processed data.

[0047] The aforementioned clock management submodule uses a differential crystal oscillator to generate a 10kHz sampling clock, an 80MHz SPI clock, and a 250MHz data recovery clock within the same chip after frequency division / multiplication by an MMCM. This provides a synchronous, low-jitter, and zero-latency clock reference for the entire energy meter, ensuring that high-speed sampling, protocol communication, and data deserialization operate in strict phase synchronization.

[0048] Further explanation is needed: In the transmitting direction, the serial-to-parallel conversion submodule calls the FPGA's internal OSERDES (parallel-to-serial transmitter) to serialize the multi-bit parallel sampled data. This serialized data is then driven by the differential output buffer (OBUFDS) into an LVDS differential signal and sent to the high-speed sampling unit. In the receiving direction, the differential input buffer (IBUFDS) receives the LVDS differential signal. After bit alignment by the programmable input delay unit (IDELAY), the signal is sent to the ISERDES (serial-to-parallel receiver) to complete signal recovery and deserialization. The recovered parallel data is directly mapped to the FPGA logic array, allowing the main control unit to parse and write back control words in real time, thus realizing bidirectional high-speed information interaction and command control.

[0049] The main function of the aforementioned dual-core MCU is to collaboratively complete bidirectional real-time power calculation, high-speed data caching and interaction, metering error processing, security encryption protection, and overall machine operation scheduling, so as to realize high-precision, high-reliability, and high-security closed-loop measurement and control of vehicle-mounted energy meters.

[0050] In this embodiment, as Figure 2 As shown, the high-speed sampling unit includes a precision voltage divider / shunt network, a fully differential amplifier module, an anti-aliasing filter module, an ADC synchronous sampling module, and an LVDS format conversion module.

[0051] Precision voltage divider / shunt network for scaling analog voltage and current signals;

[0052] The fully differential amplifier module is used to receive the scaled signal and convert the scaled signal into a differential signal with high common-mode rejection capability;

[0053] The anti-aliasing filter module is used to perform low-pass filtering on the differential signal to suppress high-frequency noise and prevent sampling aliasing;

[0054] The ADC synchronous sampling module is used to perform synchronous analog-to-digital conversion on the filtered analog signal under the sampling clock provided by the FPGA.

[0055] The LVDS format conversion module is used to package and convert the digital signal output by the ADC synchronous sampling module into an LVDS protocol data stream for transmission to the main control unit via the LVDS bus.

[0056] It is understandable that the aforementioned high-speed sampling unit uses a "differential front-end + 16-bit Δ-Σ ADC + LVDS data format converter" as its hardware core. It mainly includes a precision voltage divider / current network, a fully differential amplifier module, an anti-aliasing filter module, an ADC synchronous sampling module, and an SPI register module. The voltage / current enters the fully differential amplifier through the precision voltage divider / current shunt network, is filtered by the anti-aliasing filter module, and is sampled by the ADC synchronous sampling module. The parallel signal is then converted into a differential signal and transmitted to the main control unit in real time. At the same time, it receives commands from the main control module for main control gain, bias, offset calibration, etc., to achieve a wide range (±1000V / ±500A), microsecond-level transient capture, and 0.01-level metering accuracy bidirectional high-speed sampling function.

[0057] In this embodiment, as Figure 3 As shown, the range / power flow switching unit includes a parallel GPIO submodule, a gate drive submodule, a MOSFET array, a switching relay, and a drive fault hardware interlock submodule.

[0058] The parallel GPIO submodule is used to receive switching instructions from the FPGA and convert the switching instructions into level-matched control signals.

[0059] The gate drive submodule is used to amplify the control signals of the parallel GPIO submodule to generate gate drive signals that can drive the MOSFET array.

[0060] MOSFET arrays are used to directly connect or disconnect corresponding power circuits under the control of gate drive signals in order to perform range switching or charge / discharge direction switching.

[0061] A switching relay is used to take over and maintain a steady-state connection of the signal after the MOSFET array completes a rapid switching, so as to reduce the conduction loss of the system path.

[0062] The driver fault hardware interlock submodule is used to monitor the switching status in real time; when a fault is detected, it is used to immediately send the fault signal back to the FPGA for reporting.

[0063] The range / current switching unit primarily comprises a parallel general-purpose input / output (GPIO) submodule, a gate driver submodule, a MOSFET array, a switching relay, and a drive fault hardware interlock submodule. The GPIO submodule and gate driver submodule are connected to multiple sets of precision shunt resistors and voltage divider resistor networks. The MOSFET array is mainly used to achieve rapid range switching (<1ms), and the relay is used to maintain the steady-state of the switching signal to reduce losses. Voltage / current range switching and charge / discharge direction reversal are completed within 500ns. The switching process automatically freezes the energy register to ensure seamless and continuous metering. It also features overvoltage, overcurrent, and drive fault hardware interlocks, enabling wide-range, high-safety, zero-loss bidirectional adaptive power flow metering on-board.

[0064] In this embodiment, as Figure 4 As shown, the bidirectional metering unit includes a flow direction identification submodule, a bidirectional switching submodule, a power accumulation submodule, and an error self-calibration submodule.

[0065] The flow direction identification submodule is connected to the FPGA and is used to receive sampled data from the main control unit. Based on the sampled data, it performs current signal zero-crossing detection and instantaneous power threshold judgment, and then sends a flow direction indicator signal to the dual-core MCU.

[0066] The flow direction recognition submodule is mainly used to achieve dual flow direction discrimination of zero crossover and threshold, suppressing jitter misjudgment. The current is differentially amplified and Δ-Σ modulated to generate a 1-bit code stream. The zero-crossing detection state machine monitors symbol transitions and counts for confirmation. The synchronous power state machine completes U×I multiplication and accumulation, and outputs "power valid" when the threshold is exceeded. When two events arrive in the same period, the flow direction latch sets DIR_FLAG and pulses to notify the MCU.

[0067] The bidirectional switching submodule responds to the switching command issued by the dual-core MCU based on the flow direction flag signal and forwards the switching command to the range / flow switching unit. At the same time, it sends a control signal to the FPGA to freeze the power accumulation register of the FPGA during the switching process.

[0068] The bidirectional switching submodule is mainly used to complete the forward and reverse metering of electrical energy and the switching of the measurement range. After receiving the DIR_FLAG pulse, the MCU issues a "commutation + range" vector command through the 32-bit parallel GPIO. The FPGA first shuts down the current metering channel, freezes the power accumulator, and immediately drives the gate array to allow the MOSFET to complete the initial range switching within microseconds; then, the relay is activated to maintain a steady state and reduce conduction losses. The gate drive module sends the "ready / fault" readback signal back to the FPGA via an isolated optocoupler. If any step is not ready, the FPGA immediately blocks the drive and reports "switching failure," and the metering link enters a safety holding mode to ensure that no sparking or power loss occurs during high current reversal.

[0069] The power accumulation submodule is used to receive sampled data from the main control unit after the switching is completed, calculate the instantaneous power in real time using a sliding window multiplier array, and accumulate bidirectional electrical energy through a dedicated accumulator state machine.

[0070] The power accumulation submodule is mainly used to calculate forward and reverse power and energy. After the forward and reverse switching is completed, the FPGA opens a new metering channel, and the voltage and current code streams are sent to the "sliding window multiply-accumulate array". The 64-point product sum is updated once for each sampling clock, and the result is directly sent to the "energy accumulation state machine". When the accumulator is close to overflow, it automatically writes the incremental data blocks to the DDR double data rate synchronous dynamic random access memory to achieve seamless power loss resume.

[0071] The error self-calibration submodule is used to obtain the feature vectors of voltage, current, power and temperature from the dual-core MCU, calculate the data gain and data offset correction amount through the embedded feedforward compensation algorithm, and write the correction amount back to the FPGA.

[0072] The error self-calibration submodule is mainly used to achieve the self-maintaining function of DC energy meter metering accuracy across the entire temperature range and life cycle based on monitoring signals such as voltage, current, and temperature. The error self-calibration submodule embeds a feedforward network that extracts feature vectors from voltage, current, power, temperature, and aging count registers every 10 seconds, infers the gain and offset correction, and writes the correction data back to the FPGA via the communication interface. After writing back, it is compared with a standard pulse. If the comparison fails, a "calibration anomaly" flag is set, and subsequent uploads are blocked, awaiting remote re-inspection. If the comparison succeeds, the accuracy self-maintaining function is completed throughout the entire life cycle.

[0073] In this embodiment, the isolated communication unit includes a digital isolation submodule, a protocol transceiver submodule, a common-mode filtering submodule, and an electrostatic discharge and transient surge protection submodule.

[0074] The digital isolation submodule is used to perform power isolation and signal shaping on the metering results of the bidirectional metering unit to block ground loop interference and preserve signal fidelity.

[0075] The digital isolation submodule relies on an electromagnetic or capacitively coupled isolation barrier with a withstand voltage of ≥2.5kVrms to transmit digital signals via high-frequency magnetic / electric field coupling. This not only blocks low-frequency leakage current and suppresses common-mode interference caused by ground potential difference, but also avoids electrical crosstalk and safety risks between the internal circuit of the DC energy meter and the external bus. Furthermore, it can reconstruct the duty cycle and rising / falling edges of the signal across the isolation barrier through a matching digital signal shaping circuit, ensuring that the signal integrity index meets the timing tolerance specified by the communication protocol and guaranteeing low bit error rate communication.

[0076] This can also be understood as the digital isolation submodule being primarily used to isolate interference signals from the complex electromagnetic environment outside the meter, suppress noise, and convert useful signals into digital signals that the meter can receive through signal shaping circuitry.

[0077] The protocol transceiver submodule is used to convert isolated signals into differential protocol signals that conform to industry standards.

[0078] The protocol transceiver submodule has a built-in differential driver and receiver. The internal ports are compatible with CMOS / TTL logic levels, and the external ports comply with fieldbus differential electrical specifications such as RS-485 / RS-422 / CAN / PROFIBUS.

[0079] The common-mode filtering submodule is used to filter out high-frequency common-mode noise in differential protocol signals.

[0080] The common-mode filtering submodule uses a high-permeability toroidal core to wind a common-mode choke, providing ≥30dB of insertion loss for common-mode noise in the 10MHz–1GHz frequency band, while the insertion loss for differential-mode data signals is ≤0.5dB, thereby improving electromagnetic compatibility margin without reducing communication rate.

[0081] In addition, the common-mode filtering submodule uses a high-permeability toroidal core to wind a common-mode choke. Utilizing its differentiated suppression characteristics for common-mode / differential-mode signals (generating ≥30dB insertion loss for common-mode noise in the 10MHz–1GHz frequency band (significantly attenuating interference), and generating only ≤0.5dB insertion loss for differential-mode data signals (almost no attenuation)), it accurately filters out high-frequency common-mode noise without reducing the communication rate, improves the electromagnetic compatibility of the isolation communication unit, and ensures the stability of the electricity meter's data communication.

[0082] The electrostatic discharge and transient surge protection submodule is used to protect the output interface from overvoltage and transient impacts, enabling highly reliable and low-error-rate data communication.

[0083] The electrostatic discharge and transient surge protection submodule is composed of a low-capacitance TVS diode array. Its trigger voltage is lower than the absolute maximum rated value of the internal I / O of the protocol transceiver submodule, and the response time is ≤1ns. It can withstand transient impacts of IEC 61000-4-2 contact discharge ±8kV, air discharge ±15kV, and IEC 61000-4-5 1.2 / 50μs combined wave ±1kV, ensuring that the isolated communication unit does not suffer hard damage or soft failure in harsh electromagnetic environments.

[0084] In this embodiment, the temperature noise compensation unit includes an onboard NTC thermistor array, a temperature sensor built into the metering chip, a sampling noise shaper, an FRAM calibration coefficient table, and an MCU adaptive compensation algorithm.

[0085] The onboard NTC thermistor array and metering chip have built-in temperature sensors for real-time acquisition of ambient temperature and chip operating temperature.

[0086] A sampling noise shaper is used to suppress quantization noise during the sampling process of the ADC synchronous sampling module;

[0087] FRAM calibration coefficient table is used to store calibration parameters across the entire temperature range and full scale.

[0088] The MCU adaptive compensation algorithm is used to dynamically retrieve the FRAM calibration coefficient table based on the collected ambient temperature and chip operating temperature, and to perform real-time compensation for the data gain and data offset of the high-speed sampling unit and the bidirectional metering unit.

[0089] It is understandable that the temperature / noise compensation unit dynamically corrects temperature drift and ADC noise, achieving a power metering error of ≤±0.2% across the entire temperature range of -40℃ to +85℃, and suppressing high-frequency common-mode / differential-mode interference in real time, ensuring that the bidirectional DC power meter maintains 0.1-level accuracy in a wide-temperature and high-noise environment.

[0090] In this embodiment, the power management unit includes a 2V / 24V vehicle battery input stage, a reverse connection protection MOSFET, a wide voltage buck-boost controller, a π-type EMI filter, a 4kV isolated flyback converter, an LDO voltage regulator chain, and a battery backup switching circuit.

[0091] 2V / 24V vehicle battery input stage, for connecting to the vehicle power supply;

[0092] Reverse polarity protection MOSFET, used to prevent damage to the circuit from reversed power supply polarity;

[0093] Wide-range step-up / step-down controller for achieving stable conversion of a wide voltage input range of 9V to 36V;

[0094] π-type EMI filter circuit is used to suppress electromagnetic interference on power lines;

[0095] A 4kV isolated flyback converter is used to achieve electrical isolation between input and output and provide multiple isolated power supplies.

[0096] LDO voltage regulator chain is used to provide precise 5V / 3.3V / 1.8V voltage to each unit module;

[0097] The battery backup switching circuit is used to achieve seamless switching during power outages, supporting 40ms instantaneous power outages without restarting and maintaining data integrity.

[0098] Understandably, the power management system can achieve a wide input range of 9V to 36V with a 40ms interruption without restart, multi-channel isolated 5V / 3.3V / 1.8V precise power supply, reverse connection / overvoltage / surge protection, and power failure data retention, ensuring continuous high-precision metering of the vehicle-mounted bidirectional DC energy meter under harsh operating conditions such as start-stop, cold start, and load-dump.

[0099] In summary, this application's embodiments employ a heterogeneous architecture of "FPGA + dual-core MCU" to achieve real-time comparison of current polarity and instantaneous automatic reversal of metering direction at the hardware level, completely eliminating the metering delay and energy underestimation problems caused by traditional relay switching. By utilizing a sliding window power algorithm, it simultaneously completes delay-free calculation of active power and dynamic instantaneous power, effectively suppressing PWM ripple while accurately capturing transient energy consumption details. Through a built-in feedforward control network and standard pulse self-checking mechanism, it performs real-time monitoring and closed-loop correction of metering errors across all temperatures and ranges, achieving self-maintained accuracy throughout the entire battery lifecycle. In conclusion, this application ensures that electric vehicles can achieve millisecond-level seamless switching and 0.5-second-level accurate metering under complex operating conditions such as rapid acceleration and deceleration, energy recovery, and V2G, providing continuous, reliable, and traceable data support for vehicle energy consumption management, bidirectional charging and discharging settlement, and battery lifecycle monitoring.

[0100] The above combination Figures 1-4 This application provides a detailed description of the vehicle-mounted bidirectional fast-metering DC energy meter provided in its embodiments. The following is in conjunction with... Figure 5 This describes a metering method for implementing the vehicle-mounted bidirectional fast-metering DC energy meter provided in the embodiments of this application.

[0101] The method includes the following steps:

[0102] S1: Synchronous sampling step: The clock management submodule of the main control unit generates a synchronous clock, drives the high-speed sampling unit to synchronously sample the voltage and current analog signals, and transmits the sampled data to the main control unit in real time through the LVDS differential serial bus. The main control unit includes an FPGA and a dual-core MCU.

[0103] S2: Flow direction identification step: The FPGA sends the sampled data to the bidirectional metering unit. The bidirectional metering unit performs zero-crossing detection and instantaneous power threshold judgment on the sampled data, and then sends a flow direction indicator signal to the dual-core MCU.

[0104] S3: Bidirectional metering switching steps: Based on the flow direction indicator signal, the dual-core MCU sends a switching command to the range / flow switching unit via the parallel control bus. The range / flow switching unit performs a fast switch, and at the same time, the FPGA freezes the power register.

[0105] S4: Energy accumulation step: After the switching is completed, the bidirectional metering unit uses a sliding window multiplier array to calculate the instantaneous power in real time, and accumulates bidirectional energy through a dedicated accumulator state machine.

[0106] S5: Error correction steps: The temperature noise compensation unit monitors the ambient temperature and chip operating temperature in real time, and compensates for the data gain and data offset of the high-speed sampling unit and the bidirectional metering unit in real time.

[0107] In this embodiment, in step S2, zero-crossing detection is determined as a zero-crossing event when the current differential signal in the sampled data changes from positive to negative or from negative to positive and continues to maintain a predetermined number of sampling points; threshold judgment is determined as a power valid event when the absolute value of the instantaneous power is greater than 15W and lasts for 50μs; when the zero-crossing event and the power valid event occur within the same clock cycle, a flow direction flag signal is sent to the dual-core MCU.

[0108] Furthermore, the specific implementation of the above method is basically similar to that of the electricity meter implementation, so the description is relatively simple. For relevant details, please refer to the description of the electricity meter implementation.

[0109] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than those shown in the embodiments and still achieve the desired result. Furthermore, the specific order or sequential order shown in the drawings is not necessarily required to achieve the desired result; in some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0110] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.

Claims

1. A vehicle-mounted bidirectional fast-metering DC energy meter, characterized in that, It includes a main control unit, a high-speed sampling unit, a range / power flow switching unit, a bidirectional metering unit, an isolated communication unit, a power management unit, and a temperature noise compensation unit; The main control unit adopts a heterogeneous architecture of FPGA and dual-core MCU as the control and calculation core of the energy meter; The high-speed sampling unit is connected to the FPGA of the main control unit via an LVDS differential serial bus, and is used to digitally sample voltage and current analog signals and transmit the sampled data to the main control unit. The range / power flow switching unit is connected to the FPGA of the main control unit via a parallel control bus, and is used to receive the switching command from the main control unit and perform range switching and charging / discharging direction switching. The bidirectional metering unit is connected to the dual-core MCU of the main control unit via an SPI interface, and is used to obtain the sampling data from the main control unit and perform bidirectional cumulative metering of electrical energy based on the sampling data; The isolation communication unit is connected to the dual-core MCU of the main control unit via an SPI interface. It is used to electrically isolate and convert the measurement results of the bidirectional metering unit before outputting them to the outside. The temperature noise compensation unit is connected to the dual-core MCU of the main control unit via the SPI interface. It is used to monitor the ambient temperature and chip temperature in real time, and to dynamically compensate for the data gain and data offset of the high-speed sampling unit and the bidirectional metering unit. The power management unit is used to obtain a wide voltage input from the vehicle battery and provide a stable operating voltage with multiple isolation channels for all units in the energy meter.

2. The vehicle-mounted bidirectional fast-metering DC energy meter according to claim 1, characterized in that, The main control unit includes: The FPGA integrates a clock management submodule and a serial-to-parallel conversion submodule. The clock management submodule is used to generate a sampling clock, SPI clock, and data recovery clock that are synchronized from the same source, providing a synchronous clock reference for each unit; The serial-to-parallel conversion submodule is used to perform high-speed serial data interaction with the high-speed sampling unit and the range / power flow switching unit through the LVDS bus, so as to realize the reception of sampling data and the transmission of control commands; Dual-core MCU, with an integrated data processing submodule and bidirectional metering drive submodule; The data processing submodule is used to cache and process the sampled data sent by the FPGA; The bidirectional metering drive submodule is used to generate flow direction judgment and range switching instructions based on the processed data.

3. The vehicle-mounted bidirectional fast-metering DC energy meter according to claim 2, characterized in that, The high-speed sampling unit includes: Precision voltage divider / shunt network for scaling analog voltage and current signals; A fully differential amplifier module is used to receive the scaled signal and convert the scaled signal into a differential signal with high common-mode rejection capability; An anti-aliasing filter module is used to perform low-pass filtering on the differential signal to suppress high-frequency noise and prevent sampling aliasing; The ADC synchronous sampling module is used to perform synchronous analog-to-digital conversion on the filtered analog signal under the sampling clock provided by the FPGA. The LVDS format conversion module is used to package and convert the digital signal output by the ADC synchronous sampling module into an LVDS protocol data stream for transmission to the main control unit via the LVDS bus.

4. The vehicle-mounted bidirectional fast-metering DC energy meter according to claim 2, characterized in that, The range / power flow switching unit includes: A parallel GPIO submodule is used to receive switching instructions from the FPGA and convert the switching instructions into level-matched control signals; The gate drive submodule is used to amplify the control signals of the parallel GPIO submodule to generate gate drive signals that can drive the MOSFET array. The MOSFET array is used to directly connect or disconnect the corresponding power circuit under the control of the gate drive signal to perform range switching or charge / discharge direction switching. A switching relay is used to take over and maintain a steady-state connection of the signal after the MOSFET array completes rapid switching, so as to reduce the conduction loss of the system path. The driver fault hardware interlock submodule is used to monitor the switching status in real time; when a fault is detected, it is used to immediately send the fault signal back to the FPGA for reporting.

5. The vehicle-mounted bidirectional fast-metering DC energy meter according to claim 2, characterized in that, The bidirectional metering unit includes: The flow direction identification submodule is connected to the FPGA and is used to receive sampled data from the main control unit. Based on the sampled data, it performs current signal zero-crossing detection and instantaneous power threshold judgment, and then sends a flow direction flag signal to the dual-core MCU. The bidirectional switching submodule responds to the switching command issued by the dual-core MCU based on the flow direction flag signal, and forwards the switching command to the range / flow switching unit. At the same time, it sends a control signal to the FPGA to freeze the power accumulation register of the FPGA during the switching process. The power accumulation submodule is used to receive sampled data from the main control unit after the switching is completed, calculate the instantaneous power in real time using a sliding window multiplier array, and accumulate bidirectional electrical energy through a dedicated accumulation state machine. The error self-calibration submodule is used to obtain the feature vectors of voltage, current, power and temperature from the dual-core MCU, calculate the data gain and data offset correction amount through the embedded feedforward compensation algorithm, and write the correction amount back to the FPGA.

6. The vehicle-mounted bidirectional fast-metering DC energy meter according to claim 1, characterized in that, The isolated communication unit includes: The digital isolation submodule is used to perform power isolation and signal shaping on the measurement results of the bidirectional metering unit to block ground loop interference and preserve signal fidelity. The protocol transceiver submodule is used to convert isolated signals into differential protocol signals that conform to industry standards; The common-mode filtering submodule is used to filter out high-frequency common-mode noise in the differential protocol signal; The electrostatic discharge and transient surge protection submodule is used to protect the output interface from overvoltage and transient impacts, enabling highly reliable and low-error-rate data communication.

7. The vehicle-mounted bidirectional fast-metering DC energy meter according to claim 3, characterized in that, The temperature noise compensation unit includes: The onboard NTC thermistor array and metering chip have built-in temperature sensors for real-time acquisition of ambient temperature and chip operating temperature. A sampling noise shaper is used to suppress quantization noise during the sampling process of the ADC synchronous sampling module; FRAM calibration coefficient table is used to store calibration parameters across the entire temperature range and full scale. The MCU adaptive compensation algorithm is used to dynamically retrieve the FRAM calibration coefficient table based on the collected ambient temperature and chip operating temperature, and to perform real-time compensation for the data gain and data offset of the high-speed sampling unit and the bidirectional metering unit.

8. The vehicle-mounted bidirectional fast-metering DC energy meter according to claim 1, characterized in that, The power management unit includes: 2V / 24V vehicle battery input stage, for connecting to the vehicle power supply; Reverse polarity protection MOSFET, used to prevent damage to the circuit from reversed power supply polarity; Wide-range step-up / step-down controller for achieving stable conversion of a wide voltage input range of 9V to 36V; π-type EMI filter circuit is used to suppress electromagnetic interference on power lines; A 4kV isolated flyback converter is used to achieve electrical isolation between input and output and provide multiple isolated power supplies. LDO voltage regulator chain is used to provide precise 5V / 3.3V / 1.8V voltage to each unit module; The battery backup switching circuit is used to achieve seamless switching during power outages, supporting 40ms instantaneous power outages without restarting and maintaining data integrity.

9. A metering method based on the vehicle-mounted bidirectional fast-metering DC energy meter according to any one of claims 1-8, characterized in that, Includes the following steps: S1: Synchronous sampling step: The clock management submodule of the main control unit generates a synchronous clock, drives the high-speed sampling unit to synchronously sample the voltage and current analog signals, and transmits the sampled data to the main control unit in real time through the LVDS differential serial bus. The main control unit includes an FPGA and a dual-core MCU. S2: Flow direction identification and judgment steps: The FPGA sends the sampled data to the bidirectional metering unit, the bidirectional metering unit performs zero-crossing detection and instantaneous power threshold judgment on the sampled data, and then sends a flow direction flag signal to the dual-core MCU; S3: Switching control and execution steps: The dual-core MCU sends a switching command to the range / power flow switching unit through the parallel control bus according to the flow direction flag signal. The range / power flow switching unit performs a fast switch, and the FPGA freezes the power register at the same time. S4: Power Calculation and Energy Accumulation Steps: After the switching is completed, the bidirectional metering unit uses a sliding window multiplier array to calculate the instantaneous power in real time, and accumulates the bidirectional electrical energy through a dedicated accumulator state machine. S5: Real-time error compensation step: The temperature noise compensation unit monitors the ambient temperature and chip operating temperature in real time, and performs real-time compensation for the data gain and data offset of the high-speed sampling unit and the bidirectional metering unit.

10. The metering method of the vehicle-mounted bidirectional fast-metering DC energy meter according to claim 9, characterized in that, In step S2, the zero-crossing detection is determined when the current differential signal in the sampled data changes from positive to negative or from negative to positive and is continuously maintained at a predetermined number of sampling points; the threshold judgment is determined when the absolute value of the instantaneous power is greater than 15W and lasts for 50μs, it is determined as a power valid event; when the zero-crossing event and the power valid event occur within the same clock cycle, a flow direction flag signal is sent to the dual-core MCU.