FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > DSP

DSP comp.dsp newsgroup, mailing list

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-19-2003, 04:08 PM
cfx
Guest
 
Posts: n/a
Default Re: window and fft

First, thanks for your attention.

The goal of the processus is to apply a little decorrelation to a source
audio signal in real time.
And this by applying a little phasing on each signal frequency component.

We can considere that I have a some audio data and I can get these data only
by blocks of 1024 samples.
When I get a block, I apply an Hanning window to the block and compute the
fft (fftsize == 1024).
In the fourier domain I want to modifie the phase of each frequency
component.
For that I dispose of a transfert function (an array of 512 complexes) that
for doing that, each complex, of the
transfert function, associated to a frequency component had a unit modul and
an argument between
0 and pi/3. Then I multiply the fft of my block with the transfert function
and compute the ifft.

If the block received is the block [n,n+1024-1] ('n' is a arbitrary absolute
sample indices), I dispose of a previous windowed block [n-1024,n-1], I
overlap these two blocks such that the data [n-512,n+512-1] are valid
processed
data if there is no modification of the signal phase in the processing, but
this is not the case.
My interpretetion of this phenomena is a sliding of the window due to the
frequency phasing apply by the processus.

But now, I am not an expert in Signal Processing, and it is possible that I
made a great mistake in my raisonment, and maybe it is not possible to do
what I want by this way.

Thanks,
-cf.


Reply With Quote
  #2 (permalink)  
Old 08-19-2003, 09:06 PM
Rune Allnor
Guest
 
Posts: n/a
Default Re: window and fft

"cfx" <[email protected]> wrote in message news:<bhtaol$53a$[email protected]>...
> First, thanks for your attention.
>
> The goal of the processus is to apply a little decorrelation to a source
> audio signal in real time.
> And this by applying a little phasing on each signal frequency component.
>
> We can considere that I have a some audio data and I can get these data only
> by blocks of 1024 samples.
> When I get a block, I apply an Hanning window to the block and compute the
> fft (fftsize == 1024).
> In the fourier domain I want to modifie the phase of each frequency
> component.
> For that I dispose of a transfert function (an array of 512 complexes) that
> for doing that, each complex, of the
> transfert function, associated to a frequency component had a unit modul and
> an argument between
> 0 and pi/3. Then I multiply the fft of my block with the transfert function
> and compute the ifft.


OK. You are applying an all-pass filter to your signal in frequency domain.
Now, I can't see the relation between the 512 complex samples of the
transfer function and the block size of 1024. Is the transfer function
specified in frequency domain? If so, what do you do with the frequency bins
between the Nyquist frequency and the sampling frequency?

> If the block received is the block [n,n+1024-1] ('n' is a arbitrary absolute
> sample indices), I dispose of a previous windowed block [n-1024,n-1], I
> overlap these two blocks such that the data [n-512,n+512-1] are valid
> processed
> data if there is no modification of the signal phase in the processing, but
> this is not the case.
> My interpretetion of this phenomena is a sliding of the window due to the
> frequency phasing apply by the processus.


Your problem appears to be how to patch blocks in time domain, considering
that each sample is represented in two blocks...

> But now, I am not an expert in Signal Processing, and it is possible that I
> made a great mistake in my raisonment, and maybe it is not possible to do
> what I want by this way.


I think it should be possible to implement a filter this way. You would
probably need to pay some attention to quite a few details, though.

Having said that, my immediate response (provided I understand your problem
correctly) is that you may want to consider a time-domain implementation
of your all-pass filter. I don't know much about such implementations, but
there may be others here who can help you with the details.

If that's not an option, you may try to compute the time series as some
sort of weighted average between blocks. Assume you want to reconstruct
the samples [n,n+512-1]. The deconvolved data would come from the trailing
half of the block [n-512,n+512-1] (call these samples a(m), m=0,...,511)
and the leading half of the block [n, n+1024-1] (call these samples
b(m), m=0,...,511).

The resulting segment of the time series x(n) could then be computed
with the naive constant weighting

x(n+m) = 1/2(a(m)+b(m)) m=0,...,511

or possibly a more elaborate ramp weighting

x(n+m) = (511-m)/511*a(m)+ m/511*b(m) m=0,...,511.

In any case, there will be differences between the patched data from
such a block-wise approach, and data comupted either in time domain or
with other block sizes.

Rune
Reply With Quote
  #3 (permalink)  
Old 08-20-2003, 11:25 AM
cfx
Guest
 
Posts: n/a
Default Re: window and fft


"Rune Allnor" <[email protected]> a écrit dans le message de news:
[email protected]...
> OK. You are applying an all-pass filter to your signal in frequency

domain.
> Now, I can't see the relation between the 512 complex samples of the
> transfer function and the block size of 1024. Is the transfer function
> specified in frequency domain? If so, what do you do with the frequency

bins
> between the Nyquist frequency and the sampling frequency?


The sampling rate is equal to 44100, the FFTSIZE to 1024, and my fft
function
return FFTSIZE/2 complex samples, with each corresponding to a frequency
component
from SAMPLINGRATE/FFTSIZE to SAMPLINGRATE/2.



>
> Your problem appears to be how to patch blocks in time domain, considering
> that each sample is represented in two blocks...
>


>
> I think it should be possible to implement a filter this way. You would
> probably need to pay some attention to quite a few details, though.
>
> Having said that, my immediate response (provided I understand your

problem
> correctly) is that you may want to consider a time-domain implementation
> of your all-pass filter. I don't know much about such implementations, but
> there may be others here who can help you with the details.


I was looking for a such temporal method, but I haven't found a
representation
of an all-pass such that this one ( e^(j*2*pi*g(Fn)) with Fn =
n*SAMPLINGRATE / FFTSIZE,
and g a fnction of Fn) in the time domain (so if any one have one ).

I will try to apply the Allpass filter in the frequency domain without
pre-applying a window on the
time domain samples, and apply the window after the ifft and overlap-add the
blocks.

> Rune


Thanks,
Charles-Felix


Reply With Quote
  #4 (permalink)  
Old 08-20-2003, 06:49 PM
Fred Marshall
Guest
 
Posts: n/a
Default Re: window and fft


"cfx" <[email protected]> wrote in message
news:bhvepg$juu$[email protected]..
>
> "Rune Allnor" <[email protected]> a écrit dans le message de news:
> [email protected]...
> > OK. You are applying an all-pass filter to your signal in frequency

> domain.
> > Now, I can't see the relation between the 512 complex samples of the
> > transfer function and the block size of 1024. Is the transfer function
> > specified in frequency domain? If so, what do you do with the frequency

> bins
> > between the Nyquist frequency and the sampling frequency?

>
> The sampling rate is equal to 44100, the FFTSIZE to 1024, and my fft
> function
> return FFTSIZE/2 complex samples, with each corresponding to a frequency
> component
> from SAMPLINGRATE/FFTSIZE to SAMPLINGRATE/2.
>
>
>
> >
> > Your problem appears to be how to patch blocks in time domain,

considering
> > that each sample is represented in two blocks...
> >

>
> >
> > I think it should be possible to implement a filter this way. You would
> > probably need to pay some attention to quite a few details, though.
> >
> > Having said that, my immediate response (provided I understand your

> problem
> > correctly) is that you may want to consider a time-domain implementation
> > of your all-pass filter. I don't know much about such implementations,

but
> > there may be others here who can help you with the details.

>
> I was looking for a such temporal method, but I haven't found a
> representation
> of an all-pass such that this one ( e^(j*2*pi*g(Fn)) with Fn =
> n*SAMPLINGRATE / FFTSIZE,
> and g a fnction of Fn) in the time domain (so if any one have one ).
>
> I will try to apply the Allpass filter in the frequency domain without
> pre-applying a window on the
> time domain samples, and apply the window after the ifft and overlap-add

the
> blocks.


Charles-Felix,

Without analyzing everything you're doing:

If you have a finite-length frequency domain function then you can always
ifft that function to get a FIR structure. Now, generally you want the
temporal FIR structure to be purely real so:

- If the frequency domain function is a transform of a real time function
then all you need to do is make sure that you're including all of the parts
of the frequency domain function in the proper order.

- If the frequency domain function is *not* a transform of a real time
function then you will get a complex-valued time function resulting from the
processing in any form. That's probably not what you want.

This suggests that you can inverse transform the filter and apply it
continuously in the time domain - but perhaps with less compute efficiency.

Otherwise, the comments from Don and Jerry about not pre- windowing in an
overlap-save method apply.

Fred


Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
reg is shown in waveform window of QuestaSim6.2b Andreas Ehliar Verilog 2 10-21-2008 11:15 AM
FPGA workstation - should I wait for Window Vista? Joseph FPGA 19 01-25-2007 12:38 AM
Verilog Draggable Window Library Todd Fleming FPGA 1 05-17-2006 11:54 PM
Tcl script window does not appear ALuPin FPGA 2 09-22-2004 09:06 AM
Re: window and fft Atmapuri DSP 0 08-19-2003 01:07 PM


All times are GMT +1. The time now is 12:45 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved