On Tue, 12 Mar 2013 20:09:09 +0000, Antigoni wrote:
> anyone <jaup@h/WSWLG{nR1³qHe> wrote in message
> <513f768b$0$58186$c3e8da3$88b277c5@news.astraweb.com>...
>> On Tue, 12 Mar 2013 17:59:16 +0000, Antigoni wrote:
>>
>> > anyone <jaup@h/WSWLG{nR1³qHe> wrote in message
>> > <513f6b9a$0$38175$c3e8da3$f6268168@news.astraweb.com>...
>> >> On Tue, 12 Mar 2013 17:37:07 +0000, Antigoni wrote:
>> >>
>> >> > Hi all!
>> >> >
>> >> > Suppose you have an equation f(w,x) which involves frequency (w)
>> >> > and space (x) variables and it is solved for various values of
>> >> > these variables between specific ranges. After the solution, I
>> >> > come up with a 2D matrix whose rows represent frequency and
>> >> > columns represent space. I apply an inverse Fourier transform to
>> >> > this matrix using IFFT, in order to construct a matrix in time
>> >> > (rows) and space (columns).
>> >> > My problem starts when I'm trying to increase the number of points
>> >> > used in frequency dimension. To be more specific, I run two
>> >> > different cases:
>> >> >
>> >> > Case A: I solve f(w,x) for 256 points in w and 512 points in x.
>> >> > The range of w is between (-2.5e6 , 2.5e6) Hz, which means that I
>> >> > use a frequency step of df=19607.843. The solution seems ok and
>> >> > when I do the IFFT, everything seems fine. Now I want to increase
>> >> > the points...
>> >> >
>> >> > Case B: So, I increase the points in frequency and I solve f(w,x)
>> >> > for 2048 points in w and 512 points in x (are kept constant). The
>> >> > range of w remains the same, although the frequency step is
>> >> > reduced to df=2442.599.
>> >> > The solution in [frequency,space] domain is correct - the number
>> >> > of points is increased along frequency dimension. This means that
>> >> > when I look at a complete period of my signal I have more points
>> >> > along the signal than I had in case A. However, when I apply the
>> >> > IFFT, it seems llike it zooms out the result, keeping the number
>> >> > of points constant along a complete period.
>> >> >
>> >> > How can I keep the range constant and increase the accuracy of the
>> >> > output signal from ifft?
>> >> > Any related answer is welcome.
>> >> >
>> >> > Thanks a lot!
>> >>
>> >> So, you changed FFT parameters for Case B but otherwise did not
>> >> alter the original sampling rate, correct?
>> >
>> > OK, my mistake! I forgot to mention that the equation f(w,x) came
>> > from analytic fourier transform from time to frequency (I didn't use
>> > fft). For case B I changed only the number of points and the
>> > frequency step.
>>
>> It may be simpler than I first thought -- so, frequency is along a row
>> and 'space' is a column; you keep the number of columns constant, but
>> change the frequency resolution along rows. Next, how are you applying
>> IFFT?
>
> Exactly as you described! I apply ifft as follows:
> u=fftshift(ifft(ifftshift(displ)));
>
> where displ is a (m,512) matrix representing displacements in
> frequency-space domain with m being equal to 256 (case A) or 2048 (case
> B). In the same way, u is the transformed matrix in time-space domain. I
> know that ifft is applied along columns, that's why frequency is at
> rows.
That's a typo, or you mixed your inverse steps? The "*shift" function delivers or expects the transform data to be
centered around zero frequency (whether using to- or from- transform function). The innermost inverse should be
operating on 'shifted' FFT data, the next-outer inverse doesn't make much sense to me because by that point you're
already at some kind of time domain data, and the outermost transform expects time domain data.
So the deal is, you must consistently use "fft-/ifft-shift". If that is a typo, there is still some other issue.
If that was just a typo, then "zooms out the result..." (above) seems mysterious to me. A fine-grained (in frequency)
transform gives you better ability to resolve components in the frequency domain, but the inverse process won't
improve the time domain resolution, that is, it can mitigate transform-induced error but won't make the recovered
result better than the original time domain data. Were you after something else?
> anyone <jaup@h/WSWLG{nR1³qHe> wrote in message
> <513f768b$0$58186$c3e8da3$88b277c5@news.astraweb.com>...
>> On Tue, 12 Mar 2013 17:59:16 +0000, Antigoni wrote:
>>
>> > anyone <jaup@h/WSWLG{nR1³qHe> wrote in message
>> > <513f6b9a$0$38175$c3e8da3$f6268168@news.astraweb.com>...
>> >> On Tue, 12 Mar 2013 17:37:07 +0000, Antigoni wrote:
>> >>
>> >> > Hi all!
>> >> >
>> >> > Suppose you have an equation f(w,x) which involves frequency (w)
>> >> > and space (x) variables and it is solved for various values of
>> >> > these variables between specific ranges. After the solution, I
>> >> > come up with a 2D matrix whose rows represent frequency and
>> >> > columns represent space. I apply an inverse Fourier transform to
>> >> > this matrix using IFFT, in order to construct a matrix in time
>> >> > (rows) and space (columns).
>> >> > My problem starts when I'm trying to increase the number of points
>> >> > used in frequency dimension. To be more specific, I run two
>> >> > different cases:
>> >> >
>> >> > Case A: I solve f(w,x) for 256 points in w and 512 points in x.
>> >> > The range of w is between (-2.5e6 , 2.5e6) Hz, which means that I
>> >> > use a frequency step of df=19607.843. The solution seems ok and
>> >> > when I do the IFFT, everything seems fine. Now I want to increase
>> >> > the points...
>> >> >
>> >> > Case B: So, I increase the points in frequency and I solve f(w,x)
>> >> > for 2048 points in w and 512 points in x (are kept constant). The
>> >> > range of w remains the same, although the frequency step is
>> >> > reduced to df=2442.599.
>> >> > The solution in [frequency,space] domain is correct - the number
>> >> > of points is increased along frequency dimension. This means that
>> >> > when I look at a complete period of my signal I have more points
>> >> > along the signal than I had in case A. However, when I apply the
>> >> > IFFT, it seems llike it zooms out the result, keeping the number
>> >> > of points constant along a complete period.
>> >> >
>> >> > How can I keep the range constant and increase the accuracy of the
>> >> > output signal from ifft?
>> >> > Any related answer is welcome.
>> >> >
>> >> > Thanks a lot!
>> >>
>> >> So, you changed FFT parameters for Case B but otherwise did not
>> >> alter the original sampling rate, correct?
>> >
>> > OK, my mistake! I forgot to mention that the equation f(w,x) came
>> > from analytic fourier transform from time to frequency (I didn't use
>> > fft). For case B I changed only the number of points and the
>> > frequency step.
>>
>> It may be simpler than I first thought -- so, frequency is along a row
>> and 'space' is a column; you keep the number of columns constant, but
>> change the frequency resolution along rows. Next, how are you applying
>> IFFT?
>
> Exactly as you described! I apply ifft as follows:
> u=fftshift(ifft(ifftshift(displ)));
>
> where displ is a (m,512) matrix representing displacements in
> frequency-space domain with m being equal to 256 (case A) or 2048 (case
> B). In the same way, u is the transformed matrix in time-space domain. I
> know that ifft is applied along columns, that's why frequency is at
> rows.
That's a typo, or you mixed your inverse steps? The "*shift" function delivers or expects the transform data to be
centered around zero frequency (whether using to- or from- transform function). The innermost inverse should be
operating on 'shifted' FFT data, the next-outer inverse doesn't make much sense to me because by that point you're
already at some kind of time domain data, and the outermost transform expects time domain data.
So the deal is, you must consistently use "fft-/ifft-shift". If that is a typo, there is still some other issue.
If that was just a typo, then "zooms out the result..." (above) seems mysterious to me. A fine-grained (in frequency)
transform gives you better ability to resolve components in the frequency domain, but the inverse process won't
improve the time domain resolution, that is, it can mitigate transform-induced error but won't make the recovered
result better than the original time domain data. Were you after something else?