A settlement measurement device and processing method
By using independent MCU in the substation settlement metering device to process power metering and power quality functions, and implementing mutual backup of hardware and software through phase-locked loop circuits, the problem of complex and error-prone calculations of traditional devices is solved, and the reliability of the system is improved and accuracy, and adapt to the communication protocol requirements of the new generation of substations.
Patent Information
- Application Number
- CN202111055750.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-09
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2041-09-09
AI Technical Summary
Traditional substation settlement metering devices are difficult to meet the special needs of the new generation of substations for high-precision power metering, high-power quality and communication protocols. The processing of all functions of a single MCU leads to complex calculations and insufficient system reliability.
Design a settlement metering device, using the main control MCU, the power metering module and the power quality module are connected to each other. The power metering and power quality functions are completed by independent MCUs, and the hardware and software are backed up through the phase-locking loop circuit to ensure that The accuracy of signal sampling and the stable operation of the system.
It realizes independent processing of power metering and power quality functions, improves the reliability and accuracy of the system, ensures the safe and stable operation of the device in the event of a fault, and is compatible with the DL/T645, DL/T698 and IEC61850 protocols, and is suitable for different manufacturers. Data communication requirements.
Smart Images

Figure CN113759171B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power management, and more particularly to a settlement metering device and a processing method. Background Art
[0002] At present, traditional substation settlement and metering devices mainly realize the basic function of electricity metering. Some devices have both power quality analysis and electricity metering functions. However, these devices use the basic architecture of MCU (Micro Control Unit) + metering chip or MCU + FPGA (Field Programmable Gate Array) / DSP (Digital Signal Process) + analog-to-digital conversion chip, and then configure some peripheral circuits, screens, storage devices and other peripherals to realize electricity metering or power quality functions. However, with the special requirements of the new generation of substations for high-precision measurement, high-performance power quality and communication protocols, traditional settlement and metering devices can no longer meet their technical requirements. Summary of the invention
[0003] In view of this, the present invention provides the following technical solutions:
[0004] A settlement metering device comprises a main control MCU, an electric quantity metering module and a power quality module, wherein the main control MCU, the electric quantity metering module and the power quality module are connected to each other in pairs;
[0005] The power metering module includes a power metering MCU, an analog-to-digital conversion module and a collection module, and the power quality module includes a power quality MCU, an analog-to-digital conversion module and a collection module. A phase-locked loop circuit is also provided between the power metering MCU and the power quality MCU;
[0006] The main control MCU is used to control the data communication of the entire settlement and metering device, the power metering MCU is used to implement power metering, and the power quality MCU is used to implement power quality analysis.
[0007] Optionally, data communication is performed between the main control MCU, the power measurement MCU and the power quality MCU via a serial interface or a serial peripheral interface.
[0008] Optionally, the hardware structures of the electricity metering MCU and the power quality MCU are completely identical to achieve hot backup between the electricity metering MCU and the power quality MCU.
[0009] Optionally, the main control MCU has a DL / T645 protocol port, a DL / T698 protocol port and an IEC61850 protocol port to respectively implement DL / T645 communication, DL / T698 communication and IEC61850 communication.
[0010] Optionally, the settlement and metering device also includes at least one of a screen, buttons, input and output, an encryption chip, an external storage and a time synchronization device.
[0011] Optionally, the main control MCU is specifically used to perform display control and data input and output control of the settlement and metering device.
[0012] A settlement measurement processing method, applied to any of the above settlement measurement devices, comprising:
[0013] The power metering module processes and obtains metering data;
[0014] The power quality module processes and obtains power quality data;
[0015] The main control MCU outputs and displays the metering data and the power quality data.
[0016] Optionally, the power quality module processes and obtains power quality data, including:
[0017] Based on the phase-locked loop circuit, the previous cycle is calculated through zero-crossing detection, and the next cycle is predicted in combination with the filter circuit;
[0018] Based on the predicted next cycle period, variable frequency fixed sampling of the next cycle is performed.
[0019] Optionally, the electricity metering module processes and obtains metering data, including:
[0020] Adopt multi-channel high-precision analog-to-digital conversion chip to analyze and calculate the collected data to obtain the initial measurement data;
[0021] The initial measurement data is calibrated by multi-dimensional step calibration parameters to obtain final measurement data.
[0022] Optionally, also include:
[0023] When the power metering MCU fails, the power quality MCU will be used to process the relevant data of power metering;
[0024] When the power quality MCU fails, the power quality analysis and processing work is performed through the power metering MCU.
[0025] It can be known from the above technical scheme that compared with the prior art, the embodiment of the present invention discloses a settlement metering device and a processing method, the settlement metering device includes a main control MCU, an electricity metering module and a power quality module, the main control MCU, the electricity metering module and the power quality module are connected to each other in pairs; the electricity metering module includes an electricity metering MCU and an analog-to-digital conversion module, the power quality module includes an electric energy quality MCU and an analog-to-digital conversion module, and a phase-locked loop circuit is also provided between the electricity metering MCU and the power quality MCU; wherein the main control MCU is used to control the data communication of the entire settlement metering device, the electricity metering MCU is used to realize electricity metering, and the power quality MCU is used to realize power quality analysis. In the above implementation scheme, the electricity metering and power quality functions are completed by independent MCUs, and each MCU works independently and does not interfere with each other, which can effectively ensure the reliable and stable operation of the device; and the hardware and software phase-locked loops are implemented inside the electricity metering MCU and the power quality MCU, which can realize accurate judgment of signal sampling and improve the accuracy of the power quality analysis results. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0027] Figure 1 A schematic diagram of the structure of a settlement and metering device disclosed in an embodiment of the present invention;
[0028] Figure 2 It is a schematic diagram of the overall structure of the settlement and measurement processing device disclosed in an embodiment of the present invention;
[0029] Figure 3 A schematic diagram of a current effective value measurement and calculation process disclosed in an embodiment of the present invention;
[0030] Figure 4 A schematic diagram of a voltage effective value measurement and calculation process disclosed in an embodiment of the present invention;
[0031] Figure 5 This is a schematic diagram of the measurement principle of active power disclosed in an embodiment of the present invention;
[0032] Figure 6 It is a principle implementation diagram of the frequency conversion sampling method based on software and hardware combined with a phase-locked loop disclosed in an embodiment of the present invention;
[0033] Figure 7The present invention discloses a flow chart of a settlement and measurement method. DETAILED DESCRIPTION
[0034] For the purpose of reference and clarity, the descriptions, abbreviations or acronyms of the technical terms used below are summarized as follows:
[0035] Power quality: refers to the quality of electrical energy in the power system. Ideally, electrical energy should be a perfectly symmetrical sine wave. Some factors can cause the waveform to deviate from the symmetrical sine wave, thus causing power quality problems.
[0036] DL / T698: A communication protocol for the power industry.
[0037] IEC61850: IEC61850 is the only global standard in the field of power system automation. It has achieved the standardization of engineering operations of smart substations through the implementation of the standard.
[0038] SPI: Serial Peripheral Interface, serial peripheral interface.
[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] In order to better understand the present application, some contents related to the present application are first introduced.
[0041] The main functions of the substation settlement metering device are required to include power metering function, power quality monitoring function, data communication and safety protection function, clock, measurement function, setting function, and complete data sampling and calculation of voltage, current, zero-sequence current, frequency, active power, reactive power, apparent power, power factor, fundamental wave parameters, harmonic parameters, three-phase unbalance parameters, transient data, steady-state data, etc. The current design scheme is consistent with the conventional three-phase meter scheme, and the MCU+ analog-to-digital conversion chip is mostly used to realize the power metering and power quality functions. The power metering accuracy is divided into 0.2S, 0.2, 0.5S, 0.5 levels. The smaller the value, the higher the accuracy requirement. 0.2S means that the full-scale accuracy of power metering is 0.2%.
[0042] 1. Electricity metering
[0043] It has the functions of forward and reverse active electric energy, and four-quadrant reactive electric energy measurement, and accumulates the total active and reactive electric energy. Time-sharing metering function: active and reactive electric energy should be accumulated and stored separately for each period of time such as peak, flat, valley, etc. and the total electric energy. Measuring phase-by-phase forward and reverse active electric energy function. The combined and split-phase electric energy supports storage in 4 decimal places or electric energy pulse numbers, allowing the decimal part of the electric energy to increase by the electric energy represented by a single pulse each time. The current electric energy needs to support 2-digit and 4-digit decimal transmission. Real-time measurement and display of voltage, current, power, total power and total power factor.
[0044] 2. Demand measurement
[0045] a) Within the agreed time interval (usually one month), measure the maximum one-way or two-way demand, the maximum time-slot demand and the date and time of occurrence, and store the data with time stamp;
[0046] b) The maximum demand measurement adopts the sliding method, and the demand cycle can be selected from 5min, 10min, 15min, 30min, and 60min; the sliding time of the sliding demand cycle can be selected from 1min, 2min, 3min, and 5min; the demand cycle should be an integer multiple of 5 of the sliding time. Factory default value: demand cycle 15min, sliding time 1min;
[0047] c) The total maximum demand measurement should be carried out continuously; the maximum demand measurement of each rate period should be carried out within the complete measurement cycle of the corresponding rate period;
[0048] d) When the voltage line is powered on, cleared, the clock is adjusted, the time period is converted, the demand cycle is changed, the power flow direction is changed, etc., the electric energy meter should measure the demand according to the demand cycle starting from the current time; after the first demand cycle is completed, the maximum demand recording shall begin according to the slip interval.
[0049] e) Can store the maximum demand data for 12 settlement days.
[0050] 3. Rate and time period functions
[0051] a) It can support up to 12 rates, namely T1-T12, of which T1-T4 corresponds to peak, peak, flat and valley rates;
[0052] b) There should be two sets of rates and time periods: the current set and the backup set. The current set is read-only, while the backup set supports reading and writing, and the backup set of rates and time periods can be used at a set time point;
[0053] c) Each rate period can be set at least 2 time zones throughout the year; a maximum of 14 time periods can be set within 24 hours; the minimum interval of the time period is 15 minutes, and should be greater than or equal to the demand cycle set in the settlement metering device; the time period can be set across zero o'clock. The time period settings are arranged from small to large in time;
[0054] d) It should support the setting of special rate periods for public holidays and weekends.
[0055] 4. Freeze function
[0056] Instantaneous freeze, minute freeze, hour freeze, day freeze, month freeze, agreed freeze, settlement day freeze, step settlement freeze. Instantaneous freeze: In abnormal circumstances, freeze the current calendar, time, all electric energy and important measurement data; the instantaneous freeze quantity should save the last 3 data.
[0057] 5. Event recording function, power outage meter reading, alarm, device software, power supply abnormality events.
[0058] The total number of events, the time of occurrence, the time of end, and the corresponding electrical energy data information.
[0059] During a power outage, the energy meter only records the earliest event of opening the meter cover.
[0060] During a power outage, the energy meter only records the earliest start button cover event.
[0061] 6. Signal output
[0062] Electric energy pulse output:
[0063] a) It should have optical pulse output and electrical pulse output that are proportional to the measured electrical energy (active / reactive).
[0064] b) The optical pulse output uses ultra-bright, long-life LED devices.
[0065] c) The electrical pulse output should be electrically isolated and able to be collected from the front.
[0066] Multi-function signal output:
[0067] a) The multi-function signal output terminal can output time signal, demand cycle signal or time switching signal; the three signals are set and converted through software; when the energy meter is powered on for the first time, or after power off and then on, the multi-function signal output is initialized to time signal output.
[0068] b) The time signal is a second signal; the demand cycle signal and time period switching signal are pulse signals.
[0069] c) When the time period changes, a time period switching signal is issued. Even if the rate remains unchanged, the time period switching signal is still output.
[0070] Control output:
[0071] The electric energy meter can output electric pulse or level switch signal (output mode can be set) to control external alarm device or load switch. The rated parameters of alarm output contact are AC voltage 220V, current 5A; DC voltage 100V, current 0.1A. RS485 interface communication should follow DL / T698.45 protocol. Infrared communication should follow DL / T698.45 protocol.
[0072] 7. Power outage meter reading and display
[0073] a) In the power outage state, the energy meter can be awakened by pressing a button or non-contact (infrared) to read the data. The non-contact awakening method uses the continuous sending of the awakening special command "681104" for (5-10) seconds. Non-contact awakening is prohibited after 7 days of power failure. Among them, single-phase energy meters do not require non-contact awakening in the power outage state.
[0074] b) After the three-phase electricity meter is awakened after power failure, the data in the meter should be read through infrared communication.
[0075] Please refer to the attached Figure 1 , which is a schematic diagram of the structure of a settlement and metering device disclosed in the present invention, see Figure 1 As shown, the settlement metering device may include: a main control MCU (10), an electricity metering module (20) and a power quality module (30), wherein the main control MCU, the electricity metering module and the power quality module are connected to each other in pairs.
[0076] The power metering module (20) comprises a power metering MCU (21), an analog-to-digital conversion module 22 and a collection module 23; the power quality module (30) comprises a power quality MCU (31), an analog-to-digital conversion module (32) and a collection module 33; a phase-locked loop circuit (40) is further provided between the power metering MCU and the power quality MCU.
[0077] The main control MCU is used to control the data communication of the entire settlement and metering device, the power metering MCU is used to implement power metering, and the power quality MCU is used to implement power quality analysis.
[0078] The current designs of conventional three-phase electricity meters and settlement metering devices are all implemented in the form of a single MCU+AD conversion module, or on this basis, in conjunction with DSP and FPGA solutions. The reliability of the system depends entirely on the MCU. At the same time, the MCU or the DSP and FPGA complete the functions of electricity metering, power quality and external communication. In this solution of designing a single MCU to solve all the functions that need to be completed, because the electricity metering and power quality functions are jointly completed by one MCU, the MCU resources are required to be high, and the calculations are complex and prone to errors. Due to the new requirements of the new generation of substations for metering, power quality and communication, this application focuses on the system distributed redundant design to solve the device problems caused by single MCU failures due to factors such as computing power and working environment.
[0079] In the embodiment of the present application, the electricity metering function and the power quality function are implemented by independent MCU processing, and the display, input and output and other functions of the electricity metering device are also processed by a separate master MCU. In this way, the settlement metering device includes three MCUs, and the three MCUs with clear division of labor each handle their own work without interfering with each other; at the same time, the three MCUs can communicate with each other to jointly complete the various functions of the settlement metering device.
[0080] At the same time, the three MCUs can communicate with each other, so as to ensure that on the basis of having traditional electricity metering and power quality functions, the functions of electricity metering calculation, power quality calculation, display external processing, etc. are distributed to independent MCUs. When any module fails, the system can be guaranteed to operate safely and stably, and important data can be backed up mutually, so as to ensure the safety and reliability of the entire settlement and metering device. The important data can include, but are not limited to: active power, reactive power, etc., event information such as power outages and communication failures, and power quality information such as voltage sags and three-phase imbalance.
[0081] According to the new terminal power quality analysis requirements, for example, the number of sampling points per cycle of power quality harmonic analysis is 409.6, and at least 4096 for 10 cycles. Equal-angle sampling and synchronous sampling are required. The power quality analysis function in the current metering chip cannot achieve this accuracy. Therefore, it is necessary to design a power quality sampling and analysis system with higher sampling accuracy and higher sampling accuracy.
[0082] Therefore, the power quality analysis needs to reach more than 50 harmonics, and the sampling points per cycle (corresponding to a complete sine wave) must reach 409.6, and the sampling time will also change with the change of frequency. In order to ensure the number of sampling points per cycle, the present invention adopts a combination of hardware and software phase-locked loops. After the voltage is simulated by the hardware front-end analysis, the power quality MCU obtains the zero-crossing level signal through the second-order active low-pass filter circuit and the voltage comparison circuit; the software monitors the zero-crossing signal in real time, and predicts the period of the next cycle by analyzing the period of the previous multiple cycles, and samples according to the predicted period, so as to realize the function that the sampling period changes with the frequency, and the number of sampling points remains unchanged, and ensure high-quality processing of power quality. At the same time, since the power quality is processed by a single MCU, compared with the situation where traditional power metering and power quality are analyzed on one MCU, the system operation speed and reliability performance will be further improved.
[0083] The key to power quality analysis is the fixed number of samples per cycle. At the same time, due to the change of voltage frequency, fixed-frequency sampling cannot be achieved. In this application, a variable-frequency sampling method based on software and hardware combined with a phase-locked loop is adopted. The previous cycle period is calculated through zero-crossing detection, and the next cycle period is predicted in combination with Kalman filtering, so as to achieve variable-frequency fixed-point sampling of the next cycle based on this.
[0084] In the settlement metering device described in this embodiment, the electricity metering and power quality functions are completed by independent MCUs. The MCUs work independently of each other without interfering with each other, which can effectively ensure the reliable and stable operation of the device; and the hardware and software phase-locked loops are implemented inside the electricity metering MCU and the power quality MCU, which can achieve accurate judgment of signal sampling and improve the accuracy of the power quality analysis results.
[0085] In the above embodiment, data communication between the main control MCU, the power measurement MCU and the power quality MCU may be, but is not limited to, performed via a serial interface or a serial peripheral interface.
[0086] The hardware structures of the electricity metering MCU and the power quality MCU are completely the same, so as to realize hot backup between the electricity metering MCU and the power quality MCU.
[0087] The same hardware structure design means that the electricity metering MCU and the power quality MCU both obtain current, voltage, and zero-crossing information through the analog-to-digital conversion module and the phase-locked loop circuit (zero-crossing detection phase-locked circuit), and communicate with the main control MCU at the same time. If the hardware structure design is different, complete hot backup cannot be achieved. For example, only the data processing part may be implemented, and the transfer of the entire functional calculation cannot be achieved.
[0088] In the above embodiment, the main control MCU has a DL / T645 protocol port, a DL / T698 protocol port and an IEC61850 protocol port to respectively implement DL / T645 communication, DL / T698 communication and IEC61850 communication.
[0089] Currently, conventional substation settlement metering devices mostly use the DL / T645 protocol. In order to adapt to the new environment and needs, the present invention is compatible with DL / T645, DL / T698 and IEC61850 in communication protocol, adapts to data communication between settlement metering devices of different manufacturers, and solves the demand problem of communication protocol.
[0090] In the above embodiment, the settlement metering device may also include but is not limited to at least one of a screen, a button, an input and output, an encryption chip, an external storage and a time synchronization device. The main control MCU may be used to perform display control and data input and output control of the settlement metering device.
[0091] In order to better understand the implementation of this application, the specific implementation of the settlement and measurement processing device will be described in detail below. Figure 2 This is a schematic diagram of the overall structure of the settlement measurement processing device disclosed in the embodiment of the present invention, which can be combined with Figure 2 Understand what is described below.
[0092] The settlement metering processing device proposed in this application has both power quality analysis and power metering functions. The device has three core MCUs, which respectively realize power metering, power quality and communication control functions. The three MCUs communicate through serial ports or SPI, and are distributedly designed to achieve data processing without interference. The power metering MCU and the power quality MCU are exactly the same in hardware design, thus providing a basis for achieving complete hot backup. Once a problem occurs in the power metering MCU or the power quality MCU, the processing can be switched between the two immediately, and the fault can be notified. This distributed design will greatly improve the data processing capability of the metering device, and the redundant design will greatly improve the reliability of the device. Among them, the main control MCU controls the screen, buttons, input and output, encryption chip, external storage, time synchronization, external DL / T698 and IEC61850 communication and other functions. The power metering MCU and the power quality MCU directly collect multi-channel analog-to-digital conversion signals and zero-crossing detection signals, and implement hardware and software phase-locked loops inside the MCU to achieve accurate judgment of signal sampling.
[0093] The multi-channel synchronous analog-to-digital conversion module in the electric energy metering module is composed of multiple ADCs (analog-to-digital converters) and FPGA. The ADC is mainly sigma-delta ADC, and its performance is directly related to the accuracy of electric energy metering. By moving the quantization noise to a higher frequency, the noise within the bandwidth is reduced, and the noise at the high frequency is filtered out by a filter, trading speed for accuracy. The voltage and current channel ADC waveforms are eliminated by a low-pass filter to eliminate high-order harmonic components and noise, and are further extracted and stored at a certain rate. The high-pass filter is used to eliminate DC offset to achieve accurate effective value and electric energy measurement. By applying gain and phase compensation, instantaneous current and voltage waveforms with a certain update rate are generated. Phase compensation uses a digital filter to achieve extremely fine phase adjustment. This high resolution can improve the total active and reactive energy performance under low power factor conditions. Instantaneous current and voltage waveforms can be used to calculate parameters such as effective value, active power, reactive power, apparent power, and electric energy.
[0094] a. Voltage and current effective value
[0095] As mentioned above, the generated instantaneous current and voltage waveforms can be used for metering parameter calculation. Figure 3 The diagram is a schematic diagram of the current effective value measurement calculation process. The RMS (Root Mean Square) value of the signal can be obtained by performing a series of operations such as squaring, square rooting, and digital filtering on the current sampling value. When the voltage channel inputs a signal with an effective value of 500mV to 1mV, the error of the current effective value is less than 0.2%. Similarly, the voltage effective value measurement also has the same process, such as Figure 4 For the metering chip, the measured value obtained from the register cannot be directly used for display and needs to be divided by a fixed coefficient for conversion.
[0096] b. Active and reactive power calculation
[0097] The active power of each phase is obtained by multiplying, adding, digital filtering and other digital signal processing on the current and voltage signals after removing the DC component. The measurement principle diagram of active power is shown in the figure below. Figure 5 shown.
[0098] The total active power is usually used for billing purposes, which includes the power of the fundamental and harmonics. The reactive power measurement algorithm is similar to that of the active power, except that the voltage signal is phase-shifted by 90 degrees, and the phase shift method uses a Hilbert filter. The measurement bandwidth is mainly limited by the bandwidth of the digital phase-shift filter, and the measurement bandwidth of reactive power can also be up to the 41st harmonic. The total reactive power includes the reactive power of the fundamental and harmonics.
[0099] c. Electric energy calculation
[0100] The electric energy calculation is realized by real-time accumulator, which is obtained by real-time accumulation of active power or reactive power. Since reactive energy changes frequently between positive and negative values due to the influence of inductive and capacitive loads, the absolute value of reactive energy also needs to be charged.
[0101] d. Apparent power calculation
[0102] This device provides two types of apparent power and energy measurement methods, namely, RMS apparent method and PQS apparent method. Apparent power can be calculated by taking the square root of active and reactive power, or by multiplying the voltage RMS value and current RMS value to measure its value.
[0103] The key to power quality analysis is the sampling number of 409.6 points per cycle. At the same time, due to the change of voltage frequency, fixed frequency sampling cannot be achieved. The present invention adopts a variable frequency sampling method based on software and hardware combined with a phase-locked loop. Figure 6 shown.
[0104] like Figure 6 As shown in the figure, the voltage is sampled through resistor voltage division to improve the sampling accuracy. The current enters the high-precision multi-channel AD conversion chip through the high-precision current transformer circuit. At the same time, the voltage signal is processed by the second-order active low-pass filter circuit to process the noise. After passing through the voltage comparison circuit, the voltage conversion level signal of the zero-crossing point is obtained and enters the MCU. The power quality MCU not only communicates with the high-precision multi-channel AD conversion chip, but also receives the zero-crossing signal from the voltage comparison circuit. The operation process is shown in the figure above. The zero-crossing signal enters the interrupt function, and the next sampling cycle fre is predicted in combination with the Kalman filter. After receiving the zero-crossing flag in the main function, the predicted sampling cycle fre is used to calculate the sampling point interval of the current cycle. When sampling, a synchronous conversion signal is sent. After the AD conversion chip receives the conversion signal, it starts the synchronous sampling data conversion. After completion, it gives the MCU a completion signal, and then the MCU performs synchronous data sampling through the parallel interface or serial interface.
[0105] The time interval between sampling points = 10T / 4096, where T is the average duration of each cycle of the previous 10 cycles, or 10T is represented by the duration of the previous 10 cycles.
[0106] The number of sampling points for the first cycle is 409+0.6, and the number of sampling points for the first five cycles is
[0107] (409+0.6)(0.4+409+0.2)(0.8+408+0.8)(0.2+409+0.4)(0.6+409) 409 410 409 410 410
[0109] After the zero-crossing interrupt detects the flag change, 409 points are collected in the first cycle with an interval of 4096 / 10T. In the second cycle, sampling starts after a delay of 4096 / 10T*0.2 and 410 points are collected. After completing 4096 points in 10 cycles, power quality harmonic analysis is performed.
[0110] The settlement metering device disclosed in this application has three core MCUs, which respectively realize the functions of electricity metering, power quality and communication control. The three MCUs communicate through serial ports or SPI, and the distributed architecture design realizes data processing without interference, reduces the computing function of a single MCU, and improves the quality of data processing by a single MCU, ensuring the safe and stable operation of the system, and backs up important data to each other, thereby ensuring the safety and reliability of the entire device. The power quality adopts a fixed-point variable frequency sampling method based on a software and hardware phase-locked loop to ensure the number of sampling points for power quality analysis.
[0111] The above embodiments disclosed in the present invention describe the device implementation in detail. The present invention also discloses a settlement measurement processing method, which is described in detail in specific embodiments below.
[0112] Figure 7 This is a flow chart of a settlement measurement processing method disclosed in an embodiment of the present invention. Figure 7 The device shown is applied to any one of the settlement and metering devices in the above embodiments, see Figure 7 As shown, the settlement measurement processing method may include:
[0113] Step 701: The power metering module processes and obtains metering data.
[0114] Specifically, the power metering module processes the metering data and may include: using a multi-channel high-precision analog-to-digital conversion chip to analyze and calculate the collected data to obtain initial metering data; calibrating the initial metering data through multi-dimensional step calibration parameters to obtain final metering data.
[0115] The multi-dimensionality refers to the current dimension, voltage dimension, temperature dimension, humidity dimension, etc., because these factors will cause the current and voltage amplitude and phase deviation during the measurement process. In this application, a step calibration method is used to achieve step calibration of each dimension.
[0116] Step 702: The power quality module processes and obtains power quality data.
[0117] Specifically, the power quality module processes the power quality data and may include: calculating the previous cycle through zero-crossing detection based on a phase-locked loop circuit, and predicting the next cycle in combination with a filter circuit; and performing variable-frequency fixed sampling of the next cycle based on the predicted next cycle.
[0118] Step 703: The main control MCU outputs and displays the metering data and the power quality data.
[0119] In the settlement and metering method described in this embodiment, the electricity metering and power quality functions are completed by independent MCUs. The MCUs work independently of each other without interfering with each other, which can effectively ensure the reliable and stable operation of the device; and the hardware and software phase-locked loops are implemented inside the electricity metering MCU and the power quality MCU, which can achieve accurate judgment of signal sampling and improve the accuracy of the power quality analysis results.
[0120] In other implementations, the settlement and metering processing method may also include: when the power metering MCU fails, the power quality MCU performs relevant data processing of the power metering; when the power quality MCU fails, the power metering MCU performs power quality analysis and processing, thereby ensuring the safe and reliable operation of the settlement and metering device.
[0121] The specific implementation of the settlement and measurement method and other possible implementations can be found in the corresponding parts of the device embodiment, which will not be repeated here.
[0122] For the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the order of the actions described, because according to the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0123] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0124] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0125] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0126] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A settlement and metering device, characterized in that: It includes a main control MCU, an electric quantity metering module and a power quality module, wherein the main control MCU, the electric quantity metering module and the power quality module are connected to each other in pairs; The power metering module includes a power metering MCU, an analog-to-digital conversion module and a collection module, and the power quality module includes a power quality MCU, an analog-to-digital conversion module and a collection module. A phase-locked loop circuit is also provided between the power metering MCU and the power quality MCU; The hardware structures of the power metering MCU and the power quality MCU are exactly the same, and both can obtain current, voltage and zero-crossing information through the analog-to-digital conversion module and the phase-locked loop circuit, and communicate with the main control MCU, so as to realize hot backup between the power metering MCU and the power quality MCU when a problem occurs to the power metering MCU or the power quality MCU, and complete the transfer of functional calculation; The main control MCU is used to control the data communication of the entire settlement and metering device, the power metering MCU is used to implement power metering, and the power quality MCU is used to implement power quality analysis.
2. The settlement and metering device according to claim 1, characterized in that: The main control MCU, the electricity metering MCU and the power quality MCU communicate with each other via a serial interface or a serial peripheral interface.
3. The settlement and metering device according to claim 1, characterized in that: The main control MCU has a DL / T645 protocol port, a DL / T698 protocol port and an IEC61850 protocol port to respectively implement DL / T645 communication, DL / T698 communication and IEC61850 communication.
4. The settlement and metering device according to claim 1, characterized in that: The settlement and metering device also includes at least one of a screen, buttons, input and output, an encryption chip, an external storage and a time synchronization device.
5. The settlement and metering device according to claim 4, characterized in that: The main control MCU is specifically used for performing display control and data input and output control of the settlement and metering device.
6. A settlement and measurement processing method, applied to the settlement and measurement device according to any one of claims 1 to 5, characterized in that: include: The power metering module processes and obtains metering data; The power quality module processes and obtains power quality data; The main control MCU outputs and displays the metering data and the power quality data; When the power metering MCU fails, the power quality MCU will be used to process the relevant data of power metering; When the power quality MCU fails, the power quality analysis and processing work is performed through the power metering MCU.
7. The settlement measurement processing method according to claim 6, characterized in that: The power quality module processes and obtains power quality data, including: Based on the phase-locked loop circuit, the previous cycle is calculated through zero-crossing detection, and the next cycle is predicted in combination with the filter circuit; Based on the predicted next cycle period, variable frequency fixed sampling of the next cycle is performed.
8. The settlement measurement processing method according to claim 6, characterized in that: The electricity metering module processes and obtains metering data, including: Adopt multi-channel high-precision analog-to-digital conversion chip to analyze and calculate the collected data to obtain the initial measurement data; The initial measurement data is calibrated by multi-dimensional step calibration parameters to obtain final measurement data.
