CN107783756A - A kind of method and apparatus for obtaining angle correlation - Google Patents

A kind of method and apparatus for obtaining angle correlation Download PDF

Info

Publication number
CN107783756A
CN107783756A CN201610793698.6A CN201610793698A CN107783756A CN 107783756 A CN107783756 A CN 107783756A CN 201610793698 A CN201610793698 A CN 201610793698A CN 107783756 A CN107783756 A CN 107783756A
Authority
CN
China
Prior art keywords
angle
addressing
trigonometric function
function value
addressing view
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.)
Pending
Application number
CN201610793698.6A
Other languages
Chinese (zh)
Inventor
刘振军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sanechips Technology Co Ltd
Shenzhen ZTE Microelectronics Technology Co Ltd
Original Assignee
Shenzhen ZTE Microelectronics Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen ZTE Microelectronics Technology Co Ltd filed Critical Shenzhen ZTE Microelectronics Technology Co Ltd
Priority to CN201610793698.6A priority Critical patent/CN107783756A/en
Priority to PCT/CN2017/091463 priority patent/WO2018040726A1/en
Publication of CN107783756A publication Critical patent/CN107783756A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/544Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices for evaluating functions by calculation
    • G06F7/548Trigonometric functions; Co-ordinate transformations

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of method for obtaining angle correlation, trigonometric function value corresponding to each addressing view in predetermined angle region;It is determined that addressing view corresponding to inquiry angle, according to the addressing view, obtains the trigonometric function value of the addressing view, and determine the coordinates regional belonging to the inquiry angle;The corresponding relation of the trigonometric function value and the trigonometric function value of the addressing view of the inquiry angle is determined according to the coordinates regional;According to the corresponding relation of determination and the trigonometric function value of the addressing view, the trigonometric function value for inquiring about angle is determined.The invention also discloses a kind of device for obtaining angle correlation.

Description

A kind of method and apparatus for obtaining angle correlation
Technical field
The present invention relates to IC design field, more particularly to a kind of method and apparatus for obtaining angle correlation.
Background technology
At present, the trigonometric function value of angle is calculated in on-chip system (SoC, System on Chip) can typically use three kinds Method:
First, trigonometric function value is calculated using software;Can consume in this way very long central processing unit (CPU, Central Processing Unit) time, CPU load is increased, has dragged down the operation efficiency of system;For real-time For the high system of control accuracy that is high and needing, this can make CPU be difficult to respond other things, and general trigonometric function is to want Frequently calculate.
2nd, (Cordic) algorithm is calculated using Coordinate Rotation Digital;The algorithm needs loop iteration, no matter using software also It is to be realized using hardware, is required to consume the longer calculating time;Cordic algorithms calculate trigonometric function, it is desirable to improve and calculate Precision, it is necessary to improve the number of iteration, this just increases the time of computing, and Cordic algorithms calculate ten to low-angle in itself Divide inaccuracy, there is certain limitation.
3rd, trigonometric function is calculated by building analog circuit;Make to calculate in artificial circuit part in this way and complete Afterwards, data are passed into numerical portion by analog to digital conversion circuit to handle;The operational precision of analog circuit is not easy to ensure, simulated Conversion between numeral can also lose certain precision, and meeting extra circuits, increase SoC areas, power consumption also can Increase therewith;And this method is higher to the technical requirements of board design personnel, to be proficient in Analog Circuit Design, go back GPRS Mathematical modeling, design difficulty are larger.
In the fields such as Motor Control Field, image processing field, navigator fix, all there is very high want to the efficiency of calculating Ask;Such as Motor Control Field, the more short number that more controlled motors can be just obtained within the unit interval of calculating process, so With regard to motor can be made to turn more steady;Navigator fix field for another example, when being positioned to the automobile run at high speed, calculating when Between it is shorter, obtain that the number of automobile position is more, and locating effect is better.
Therefore, processor operand how is reduced, shortens operation time, the quick trigonometric function value for determining angle, is met Different application environment, it is urgent problem to be solved.
The content of the invention
In view of this, the embodiment of the present invention it is expected to provide a kind of method and apparatus for obtaining angle correlation, can be at reduction Device operand is managed, shortens operation time, the quick trigonometric function value for determining angle, meets different application environment.
To reach above-mentioned purpose, the technical proposal of the invention is realized in this way:
The embodiments of the invention provide a kind of method for obtaining angle correlation, methods described includes:Predetermined angle region Trigonometric function value corresponding to interior each addressing view;Methods described also includes:
It is determined that addressing view corresponding to inquiry angle, according to the addressing view, obtains the triangle letter of the addressing view Numerical value, and determine the coordinates regional belonging to the inquiry angle;
The trigonometric function of the trigonometric function value and the addressing view of the inquiry angle is determined according to the coordinates regional The corresponding relation of value;According to the corresponding relation of determination and the trigonometric function value of the addressing view, the inquiry is determined The trigonometric function value of angle.
In such scheme, trigonometric function value corresponding to each addressing view in predetermined angle region, including:In advance will be default Angular regions are divided into more than one addressing view, and determine trigonometric function value corresponding to each addressing view.
In such scheme, trigonometric function value corresponding to each addressing view in the angular regions, including:
0 arrives sine function corresponding to each addressing view in pi/2 region;And/or
0 arrives cosine function value corresponding to each addressing view in pi/2 region;And/or
Tan value corresponding to each addressing view in 0 to π/4 regions;And/or
Cotangent value corresponding to each addressing view in 0 to π/4 regions.
It is described to determine to inquire about addressing view corresponding to angle in such scheme, including;
According to trigonometric function relation, corresponding angle of the inquiry angle in the angular regions is determined;
By the addressing view minimum with the corresponding angle difference absolute value, it is defined as addressing angle corresponding to the inquiry angle Degree.
The embodiment of the present invention additionally provides a kind of device for obtaining angle correlation, and described device includes:Setup module, One determining module and the second determining module;Wherein,
The setup module, for trigonometric function value corresponding to each addressing view in predetermined angle region;
First determining module, for determining addressing view corresponding to inquiry angle, according to the addressing view, obtain The trigonometric function value of the addressing view, and determine the coordinates regional belonging to the inquiry angle;
Second determining module, for determining trigonometric function value and the institute of the inquiry angle according to the coordinates regional State the corresponding relation of the trigonometric function value of addressing view;According to the three of the corresponding relation of determination and the addressing view Angle function value, determine the trigonometric function value of the inquiry angle.
In such scheme, the setup module, it is specifically used for:Predetermined angle region is divided into more than one addressing in advance Angle, and determine trigonometric function value corresponding to each addressing view.
In such scheme, trigonometric function value corresponding to each addressing view in the angular regions, including:
0 arrives sine function corresponding to each addressing view in pi/2 region;And/or
0 arrives cosine function value corresponding to each addressing view in pi/2 region;And/or
Tan value corresponding to each addressing view in 0 to π/4 regions;And/or
Cotangent value corresponding to each addressing view in 0 to π/4 regions.
In such scheme, first determining module, it is specifically used for:
According to trigonometric function relation, corresponding angle of the inquiry angle in the angular regions is determined
By the addressing view minimum with the corresponding angle difference absolute value, it is defined as addressing angle corresponding to the inquiry angle Degree.
The method and apparatus for the acquisition angle correlation that the embodiment of the present invention is provided, in predetermined angle region each addressing angle Trigonometric function value corresponding to degree;It is determined that addressing view corresponding to inquiry angle, according to the addressing view, obtains the addressing angle The trigonometric function value of degree, and determine the coordinates regional belonging to the inquiry angle;The inquiry is determined according to the coordinates regional The corresponding relation of the trigonometric function value of angle and the trigonometric function value of the addressing view;According to the corresponding relation of determination, And the trigonometric function value of the addressing view, determine the trigonometric function value for inquiring about angle.In this way, directly pass through angle Conversion and table lookup operation, the computing of complexity is needed not move through, can quickly determine the trigonometric function value of angle, reduce processor computing Amount, shortens operation time, meets different application environment, and application is wider.
Brief description of the drawings
Fig. 1 is the schematic flow sheet for the method that the embodiment of the present invention obtains angle correlation;
Fig. 2 is the tracks of line voltage schematic diagram of the embodiment of the present invention;
Fig. 3 is trigonometric function value storage form schematic diagram of the embodiment of the present invention;
Fig. 4 is tan of the embodiment of the present invention and cotangent curve synoptic diagram;
Fig. 5 is the methodological function block diagram and time diagram that the embodiment of the present invention obtains angle correlation;
Fig. 6 is the composition structural representation for the device that the embodiment of the present invention obtains angle correlation.
Embodiment
In the embodiment of the present invention, trigonometric function value corresponding to each addressing view in predetermined angle region;It is determined that inquiry angle Corresponding addressing view, according to the addressing view, the trigonometric function value of the addressing view is obtained, and determine the inquiry angle Coordinates regional belonging to degree;The trigonometric function value of the inquiry angle and the addressing view are determined according to the coordinates regional The corresponding relation of trigonometric function value;According to the corresponding relation of determination and the trigonometric function value of the addressing view, it is determined that The trigonometric function value of the inquiry angle.
With reference to embodiment, the present invention is further described in more detail.
The method provided in an embodiment of the present invention for obtaining angle correlation, as shown in figure 1, methods described includes:
Step 101:Trigonometric function value corresponding to each addressing view in predetermined angle region;
According to trigonometric function mathematical principle, the trigonometric function value of any angle can be by the triangle in the range of special angle Functional value converts.SIN function as shown in Figure 2, if it is known that in the range of 0~pi/2 each angle sine function, then Other evaluation angles can find corresponding angle in 0~pi/2 scope, and the sine value of evaluation angle is exactly the corresponding angles The sine function of degree or its value of the inverted;Similarly, cosine function equally can be according to more than each angle in the range of 0~pi/2 String functional value determines the cosine function value of other angles;For tan and cotangent, it is only necessary to take the scope of 0~π/4 Interior tan value, then the tan of other all number of degrees and cotangent are exactly the positive cotangent of the corresponding angle of 0~π/4 Value or its negated or the simple operation such as inverted after obtained value;Wherein, π is the Circular measure form of 180 ° of angle system;
Here it is possible to predefine angular regions and addressing view, and each addressing angle is determined using instruments such as computers Trigonometric function value corresponding to degree, trigonometric function value table is established, and trigonometric function value table storage is arrived to SoC read-only storage In the memory such as (ROM, Read Only Memory), flash memory, each addressing view can correspond respectively to a storage address, The trigonometric function value of each addressing view is stored to addressing view and corresponds to storage address, for follow-up use of tabling look-up;Wherein it is possible to 0~pi/2 scope is defined as to the predetermined angle region of SIN function and cosine function, the scope of 0~π/4 is defined as tan With the predetermined angle region of cotangent;After determining the predetermined angle region, it may be determined that each in predetermined angle region The trigonometric function value of angle, and all angles in predetermined angle region are defined as into addressing view, can be with follow-up table lookup operation Directly search the addressing view;Wherein, the addressing view can be corresponded to after the predetermined angle region is carried out into decile The angle of each Along ent or the angle taken according to demand;The number in the predetermined angle region point is more, then subsequently The trigonometric function value found is more accurate;The form of trigonometric function value storage in memory can be as shown in Figure 3.
In practical application, the predetermined angle zone leveling is divided into several pieces, point number more at most find three Angle function value is more accurate, and trigonometric function value corresponding to each addressing view is stored in SoC memory, makes for follow-up table look-up With.
Step 102:It is determined that addressing view corresponding to inquiry angle, according to the addressing view, obtains the addressing view Trigonometric function value, and determine it is described inquiry angle belonging to coordinates regional;
Here it is possible to the addressing view according to corresponding to trigonometric function relation determines inquiry angle;Triangle in memory The trigonometric function value of addressing view corresponding to inquiry angle is checked in function values;Here it is possible to first determine the inquiry angle Addressing view corresponding to degree, the trigonometric function value of the addressing view is obtained in storage address corresponding to addressing view;
According to trigonometric function relation, each addressing view pair in the trigonometric function value of the angle and the predetermined angle region The trigonometric function value answered has a simple mathematical operation relation;Wherein, trigonometric function relation can use expression formula (1)~ (13) represent:
Wherein, θ represents inquiry angle;By taking expression formula (2) as an example, angle of the inquiry angle, θ between [pi/2, π], inquiry π-θ sine function is consistent in the range of the sine function and 0~pi/2 of angle, θ, and therefore, π-θ is corresponding to inquiry angle, θs Addressing view;
Angle, θ and the relation of corresponding addressing view are inquired about, can be as shown in table 1;Inquiry angle pair can be determined according to table 1 The addressing view answered;And the trigonometric function value of addressing view is checked in memory;
Table 1
The trigonometric function value and the relation of the trigonometric function value of corresponding addressing view for inquiring about angle can be according to inquiry angles The coordinates regional at place determines, it is thus necessary to determine that the coordinates regional of inquiry angle;Here, the coordinates regional is in sine Can be four quadrants in plane coordinates axle in function and cosine function;The coordinates regional is in tan and cotangent In can be with self-defined [0, π/4] for first quartile, [π/4, pi/2] is the second quadrant, and [- pi/2 ,-π/4] are third quadrant, [- π/ 4,0] it is fourth quadrant;Here it is possible to the coordinates regional where the inquiry angle is determined after getting inquiry angle;Such as This, as shown in table 2, can determine the trigonometric function value of inquiry angle and corresponding addressing angle by coordinates regional where inquiring about angle The relation of the trigonometric function value of degree;
Table 2
For the angle in the range of table 1 or table 2, SIN function and cosine function can be by adding and subtracting one or more Angular range is restricted in the range of table 1 or table 2 by the π of cycle 2;The week of cotangent shown in tan and Fig. 4 b shown in Fig. 4 a Phase is π, therefore, tan and cotangent can by add and subtract one or more cycles π by angular range be restricted to table 1 or In the range of table 2;
In practical application, an inquiry angle processing unit can be set, first sought according to corresponding to table 1 determines inquiry angle Location angle, and obtain the trigonometric function value of the addressing view by wherein being tabled look-up in storage;Query function is being determined according to table 2 Coordinates regional;And the trigonometric function value of addressing view and coordinates regional are sent to subsequent cell and are further processed.
Step 103:The trigonometric function value of the inquiry angle and the triangle of addressing view are determined according to the coordinates regional The corresponding relation of functional value;According to the corresponding relation of determination and the trigonometric function value of the addressing view, it is determined that described Inquire about the trigonometric function value of angle;
Here it is possible to the coordinates regional according to belonging to the inquiry angle of acquisition, and sought corresponding to the inquiry angle The trigonometric function value of location angle, the trigonometric function value of the inquiry angle and the triangle letter of addressing view are directly checked in table 2 The relation of numerical value, the trigonometric function value of the inquiry angle can be directly obtained by simple operation;Such as inquire about π/4 of angle 3 just During string functional value, determine that the addressing view of inquiry angle is π/4 according to table 2 first, 3 π/4 belong to the second quadrant;According to true in advance The sine function of fixed addressing view π/4 isThen it can determine to inquire about angle in the second quadrant according to table 2, it is described The sine function of inquiry angle is equal with the sine function of addressing view, and therefore, the SIN function for inquiring about angle is valueCotangent can be obtained by the inverse of tan.
Further, due in practical application addressing view be discrete, in this way, can run into inquiry angle in predetermined angle Situation of the corresponding angle among two addressing views in region;At this moment, it is immediate can to take and inquire about angle corresponding angle Addressing view is as addressing view corresponding to the inquiry angle;The poor exhausted of the corresponding angle and addressing view can be calculated To value, addressing view corresponding to least absolute value is defined as the addressing view for inquiring about angle;Such as by predetermined angle region [0, pi/2] is divided into 512 parts, and inquiry angle is π/6, then, π/6 are in table between 170 π/1024 and 171 π/1024, i.e., There is no angle value corresponding to π/6, then the sine value of a close angle value, i.e. sine corresponding to 171 π/1024 can only be taken Value, i.e. sin (π/6) ≈ sin (171 π/1024).
During the entirely trigonometric function value of inquiry angle, only with tabling look-up and some simple calculations and sentence Disconnected process, it is not related to the trigonometric function algorithm of complexity;So, the computing load of processor is reduced, reduces processor fortune Calculation amount, shorten operation time, can faster obtain the trigonometric function value of inquiry angle.
Good effect caused by the present invention is described in further detail with reference to specific example.
Fig. 5 (a) and Fig. 5 (b) respectively obtains the function logic frame chart of angle correlation and corresponding time diagram, work( Energy logic includes 3 parts:Memory, inquire about the trigonometric function processing unit of angle processing unit and addressing view;Wherein, store Device is used to store trigonometric function value corresponding to each addressing view;Inquiry angle processing unit is used to determine to seek corresponding to inquiry angle The coordinates regional of location angle and inquiry angle;The trigonometric function processing unit of addressing view is used to be sought according to corresponding to inquiry angle The trigonometric function value of location angle and the coordinates regional of inquiry angle determine the trigonometric function value of inquiry angle;
In timing diagram, this signal of RD_EN is the enable signal for showing to read memory;General memory, such as ROM, read Speed is very fast;Other logics in whole block diagram, also it is only that angle signal is changed, many clock weeks will not be consumed Phase, therefore, this method can obtain trigonometric function value quickly.
For example during inquiry SIN function, if inquiry angle is 7 π/6, inquiry angle processing unit determines coordinate area first Domain is third quadrant, and addressing view is 7 π/6- π=π/6;The trigonometric function processing unit of addressing view determines the three of inquiry angle Angle function value should be-sin (π/6)=- 0.5.
The device provided in an embodiment of the present invention for obtaining angle correlation, as shown in fig. 6, the acquisition angle correlation Device includes:Setup module 61, the first determining module 62 and the second determining module 63;Wherein,
The setup module 61, for trigonometric function value corresponding to each addressing view in predetermined angle region;
According to trigonometric function mathematical principle, the trigonometric function value of any angle can be by the triangle in the range of special angle Functional value converts.SIN function as shown in Figure 2, if it is known that in the range of 0~pi/2 each angle sine function, then Other evaluation angles can find corresponding angle in 0~pi/2 scope, and the sine value of evaluation angle is exactly the corresponding angles The sine function of degree or its value of the inverted;Similarly, cosine function equally can be according to more than each angle in the range of 0~pi/2 String functional value determines the cosine function value of other angles;For tan and cotangent, it is only necessary to take the scope of 0~π/4 Interior tan value, then the tan of other all number of degrees and cotangent are exactly the positive cotangent of the corresponding angle of 0~π/4 Value or its negated or the simple operation such as inverted after obtained value;Wherein, π is the Circular measure form of 180 ° of angle system;
Here it is possible to predefine angular regions and addressing view, and each addressing angle is determined using instruments such as computers Trigonometric function value corresponding to degree, trigonometric function value table is established, and SoC ROM, flash memory etc. are arrived into trigonometric function value table storage In memory, the trigonometric function value of each addressing view can correspond respectively to a storage address, for follow-up use of tabling look-up;Its In, 0~pi/2 scope can be defined as to the predetermined angle region of SIN function and cosine function, the scope of 0~π/4 is defined as The predetermined angle region of tan and cotangent;After determining the predetermined angle region, it may be determined that in predetermined angle area The trigonometric function value of all angles in domain, and all angles in predetermined angle region are defined as addressing view, subsequently table look-up behaviour The addressing view can be directly searched in work;Wherein, the addressing view can be carried out the predetermined angle region etc. The angle for corresponding to the angle of each Along ent after point or taking according to demand;The number in the predetermined angle region point is got over More, then the trigonometric function value subsequently found is more accurate;The form of trigonometric function value storage in memory can be such as Fig. 3 institutes Show.
In practical application, the predetermined angle zone leveling is divided into several pieces, point number more at most find three Angle function value is more accurate, and trigonometric function value corresponding to each addressing view is stored in SoC memory, makes for follow-up table look-up With.
First determining module 62, for addressing view corresponding to determination inquiry angle, according to the addressing view, obtain The trigonometric function value of the addressing view is taken, and determines the coordinates regional belonging to the inquiry angle;
Here it is possible to the addressing view according to corresponding to trigonometric function relation determines inquiry angle;Triangle in memory The trigonometric function value of addressing view corresponding to inquiry angle is checked in function values;Here it is possible to first determine the inquiry angle Addressing view corresponding to degree, the trigonometric function value of the addressing view is obtained in storage address corresponding to addressing view;
According to trigonometric function relation, each addressing view pair in the trigonometric function value of the angle and the predetermined angle region The trigonometric function value answered has a simple mathematical operation relation;Wherein, trigonometric function relation can use expression formula (1)~ (13) represent;Wherein, θ represents inquiry angle;By taking expression formula (2) as an example, angle of the inquiry angle, θ between [pi/2, π], inquiry π-θ sine function is consistent in the range of the sine function and 0~pi/2 of angle, θ, and therefore, π-θ is corresponding to inquiry angle, θs Addressing view;
Angle, θ and the relation of corresponding addressing view are inquired about, can be as shown in table 1;Inquiry angle pair can be determined according to table 1 The addressing view answered;And the trigonometric function value of addressing view is checked in memory;Inquire about angle trigonometric function value with it is corresponding The relation of the trigonometric function value of addressing view can determine according to the coordinates regional where inquiry angle;, it is thus necessary to determine that Inquire about the coordinates regional of angle;Here, the coordinates regional can be in plane coordinates axle in SIN function and cosine function Four quadrants;The coordinates regional in tan and cotangent can with self-defined [0, π/4] for first quartile, [π/ 4, pi/2] it is the second quadrant, [- pi/2 ,-π/4] are third quadrant, and [- π/4,0] is fourth quadrant;Here it is possible to looked into getting The coordinates regional inquired about where angle is determined after asking angle.In this way, as shown in table 2, it can be sat by inquiring about where angle Mark region and determine the trigonometric function value of inquiry angle and the relation of the trigonometric function value of corresponding addressing view;
For the angle in the range of table 1 or table 2, SIN function and cosine function can be by adding and subtracting one or more Angular range is restricted in the range of table 1 or table 2 by the π of cycle 2;The week of cotangent shown in tan and Fig. 4 b shown in Fig. 4 a Phase is π, therefore, tan and cotangent can by add and subtract one or more cycles π by angular range be restricted to table 1 or In the range of table 2;
In practical application, an inquiry angle processing unit can be set, first sought according to corresponding to table 1 determines inquiry angle Location angle, and obtain the trigonometric function value of the addressing view by wherein being tabled look-up in storage;Query function is being determined according to table 2 Coordinates regional;And the trigonometric function value of addressing view and coordinates regional are sent to subsequent cell and are further processed.
Second determining module 63, trigonometric function value and the addressing of the inquiry angle are determined according to the coordinates regional The corresponding relation of the trigonometric function value of angle;According to addressing corresponding to the corresponding relation of determination and the inquiry angle The trigonometric function value of angle, determine the trigonometric function value of the inquiry angle;
Here it is possible to the coordinates regional according to belonging to the inquiry angle of acquisition, and sought corresponding to the inquiry angle The trigonometric function value of location angle, the trigonometric function value of the inquiry angle and the triangle letter of addressing view are directly checked in table 2 The relation of numerical value, the trigonometric function value of the inquiry angle can be directly obtained by simple operation;Such as inquire about π/4 of angle 3 just During string functional value, determine that the addressing view of inquiry angle is π/4 according to table 2 first, 3 π/4 belong to the second quadrant;According to true in advance The sine function of fixed addressing view π/4 isThen it can determine to inquire about angle in the second quadrant according to table 2, it is described The sine function of inquiry angle is equal with the sine function of addressing view, and therefore, the sine function for inquiring about angle isCotangent can be obtained by the inverse of tan.
Further, due in practical application addressing view be discrete, in this way, can run into inquiry angle in predetermined angle Situation of the corresponding angle among two addressing views in region;At this moment, it is immediate can to take and inquire about angle corresponding angle Addressing view is as addressing view corresponding to the inquiry angle;The poor exhausted of the corresponding angle and addressing view can be calculated To value, addressing view corresponding to least absolute value is defined as the addressing view for inquiring about angle;Such as by predetermined angle region [0, pi/2] is divided into 512 parts, and inquiry angle is π/6, then, π/6 are in table between 170 π/1024 and 171 π/1024, i.e., There is no angle value corresponding to π/6, then the sine value of a close angle value, i.e. sine corresponding to 171 π/1024 can only be taken Value, i.e. sin (π/6) ≈ sin (171 π/1024).
During the entirely trigonometric function value of inquiry angle, only with tabling look-up and some simple calculations and sentence Disconnected process, it is not related to the trigonometric function algorithm of complexity;So, the computing load of processor is reduced, reduces processor fortune Calculation amount, shorten operation time, can faster obtain the trigonometric function value of inquiry angle.
In actual applications, the setup module 61, the first determining module 62 and the second determining module 63 can be by integrating Processor or hardware logic of circuit chip etc. are realized.
Described above, only highly preferred embodiment of the present invention is not intended to limit the scope of the present invention, it is all All any modification, equivalent and improvement made within the spirit and principles in the present invention etc., it should be included in the protection of the present invention Within the scope of.

Claims (8)

  1. A kind of 1. method for obtaining angle correlation, it is characterised in that methods described includes:Angle is respectively addressed in predetermined angle region Trigonometric function value corresponding to degree;Methods described also includes:
    It is determined that addressing view corresponding to inquiry angle, according to the addressing view, obtains the trigonometric function value of the addressing view, And determine the coordinates regional belonging to the inquiry angle;
    The trigonometric function value and the trigonometric function value of the addressing view of the inquiry angle are determined according to the coordinates regional Corresponding relation;According to the corresponding relation of determination and the trigonometric function value of the addressing view, the inquiry angle is determined Trigonometric function value.
  2. 2. according to the method for claim 1, it is characterised in that triangle corresponding to each addressing view in predetermined angle region Functional value, including:Predetermined angle region is divided into more than one addressing view in advance, and determines that each addressing view is corresponding Trigonometric function value.
  3. 3. method according to claim 1 or 2, it is characterised in that in the angular regions three corresponding to each addressing view Angle function value, including:
    0 arrives sine function corresponding to each addressing view in pi/2 region;And/or
    0 arrives cosine function value corresponding to each addressing view in pi/2 region;And/or
    Tan value corresponding to each addressing view in 0 to π/4 regions;And/or
    Cotangent value corresponding to each addressing view in 0 to π/4 regions.
  4. 4. according to the method for claim 1, it is characterised in that it is described to determine to inquire about addressing view corresponding to angle, including;
    According to trigonometric function relation, corresponding angle of the inquiry angle in the angular regions is determined;
    By the addressing view minimum with the corresponding angle difference absolute value, it is defined as addressing view corresponding to the inquiry angle.
  5. 5. a kind of device for obtaining angle correlation, it is characterised in that described device includes:Setup module, the first determining module With the second determining module;Wherein,
    The setup module, for trigonometric function value corresponding to each addressing view in predetermined angle region;
    First determining module, for determining addressing view corresponding to inquiry angle, according to the addressing view, described in acquisition The trigonometric function value of addressing view, and determine the coordinates regional belonging to the inquiry angle;
    Second determining module, for determining that the trigonometric function value of the inquiry angle is sought with described according to the coordinates regional The corresponding relation of the trigonometric function value of location angle;According to the corresponding relation of determination and the triangle letter of the addressing view Numerical value, determine the trigonometric function value of the inquiry angle.
  6. 6. device according to claim 5, it is characterised in that the setup module, be specifically used for:In advance by predetermined angle Region is divided into more than one addressing view, and determines trigonometric function value corresponding to each addressing view.
  7. 7. the device according to claim 5 or 6, it is characterised in that in the angular regions three corresponding to each addressing view Angle function value, including:
    0 arrives sine function corresponding to each addressing view in pi/2 region;And/or
    0 arrives cosine function value corresponding to each addressing view in pi/2 region;And/or
    Tan value corresponding to each addressing view in 0 to π/4 regions;And/or
    Cotangent value corresponding to each addressing view in 0 to π/4 regions.
  8. 8. device according to claim 5, it is characterised in that first determining module, be specifically used for:
    According to trigonometric function relation, corresponding angle of the inquiry angle in the angular regions is determined
    By the addressing view minimum with the corresponding angle difference absolute value, it is defined as addressing view corresponding to the inquiry angle.
CN201610793698.6A 2016-08-31 2016-08-31 A kind of method and apparatus for obtaining angle correlation Pending CN107783756A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610793698.6A CN107783756A (en) 2016-08-31 2016-08-31 A kind of method and apparatus for obtaining angle correlation
PCT/CN2017/091463 WO2018040726A1 (en) 2016-08-31 2017-07-03 Method and device for obtaining angle-related value, and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610793698.6A CN107783756A (en) 2016-08-31 2016-08-31 A kind of method and apparatus for obtaining angle correlation

Publications (1)

Publication Number Publication Date
CN107783756A true CN107783756A (en) 2018-03-09

Family

ID=61299920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610793698.6A Pending CN107783756A (en) 2016-08-31 2016-08-31 A kind of method and apparatus for obtaining angle correlation

Country Status (2)

Country Link
CN (1) CN107783756A (en)
WO (1) WO2018040726A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109547761A (en) * 2018-11-14 2019-03-29 新视家科技(北京)有限公司 A kind of form and aspect conversion circuit and color space converting circuit
CN114845023A (en) * 2022-04-26 2022-08-02 杭州海康威视数字技术股份有限公司 Driving method and device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109783761B (en) * 2019-01-25 2023-08-01 武汉轻工大学 Triple integral calculation method, triple integral calculation device, terminal equipment and readable storage medium
CN111402873B (en) * 2020-02-25 2023-10-20 北京声智科技有限公司 Voice signal processing method, device, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100458646C (en) * 2006-06-15 2009-02-04 华为技术有限公司 Trigonometric value determiner, determining method and telecommunicating apparatus therewith
CN102034260A (en) * 2010-12-27 2011-04-27 北京像素软件科技股份有限公司 Trigonometric function calculating method in three-dimensional (3D) graphics rendering
CN102650983A (en) * 2011-02-25 2012-08-29 西安邮电学院 Basic circular function evaluator adopting cubic Bezier function based on lookup table
CN103077155A (en) * 2012-12-27 2013-05-01 华自科技股份有限公司 Computing method for phasor angle of electric system
CN103365827A (en) * 2013-06-27 2013-10-23 北京航空航天大学 Computing method of high-precision sine/cosine function
CN104536720A (en) * 2014-12-22 2015-04-22 浙江中控研究院有限公司 Method and system for measuring and calculating trigonometric function value of to-be-measured angle based on FPGA
CN105138305A (en) * 2015-09-25 2015-12-09 上海兆芯集成电路有限公司 High-precision calculation method and device for trigonometric function
CN105262400A (en) * 2015-11-13 2016-01-20 四川长虹电器股份有限公司 Control method for improving compensation control accuracy of motor dead zone

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100458646C (en) * 2006-06-15 2009-02-04 华为技术有限公司 Trigonometric value determiner, determining method and telecommunicating apparatus therewith
CN102034260A (en) * 2010-12-27 2011-04-27 北京像素软件科技股份有限公司 Trigonometric function calculating method in three-dimensional (3D) graphics rendering
CN102650983A (en) * 2011-02-25 2012-08-29 西安邮电学院 Basic circular function evaluator adopting cubic Bezier function based on lookup table
CN103077155A (en) * 2012-12-27 2013-05-01 华自科技股份有限公司 Computing method for phasor angle of electric system
CN103365827A (en) * 2013-06-27 2013-10-23 北京航空航天大学 Computing method of high-precision sine/cosine function
CN104536720A (en) * 2014-12-22 2015-04-22 浙江中控研究院有限公司 Method and system for measuring and calculating trigonometric function value of to-be-measured angle based on FPGA
CN105138305A (en) * 2015-09-25 2015-12-09 上海兆芯集成电路有限公司 High-precision calculation method and device for trigonometric function
CN105262400A (en) * 2015-11-13 2016-01-20 四川长虹电器股份有限公司 Control method for improving compensation control accuracy of motor dead zone

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109547761A (en) * 2018-11-14 2019-03-29 新视家科技(北京)有限公司 A kind of form and aspect conversion circuit and color space converting circuit
CN114845023A (en) * 2022-04-26 2022-08-02 杭州海康威视数字技术股份有限公司 Driving method and device

Also Published As

Publication number Publication date
WO2018040726A1 (en) 2018-03-08

Similar Documents

Publication Publication Date Title
CN107783756A (en) A kind of method and apparatus for obtaining angle correlation
CN107438752B (en) Positioning method, terminal and server
CN103438798B (en) Initiative binocular vision system overall calibration
CN111123280B (en) Laser radar positioning method, device and system, electronic equipment and storage medium
CN103644917B (en) Traverse measurement platform laser radar rotation and translation calculation method of parameters
CN104439709A (en) Three-dimensional laser marking method and device and three-dimensional laser machining equipment
CN103312332A (en) Digital converter of rotary transformer and conversion method
CN105719242A (en) Picture rapid rotation method and system based on look-up table method
CN108759644B (en) Moving distance detection method and device and storage medium
CN114488237A (en) Positioning method and device, electronic equipment and intelligent driving method
CN114157102A (en) Angle measuring method, system and device of motor and computer readable storage medium
CN112104292B (en) Motor control method, device, terminal equipment and storage medium
CN204068930U (en) A kind of phase-locked loop
CN113008273A (en) Calibration method and device for inertial measurement unit of vehicle and electronic equipment
Moosavi et al. A survey of smart electrical boards in ubiquitous sensor networks for geomatics applications
Tian et al. The research of satellite selection algorithm in positioning system
Bai et al. Correction algorithm of LIDAR data for mobile robots
Wang et al. A Novel Visual Detecting and Positioning Method for Screw Holes
CN104995584A (en) Computing a magnetic heading
CN118030579A (en) Fan control method and device, fan and storage medium
CN116878477B (en) Hemispherical resonator gyro damping non-uniformity parameter identification method, equipment and storage medium
Zhang et al. Research on the Design of SINS/GPS Integrated Navigation System
CN114323020B (en) Vehicle positioning method, system, equipment and computer readable storage medium
Zhang et al. Corner Point Recognition and Point Cloud Correction Based on Graham-Scan Algorithm
Kim et al. A VLSI Design of Real-Time Sensor Fusion Unit using Kalman Filters

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180309

RJ01 Rejection of invention patent application after publication