Sign in

username or email:

password:



Not a member?
Forgot your password?

Search blogs



Search tips

Articles by category

Our Bloggers

See Also

Embedded SystemsFPGA

DSP Blogs > Rick Lyons > "Neat" Rectangular to Polar Conversion Algorithm

Rick Lyons
Richard (Rick) Lyons is a consulting Systems Engineer and lecturer with Besser Associates in Mountain View, California. He is the author of "Understanding Digital Signal Processing 2/E" (Prentice-Hall, 2004), and Editor of, and contributor to, "Streamlining Digital Signal Processing, A Tricks of the Trade Guidebook" (IEEE Press/Wiley, 2007). He is also an Associate Editor for the IEEE Signal Processing Magazine.

RSS Feed

Would you like to be notified by email when Rick Lyons publishes a new blog?

  

Pageviews: 470

"Neat" Rectangular to Polar Conversion Algorithm

Posted by Rick Lyons on Nov 15 2010 under Tips and Tricks   

The subject of finding algorithms that estimate the magnitude of a complex number, without having to perform one of those pesky square root operations, has been discussed many times in the past on the comp.dsp newsgroup. That is, given the complex number R + jI in rectangular notation, we want to estimate the magnitude of that number represented by M as:

On August 25th, 2009, Jerry (Mr. Wizard) Avins posted an interesting message on this subject to the comp.dsp newsgroup (Subject: "Re: Complex versus real numbers"). In his message Jerry said that in the ol' days before hand calculators, experienced slide rule users performed rectangular-to-polar conversion using:

I'm not rightly sure why the algorithm in Eq. (2) seemed so startling, and appealing, to me. Maybe because it (surprisingly) seemed to translate a square root operation into forward/inverse trigonometric, and ratio, operations. (All of which could be performed on a slide rule.) In any case, this "neat" algorithm, as they say in the U.S. Military, "works fine and lasts a long time."

Can you figure out why Eq. (2) is true? Once you do, you'll see a good example of how a simple idea can appear to be complex, ... oops, I mean complicated.



Rate this article:
4.665
Rating: 4.67 | Votes: 3
 
   
 
posted by Rick Lyons
Richard (Rick) Lyons is a consulting Systems Engineer and lecturer with Besser Associates in Mountain View, California. He is the author of "Understanding Digital Signal Processing 2/E" (Prentice-Hall, 2004), and Editor of, and contributor to, "Streamlining Digital Signal Processing, A Tricks of the Trade Guidebook" (IEEE Press/Wiley, 2007). He is also an Associate Editor for the IEEE Signal Processing Magazine.

Previous post by Rick Lyons: Improved Narrowband Lowpass IIR Filters
Next post by Rick Lyons: Multiplying Two Binary Numbers
all articles by Rick Lyons

Would you like to be notified by email when Rick Lyons publishes a new blog?

  


Comments


tjc
Said:
I spent a while looking at Eq. (2) wondering why you'd ever want to make that conversion in practice, and then I read on and saw the comment about slide rules. I'm in my early 20's and I'm currently working as a digital hardware engineer, so I immediately started thinking in terms of CORDIC and such. Always good to be reminded that not every problem is solved with transistors :) --Tom
3 years ago
0
Reply
Sorry, you need javascript enabled to post any comments.
steveu
Said:
These are the kinds of expressions we learned in the early days of trig at school, forgot after the exams, and constantly struggle to reinvent when we need then. :-) I find "Can you figure out why Eq. (2) is true?" an odd question. Its a neat expression, but its blatantly obvious just why it works once you've seen it.
3 years ago
0
Reply
Sorry, you need javascript enabled to post any comments.
FatherTorque
Said:
Thats a good trick (especially for slide ruler - you don't need to remember items to sum them, you just do one operation after another) - but it may be essential to clarify, that tan^(-1) here is not like 1/tan(), but its like arctan(), i.e. getting angle from its tangent.
2 years ago
0
Reply
Sorry, you need javascript enabled to post any comments.
eephd
Said:
Good old Pythagoras theorem. You put it very aptly, simple things can indeed appear complicated.
2 years ago
0
Reply
Sorry, you need javascript enabled to post any comments.
fpgaplayer
Said:
why Eq. (2) is true, How humorous Mr Lyons is. haha,I know IQ/(I^2+0.28125*Q^2), but I hate div , so I like CORIDIC better.
2 years ago
0
Reply
Sorry, you need javascript enabled to post any comments.
Sorry, you need javascript enabled to post any comments.