My understanding of the CORDIC (Co-ordinate Rotation by DIgital Computer) thanks to the nice article in [DSPGURU-CORDIC].
The idea is that rotation of a complex number by an angle can be achieved without using multipliers. The phase angle is approximately equal to successive addition or subtraction of angles from a set of reference angles i.e. , where
is the set of reference angles,
is the sign (takes +1 or -1) and
is the number of iteration.
Let the complex number corresponding to reference phase is . The reference angles for different values of is listed in the table below
Table: List of for = 1 to 10
The set of operations for rotating a complex number by an angle to generate in the CORDIC way can be as shown below:
Figure: CORDIC for phase rotation
As the multiplication by involves only power of two, the operation can be implemented with out using ‘real’ multipliers. Nice advantage when we need to save hardware. The flip side is the number of iterations required for obtaining accurate estimate.
Additionally, the multiplication by introduces gain (as shown in the Table above) and after 16 iterations () the cumulative gain come to 1.64676025786545. Hence the block for compensating the gain.
% Simple Matlab example of phase rotation using CORDIC
% creating the reference angles
Y_k = ones(32,1) + j*2.^(-1*[0:1:31])’; % values of Y
alpha_k = angle(Y_k)*180/pi; % reference angles
X = 2+3*j; % complex number to be phase rotated
thetaDeg = 25; % the phase to be rotated
K = 16; % number of iterations
thetaHat = 0; % initial phase angle
Z = X; % assigning the output as the input
% for different values of k
for k = 0: K-1
s = sign(thetaDeg – thetaHat); % difference
if s == 0 s = 1; end % to handle when thetaDeg = 0
Z = Z*[1 + s*j*2^(-1*k)];
thetaHat = thetaHat + s*alpha_k(k+1);
% dumping the variables for plot
sign_v(k+1) = s;
thetaHat_v(k+1) = thetaHat;
Z_ideal = X*exp(j*thetaDeg*pi/180);
Z_cordic = Z/1.64676025786545;
err = Z_ideal – Z_cordic;
errdB = 10*log10(err*err’)
title(‘thetaHat converging to theta over K iterations’)
[DSPGURU-CORDIC] CORDIC FAQ in dspGuru(TM)
D id you like this article? Make sure that you do not miss a new article by subscribing to RSS feed OR subscribing to e-mail newsletter. Note: Subscribing via e-mail entitles you to download the free e-Book on BER of BPSK/QPSK/16QAM/16PSK in AWGN.