Signal processing algorithm evaluation platform and method for electric energy meter calibration device
By designing a signal processing algorithm evaluation platform for FPGA and DSP in the electric energy meter calibration device, the synchronization and switching of simulation data and actual data is realized, and the problem that the evaluation method in the existing technology cannot be close to the actual working conditions and matching judgment is solved. Improved accuracy and effectiveness of assessments.
Patent Information
- Application Number
- CN202410875972.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-07-02
AI Technical Summary
The existing signal processing algorithm evaluation method of the electric energy meter calibration device cannot be close to the actual working conditions, and it is impossible to judge whether the algorithm and the hardware match, and it is difficult to switch and verify the simulation data and the actual data, resulting in a gap between the simulation evaluation results and the actual operation, making it difficult to discover the algorithm and the actual operation. Hardware problem.
A signal processing algorithm evaluation platform including FPGA and DSP is designed. Through the sampling clock control unit, DAC module, ADC module, UPP receiving module and simulation data construction unit, the synchronization of data and simulation data is realized, and the UPP bus and EDMA interrupt are used. The service function performs high-speed parallel data transmission and interrupt processing, and can switch simulation working conditions under actual working conditions to ensure the phase and frequency consistency of data.
It achieves closeness between the evaluation environment and actual working conditions, can effectively judge the matching of algorithms and hardware, ensures the consistency between simulation data and actual data, facilitates comprehensive evaluation and analysis of algorithms and hardware, and guides algorithm adjustments.
Smart Images

Figure CN118410753B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to a platform for evaluating a signal processing algorithm of an electric energy meter verification device, and also relates to a method for evaluating a signal processing algorithm of an electric energy meter verification device. Background Art
[0002] As an important device in the power system, the electric energy meter calibration device is mainly responsible for the performance test of the electric energy meter to ensure its accuracy and reliability. When working, the electric energy meter calibration device needs to output a specific waveform, and use the signal processing algorithm to process the voltage and current signals collected by the electric energy meter, and finally obtain the calibration result.
[0003] In order to ensure that the performance of the electric energy meter calibration device meets the requirements and the results are reliable, it is necessary to simulate and evaluate the signal processing algorithm running in it, and judge the advantages and disadvantages of the signal processing algorithm and the adaptability of the hardware based on the processing results of the algorithm on the simulation data and the real recovered data. With the addition and increase in complexity of algorithm modules such as harmonic amplitude, harmonic phase, harmonic power, and harmonic electric energy, manufacturers have put forward higher and more stringent requirements on the function, correctness, and stability of the algorithm of the electric energy meter calibration device. An evaluation platform that is closer to the simulation working condition and can be switched at any time is needed to evaluate and verify the algorithm based on the recovered data, which can more easily discover the problems in the algorithm and analyze and locate them, so as to determine whether it is a software algorithm problem or a hardware platform problem.
[0004] The existing simulation evaluation method is to conduct it on the PC simulation software (such as MATLAB and Visual Studio platform), and import the constructed discrete simulation data into the algorithm to be evaluated for verification. Although this method can verify whether the algorithm is feasible and meets the index requirements to a certain extent, when it is transplanted to the actual product platform, the algorithm may not be well adapted to the characteristics of the hardware platform, or because there is a certain performance deviation between the actual platform itself and the simulation environment, the results of the simulation evaluation verification have a certain gap with the actual environment operation or there are errors in the direction. Specifically:
[0005] 1. The simulation environment cannot build a complete operating condition that is close to the actual application environment, and cannot conduct a comprehensive and effective evaluation of the algorithm. The control algorithm of the calibration device includes many algorithm modules, such as DAC control logic, waveform generation algorithm, PID algorithm for power source phase and amplitude control, various active and reactive power and electric energy algorithms, various DC removal, IIR high-frequency filtering, FIR low-frequency filtering algorithms, etc., which have both temporal coherence and cross-operation. The simple MATLAB and Visual Studio platform process cannot fit the reality well, resulting in many omissions in the evaluation of the algorithm, or the algorithm operation complexity is too high to be effectively evaluated.
[0006] Second, it is impossible to determine whether the algorithm matches the characteristics of the hardware platform. The traditional method cannot measure the data buffering and response speed (such as CPU rate, data interface rate, interrupt response rate) of the calibration device processor (DSP and FPGA) under multi-tasking. It often happens that the algorithm is feasible in the simulation environment, but once it is implemented in the actual working conditions, there will be insufficient hardware resources, resulting in the failure of the early simulation algorithm to be implemented, wasting limited product development time.
[0007] 3. It is impossible to switch and verify the simulated sampling data and the actual sampling data, which makes it inconvenient to analyze and verify algorithm modules such as harmonic compensation. Summary of the invention
[0008] The present invention proposes a signal processing algorithm evaluation platform and method for an electric energy meter calibration device, the purpose of which is to solve the problems that the existing evaluation method cannot be close to the actual working conditions, cannot determine whether the algorithm matches the hardware, and cannot switch between simulation data and actual data for verification.
[0009] The technical solution of the present invention is as follows:
[0010] A signal processing algorithm evaluation platform for an electric energy meter verification device, comprising an FPGA and a DSP of the electric energy meter verification device, and also comprising a DAC module and an ADC module;
[0011] The FPGA is provided with a sampling clock control unit and a data acquisition and power source control unit;
[0012] The DSP is provided with a UPP receiving module, a power source waveform generating unit, a simulation data constructing unit and an algorithm processing unit;
[0013] The sampling clock control unit is connected to the data acquisition and power source control unit and the UPP receiving module respectively; the data acquisition and power source control unit is connected to the UPP receiving module via the UPP bus, and is also connected to the power source waveform generating unit;
[0014] The power source waveform generating unit is used to generate waveform data used for evaluation;
[0015] The data acquisition and power source control unit is used to send the waveform data generated by the power source waveform generating unit to the DAC module according to the clock rhythm generated by the sampling clock control unit and the phase set by the host computer, and is also used to transmit the voltage and current data sampled by the ADC module to the UPP receiving module according to the clock rhythm generated by the sampling clock control unit;
[0016] The DAC module is used to generate a waveform signal applied to the load according to the received waveform data;
[0017] The ADC module is used to sample voltage and current data through the mutual inductor of the electric energy meter verification device;
[0018] The simulation data construction unit is used to construct simulation data used for evaluation according to the format of the ADC module and the waveform data produced by the power source waveform generation unit, wherein the simulation data includes voltage and current data;
[0019] The UPP receiving module is used to send the voltage and current data sent by the data acquisition and power source control unit or the simulation data constructed by the simulation data construction to the algorithm processing unit according to the clock rhythm generated by the sampling clock control unit;
[0020] The algorithm processing unit is used to receive data sent by the UPP receiving module, process the received data according to the algorithm to be evaluated, and evaluate the algorithm according to the processed result.
[0021] As a further improvement of the signal processing algorithm evaluation platform of the electric energy meter calibration device: the UPP receiving module selects to send the voltage and current data sent by the data acquisition and power source control unit or the simulation data constructed by the simulation data construction to the algorithm processing unit according to the switching instruction of the host computer.
[0022] As a further improvement of the signal processing algorithm evaluation platform of the electric energy meter calibration device: the data acquisition and power source control unit is connected to the power source waveform generating unit through an EMIF bus.
[0023] The present invention also provides an algorithm evaluation method based on the above-mentioned electric energy meter calibration device signal processing algorithm evaluation platform, the steps comprising:
[0024] Step 1: The power source waveform generating unit and the simulation data constructing unit respectively generate waveform data and simulation data with consistent initial phases;
[0025] Step 2: The data acquisition and power source control unit reads the waveform data generated by the power source waveform generation unit according to the clock rhythm generated by the sampling clock control unit and the phase set by the host computer and sends it to the DAC module. The DAC module generates a waveform signal applied to the load according to the received waveform data.
[0026] Step 3, the ADC module samples the voltage and current data corresponding to the waveform signal through the mutual inductor of the electric energy meter verification device, and the data acquisition and power source control unit transmits the voltage and current data sampled by the ADC module to the UPP receiving module according to the clock rhythm generated by the sampling clock control unit;
[0027] Step 4: The UPP receiving module selects whether to execute the actual working condition or the simulated working condition according to the switching instruction of the host computer;
[0028] Under actual working conditions, the UPP receiving module sends the voltage and current data sent by the data acquisition and power source control unit to the algorithm processing unit according to the clock rhythm generated by the sampling clock control unit;
[0029] Under simulation conditions, the EDMA interrupt service function in the UPP receiving module imports the simulation data according to the clock rhythm generated by the sampling clock control unit. During the import, the phase alignment between the simulation data and the actual data sampled by the ADC module is achieved through addressing positioning, and then sent to the algorithm processing unit;
[0030] Step 5, the algorithm processing unit receives the data sent by the UPP receiving module, processes the received data according to the algorithm to be evaluated, and evaluates the algorithm according to the processed results;
[0031] Steps 2 to 5 are performed synchronously.
[0032] As a further improvement of the algorithm evaluation method: the power source waveform generating unit transmits the waveform data to the FPGA and then stores it in the SRAM, and the data acquisition and power source control unit reads the signal provided to the back-end DAC module from the SRAM through addressing according to the clock rhythm and set phase generated by the sampling clock control unit.
[0033] As a further improvement of the algorithm evaluation method: the simulation data generated by the simulation data construction unit is stored in the RAM of the DSP. When the EDMA interrupt service function imports the simulation data, the phase import point is located by addressing according to the phase set to the FPGA, and the simulation data in the RAM is read to ensure that the imported simulation data is aligned in phase with the actual retrieved data sampled by the ADC module.
[0034] Compared with the prior art, the present invention has the following positive effects:
[0035] 1. The present invention realizes synchronization (time synchronization and waveform phase synchronization) between the output waveform of the DAC module, the actual sampled data of the ADC module, and the imported simulation data through the sampling clock control unit. This method not only establishes the correlation between the output waveform under actual working conditions and the actual sampled data in phase and frequency, but also establishes the correlation between the actual sampled data under actual working conditions and the imported simulation data in phase and frequency, ensuring the consistency of the rate and phase point with the actual sampling data when importing the simulation data, making the evaluation environment and results closer to the actual working conditions, and also laying the foundation for working condition switching.
[0036] 2. The UPP bus adopted in the present invention is a high-speed parallel data bus. Combined with the EDMA interrupt trigger mode jointly built by DSP and FPGA, it can ensure the data transmission rate and timely response to interrupts, reduce the occupation of the DSP internal bus by interrupt processing, and the simulation working condition can highly simulate the data sampling process and completely synchronize the data sampling and processing flow, which is not only close to the actual working condition, but also can effectively determine whether the algorithm matches the hardware.
[0037] 3. The UPP receiving module of the present invention can select to send the actual collected data or the simulation data to the algorithm processing unit according to the switching instruction, and realize the alignment of the actual collected data and the simulation data in frequency and phase through UPP timing control (according to the clock rhythm generated by the sampling clock control unit) and the addressing and positioning of the simulation data, ensuring that the fundamental phase and frequency of the two waveforms are consistent when switching, facilitating the analysis and verification of algorithm modules such as harmonic compensation, and can better analyze the amplitude attenuation degree and phase shift law of the signal during the flow of the hardware system, so as to better guide the algorithm adjustment. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 Schematic diagram of the architecture of the evaluation platform of the present invention. DETAILED DESCRIPTION
[0039] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments.
[0040] like Figure 1 A signal processing algorithm evaluation platform for an electric energy meter verification device includes an FPGA and a DSP of the electric energy meter verification device, and also includes a DAC module and an ADC module. The FPGA is provided with a sampling clock control unit and a data acquisition and power source control unit. The DSP is provided with a UPP receiving module, a power source waveform generating unit, a simulation data constructing unit and an algorithm processing unit.
[0041] The sampling clock control unit is connected to the data acquisition and power source control unit and the UPP receiving module respectively to provide a unified clock signal. The data acquisition and power source control unit is connected to the UPP receiving module via a UPP bus. The data acquisition and power source control unit is connected to the power source waveform generating unit via an EMIF bus.
[0042] The power source waveform generating unit is used to generate waveform data used for evaluation.
[0043] The data acquisition and power source control unit is used to send the waveform data generated by the power source waveform generating unit to the DAC module according to the clock rhythm generated by the sampling clock control unit and the phase set by the host computer, and is also used to transmit the voltage and current data sampled by the ADC module to the UPP receiving module according to the clock rhythm generated by the sampling clock control unit.
[0044] The DAC module is used to generate a waveform signal applied to a load according to the received waveform data.
[0045] The ADC module is used to sample voltage and current data through the mutual inductor of the electric energy meter calibration device.
[0046] The simulation data construction unit is used to construct simulation data for evaluation according to the format of the ADC module and the waveform data generated by the power source waveform generation unit, and the simulation data includes voltage and current data.
[0047] The UPP receiving module is used to select and send the voltage and current data sent by the data acquisition and power source control unit or the simulation data constructed by the simulation data construction to the algorithm processing unit according to the clock rhythm generated by the sampling clock control unit and the switching instruction of the host computer.
[0048] The algorithm processing unit is used to receive data sent by the UPP receiving module, process the received data according to the algorithm to be evaluated, and evaluate the algorithm according to the processed result.
[0049] The evaluation method is as follows:
[0050] Step 1: The power source waveform generating unit and the simulation data constructing unit respectively generate waveform data and simulation data with consistent initial phases. The power source waveform generating unit transmits the waveform data to the FPGA and then stores it in the SRAM, and the simulation data generated by the simulation data constructing unit is stored in the RAM of the DSP.
[0051] Step 2: The data acquisition and power source control unit reads the signal provided to the back-end DAC module from the SRAM through addressing according to the clock rhythm and set phase generated by the sampling clock control unit and sends it to the DAC module. The DAC module generates a waveform signal applied to the load through the power amplifier and booster (output voltage) and current booster (output current) based on the received waveform data.
[0052] Step 3, the ADC module samples the voltage and current data corresponding to the waveform signal through the mutual inductor of the electric energy meter calibration device, and the data acquisition and power source control unit transmits the voltage and current data sampled by the ADC module to the UPP receiving module according to the clock rhythm generated by the sampling clock control unit.
[0053] Step 4: The UPP receiving module selects whether to execute the actual working condition or the simulation working condition according to the switching instruction of the host computer.
[0054] Under actual working conditions, the UPP receiving module sends the voltage and current data sent by the data acquisition and power source control unit to the algorithm processing unit according to the clock rhythm generated by the sampling clock control unit.
[0055] Under simulation conditions, the EDMA interrupt service function in the UPP receiving module imports simulation data according to the clock rhythm generated by the sampling clock control unit. The interrupt service function uses a 6*16bits trigger mode. When the EDMA interrupt service function imports simulation data, it locates the phase import point by addressing according to the phase set to the FPGA, reads the simulation data in the RAM, ensures that the imported simulation data is aligned with the phase of the actual data sampled by the ADC module, and then sends it to the algorithm processing unit.
[0056] The host computer sets the time for the working condition switching according to the evaluation requirements and prepares the corresponding simulation data. Regardless of the actual working condition or the simulation condition, the UPP receiving module sends data according to the clock rhythm generated by the sampling clock control unit, thereby ensuring the consistency of the frequency, which is of great significance when evaluating the impact of asynchronous sampling.
[0057] Step 5: The algorithm processing unit receives the data sent by the UPP receiving module, processes the received data according to the algorithm to be evaluated, and evaluates the algorithm according to the processed result.
[0058] Steps 2 to 5 are performed synchronously.
[0059] In this embodiment, the FPGA is the cycloneIV series EP4CE40F23I7 of Intel Corporation, which can realize 200MHz parallel processing, has 329 user IO interfaces, 39600 logic processing units, and has sufficient pulse detection and error processing capabilities while taking into account the power source control function.
[0060] The DSP chip is TI's TMS320C6747 chip, which is a 32-bit floating-point processor that supports a processing speed of 456MHz. The parallel EMIF interface supports 16-bit data transmission with a clock of 150MHz, and has sufficient data transmission and processing capabilities. The UPP interface can meet the 16-bit width and 50MHz clock communication rate.
[0061] The chip of the ADC module is the 16-bit data synchronous sampling chip AD7606 from ADI.
[0062] The chip of the DAC module is AD5545 with 16-bit data width from ADI.
[0063] It should be noted that it is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. The scope of the present invention is defined by the claims rather than the above description.
Claims
1. A signal processing algorithm evaluation platform for an electric energy meter calibration device, comprising an FPGA and a DSP of the electric energy meter calibration device, characterized in that: It also includes DAC module and ADC module; The FPGA is provided with a sampling clock control unit and a data acquisition and power source control unit; The DSP is provided with a UPP receiving module, a power source waveform generating unit, a simulation data constructing unit and an algorithm processing unit; The sampling clock control unit is connected to the data acquisition and power source control unit and the UPP receiving module respectively; the data acquisition and power source control unit is connected to the UPP receiving module via the UPP bus, and is also connected to the power source waveform generating unit; The power source waveform generating unit is used to generate waveform data used for evaluation; The data acquisition and power source control unit is used to send the waveform data generated by the power source waveform generating unit to the DAC module according to the clock rhythm generated by the sampling clock control unit and the phase set by the host computer, and is also used to transmit the voltage and current data sampled by the ADC module to the UPP receiving module according to the clock rhythm generated by the sampling clock control unit; The DAC module is used to generate a waveform signal applied to the load according to the received waveform data; The ADC module is used to sample voltage and current data through the mutual inductor of the electric energy meter verification device; The simulation data construction unit is used to construct simulation data used for evaluation according to the format of the ADC module and the waveform data produced by the power source waveform generation unit, wherein the simulation data includes voltage and current data; The UPP receiving module is used to send the voltage and current data sent by the data acquisition and power source control unit or the simulation data constructed by the simulation data structure to the algorithm processing unit according to the clock rhythm generated by the sampling clock control unit; the UPP receiving module selects to send the voltage and current data sent by the data acquisition and power source control unit or the simulation data constructed by the simulation data structure to the algorithm processing unit according to the switching instruction of the host computer; The algorithm processing unit is used to receive data sent by the UPP receiving module, process the received data according to the algorithm to be evaluated, and evaluate the algorithm according to the processed result.
2. The signal processing algorithm evaluation platform for electric energy meter verification device according to claim 1, characterized in that: The data acquisition and power source control unit is connected with the power source waveform generating unit through an EMIF bus.
3. The algorithm evaluation method based on the signal processing algorithm evaluation platform for the electric energy meter verification device according to claim 1 is characterized in that the steps include: Step 1: The power source waveform generating unit and the simulation data constructing unit respectively generate waveform data and simulation data with consistent initial phases; Step 2: The data acquisition and power source control unit reads the waveform data generated by the power source waveform generation unit according to the clock rhythm generated by the sampling clock control unit and the phase set by the host computer and sends it to the DAC module. The DAC module generates a waveform signal applied to the load according to the received waveform data. Step 3, the ADC module samples the voltage and current data corresponding to the waveform signal through the mutual inductor of the electric energy meter verification device, and the data acquisition and power source control unit transmits the voltage and current data sampled by the ADC module to the UPP receiving module according to the clock rhythm generated by the sampling clock control unit; Step 4: The UPP receiving module selects whether to execute the actual working condition or the simulated working condition according to the switching instruction of the host computer; Under actual working conditions, the UPP receiving module sends the voltage and current data sent by the data acquisition and power source control unit to the algorithm processing unit according to the clock rhythm generated by the sampling clock control unit; Under simulation conditions, the EDMA interrupt service function in the UPP receiving module imports the simulation data according to the clock rhythm generated by the sampling clock control unit. During the import, the phase alignment between the simulation data and the actual data sampled by the ADC module is achieved through addressing positioning, and then sent to the algorithm processing unit; Step 5, the algorithm processing unit receives the data sent by the UPP receiving module, processes the received data according to the algorithm to be evaluated, and evaluates the algorithm according to the processed results; Steps 2 to 5 are performed synchronously.
4. The algorithm evaluation method according to claim 3, characterized in that: The power source waveform generation unit transfers the waveform data to the FPGA and then stores it in the SRAM. The data acquisition and power source control unit reads the signal provided to the back-end DAC module from the SRAM through addressing according to the clock rhythm and set phase generated by the sampling clock control unit.
5. The algorithm evaluation method according to claim 4, characterized in that: The simulation data generated by the simulation data construction unit is stored in the DSP's RAM. When the EDMA interrupt service function imports the simulation data, it locates the phase import point through addressing according to the phase set to the FPGA and reads the simulation data in the RAM to ensure that the imported simulation data is aligned with the phase of the actual retrieved data sampled by the ADC module.
