CN106597079B - Method for evaluating amplitude of sine wave of fault indicator - Google Patents
Method for evaluating amplitude of sine wave of fault indicator Download PDFInfo
- Publication number
- CN106597079B CN106597079B CN201611248362.8A CN201611248362A CN106597079B CN 106597079 B CN106597079 B CN 106597079B CN 201611248362 A CN201611248362 A CN 201611248362A CN 106597079 B CN106597079 B CN 106597079B
- Authority
- CN
- China
- Prior art keywords
- sine
- amplitude
- sampling
- signal
- sine wave
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R19/00—Arrangements for measuring currents or voltages or for indicating presence or sign thereof
- G01R19/25—Arrangements for measuring currents or voltages or for indicating presence or sign thereof using digital measurement techniques
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Complex Calculations (AREA)
Abstract
The invention provides a method for evaluating amplitude of sine wave of a fault indicator, which is used for calculating amplitude of current, voltage or sine characteristic signal, and is used for single-cycle 8-point 12-bit AD sampling of the periodic sine characteristic signal; wherein, the sine factor and the cosine factor are integers and are the nth power of 2; the squaring of the amplitude values of the sine wave is obtained by rapidly solving the root using a binary look-up table. The method is based on single-cycle 8-point 12-bit AD sampling, and has the characteristics of small calculation amount, high calculation precision, ultralow operation power consumption and strong real-time performance.
Description
Technical Field
The invention relates to the technical field of fault indicators, in particular to a method for evaluating amplitude of sine waves of a fault indicator.
Background
The fault indicator needs to monitor the current and electric field states of the line in real time in the running line, and the effective value of the measured quantity is calculated to be used as the judgment basis of the line fault. The current and electric field in the circuit are signals with sinusoidal characteristics, harmonic components of other frequency bands are doped, and in reality, the harmonic components outside the 50Hz working frequency are generally not more than 4% of the total electric energy. In the process of evaluating the effective values of current and voltage, the filtering of direct current components with high frequency components and low frequency approximation is required, and the general algorithm in the industry is that the amplitude of fundamental component is calculated by Fourier algorithm and the effective value is obtained by multiplying the fundamental component by constant. The traditional fourier algorithm involves multiplication of sine factor and cosine factor and root operation of amplitude value by evolution, and the operation amount is large. In addition, in the operation, because the sampling value is a positive integer, the operation of the decimal is inevitable but has no practical significance, and the waste of CPU resources is caused. More floating-point number operations directly result in the increase of the CPU operation time, thereby greatly increasing the power consumption during the operation and greatly shortening the operation life of the fault indicator.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method for evaluating the amplitude of the sine wave of the fault indicator, which is based on single-cycle 8-point 12-bit AD sampling and has the characteristics of small calculation amount, high calculation precision, ultralow operation power consumption and strong real-time property.
The invention is realized by the following steps: a method for fault indicator sine wave amplitude evaluation for calculating current, voltage or sine characteristic signal amplitude for periodic sine characteristic signal, single cycle 8 point 12 bit AD sampling; wherein, the sine factor and the cosine factor are integers and are the nth power of 2; the squaring of the amplitude values of the sine wave is obtained by rapidly solving the root using a binary look-up table.
Further, the periodic sinusoidal characteristic signal has the expression ofOrWhere A is the signal amplitude, f is the signal period, A0Is a direct current component; the AD sampling requirement is single-period 8-point 12-bit AD sampling, the sampling data is 12-bit length unsigned integer, the method can rapidly obtain an amplitude value, and a direct-current component is filtered; when the sum of the energy of the external high-order harmonic waves does not exceed 4% of the total energy of the signal, the characteristic of filtering the harmonic waves is achieved.
Furthermore, the sine factor and the cosine factor are amplified by 2mDouble, m ∈ (1,2, 3.); aligning the original signal by the least-tolerance methodThe reduction degree of (c) is fitted to obtain m, so that the multiplication operation does not contain floating point numbers.
Furthermore, the root operation does not call a system library function sqrt (), and the floating point number is converted forcibly, and the rounding operation is not performed on the floating point number; the evolution operation uses a fast table look-up mode, and the table look-up interval is reduced to 0 to 3072 to ensure that the table look-up interval cannot exceed the boundary, thereby reducing the space consumption of the FLASH in the chip; and the table lookup is carried out by bisection method in a subscript positioning mode.
Further, the method further comprises the following steps: after 12-bit AD sampling, the signal of one cycle becomes an array sequence of 8 in size, and is set as a periodic sinusoidal characteristic signal xn,n∈[0,1...7]According to the discrete fourier transform formula:
wherein the formula, k is 1, and when sampling point number was 8, when solving the Fourier change to the fundamental wave sequence promptly, combine euler's formula, can simplify to:
the expression of the amplitude Amp to be solved is:
in the formula, Re represents the real part of a complex number, and Im represents the imaginary part of the complex number;
{1.0000,0.7071,0.0000,-0.7071,-1.0000,-0.7071,-0.0000,0.7071}
{0,0.7071,1.0000,0.7071,0.0000,-0.7071,-1.0000,-0.7071}
enlarge it 2mAnd rounding, wherein the value range of m is from 1 to 16, and the mean square error and the optimal fitting coefficient m of the expanded sequence relative to the original sequence are obtained;
obtaining the optimal fitting coefficient m as 8;
obtaining the size of a table to be looked up for carrying out the evolution operation, obtaining the maximum value of the number before evolution, and having an optimized calculation formula:
WhereinIs a transposed matrix of the sine factors,is a transposed matrix of cosine factors; obtaining a value of maximum amplitude in any case not greater than 2663; and 2663-2048-615<1024, the array size needs 2048+1024 to 3072.
The invention has the following advantages: the invention uses sine factors and cosine factors to compress with ultra-low loss, combines with linear fitting optimization of traditional mathematical unit operation, converts the original floating point number operation with high operand into integer operation with low operand, and can maintain the precision in full range. And the evaluation and evolution mode is improved, and the operation of multiple iterations is removed, so that the method is independent of a library function. The algorithm has the characteristics of small calculation amount, high calculation precision, ultralow operation power consumption and strong real-time performance.
Drawings
The invention will be further described with reference to the following examples with reference to the accompanying drawings.
FIG. 1 is a schematic diagram of the method of the present invention.
Fig. 2 is a schematic diagram of the present invention for determining the optimal fitting coefficient m.
Detailed Description
Referring to fig. 1 and 2, a method for fault indicator sine wave amplitude evaluation for calculating current, voltage or sine characteristic signal amplitude is provided for periodic sine characteristic signal, single cycle 8-point 12-bit AD sampling; wherein, the sine factor and the cosine factor are integers and are the nth power of 2; the squaring of the amplitude values of the sine wave is obtained by rapidly solving the root using a binary look-up table.
Wherein the periodic sinusoidal characteristic signal is expressed asOrWhere A is the signal amplitude, f is the signal period, A0Is a direct current component; the AD sampling requirement is single-period 8-point 12-bit AD sampling, the sampling data is 12-bit length unsigned integer, the method can rapidly obtain an amplitude value, and a direct-current component is filtered; when the sum of the energy of the external high-order harmonic waves does not exceed 4% of the total energy of the signal, the characteristic of filtering the harmonic waves is achieved.
The sine factor and the cosine factor are amplified by 2mDouble, m ∈ (1,2, 3.); and fitting the reduction degree of the original signal by a minimum tolerance method to obtain m, so that the multiplication operation does not contain floating point numbers. Thereby significantly reducing CPU computation.
The squaring operation does not call a system library function sqrt (), and the floating point number is converted forcibly, and the rounding operation is not performed on the floating point number; the evolution operation uses a fast table look-up mode, and the table look-up interval is reduced to 0 to 3072 to ensure that the table look-up interval cannot exceed the boundary, thereby reducing the space consumption of the FLASH in the chip; the table lookup is carried out by a dichotomy quick lookup in a subscript positioning mode, and the maximum calculation amount can be completed by only 12 comparison sentences. The invention obviously reduces the power consumption of the equipment by reducing the operation amount.
In addition, the method further comprises the following steps: after 12-bit AD sampling, the signal of one cycle becomes an array sequence of 8 in size, and is set as a periodic sinusoidal characteristic signal xn,n∈[0,1...7]According to the discrete fourier transform formula:
wherein the formula, k is 1, and when sampling point number was 8, when solving the Fourier change to the fundamental wave sequence promptly, combine euler's formula, can simplify to:
the expression of the amplitude Amp to be solved is:
in the formula, Re represents the real part of a complex number, and Im represents the imaginary part of the complex number;
{1.0000,0.7071,0.0000,-0.7071,-1.0000,-0.7071,-0.0000,0.7071}
{0,0.7071,1.0000,0.7071,0.0000,-0.7071,-1.0000,-0.7071}
enlarge it 2mAnd rounding, wherein the value range of m is from 1 to 16, and the mean square error and the optimal fitting coefficient m of the expanded sequence relative to the original sequence are obtained;
obtaining the optimal fitting coefficient m as 8;
obtaining the size of a table to be looked up for carrying out the evolution operation, obtaining the maximum value of the number before evolution, and having an optimized calculation formula:
wherein s.t represents a constraint value of 0<=xn<4096
WhereinIs a transposed matrix of the sine factors,is a transposed matrix of cosine factors; obtaining a value of maximum amplitude in any case not greater than 2663; and 2663-2048-615<1024, the array size needs 2048+1024 to 3072.
The invention is further illustrated below with reference to a specific embodiment:
the first step is to establish a sine factor array coef _ sin [8] and a cosine factor array coef _ cos [8], wherein the values are uniformly multiplied by 256 and rounded, and the absolute values of the values are sorted.
And writing an evolution table look-up array sqrt _ table [ ], wherein the subscript of the evolution table look-up array sqrt _ table [ ]representsa numerical value after evolution, and the stored numerical value corresponding to the subscript represents the sum of squares of the subscript. Declare it as const type, and at compile time the compiler will automatically place this array on the on-chip flash.
Thirdly, multiplying the numerical values in the sampled 8-point array one by one with sine factors to obtain X1An imaginary part. Multiplying the numerical values in the sampled 8-point array one by one with the cosine factor to obtain X1The real part. When the factor number is 0 during multiplication, the multiplication is not carried out. When the number of the factors is 256, the original sampling point is shifted to the right by 8 bits, and the operation speed is accelerated.
The fourth step, the sum of squares of the real part and the imaginary part is obtained, because:
therefore, the sum of squares is directly shifted to the right by 4 bits, and the value before the square opening is reduced to obtain the value w. And (3) the value w after the right shift is processed by a binary search method, namely:
(1) one pointer tbl is defined to point to the beginning of the lookup table and another pointer p is defined. And defining a logic variable k as a current interval, wherein k is from the head of the table to the tail of the table.
(2) Pointing the pointer p to the middle of the current interval k, and taking out the value to compare with w. And if the two are equal, jumping to (5). And if the value is less than w, jumping to (3). And if the value is larger than w, jumping to (4).
(3) The first half of k is assigned to k and the jump is made to (2).
(4) The second half of k is given k and jumps to (2).
(5) The value of the pointer p, p-tbl at this time is obtained as the square root value.
Although specific embodiments of the invention have been described above, it will be understood by those skilled in the art that the specific embodiments described are illustrative only and are not limiting upon the scope of the invention, and that equivalent modifications and variations can be made by those skilled in the art without departing from the spirit of the invention, which is to be limited only by the appended claims.
Claims (4)
1. A method for fault indicator sine wave amplitude evaluation, characterized by: the method carries out single-period 8-point 12-bit AD sampling on a periodic sinusoidal characteristic signal; after 12-bit AD sampling, the signal of one cycle becomes an array sequence of 8 in size, and is set as a periodic sinusoidal characteristic signal xn,n∈[0,1...7]According to the discrete fourier transform formula:
wherein the formula, k is 1, and when sampling point number was 8, when solving the Fourier change to the fundamental wave sequence promptly, combine euler's formula, can simplify to:
the expression of the amplitude Amp to be solved is:
in the formula, Re represents the real part of a complex number, and Im represents the imaginary part of the complex number;
{1.0000,0.7071,0.0000,-0.7071,-1.0000,-0.7071,-0.0000,0.7071}
{0,0.7071,1.0000,0.7071,0.0000,-0.7071,-1.0000,-0.7071}
expanding the sine and cosine factors by 2mAnd rounding, wherein the value range of m is from 1 to 16, and the mean square error and the optimal fitting coefficient m of the expanded sequence relative to the original sequence are obtained;
obtaining the optimal fitting coefficient m as 8;
obtaining the size of a table required for performing the evolution operation, obtaining the maximum value of the numerical value before evolution, and having an optimized calculation formula:
WhereinIs a transposed matrix of the sine factors,is a transposed matrix of cosine factors; obtaining a value of maximum amplitude in any case not greater than 2663; and 2663-2048-615<1024, so the size required for the array is 2048+1024 — 3072;
the squaring of the amplitude values of the sine wave is obtained by rapidly solving the root using a binary look-up table.
2. A method for fault indicator sine wave amplitude evaluation according to claim 1, characterized by: the periodic sinusoidal characteristic signal has the expression ofOrWhere A is the signal amplitude, f is the signal period, A0Is a direct current component; the AD sampling requirement is single-period 8-point 12-bit AD sampling, the sampling data is 12-bit length unsigned integer, the method can rapidly obtain an amplitude value, and a direct-current component is filtered; when the sum of the energy of the external high-order harmonic waves does not exceed 4% of the total energy of the signal, the characteristic of filtering the harmonic waves is achieved.
3. A method for fault indicator sine wave amplitude evaluation according to claim 1, characterized by: the sine factor and the cosine factor are amplified by 2mDouble, m ∈ (1,2, 3.); and fitting the reduction degree of the original signal by a minimum tolerance method to obtain m, so that the multiplication operation does not contain floating point numbers.
4. A method for fault indicator sine wave amplitude evaluation according to claim 1, characterized by: the squaring operation does not call a system library function sqrt (), and the floating point number is converted forcibly, and the rounding operation is not performed on the floating point number; the evolution operation uses a fast table look-up mode, and the table look-up interval is reduced to 0 to 3072 to ensure that the table look-up interval cannot exceed the boundary, thereby reducing the space consumption of the FLASH in the chip; and the table lookup is carried out by bisection method in a subscript positioning mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611248362.8A CN106597079B (en) | 2016-12-29 | 2016-12-29 | Method for evaluating amplitude of sine wave of fault indicator |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611248362.8A CN106597079B (en) | 2016-12-29 | 2016-12-29 | Method for evaluating amplitude of sine wave of fault indicator |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106597079A CN106597079A (en) | 2017-04-26 |
CN106597079B true CN106597079B (en) | 2020-02-04 |
Family
ID=58603936
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611248362.8A Active CN106597079B (en) | 2016-12-29 | 2016-12-29 | Method for evaluating amplitude of sine wave of fault indicator |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106597079B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102539892A (en) * | 2012-01-16 | 2012-07-04 | 南京磐能电力科技股份有限公司 | Method for obtaining true effective values of AC (alternating current) signals |
CN103149415A (en) * | 2011-12-07 | 2013-06-12 | 中国科学院沈阳自动化研究所 | High precision high frequency sin wave virtual value real-time detection method |
JP2013195222A (en) * | 2012-03-19 | 2013-09-30 | Daihen Corp | Ac signal measuring apparatus |
CN104020350A (en) * | 2014-06-23 | 2014-09-03 | 哈尔滨同为电气股份有限公司 | Voltage fundamental component detection method for overcoming frequency perturbation |
CN105182188A (en) * | 2015-09-30 | 2015-12-23 | 福建奥通迈胜电力科技有限公司 | Low-power-consumption AD data sampling method based on fault indicator |
CN105891585A (en) * | 2016-04-01 | 2016-08-24 | 许继集团有限公司 | Effective value calculating method and device in sine wave frequency slow change process |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101865963B (en) * | 2010-07-08 | 2012-08-22 | 山东电力研究院 | New quick detection method for relay protective device |
JP6065517B2 (en) * | 2012-10-23 | 2017-01-25 | 株式会社ニコン | Fluorescence microscope, fluorescence detection method, and fluorescence detection unit |
CN104330644B (en) * | 2014-10-29 | 2017-05-31 | 广东电网有限责任公司电力科学研究院 | The method and system of sine wave signal amplitude in detection power system |
CN104330623B (en) * | 2014-10-29 | 2017-05-24 | 广东电网有限责任公司电力科学研究院 | Sine wave parameter measuring method and system in electric power system |
CN105372495B (en) * | 2015-12-10 | 2016-11-30 | 广东蓄能发电有限公司 | The frequency of a kind of Frequency sinusoidal wave form data and phasor extraction computational methods |
-
2016
- 2016-12-29 CN CN201611248362.8A patent/CN106597079B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103149415A (en) * | 2011-12-07 | 2013-06-12 | 中国科学院沈阳自动化研究所 | High precision high frequency sin wave virtual value real-time detection method |
CN102539892A (en) * | 2012-01-16 | 2012-07-04 | 南京磐能电力科技股份有限公司 | Method for obtaining true effective values of AC (alternating current) signals |
JP2013195222A (en) * | 2012-03-19 | 2013-09-30 | Daihen Corp | Ac signal measuring apparatus |
CN104020350A (en) * | 2014-06-23 | 2014-09-03 | 哈尔滨同为电气股份有限公司 | Voltage fundamental component detection method for overcoming frequency perturbation |
CN105182188A (en) * | 2015-09-30 | 2015-12-23 | 福建奥通迈胜电力科技有限公司 | Low-power-consumption AD data sampling method based on fault indicator |
CN105891585A (en) * | 2016-04-01 | 2016-08-24 | 许继集团有限公司 | Effective value calculating method and device in sine wave frequency slow change process |
Non-Patent Citations (1)
Title |
---|
直流分量对正弦幅值积分器同步信号检测方法的影响及其抑制方法;杜雄 等;《中国电机工程学报》;20141231;第34卷(第24期);第4084-4091页 * |
Also Published As
Publication number | Publication date |
---|---|
CN106597079A (en) | 2017-04-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102722352B (en) | Booth multiplier | |
CN104598197B (en) | A kind of floating-point inverse and/or inverse square root operation method and its device | |
CN111915003A (en) | Neural network hardware accelerator | |
CN103926595A (en) | Interference signal detection method based on small satellite navigation terminal | |
JP4295777B2 (en) | Fast Fourier transform circuit and fast Fourier transform method | |
CN104022667A (en) | SHEPWM method for three-level inverter | |
CN110187866B (en) | Hyperbolic CORDIC-based logarithmic multiplication computing system and method | |
CN106597079B (en) | Method for evaluating amplitude of sine wave of fault indicator | |
CN103809931A (en) | Design of dedicated high-speed floating point index arithmetic unit | |
CN102566965B (en) | Floating-point number logarithmic operation device with flat errors | |
CN104915559A (en) | Electric equipment determination method and electric equipment determination system | |
Ping-hua et al. | High-speed parallel 32× 32-b multiplier using a radix-16 Booth encoder | |
CN115017732A (en) | Lightning protection analysis simulation step length calculation method, device, equipment and medium | |
Ji et al. | Design of A High Performance Monobit DFT Based on FPGA and 1-Bit Samplers | |
CN111984057A (en) | GPU-based digital NCO high-precision parallel implementation method | |
Aracil et al. | Software acceleration of floating-point multiplication using runtime code generation—Student paper | |
Yan et al. | The Method of Real-Time Data Weighting Operations of CPLD/FPGA in Measurement Systems. | |
CN101178611A (en) | Method and apparatus for realizing logarithmic calculation | |
CN113011119B (en) | Photovoltaic cell multi-parameter extraction method and system based on dimension reduction processing | |
CN205563562U (en) | FFT that can dynamicly dispose adds window device based on FPGA | |
CN107590105A (en) | Towards the computing device and method of nonlinear function | |
CN113659936B (en) | Segmentation point determination method and device for linearization model | |
CN115511047B (en) | Quantification method, device, equipment and medium of Softmax model | |
CN111814107B (en) | Computing system and computing method for realizing reciprocal of square root with high precision | |
Wang et al. | An ultra low-power processor with dynamic regfile configuration |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |