CN103077155A - Computing method for phasor angle of electric system - Google Patents
Computing method for phasor angle of electric system Download PDFInfo
- Publication number
- CN103077155A CN103077155A CN2012105796371A CN201210579637A CN103077155A CN 103077155 A CN103077155 A CN 103077155A CN 2012105796371 A CN2012105796371 A CN 2012105796371A CN 201210579637 A CN201210579637 A CN 201210579637A CN 103077155 A CN103077155 A CN 103077155A
- Authority
- CN
- China
- Prior art keywords
- value
- districts
- tangent
- angle
- temp
- 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.)
- Granted
Links
Images
Landscapes
- Complex Calculations (AREA)
- Electrochromic Elements, Electrophoresis, Or Variable Reflection Or Absorption Elements (AREA)
Abstract
The invention discloses a computing method for a phasor angle of an electric system. The computing method comprises the following steps of: designing an enquiry form according to a tangent value or a cotangent value, increasing the tangent value from 0 to 1 according to the same step length, wherein the results, which are obtained by anti-tangent computation, of step length values form an element of the enquiry form in sequence, the decimal place of the practical value of the element is designed according to precision to be computed for outputting; computing the tangent value according to the real part and the imaginary part of the phasor, computing the cotangent value and taking the absolute value of the cotangent value to obtain a computed result if the tangent value is bigger than 1; and calling the data of the enquiry form and obtaining a practical angle or radian result according to characteristics of eight zones which are obtained by dividing the angle or the corresponding radian value on a complex number plane. The computing method disclosed by the invention can be used for solving contradictions between expense computation and precision computation; when the algorithm is used in the same CPU (Central Processing Unit), the computation time is better than that of a system calling function, and the precision can satisfy the application needs according to the design of the enquiry form.
Description
Technical field
The present invention relates to the computing method of phase measuring angle, relate in particular a kind of computing method of electric system phase measuring angle.
Background technology
The angle of the phasor of electric system is an important observed quantity, and the direction calculating of electric system, impedance computation, judging phase order etc. need to measure in real time its value, and make corresponding control measure according to the variation of its value.The angle computation method that electric system is commonly used, the system function that adopts CPU to provide, comprise arc cosine, inverse sine, arc tangent or arc cotangent, but no matter be above which kind of method, depend on the arithmetic speed of CPU computing time, automation equipment for electric system, the CPU frequency that is used in measurement and control area is limited, for the higher occasion of requirement of real-time, need a kind of easy algorithm of design, solve the contradiction of calculating between cost and the computational accuracy, make it can be easy to realize at the electric system measure and control device, can satisfy again the error requirements on the engineering.
Summary of the invention
In view of this, the invention provides a kind of computing method of electric system phase measuring angle, can solve the contradiction of calculating between cost and the computational accuracy, in same CPU, use this algorithm, be better than the system call function operation time, precision can be according to the demand that the design of enquiry form is satisfied uses.
For solving the problems of the technologies described above, the technical solution used in the present invention is: a kind of computing method of electric system phase measuring angle comprise:
(1) according to tangent or enquiry form of cotangent value design, tangent value is increased to 1 since 0 by identical step-length, each step value pass through the element that arctangent computation result out forms enquiry form in order, the accuracy Design that the actual value of element is calculated as required goes out decimal place output;
(2) according to the real part imaginary part of phasor, calculate tangent value, if tangent value greater than 1, then calculates the cotangent value, and takes absolute value, obtain result of calculation;
(3) call the enquiry form data, by angle or corresponding radian value are divided into eight districts in complex number plane, obtain actual angle or radian result according to the feature in eight districts.
Preferably, the formula of described calculating enquiry form element is:
tbl[n]=arctg(B*n)*K,(0≤n,n≤(B+1)/B);
Tbl[wherein] be enquiry form, the step-length of B for setting, arctg (B*n) result of calculation can be output as angle or radian value as required, and K is the form computational accuracy, and n is the integer since 0 natural increase.
Preferably, described real part imaginary part according to phasor calculates tangent value, if tangent value greater than 1, then calculates the cotangent value, and takes absolute value, obtains result of calculation and is specially:
Make that calculative phasor value is R+jX, computation sequence and formula are as follows:
M=|R/X|*k,(|R|<|X|);
M=|X/R|*k,(|R|>|X|);
B=B*k;
Temp=M/B, (temp rounds);
Ang_temp=tbl[temp]+(M-temp*B)*(tbl[temp+1]-tbl[temp])/B;
Wherein, angle or the radian result of Ang_temp for calculating, M is tangent or the cotangent value less than or equal to 1.
Preferably, describedly by being divided into eight districts in complex number plane, angle or corresponding radian value be specially:
1 district: [0 °, 45 °] or [0,
π/ 4], this moment R 〉=0, X 〉=0, | R| 〉=| X|;
2 districts: [45 °, 90 °] or [
π/ 4,
π/ 2], this moment R 〉=0, X 〉=0, | R|≤| X|;
3 districts: [90 °, 135 °] or [
π/ 2,3
π/ 4], this moment R≤0, X 〉=0, | R|≤| X|;
4 districts: [135 °, 180 °] or [3
π/ 4,
π], this moment R≤0, X 〉=0, | R| 〉=| X|;
5 districts: [180 °, 225 °] or [
π, 5
π/ 4], this moment R≤0, X≤0, | R| 〉=| X|;
6 districts: [225 °, 270 °] or [5
π/ 4,3
π/ 2], this moment R≤0, X≤0, | R|≤| X|;
7 districts: [270 °, 315 °] or [3
π/ 2,7
π/ 4], this moment R 〉=0, X≤0, | R|≤| X|;
8 districts: [315 °, 360 °] or [7
π/ 4,2
π], this moment R 〉=0, X≤0, | R| 〉=| X|.
Can find out from above-mentioned technical scheme, the computing method of electric system phase measuring angle disclosed by the invention, be applicable to all cpu systems of current power system applies, make it not rely on the system call function of CPU, the time that on arithmetic speed, greatly is better than the calling system function, need not to carry out the angle value that complicated calculating just can obtain phasor, can be easy to realize at the electric system measure and control device, can satisfy again the error requirements on the engineering, solve the contradiction of calculating between cost and the computational accuracy.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, the below will do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art, apparently, accompanying drawing in the following describes only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the computing method process flow diagram of a kind of electric system phase measuring angle disclosed by the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is a part of embodiment of the present invention, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
The embodiment of the invention discloses a kind of computing method of electric system phase measuring angle, can solve the contradiction of calculating between cost and the computational accuracy, use this algorithm in same CPU, be better than the system call function operation time, precision can be according to the demand that the design of enquiry form is satisfied uses.
As shown in Figure 1, a kind of computing method of electric system phase measuring angle comprise:
S101, according to enquiry form of tangent or cotangent value design, tangent value is increased to 1 since 0 by identical step-length, each step value pass through the element that arctangent computation result out forms enquiry form in order, the accuracy Design that the actual value of element is calculated as required goes out decimal place output;
S102, according to the real part imaginary part of phasor, calculate tangent value, if tangent value greater than 1, then calculates the cotangent value, and takes absolute value, obtain result of calculation;
S103, call the enquiry form data, by angle or corresponding Circular measure are divided into eight districts in complex number plane, obtain actual angle or radian result according to the feature in eight districts.
Concrete, according to tangent or enquiry form of cotangent value design, with tangent value since 0 by identical step-length B(B<1) increase to 1, each step value pass through the element that result that arc tangent (radian) calculates forms enquiry form in order, the accuracy Design that the actual value of element is calculated as required is 0,1,2,3 ... etc. different decimal place output.
Wherein, calculating enquiry form tbl[] formula of each element is as follows:
tbl[n]=arctg(B*n)*K,(0≤n,n≤(B+1)/B);
Tbl[wherein] be enquiry form, the step-length of B for setting, arctg (B*n) result of calculation can be output as angle or radian value as required, and K is form computational accuracy (0,1,2,3 ... the corresponding K value 1,10,100,1000 of position decimal ...), n is the integer of 0 beginning natural increase.
Enquiry form is pre-designed as required, with B=0.0256, and K=100, element is exported take angle as example, and enquiry form is as follows:
tbl[]={0,147,293,439,585,729,873…}
Real part imaginary part according to phasor calculates tangent value, if tangent value greater than 1, then calculates the cotangent value, and takes absolute value, obtains result of calculation, makes that calculative phasor value is R+jX, specific formula for calculation and being described as follows:
M=|R/X|*k,|R|<|X|);
M=|X/R|*k,|R|>|X|);
B=B*k;
Temp=M/B, (temp rounds);
Ang_temp=tbl[temp]+(M-temp*B)*(tbl[temp+1]-tbl[temp])/B;
Wherein Ang_temp is interim angle or the radian result who calculates, and M is tangent or the cotangent value less than or equal to 1.
Above computing formula in the CPU that supports divide instruction and floating-point operation, can be made as 1 with k, makes it not participate in computing, can carry out simple process as follows in the CPU that does not support divide instruction and floating-point operation:
Set k=10000, press enquiry form and set, at this moment,
B=B*10000=256; (step-length can be set as 2 dark power, makes things convenient for shifting processing)
Temp=M〉〉 8; (adopt right shift instruction to improve arithmetic speed, moving to right 8 is equal to divided by 256)
Ang_temp=tbl[temp]+((M-(temp<<8))*(tbl[temp+1]-tbl[temp]))>>8;
By angle or corresponding radian value are divided into eight districts in complex number plane, difference is as follows:
1 district: [0 °, 45 °] or [0,
π/ 4], this moment R 〉=0, X 〉=0, | R| 〉=| X|;
2 districts: [45 °, 90 °] or [
π/ 4,
π/ 2], this moment R 〉=0, X 〉=0, | R|≤| X|;
3 districts: [90 °, 135 °] or [
π/ 2,3
π/ 4], this moment R≤0, X 〉=0, | R|≤| X|;
4 districts: [135 °, 180 °] or [3
π/ 4,
π], this moment R≤0, X 〉=0, | R| 〉=| X|;
5 districts: [180 °, 225 °] or [
π, 5
π/ 4], this moment R≤0, X≤0, | R| 〉=| X|;
6 districts: [225 °, 270 °] or [5
π/ 4,3
π/ 2], this moment R≤0, X≤0, | R|≤| X|;
7 districts: [270 °, 315 °] or [3
π/ 2,7
π/ 4], this moment R 〉=0, X≤0, | R|≤| X|;
8 districts: [315 °, 360 °] or [7
π/ 4,2
π], this moment R 〉=0, X≤0, | R| 〉=| X|.
According to the feature in eight districts, can calculate by simple logic judgement and signed magnitude arithmetic(al) easily actual angle or the radian value of phasor R+jX.
In the above-described embodiments, the computing method of electric system phase measuring angle disclosed by the invention, be applicable to all cpu systems of current power system applies, make it not rely on the system call function of CPU, the time that greatly is better than the calling system function on arithmetic speed need not to carry out the angle value that complicated calculating just can obtain phasor, can be easy to realize at the electric system measure and control device, can satisfy again the error requirements on the engineering, solve the contradiction of calculating between cost and the computational accuracy.
To the above-mentioned explanation of the disclosed embodiments, make this area professional and technical personnel can realize or use the present invention.Multiple modification to these embodiment will be apparent concerning those skilled in the art, and General Principle as defined herein can be in the situation that do not break away from the spirit or scope of the present invention, in other embodiments realization.Therefore, the present invention will can not be restricted to these embodiment shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.
Claims (4)
1. the computing method of an electric system phase measuring angle is characterized in that, comprising:
(1) according to tangent or enquiry form of cotangent value design, tangent value is increased to 1 since 0 by identical step-length, each step value pass through the element that arctangent computation result out forms enquiry form in order, the accuracy Design that the actual value of element is calculated as required goes out decimal place output;
(2) according to the real part imaginary part of phasor, calculate tangent value, if tangent value greater than 1, then calculates the cotangent value, and takes absolute value, obtain result of calculation;
(3) call the enquiry form data, by angle or corresponding radian value are divided into eight districts in complex number plane, obtain actual angle or radian result according to the feature in eight districts.
2. the computing method of electric system phase measuring angle according to claim 1 is characterized in that, the formula of described calculating enquiry form element is:
tbl[n]=arctg(B*n)*K,(0≤n,n≤(B+1)/B);
Tbl[wherein] be enquiry form, the step-length of B for setting, arctg (B*n) result of calculation can be output as angle or radian value as required, and K is the form computational accuracy, and n is the integer since 0 natural increase.
3. the computing method of electric system phase measuring angle according to claim 2 is characterized in that, described real part imaginary part according to phasor calculates tangent value, if tangent value greater than 1, then calculates the cotangent value, and takes absolute value, obtain result of calculation and are specially:
Make that calculative phasor value is R+jX, computation sequence and formula are as follows:
M=|R/X|*k,(|R|<|X|);
M=|X/R|*k,(|R|>|X|);
B=B*k;
Temp=M/B, (temp rounds);
Ang_temp=tbl[temp]+(M-temp*B)*(tbl[temp+1]-tbl[temp])/B;
Wherein, angle or the radian result of Ang_temp for calculating, M is tangent or the cotangent value less than or equal to 1.
4. the computing method of electric system phase measuring angle according to claim 3 is characterized in that, describedly are specially by angle or corresponding radian value are divided into eight districts in complex number plane:
1 district: [0 °, 45 °] or [0,
π/ 4], this moment R 〉=0, X 〉=0, | R| 〉=| X|;
2 districts: [45 °, 90 °] or [
π/ 4,
π/ 2], this moment R 〉=0, X 〉=0, | R|≤| X|;
3 districts: [90 °, 135 °] or [
π/ 2,3
π/ 4], this moment R≤0, X 〉=0, | R|≤| X|;
4 districts: [135 °, 180 °] or [3
π/ 4,
π], this moment R≤0, X 〉=0, | R| 〉=| X|;
5 districts: [180 °, 225 °] or [
π, 5
π/ 4], this moment R≤0, X≤0, | R| 〉=| X|;
6 districts: [225 °, 270 °] or [5
π/ 4,3
π/ 2], this moment R≤0, X≤0, | R|≤| X|;
7 districts: [270 °, 315 °] or [3
π/ 2,7
π/ 4], this moment R 〉=0, X≤0, | R|≤| X|;
8 districts: [315 °, 360 °] or [7
π/ 4,2
π], this moment R 〉=0, X≤0, | R| 〉=| X|.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210579637.1A CN103077155B (en) | 2012-12-27 | 2012-12-27 | A kind of computational methods of phasor angle of electric system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210579637.1A CN103077155B (en) | 2012-12-27 | 2012-12-27 | A kind of computational methods of phasor angle of electric system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103077155A true CN103077155A (en) | 2013-05-01 |
CN103077155B CN103077155B (en) | 2016-07-06 |
Family
ID=48153686
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210579637.1A Active CN103077155B (en) | 2012-12-27 | 2012-12-27 | A kind of computational methods of phasor angle of electric system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103077155B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018040726A1 (en) * | 2016-08-31 | 2018-03-08 | 深圳市中兴微电子技术有限公司 | Method and device for obtaining angle-related value, and computer storage medium |
CN111475773A (en) * | 2020-03-30 | 2020-07-31 | 南京国电南自电网自动化有限公司 | Rational fitting-based complex modulus and phase angle calculation method, device and system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011244537A (en) * | 2010-05-14 | 2011-12-01 | Fuji Electric Co Ltd | Controller of power converter |
CN102593801A (en) * | 2011-12-30 | 2012-07-18 | 天津大学 | Split-phase differential protection method based on scalar product brake criterion normalization |
-
2012
- 2012-12-27 CN CN201210579637.1A patent/CN103077155B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011244537A (en) * | 2010-05-14 | 2011-12-01 | Fuji Electric Co Ltd | Controller of power converter |
CN102593801A (en) * | 2011-12-30 | 2012-07-18 | 天津大学 | Split-phase differential protection method based on scalar product brake criterion normalization |
Non-Patent Citations (1)
Title |
---|
黄云志等: "一种提高相角计算精度的方法", 《合肥工业大学学报(自然科学版)》, vol. 23, no. 3, 30 June 2000 (2000-06-30), pages 314 - 317 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018040726A1 (en) * | 2016-08-31 | 2018-03-08 | 深圳市中兴微电子技术有限公司 | Method and device for obtaining angle-related value, and computer storage medium |
CN107783756A (en) * | 2016-08-31 | 2018-03-09 | 深圳市中兴微电子技术有限公司 | A kind of method and apparatus for obtaining angle correlation |
CN111475773A (en) * | 2020-03-30 | 2020-07-31 | 南京国电南自电网自动化有限公司 | Rational fitting-based complex modulus and phase angle calculation method, device and system |
CN111475773B (en) * | 2020-03-30 | 2023-12-19 | 南京国电南自电网自动化有限公司 | Complex modulus value and phase angle calculation method, device and system based on rational fitting |
Also Published As
Publication number | Publication date |
---|---|
CN103077155B (en) | 2016-07-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102073472B (en) | Trigonometric function CORDIC iteration operation coprocessor and operation processing method thereof | |
CN107863913B (en) | A kind of coding/decoding method and system of rotary transformer | |
CN103516175B (en) | A kind of three-phase voltage vector space positions determination methods | |
CN108982944A (en) | Current measuring method, device and equipment for flat conductor and storage medium | |
CN103077155A (en) | Computing method for phasor angle of electric system | |
CN102200544B (en) | Total electricity accumulation method of the intelligent electric meter of bidirectional measuring can be realized | |
CN102799412A (en) | CORDIC (coordinate rotation digital computer) accelerator based on parallel pipeline design | |
CN104536720B (en) | The measuring method and system of angle measurement trigonometric function value based on FPGA | |
JP4757328B2 (en) | Inverse tangent calculation device and inverse tangent calculation program | |
CN102540136B (en) | Method and device for quickly correcting phase error of energy meter | |
CN103324603B (en) | A kind of Interpolating transform method of different sampling rate | |
CN104809297A (en) | Electromagnetic force density transferring method used among special-shaped grids in magnetic field-structure field coupling calculation | |
CN102341673B (en) | Assembly and method for determining angular position | |
CN105356795A (en) | System and method for acquiring motor speed feedback signal | |
CN208834289U (en) | A kind of trigonometric computing circuit | |
CN108759644B (en) | Moving distance detection method and device and storage medium | |
CN108507459B (en) | Method for measuring signal angle of synchro | |
CN103134941B (en) | The smoothing processing method of display instrument panel indicators turn | |
CN113204892B (en) | Centroid trajectory generation method and device, computer readable storage medium and robot | |
JP2015078863A (en) | Interpolation method of encoder, and interpolation device | |
JPS5979114A (en) | Detector for absolute line position | |
CN203964927U (en) | Multi-turn absolute value encoder | |
CN106227988A (en) | A kind of relative error calculation optimization method | |
CN202372137U (en) | Angle sensor demodulation structure on basis of coherent demodulation technology | |
WO2021082036A1 (en) | Power system frequency measurement method, bus voltage correction method and devices |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |