"Rick Lyons" <R.Lyons@_BOGUS_ieee.org> wrote in message
news:43e8d613.196458359@news.sf.sbcglobal.net...
> On Tue, 07 Feb 2006 10:07:11 -0500, Jim Thomas <jthomas@bittware.com>
> wrote:
>
>>dan wrote:
>>> Hi Rick,
>>>
>>> This was the topic of a thread that started June 17, 1998 that both
>>> Jerry and I participated in. It was titled "Upsampling Help?" That
>>> may be a good place to start.
>>>
>>> BR,
>>> Dan
>>>
>>
>>I put forth this same idea here in 1999:
>>
>>http://groups.google.com/group/comp.dsp/browse_thread/thread/b105bd29bbd771a1/52d1f72465f510e1?lnk=st&q=zero+order+hold++%22jthomas%22+group%3Acomp.dsp&rnum=1&hl=en#52d1f72465f510e1
>>
>>It was discussed then that by factoring out the repeated samples and
>>summing adjacent coefficients, the computations can be reduced to the
>>same level as with zero-insertion.
>
> Hi Jim (& Dan),
>
> Thanks for the link. That very interesting 1999 thread
> is somewhat different from the replies in this (2006) thread,
> but both threads reach the same conclusion.
>
> The conclusion is: The "repeated samples" method of upsampling
> looks useful at first glance, because it provides some
> "image" suppression at no computational cost, but when
> we explore the idea further we realize that
> (1) the follow-on lowpass filter will require
> more taps to compensate for the sin(x)/x droop and
> (2) polyphase interpolation filtering can no longer be used.
Here's the way I think of it: why use a lousy filter and then make a good filter
to compensate for the lousy one when instead you can just use one good filter!
(Unless as Tim mentioned there is some efficiency gain, which turns out not to
be the case here.)
One other point, in the real world, one doesn't generally actually stuff zeros
between the samples. One just "pretends they are there" in software. Though I
suppose the same trick could be applied with repeating the samples.
Reply by Rick Lyons●February 7, 20062006-02-07
On Tue, 07 Feb 2006 10:07:11 -0500, Jim Thomas <jthomas@bittware.com>
wrote:
Hi Jim (& Dan),
Thanks for the link. That very interesting 1999 thread
is somewhat different from the replies in this (2006) thread,
but both threads reach the same conclusion.
The conclusion is: The "repeated samples" method of upsampling
looks useful at first glance, because it provides some
"image" suppression at no computational cost, but when
we explore the idea further we realize that
(1) the follow-on lowpass filter will require
more taps to compensate for the sin(x)/x droop and
(2) polyphase interpolation filtering can no longer be used.
This "repeated samples" method of upsampling is a good example
of something that happens to me every now and then.
That is:
* I think of some DSP process that looks like it
might be a good idea.
* It's a simple idea, so if it's actually a good idea
then why haven't I read about it somewhere before?
* There must be something wrong with this "good idea",
because I don't see anyone using it, but right
now I can't see what's wrong with it.
* Someone shows me why this "good idea" is actually a
crappy idea.
Ha, I love this newsgroup!
Thanks,
[-Rick-]
Reply by Jim Thomas●February 7, 20062006-02-07
Jim Thomas wrote:
> y[0] = x[0] * (h[11] + h[10])
> + x[-1] * (h[9] + h[8])
> + x[-2] * (h[7] + h[6])
> + x[-3] * (h[5] + h[4])
> + x[-4] * (h[3] + h[2])
> + x[-5] * (h[1] + h[0])
>
> I count six multiplies and five adds, which is exactly the same
> computational burden as with zero-insertion.
>
All that said, I think this technique loses some of its luster when
using a half-band filter because you can't skip the zero-valued filter
coefficients.
--
Jim Thomas Principal Applications Engineer Bittware, Inc
jthomas@bittware.com http://www.bittware.com (603) 226-0404 x536
Having a smoking section in a restaurant is like
having a peeing section in a swimming pool.
Reply by Jim Thomas●February 7, 20062006-02-07
Rick Lyons wrote:
> On Tue, 07 Feb 2006 00:42:17 GMT, Randy Yates <yates@ieee.org> wrote:
> k that any advantage gained in the extra sin(x)/x
>>attenuation is a net loss when compared with the loss of the ability
>>to implement a longer filter.
> Yea, Vladimir mentioned that important shortcoming
> and I think you're both right about that.
>
You can still trim the calculations by an equivalent amount by factoring
out the repeated samples and pre-summing adjacent coefficients. The
savings are equivalent to the not-muliplying-by-zero technique.
For a 12-tap, 2x interpolator:
y[0] = x[0] * h[11] + x[0] * h[10]
+ x[-1] * h[9] + x[-1] * h[8]
+ x[-2] * h[7] + x[-2] * h[6]
+ x[-3] * h[5] + x[-3] * h[4]
+ x[-4] * h[3] + x[-4] * h[2]
+ x[-5] * h[1] + x[-5] * h[0]
y[0] = x[0] * (h[11] + h[10])
+ x[-1] * (h[9] + h[8])
+ x[-2] * (h[7] + h[6])
+ x[-3] * (h[5] + h[4])
+ x[-4] * (h[3] + h[2])
+ x[-5] * (h[1] + h[0])
I count six multiplies and five adds, which is exactly the same
computational burden as with zero-insertion.
--
Jim Thomas Principal Applications Engineer Bittware, Inc
jthomas@bittware.com http://www.bittware.com (603) 226-0404 x536
Having a smoking section in a restaurant is like
having a peeing section in a swimming pool.
Reply by Vladimir Vassilevsky●February 7, 20062006-02-07
Rick Lyons wrote:
>
> Well, ... a comparison of these "stuffed zeros" versus
> "repeated samples" methods of upsampling is definitely
> not in the standard DSP textbooks.
"Repeated samples" is a simplest way to do the interpolation. More
general, you can use Nth order interpolation polynomial.
> In fact I couldn't
> find a discussion comparing these schemes even in
> P. Vaidyanathan's or fred harris' multirate DSP books.
As I clear as I can remember the lecture at school (~20 years ago), it
was about converting digital to analog using a polynomial of a degree N
to do the interpolation directly in the continuos time. It was shown
that the polynomial interpolation acts similar to filtering of the same
order. It was in our textbook; it would be difficult to me to dig it out.
Vladimir Vassilevsky
DSP and Mixed-Up Signal Design Consultant
http://www.abvolt.com
Reply by Rick Lyons●February 7, 20062006-02-07
On Tue, 07 Feb 2006 00:42:17 GMT, Randy Yates <yates@ieee.org> wrote:
(snipped)
>
>Hi Rick,
Hi Randy,
>I think you're correct. But, if I've interpreted things right, the
>downside of the approach is that you lose the opportunity efficiently
>compute the filter since you can no longer use polyphase filtering
>(those intermediate samples are not zero anymore so you must multiply
>them).
>
>And I would think that any advantage gained in the extra sin(x)/x
>attenuation is a net loss when compared with the loss of the ability
>to implement a longer filter.
>
>Does this sound right?
Yea, Vladimir mentioned that important shortcoming
and I think you're both right about that.
Thanks,
[-Rick-]
Reply by Rick Lyons●February 7, 20062006-02-07
On Mon, 06 Feb 2006 22:49:40 GMT, Vladimir Vassilevsky
<antispam_bogus@hotmail.com> wrote:
>
>
>Rick Lyons wrote:
>
>> Hi Guys,
>>
>> I was re-thinking an interpolation topic and
>> wondered if any of you have looked into something.
>>
(snipped)
>
>
>> Have any of you guys "looked into this"?
Hi Vladimir,
>This is a very known topic from the ABC books on the DSP.
Well, ... a comparison of these "stuffed zeros" versus
"repeated samples" methods of upsampling is definitely
not in the standard DSP textbooks. In fact I couldn't
find a discussion comparing these schemes even in
P. Vaidyanathan's or fred harris' multirate DSP books.
But no matter, 'cause I know you comp.dsp guys will
help me out.
>If you apply
>the N-th order interpolation polynomial, the result of upsapmling is
>equivalent to be lowpassed with the filter of the order N.
Whew, I'm not sure what you menat by that sentence.
>The main disadvantage is that you can't use a polyphase filter in this
>case. The smoothing filter has to run on *all* samples, not just nonzero
>samples. The tradeoff in the computation is not justified by the
>additional smoothing due to the interpolation, so usually there is no
>point to do it this way.
I hadn't reached the point of thinking about polyphase
filters yet, but I think you're correct about that.
Thanks,
[-Rick-]
Reply by Rick Lyons●February 7, 20062006-02-07
On Mon, 06 Feb 2006 17:36:39 -0800, Tim Wescott <tim@seemywebsite.com>
wrote:
(snipped)
>>
>>
>Without repeated samples:
>
>You 'zero stuff', then run the thing through a filter who's transfer
>function is some polynomial in z^-1:
>
>H(z) = a_0 + a_1 z^-1 + a_2 z^-2 ...
>
>You get to choose any polynomial that you want, or to put it another way
>my filter can have zeros anywhere I want.
>
>With repeated samples:
>
>Repeated samples is the same as zero stuffing then running through a
>filter who's transfer function is
>
>H_r(z) = 1 + z^-1 + ... + z^-(N-1).
>
>This filter will have zeros at e^(j2pi/N), e^(j2pi 2/N) ...
>e^(j2pi (N-1)/N).
>
>Then you run it through the 'real' filter, which can have poles anywhere
>you want.
>
>In the end, you can have any filter that you want, as long as it has
>zeros at e^(j2pi/N), e^(j2pi 2/N) ... e^(j2pi (N-1)/N).
>
>Hmm. I'll take zeros anywhere I want, instead of anywhere I want as
>long as it includes some predefined set.
>Unless!
>
>I get some computational advantage out of the whole thing.
Hi Tim,
thanks for your clear interpretation.
I definitely "see what you mean". (Yours is another
vote against the "repeated samples" method.
[-Rick-]
Reply by Jerry Avins●February 7, 20062006-02-07
Rick Lyons wrote:
> On Mon, 06 Feb 2006 17:35:57 -0500, Jerry Avins <jya@ieee.org> wrote:
>
> (snipped)
>
>>>Have any of you guys "looked into this"?
>>
>>The phase is shifted relative to zero stuffing, from
>> 40000 44444
>>here ^ to here ^. The effect is precisely that of a zero-order hold for
>>the simple reason that it is one. Why do you feel that the effect at
>>zero Hz is more pronounced than at the old f_s?
>>
>>Jerry
>
>
> Hi Jerry,
>
> Oh shoot. I didn't understand your
> question: "Why do you feel that the effect at
> zero Hz is more pronounced than at the old f_s?"
> I'm not sure what you mean by "the effect at
> zero Hz".
I put it badly. You wrote, "The only disadvantage that I can see in the
upsampling by 'repeated samples' method is that the lowpass filter must
compensate for the droop in the sin(x)/x freq response envelope near
zero Hz." I guess it's a matter of what "near zero Hz" means. There is
no droop at DC, and only negligible droop up to about x = .1. As with a
ZOH DAC, the worst droop is at Fs/2.
Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
Reply by Jim Thomas●February 7, 20062006-02-07
dan wrote:
> Hi Rick,
>
> This was the topic of a thread that started June 17, 1998 that both
> Jerry and I participated in. It was titled "Upsampling Help?" That
> may be a good place to start.
>
> BR,
> Dan
>