DSPRelated.com
Forums

if i phase shift a sine wave does it cause spectral leakage?

Started by bharat pathak July 28, 2010
Hello All,

    Lets say,

    N   = 32;
    n   = 0 : N-1;
    fin = 1500 hz; 
    Fs  = 48000 hz; % Fs/fin = 32/1
     
    xn  = sin(2*pi*fin*n/Fs + theta)
    xk  = fft(xn)

    If Fs and fin are exact mutiple, if i have theta non-zero,
    will it cause spectral leakage in FFT mag response, or it will
    show up as an added offset in the phase plot?

Regards
Bharat
On 28 Jul, 15:58, "bharat pathak" <bharat@n_o_s_p_a_m.arithos.com>
wrote:
> Hello All, > > &#4294967295; &#4294967295; Lets say, > > &#4294967295; &#4294967295; N &#4294967295; = 32; > &#4294967295; &#4294967295; n &#4294967295; = 0 : N-1; > &#4294967295; &#4294967295; fin = 1500 hz; > &#4294967295; &#4294967295; Fs &#4294967295;= 48000 hz; % Fs/fin = 32/1 > > &#4294967295; &#4294967295; xn &#4294967295;= sin(2*pi*fin*n/Fs + theta) > &#4294967295; &#4294967295; xk &#4294967295;= fft(xn) > > &#4294967295; &#4294967295; If Fs and fin are exact mutiple, if i have theta non-zero, > &#4294967295; &#4294967295; will it cause spectral leakage in FFT mag response, or it will > &#4294967295; &#4294967295; show up as an added offset in the phase plot? > > Regards > Bharat
Why don't you try it and see? Rune

Rune Allnor wrote:

> On 28 Jul, 15:58, "bharat pathak" <bharat@n_o_s_p_a_m.arithos.com> > wrote: > >>Hello All, >> >> Lets say, >> >> N = 32; >> n = 0 : N-1; >> fin = 1500 hz; >> Fs = 48000 hz; % Fs/fin = 32/1 >> >> xn = sin(2*pi*fin*n/Fs + theta) >> xk = fft(xn) >> >> If Fs and fin are exact mutiple, if i have theta non-zero, >> will it cause spectral leakage in FFT mag response, or it will >> show up as an added offset in the phase plot? >> >>Regards >>Bharat > > > Why don't you try it and see?
Because he is imbecile and hopeless idiot. Don't you know this already?
On 28 Jul, 16:07, Vladimir Vassilevsky <nos...@nowhere.com> wrote:
> Rune Allnor wrote: > > On 28 Jul, 15:58, "bharat pathak" <bharat@n_o_s_p_a_m.arithos.com> > > wrote: > > >>Hello All, > > >> &#4294967295; &#4294967295;Lets say, > > >> &#4294967295; &#4294967295;N &#4294967295; = 32; > >> &#4294967295; &#4294967295;n &#4294967295; = 0 : N-1; > >> &#4294967295; &#4294967295;fin = 1500 hz; > >> &#4294967295; &#4294967295;Fs &#4294967295;= 48000 hz; % Fs/fin = 32/1 > > >> &#4294967295; &#4294967295;xn &#4294967295;= sin(2*pi*fin*n/Fs + theta) > >> &#4294967295; &#4294967295;xk &#4294967295;= fft(xn) > > >> &#4294967295; &#4294967295;If Fs and fin are exact mutiple, if i have theta non-zero, > >> &#4294967295; &#4294967295;will it cause spectral leakage in FFT mag response, or it will > >> &#4294967295; &#4294967295;show up as an added offset in the phase plot? > > >>Regards > >>Bharat > > > Why don't you try it and see? > > Because he is imbecile and hopeless idiot. Don't you know this already?
Seems I had too much time on my hands... thanks for pointing it out. Rune
On Jul 28, 9:58&#4294967295;am, "bharat pathak" <bharat@n_o_s_p_a_m.arithos.com>
wrote:
> Hello All, > > &#4294967295; &#4294967295; Lets say, > > &#4294967295; &#4294967295; N &#4294967295; = 32; > &#4294967295; &#4294967295; n &#4294967295; = 0 : N-1; > &#4294967295; &#4294967295; fin = 1500 hz; > &#4294967295; &#4294967295; Fs &#4294967295;= 48000 hz; % Fs/fin = 32/1 > > &#4294967295; &#4294967295; xn &#4294967295;= sin(2*pi*fin*n/Fs + theta) > &#4294967295; &#4294967295; xk &#4294967295;= fft(xn) > > &#4294967295; &#4294967295; If Fs and fin are exact mutiple, if i have theta non-zero, > &#4294967295; &#4294967295; will it cause spectral leakage in FFT mag response, or it will > &#4294967295; &#4294967295; show up as an added offset in the phase plot? > > Regards > Bharat
Bharat, Aren't you teaching seminars on DSP? Dirk
bharat pathak wrote:
> Hello All, > > Lets say, > > N = 32; > n = 0 : N-1; > fin = 1500 hz; > Fs = 48000 hz; % Fs/fin = 32/1 > > xn = sin(2*pi*fin*n/Fs + theta) > xk = fft(xn) > > If Fs and fin are exact mutiple, if i have theta non-zero, > will it cause spectral leakage in FFT mag response, or it will > show up as an added offset in the phase plot? > > Regards > Bharat
I'd like to think that there are no dumb questions. So, I will answer in some fashion: - Each sample in the FFT has Real and Imaginary parts or Magnitude and Phase. Right? You know this, right? So, if the phase is changed in any sample, then what happens to the magnitude? Hint: "Nothing" is the right answer. - There is no "phase plot" in the expressions given. Are we supposed to assume what you mean exactly? Hint: If you change the phase, it will change the phase. Fred
On Jul 29, 1:58&#4294967295;am, "bharat pathak" <bharat@n_o_s_p_a_m.arithos.com>
wrote:
> Hello All, > > &#4294967295; &#4294967295; Lets say, > > &#4294967295; &#4294967295; N &#4294967295; = 32; > &#4294967295; &#4294967295; n &#4294967295; = 0 : N-1; > &#4294967295; &#4294967295; fin = 1500 hz; > &#4294967295; &#4294967295; Fs &#4294967295;= 48000 hz; % Fs/fin = 32/1 > > &#4294967295; &#4294967295; xn &#4294967295;= sin(2*pi*fin*n/Fs + theta) > &#4294967295; &#4294967295; xk &#4294967295;= fft(xn) > > &#4294967295; &#4294967295; If Fs and fin are exact mutiple, if i have theta non-zero, > &#4294967295; &#4294967295; will it cause spectral leakage in FFT mag response, or it will > &#4294967295; &#4294967295; show up as an added offset in the phase plot? > > Regards > Bharat
Phase is a relative measure to have any meaning at all, so you would need something to measure phase with respect to. No it doesn't! Hardy
I was just trying to understand FFT and the presence of sine and
cosine terms present as the basis functions. I dont know whats wrong
in asking questions and why cant experts make mistakes in understanding.

Long time back I had pointed an "understanding error" in Rick Lyons book.
and he acknowledged the same. While discussion I had figured it out that
his assumptions were wrong to begin with. Does that mean he does not 
know DSP? 

Regards
Bharat





bharat pathak wrote:
> I was just trying to understand FFT and the presence of sine and > cosine terms present as the basis functions.
Hm. What it should mean?
> I dont know whats wrong > in asking questions and why cant experts make mistakes in understanding.
Oh, nothing wrong. You may even become a PhD.
> Long time back I had pointed an "understanding error" in Rick Lyons book. > and he acknowledged the same. While discussion I had figured it out that > his assumptions were wrong to begin with. Does that mean he does not > know DSP?
"Stupid is as stupid does", as Forrest Gump used to say.
> Regards > Bharat
VLV
On Jul 28, 11:39&#4294967295;pm, Vladimir Vassilevsky <nos...@nowhere.com> wrote:
> bharat pathak wrote: > > I was just trying to understand FFT and the presence of sine and > > cosine terms present as the basis functions. > > Hm. What it should mean? > > > I dont know whats wrong > > in asking questions and why cant experts make mistakes in understanding. > > Oh, nothing wrong. You may even become a PhD. > > > Long time back I had pointed an "understanding error" in Rick Lyons book. > > and he acknowledged the same. While discussion I had figured it out that > > his assumptions were wrong to begin with. Does that mean he does not > > know DSP? > > "Stupid is as stupid does", as Forrest Gump used to say. > > > Regards > > Bharat > > VLV
i think it's Simon Cowell spoofing Vlad V. i didn't make it to the comp.dsp conference to meet "Vladimir" (who i am sure is Simon Cowell) first hand, so i leave it to those who did to verify my suspicion. r b-j