Special integrated circuit for calculating electric energy and electric energy quality parameters

文档序号:1887793 发布日期:2021-11-26 浏览:17次 中文

阅读说明:本技术 一种计算电能和电能质量参数的专用集成电路 (Special integrated circuit for calculating electric energy and electric energy quality parameters ) 是由 谢鹏飞 周荔丹 姚钢 林顺富 刘斯扬 于 2021-09-01 设计创作,主要内容包括:本发明公开了一种计算电能和电能质量参数的专用集成电路。该专用集成电路包括:顶层专用电路和参数计算专用模块,所述参数计算专用模块包括电流电压有效值专用计算电路、电流电压均值专用计算电路、电流电压峰值专用计算电路、功率专用计算电路、基波频率专用计算电路、谐波专用计算电路,以及三相电能和功率因数专用计算电路中的至少一种。所述顶层专用电路,与各专用计算电路电连接,用于根据参数计算指令调用相应的专用计算电路计算相应参数。本发明由于设计了针对单一参数的专用计算电路以及顶层专用电路,与现有技术中基于软件的通用处理器相比,本申请的运算性能得到了提升。(The invention discloses a special integrated circuit for calculating electric energy and electric energy quality parameters. The application specific integrated circuit includes: the special top-layer circuit and the special parameter calculation module comprise at least one of a current voltage effective value special calculation circuit, a current voltage mean value special calculation circuit, a current voltage peak value special calculation circuit, a power special calculation circuit, a fundamental wave frequency special calculation circuit, a harmonic wave special calculation circuit and a three-phase electric energy and power factor special calculation circuit. And the top layer special circuit is electrically connected with each special calculating circuit and used for calling the corresponding special calculating circuit to calculate the corresponding parameters according to the parameter calculating instruction. Because the invention designs the special calculation circuit aiming at single parameter and the top layer special circuit, compared with the general processor based on software in the prior art, the operation performance of the invention is improved.)

1. An asic for calculating power and power quality parameters, comprising: the special top-layer circuit and the special parameter calculation module comprise at least one of a current voltage effective value special calculation circuit, a current voltage mean value special calculation circuit, a current voltage peak value special calculation circuit, a power special calculation circuit, a fundamental wave frequency special calculation circuit, a harmonic wave special calculation circuit and a three-phase electric energy and power factor special calculation circuit;

and the top layer special circuit is electrically connected with each special calculating circuit and used for calling the corresponding special calculating circuit to calculate the corresponding parameters according to the parameter calculating instruction.

2. The application-specific integrated circuit for calculating power and power quality parameters of claim 1, wherein the top-level dedicated circuit is configured to:

storing voltage and current sampling data, wherein the voltage and current sampling data comprise voltage sampling data and current sampling data of a power system;

receiving a parameter calculation instruction;

decoding the parameter calculation instruction;

and calling a corresponding special calculation circuit and voltage and current sampling data according to the decoded parameter calculation instruction, wherein the voltage and current sampling data is used for calculating the corresponding parameter.

3. The application-specific integrated circuit for calculating electric energy and electric energy quality parameters according to claim 1, wherein the addition operation circuit, the subtraction operation circuit, the multiplication operation circuit and the division operation circuit involved in the parameter calculation special module are directly instantiated by a Xilinx IP core.

4. The application specific integrated circuit for calculating electric energy and electric energy quality parameters according to claim 2, characterized in that the electric current voltage effective value specific calculation circuit is configured to calculate a current effective value from the current sampling data and a voltage effective value from the voltage sampling data based on an accumulation operation of number multiplication;

the special current-voltage mean value calculating circuit is used for calculating a current mean value according to current sampling data and a voltage mean value according to voltage sampling data based on the accumulation operation of number multiplication;

the special calculating circuit for the current and voltage peak value is used for comparison operation, calculating the current peak value according to the current sampling data and calculating the voltage peak value according to the voltage sampling data;

5. the application-specific integrated circuit for calculating electric energy and electric energy quality parameters according to claim 4, characterized in that the electric current voltage effective value dedicated calculation circuit, the electric current voltage mean value dedicated calculation circuit and the electric current voltage peak value dedicated calculation circuit are capable of parallel calculation.

6. The application-specific integrated circuit for calculating electrical energy and electrical energy quality parameters according to claim 5, wherein the power-specific calculation circuit is configured to:

calculating full-wave active power according to the voltage and current sampling data;

calculating full-wave apparent power according to the voltage effective value and the current effective value output by the special calculating circuit for the current and voltage effective values;

and calculating full-wave reactive power according to the full-wave active power and the full-wave apparent power.

7. The application specific integrated circuit for calculating power and power quality parameters according to claim 6, wherein the calculations of voltage effective value, current effective value, voltage mean value, current mean value and full-wave active power are corrected using a quasi-synchronous sampling algorithm.

8. The application specific integrated circuit for calculating electrical energy and power quality parameters according to claim 2, wherein the fundamental frequency dedicated calculation circuit is configured to determine a fundamental frequency from the voltage current sample data.

9. The application specific integrated circuit for calculating electric energy and electric energy quality parameters according to claim 2, wherein the harmonic wave specific calculation circuit is configured to calculate an effective value and a phase angle of each harmonic wave, total harmonic distortion, active power of each harmonic wave, reactive power of each harmonic wave, apparent power of each harmonic wave, and content of each harmonic wave according to the fundamental wave frequency outputted from the fundamental wave frequency specific calculation circuit.

10. An application specific integrated circuit for calculating power and power quality parameters according to claim 1, wherein said three-phase power and power factor application specific calculation circuit is configured to:

calculating three-phase total electric energy, three-phase fundamental wave electric energy, forward and reverse active electric energy, four-quadrant reactive electric energy, fundamental wave power factors and total power factors according to the full-wave related power parameters and the fundamental wave related power parameters;

wherein the full-wave related power parameter is calculated by the power-specific calculation circuit; the full-wave related power parameters include: full-wave active power, full-wave reactive power, and full-wave apparent power;

the fundamental wave related power parameter is calculated by the harmonic wave special calculation circuit; the fundamental wave related power parameters include: the active power of fundamental wave, the reactive power of fundamental wave and the apparent power of fundamental wave.

Technical Field

The invention relates to the field of digital integrated circuits, in particular to a special integrated circuit for calculating electric energy and electric energy quality parameters.

Background

With the development of an electric power system, the demand of the intelligent power grid terminal for multifunctional electric energy parameter measurement is gradually increased, and the electric energy and electric energy quality parameter measurement function requirements are as diverse as possible, rapid and low in power consumption. The existing electric energy parameter measurement system is mostly based on an MCU + DSP framework, wherein the MCU is mainly used for control, the DSP is suitable for processing a large amount of data, algorithms such as FFT (fast Fourier transform) and filtering can be quickly realized, cooperative work among the MCU and the DSP has relatively strong data processing capability, and the main reason of strong performance is that a Harvard structure with separated instructions and data is adopted, a special hardware multiplier is provided, and some complex floating point operations can be quickly completed. However, it is still a general purpose software-based processor in nature, and its advantages of programmability and flexibility make its operation speed limited.

Disclosure of Invention

The invention aims to provide an application specific integrated circuit for calculating power and power quality parameters so as to improve the operation speed.

In order to achieve the purpose, the invention provides the following scheme:

an application specific integrated circuit for calculating power and power quality parameters, comprising: the special top-layer circuit and the special parameter calculation module comprise at least one of a current voltage effective value special calculation circuit, a current voltage mean value special calculation circuit, a current voltage peak value special calculation circuit, a power special calculation circuit, a fundamental wave frequency special calculation circuit, a harmonic wave special calculation circuit and a three-phase electric energy and power factor special calculation circuit;

and the top layer special circuit is electrically connected with each special calculating circuit and used for calling the corresponding special calculating circuit to calculate the corresponding parameters according to the parameter calculating instruction.

Optionally, the top layer dedicated circuit is configured to:

storing voltage and current sampling data, wherein the voltage and current sampling data comprise voltage sampling data and current sampling data of a power system;

receiving a parameter calculation instruction;

decoding the parameter calculation instruction;

and calling a corresponding special calculation circuit and voltage and current sampling data according to the decoded parameter calculation instruction, wherein the voltage and current sampling data is used for calculating the corresponding parameter.

Optionally, the addition operation circuit, the subtraction operation circuit, the multiplication operation circuit, and the division operation circuit related in the parameter calculation special module are directly instantiated by the XilinxIP core.

Optionally, the special calculating circuit for the current voltage effective value is configured to calculate the current effective value according to the current sampling data and calculate the voltage effective value according to the voltage sampling data based on an accumulation operation of number multiplication;

the special current-voltage mean value calculating circuit is used for calculating a current mean value according to current sampling data and a voltage mean value according to voltage sampling data based on the accumulation operation of number multiplication;

the special calculating circuit for the current and voltage peak value is used for comparison operation, calculating the current peak value according to the current sampling data and calculating the voltage peak value according to the voltage sampling data;

optionally, the current-voltage effective value dedicated computing circuit, the current-voltage mean value dedicated computing circuit, and the current-voltage peak value dedicated computing circuit may perform parallel computation.

Optionally, the power-dedicated computing circuit is configured to:

calculating full-wave active power according to the voltage and current sampling data;

calculating full-wave apparent power according to the voltage effective value and the current effective value output by the special calculating circuit for the current and voltage effective values;

and calculating full-wave reactive power according to the full-wave active power and the full-wave apparent power.

Optionally, the voltage effective value, the current effective value, the voltage mean value, the current mean value and the full-wave active power are calculated by using a quasi-synchronous sampling algorithm for correction.

Optionally, the fundamental frequency dedicated computing circuit is configured to determine a fundamental frequency according to the voltage-current sampling data.

Optionally, the harmonic-wave-dedicated calculating circuit is configured to calculate an effective value and a phase angle of each harmonic wave, total harmonic distortion, active power of each harmonic wave, reactive power of each harmonic wave, apparent power of each harmonic wave, and content of each harmonic wave according to the fundamental wave frequency output by the fundamental wave-dedicated calculating circuit.

Optionally, the three-phase electric energy and power factor dedicated computing circuit is configured to:

calculating three-phase total electric energy, three-phase fundamental wave electric energy, forward and reverse active electric energy, four-quadrant reactive electric energy, fundamental wave power factors and total power factors according to the full-wave related power parameters and the fundamental wave related power parameters;

wherein the full-wave related power parameter is calculated by the power-specific calculation circuit; the full-wave related power parameters include: full-wave active power, full-wave reactive power, and full-wave apparent power;

the fundamental wave related power parameter is calculated by the harmonic wave special calculation circuit; the fundamental wave related power parameters include: the active power of fundamental wave, the reactive power of fundamental wave and the apparent power of fundamental wave.

According to the specific embodiment provided by the invention, the following technical effects are disclosed: the method is used for designing a special calculation circuit for single parameter calculation aiming at the calculation of the electric energy and the electric energy quality parameters of the electric power system, and simultaneously designing a top layer special circuit for calling the corresponding special calculation circuit according to a parameter calculation instruction. Because this application has designed dedicated calculating circuit and top level dedicated circuit to single parameter, compare with the general purpose processor based on software among the prior art, the arithmetic speed of this application has obtained the promotion.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.

FIG. 1 is a schematic diagram of an ASIC for calculating power and power quality parameters according to an embodiment of the present invention;

FIG. 2 is a diagram illustrating the relationship between dedicated computing circuits according to an embodiment of the present invention;

FIG. 3 is a flow chart illustrating an exemplary process for executing a parameter calculation instruction according to the present invention.

Detailed Description

In the embodiments of the present application, terms such as "first" and "second" are used to distinguish the same or similar items having substantially the same function and action. For example, the first wireless communication module and the second wireless communication module are only used for distinguishing different wireless communication modules, and the sequence order thereof is not limited. Those skilled in the art will appreciate that the words "first," "second," and the like do not limit the number or order of execution.

It is noted that, in the present application, words such as "exemplary" or "for example" are used to mean exemplary, illustrative, or descriptive. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

The invention aims to provide an application specific integrated circuit for calculating power and power quality parameters so as to improve the operation speed.

Referring to fig. 1, the application provides an asic comprising: a top-level dedicated circuit 1 and a parameter calculation dedicated module 2. The special parameter calculation module 2 includes at least one of a current-voltage effective value special calculation circuit 23, a current-voltage mean value special calculation circuit 22, a current-voltage peak value special calculation circuit 21, a power special calculation circuit 24, a fundamental wave frequency special calculation circuit 25, a harmonic wave special calculation circuit 26, and a three-phase electric energy and power factor special calculation circuit 27. And the top layer special circuit 1 is electrically connected with each special calculating circuit and used for calling the corresponding special calculating circuit to calculate the corresponding parameters according to the parameter calculating instruction.

The special circuits in the application are designed based on a Verilog hardware description language, and can realize the calculation functions of parameters such as mean value, effective value, peak value, apparent power, active power, reactive power, frequency, harmonic component effective value and phase angle, total harmonic distortion, power factor, three-phase total electric energy and the like of input voltage and current sampling data.

The above-mentioned top layer dedicated circuit 1 is mainly used for: storing voltage and current sampling data; receiving a parameter calculation instruction; decoding the parameter calculation instruction; and calling a corresponding special calculation circuit and voltage and current sampling data according to the decoded parameter calculation instruction so as to calculate corresponding parameters.

The working principle inside the special integrated circuit for calculating the electric energy and the electric energy quality parameters is as follows:

the top layer special circuit 1 receives an electric energy parameter calculation instruction from the test module 3 or the host, sets the busy interface, decodes the instruction to determine the instruction calculation type and the storage address of current sampling data and/or voltage sampling data required by the instruction calculation type, enables each special calculation circuit according to the instruction calculation type and sends out a reset signal, transmits the current sampling data and/or voltage sampling data stored in the top layer special circuit 1 to the special calculation circuit through the sampling data interface, calculates corresponding parameters by the special calculation circuit under the excitation of an external clock signal (provided by the test module 3 or the host) and the reset signal, finally returns the calculation result to the top layer special circuit 1 through the result transmission interface and stores the calculation result in a result register group of the top layer special circuit 1, and finally resetting the busy interface and starting to read the next instruction.

It should be noted that the top-level dedicated circuit 1 and the dedicated calculating circuits for each parameter can be implemented by programming a hardware programmable circuit FPGA.

It should be noted that, in order to implement the performance test on the asic, the test module 3 is provided in the present application. That is, the test module 3 is specially used for the performance test of the asic.

Fig. 2 shows the working mode of the asic in the power measurement system, and referring to fig. 2, the sampling of the current and voltage data of the power system and the analog-to-digital conversion of the current and voltage sampling data are both implemented by an external circuit, the external host processor transmits the current and voltage sampling data after analog-to-digital conversion to the power and power quality parameter calculation asic IP (including the top layer asic 1 and the parameter calculation circuits), the top layer asic 1 stores the current and voltage sampling data in a specific storage area thereof, and enables the related parameter calculation circuits to perform high-speed data calculation under the guidance of a clock signal and a parameter calculation instruction provided by the external host processor. The operation result data (voltage, current, active, reactive, THD, etc.) are stored in the result register group of the top layer dedicated circuit 1.

If the user needs to analyze and synthesize the result data, the user only needs to read the data from the man-machine interface through the corresponding keys, and the external main processor reads the corresponding parameters from the result register group according to the key input and outputs the parameters.

It should be noted that the external circuit and the external host processor are circuits and processors other than the asic provided in the present application, and are not intended to be part of the asic provided in the present application.

Fig. 1 shows the relationship between the functional circuit modules of the asic IP in the present application, and refer to fig. 1, where the test module 3 is responsible for outputting a reset signal and a high-speed clock signal to the asic IP, and sequentially transmitting 32-bit parameter calculation instructions, and the asic IP performs parameter calculation processing according to the parameter calculation instructions and stores result data. The dependency relationship between the parameter-specific calculation circuits is also shown in fig. 1.

The above-mentioned top-level dedicated circuit 1 and the parameter-specific calculation circuits are described below:

1) top layer special circuit 1

The top-level special circuit 1 defines a special instruction set for calculating the parameters of the power and the power quality, the instruction set is a 32-bit instruction code, the 0 th to 25 th bits represent instruction types, the specific bits represent the parameter calculation of the specific type, and at most 26 types of calculation of the parameters of the power and the power quality are supported; bits 26 to 31 represent the source of the sampled data channels, corresponding to A, B, C three-phase voltage current six data channels, the top level application specific circuit 1 can access single or multiple channel sampled data storage areas simultaneously. Table 1 shows the instruction encodings and the respective meanings of the dedicated instruction sets.

TABLE 1

The top layer dedicated circuit 1 has the main functions of:

(1) receiving an electric energy parameter calculation instruction from a host or a test module 3; the instruction is decoded to determine the sample data address and the instruction type.

(2) Determining the parameter calculation that the instruction type depends on, controlling a corresponding special calculation circuit to preferably calculate the dependent parameter, taking the calculation of the apparent power as an example, wherein the dependent parameter is a voltage effective value and a current effective value, and the specific operation mode is that a current instruction (an apparent power calculation instruction) is pressed into a stack, a corresponding dependent parameter calculation instruction (a current voltage effective value calculation instruction) is taken out at the same time, the operation of the dependent parameter calculation instruction is completed firstly, and then the current instruction (an apparent power calculation instruction) is taken out of the stack, so that the calculation of the current instruction (the apparent power calculation instruction) is completed.

(3) An enable signal, a clock signal and a reset signal are sent to each parameter-specific calculation circuit.

(4) And reading parameter calculation result data returned by each parameter special calculation circuit, and storing the result data into a result register group of the top layer special circuit 1.

Fig. 3 shows the execution flow of the parameter calculation instruction. After receiving the instruction, the top-level dedicated circuit 1 decodes the instruction to obtain the instruction type and a calculation data channel, if the instruction is valid, checks whether the parameter corresponding to the instruction has been calculated, if so, returns to receive the next instruction directly, otherwise, further calculates the dependent parameter executed by the instruction, enters an operation module of the instruction after the dependent parameter calculation is completed, returns the result to a result register group of the top-level dedicated circuit 1 after the calculation is completed, and starts to receive the next instruction.

2) Current-voltage effective value dedicated calculation circuit 23, current-voltage average value dedicated calculation circuit 22, and current-voltage peak value dedicated calculation circuit 21

In some embodiments, the current-voltage effective value dedicated calculation circuit 23, the current-voltage average value dedicated calculation circuit 22, and the current-voltage peak value dedicated calculation circuit 21 are packaged in the same module, and can implement parallel calculation, the principle and the calculation formula of which are shown in table 2, the operation is an accumulation operation or a comparison operation (peak value) of logarithmic multiplication, and the specific implementation manner is that the three share the same counter, the effective value-average value dedicated calculation circuit completes the corresponding multiplication operation in each clock cycle and sequentially accumulates the result into an accumulation register, the peak value dedicated calculation circuit completes the comparison operation and the updating of the peak value in each clock cycle, and returns the result to the top-layer dedicated circuit 1 when the count cycle is reached.

TABLE 2

It should be noted that the calculation of the effective value, the average value and the active power is corrected by using a quasi-synchronous sampling algorithm, the algorithm takes the sampling period number N and the number N of sampling points per period as input, and outputs a quasi-synchronous sampling window with the width of N × N +1, which is η in table 2, and the coefficient of the quasi-synchronous sampling window is pre-stored in the ROM of the top-layer dedicated circuit 1.

3) Power-specific computation circuit 24

The power special calculation circuit 24 calculates the full-wave active power according to the voltage and current sampling data; calculating full-wave apparent power according to the effective voltage value and the effective current value output by the circuit 23; and calculating the full-wave reactive power according to the full-wave active power and the full-wave apparent power.

4) Fundamental frequency dedicated computing circuit 25

In some embodiments, the fundamental frequency dedicated computing circuit 25 may employ a Blackman window function based fourier transform algorithm and a bilinear interpolation algorithm to compute the fundamental frequency of the sampled signal, which takes the sampled data as input, reads in from the sampled data interface, and obtains the fundamental frequency of the sampled sequence through discrete fourier transform and correction of the interpolation algorithm. The trigonometric function values involved therein are evaluated by means of a table look-up method, and the trigonometric function data are prestored in the read only memory ROM of the top-level dedicated circuit 1.

5) Harmonic-wave-specific calculation circuit 26

In some embodiments, the harmonic-specific calculating circuit 26 may calculate and correct the effective value and phase angle of each harmonic of the sampled signal by using a Blackman-Harris window-based FFT algorithm, which takes the sampled data and the fundamental frequency of the sampled signal as input, so that its calculation depends on the calculation result of the fundamental frequency-specific calculating circuit 25, the harmonic calculating instruction is called by the top-level specific circuit 1 when executed, and after the fundamental frequency calculation is completed, the harmonic calculating instruction is transmitted to the harmonic-specific calculating circuit 26 through the frequency transmission interface, and the output of the final harmonic-specific calculating circuit 26 includes the calculation of each harmonic effective value and phase angle, total harmonic distortion, each harmonic active power and each harmonic content rate.

6) According to the calculation results of the full-wave power and the fundamental wave power calculated by the power special calculation circuit 24 and the harmonic special calculation circuit 26, the results are accumulated in A, B, C three phases to calculate three-phase total electric energy, three-phase fundamental wave electric energy, forward and reverse active electric energy, four-quadrant reactive electric energy, fundamental wave power factor and total power factor.

It should be noted that the storage and operation data formats of the above parameter-specific calculation circuits are all single-precision floating point number formats conforming to the IEEE standard, and the addition, subtraction, multiplication, and division calculation circuits involved in the above parameter-specific calculation circuits can be directly instantiated by the XilinxIP core. The loop structure statements in each algorithm are realized by adopting an internal timer and a finite state machine, and the operation of a single loop body statement can be completed in a single clock period. The calculation results of the target parameters are stored in a result register set in the top-level dedicated circuit 1, the definition of the result register set is shown in table 3, and the results can be read by the host after all the parameters are calculated.

TABLE 4

Table 2 shows the calculation algorithm of each parameter and the simulation result error, which are referred to the calculation result of the software implementation using the same algorithm, and the result shows that the calculation of each parameter by the asic IP provided in the present application has higher accuracy, thereby meeting the actual application requirements.

The application provides a special integrated circuit for calculating electric energy and electric energy quality parameters has the following advantages:

(1) compared with the existing design implementation mode of MCU + DSP, the application has the advantages of high operation speed and high energy efficiency ratio. The calculation simulation results of all parameters show that the calculation errors of the method for the three-phase power and the three-phase harmonic distortion are within 0.0005%, the calculation errors of the harmonic effective values are within 0.02%, the calculation errors of the harmonic phase angles are within 0.5%, the calculation errors of the total harmonic distortion are within 0.02%, the calculation errors of the three-phase power and the power factors are within 0.001%, and the calculation accuracy meets the requirements of practical application.

(2) This application has realized mean value, virtual value, peak value, apparent power, active power, reactive power, frequency, multiple parameter calculation functions such as harmonic component virtual value and phase angle, total harmonic distortion, power factor and three-phase total electric energy, and has designed electric energy parameter and has calculated special instruction set, and the scalability of this instruction set makes special IP easily carry out the function extension.

The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.

The principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于梳状波信号的幅相特性测量方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!