Processing of a complex signal represented by real and imaginary parts is an inherent part of DSP processing. One of the important blocks is the Estimator of complex signal magnitude and angle from the real signal (Re) and imaginary signal (Im) components.

Fig.1 Estimator for complex signal magnitude and angle

The Coordinate Rotation Digital Computer (CORDIC) algorithm is an efficient method for estimating the magnitude and angle of complex signals.

Fig. 2 Block diagram of CORDIC algorithm

The CORDIC algorithm consists of three parts: preprocessing, cascade connection of key blocks and post-processing. Figure 3 illustrates one of the key blocks in the cascade connection.

Fig.3 One key block from the sequence of key blocks

Preprocessing takes signal values and treats them separately. Absolute values |Re| and |Im| form the signal vector in the first quadrant. Then processing in the cascade connection of key blocks is performed. The number of key blocks *N* defines the precision (error) of the magnitude and angle estimation. In each key block the vector is rotated by the angle π/2^{(n+2)}. If the vector imaginary part is positive, the rotation is clockwise; if negative, the rotation is counter clockwise. The signs of the rotation direction define the signs of constants *V*_{n} in the sum for angle estimation (see below). After *N* rotations the vector will be almost horizontal and its magnitude will be equal to the real part. The post processing block updates the angle value based on the signs of the input real and imaginary parts.

The algorithm is described using the following equations:

*A*_{0} = *S*_{Re}+*S*_{Im};*B*_{0}= – *S*_{Re}+*S*_{Im};

*S*_{n} = sign(*B*_{n-1});

*A*_{n}= *C*_{n-1}= *S*_{n}*B*_{n-1}·0.5 + *A*_{n-1};

*B*_{n} = *D*_{n-1 }= 2(*S*_{n}*A*_{n-1}·0.5 + *B*_{n-1});

*n* = 0,…,*N*-1.

*Angle =*(sign(*S*_{Re})· +0.5·(sign(*S*_{Re})-1)*·*sign(*S*_{Im})

*Magnitude* = *C*_{N}_{-1};

*V*_{n} = atan(2^{-n-1});*K* –constant that depends on *N.*

To discuss your video application with our engineering staff, please contact us. Custom design solutions are also available to meet your specific requirements.

## More Information