Configuring CORDIC ATAN Block in Simulink
Question
I am using the CORDIC ATAN block in Simulink. I am using this block to calculate the Phase difference.
here is the part of the model that I am using:
I am giving the input a and b as 0, and I was expecting the value of Phase_Signal
to be zero as well.
But apparently its not. I am getting Phase_Signal
as 1.7277.
Please let me know, if I have configured the CORDIC block not properly.
ATAN Block Parameters:
Thanks
Kiran
Solution
Your expectation is just wrong. The point (0,0) has no unique phase. Every value is right. To help your understanding, visualize a point that has coordinates which you transform from euclidic representation (a,b) into polar coordinates (r, phi). For every point EXCEPT (0,0) you get a unique r and phi for your a and b. But for (0,0) only r is uniquely identified with r = 0. But the angle could be every possible value.
So for the input (0,0) you could get any phase - not even always the same, but once 0, once 1.7 and once 0.5, or whatever (but afair the Xilinx coregen cordic cores are deterministic and stateless, so the result should be always the same, when using them).