If I am changing a sample rate by a fractional amount should I always
UPSAMPLE first and then DOWNSAMPLE?
For example to change down by 2/3 should I upsample by 2 and downsample
by 3.
To change by 3/2 should I upsample by 3 and downsample by 2?
Also for the above cases should the filter 'in the middle' have cuttoff
pi/2?
The reason I am asking is that it appears that if L=M then upsampling
followed by downsampling does not give the same result as downsampling
and then upsampling since by downsampling first we remove information
(samples( and then add zeros to upsample.The otehr wat round makes more
sense to me at least.
You should follow your instinct and upsample first. The filter cutoff wil
depend on your downsample rate.
>If I am changing a sample rate by a fractional amount should I always
>UPSAMPLE first and then DOWNSAMPLE?
>
>For example to change down by 2/3 should I upsample by 2 and downsample
>by 3.
>
>To change by 3/2 should I upsample by 3 and downsample by 2?
>
>Also for the above cases should the filter 'in the middle' have cuttoff
>pi/2?
>
>The reason I am asking is that it appears that if L=M then upsampling
>followed by downsampling does not give the same result as downsampling
>and then upsampling since by downsampling first we remove information
>(samples( and then add zeros to upsample.The otehr wat round makes more
>sense to me at least.
>
>Thanks
>
>Naebad
>
>
"naebad" <[email protected]> wrote in message
news:[email protected] ps.com...
> If I am changing a sample rate by a fractional amount should I always
> UPSAMPLE first and then DOWNSAMPLE?
>
> For example to change down by 2/3 should I upsample by 2 and downsample
> by 3.
>
> To change by 3/2 should I upsample by 3 and downsample by 2?
>
> Also for the above cases should the filter 'in the middle' have cuttoff
> pi/2?
>
> The reason I am asking is that it appears that if L=M then upsampling
> followed by downsampling does not give the same result as downsampling
> and then upsampling since by downsampling first we remove information
> (samples( and then add zeros to upsample.The otehr wat round makes more
> sense to me at least.
>
You might think about the filtering involved.
In order to upsample you need to conceptually:
- increase the sample rate by adding zero-valued samples
- interpolate; another word for lowpass filtering.
If you upsample by a factor of 2 it's the same thing as repeating the
original (repeating) spectrum twice. That is, the spectrum doesn't change
at all - only your perception of it. Then you lowpass filter out the region
between fs/4 and 3fs/4. Done well this has no affect except to make the
zero-valued samples now be interpolated values.
[fs here refers to the *new* sample rate or 2fs re the original sample rate]
In order to downsample by N you need to conceptually:
- lowpass filter to fs/2N
- drop N-1 contiguous samples leaving a factor of 1/N samples.
So, if you downsample first you will be lowpass filtering more than you may
need to.
Some implementations move things around so that this isn't an issue I
believe. fred harris' book is a good reference.
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo
+-----------------------------------------------------------+
Gambling(n): A discretionary tax on those asleep during high school
maths.
> If I am changing a sample rate by a fractional amount should I always
> UPSAMPLE first and then DOWNSAMPLE?
>
> For example to change down by 2/3 should I upsample by 2 and downsample
> by 3.
>
> To change by 3/2 should I upsample by 3 and downsample by 2?
>
> Also for the above cases should the filter 'in the middle' have cuttoff
> pi/2?
>
> The reason I am asking is that it appears that if L=M then upsampling
> followed by downsampling does not give the same result as downsampling
> and then upsampling since by downsampling first we remove information
> (samples( and then add zeros to upsample.The otehr wat round makes more
> sense to me at least.
>
> Thanks
>
> Naebad
>
Conceptually, you need to upsample then downsample. Doing it the other
way around low pass filters your data, as Fred pointed out.
I said conceptually, because in a practical system, upsampling may put
the sample rate beyond the limit of what you can reasonably compute
within a sample interval. Fortunately, there are tricks that take
advantage of the math so that the actual processing is not done at the
upsampled rate. Look for poly-phase filter banks, which are useful for
small integer ratios.
Another approach is to consider that resampling is essentially figuring
out an intermediate value between two of your samples that is most
likely the value at the resampled instant. One can use interpolation to
do that. A Farrow resampler uses parabolic estimates to get arbitrarily
specified fractional samples.
Wouldn't this change the length of your data as well (as the result is
convolution between the input stream and the filter response)?
My concern is the application of such filters in an OFDM transmitter
where the input to the interpolation filter is a stream made up of back t
back symbols. At the output of the filter, the symbol separation (in time
doesn't exist any more, as a result of the convolution with the filte
response.
>Done well this has no affect except to make the
>zero-valued samples now be interpolated values.
On Oct 2, 3:37 pm, "naebad" <minnae...@yahoo.co.uk> wrote:
> If I am changing a sample rate by a fractional amount should I always
> UPSAMPLE first and then DOWNSAMPLE?
>
> For example to change down by 2/3 should I upsample by 2 and downsample
> by 3.
>
> To change by 3/2 should I upsample by 3 and downsample by 2?
>
> Also for the above cases should the filter 'in the middle' have cuttoff
> pi/2?
>
> The reason I am asking is that it appears that if L=M then upsampling
> followed by downsampling does not give the same result as downsampling
> and then upsampling since by downsampling first we remove information
> (samples( and then add zeros to upsample.The otehr wat round makes more
> sense to me at least.
If you are using IIR's to filter and don't want to lose information,
then upsample first, then downsample. If you can afford to lose
information (no high frequencies, or not interested in high
frequencies), then you might be able to use the opposite order
depending on the ratios and highest frequecy you want to keep,
producing some computational efficiencies (lower peak data
rates).
If you are using a FIR type filter, then you can just interpolate
the new samples directly for any ratio, either calculating your
filter taps on-the-fly, or by using table lookup or Farrow
approximations for your filter function. No need to do two
passes and calculate un-needed data points.
"cocioc" <[email protected]> wrote in message
news:[email protected] ...
> Wouldn't this change the length of your data as well (as the result is a
> convolution between the input stream and the filter response)?
>
> My concern is the application of such filters in an OFDM transmitter,
> where the input to the interpolation filter is a stream made up of back to
> back symbols. At the output of the filter, the symbol separation (in time)
> doesn't exist any more, as a result of the convolution with the filter
> response.
>
>
>>Done well this has no affect except to make the
>>zero-valued samples now be interpolated values.
Sure. But why are you concerned?
I'm not sure what you mean by "such filters". All filters have a finite
transient response. Whether you view the output of the filter as "your
data" seems to me to depend on whether you are filtering a single block of
data or filtering continuously. One could say that not all of the filter
output represents "your data" if you're processing a block. One could also
say that the filter output represents "your data" if you're processing a
never-ending stream.
Certainly one needs to consider the impact on intersymbol interference.
My application is an OFDM transmitter. The output of the IFFT needs to b
oversampled by a factor of 4 (after adding the CP). I thought of doing th
oversampling by interpolating (inserting "zeroes") and low pass filterin
the output of the interpolator to remove the unwanted images. I don'
think this is going to work, though, because the LPF will "smudge" th
adjacent symbols, destroying the time domain separation between them
which is required by the receiver.
One other method for implementing the oversampling is to use an IFFT
times as large as what I need, but that doesn't work for me, because
don't have access to the IFFT, only to its output.
Does anyone know what the standard method is for oversampling an OFD
signal? The unwanted images need to be removed, so simple zero-insertio
without low pass filtering is not going to work.
Regards,
Andrei
>
>Sure. But why are you concerned?
>
>I'm not sure what you mean by "such filters". All filters have a finit
>transient response. Whether you view the output of the filter as "your
>data" seems to me to depend on whether you are filtering a single bloc
of
>data or filtering continuously. One could say that not all of the filte
>output represents "your data" if you're processing a block. One coul
also
>say that the filter output represents "your data" if you're processing
>never-ending stream.
>
>Certainly one needs to consider the impact on intersymbol interference.
>
>Fred
>
>
>
cocioc wrote:
> Hi Fred,
>
> My application is an OFDM transmitter. The output of the IFFT needs to be
> oversampled by a factor of 4 (after adding the CP). I thought of doing the
> oversampling by interpolating (inserting "zeroes") and low pass filtering
> the output of the interpolator to remove the unwanted images. I don't
> think this is going to work, though, because the LPF will "smudge" the
> adjacent symbols, destroying the time domain separation between them,
> which is required by the receiver.
>
> One other method for implementing the oversampling is to use an IFFT 4
> times as large as what I need, but that doesn't work for me, because I
> don't have access to the IFFT, only to its output.
>
> Does anyone know what the standard method is for oversampling an OFDM
> signal? The unwanted images need to be removed, so simple zero-insertion
> without low pass filtering is not going to work.
>
> Regards,
>
> Andrei
>
>
>
>>Sure. But why are you concerned?
>>
>>I'm not sure what you mean by "such filters". All filters have a finite
>
>
>>transient response. Whether you view the output of the filter as "your
>>data" seems to me to depend on whether you are filtering a single block
>
> of
>
>>data or filtering continuously. One could say that not all of the filter
>
>
>>output represents "your data" if you're processing a block. One could
>
> also
>
>>say that the filter output represents "your data" if you're processing a
>
>
>>never-ending stream.
>>
>>Certainly one needs to consider the impact on intersymbol interference.
>>
>>Fred
>>
>>
>>
>
>
>
You should be able to use a Farrow resampler for this. If the sample
times line up with the original samples. They are not changed.
So maybe I need to turn the question around: does an interpolation FI
filter cause ISI in an OFDM signal?
My understanding is that it does, since there are filter outputs which ar
calculated using samples from adjacent OFDM symbols, assuming there are n
gaps in between the symbols.
Basically, I need more information on the subject, but I cannot fin
anything about oversampling potentially causing ISI on OFDM signals. It'
as if the problem does not exist, and that leads me believe that I do no
understand the matter properly.
Could anyone point me to a paper or a book that might shed some light o
this?
>>You should be able to use a Farrow resampler for this. If the sample
>>times line up with the original samples. They are not changed.
>>
>
>
> I looked around, and it seems that oversampling filtering for OFDM signals
> is done using a FIR low pass filter(see the GC5016 datasheet from Texas
> Instruments, http://focus.ti.com/docs/prod/folders/print/gc5016.html)
>
> So maybe I need to turn the question around: does an interpolation FIR
> filter cause ISI in an OFDM signal?
>
> My understanding is that it does, since there are filter outputs which are
> calculated using samples from adjacent OFDM symbols, assuming there are no
> gaps in between the symbols.
>
> Basically, I need more information on the subject, but I cannot find
> anything about oversampling potentially causing ISI on OFDM signals. It's
> as if the problem does not exist, and that leads me believe that I do not
> understand the matter properly.
>
> Could anyone point me to a paper or a book that might shed some light on
> this?
>
>
The low pass filter is specified to remove the signal images that would
otherwise occur with interpolation. Ideally, the filter is specified
to have a pass band such that it passes the full bandwidth of the
uninterpolated signal, a stop band with enough attenuation to block out
the images, and a transition that is steep enough to not cut into the
pass band or allow leakage at the edge of the stopband. FIR filters are
typically used here because it is far easier to obtain a linear phase
characteristic (which means it doesn't "smear" the passband signal) than
it is with IIR filters. Of course, it is impractical to have such an
ideal filter because it would have an infinite number of taps and
therefore an infinite delay. In practice, we reduce the length of the
filter at the price of a less steep transition to something that is
realizable and that doesn't induce too much ISI.
> cocioc wrote:
>
>>> You should be able to use a Farrow resampler for this. If the
>>> sample times line up with the original samples. They are not
>>> changed.
>>>
>> I looked around, and it seems that oversampling filtering for OFDM
>> signals
>> is done using a FIR low pass filter(see the GC5016 datasheet from Texas
>> Instruments, http://focus.ti.com/docs/prod/folders/print/gc5016.html)
>> So maybe I need to turn the question around: does an interpolation
>> FIR
>> filter cause ISI in an OFDM signal?
>> My understanding is that it does, since there are filter outputs
>> which are
>> calculated using samples from adjacent OFDM symbols, assuming there are no
>> gaps in between the symbols.
>> Basically, I need more information on the subject, but I cannot find
>> anything about oversampling potentially causing ISI on OFDM signals. It's
>> as if the problem does not exist, and that leads me believe that I do not
>> understand the matter properly.
>> Could anyone point me to a paper or a book that might shed some
>> light on
>> this?
>>
>
> The low pass filter is specified to remove the signal images that
> would otherwise occur with interpolation. Ideally, the filter is
> specified to have a pass band such that it passes the full bandwidth
> of the uninterpolated signal, a stop band with enough attenuation to
> block out the images, and a transition that is steep enough to not cut
> into the pass band or allow leakage at the edge of the stopband. FIR
> filters are typically used here because it is far easier to obtain a
> linear phase characteristic (which means it doesn't "smear" the
> passband signal) than it is with IIR filters. Of course, it is
> impractical to have such an ideal filter because it would have an
> infinite number of taps and therefore an infinite delay. In practice,
> we reduce the length of the filter at the price of a less steep
> transition to something that is realizable and that doesn't induce too
> much ISI.
I wonder how big an "oversampled," truncated raised-cosine filter would have
to be before the ISI introduced by the truncation is negligible.
--
% Randy Yates % "I met someone who looks alot like you,
%% Fuquay-Varina, NC % she does the things you do,
%%% 919-577-9882 % but she is an IBM."
%%%% <[email protected]> % 'Yours Truly, 2095', *Time*, ELO http://home.earthlink.net/~yatescr
> Ray Andraka <[email protected]> writes:
>
>> cocioc wrote:
>>
>>>> You should be able to use a Farrow resampler for this. If the
>>>> sample times line up with the original samples. They are not
>>>> changed.
>>>>
>>> I looked around, and it seems that oversampling filtering for OFDM
>>> signals
>>> is done using a FIR low pass filter(see the GC5016 datasheet from Texas
>>> Instruments, http://focus.ti.com/docs/prod/folders/print/gc5016.html)
>>> So maybe I need to turn the question around: does an interpolation
>>> FIR
>>> filter cause ISI in an OFDM signal?
>>> My understanding is that it does, since there are filter outputs
>>> which are
>>> calculated using samples from adjacent OFDM symbols, assuming there are no
>>> gaps in between the symbols.
>>> Basically, I need more information on the subject, but I cannot find
>>> anything about oversampling potentially causing ISI on OFDM signals. It's
>>> as if the problem does not exist, and that leads me believe that I do not
>>> understand the matter properly.
>>> Could anyone point me to a paper or a book that might shed some
>>> light on
>>> this?
>>>
>>
>> The low pass filter is specified to remove the signal images that
>> would otherwise occur with interpolation. Ideally, the filter is
>> specified to have a pass band such that it passes the full bandwidth
>> of the uninterpolated signal, a stop band with enough attenuation to
>> block out the images, and a transition that is steep enough to not cut
>> into the pass band or allow leakage at the edge of the stopband. FIR
>> filters are typically used here because it is far easier to obtain a
>> linear phase characteristic (which means it doesn't "smear" the
>> passband signal) than it is with IIR filters. Of course, it is
>> impractical to have such an ideal filter because it would have an
>> infinite number of taps and therefore an infinite delay. In practice,
>> we reduce the length of the filter at the price of a less steep
>> transition to something that is realizable and that doesn't induce too
>> much ISI.
>
> I wonder how big an "oversampled," truncated raised-cosine filter would have
> to be before the ISI introduced by the truncation is negligible.
I seem to be thinking myself into a pit, here.
If the r-c filter is truncated at a zero-crossing, then there would
be no ISI induced. OK, great - so what does that mean? The spectrum
would no longer be zero outside of the interval |f| < W?
--
% Randy Yates % "Maybe one day I'll feel her cold embrace,
%% Fuquay-Varina, NC % and kiss her interface,
%%% 919-577-9882 % til then, I'll leave her alone."
%%%% <[email protected]> % 'Yours Truly, 2095', *Time*, ELO http://home.earthlink.net/~yatescr
cocioc wrote:
> My application is an OFDM transmitter. The output of the IFFT needs to be
> oversampled by a factor of 4 (after adding the CP). I thought of doing the
> oversampling by interpolating (inserting "zeroes") and low pass filtering
> the output of the interpolator to remove the unwanted images. I don't
> think this is going to work, though, because the LPF will "smudge" the
> adjacent symbols, destroying the time domain separation between them,
> which is required by the receiver.
An interpolation filter doesn't have to "smudge" any of the
original samples to produce a signal bandlimited to half the
original sample rate. There are interpolation filters which
will pass all the original samples (the symbols?) unmolested
(FIR filters based on windowed sinc functions, for instance).
In an upsampling process, new intervening samples are usually
created in such a manner that the entire signal at the new
higher sample rate is bandlimited (so that alias images don't
interfere with adjacent OFDM channels for instance). The fact
that the signal must be bandlimited to some degree requires
that any new samples between the original symbol samples be
"smudgy" combinations of several original samples.
256 point FFT, 1/4 CP, x4 interpolation factor, 64 tap interpolatio
filter.
The output of the FFT has 256 points. After adding the CP, the resultin
symbol is 320 points long.
After zero insertion, each symbol has 4 x 320 = 1280 samples.
So, the input to the filter is an OFDM frame, made up of back to back OFD
symbols, each 1280 samples long.
The convolution between the filter response and the OFDM frame i
equivalent to passing the data stream across the filter window
multiplying the data samples with the corresponding filter taps an
summing the multiplication results to obtain a filter output sample.
It is obvious that, as one symbols "pulls out" of the filter window, th
next one "moves in", so there will be 64 samples on the output of th
filter which will depend on samples from both OFDM symbols. Therefore, i
time domain, the two symbols have been mixed.
However, as the filter is 64 taps long and the cyclic prefix of the fram
is 256 samples long, the cyclic prefix is long enough to eliminate th
distortion at the receiver.
So here is my conclusion (which may or may not be right):
The interpolation filters are part of the channel the impulse response o
which the CP tries to compensate for. Therefore, as long as the tota
response of the channel (which includes the filter response) is shorte
than the CP, this ISI can be completely eliminated at the receiver.
>
>An interpolation filter doesn't have to "smudge" any of the
>original samples to produce a signal bandlimited to half the
>original sample rate. There are interpolation filters which
>will pass all the original samples (the symbols?) unmolested
>(FIR filters based on windowed sinc functions, for instance).
>
>In an upsampling process, new intervening samples are usually
>created in such a manner that the entire signal at the new
>higher sample rate is bandlimited (so that alias images don't
>interfere with adjacent OFDM channels for instance). The fact
>that the signal must be bandlimited to some degree requires
>that any new samples between the original symbol samples be
>"smudgy" combinations of several original samples.
>
>
>IMHO. YMMV.
>--
>rhn A.T nicholson d.0.t C-o-M
>
>
Interpolation filters will degrade EVM a finite amount due to the adjacen
symbols.
However, you should find that there is negligible effect over most the C
& Symbol. And even at the edge of the CP or Symbol the EVM would be n
worse than 3%.
Erik de Castro Lopo wrote:
....
> Gambling(n): A discretionary tax on those asleep during high school maths.
i've heard it (or more specifically the state-run lotteries) as a tax
on the poor or, alternatively, a tax on the ignorant, but i haven't
heard this one. i would still say it applies better for state-run
lotteries because in commercial gambling (like in Vegas or Atlantic
City, dunno how they do it down-under) only a portion of the "tax" goes
to the various governments. most of the gambling profits go to the
private interests that own the casinos. so, if it's a tax for the
ignorant and sleeping during math class, it's also a subsidy for the
rich in the case of the commercial "gaming" industry (amazing on how
dropping two letters rehabilitates a word).
robert bristow-johnson wrote:
> Erik de Castro Lopo wrote:
> ...
>> Gambling(n): A discretionary tax on those asleep during high school maths.
>
> i've heard it (or more specifically the state-run lotteries) as a tax
> on the poor or, alternatively, a tax on the ignorant, but i haven't
> heard this one. i would still say it applies better for state-run
> lotteries because in commercial gambling (like in Vegas or Atlantic
> City, dunno how they do it down-under) only a portion of the "tax" goes
> to the various governments. most of the gambling profits go to the
> private interests that own the casinos. so, if it's a tax for the
> ignorant and sleeping during math class, it's also a subsidy for the
> rich in the case of the commercial "gaming" industry (amazing on how
> dropping two letters rehabilitates a word).
When I was in Montreal a few years after the Expo there, the state-run
lottery was known as the "Voluntary Tax".
Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Jerry Avins wrote:
> robert bristow-johnson wrote:
> > Erik de Castro Lopo wrote:
> > ...
> >> Gambling(n): A discretionary tax on those asleep during high school maths.
> >
> > i've heard it (or more specifically the state-run lotteries) as a tax
> > on the poor or, alternatively, a tax on the ignorant, but i haven't
> > heard this one. i would still say it applies better for state-run
> > lotteries because in commercial gambling (like in Vegas or Atlantic
> > City, dunno how they do it down-under) only a portion of the "tax" goes
> > to the various governments. most of the gambling profits go to the
> > private interests that own the casinos. so, if it's a tax for the
> > ignorant and sleeping during math class, it's also a subsidy for the
> > rich in the case of the commercial "gaming" industry (amazing on how
> > dropping two letters rehabilitates a word).
>
> When I was in Montreal a few years after the Expo there, the state-run
> lottery was known as the "Voluntary Tax".
I've heard of lotteries as variously:
- a tax on people who are bad at math,
- a tax on people who are bad at statistics
(would "probability" be more appropriate here?),
- a discretionary fee on people who are bad at math
(a fee could be public or private), and
- a tax on innumericy.
It could also be considered perfectly reasonable financial abitrage
between entities who have a slight differences in the linearity
of their utility functions.