Implementation of Cordic Algorithm Using

download Implementation of Cordic Algorithm Using

of 3

Transcript of Implementation of Cordic Algorithm Using

  • 7/25/2019 Implementation of Cordic Algorithm Using

    1/3

    IMPLEMENTATION OF CORDIC

    ALGORITHM USING MATLAB & VHDL FOR

    WLAN RECEIVER

    Mr. Sandeep Bidwai1, Prof. Dr. S.P. Patil2and Mr. Saylee S. Bidwai3

    [email protected]

    Abstract:

    This paper is focused on the CORDIC algorithm for wireless LAN.The primary task is to create a VHDL description for CORDIC

    vector rotation algorithm. The basic work has been carried out inMATLAB. The VHDL implementation of the CORDIC algorithm isbased on the results obtained from the MATLABs simulationenvironment. The accuracy of vector value in the receiver dependson its number of bits. The main task is to make the calculated anglevalue point the vector to the same constellation point, not to nearestone. This is the cause that determines the required accuracy of theangle calculation. The program in MATLAB calculates the first 20

    steps of the CORDIC algorithm and displays how accurate eachstep is. It takes the closest vectors in the signal constellation asinput. CORDIC moduld to which the calculated angle theta is givenas input to comput the sine and cosine functions using Simulink.Last Step includes the VHDL implementation of CORDIC and thesimulation results.

    Key Words: CORDIC, MATL AB,VHDL, OFDM , WLAN,

    I INTRODUCTION:The CORDIC (COordinate Rotation DIgital

    Computer) algorithm was developed by Volder in 1959. Itrotates the vector, stepbystep, with a given angle.Additional theoretical work has been done by Walther in

    1971. The main principle of CORDIC are calculations basedon shiftregisters and adders instead of multiplications, whatsaves much hardware resources.All trigonometric functions

    can be computed using vector rotation. CORDIC is used for

    polar to rectangular and rectangular to polar conversions and

    also for calculation of trigonometric functions, vectormagnitude and in some transformations, like discrete Fourier

    transform (DFT) or discrete cosine transform (DCT). In

    particular case, the CORDIC algorithm is used in wireless

    LAN (WLAN) by receivers.

    This paper is organized in following five steps. Step

    first contains the CORDIC algorithm, its architecture andWLAN with OFDM system. Step second deals with the

    implementation of OFDM system in WLAN using FFT/IFFTin MATLAB. Step third includes the implementation of

    CORDIC algorithm in MATLAB for the WLAN receiver in

    order to find out the angle of incomming vectors fromtransmitter. Step four deals with CORDIC moduld to which

    the calculated angle theta is given as input to comput the sine

    and cosine functions using Simulink. Step five includes the

    VHDL implementation of CORDIC and the simulation

    results.

    II. CORDIC algorithm for Sine and cosine

    1 . Arithmatics

    Figure 1 represents the block diagram of conventionalCORDIC algorithm , based on ripple carry adders or sub

    tractors

    Fig.1 Block diagram of cordic

    An adder/subtractor (A/S), depending on a selection input,

    performs an addition or a subtraction. This input indicates

    whether an operand is negative. The basic cell of A/S is

    decomposed by two functions with 4 bits input each. One ofthem is for calculating the output and another to transmit thecarry. According to this an Nbit A/S can fit in (2N+1)/2CLBs (configurable logic block). The additional half CLB isrequired for introducing the least significant bit (LSB) one in

    case of the substraction. The critical path here is indicated bythe ripple carry propagation and the routing delay of the A/S

    wire. This net has a fanout of 2N in this case. It decreasesthe performance of the circuit and it is the main disadvantage

    of conventional CORDIC implementations. As the solution

    to this, redundant arithmetic could be used to increase the

    speed of the CORDIC. Implementation avoids the carry

    propagation from the LSB to the most significant bit (MSB),due to its carryfree property. Redundant arithmetic is goodto accelerate those operations, which have a long propagation

    mailto:[email protected]:[email protected]:[email protected]
  • 7/25/2019 Implementation of Cordic Algorithm Using

    2/3

    delay. On the other hand redundant arithmetic also has some

    disadvantages. For example, it is impossible to detect the

    sign of a redundant number without checking all the digits

    which expects a propagation from the MSB to the LSB.

    Another problem, that the redundant arithmetic uses digit set{1,0,1}, and needs more hardware resources to executesimple tasks, than the conventional one which uses digit set{1,1}.According to results of the research, the redundantarithmetic is more accurate, but it needs much morehardware than the conventional arithmetic and for this reason

    conventional arithmetic has been used in this work. [2]

    III. CORDIC module design

    Fig. 2 CORDIC module to implement Sine and Cosine

    Above fig. shows the CORDIC module forimplementating Sine and cosine Trignometric function using

    Embedded MATLAB function block.

    The basic equations for vector rotation are [4]x = cos()[x-ytan()]

    y = cos()[y+xtan()] = Rotation angle. (1)where x and y are original coordinates before rotation and xand y are the coordinates after rotation. This equatationcan

    be simplified by assuming that the tangent is a power of 2.

    Tan() = + 2^(-n) (2)Then any angle of rotation can be obtained by performingsuccessive smaller rotations. This assumption help us to

    write equation (1) in the form of iterative operations.

    Xn+1 = Kn [xn-yndn 2^(-n)]

    Yn+1 = Kn [yn+xndn 2^(-n)]

    Zn+1 = zndnatan 2^(-n)Kn = cos(atan 2^-n)) = 1 + 1+ 2^(-2n)

    Dn = +1 (3)These equations can be used in two different modes: rotation

    mode and vector mode. In rotation mode, the input vectorrotates by a specific angle. In vector mode, the input vector

    rotates to the x axis.In rotation mode the following equations are used:

    Xn+1 = Kn [xnyndn 2^(-n)]Yn+1 = Kn[yn + xndn 2^(-n)]

    Zn+1 = zndnatan2^(-n)]

    Dn =-1 if zn

  • 7/25/2019 Implementation of Cordic Algorithm Using

    3/3

    maintained 24 bits. The inputs are applied in the CORDIC

    formats in 1QN format. And the respective output is

    observed in 2 QN format by performing the simulation of

    test benches of the module in Modelsim simultor.

    Figure 4 CORDIC module in VHDL

    The inputs given to module in terms of Z0 is in the CORDIC

    data format. The output is observed in x(n) and y(n) i.e.

    cosine and sine functions as discussed previously.

    Fig. 5 output wave forms for Main CORDIC module

    CONCLUSIONThe CORDIC module designed in MATLAB

    simulink has more flexibility to operate for the

    implementation of the trignometric function Sine and

    Cosine. The CORDIC rotations can be used to perform the

    operations on the given input angle to rotate it to the desired

    direction and magnitude and phase can be computed. Finnaly

    the VHDL module varifies the performance of CORDIC

    module with the help of Modelsim simulator.

    REFERENCES

    [1]

    Valls. J. Kuhmann. M. Parhi, K.K. Efficient Mapping of CORDICAlgorithm on FPGA, Signal processing systems 2000 . IEEEworkshop, pp336-343, 11-13 oct. 2000.

    [2] Anastasia Lashko, Oleg Zakaznov, CORDIC implementation usingVHDL for WLAN receiver,

    [3] Benjamin Heyne, Jurgen Gotze ,A pure cordic based FFT forreconfigurable digital signalprocessing

    [4] Volder J.E.: "The CORDIC Trigonometric Computing Technique", IRETrans. Electronic Computers, vol. EC8, pp 330334, 1959.

    BIO DATA OF AUTHOR(S)

    Mr. Sandeep S. Bidwai

    Working as a lecturer in E & TC Dept, at ADCETAshta, Dist- Sangli (MS- INDIA). Completed his

    BE (E & TC) from BAM University Aurangabad (MS)

    Currently doing ME (Electronics)from Sivaji UniversityKolhapur (MS). He has 3 Yrs of teaching experience

    & field of interestVLSI design

    Prof.Dr. S. P. PatilPresently working as Principal ADCET Ashta, Dist-

    Sangli (MS- INDIA). He has completed his BE, ME(Electronics) & PhD from Shivaji University, Kolhapur

    & He has 21Yrs of experience & his areas of interest are

    Signal processing & biomedical engineering.

    Mrs. Saylee S. Bidwai

    Working as a lecturer in E & TC Dept, at ADCETAshta, Dist- Sangli (MS- INDIA). Completed her

    BE (Electronics) from SRT University Nanded (MS)

    Currently doing ME (Electronics)from Sivaji UniversityKolhapur (MS). She has 3.5 Yrs of teaching experience

    & field of interestVLSI design.