in [DSP]

From: Nasser M. Abbasi on 17 Jan 2010 05:58 I am a little confused by the phase diagram of the sinc function outside the main loop. I wrote a small demo program where I plot the magnitude spectrum and the phase spectrum of the sinc function. I used Mathematica Arg[] function for the phase diagram. For the main loop, the phase is zero. Then the phase alternates between Pi and 0 over the remaining smaller loops. But I just looked at this text book I have by Stein and Jones, called "Modern communication principles", where the book shows the phase outside the main loop to fluctuate between +- Pi and 0. I have scanned the page in question, here it is http://12000.org/tmp/phase_sinc/book.png (the diagram is at the lower right edge of the above pic). Compare the above to what I get, which you can see by clicking on the screen shot of my program which is the first one listed of this page below http://12000.org/my_notes/mma_demos/index.htm (ps. if you have the free Mathematica player, you could run the above program also) Also, the phase diagram I have agrees with this web page I just saw at dsprleated: http://www.dsprelated.com/dspbooks/sasp/Rectangular_Window.html (scroll down to figure 1.10 near the middle of the above page to see the sinc phase diagram). So, my question is, which phase diagram do you think is correct? Is it possible that the book is wrong? thanks --Nasser
From: Rune Allnor on 17 Jan 2010 07:06 On 17 Jan, 11:58, "Nasser M. Abbasi" <n... (a)12000.org> wrote:> I am a little confused by the phase diagram of the sinc function outside the > main loop. .... > So, my question is, which phase diagram do you think is correct? Is it > possible that the book is wrong? All of the phase diagrams are correct. All of them show phase angles of either 0 rads or +/- pi rads. A phase of +/- pi rads correspond to a scale factor -1. It does not matter whether one chooses the + or - sign in the phase term. While formally correct, it would be very interesting to hear what reasons the author of the book had for using alternating sigs in the phase diagrams, though. Rune
From: Muzaffer Kal on 17 Jan 2010 11:53 On Sun, 17 Jan 2010 04:06:33 -0800 (PST), Rune Allnor <allnor (a)tele.ntnu.no> wrote:>On 17 Jan, 11:58, "Nasser M. Abbasi" <n... (a)12000.org> wrote:>> I am a little confused by the phase diagram of the sinc function outside the >> main loop. >... >> So, my question is, which phase diagram do you think is correct? Is it >> possible that the book is wrong? > >All of the phase diagrams are correct. All of them show >phase angles of either 0 rads or +/- pi rads. A phase of >+/- pi rads correspond to a scale factor -1. It does not >matter whether one chooses the + or - sign in the phase >term. > >While formally correct, it would be very interesting to >hear what reasons the author of the book had for using >alternating sigs in the phase diagrams, though. Actually the reason is in the scan posted (and correctly). The phase spectrum of a real function should be odd so selecting +pi always is not appropriate. The graph in the book shows an odd function as expected. -- Muzaffer Kal DSPIA INC. ASIC/FPGA Design Services http://www.dspia.com
From: Tim Wescott on 17 Jan 2010 15:49 On Sun, 17 Jan 2010 04:58:44 -0600, Nasser M. Abbasi wrote: > I am a little confused by the phase diagram of the sinc function outside > the main loop. > > I wrote a small demo program where I plot the magnitude spectrum and the > phase spectrum of the sinc function. I used Mathematica Arg[] function > for the phase diagram. > > For the main loop, the phase is zero. Then the phase alternates between > Pi and 0 over the remaining smaller loops. > > But I just looked at this text book I have by Stein and Jones, called > "Modern communication principles", where the book shows the phase > outside the main loop to fluctuate between +- Pi and 0. > > I have scanned the page in question, here it is > > http://12000.org/tmp/phase_sinc/book.png > > (the diagram is at the lower right edge of the above pic). > > Compare the above to what I get, which you can see by clicking on the > screen shot of my program which is the first one listed of this page > below http://12000.org/my_notes/mma_demos/index.htm > > (ps. if you have the free Mathematica player, you could run the above > program also) > > Also, the phase diagram I have agrees with this web page I just saw at > dsprleated: > > http://www.dsprelated.com/dspbooks/sasp/Rectangular_Window.html > > (scroll down to figure 1.10 near the middle of the above page to see the > sinc phase diagram). > > So, my question is, which phase diagram do you think is correct? Is it > possible that the book is wrong? > > thanks > --Nasser What is the difference between -1 and -1? Well, on the one hand -1 has a phase of +pi, while on the other hand -1 has a phase of -pi. Wait... -- www.wescottdesign.com
From: Greg Heath on 18 Jan 2010 04:02
On Jan 17, 5:58 am, "Nasser M. Abbasi" <n... (a)12000.org> wrote:> I am a little confused by the phase diagram of the sinc function outside the > main loop. > > I wrote a small demo program where I plot the magnitude spectrum and the > phase spectrum of the sinc function. I used Mathematica Arg[] function for > the phase diagram. > > For the main loop, the phase is zero. Then the phase alternates between Pi > and 0 over the remaining smaller loops. > > But I just looked at this text book I have by Stein and Jones, called > "Modern communication principles", where the book shows the phase outside > the main loop to fluctuate between +- Pi and 0. > > I have scanned the page in question, here it is > > http://12000.org/tmp/phase_sinc/book.png > > (the diagram is at the lower right edge of the above pic). > > Compare the above to what I get, which you can see by clicking on the screen > shot of my program which is the first one listed of this page belowhttp://12000.org/my_notes/mma_demos/index.htm > > (ps. if you have the free Mathematica player, you could run the above > program also) > > Also, the phase diagram I have agrees with this web page I just saw at > dsprleated: > > http://www.dsprelated.com/dspbooks/sasp/Rectangular_Window.html > > (scroll down to figure 1.10 near the middle of the above page to see the > sinc phase diagram). > > So, my question is, which phase diagram do you think is correct? Is it > possible that the book is wrong? If the phase is obtained via the ratio y/x via atan2(y,x), the principal value is defined over the half closed interval (-pi,pi]. http://en.wikipedia.org/wiki/Atan2 For example, MATLAB yields >> eps, atan2(-eps,-1),atan2(0,-1),atan2(eps,-1) ans = 2.220446049250313e-016 ans = -3.14159265358979 ans = 3.14159265358979 ans = 3.14159265358979 Hope this helps. Greg |