DSPRelated.com
Forums

windowing question

Started by Unknown April 25, 2006
"Jerry Avins" <jya@ieee.org> wrote in message 
news:ZcadnYIOfeCY8dPZnZ2dnUVZ_tSdnZ2d@rcn.net...
> jim wrote: > > ... > >> Are you using non-integer indexing? How do you arrive at your window >> series have non-integer length? > > There is no indexing. His signal is continuous time with impulses that > happen to fall on an integer grid. The signal can't be sampled; it isn't > bandlimited.
Ooops. I addressed it wrongly. Anyway, I think it's misleading or ineffective to call a signal "continuous" and also say that it's made up of a series of regularly-spaced Diracs and then get hung up on the "continous" term.... But, it's OK to talk about taking an infinite, continuous, plain old Fourier Transform. Maybe that's worth considering here: The OP said: "Suppose that I have a continous-time signal that consists of a finite number of Dirac impulses at integer time points. For example, lets say the signal starts at t=0 and lasts for 100 seconds, with 100 dirac impulses, one per second." and "Now lets apply a rectangular window to this signal, such that only 50 seconds of the signal are passed." " There are 2 ways to compute the resulting spectrum; etc......" The infinite, continuous FT becomes a finite sum because of the definition of the signal. But, that's not the typical DFT and the Fourier Transform that results is continuous and infinite. Because it's time-limited, it can be represented in frequency by sincs - and the question is how wide is the window and how wide are the sincs, right? I think r b-j has it right. It doesn't matter how wide the sincs are as long as they are no wider than the support of the temporal epoch is narrow. In other words the window can be assumed to be as wide as you like and the sincs correspondingly as narrow as you like. BUT all this will evolve back to the actual support of the signal. That cannot be as narrow as the samples / Diracs at the very edges - just as the bandwidth of a signal strictly has to be *less than* fs/2 in order to be represented by temporal sincs related to fs - the temporal epoch of a time-limited signal has to be *less than* the reciprocal of the zero-spacing of the sincs in frequency. That won't happen if the temporal epoch is defined by diracs at the very edges I do believe. After that, maybe it's just convenient to push the window out to encompass all but the next sample. That makes for the narrowest sinc in frequency and one that approaches arbitrarily close what you'd have IF you'd included the next sample. Fred
"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message 
news:iIWdnQDcr72WENPZ4p2dnA@centurytel.net...
.
> > After that, maybe it's just convenient to push the window out to encompass > all but the next sample. That makes for the narrowest sinc in frequency > and one that approaches arbitrarily close what you'd have IF you'd > included the next sample. > > Fred
Another argument perhaps is that you leave out available inoformation if you don't include all of the space associated with the end samples that *are* included. This could be 1/2 and interval at each end or 1 interval at one end. Fred
in article iIWdnQDcr72WENPZ4p2dnA@centurytel.net, Fred Marshall at
fmarshallx@remove_the_x.acm.org wrote on 04/25/2006 16:54:
 
> Anyway, I think it's misleading or ineffective to call a signal "continuous" > and also say that it's made up of a series of regularly-spaced Diracs and > then get hung up on the "continous" term....
Bob Adams just said that the signal was "continuous-time" which was correct. it's just to differentiate it from a discrete-time signal which has no definition between discrete samples. these dirac impulses *do* have definition between impulses (which definition is zero). ...
> I think r b-j has it right.
woo-hoo! i needed to be more explicit and general in a couple of ways: defining Fs = 1/T, the sampled signal: &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;+inf &#4294967295; &#4294967295; &#4294967295; &#4294967295; s(t) = T * SUM{ x(k*T) * delta(t - k*T) } &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; k=-inf &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;+inf &#4294967295; &#4294967295; &#4294967295; &#4294967295; = T * SUM{ x(t) * delta(t - k*T) } &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; k=-inf &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;+inf &#4294967295; &#4294967295; &#4294967295; &#4294967295; = x(t) * T * SUM{ delta(t - k*T) } &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; k=-inf &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;+inf &#4294967295; &#4294967295; &#4294967295; &#4294967295; = x(t) * SUM{ exp(j*2*pi*n*Fs*t) } &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; n=-inf &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; +inf &#4294967295; &#4294967295; &#4294967295; &#4294967295; = SUM{ x(t) * exp(j*2*pi*n*Fs*t) } &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;&#4294967295; n=-inf has spectrum: &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;+inf &#4294967295; &#4294967295; &#4294967295; &#4294967295; S(f) = SUM{ X(f - n*Fs } &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; n=-inf it's obvious that if x(t) is bandlimited to Fs/2, that is X(f) = 0 for |f| >= Fs/2, then there is no overlap between terms and S(f) = X(f) for |f| < Fs/2 and the rectangular "window" in the frequency domain, of width Fs will extract X(f) (and therefore x(t)) exactly. X(f) = H(f) * S(f) where &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;{ &#4294967295;1 &#4294967295; &#4294967295;|f| < &#4294967295;Fs/2 &#4294967295; &#4294967295; H(f) = rect(f/Fs) = { &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;{ &#4294967295;0 &#4294967295; &#4294967295;|f| > Fs/2 &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;+inf &#4294967295; &#4294967295; x(t) = Fs*T * SUM{ x(k*T) * sinc(Fs*(t - k*T)) } &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; k=-inf now if x(t) bandlimited to B, that is X(f) = 0 for |f| >= B where B < Fs/2, then there are an infinite number of rectangular windows in the frequency domain that will extract X(f): X(f) = H1(f) * S(f) where &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;{ &#4294967295;1 &#4294967295; &#4294967295;|f| < &#4294967295;Fc &#4294967295; &#4294967295; H1(f) = rect(f/(2*Fc)) = { &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;{ &#4294967295;0 &#4294967295; &#4294967295;|f| > Fc where Fc is the cutoff frequency of the rectangularly windowed filter and B < Fc < Fs-B . you can see that, as long as B < Fc < Fs-B, it still leaves only the n=0 term of the summation of S(f) above and there is no overlap. we are still left with X(f) and thus x(t). but now the output of the reconstruction filter is: &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;&#4294967295;+inf &#4294967295; &#4294967295; x(t) = 2*Fc*T * SUM{ x(k*T) * sinc(2*Fc*(t - k*T)) } &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; k=-inf doesn't matter what Fc is, as long as it is between B and Fs-B, the summation will still add up to x(t). this is more congruent to Bob's slightly varying window width than previously when i fixed Fc to B. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
robert bristow-johnson wrote:

> > Jerry Avins wrote: > >> > >> jim wrote: > >> > >> ... > >> > >>> Are you using non-integer indexing? How do you arrive at your window > >>> series have non-integer length? > >> > >> There is no indexing. His signal is continuous time with sincs that > >> happen to fall on an integer grid. The signal can't be sampled; it isn't > >> bandlimited. > > > > Yes I get that, now. This the part I don't get - If this is just a > > cerebral exercise and no actual physical time or energy is expended in > > performing methods 1 or 2 - Why or How is method 2 "much easier"? > > > > Bob said: > >>> 2) Or I can just simply take the Fourier Transform of the > >>> time-truncated signal (much easier). > > the FT of a delayed impulse is pretty easy. the FT of a finite sum of > differently delayed impulses is the finite sum of the FTs of the delayed > impulses which is the finite sum of easy. method 1 requires convolution in > the frequency domain with the FT of the window function (which is a sinc() > function). doesn't appear easy at first blush to me.
Convolution with the sinc function is equivalent to ideal bandlimiting. If the convolution is in the frequency domain, then the bandlimiting takes place in the time domain, ie. windowing. Is that hard to accept? If you don't believe it, you can easily work out the integrals and prove the Fourier pair pulse <-> sinc. Regards, Andor
Thanks for all the input.


Here is how I am thinking of this.

Yes, this is truly a continuous time input, and for the moment I dont
even want to consider that the Dirac functions are samples of some
other analog signal; the dirac functions actually ARE the signal of
interest.
Now because the pulse-train is on a fixed time grid, the spectrum of
the pulse train is exactly periodic with period FS. I am making no
assumptions about whether or not there is aliasign going on; remember,
the impulse train IS my sgnal and does not represent samples of
anything.
Now lets consider the window function. It is NOT a series of impulses;
it is ecxactly 1.0 all the way up to some time interval (NOT
necessarily an integer value), and therefore its Fourier Transform is
NOT periodic with FS. In fact it is a true sinc function whose lobes
extend to infinity, with decreasing energy.

So this means that whe you do the convolution, the decreasing lobes of
the sinc function are picking up energy in the original spectrum at all
multiples of FS. So if you slightly change the window length, the
sinc(x) nulls move, and the energy picked up in every one of the N*FS
regions of the original signal would change slightly. But somehow, whn
youu add all these infinite contributions together, you get an answer
that does not change until the window function passes over the next
integer time period, and then suddenly everything changes all at once

I would like to understand this more deeply, for reasons that are too
involved to explain here.

I apologize for any typos; I am using one of those horrible Hotel-room
"internet-on-your-tv-monitor" things!

Bob Adams

robert.w.adams@verizon.net wrote:
> Thanks for all the input. > > > Here is how I am thinking of this. > > Yes, this is truly a continuous time input, and for the moment I dont > even want to consider that the Dirac functions are samples of some > other analog signal; the dirac functions actually ARE the signal of > interest. > Now because the pulse-train is on a fixed time grid, the spectrum of > the pulse train is exactly periodic with period FS. I am making no > assumptions about whether or not there is aliasign going on; remember, > the impulse train IS my sgnal and does not represent samples of > anything. > Now lets consider the window function. It is NOT a series of impulses; > it is ecxactly 1.0 all the way up to some time interval (NOT > necessarily an integer value), and therefore its Fourier Transform is > NOT periodic with FS. In fact it is a true sinc function whose lobes > extend to infinity, with decreasing energy. > > So this means that whe you do the convolution, the decreasing lobes of > the sinc function are picking up energy in the original spectrum at all > multiples of FS.
What FS? You just wrote that there's no sampling going on.
> So if you slightly change the window length, the > sinc(x) nulls move, and the energy picked up in every one of the N*FS > regions of the original signal would change slightly. But somehow, whn > youu add all these infinite contributions together, you get an answer > that does not change until the window function passes over the next > integer time period, and then suddenly everything changes all at once > > I would like to understand this more deeply, for reasons that are too > involved to explain here. > > I apologize for any typos; I am using one of those horrible Hotel-room > "internet-on-your-tv-monitor" things! > > Bob Adams >
-- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Andor wrote:
> robert bristow-johnson wrote: > > > method 1 requires convolution in the frequency domain with the > > FT of the window function (which is a sinc() function). doesn't > > appear easy at first blush to me. > > Convolution with the sinc function is equivalent to ideal bandlimiting. > If the convolution is in the frequency domain, then the bandlimiting > takes place in the time domain, ie. windowing. Is that hard to accept? > If you don't believe it, you can easily work out the integrals and > prove the Fourier pair pulse <-> sinc.
whoa, Andor... "... _easily_ work out the integrals..." so please easily work out this one: +inf rect(t) ?= integral{ sinc(f*t) * exp(j*2*pi*f*t) df} -inf where sinc(u) = sin(pi*u)/(pi*u) { 1 |u| < 1/2 and rect(u) = { { 0 |u| > 1/2 i'm not too anal about what rect(+/- 1/2) is (but if i where, it would be 1/2), just as long as it's not a dirac impulse function. i know it's true only because of the duality theorem of the F.T. and knowing what the F.T. of rect(t) is. but i can't work out that integral directly for some arbitrary t. r b-j
robert.w.adams@verizon.net wrote:
>... I am making no > assumptions about whether or not there is aliasign going on; remember, > the impulse train IS my sgnal and does not represent samples of > anything. > Now lets consider the window function. It is NOT a series of impulses; > it is ecxactly 1.0 all the way up to some time interval (NOT > necessarily an integer value), and therefore its Fourier Transform is > NOT periodic with Fs. In fact it is a true sinc function whose lobes > extend to infinity, with decreasing energy. > > So this means that whe you do the convolution, the decreasing lobes of > the sinc function are picking up energy in the original spectrum at all > multiples of Fs. So if you slightly change the window length, the > sinc(x) nulls move, and the energy picked up in every one of the N*Fs > regions of the original signal would change slightly. But somehow, when > you add all these infinite contributions together, you get an answer > that does not change until the window function passes over the next > integer time period, and then suddenly everything changes all at once
Bob, i think this is mathematically the same issue as the one regarding reconstruction of the oversampled signal. there are multiple ideal brick-wall LPFs that can be used to reconstruct the very same bandlimited (to something well below Fs/2) input, x(t), from the very same samples, x[n] = x(n*T). same exact samples, different sinc() functions attached to them, but somehow they add up to the same x(t). the only reason i brought it up is that is seems to me to be a simpler setting for this same phenom.
> I would like to understand this more deeply,
me too.
> ... for reasons that are too involved to explain here.
well, i don't have any of those. my reasons are not involved: i'm just anal.
> I apologize for any typos; I am using one of those horrible Hotel-room > "internet-on-your-tv-monitor" things!
gee, Bob, i had thunked that i was the only luddite that didn't have a wireless laptop that traveled with him to everywhere and every hotel he goes. :-) r b-j
No Internet connection in the Hotel, but, hey, I am in Copenhagen so
who is gonna complain!


Bob

robert.w.adams@verizon.net wrote:
> No Internet connection in the Hotel, but, hey, I am in Copenhagen so > who is gonna complain!
geez, i wouldn't. but what ungodly hour is it there, now? and i can't imagine who you're seeing in Denmark! r b-j