CN103065039A - High-precision sine/cosine function computing method based on Euler's formula - Google Patents

High-precision sine/cosine function computing method based on Euler's formula Download PDF

Info

Publication number
CN103065039A
CN103065039A CN2012105293847A CN201210529384A CN103065039A CN 103065039 A CN103065039 A CN 103065039A CN 2012105293847 A CN2012105293847 A CN 2012105293847A CN 201210529384 A CN201210529384 A CN 201210529384A CN 103065039 A CN103065039 A CN 103065039A
Authority
CN
China
Prior art keywords
tau
formula
iterative
phase
sine
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
Application number
CN2012105293847A
Other languages
Chinese (zh)
Other versions
CN103065039B (en
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.)
Anhui aotaiqi Intelligent Water Technology Co.,Ltd.
Original Assignee
Beihang University
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 Beihang University filed Critical Beihang University
Priority to CN201210529384.7A priority Critical patent/CN103065039B/en
Publication of CN103065039A publication Critical patent/CN103065039A/en
Application granted granted Critical
Publication of CN103065039B publication Critical patent/CN103065039B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Complex Calculations (AREA)

Abstract

The invention relates to a high-precision sine/cosine function computing method based on Euler's formula. The computing method utilizes Taylor's expansion of complex operation to obtain a high-precision sine/cosine function value and includes designing three submodules of a phase subdivision module, an initial value computation module and an iteration solution module; wherein the phase subdivision module divides a trigonometric function phase value to be computed into N (N is a positive integer) parts, the initial value computation module computes out a trigonometric function value as an iteration initial value after a phase subdivision, the iteration solution module plugs the iteration initial value into a computing equation to iterate, and the more the iterations, the higher the precision of a computed sine/cosine value; and lastly utilizing Euler's formula to transform a iteration result into a sine/cosine value of the corresponding phase to be computed.

Description

A kind of high precision sine/cosine function computing method based on Euler's formula
Technical field
The present invention relates to digital signal the field occurs, relate in particular to a kind of computing method of high precision sine/cosine function value.
Background technology
The Direct Digital frequency synthesis has now become the significant design method that signal occurs, and its major advantage is that output frequency, phase place and amplitude can accurately and rapidly conversion under the control of digital processing unit.Phase-Amplitude Converter is the important component part of Direct Digital Frequency Synthesizers, and its precision has directly determined precision and the purity of output sin/cos ripple, and therefore, the accurate Calculation of offset of sinusoidal/cosine value is the most important thing.
At present, the computing method of sine/cosine function numerical value mainly contain look-up table, method of interpolation and cordic algorithm.To phase place and frequency resolution and the exigent occasion of output accuracy, look-up table can consume a large amount of storage unit, and this has not only increased energy consumption, and has increased chip area.Cordic algorithm uses rotation of coordinate to ask for corresponding sine and cosine value, and it has solved the consumption problem of resource, and is highly suitable for that FPGA is upper to be realized, but cordic algorithm is in the situation of fixed number of iterations, and the precision of calculating changes with the variation of angle to be calculated.Therefore, cordic algorithm does not satisfy high-precision requirement in the larger occasion of frequency change.
The Direct Digital frequency synthesis is at high-end technology and military technology, and comparatively widely demand arranged in the communication technology, this is just to its atomic little frequency tuning and phase resolution, and " jump " ability between two frequencies, higher requirement has been proposed, thereby it is particularly important with the sin/cos computing method that the input angle has nothing to do to design a kind of computational accuracy.
Summary of the invention
The object of the invention is to propose a kind of computing method of the high precision sine/cosine function based on Euler's formula, realize the sin/cos computing method that computational accuracy and input angle are irrelevant.Described method can be in the hope of the high-precision sine/cosine of arbitrary phase between [0,2 π] according to the precise integration principle.
Technical scheme of the present invention is:
Described method is by segmenting phase place to be asked, and tries to achieve iterative initial value under the little phase place according to Euler's formula, and the corresponding times N of iteration (N is positive integer), the iteration result changed, and then obtain sine/cosine under the phase place described to be asked; Said method comprising the steps of:
Step 1, phase subdivision; Phase place η to be asked is subdivided into 2 NPart, the span of phase place η described to be asked is [0,2 π], the phase place τ after the segmentation 0For:
τ 0=η/2 N (6)
Step 2, initial value calculates; Carry out the calculating of complex values for the phase place substitution Euler's formula after the segmentation, Taylor expansion has been adopted in the calculating of described complex values, can be launched in theory infinite multinomial, but when realizing, consider that high order power is very little to the contribution of complex values, participate in computing so get first five items:
cos τ 0 + i sin τ 0 = e i τ 0 ≈ 1 + i τ 0 + ( i τ 0 ) 2 2 + ( i τ 0 ) 3 6 + ( i τ 0 ) 4 24 - - - ( 7 )
(7) in, order T 0 = i τ 0 + ( i τ 0 ) 2 2 + ( i τ 0 ) 3 6 + ( i τ 0 ) 4 24 ,
Figure BDA00002553570600023
T 0It is exactly described iterative initial value.
Step 3, iterative; Described iterations is the N that defines in the step 1, and iteration result carries out obtaining after the conversion sine/cosine of phase place η to be asked, according to (1) as can be known, and η=2 N* τ 0, described conversion is carried out according to Euler's formula; Each iterative phase value that participates in all is last time to participate in 2 times of iterative phase value in the iterative process, and iterative formula is based on polynomial square of formula, i+1 (i=0,1,2,3 ... N-1) the phase place τ of inferior iteration I+1Complex values and the i time iterative phase τ iComplex values have the identical form of expression:
e i τ i = 1 + T i e i τ i + 1 = e i ( 2 × τ i ) = ( 1 + T i ) 2 = 1 + 2 T i + T i 2 = 1 + T i + 1 - - - ( 8 )
Described iterative formula is
T i+1=2T i+T i 2 (9)
Gained sin/cos calculated value is
cos η = img ( e iη ) = img ( e i τ N ) = img ( 1 + T N ) sin η = real ( e iη ) = real ( e i τ N ) = real ( 1 + T N ) - - - ( 10 )
Further, the computing method of described a kind of high precision sine/cosine function based on Euler's formula, for any one phase value, the error of calculation all is independently, does not have the cumulative errors between the phase value.
Further, the computing method of described a kind of high precision sine/cosine function based on Euler's formula, iterations is more, and the sine/cosine function value is more accurate.
Description of drawings
Fig. 1 is algorithm block diagram of the present invention;
Fig. 2 is the iterative computation process flow diagram;
Fig. 3 is the corresponding relation of iterations and precision.
Embodiment
Referring to Fig. 1, a kind of algorithm block diagram of computing method of the high precision sine/cosine function based on Euler's formula.
Said method comprising the steps of:
Step 1, phase subdivision; Phase place η to be asked is subdivided into 2 NPart, the span of phase place η described to be asked is [0,2 π], the phase place τ after the segmentation 0For:
τ 0=η/2 N (11)
Step 2, initial value calculates; Carry out the calculating of complex values for the phase place substitution Euler's formula after the segmentation, Taylor expansion has been adopted in the calculating of described complex values, can be launched in theory infinite multinomial, but when realizing, consider that high order power is very little to the contribution of complex values, participate in computing so get first five items:
cos τ 0 + i sin τ 0 = e i τ 0 ≈ 1 + i τ 0 + ( i τ 0 ) 2 2 + ( i τ 0 ) 3 6 + ( i τ 0 ) 4 24 - - - ( 12 )
(7) in, order T 0 = i τ 0 + ( i τ 0 ) 2 2 + ( i τ 0 ) 3 6 + ( i τ 0 ) 4 24 ,
Figure BDA00002553570600043
T 0It is exactly described iterative initial value.
Step 3, iterative; Described iterations is the N that defines in the step 1, and iteration result carries out obtaining after the conversion sine/cosine of phase place η to be asked, according to (1) as can be known, and η=2 N* τ 0, described conversion is carried out according to Euler's formula; Each iterative phase value that participates in all is last time to participate in 2 times of iterative phase value in the iterative process, and iterative formula is based on polynomial square of formula, i+1 (i=0,1,2,3 ... N-1) the phase place τ of inferior iteration I+1Complex values and the i time iterative phase τ iComplex values have the identical form of expression:
e i τ i = 1 + T i e i τ i + 1 = e i ( 2 × τ i ) = ( 1 + T i ) 2 = 1 + 2 T i + T i 2 = 1 + T i + 1 - - - ( 13 )
Described iterative formula is
T i+1=2T i+T i 2 (14)
The process flow diagram of iterative computation is referring to Fig. 2.
Gained sin/cos calculated value is
cos η = img ( e iη ) = img ( e i τ N ) = img ( 1 + T N ) sin η = real ( e iη ) = real ( e i τ N ) = real ( 1 + T N ) - - - ( 15 )
The computing method of described a kind of high precision sine/cosine function based on Euler's formula, for any one phase value, the error of calculation all is independently, does not have the cumulative errors between the phase value.Iterations is more, and the sine/cosine function value is more accurate.Relation between iterations and the sine/cosine computational accuracy is referring to Fig. 3.
More than to the description of the present invention and embodiment thereof, be not limited to this, only be one of embodiments of the present invention shown in the accompanying drawing.In the situation that does not break away from the invention aim, without designing and the similar structure of this technical scheme or embodiment, all belong to protection domain of the present invention with creating.

Claims (2)

1. the computing method based on the high precision sine/cosine function of Euler's formula is characterized in that the method comprises the steps:
Step 1, phase subdivision; Phase place η to be asked is subdivided into 2 NPart, the span of phase place η described to be asked is [0,2 π], the phase place τ after the segmentation 0For:
τ 0=η/2 N (1)
Step 2, initial value calculates; Carry out the calculating of complex values for the phase place substitution Euler's formula after the segmentation, Taylor expansion has been adopted in the calculating of described complex values, can be launched in theory infinite multinomial, but when realizing, consider that high order power is very little to the contribution of complex values, participate in computing so get first five items:
cos τ 0 + i sin τ 0 = e i τ 0 ≈ 1 + i τ 0 + ( i τ 0 ) 2 2 + ( i τ 0 ) 3 6 + ( i τ 0 ) 4 24 - - - ( 2 )
(2) in, order T 0 = i τ 0 + ( i τ 0 ) 2 2 + ( i τ 0 ) 3 6 + ( i τ 0 ) 4 24 , T 0It is exactly described iterative initial value.
Step 3, iterative; Described iterations is the N that defines in the step 1, and iteration result carries out obtaining after the conversion sine/cosine of phase place η to be asked, according to (1) as can be known, and η=2 N* τ 0, described conversion is carried out according to Euler's formula; Each iterative phase value that participates in all is last time to participate in 2 times of iterative phase value in the iterative process, and iterative formula is based on polynomial square of formula, i+1 (i=0,1,2,3 ... N-1) the phase place τ of inferior iteration I+1Complex values and the i time iterative phase τ iComplex values have the identical form of expression:
e i τ i = 1 + T i e i τ i + 1 = e i ( 2 × τ i ) = ( 1 + T i ) 2 = 1 + 2 T i + T i 2 = 1 + T i + 1 - - - ( 3 )
Described iterative formula is
T i+1=2T i+T i 2 (4)
Gained sin/cos calculated value is
cos η = img ( e iη ) = img ( e i τ N ) = img ( 1 + T N ) sin η = real ( e iη ) = real ( e i τ N ) = real ( 1 + T N ) - - - ( 5 )
2. according to the computing method of the described a kind of high precision sine/cosine function based on Euler's formula of claims 1, it is characterized in that the iterations of iteration submodule is more, the precision of the sine/cosine of gained is higher.
CN201210529384.7A 2012-12-10 2012-12-10 A kind of High-accuracy sine/cosine function calculation method based on Euler's formula Active CN103065039B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210529384.7A CN103065039B (en) 2012-12-10 2012-12-10 A kind of High-accuracy sine/cosine function calculation method based on Euler's formula

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210529384.7A CN103065039B (en) 2012-12-10 2012-12-10 A kind of High-accuracy sine/cosine function calculation method based on Euler's formula

Publications (2)

Publication Number Publication Date
CN103065039A true CN103065039A (en) 2013-04-24
CN103065039B CN103065039B (en) 2016-02-24

Family

ID=48107667

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210529384.7A Active CN103065039B (en) 2012-12-10 2012-12-10 A kind of High-accuracy sine/cosine function calculation method based on Euler's formula

Country Status (1)

Country Link
CN (1) CN103065039B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105974997A (en) * 2016-04-29 2016-09-28 洛阳理工学院 Digital realization method for sine wave signal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050027498A1 (en) * 2003-07-31 2005-02-03 Canon Kabushiki Kaisha Method and apparatus for numerical calculation related to fluids, program for implementing the method, and storage medium storing the program
CN102324106A (en) * 2011-06-02 2012-01-18 武汉大学 SFS (Shape From Shading) three-dimensional reconstruction sparse-DEM (Digital Elevation Model) encrypting method considering surface spectral information
CN102506870A (en) * 2011-11-25 2012-06-20 西北工业大学 Euler angle Hermite exponential approximation output method based on angular velocity

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050027498A1 (en) * 2003-07-31 2005-02-03 Canon Kabushiki Kaisha Method and apparatus for numerical calculation related to fluids, program for implementing the method, and storage medium storing the program
CN102324106A (en) * 2011-06-02 2012-01-18 武汉大学 SFS (Shape From Shading) three-dimensional reconstruction sparse-DEM (Digital Elevation Model) encrypting method considering surface spectral information
CN102506870A (en) * 2011-11-25 2012-06-20 西北工业大学 Euler angle Hermite exponential approximation output method based on angular velocity

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105974997A (en) * 2016-04-29 2016-09-28 洛阳理工学院 Digital realization method for sine wave signal
CN105974997B (en) * 2016-04-29 2018-08-14 洛阳理工学院 A kind of Digital Implementation method of sine wave signal

Also Published As

Publication number Publication date
CN103065039B (en) 2016-02-24

Similar Documents

Publication Publication Date Title
Nascimento et al. FPGA implementation of the generalized delayed signal cancelation—Phase locked loop method for detecting harmonic sequence components in three-phase signals
CN102045062B (en) Digital phase-locked loop based on Cordic algorithm
CN101807089A (en) Waveform signal generator with optionally adjustable output signal offset
CN103365827A (en) Computing method of high-precision sine/cosine function
CN109521992B (en) Linear frequency modulation signal generation method without multiplier based on CORDIC algorithm
CN107395123A (en) A kind of 2 power side's frequency-doubling method based on GPS second pulse
CN103065039B (en) A kind of High-accuracy sine/cosine function calculation method based on Euler's formula
RU167428U1 (en) SINUS-COSINUS SIGNAL CONVERTER TO POSITION CODE
CN103049427A (en) High-accuracy sine/cosine function calculation method based on taylor expansion
CN102789446A (en) DDS (Direct Digital Synthesizer) signal spurious suppression method and system on basis of CORDIC (Coordinated Rotation Digital Computer) algorithm
Shan et al. Design and implementation of a FPGA-based direct digital synthesizer
CN105866483B (en) A kind of implementation method with dsp controller generation sine wave signal
Prasad et al. FPGA implementation of pipelined CORDIC based quadrature direct digital synthesizer with improved SFDR
CN105301354A (en) Harmonic signal frequency estimation method in multiplicative and additive noise
CN101854172A (en) Numerical control oscillator parallel design method based on two-dimensional sine table
CN102006067B (en) DDS circuit structure with waveform correction ROM
Das et al. Design and implementation of FPGA based linear all digital phase-locked loop
Suryavanshi et al. A comparative study of direct digital frequency synthesizer architectures in 180nm CMOS
Wang et al. High-precision design of DDS Based on FPGA
CN104270095B (en) CPLD-based single-chip square signal frequency doubler and method for outputting any frequency doubling signal
Mandal et al. Design and implementation of digital demodulator for frequency modulated cw radar
Elrayyah et al. A robust and efficient PLL algorithm for single-phase grid-connected renewable energy sources
CN106291101B (en) Harmonic frequency signal estimation method in a kind of multiplying property and additive noise with super-resolution
Ashrafi et al. Comments on" A 13-bit resolution ROM-less direct digital frequency synthesizer based on a trigonometric quadruple angle formula"
CN113162618B (en) DDS infinite frequency hopping method and system

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210709

Address after: 247000 No.22 Liujin Avenue, Chizhou economic and Technological Development Zone, Chizhou City, Anhui Province

Patentee after: Anhui aotaiqi Intelligent Water Technology Co.,Ltd.

Address before: 100191 No. 37, Haidian District, Beijing, Xueyuan Road

Patentee before: BEIHANG University