CN100386719C - Coordinate transformation method for digital scanning change-over device and processor - Google Patents

Coordinate transformation method for digital scanning change-over device and processor Download PDF

Info

Publication number
CN100386719C
CN100386719C CNB031400159A CN03140015A CN100386719C CN 100386719 C CN100386719 C CN 100386719C CN B031400159 A CNB031400159 A CN B031400159A CN 03140015 A CN03140015 A CN 03140015A CN 100386719 C CN100386719 C CN 100386719C
Authority
CN
China
Prior art keywords
cout
module
value
interative computation
iteration
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.)
Expired - Fee Related
Application number
CNB031400159A
Other languages
Chinese (zh)
Other versions
CN1492313A (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.)
Shenzhen Mindray Bio Medical Electronics Co Ltd
Original Assignee
Shenzhen Mindray Bio Medical Electronics 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 Mindray Bio Medical Electronics Co Ltd filed Critical Shenzhen Mindray Bio Medical Electronics Co Ltd
Priority to CNB031400159A priority Critical patent/CN100386719C/en
Publication of CN1492313A publication Critical patent/CN1492313A/en
Application granted granted Critical
Publication of CN100386719C publication Critical patent/CN100386719C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

The present invention relates to a method and a processor used for transforming the coordinates of a digital scanning and transforming device, which is used for transforming rectangular coordinates (x0, y0) into polar coordinates (r, p). The method comprises the steps of initialization, preprocessing, calculation by a CORDIC algorithm, semidiameter correction and phase correction, wherein in calculation by a CORDIC algorithm, the iteration of the CORDIC algorithm is first carried out for (a) times by left shifting operation, and then the iteration of the CORDIC algorithm is carried out for (N-a) times by right shifting operation. The processor is an optimal embodiment for realizing the method, and the processor comprises an input module, a preprocessing module, an iterative operation module, a semidiameter correction module, a phase correction module and an output module. Performance parameters of precision, speed, etc. of the digital scanning and transforming device in a type-B ultrasonic display instrument can be flexibly adjusted by the coordinate transforming method and the processor, and requirements of high precision, large capacity and real-time operation on the display instrument are satisfied.

Description

The coordinate transformation method and the processor that are used for digital scan converter
Technical field
The present invention relates in the electric digital data processing field according to the figure place of data to be processed or data processing method and the device that content is carried out computing, relate in particular to the coordinate transformation method and the processor of the digital scan converter that is used for the B ultrasonic imager.
Background technology
Digital scan converter in the B ultrasonic imager that prior art relates to will be converted to polar data with the rectangular coordinate data showing, can adopt methods such as tabling look-up, use special-purpose coordinate transform chip or structure circuit to realize.There is finite capacity in the method that employing is tabled look-up and the very high shortcoming of cost; Adopt special-purpose coordinate transform chip, exist performance to adjust inflexible shortcoming; Adopt the method that makes up special circuit, because that rectangular coordinate is converted to the common employing of polar coordinates is CORDIC (Coordinate RotationDigital Computer: CORDIC) algorithm, and adopt existing C ORDIC algorithm to realize that rectangular coordinate is to polar conversion, be not enough to realize adjust performance parameters such as precision, speed flexibly, can not satisfy the requirement of high precision, high capacity and real-time working imager.
Summary of the invention
The technical problem to be solved in the present invention is to avoid above-mentioned the deficiencies in the prior art part, and proposes a kind of coordinate transformation method and processor that is used for B ultrasonic imager digital scan converter.
The technical scheme that the present invention solves the problems of the technologies described above employing is, proposes a kind of coordinate transformation method that is used for digital scan converter, in order to the rectangular coordinate value of input (x0, y0) be converted to the polar coordinates value (r, p) output especially, comprises step:
1.. receive x0 from front-end circuit by the input of described device and pretreatment module, y0 carries out assignment and output to constant and the variable of using, and comprising:
Angle variables z (0) is initialized as 0;
Symbolic variable cout iBe initialized as 1;
According to the rectangular coordinate value (x0 y0) comes initialization phase place judgment variable Xs, Ys, and this (x0 y0) is converted to unsigned number, that is:
If X0<0, then Xs=1; If Y0<0, then Ys=1; And (x0, y0)=(| x0|, | y0|);
2.. the CORDIC interative computation module of described device divides two stages to carry out iteration N time according to the constant and the variable of described output:
Phase one: carry out the cordic algorithm iteration a time with shift left operation, that is:
I is from 0 to a-1, is 1 to increase progressively cycle calculations by step-length:
x(i+1)=2 i*x(i)+y(i);y(i+1)=|2 i*y(i)-x(i)|;
z(i+1)=z(i)+cout itan -12 -i;cout i+1=cout i⊙sign(2 i*y(i)-x(i));
Subordinate phase: carry out (N-a) inferior cordic algorithm iteration with right-shift operation, that is:
I is 1 to increase progressively cycle calculations by step-length from a to N-1:
x(i+1)=x(i)+2 -i*y(i);y(i+1)=|y(i)-2 -i*x(i)|;
z(i+1)=z(i)+cout itan -12 -i;cout i+1=cout i⊙sign(y(i)-2 -i*x(i));
3.. the radius correcting module of described device calculates revised radius r according to the output of described N iteration:
A = Π N 1 + 2 - 2 i , X ′ N = X N > > Σ i = 0 a i , r=1/A*X′ N
4.. the phase place correcting module of described device calculates phase place p according to the output of described N iteration, and according to described phase place judgment variable Xs, Ys adjusts correction:
p=z(N)/2 N
If (Xs, Ys)=(0,0), the p value is not adjusted; If (Xs, Ys)=(1,0), p=π-p;
If (Xs, Ys)=(1,1), p=π+p; If (Xs, Ys)=(0,1), p=2 π-p.
The technical scheme that the present invention solves the problems of the technologies described above employing also comprises, manufactures and designs a kind of coordinate conversion processor that is used for digital scan converter, in order to the rectangular coordinate value (x0, y0) input be converted to the polar coordinates value (r, p) output, especially, comprising:
The input and pretreatment module, receive described rectangular coordinate input value, and produce corresponding constant value N, | x0| and | y0|, and phase place judgment variable Xs and Ys, angle variables z (0) and symbolic variable cout iInitial value;
The interative computation module, according to described | x0| and | y0|, constant value N, angle variables z (0) and symbolic variable cout iCarry out N time cordic algorithm iteration; This interative computation module comprises two modules: first module and second module, and described first module realizes a CORDIC interative computation with shift left operation, that is: i is from 0 to a-1, is 1 to increase progressively cycle calculations by step-length:
x(i+1)=2 i*x(i)+y(i);y(i+1)=|2 i*y(i)-x(i)|;
z(i+1)=z(i)+cout itan -12 -i;cout i+1=cout i⊙sign(2 i*y(i)-x(i));
This module comprises the circuit unit of realizing each interative computation: two shift left operation devices, two no symbol adder calculators and a signed magnitude arithmetic(al) device are used for described x (i+1), the calculating of y (i+1); A no symbol totalizer is used for the calculating of described z (i+1); A logic controller is used for described cout I+1Calculating;
Described second module realizes (N-a) inferior CORDIC interative computation with right-shift operation, that is: i is 1 to increase progressively cycle calculations by step-length from a to N-1:
x(i+1)=x(i)+2 -1*y(i);y(i+1)=|y(i)-2 -i*x(i)|;
z(i+1)=z(i)+cout itan -12 -i;cout i+1=cout i⊙sign(y(i)-2 -i*x(i));
This module comprises the circuit unit of realizing each interative computation: two shift right operation devices, two no symbol adder calculators and a signed magnitude arithmetic(al) device are used for described x (i+1), the calculating of y (i+1); A no symbol totalizer is used for the calculating of described z (i+1); A logic controller is used for described cout I+1Calculating;
Radius correcting module and phase place correcting module, according to the output of described interative computation module calculate described polar coordinates value (r, p) and output, the multiplicative operator that described radius correcting module or phase place correcting module comprise or shift right operation device are realized column count down:
R=1/A*X ' NWherein <math><mrow> <mi>A</mi> <mo>=</mo> <munder> <mi>&amp;Pi;</mi> <mi>N</mi> </munder> <msqrt> <mn>1</mn> <mo>+</mo> <msup> <mn>2</mn> <mrow> <mo>-</mo> <mn>2</mn> <mi>i</mi> </mrow> </msup> </msqrt> <mo>,</mo></math> X &prime; N = X N > > &Sigma; i = 0 a i ,
P=z (N)/2 N, if (Xs, Ys)=(0,0), p=p; If (Xs, Ys)=(1,0), p=π-p;
If (Xs, Ys)=(1,1), p=π+p; If (Xs, Ys)=(0,1), p=2 π-p;
Output module, with described r, the output of p value.
Compare with prior art, adopt the present invention to be used for the coordinate transformation method and the processor of digital scan converter, can realize that digital scan converter is adjusted performance parameters such as precision, speed flexibly in the B ultrasonic imager, satisfy requirement high precision, high capacity and the real-time working of developing instrument.
Description of drawings
Fig. 1 is used for the theory diagram of the coordinate transformation method most preferred embodiment of digital scan converter for the present invention.
Fig. 2 is used circuit diagram of interative computation in first computing module of iteration described in the embodiment of the invention.
Fig. 3 is used circuit diagram of interative computation in the preceding computing module of the value of iteration b described in the embodiment of the invention.
Fig. 4 is used circuit diagram of interative computation in the computing module of the value of iteration b described in embodiment of the invention back.
Embodiment
Be described in further detail below in conjunction with the most preferred embodiment shown in the accompanying drawing.
The present invention is used for the coordinate transformation method of digital scan converter, in order to the input a rectangular coordinate value (x0, y0) be converted to the polar coordinates value (r, p) output, comprise step:
1.. receive x0 from front-end circuit by the input of described device and pretreatment module, y0 carries out assignment and output to constant and the variable of using, and comprising:
Angle variables z (0) is initialized as 0;
Symbolic variable cout iBe initialized as 1;
According to the rectangular coordinate value (x0 y0) comes initialization phase place judgment variable Xs, Ys, and this (x0 y0) is converted to unsigned number, that is:
If X0<0, then Xs=1; If Y0<0, then Ys=1; And (x0, y0)=(| x0|, | y0|);
2.. the CORDIC interative computation module of described device divides two stages to carry out iteration N time according to the constant and the variable of described output:
Phase one: carry out the cordic algorithm iteration a time with shift left operation, that is:
I is from 0 to a-1, is 1 to increase progressively cycle calculations by step-length:
x(i+1)=2 i*x(i)+y(i);y(i+1)=|2 i*y(i)-x(i)|;
z(i+1)=z(i)+cout itan -12 -i;cout i+1=cout i⊙sign(2 i*y(i)-x(i));
Subordinate phase: carry out (N-a) inferior cordic algorithm iteration with right-shift operation, that is:
I is 1 to increase progressively cycle calculations by step-length from a to N-1:
x(i+1)=x(i)+2 -i*y(i);y(i+1)=|y(i)-2 -i*x(i)|;
z(i+1)=z(i)+cout i*tan -12 -i;cout i+1=cout i⊙sign(y(i)-2 -i*x(i));
3.. the radius correcting module of described device calculates revised radius r according to the output of described N iteration:
A = &Pi; N 1 + 2 - 2 i , X &prime; N = X N > > &Sigma; i = 0 a i , r=1/A *X′ N
4.. the phase place correcting module of described device calculates phase place p according to the output of described N iteration, and according to described phase place judgment variable Xs, Ys adjusts correction:
p=z(N)/2 N
If (Xs, Ys)=(0,0), the p value is not adjusted; If (Xs, Ys)=(1,0), p=π-p;
If (Xs, Ys)=(1,1), p=π+p; If (Xs, Ys)=(0,1), p=2 π-p.
The coordinate transformation method that the present invention is used for digital scan converter further illustrates below:
Cordic algorithm is to finish the rotation of vector by the method for iteration, thereby finishes the computing of transcendental function such as trigonometric function, hyperbolic function, exponential function and inverse function thereof.The general iterative formula of algorithm is:
x i + 1 = x i - d i y i 2 - i y i + 1 = y i + d i x i 2 - i z i + 1 = z i - d i tan - 1 ( 2 - i ) - - - ( 1 )
Wherein: d i = + 1 if ( y i &times; x i ) < 0 - 1 otherwise , i = 0 , 1,2 . . . . N - 1
Algorithm is output as through after N iteration:
X N = A x 0 2 + y 0 2 Y N &RightArrow; 0 Z N = z 0 + tan - 1 ( y 0 / x 0 ) A = &Pi; N 1 + 2 - 2 i - - - ( 2 )
If we are x 0And y 0Regard horizontal ordinate and ordinate in the rectangular coordinate system as, then pass through N iteration after, x as a result NAnd z NCorrespond respectively to its square root (factors A is arranged) and its arc tangent and (a constant z is arranged 0).If establish z 0=0, and with x NMultiply by 1/A, so x NAnd z NBe exactly and x 0And y 0Radius in the corresponding polar coordinate system and phase place.Algorithm is by forcing initialization vector [x 0y 0] approach X-axis and finish rectangular coordinate one polar conversion.
Situation about should be noted that in addition is initialization vector [x 0y 0] must be positioned at first quartile, this be because
∑tan -1(2 -i)<100° (3)
Thereby, if initialization vector not at first quartile, the result of algorithm iteration just can not approach X-axis.So,, must make corresponding correction to algorithm if initialization vector is positioned at other quadrants.Following research is only limited to the situation of initialization vector at first quartile, and the situation that is positioned at other quadrants can provide explanation in the back.
Scrutinize the CORIC algorithm,, work as y for first equation in the system of equations (1) i〉=0 o'clock, d i=-1 and have
x i+1=x i+y i2 -i=x i+|y i|2 -i (4)
Can obtain x I+1>x iEqually, work as y i<0 o'clock, d i=1 and have
x i+1=x i-y i2 -i=x i+|y i|2 -i (5)
Also can obtain x I+1>x iSo x iBe an increasing sequence, consider x 0>0, so x iIt is a sequence of positive numbers that increases progressively.
For second equation in the system of equations (1), work as y i〉=0 o'clock, d i=-1, but abbreviation is
y i+1=y i-x i2 -(i+1)=|y i|-x i2 -(i+1) (6)
Because x iBe a sequence of positive numbers, so this can think the reducing of two positive numbers; Work as y i<0 o'clock, d i=1, the formula abbreviation is
y i+1=y i+x i2 -(i+1)=x i2 -(i+1)-|y i| (7)
This can think the reducing of two unsigned numbers equally.But this moment y I+1Positive and negative and uncertain, for make it easy to that hardware is realized and and formula (6) be consistent, with formula (6,7) unification be:
y i+1=|y i-x i2 -(i+1)| (8)
At that time, system of equations (1) becomes:
x i + 1 = x i + y i 2 - i y i + 1 = | y i - x i 2 - i | z i + 1 = z i - cout i tan - 1 ( 2 - i ) - - - ( 9 )
Wherein, cout i = - 1 if y i - 1 < x i - 1 2 - ( i - 1 ) 1 others
Adopt the cordic algorithm of system of equations (9), can improve the arithmetic speed of algorithm, following table has provided software emulation (precision analysis) and the hardware simulation results (resource consumption, arithmetic speed analysis) when symbolic operation and no symbolic operation are arranged:
Symbol is arranged No symbol Note
X, y, z word length 16 Bits 16 Bits Annotate 1
Resource consumption 1754 logical blocks (35%) 1737 logical blocks (34%) Annotate 2
The highest realization frequency 27.93MHZ 47.16MHZ Annotate 2
Radius precision (LSB) 2.31(-2.55 7.38) 1.98(-3.98 0.0) Annotate 3
Phase accuracy (LSB) 4.23(-77.78 88.73) 4.62(-88.59 88.73) Annotate 3
Annotate 1: in simulation process, the word length of x, y expands to 18Bits (moving to left two), and z comprises the 15Bits decimal place.
Annotate 2: emulation realizes in the FPGA of U.S. altera corp (field programmable gate array), and has adopted pipeline organization.
Annotate 3: be absolute average error, be respectively maximum negative sense sum of errors maximum forward error in the bracket.
As can be seen from the above table, by there being symbolic operation to change no symbolic operation into, not improving significantly aspect the precision of consumption, radius and the phase place of resource, but on the highest realization frequency of computing, improving a lot.
There is certain value b in analysis equation group (9), y as can be known bWidth smaller or equal to (b+1), then y bMove to right (b+1) position after equal zero, at this moment, x bRemain unchanged.In the iteration afterwards, because y iFurther reduce the increase with i, x iTo remain constant, thereby need not carry out the computing of equation one in the system of equations (9).And this b value can be determined by software emulation.
Further study the CORIC algorithm, we can find that the error main source of algorithm is: at x i, y iIn the iterative process, owing to there is right-shift operation (* 2 -i) and the cut position error that causes, thereby the lost part precision causes the end product error bigger.Therefore, can improve precision by eliminating the cut position error, method is exactly: replace right-shift operation with shift left operation, be about to system of equations (9) and change following form into:
x i + 1 = x i 2 i + y i y i + 1 = | y i 2 i - x i | z i + 1 = z i - cout i tan - 1 ( 2 - i ) - - - ( 10 )
Wherein, cout i = - 1 if y i - 1 2 - ( i - 1 ) < x i - 1 1 others .
But thus, can increase required hardware resource greatly, thereby cause the arithmetic speed of algorithm to reduce.
Take all factors into consideration, we can draw the way of dealing with problems: adopt system of equations (10) in preceding a iterative process, adopt system of equations (9) again in the iterative process of back.
It should be noted that owing to adopted shift left operation,, be shown below so after iteration is finished, must revise to the radius that obtains:
X &prime; N = X N > > &Sigma; i = 0 a i - - - ( 11 )
Below two forms provided software emulation (precision analysis) and hardware simulation results (resource consumption, arithmetic speed analysis) when the middle a of system of equations (9) (not adopting shift left operation) and system of equations (10) (employing shift left operation) got different value:
Do not adopt shift left operation Adopt shift left operation (a=1) Note
X, y, z word length 16 Bits 16 Bits Annotate 1
Resource consumption 1737 logical blocks (34%) 18541964 logical blocks (37%) Annotate 2
The highest realization frequency 47.16MHZ 45.45MHZ Annotate 2
Radius precision (LSB) 1.98(-3.98 0.0) 1.14(-2.30 0 Annotate 3
Phase accuracy (LSB) 4.62(-88.59 88.73) 2.40(-51.91 52.06) Annotate 3
Adopt shift left operation (a=2) Adopt shift left operation (a=3) Note
X, y, z word length 16 Bits 16 Bits Annotate 1
Resource consumption 1964 logical blocks (39%) 2142 logical blocks (42%) Annotate 2
The highest realization frequency 43.85MHZ 42.73MHZ Annotate 2
Radius precision (LSB) -0.52(0 1.04) -0.33(0 0.66) Annotate 3
Phase accuracy (LSB) 1.03(-12.0 12.15) 0.81(-3.26 3.41) Annotate 3
Annotate 1: in simulation process, when not adopting shift left operation, the word length of x, y expands to 18Bits (2bits moves to left); When adopting shift left operation and a=1, the word length of x, y expands to 19Bits (3bits moves to left); During a=2, the word length of x, y expands to 21Bits (5bits moves to left); During a=3, the word length of x, y expands to 24Bits (8bits moves to left).Z comprises the 15Bits decimal place.
Annotate 2: emulation realizes in the FPGA of U.S. altera corp, and has adopted pipeline organization.
Annotate 3: be absolute average error, be respectively maximum negative sense sum of errors maximum forward error in the bracket.
As can be seen, adopt the number of times of shift left operation from top two forms, promptly a value is high more, and the precision of radius and phase place increases thereupon, and correspondingly, resource consumption also increases thereupon, and the highest frequency of computing descends thereupon.Therefore taking all factors into consideration preferably, this a value is 3.
The present invention is used for the coordinate conversion processor of digital scan converter, in order to the rectangular coordinate value (x0, y0) input be converted to the polar coordinates value (r, p) output, can adopt FPGA to realize, and this coordinate conversion processor comprises:
The input and pretreatment module, receive described rectangular coordinate input value, and produce corresponding constant value N, | x0| and | y0|, and phase place judgment variable Xs and Ys, angle variables z (0) and symbolic variable cout iInitial value;
The interative computation module, according to described | x0| and | y0|, constant value N, angle variables z (0) and symbolic variable cout iCarry out N time cordic algorithm iteration; This interative computation module comprises two modules: first module and second module, and described first module realizes a CORDIC interative computation with shift left operation, that is: i is from 0 to a-1, is 1 to increase progressively cycle calculations by step-length:
x(i+1)=2 i*x(i)+y(i);y(i+1)=|2 i*y(i)-x(i)|;
z(i+1)=z(i)+cout i*tan -12 -i;cout i+1=cout i⊙sign(2 i*y(i)-x(i));
This module comprises the circuit unit of realizing each interative computation: two shift left operation devices, two no symbol adder calculators and a signed magnitude arithmetic(al) device are used for described x (i+1), the calculating of y (i+1); A no symbol totalizer is used for the calculating of described z (i+1); A logic controller is used for described cout I+1Calculating;
Described second module realizes (N-a) inferior CORDIC interative computation with right-shift operation, that is: i is 1 to increase progressively cycle calculations by step-length from a to N-1:
x(i+1)=x(i)+2 -i*y(i);y(i+1)=|y(i)-2 -i*x(i)|;
z(i+1)=z(i)+cout i*tan -12 -i;cout i+1=cout i⊙sign(y(i)-2 -i*x(i));
This module comprises the circuit unit of realizing each interative computation: two shift right operation devices, two no symbol adder calculators and a signed magnitude arithmetic(al) device are used for described x (i+1), the calculating of y (i+1); A no symbol totalizer is used for the calculating of described z (i+1); A logic controller is used for described cout I+1Calculating;
Radius correcting module and phase place correcting module, according to the output of described interative computation module calculate described polar coordinates value (r, p) and output, the multiplicative operator that described radius correcting module or phase place correcting module comprise or shift right operation device are realized column count down:
R=1/A*X ' NWherein A = &Pi; N 1 + 2 - 2 i , X &prime; N = X N > > &Sigma; i = 0 a i ,
P=z (N)/2 N, if (Xs, Ys)=(0,0), p=p; If (Xs, Ys)=(1,0), p=π-p;
If (Xs, Ys)=(1,1), p=π+p; If (Xs, Ys)=(0,1), p=2 π-p;
Output module, with described r, the output of p value.
The coordinate conversion processor that the present invention is used for digital scan converter further illustrates below:
For accelerating the arithmetic speed of cordic algorithm, each iteration has all adopted a stage pipeline structure, though independent data of conversion need N cycle like this, but concerning data stream, but can all finish linear transformation (bulk delay N cycle as a result) each cycle, according to processor theory diagram shown in Figure 1, each module is provided specific description below:
Load module: accept the signal x that front-end circuit is sent here 0, y 0, the initial work of carrying out the iterative formula computing is carried out assignment to constant and the initializaing variable of using.
Pretreatment module: distinguish signal x 0, y 0Symbol, and give Xs and Ys respectively with its symbol.
Interative computation module: carry out computing according to the iterative equation group, can be divided into two submodules:
Iteration first module: carry out computing according to system of equations (10), i.e. cancellation cut position error in iteration, the value of a can be according to the consideration of compromising of the realization speed of resource consumption and algorithm, and the particular circuit configurations of its computing each time comprises as shown in Figure 2:
Be used for x (i+1), two shift left operation devices that y (i+1) calculates, two no symbol adder calculators and a signed magnitude arithmetic(al) device; Be used for the no symbol totalizer that z (i+1) calculates; Be used for cout I+1A logic controller that calculates.
Iteration second module: carry out computing according to system of equations (9), realize (N-a) inferior CORDIC interative computation with right-shift operation.Consider and do not cancel the cut position error in iteration, the value available software emulation of b obtains, and its implication is, if in the b time iteration, and y bWidth smaller or equal to (b+1), then y bMove to right (b+1) position after equal zero, at this moment, x bRemain unchanged.In the iteration afterwards, because y iFurther reduce the increase with i, x iTo remain constant, according to the x that exists corresponding to the b value iChange, this module can comprise b value front module and b value back module successively.Wherein, the particular circuit configurations of the computing each time of described second module that comprises b value front module comprises as shown in Figure 3:
Be used for x (i+1), two shift right operation devices that y (i+1) calculates, two no symbol adder calculators and a signed magnitude arithmetic(al) device; Be used for the no symbol totalizer that z (i+1) calculates; Be used for cout I+1A logic controller that calculates.
And b value back module because of during x iNo longer change, so do not carry out the interative computation of its formula, other then carry out computing according to system of equations (9), and the particular circuit configurations of its computing each time comprises as shown in Figure 4:
Be used for the latch that x (i+1) calculates; Be used for the shift right operation device that y (i+1) calculates, a no symbol adder calculator and a signed magnitude arithmetic(al) device; Be used for the no symbol totalizer that z (i+1) calculates; Be used for cout I+1A logic controller that calculates.
Radius correcting module: according to system of equations (2) and equation (11), because the radius r that obtains has a factors A and will move to right after the iteration, so will revise radius by a multiplicative operator and a shift operation device
The phase place correcting module: the value according to Xs, Ys (is x 0, y 0The quadrant at place) p is revised.
Output module: the radius r and the phase place p that will carry out revising output to back-end circuit.

Claims (8)

1. coordinate transformation method that is used for digital scan converter, in order to the rectangular coordinate value of input (x0, y0) be converted to the polar coordinates value (r, p) output is characterized in that, comprises step:
1.. receive x0 from front-end circuit by the input of described device and pretreatment module, y0 carries out assignment and output to constant and the variable of using, and comprising:
Angle variables z (0) is initialized as 0;
Symbolic variable cout iBe initialized as 1;
According to the rectangular coordinate value (x0 y0) comes initialization phase place judgment variable Xs, Ys, and this (x0 y0) is converted to unsigned number, that is:
If X0<0, then Xs=1; If Y0<0, then Ys=1; And (x0, y0)=(| x0|, | y0|);
2.. the CORDIC interative computation module of described device divides two stages to carry out iteration N time according to the constant and the variable of described output:
Phase one: carry out the cordic algorithm iteration a time with shift left operation, that is:
I is from 0 to a-1, is 1 to increase progressively cycle calculations by step-length:
x(i+1)=2 i*x(i)+y(i);y(i+1)=|2 i*y(i)-x(i)|;
z(i+1)=z(i)+cout i*tan -12 -i;cout i+1=cout i⊙sign(2 i*y(i)-x(i));
Subordinate phase: carry out (N-a) inferior cordic algorithm iteration with right-shift operation, that is:
I is 1 to increase progressively cycle calculations by step-length from a to N-1:
x(i+1)=x(i)+2 -i*y(i);y(i+1)=|y(i)-2 -i*x(i)|;
z(i+1)=z(i)+cout i*tan -12 -i;cout i+1=cout i⊙sign(y(i)-2 -i*x(i));
3.. the radius correcting module of described device calculates revised radius r according to the output of described N iteration:
A = &Pi; N 1 + 2 - 2 i , X &prime; N = X N > > &Sigma; i = 0 a i , r=1/A*X′ N
4.. the phase place correcting module of described device calculates phase place p according to the output of described N iteration, and according to described phase place judgment variable Xs, Ys adjusts correction:
p=z(N)/2 N
If (Xs, Ys)=(0,0), the p value is not adjusted; If (Xs, Ys)=(1,0), p=π-p;
If (Xs, Ys)=(1,1), p=π+p; If (Xs, Ys)=(0,1), p=2 π-p.
2. the coordinate transformation method that is used for digital scan converter as claimed in claim 1 is characterized in that: the 2. middle subordinate phase of described step also can be further divided into two interative computation stages of carrying out successively:
The b value last stage: carry out the iteration of (b-a) inferior cordic algorithm with right-shift operation, that is:
I is 1 to increase progressively cycle calculations by step-length from a to b-1:
x(i+1)=x(i)+2 -i*y(i);y(i+1)=|y(i)-2 -i*x(i)|;
z(i+1)=z(i)+cout i*tan -12 -i;cout i+1=cout i⊙sign(y(i)-2 -i*x(i));
B value after-stage: carry out the iteration of (N-b) inferior cordic algorithm with right-shift operation, but stop interative computation, that is: to the x variable
I is 1 to increase progressively cycle calculations by step-length from b to N-1:
x(i+1)=x(i);y(i+1)=|y(i)-2 -i*x(i)|;
z(i+1)=z(i)+cout i*tan -12 -i;cout i+1=cout i⊙sign(y(i)-2 -i*x(i))。
3. the coordinate transformation method that is used for digital scan converter as claimed in claim 1 or 2 is characterized in that:
The described step 2. preferred value of middle a is 3.
4. coordinate conversion processor that is used for digital scan converter, in order to the rectangular coordinate value (x0, y0) input be converted to the polar coordinates value (r, p) output is characterized in that, comprising:
The input and pretreatment module, receive described rectangular coordinate input value, and produce corresponding constant value N, | x0| and | y0|, and phase place judgment variable Xs and Ys, angle variables z (0) and symbolic variable cout iInitial value;
The interative computation module, according to described | x0| and | y0|, constant value N, angle variables z (0) and symbolic variable cout iCarry out N time cordic algorithm iteration; This interative computation module comprises two modules: first module and second module, and described first module realizes a CORDIC interative computation with shift left operation, that is: i is from 0 to a-1, is 1 to increase progressively cycle calculations by step-length:
x(i+1)=2 i*x(i)+y(i);y(i+1)=|2 i*y(i)-x(i)|;
z(i+1)=z(i)+cout i*tan -12 -i;cout i+1=cout i⊙sign(2 i*y(i)-x(i));
This module comprises the circuit unit of realizing each interative computation: two shift left operation devices, two no symbol adder calculators and a signed magnitude arithmetic(al) device are used for described x (i+1), the calculating of y (i+1); A no symbol totalizer is used for the calculating of described z (i+1); A logic controller is used for described cout I+1Calculating;
Described second module realizes (N-a) inferior CORDIC interative computation with right-shift operation, that is: i is 1 to increase progressively cycle calculations by step-length from a to N-1:
x(i+1)=x(i)+2 -i*y(i);y(i+1)=|y(i)-2 -i*x(i)|;
Z (i+1)=z (i)+cout i* tan -12 -iCout I+1=cout i⊙ sign (y (i)-2 -i* x (i)); This module comprises the circuit unit of realizing each interative computation: two shift right operation devices, two no symbol adder calculators and a signed magnitude arithmetic(al) device are used for described x (i+1), the calculating of y (i+1); A no symbol totalizer is used for the calculating of described z (i+1); A logic controller is used for described cout I+1Calculating;
Radius correcting module and phase place correcting module, according to the output of described interative computation module calculate described polar coordinates value (r, p) and output, the multiplicative operator that described radius correcting module or phase place correcting module comprise or shift right operation device are realized column count down:
R=1/A*X ' NWherein A = &Pi; N 1 + 2 - 2 i , X &prime; N = X N > > &Sigma; i = 0 a i ,
P=z (N)/2 N, if (Xs, Ys)=(0,0), p=p; If (Xs, Ys)=(1,0), p=π-p;
If (Xs, Ys)=(1,1), p=π+p; If (Xs, Ys)=(0,1), p=2 π-p;
Output module, with described r, the output of p value.
5. as being used for the coordinate conversion processor of digital scan converter as described in the claim 4, it is characterized in that described second module comprises successively two modules according to the existence of b value:
B value front module comprises the described circuit unit that comprises two shift right operation devices, realizes that with right-shift operation i amounts to (b-a) inferior corresponding CORDIC interative computation from a to b-1;
B value back module, comprise the simplification circuit unit of realizing each interative computation: a latch is used for the calculating of x (i+1); A shift right operation device, a no symbol adder calculator and a signed magnitude arithmetic(al) device are used for the calculating of y (i+1); A no symbol totalizer is used for the calculating of z (i+1); A logic controller is used for cout I+1Calculating;
Thereby this module realizes the constant CORDIC interative computation of (N-b) inferior x variable with right-shift operation, that is: i is 1 to increase progressively cycle calculations by step-length from b to N-1:
x(i+1)=x(i);y(i+1)=|y(i)-2 -i*x(i)|;
z(i+1)=z(i)+cout i*tan -12 -i;cout i+1=cout i⊙sign(y(i)-2 -i*x(i))。
6. as being used for the coordinate conversion processor of digital scan converter as described in claim 4 or 5, it is characterized in that:
Described coordinate conversion processor is realized with FPGA.
7. as being used for the coordinate conversion processor of digital scan converter as described in claim 4 or 5, it is characterized in that:
Each iteration adopts a stage pipeline structure in the described interative computation module.
8. described in claim 4 or 5, be used for the coordinate conversion processor of digital scan converter, it is characterized in that:
The preferred value of a is 3 in the described interative computation module.
CNB031400159A 2003-07-29 2003-07-29 Coordinate transformation method for digital scanning change-over device and processor Expired - Fee Related CN100386719C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB031400159A CN100386719C (en) 2003-07-29 2003-07-29 Coordinate transformation method for digital scanning change-over device and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB031400159A CN100386719C (en) 2003-07-29 2003-07-29 Coordinate transformation method for digital scanning change-over device and processor

Publications (2)

Publication Number Publication Date
CN1492313A CN1492313A (en) 2004-04-28
CN100386719C true CN100386719C (en) 2008-05-07

Family

ID=34240229

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB031400159A Expired - Fee Related CN100386719C (en) 2003-07-29 2003-07-29 Coordinate transformation method for digital scanning change-over device and processor

Country Status (1)

Country Link
CN (1) CN100386719C (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1742682B (en) * 2004-09-03 2012-06-13 株式会社美蒂森 Real-time three-dimensional ultrasonic diagnostic system drawing device and method
CN100451662C (en) * 2007-03-30 2009-01-14 清华大学 Polar coordinate converting process for estimating signal background
CN101510148B (en) * 2009-04-02 2014-10-29 北京中星微电子有限公司 Index operation method and device
CN102152093B (en) * 2011-03-21 2013-01-09 中国科学院国家天文台南京天文光学技术研究所 Processing method for implementing rectangular coordinate scanning way under polar coordinate system
US9354844B2 (en) * 2012-12-10 2016-05-31 Intel Deutschland Gmbh Method and apparatus for iteratively calculating a value
CN104636632B (en) * 2015-03-10 2017-12-15 中国人民解放军国防科学技术大学 The small amount of storage computation of table lookup method of high-precision phase position
US10168992B1 (en) * 2017-08-08 2019-01-01 Texas Instruments Incorporated Interruptible trigonometric operations
CN109975814B (en) * 2017-12-28 2020-09-22 深圳先进技术研究院 Ultrasound imaging method, system and device
CN108416311B (en) * 2018-03-14 2022-04-19 电子科技大学 Azimuth angle acquisition method based on programmable gate array and coordinate rotation processing
CN111274190A (en) * 2018-12-05 2020-06-12 晨星半导体股份有限公司 Coordinate rotation digital calculation device and method
CN114816333A (en) * 2022-05-13 2022-07-29 兰州大学 Method for realizing arc tangent calculation based on CORDIC algorithm

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3952187A (en) * 1975-06-27 1976-04-20 Ford Motor Company Circuit for transforming rectangular coordinates to polar coordinates
US5430810A (en) * 1990-11-20 1995-07-04 Imra America, Inc. Real time implementation of the hough transform
US5889826A (en) * 1996-07-11 1999-03-30 Nec Corporation Apparatus and method for diversity combining
WO2001091257A2 (en) * 2000-05-23 2001-11-29 Honeywell International Inc. System and method for vcsel polarization control
CN1399200A (en) * 2001-07-25 2003-02-26 日本电气株式会社 Method and system for converting positioning signal in different coordinate system to specified coordinate system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3952187A (en) * 1975-06-27 1976-04-20 Ford Motor Company Circuit for transforming rectangular coordinates to polar coordinates
US5430810A (en) * 1990-11-20 1995-07-04 Imra America, Inc. Real time implementation of the hough transform
US5889826A (en) * 1996-07-11 1999-03-30 Nec Corporation Apparatus and method for diversity combining
WO2001091257A2 (en) * 2000-05-23 2001-11-29 Honeywell International Inc. System and method for vcsel polarization control
CN1399200A (en) * 2001-07-25 2003-02-26 日本电气株式会社 Method and system for converting positioning signal in different coordinate system to specified coordinate system

Also Published As

Publication number Publication date
CN1492313A (en) 2004-04-28

Similar Documents

Publication Publication Date Title
CN110351087B (en) Pipelined Montgomery modular multiplication operation method
CN100386719C (en) Coordinate transformation method for digital scanning change-over device and processor
CN107305484B (en) Nonlinear function operation device and method
Roldao Lopes et al. A fused hybrid floating-point and fixed-point dot-product for FPGAs
EP0416309B1 (en) Method and apparatus for performing the square root function using a rectangular aspect ratio multiplier
JP4199100B2 (en) Function calculation method and function calculation circuit
CN111443893A (en) N-time root calculation device and method based on CORDIC algorithm
Boudabous et al. Implementation of hyperbolic functions using CORDIC algorithm
Singh et al. Design and synthesis of goldschmidt algorithm based floating point divider on FPGA
Kumar et al. Coordinate rotation digital computer algorithm: Design and architectures
CN102789446A (en) DDS (Direct Digital Synthesizer) signal spurious suppression method and system on basis of CORDIC (Coordinated Rotation Digital Computer) algorithm
Daud et al. Hybrid modified booth encoded algorithm-carry save adder fast multiplier
US9021003B2 (en) Processor and operating method
Mi et al. Behavioral Implementation of SVD on FPGA
Neji et al. Architecture and FPGA implementation of the CORDIC algorithm for fingerprints recognition systems
EP3610367B1 (en) Energy-efficient variable power adder and methods of use thereof
US8924447B2 (en) Double precision approximation of a single precision operation
Dong et al. Implementation of single-precision floating-point trigonometric functions with small area
US20140052767A1 (en) Apparatus and architecture for general powering computation
Gupta et al. HDL Implementation of Sine-Cosine Function Using CORDIC Algorithm in 32-Bit Floating Point Format
Menakadevi et al. Direct Digital Synthesizer using Pipelined CORDIC Algorithm for Software Defined Radio
Abdul-Mumin et al. New Efficient Reverse Converters for 8n-bit Dynamic Range Moduli Set
Kukade et al. A Novel Parallel Multiplier for 2's Complement Numbers Using Booth's Recoding Algorithm
Shah et al. Distributed Arithmetic for the Design of High Speed FIR Filter Using FPGAs
JP3095348B2 (en) Discrete cosine transform and inverse discrete cosine transform device in data compression / decompression device

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080507

Termination date: 20140729

EXPY Termination of patent right or utility model