PDA

View Full Version : Relation between dynamic range and bandwidth?


05-20-2005, 12:57 AM
Consider a sampled a signal taking values in a certain range.
In the case of an image for, instance, the samples are always positive,
being related to light intensity, their values are bounded by dynamic
range of the sensor, etc...
Let's consider, for instance, a 1-D signal sampled with 8 bits. The
values will be in the [0,255] interval.
Now let's generate random values of this signal x_i, i=0,...,N-1
according to some ditribution, and let's consider these values as
samples of an unknow continuous signal x(t) that we want to
reconstruct. If I use sinc interpolation on this data set to
reconstruct the values of x(t) between the samples, I see values that
fall outside the [0,255] interval. This is telling me that I have in
some way "undersampled" x(t), or, in other words, that by generating
random values I have created a signal whose bandwidth is too high for
the sampling rate.
Now things gets confusing, since the sampling rate has not really been
defined...
In summary, it seems that there should be a relationship between the
dynamic range range of a signal and its bandwidht, so that by filtering
the sequence of random values I should be able to obtain values in the
[0-255] by sinc interpolation.

Any ideas?

-Arrigo

Jerry Avins
05-20-2005, 05:05 PM
[email protected] wrote:
> Consider a sampled a signal taking values in a certain range.
> In the case of an image for, instance, the samples are always positive,
> being related to light intensity, their values are bounded by dynamic
> range of the sensor, etc...
> Let's consider, for instance, a 1-D signal sampled with 8 bits. The
> values will be in the [0,255] interval.
> Now let's generate random values of this signal x_i, i=0,...,N-1
> according to some ditribution, and let's consider these values as
> samples of an unknow continuous signal x(t) that we want to
> reconstruct. If I use sinc interpolation on this data set to
> reconstruct the values of x(t) between the samples, I see values that
> fall outside the [0,255] interval. This is telling me that I have in
> some way "undersampled" x(t), or, in other words, that by generating
> random values I have created a signal whose bandwidth is too high for
> the sampling rate.
> Now things gets confusing, since the sampling rate has not really been
> defined...
> In summary, it seems that there should be a relationship between the
> dynamic range range of a signal and its bandwidht, so that by filtering
> the sequence of random values I should be able to obtain values in the
> [0-255] by sinc interpolation.
>
> Any ideas?
>
> -Arrigo

It seems to me that you are mixing several ideas together, but there is
one overriding difficulty. You have no assurance that randomly generated
samples will represent a band-limited signal; one that can be validly
sampled. By assuming the validity of the samples, you have adopted a
false premise from which anything -- even the moon's being made of
cheese -- can be established by thenceforward valid logic.

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

Jerry Avins
05-20-2005, 05:42 PM
Jerry Avins wrote:

...

> It seems to me that you are mixing several ideas together, but there is
> one overriding difficulty. You have no assurance that randomly generated
> samples will represent a band-limited signal; one that can be validly
> sampled. By assuming the validity of the samples, you have adopted a
> false premise from which anything -- even the moon's being made of
> cheese -- can be established by thenceforward valid logic.

Scratch that. There's always some weird (and not necessarily everywhere
finite) signal that is both bandlimited and represented by an arbitrary
set of samples. Assume that our ADC's input range is +/-1 and that it is
never overloaded. The sequence +1 +1 +1 +1 +1 -1 -1 -1 -1 -1 ... doesn't
represent a square wave -- that wouldn't be bandlimited -- but something
very different. However, the sequence +1 +1 0 -1 -1 0 is bandlimited; it
represents a single sinusoid at Fs/3 with amplitude of 2/sqrt(3). Even
with well defined sample trains, it's wrong to assume that the signal
amplitude doesn't exceed the magnitude of the largest sample.

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

05-20-2005, 06:12 PM
So let me restate this problem in a different way. How can I generate a
random, discrete, periodic signal taking values in a certain range so
that by sinc interpolating the samples I always obtain values in the
same range?

-Arrigo

Jerry Avins
05-20-2005, 06:55 PM
[email protected] wrote:
> So let me restate this problem in a different way. How can I generate a
> random, discrete, periodic signal taking values in a certain range so
> that by sinc interpolating the samples I always obtain values in the
> same range?
>
> -Arrigo

As far as I know, you can't. Didn't I just provide a counterexample?

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

Randy Yates
05-20-2005, 07:08 PM
[email protected] writes:

> So let me restate this problem in a different way. How can I generate a
> random, discrete, periodic signal taking values in a certain range so
> that by sinc interpolating the samples I always obtain values in the
> same range?

Hi Arrigo,

How can a signal be random and periodic at the same time? Did
you mean an *arbitrary* periodic signal?

When you say you want to obtain values in the same range, I'm
assuming that you mean you don't want to exceed the maximum
or minimum of that range.

Here's perhaps some insight that may help answer your question. When you
sinc-interpolate a signal x[n], you perform the following operation:

x(t) = \sum_{n=-\infty}^{+\infty} x[n] * sinc(tau - nT)

This is at a maximum when x[n] = A*sgn(sinc(tau - nT)). It
can be shown that this maximum is unbounded, i.e.,

lim_{N\approaches\infty} \sum_{n=-N}^{+N} x[n] * sinc(tau - nT)

does not exist.

Does that help?
--
Randy Yates
Sony Ericsson Mobile Communications
Research Triangle Park, NC, USA
[email protected], 919-472-1124

05-20-2005, 08:23 PM
Randy, first of all I want to thank you for spending some time on this
problem.
Yes, by random I mean random for t=0,...,N-1 then these values are
repeated periodically for t=-\infty...+\infty.
This is consistent with the fact that I use the FFT to do the sinc
interpolation (I FFT the data, multiply by e^{-j*2*pi/N*dx}, then
inverse FFT).
The original problem that I have is the following:

1. I generate N random samples x_t \in [0,A], t=0,...,N
2. I compute the FFT X_k=FFT{x_t}
3. Now I apply a phase shift in the frequency domain:
Y_k=X_k*e^{-j*2*pi/N*dx}
4. I inverse transform X_k: y_t=IFFT{Y_k}

Now I notice that some of the y_t are <0, some are > A.
So the question is: what kind of filtering/transformation should I
apply to the x_t between steps 1. and 2. to ensure that all the y_t \in
[0,A]?
Now that I think more about it, it seems that y_t should have *more*
harmonics, so maybe filtering x_t does not solve the problem.
Now you are wondering what this is all about, huh?
I want to generate some synthetic images as ground truth to test an
image registration algorithm. By doing this in the frequency domain I
can enforce these images to be "perfectly" aligned, if the images are
also bandlimited. This brings us back to the original question: like
you pointed out, one cannot generate random samples and expect them to
be samples of a bandlimited function.
Is this more clear now?

-Arrigo

Fred Marshall
05-20-2005, 09:18 PM
<[email protected]> wrote in message
news:[email protected] oups.com...
> Randy, first of all I want to thank you for spending some time on this
> problem.
> Yes, by random I mean random for t=0,...,N-1 then these values are
> repeated periodically for t=-\infty...+\infty.
> This is consistent with the fact that I use the FFT to do the sinc
> interpolation (I FFT the data, multiply by e^{-j*2*pi/N*dx}, then
> inverse FFT).
> The original problem that I have is the following:
>
> 1. I generate N random samples x_t \in [0,A], t=0,...,N
> 2. I compute the FFT X_k=FFT{x_t}
> 3. Now I apply a phase shift in the frequency domain:
> Y_k=X_k*e^{-j*2*pi/N*dx}
> 4. I inverse transform X_k: y_t=IFFT{Y_k}
>
> Now I notice that some of the y_t are <0, some are > A.
> So the question is: what kind of filtering/transformation should I
> apply to the x_t between steps 1. and 2. to ensure that all the y_t \in
> [0,A]?
> Now that I think more about it, it seems that y_t should have *more*
> harmonics, so maybe filtering x_t does not solve the problem.
> Now you are wondering what this is all about, huh?
> I want to generate some synthetic images as ground truth to test an
> image registration algorithm. By doing this in the frequency domain I
> can enforce these images to be "perfectly" aligned, if the images are
> also bandlimited. This brings us back to the original question: like
> you pointed out, one cannot generate random samples and expect them to
> be samples of a bandlimited function.
> Is this more clear now?
>
> -Arrigo

Arrigo,

I'm not sure that I agree with some of the responses you've received. Well,
maybe not to disagree completely but perhaps in a practical sense.

Here are some questions:
Q: If you create a sequence of random numbers, what is the bandwidth?
Q: Better stated: if you create a sequence of random numbers and assume a
sample interval T, what is the bandwidth?
A: I think you will find that the bandwidth is 1/(2T) for all practical
purposes.

Q: Can a sequence of random numbers be "reconstructed"?
A: Most probably yes.

Q: If so, what does that mean?
A: I think it means:
1) Start with a sequence of random numbers on an assumed regular grid in
time or space
2) Interpolate them with a suitably large family of shifted sincs of
suitable duration.
3) Sample the result at the same points as before.
Do the samples match? If yes, the sequence was faithfully reconstructed.
If no, then it wasn't.

Q: How might one do this such that the resampling of the reconstruction is
different?
A: If there is temporal aliasing allowed to occur in the interpolation.

Q: How can temporal aliasing be caused by interpolating?
A: If interpolation is done by multiplication in the frequency domain and
the array size in frequency is too short for the resulting temporal cicular
convolution results. Or, equivalently, if the interpolation is done by
temporal convolution using circular convolution and the array sizes are too
short - causing overlap / aliasing.
A: If the interpolation is done in the frequency domain by appending zeros
around fs/2
and if there is substantial energy at fs/2.
If there is substantial energy at fs/2, there will be a sharp
discontinuity at fs/2 when the zeros are added. This will cause higher
"quefrencies" to occur in the time domain - thus aliasing in time.

Q: How can one guarantee the use of dynamic range in reconstruction of an
arbitrary set of samples?
A: You can't. So, you are perhaps stuck with doing some scaling.

Q1: What happens if one generates a sequence of random numbers at 100fs,
perfectly lowpass filters them to fs/2 and decimates the result to a
sequence sampled at fs - i.e. by a factor of 100?
Q2: Why is that different than simply generating the samples at fs in the
first place?
Q3: Why is that different than the result obtained from the lowpassed case
above?
Q4: Why is that different than selecting every 100th sample from the
sequence generated at 100fs?
Q5: What happens if you take any of the sequences from Q2, Q3 or Q4 and
reconstruct them using a sample rate of 100fs? Using reasonable assumptions
about how you go about this, do you get the sequence generated in Q1?

Consider this:
You started with a random sequence that has a limited dynamic range. So,
it's not Gaussian. If it were, it would have some probability of having
very large values.
If you were to generate two independent sequences with the same limited
dynamic range and were to add them together, the new dyamic range limit
would be 2x the original. Three would be 3x and so on.
If we examine the probability distribution of amplitudes of the output, we
see that the distribution becomes more and more like Gaussian. The
probability of hitting the theoretical maximum values gets lower and lower
as more sequences are added. See the Central Limit Theorem.

Similarly, an interpolating filter adds the values of multiple samples. The
only difference from above is that they are weighted by the filter
coefficients. Accordingly, the new dynamic range will be the original
multiplied by the length of the filter (assuming it is a FIR filter) and
multiplied by the sum of the magnitudes of the filter coefficients. Take
some examples:
- All of the inputs are at the maximum of the dynamic range.
...The output is the sum of the filter coefficients multiplied by the maximum
of the dynamic range.

- All of the inputs are at the maximum of the dynamic range and have the
same sign as the coefficients of the filter
...The output is the sum of the magnitudes of the filter coefficients
multiplied by the maximum of the dynamic range .... and, is larger than the
first example.

Obviously, selecting the relative magnitudes of the coefficients of the
filter will impact the result. This is just one method of scaling.

You will notice that I stayed away from the theoretical treatements and
tried to build from practical situations. It bothers me when a practical
solution exists in the midst of a proof that says it might not - without
some mention of the probability of failure or the conditions necessary to
fail, etc.

Fred

Jerry Avins
05-20-2005, 10:54 PM
[email protected] wrote:

> ... This brings us back to the original question: like
> you pointed out, one cannot generate random samples and expect them to
> be samples of a bandlimited function.
> Is this more clear now?

It was I who wrote that, but I realized it was wrong and retracted it.
It is simple to find a band-limited continuous function that when
samples, yields the sample set in question. It may have isolated
infinities and will have a non-intuitive shape, but it exists. It is
your amplitude criterion that can't be met.

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

glen herrmannsfeldt
05-21-2005, 05:32 AM
Jerry Avins wrote:

(snip)

> Scratch that. There's always some weird (and not necessarily everywhere
> finite) signal that is both bandlimited and represented by an arbitrary
> set of samples. Assume that our ADC's input range is +/-1 and that it is
> never overloaded. The sequence +1 +1 +1 +1 +1 -1 -1 -1 -1 -1 ... doesn't
> represent a square wave -- that wouldn't be bandlimited -- but something
> very different. However, the sequence +1 +1 0 -1 -1 0 is bandlimited; it
> represents a single sinusoid at Fs/3 with amplitude of 2/sqrt(3). Even
> with well defined sample trains, it's wrong to assume that the signal
> amplitude doesn't exceed the magnitude of the largest sample.

That would seem to mean that an amplitude limited analog signal
can't use the full range of the digitized signal. That is, that
such sampled signals should be at least slightly compressible.

-- glen

Jerry Avins
05-21-2005, 04:37 PM
glen herrmannsfeldt wrote:
> Jerry Avins wrote:
>
> (snip)
>
>> Scratch that. There's always some weird (and not necessarily
>> everywhere finite) signal that is both bandlimited and represented by
>> an arbitrary set of samples. Assume that our ADC's input range is +/-1
>> and that it is never overloaded. The sequence +1 +1 +1 +1 +1 -1 -1 -1
>> -1 -1 ... doesn't represent a square wave -- that wouldn't be
>> bandlimited -- but something very different. However, the sequence +1
>> +1 0 -1 -1 0 is bandlimited; it represents a single sinusoid at Fs/3
>> with amplitude of 2/sqrt(3). Even with well defined sample trains,
>> it's wrong to assume that the signal amplitude doesn't exceed the
>> magnitude of the largest sample.
>
>
> That would seem to mean that an amplitude limited analog signal
> can't use the full range of the digitized signal. That is, that
> such sampled signals should be at least slightly compressible.


Not really. It means that with particular choices of sampling instants,
some bandlimited signals slightly exceeding the ADC's dynamic range can
be accurately sampled. Such signals are rare and require synchronization
in practice. It is significant the other way around: artificially
constructed sequences can produce outputs from the reconstruction filter
that exceed the DAC's peak output. Once I think about it, that's not
really a surprise. With analog all the way, filtering the fundamental
out of a square wave with P-P amplitude of 1 yields a sinusoid with P-P
amplitude of 1.27 or so.

That brings to mind the paradox of the moment, which further thought may
well lay to rest. A reconstruction filter has a rise at the high end to
compensate for the sin(x)/x droop caused by the DAC's zero-order hold.
Yet a peak signal at Fs/2, +1, -1, ..., will present a square wave to
the filter, and even with no boost, the P-P amplitude of its fundamental
will be 2.55. What gives?

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

Fred Marshall
05-21-2005, 04:47 PM
"Jerry Avins" <[email protected]> wrote in message
news:[email protected]...
> glen herrmannsfeldt wrote:
>> Jerry Avins wrote:
>>
>> (snip)
>>
>>> Scratch that. There's always some weird (and not necessarily everywhere
>>> finite) signal that is both bandlimited and represented by an arbitrary
>>> set of samples. Assume that our ADC's input range is +/-1 and that it is
>>> never overloaded. The sequence +1 +1 +1 +1 +1 -1 -1 -1 -1 -1 ... doesn't
>>> represent a square wave -- that wouldn't be bandlimited -- but something
>>> very different. However, the sequence +1 +1 0 -1 -1 0 is bandlimited; it
>>> represents a single sinusoid at Fs/3 with amplitude of 2/sqrt(3). Even
>>> with well defined sample trains, it's wrong to assume that the signal
>>> amplitude doesn't exceed the magnitude of the largest sample.
>>
>>
>> That would seem to mean that an amplitude limited analog signal
>> can't use the full range of the digitized signal. That is, that
>> such sampled signals should be at least slightly compressible.
>
>
> Not really. It means that with particular choices of sampling instants,
> some bandlimited signals slightly exceeding the ADC's dynamic range can be
> accurately sampled. Such signals are rare and require synchronization in
> practice. It is significant the other way around: artificially constructed
> sequences can produce outputs from the reconstruction filter that exceed
> the DAC's peak output. Once I think about it, that's not really a
> surprise. With analog all the way, filtering the fundamental out of a
> square wave with P-P amplitude of 1 yields a sinusoid with P-P amplitude
> of 1.27 or so.
>
> That brings to mind the paradox of the moment, which further thought may
> well lay to rest. A reconstruction filter has a rise at the high end to
> compensate for the sin(x)/x droop caused by the DAC's zero-order hold. Yet
> a peak signal at Fs/2, +1, -1, ..., will present a square wave to the
> filter, and even with no boost, the P-P amplitude of its fundamental will
> be 2.55. What gives?
>
> Jerry
> --
> Engineering is the art of making what you want from things you can get.
> ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

Only that the p-p amplitudes are different by a factor of 2 perhaps?

Fred

Jerry Avins
05-21-2005, 05:18 PM
Fred Marshall wrote:
> "Jerry Avins" <[email protected]> wrote in message

...

>>That brings to mind the paradox of the moment, which further thought may
>>well lay to rest. A reconstruction filter has a rise at the high end to
>>compensate for the sin(x)/x droop caused by the DAC's zero-order hold. Yet
>>a peak signal at Fs/2, +1, -1, ..., will present a square wave to the
>>filter, and even with no boost, the P-P amplitude of its fundamental will
>>be 2.55. What gives?

>
> Only that the p-p amplitudes are different by a factor of 2 perhaps?

No. 2.55 without droop compensation where 2.0 would be correct with it.

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

Fred Marshall
05-21-2005, 06:21 PM
"Jerry Avins" <[email protected]> wrote in message
news:[email protected]...
> Fred Marshall wrote:
>> "Jerry Avins" <[email protected]> wrote in message
>
> ...
>
>>>That brings to mind the paradox of the moment, which further thought may
>>>well lay to rest. A reconstruction filter has a rise at the high end to
>>>compensate for the sin(x)/x droop caused by the DAC's zero-order hold.
>>>Yet a peak signal at Fs/2, +1, -1, ..., will present a square wave to the
>>>filter, and even with no boost, the P-P amplitude of its fundamental will
>>>be 2.55. What gives?
>
>>
>> Only that the p-p amplitudes are different by a factor of 2 perhaps?
>
> No. 2.55 without droop compensation where 2.0 would be correct with it.
>
> Jerry

Not the sine Jerry, the square wave p-p amplitudes are different by 2x.

The first one you mentioned:
"a square wave with P-P amplitude of 1 yields a sinusoid with P-P
amplitude of 1.27 or so"
has a p-p amplitude of 1 by your own words.

The second one you mentioned:
"a peak signal at Fs/2, +1, -1, ..., will present a square wave to
the filter"
has a p-p amplitude of 2. +1-(-1)=2

That's what I meant. It is pre-compensation that the signal difference
occurs.

Fred

Jerry Avins
05-21-2005, 06:47 PM
Fred Marshall wrote:
> "Jerry Avins" <[email protected]> wrote in message
> news:[email protected]...
>
>>Fred Marshall wrote:
>>
>>>"Jerry Avins" <[email protected]> wrote in message
>>
>> ...
>>
>>
>>>>That brings to mind the paradox of the moment, which further thought may
>>>>well lay to rest. A reconstruction filter has a rise at the high end to
>>>>compensate for the sin(x)/x droop caused by the DAC's zero-order hold.
>>>>Yet a peak signal at Fs/2, +1, -1, ..., will present a square wave to the
>>>>filter, and even with no boost, the P-P amplitude of its fundamental will
>>>>be 2.55. What gives?
>>
>>>Only that the p-p amplitudes are different by a factor of 2 perhaps?
>>
>>No. 2.55 without droop compensation where 2.0 would be correct with it.
>>
>>Jerry
>
>
> Not the sine Jerry, the square wave p-p amplitudes are different by 2x.
>
> The first one you mentioned:
> "a square wave with P-P amplitude of 1 yields a sinusoid with P-P
> amplitude of 1.27 or so"
> has a p-p amplitude of 1 by your own words.
>
> The second one you mentioned:
> "a peak signal at Fs/2, +1, -1, ..., will present a square wave to
> the filter"
> has a p-p amplitude of 2. +1-(-1)=2
>
> That's what I meant. It is pre-compensation that the signal difference
> occurs.

Are you sure? the zero-order hold causes a sinc droop, which is
compensated for by a rise in the filter. So after compensation, the P-P
amplitude would be a few dB higher than 2.55. Or is my head screwed on
backward today?

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

Fred Marshall
05-21-2005, 10:43 PM
"Jerry Avins" <[email protected]> wrote in message
news:[email protected]...
> Fred Marshall wrote:
>> "Jerry Avins" <[email protected]> wrote in message
>> news:[email protected]...
>>
>>>Fred Marshall wrote:
>>>
>>>>"Jerry Avins" <[email protected]> wrote in message
>>>
>>> ...
>>>
>>>
>>>>>That brings to mind the paradox of the moment, which further thought
>>>>>may well lay to rest. A reconstruction filter has a rise at the high
>>>>>end to compensate for the sin(x)/x droop caused by the DAC's zero-order
>>>>>hold. Yet a peak signal at Fs/2, +1, -1, ..., will present a square
>>>>>wave to the filter, and even with no boost, the P-P amplitude of its
>>>>>fundamental will be 2.55. What gives?
>>>
>>>>Only that the p-p amplitudes are different by a factor of 2 perhaps?
>>>
>>>No. 2.55 without droop compensation where 2.0 would be correct with it.
>>>
>>>Jerry
>>
>>
>> Not the sine Jerry, the square wave p-p amplitudes are different by 2x.
>>
>> The first one you mentioned:
>> "a square wave with P-P amplitude of 1 yields a sinusoid with P-P
>> amplitude of 1.27 or so"
>> has a p-p amplitude of 1 by your own words.
>>
>> The second one you mentioned:
>> "a peak signal at Fs/2, +1, -1, ..., will present a square wave to
>> the filter"
>> has a p-p amplitude of 2. +1-(-1)=2
>>
>> That's what I meant. It is pre-compensation that the signal difference
>> occurs.
>
> Are you sure? the zero-order hold causes a sinc droop, which is
> compensated for by a rise in the filter. So after compensation, the P-P
> amplitude would be a few dB higher than 2.55. Or is my head screwed on
> backward today?
>
> Jerry
> --

Jerry,

I am very sure about what *I* am talking about.
It seems clear we are talking about different things.

I am simply pointing out that the sqare wave *inputs* you defined are
different in amplitude by a factor of 2.
That is all.

So, that the outputs, however defined, should be different by a factor of 2
also - all else being equal.

Fred

Jerry Avins
05-21-2005, 11:36 PM
Fred Marshall wrote:

...

> I am simply pointing out that the sqare wave *inputs* you defined are
> different in amplitude by a factor of 2.
> That is all.
>
> So, that the outputs, however defined, should be different by a factor of 2
> also - all else being equal.

Yes. I supposed that was clear. What I'm driving at is that the
high-frequency response of a DAC rolls off because it's output consists
of rectangular pulses of substantial width, not narrow impulses. When
the rectangular pulses are the width of a sampling interval -- the usual
case -- theory predicts that the response is down some 4 dB at Fs/2.
(The solid curve in Fig.2 at http://cnx.rice.edu/content/m11458/latest/)

A sinusoid of P-P amplitude 2 and frequency Fs/2, when sampled at the
peaks, produces a square DAC output of amplitude 2. After removing the
harmonics, the remaining sinusoidal component will have a P-P amplitude
of about 2.55. Sinc compensation would add 4 dB more. What's wrong?

Jerry
--
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

Fred Marshall
05-22-2005, 07:47 AM
"Jerry Avins" <[email protected]> wrote in message
news:[email protected]...
> Fred Marshall wrote:
>
> ...
>
>> I am simply pointing out that the sqare wave *inputs* you defined are
>> different in amplitude by a factor of 2.
>> That is all.
>>
>> So, that the outputs, however defined, should be different by a factor of
>> 2 also - all else being equal.
>
> Yes. I supposed that was clear. What I'm driving at is that the
> high-frequency response of a DAC rolls off because it's output consists of
> rectangular pulses of substantial width, not narrow impulses. When the
> rectangular pulses are the width of a sampling interval -- the usual
> case -- theory predicts that the response is down some 4 dB at Fs/2.
> (The solid curve in Fig.2 at http://cnx.rice.edu/content/m11458/latest/)
>
> A sinusoid of P-P amplitude 2 and frequency Fs/2, when sampled at the
> peaks, produces a square DAC output of amplitude 2. After removing the
> harmonics, the remaining sinusoidal component will have a P-P amplitude of
> about 2.55. Sinc compensation would add 4 dB more. What's wrong?
>
> Jerry

Jerry,

OK - now we're on the same track.

Well, one thing that's wrong is that the waveform is improperly sampled.
That's enough.

Fred

Jerry Avins
05-22-2005, 01:52 PM
Fred Marshall wrote:
> "Jerry Avins" <[email protected]> wrote in message
> news:[email protected]...
>
>>Fred Marshall wrote:
>>
>> ...
>>
>>
>>>I am simply pointing out that the sqare wave *inputs* you defined are
>>>different in amplitude by a factor of 2.
>>>That is all.
>>>
>>>So, that the outputs, however defined, should be different by a factor of
>>>2 also - all else being equal.
>>
>>Yes. I supposed that was clear. What I'm driving at is that the
>>high-frequency response of a DAC rolls off because it's output consists of
>>rectangular pulses of substantial width, not narrow impulses. When the
>>rectangular pulses are the width of a sampling interval -- the usual
>>case -- theory predicts that the response is down some 4 dB at Fs/2.
>>(The solid curve in Fig.2 at http://cnx.rice.edu/content/m11458/latest/)
>>
>>A sinusoid of P-P amplitude 2 and frequency Fs/2, when sampled at the
>>peaks, produces a square DAC output of amplitude 2. After removing the
>>harmonics, the remaining sinusoidal component will have a P-P amplitude of
>>about 2.55. Sinc compensation would add 4 dB more. What's wrong?
>>
>>Jerry
>
>
> Jerry,
>
> OK - now we're on the same track.
>
> Well, one thing that's wrong is that the waveform is improperly sampled.
> That's enough.
>
> Fred

There's no aliasing at Fs/2, only an amplitude ambiguity that is
resolved with the synchronous sampling. If the sinusoid were .499Fs,
there would be substantial intervals when it would be sampled nearly at
the peaks. Would there then not be a substantial interval when this
properly sampled signal behaved improperly? I'm clearly missing
something. I don't know what.

The output of the DAC, as I see it in my head, is an amplitude-modulated
square wave at Fs/2. I need to start over! (I have a glimmer of an
answer, but not enough.)

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

Matt Timmermans
05-22-2005, 07:49 PM
"Jerry Avins" <[email protected]> wrote in message
news:[email protected]...
> There's no aliasing at Fs/2, only an amplitude ambiguity that is resolved
> with the synchronous sampling.

Resolved, but not correct in any meaningful way.

> If the sinusoid were .499Fs [...]

Then the sampling frequency would beat with the signal, and the average
power would be half of what you were expecting.

Interestingly, the fact that such "beating" signals are properly sampled
sinusoids near Fs/2, and the implied requirement to be able to reconstruct
them with a sinc filter no matter how long the beat period is, nicely
illustrates why the overall amplitude of the sinc can't fall off any faster
than 1/x.

--
Matt

Fred Marshall
05-23-2005, 03:46 AM
"Jerry Avins" <[email protected]> wrote in message
news:[email protected]...
> Fred Marshall wrote:
>> "Jerry Avins" <[email protected]> wrote in message
>> news:[email protected]...
>>
>>>Fred Marshall wrote:
>>>
>>> ...
>>>
>>>
>>>>I am simply pointing out that the sqare wave *inputs* you defined are
>>>>different in amplitude by a factor of 2.
>>>>That is all.
>>>>
>>>>So, that the outputs, however defined, should be different by a factor
>>>>of 2 also - all else being equal.
>>>
>>>Yes. I supposed that was clear. What I'm driving at is that the
>>>high-frequency response of a DAC rolls off because it's output consists
>>>of rectangular pulses of substantial width, not narrow impulses. When the
>>>rectangular pulses are the width of a sampling interval -- the usual
>>>case -- theory predicts that the response is down some 4 dB at Fs/2.
>>>(The solid curve in Fig.2 at http://cnx.rice.edu/content/m11458/latest/)
>>>
>>>A sinusoid of P-P amplitude 2 and frequency Fs/2, when sampled at the
>>>peaks, produces a square DAC output of amplitude 2. After removing the
>>>harmonics, the remaining sinusoidal component will have a P-P amplitude
>>>of about 2.55. Sinc compensation would add 4 dB more. What's wrong?
>>>
>>>Jerry
>>
>>
>> Jerry,
>>
>> OK - now we're on the same track.
>>
>> Well, one thing that's wrong is that the waveform is improperly sampled.
>> That's enough.
>>
>> Fred
>
> There's no aliasing at Fs/2, only an amplitude ambiguity that is resolved
> with the synchronous sampling. If the sinusoid were .499Fs, there would be
> substantial intervals when it would be sampled nearly at the peaks. Would
> there then not be a substantial interval when this properly sampled signal
> behaved improperly? I'm clearly missing something. I don't know what.
>
> The output of the DAC, as I see it in my head, is an amplitude-modulated
> square wave at Fs/2. I need to start over! (I have a glimmer of an answer,
> but not enough.)
>
> Jerry
> --

Jerry,

Whaddyamean "no aliasing"?

As I see it, in the frequency domain, if it's even proper to talk about it,
the positive frequency part and the negative frequency part fall on top of
one another. So there's an ambiguity for a sampled-data system.

Either you have a pair of frequency samples with value 0.5 or you have one
at fs/2 with value 1.0. I think that qualifies as aliasing.

Fred