Reply by robert bristow-johnson May 28, 20072007-05-28
On May 25, 1:51 pm, "Vista" <a...@gmai.com> wrote:
> "John Hadstate" <jh113...@hotmail.com> wrote in message > > news:1180094910.608568.259980@q75g2000hsh.googlegroups.com... > > > > > On May 25, 6:23 am, "Vista" <a...@gmai.com> wrote: > >> Hi all, > > >> I have two blocks of samples of signals. > > >> x0, ..., x_{n-1}, > > >> and > > >> y0, ..., y_{n-1}, > > >> where DFT[x]= y. > > >> Suppose I want to interpolate {x} by a upsampling rate of 2, how to do > >> that > >> by operating on the {y} sequence, assuming {x} is not given so we can > >> only > >> modify {y}? > > > Divide y into two equal pieces (each having n/2 samples). Insert n > > zeroes between the first half of y and the last half of y. IDFT the > > new sequence. > > >> How about decimating {x} by a downsampling rate of 2? > > > Divide y into 4 equal pieces (each having n/4 samples). Throw away > > the middle two pieces. IDFT the new sequence. > > Thanks John! Do you have any theorey/proof supporting your methods?
it's correct (we are assuming a real signal to start with which corresponds to a complex conjugate symmetry in the other domain) and well known those middle two sections correspond to the high frequency half of the spectrum. the only thing different i would do is call it "N" instead of "n" and leave the small case letters for indices. r b-j
Reply by John E. Hadstate May 26, 20072007-05-26
"Vista" <abc@gmai.com> wrote in message 
news:f377lg$gc9$1@news.Stanford.EDU...
> > "John Hadstate" <jh113355@hotmail.com> wrote in message > news:1180094910.608568.259980@q75g2000hsh.googlegroups.com... >>> >>> How about decimating {x} by a downsampling rate of 2? >> >> Divide y into 4 equal pieces (each having n/4 samples). >> Throw away >> the middle two pieces. IDFT the new sequence. >> > > > Thanks John! Do you have any theorey/proof supporting your > methods? >
This situation is not as straightforward. You must recognize that in order to decimate (x) without loss of information, (x) must contain no information at or above the Nyquist frequency ***at the decimated (lower) rate***. Consequently, discarding all spectral components from the middle half of (y) is an implicit statement that the original (x) was over-sampled by at least a factor of two. One wonders about the wisdom of decimating this way. Surely it is cheaper to extract every other sample from (x) than it is to DFT(x), fumble around with (y), and then IDFT the result. However, don't expect to get the same decimated values for (x). Both methods will produce a legitimate decimation (as would averaging pairs of samples) but they are not equivalent.
Reply by John E. Hadstate May 25, 20072007-05-25
"Vista" <abc@gmai.com> wrote in message 
news:f377lg$gc9$1@news.Stanford.EDU...
> > "John Hadstate" <jh113355@hotmail.com> wrote in message > news:1180094910.608568.259980@q75g2000hsh.googlegroups.com... >> On May 25, 6:23 am, "Vista" <a...@gmai.com> wrote: >>> Hi all, >>> >>> I have two blocks of samples of signals. >>> >>> x0, ..., x_{n-1}, >>> >>> and >>> >>> y0, ..., y_{n-1}, >>> >>> where DFT[x]= y. >>> >>> Suppose I want to interpolate {x} by a upsampling rate >>> of 2, how to do that >>> by operating on the {y} sequence, assuming {x} is not >>> given so we can only >>> modify {y}? >> >> Divide y into two equal pieces (each having n/2 samples). >> Insert n >> zeroes between the first half of y and the last half of >> y. IDFT the >> new sequence. >> > Thanks John! Do you have any theorey/proof supporting your > methods? >
Think about what I just proposed. By doubling the size of the DFT, I also doubled the size of the IDFT. By placing zeroes in the center of the DFT, I have doubled the number of points in the DFT, while at the same time ***adding no information*** to the spectrum. By extension, then, I have doubled the size of the time series without adding any information to it. Is this not a form of interpolation?
Reply by Jerry Avins May 25, 20072007-05-25
Vista wrote:
> "Jerry Avins" <jya@ieee.org> wrote in message > news:YM2dnfFvyaN2sMrbnZ2dnUVZ_oGlnZ2d@rcn.net... >> Vista wrote: >>> Hi all, >>> >>> I have two blocks of samples of signals. >>> >>> x0, ..., x_{n-1}, >>> >>> and >>> >>> y0, ..., y_{n-1}, >>> >>> where DFT[x]= y. >>> >>> Suppose I want to interpolate {x} by a upsampling rate of 2, how to do >>> that by operating on the {y} sequence, assuming {x} is not given so we >>> can only modify {y}? >>> >>> How about decimating {x} by a downsampling rate of 2? >>> >>> Now, what if I want to interpolate {y} by a upsampling rate of 2, how to >>> do that by operating on the {x} sequence, assuming {y} is not given so we >>> can only modify {x}? >>> >>> What about decimating {y} by a downsampling rate of 2? >> I assume that by "upsampling" you mean generating a signal that more >> specified points per unit time than the original; an operation on a time >> sequence. The FT converts a time sequence to a spectrum. What does >> "upsampling" a spectrum mean? (I can supply a meaning, and I can suggest >> how you might do it, but it would be silly to suggest what you might not >> want.) >> >> Jerry >> -- >> Engineering is the art of making what you want from things you can get. >> &#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533; > > > I believe upsampling and downsampling are fairly standard in DSP. > Mechanically, treating the spectrum as a signal, I can apply U/D sampling to > spectrum as well. That's what I meant... Thanks Jerry!
I can only imagine what you would mean by upsampling a spectrum. I can see a few ways to use the spectrum to create an upsampled time signal and to get the spectrum of the upsampled time signal. (That amounts to interpolation.) Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
Reply by Vista May 25, 20072007-05-25
"Jerry Avins" <jya@ieee.org> wrote in message 
news:YM2dnfFvyaN2sMrbnZ2dnUVZ_oGlnZ2d@rcn.net...
> Vista wrote: >> Hi all, >> >> I have two blocks of samples of signals. >> >> x0, ..., x_{n-1}, >> >> and >> >> y0, ..., y_{n-1}, >> >> where DFT[x]= y. >> >> Suppose I want to interpolate {x} by a upsampling rate of 2, how to do >> that by operating on the {y} sequence, assuming {x} is not given so we >> can only modify {y}? >> >> How about decimating {x} by a downsampling rate of 2? >> >> Now, what if I want to interpolate {y} by a upsampling rate of 2, how to >> do that by operating on the {x} sequence, assuming {y} is not given so we >> can only modify {x}? >> >> What about decimating {y} by a downsampling rate of 2? > > I assume that by "upsampling" you mean generating a signal that more > specified points per unit time than the original; an operation on a time > sequence. The FT converts a time sequence to a spectrum. What does > "upsampling" a spectrum mean? (I can supply a meaning, and I can suggest > how you might do it, but it would be silly to suggest what you might not > want.) > > Jerry > -- > 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;&#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;
I believe upsampling and downsampling are fairly standard in DSP. Mechanically, treating the spectrum as a signal, I can apply U/D sampling to spectrum as well. That's what I meant... Thanks Jerry!
Reply by Jerry Avins May 25, 20072007-05-25
Vista wrote:
> Hi all, > > I have two blocks of samples of signals. > > x0, ..., x_{n-1}, > > and > > y0, ..., y_{n-1}, > > where DFT[x]= y. > > Suppose I want to interpolate {x} by a upsampling rate of 2, how to do that > by operating on the {y} sequence, assuming {x} is not given so we can only > modify {y}? > > How about decimating {x} by a downsampling rate of 2? > > Now, what if I want to interpolate {y} by a upsampling rate of 2, how to do > that by operating on the {x} sequence, assuming {y} is not given so we can > only modify {x}? > > What about decimating {y} by a downsampling rate of 2?
I assume that by "upsampling" you mean generating a signal that more specified points per unit time than the original; an operation on a time sequence. The FT converts a time sequence to a spectrum. What does "upsampling" a spectrum mean? (I can supply a meaning, and I can suggest how you might do it, but it would be silly to suggest what you might not want.) Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
Reply by Vista May 25, 20072007-05-25
"John Hadstate" <jh113355@hotmail.com> wrote in message 
news:1180094910.608568.259980@q75g2000hsh.googlegroups.com...
> On May 25, 6:23 am, "Vista" <a...@gmai.com> wrote: >> Hi all, >> >> I have two blocks of samples of signals. >> >> x0, ..., x_{n-1}, >> >> and >> >> y0, ..., y_{n-1}, >> >> where DFT[x]= y. >> >> Suppose I want to interpolate {x} by a upsampling rate of 2, how to do >> that >> by operating on the {y} sequence, assuming {x} is not given so we can >> only >> modify {y}? > > Divide y into two equal pieces (each having n/2 samples). Insert n > zeroes between the first half of y and the last half of y. IDFT the > new sequence. > >> >> How about decimating {x} by a downsampling rate of 2? > > Divide y into 4 equal pieces (each having n/4 samples). Throw away > the middle two pieces. IDFT the new sequence. >
Thanks John! Do you have any theorey/proof supporting your methods? Thanks again!
Reply by Vista May 25, 20072007-05-25
"BERT" <callmevc@gmail.com> wrote in message 
news:1180094062.875578.73670@g4g2000hsf.googlegroups.com...
> On May 25, 6:23 am, "Vista" <a...@gmai.com> wrote: >> Hi all, >> >> I have two blocks of samples of signals. >> >> x0, ..., x_{n-1}, >> >> and >> >> y0, ..., y_{n-1}, >> >> where DFT[x]= y. >> >> Suppose I want to interpolate {x} by a upsampling rate of 2, how to do >> that >> by operating on the {y} sequence, assuming {x} is not given so we can >> only >> modify {y}? >> >> How about decimating {x} by a downsampling rate of 2? >> >> Now, what if I want to interpolate {y} by a upsampling rate of 2, how to >> do >> that by operating on the {x} sequence, assuming {y} is not given so we >> can >> only modify {x}? >> >> What about decimating {y} by a downsampling rate of 2? >> >> Thanks! > > Smells like a homework question. What have you come up with so far ? > >
It's my self-study question. That's to say-- I raised it myself, to help me understand the sampling rate conversion better. I don't have result yet. Could you please give some help? Thanks
Reply by John Hadstate May 25, 20072007-05-25
On May 25, 6:23 am, "Vista" <a...@gmai.com> wrote:
> Hi all, > > I have two blocks of samples of signals. > > x0, ..., x_{n-1}, > > and > > y0, ..., y_{n-1}, > > where DFT[x]= y. > > Suppose I want to interpolate {x} by a upsampling rate of 2, how to do that > by operating on the {y} sequence, assuming {x} is not given so we can only > modify {y}?
Divide y into two equal pieces (each having n/2 samples). Insert n zeroes between the first half of y and the last half of y. IDFT the new sequence.
> > How about decimating {x} by a downsampling rate of 2?
Divide y into 4 equal pieces (each having n/4 samples). Throw away the middle two pieces. IDFT the new sequence.
> > Now, what if I want to interpolate {y} by a upsampling rate of 2, how to do > that by operating on the {x} sequence, assuming {y} is not given so we can > only modify {x}? > > What about decimating {y} by a downsampling rate of 2? > > Thanks!
Reply by BERT May 25, 20072007-05-25
On May 25, 6:23 am, "Vista" <a...@gmai.com> wrote:
> Hi all, > > I have two blocks of samples of signals. > > x0, ..., x_{n-1}, > > and > > y0, ..., y_{n-1}, > > where DFT[x]= y. > > Suppose I want to interpolate {x} by a upsampling rate of 2, how to do that > by operating on the {y} sequence, assuming {x} is not given so we can only > modify {y}? > > How about decimating {x} by a downsampling rate of 2? > > Now, what if I want to interpolate {y} by a upsampling rate of 2, how to do > that by operating on the {x} sequence, assuming {y} is not given so we can > only modify {x}? > > What about decimating {y} by a downsampling rate of 2? > > Thanks!
Smells like a homework question. What have you come up with so far ?