Skip to main content
Bumped by Community user
edited tags; edited title
Link
Null
  • 7.7k
  • 17
  • 37
  • 48

Why am I getting linear phase?

added 20 characters in body; edited title
Source Link
ocrdu
  • 9.3k
  • 23
  • 32
  • 42

why Am Why am I getting linear phase

I'm trying to plot the phase of Fourier transform of the function below:   

\begin{gather*} x[n] = 2e^{-0.9|n|} \: \: n \in [-5,5]\\ x[n] = 0 \:\: n \notin [-5,5] \end{gather*}

which is equal to the function below:

\begin{gather*} x[n] = 2e^{-0.9|n|} \times \mathrm{rect}(5) \end{gather*} so

so I calculated the Fourier transform like below:   

\begin{gather*} x[n] = 2e^{-0.9|n|} \times \mathrm{rect}(5)\\ y[n] = \alpha^{|n|} \:\: |\alpha |< 1 \\ Y[e^{jw}] = \frac{1-\alpha^2}{1+\alpha^2-2\alpha \cos(w)}\\ \longrightarrow x[n] = 2(\frac{1}{e^{0.9}})^{|n|} \longrightarrow\\ X[e^{jw}] = \frac{1}{2\pi} 2 \frac{1-(\frac{1}{e^{0.9}})^2}{1+(\frac{1}{e^{0.9}})^2-2(\frac{1}{e^{0.9}}) \cos(w)} * \frac{\sin\left(w(\frac{1}{2}+5\right)}{\sin\left(\frac{w}{2}\right)}\\ X[e^{jw}] = \frac{1}{\pi} \frac{1-(\frac{1}{e^{0.9}})^2}{1+(\frac{1}{e^{0.9}})^2-2(\frac{1}{e^{0.9}}) \cos(w)} * \frac{\sin\left(\frac{11w}{2}\right)}{\sin\left(\frac{w}{2}\right)} \end{gather*} in

in which * represents a convolution so as. As you see I shouldn't get linear phase because both sides of the convolution doesn'tdon't even have phase. However, when I draw it in Matlab I get linear phase and I'm stuck. I don't know why.

x = @(t) 2*exp(-0.9 .* abs(t)).* ((t<= 5) & (t>= -5));
time_step =1;
t = -5:time_step:5;
yfft = fftshift(fft(x(t)));
f = linspace(-pi, pi, numel(yfft));
plot(f,unwrap(angle(yfft)));
xlim([-pi,pi]);

I also added N number to fftFFT so it padpads the function bywith zero, but the result is same as before.   

enter image description here

The plot is like above and phase is linear which it shouldn't be.

why Am I getting linear phase

I'm trying to plot the phase of Fourier transform of the function below:  \begin{gather*} x[n] = 2e^{-0.9|n|} \: \: n \in [-5,5]\\ x[n] = 0 \:\: n \notin [-5,5] \end{gather*}

which is equal to the function below:

\begin{gather*} x[n] = 2e^{-0.9|n|} \times \mathrm{rect}(5) \end{gather*} so I calculated Fourier transform like below:  \begin{gather*} x[n] = 2e^{-0.9|n|} \times \mathrm{rect}(5)\\ y[n] = \alpha^{|n|} \:\: |\alpha |< 1 \\ Y[e^{jw}] = \frac{1-\alpha^2}{1+\alpha^2-2\alpha \cos(w)}\\ \longrightarrow x[n] = 2(\frac{1}{e^{0.9}})^{|n|} \longrightarrow\\ X[e^{jw}] = \frac{1}{2\pi} 2 \frac{1-(\frac{1}{e^{0.9}})^2}{1+(\frac{1}{e^{0.9}})^2-2(\frac{1}{e^{0.9}}) \cos(w)} * \frac{\sin\left(w(\frac{1}{2}+5\right)}{\sin\left(\frac{w}{2}\right)}\\ X[e^{jw}] = \frac{1}{\pi} \frac{1-(\frac{1}{e^{0.9}})^2}{1+(\frac{1}{e^{0.9}})^2-2(\frac{1}{e^{0.9}}) \cos(w)} * \frac{\sin\left(\frac{11w}{2}\right)}{\sin\left(\frac{w}{2}\right)} \end{gather*} in which * represents convolution so as you see I shouldn't get linear phase because both sides of the convolution doesn't even have phase. However, when I draw it in Matlab I get linear phase and I'm stuck. I don't know why.

x = @(t) 2*exp(-0.9 .* abs(t)).* ((t<= 5) & (t>= -5));
time_step =1;
t = -5:time_step:5;
yfft = fftshift(fft(x(t)));
f = linspace(-pi, pi, numel(yfft));
plot(f,unwrap(angle(yfft)));
xlim([-pi,pi]);

I also added N number to fft so it pad the function by zero but result is same as before.  enter image description here

The plot is like above and phase is linear which it shouldn't be.

Why am I getting linear phase

I'm trying to plot the phase of Fourier transform of the function below: 

\begin{gather*} x[n] = 2e^{-0.9|n|} \: \: n \in [-5,5]\\ x[n] = 0 \:\: n \notin [-5,5] \end{gather*}

which is equal to the function below:

\begin{gather*} x[n] = 2e^{-0.9|n|} \times \mathrm{rect}(5) \end{gather*}

so I calculated the Fourier transform like below: 

\begin{gather*} x[n] = 2e^{-0.9|n|} \times \mathrm{rect}(5)\\ y[n] = \alpha^{|n|} \:\: |\alpha |< 1 \\ Y[e^{jw}] = \frac{1-\alpha^2}{1+\alpha^2-2\alpha \cos(w)}\\ \longrightarrow x[n] = 2(\frac{1}{e^{0.9}})^{|n|} \longrightarrow\\ X[e^{jw}] = \frac{1}{2\pi} 2 \frac{1-(\frac{1}{e^{0.9}})^2}{1+(\frac{1}{e^{0.9}})^2-2(\frac{1}{e^{0.9}}) \cos(w)} * \frac{\sin\left(w(\frac{1}{2}+5\right)}{\sin\left(\frac{w}{2}\right)}\\ X[e^{jw}] = \frac{1}{\pi} \frac{1-(\frac{1}{e^{0.9}})^2}{1+(\frac{1}{e^{0.9}})^2-2(\frac{1}{e^{0.9}}) \cos(w)} * \frac{\sin\left(\frac{11w}{2}\right)}{\sin\left(\frac{w}{2}\right)} \end{gather*}

in which * represents a convolution. As you see I shouldn't get linear phase because both sides of the convolution don't even have phase. However, when I draw it in Matlab I get linear phase and I'm stuck. I don't know why.

x = @(t) 2*exp(-0.9 .* abs(t)).* ((t<= 5) & (t>= -5));
time_step =1;
t = -5:time_step:5;
yfft = fftshift(fft(x(t)));
f = linspace(-pi, pi, numel(yfft));
plot(f,unwrap(angle(yfft)));
xlim([-pi,pi]);

I also added N number to FFT so it pads the function with zero, but the result is same as before. 

enter image description here

The plot is like above and phase is linear which it shouldn't be.

added 68 characters in body
Source Link
Null
  • 7.7k
  • 17
  • 37
  • 48

I'm trying to plot Phasethe phase of Fourier transform of the function bellow below: \begin{gather*} x[n] = 2e^{-0.9|n|} \: \: n \in [-5,5]\\ x[n] = 0 \:\: n \notin [-5,5] \end{gather*} which

which is equal to the function bellowbelow:

\begin{gather*} x[n] = 2e^{-0.9|n|} \times rect(5) \end{gather*}\begin{gather*} x[n] = 2e^{-0.9|n|} \times \mathrm{rect}(5) \end{gather*} so I calculated Fourier transform like below: \begin{gather*} x[n] = 2e^{-0.9|n|} \times rect(5)\\ y[n] = \alpha^{|n|} \:\: |\alpha |< 1 \\ Y[e^{jw}] = \frac{1-\alpha^2}{1+\alpha^2-2\alpha cos(w)}\\ \longrightarrow x[n] = 2(\frac{1}{e^{0.9}})^{|n|} \longrightarrow\\ X[e^{jw}] = \frac{1}{2\pi} 2 \frac{1-(\frac{1}{e^{0.9}})^2}{1+(\frac{1}{e^{0.9}})^2-2(\frac{1}{e^{0.9}}) cos(w)} * \frac{sin(w(\frac{1}{2}+5)}{sin(\frac{w}{2})}\\ X[e^{jw}] = \frac{1}{\pi} \frac{1-(\frac{1}{e^{0.9}})^2}{1+(\frac{1}{e^{0.9}})^2-2(\frac{1}{e^{0.9}}) cos(w)} * \frac{sin(\frac{11w}{2})}{sin(\frac{w}{2})} \end{gather*}\begin{gather*} x[n] = 2e^{-0.9|n|} \times \mathrm{rect}(5)\\ y[n] = \alpha^{|n|} \:\: |\alpha |< 1 \\ Y[e^{jw}] = \frac{1-\alpha^2}{1+\alpha^2-2\alpha \cos(w)}\\ \longrightarrow x[n] = 2(\frac{1}{e^{0.9}})^{|n|} \longrightarrow\\ X[e^{jw}] = \frac{1}{2\pi} 2 \frac{1-(\frac{1}{e^{0.9}})^2}{1+(\frac{1}{e^{0.9}})^2-2(\frac{1}{e^{0.9}}) \cos(w)} * \frac{\sin\left(w(\frac{1}{2}+5\right)}{\sin\left(\frac{w}{2}\right)}\\ X[e^{jw}] = \frac{1}{\pi} \frac{1-(\frac{1}{e^{0.9}})^2}{1+(\frac{1}{e^{0.9}})^2-2(\frac{1}{e^{0.9}}) \cos(w)} * \frac{\sin\left(\frac{11w}{2}\right)}{\sin\left(\frac{w}{2}\right)} \end{gather*} in which * represents convolution so as you see I shouldn't get linear phase because both sidesides of the convolution doesn't have even have phase but as i. However, when I draw it in matlab iMatlab I get linear phase and I'm stuck. I don't know why? $$ $$ can any one help me?.

x = @(t) 2*exp(-0.9 .* abs(t)).* ((t<= 5) & (t>= -5));
time_step =1;
t = -5:time_step:5;
yfft = fftshift(fft(x(t)));
f = linspace(-pi, pi, numel(yfft));
plot(f,unwrap(angle(yfft)));
xlim([-pi,pi]);

I also added N number to fftfft so it pad the function by zero but result is same as before. enter image description here the

The plot is like above and phase is linear which it shouldn't be.

I'm trying to plot Phase of Fourier transform of function bellow : \begin{gather*} x[n] = 2e^{-0.9|n|} \: \: n \in [-5,5]\\ x[n] = 0 \:\: n \notin [-5,5] \end{gather*} which is equal to function bellow:

\begin{gather*} x[n] = 2e^{-0.9|n|} \times rect(5) \end{gather*} so I calculated Fourier transform like below: \begin{gather*} x[n] = 2e^{-0.9|n|} \times rect(5)\\ y[n] = \alpha^{|n|} \:\: |\alpha |< 1 \\ Y[e^{jw}] = \frac{1-\alpha^2}{1+\alpha^2-2\alpha cos(w)}\\ \longrightarrow x[n] = 2(\frac{1}{e^{0.9}})^{|n|} \longrightarrow\\ X[e^{jw}] = \frac{1}{2\pi} 2 \frac{1-(\frac{1}{e^{0.9}})^2}{1+(\frac{1}{e^{0.9}})^2-2(\frac{1}{e^{0.9}}) cos(w)} * \frac{sin(w(\frac{1}{2}+5)}{sin(\frac{w}{2})}\\ X[e^{jw}] = \frac{1}{\pi} \frac{1-(\frac{1}{e^{0.9}})^2}{1+(\frac{1}{e^{0.9}})^2-2(\frac{1}{e^{0.9}}) cos(w)} * \frac{sin(\frac{11w}{2})}{sin(\frac{w}{2})} \end{gather*} in which * represents convolution so as you see I shouldn't get linear phase because both side of convolution doesn't have even phase but as i draw it in matlab i get linear phase and I'm stuck. I don't know why? $$ $$ can any one help me?

x = @(t) 2*exp(-0.9 .* abs(t)).* ((t<= 5) & (t>= -5));
time_step =1;
t = -5:time_step:5;
yfft = fftshift(fft(x(t)));
f = linspace(-pi, pi, numel(yfft));
plot(f,unwrap(angle(yfft)));
xlim([-pi,pi]);

I also added N number to fft so it pad the function by zero but result is same as before. enter image description here the plot is like above and phase is linear which it shouldn't be.

I'm trying to plot the phase of Fourier transform of the function below: \begin{gather*} x[n] = 2e^{-0.9|n|} \: \: n \in [-5,5]\\ x[n] = 0 \:\: n \notin [-5,5] \end{gather*}

which is equal to the function below:

\begin{gather*} x[n] = 2e^{-0.9|n|} \times \mathrm{rect}(5) \end{gather*} so I calculated Fourier transform like below: \begin{gather*} x[n] = 2e^{-0.9|n|} \times \mathrm{rect}(5)\\ y[n] = \alpha^{|n|} \:\: |\alpha |< 1 \\ Y[e^{jw}] = \frac{1-\alpha^2}{1+\alpha^2-2\alpha \cos(w)}\\ \longrightarrow x[n] = 2(\frac{1}{e^{0.9}})^{|n|} \longrightarrow\\ X[e^{jw}] = \frac{1}{2\pi} 2 \frac{1-(\frac{1}{e^{0.9}})^2}{1+(\frac{1}{e^{0.9}})^2-2(\frac{1}{e^{0.9}}) \cos(w)} * \frac{\sin\left(w(\frac{1}{2}+5\right)}{\sin\left(\frac{w}{2}\right)}\\ X[e^{jw}] = \frac{1}{\pi} \frac{1-(\frac{1}{e^{0.9}})^2}{1+(\frac{1}{e^{0.9}})^2-2(\frac{1}{e^{0.9}}) \cos(w)} * \frac{\sin\left(\frac{11w}{2}\right)}{\sin\left(\frac{w}{2}\right)} \end{gather*} in which * represents convolution so as you see I shouldn't get linear phase because both sides of the convolution doesn't even have phase. However, when I draw it in Matlab I get linear phase and I'm stuck. I don't know why.

x = @(t) 2*exp(-0.9 .* abs(t)).* ((t<= 5) & (t>= -5));
time_step =1;
t = -5:time_step:5;
yfft = fftshift(fft(x(t)));
f = linspace(-pi, pi, numel(yfft));
plot(f,unwrap(angle(yfft)));
xlim([-pi,pi]);

I also added N number to fft so it pad the function by zero but result is same as before. enter image description here

The plot is like above and phase is linear which it shouldn't be.

added 8 characters in body
Source Link
Loading
Source Link
Loading