Carlos Moreno wrote:
> Jerry Avins wrote:
>
>> Carlos Moreno wrote:
>>
>>> Jerry Avins wrote:
>>>
>>>> At f = Fs/2 (the simpler case), there are two samples per cycle.
>>>> Assume a cosine, so the first sample is 1, the second, -1, and the
>>>> third, 1. Multiplying by the coefficients and adding, the result is
>>>> 0. Check again 90 degrees away. With a sine, the samples are all 0;
>>>> again the result is 0; that's the response.
>>>
>>>
>>> Careful -- see my other message. Notice that f = Fs/2 is outside the
>>> valid range for reconstruction to be possible (the sampling frequency
>>> must be *greater than* the bandwidth -- not greater than or equal, but
>>> strictly greater than). A sine is precisely the example to illustrate
>>> this -- all samples are 0, which can represent two different signals:
>>> a sine at Fs/2, and the signal x(t) = 0 (actually, it can represent
>>> only one signal that meets the bandwith requirements, plus an infinity
>>> of signals outside the range -- a sine at Fs/2 is just one of them)
>>>
>>
>> In this case, reconstruction is not an issue because the gain is zero.
>
>
> Of course it is an issue. I mean, the gain in the discrete-time
> domain should correspond to the gain in the continuous-time domain,
> right? Well, I could claim that the output of your filter is not
> zero, but it is a sine wave of amplitude 2000 -- so, in my version,
> the gain is indeed 2000.
Sample a signal of magnitude 1 at exactly Fs/2 at a sequence of phases,
starting with a cosine whose second harmonic is in phase with the
sampling clock, and ending with a sine, 90 degrees advanced. For the
cosine, samples are taken at at the positive and negative peaks, and the
reconstructed amplitude will be correct. For other phases, the
reconstructed amplitude will be less than 1, and for the sine, it will
be 0. In the filter described, an order 2 binomial, the gain at Fs/2 is
zero. To claim that it exceeds unity is just silly. I'm sure you have
something in mind, but I can't guess what.
> I mean, the fact that the gain is zero is just a detail.
A detail to be sure, but it means that however large the input, there
will be no output. Where does A=2000 come from.
> Imagine
> applying the same analysis to a high-pass filter -- say, something
> like y(n) = x(n) - x(n-1). In this case, plugging an input that
> is a sine or a cosine (at Fs/2) gives you completely different
> outputs.
To find the gain, input one of each, then take Sqrt(sinresponse^2 +
cosresponse^2) of the two results. It works every time, with all FIR
filters at all frequencies.
I think I earlier wrote geometric mean. If so, this is a correction.
> The reason is that the signals being represented are
> not valid -- if we allow the ferquency to be *equal to* half the
> sampling rate, then there is an infinity of signals that could be
> repersented (in all cases): for 0,0,0,0... any signal of the
> form A*sin(wt) (for the right value of w) gives you that sampled
> version. For a signal of the form -A, A, -A, A, .... , there is
> also an infinity of signals -- either A*cos(wt), or A'*cos(wt+phi)
Sqrt(sinresponse^2 + cosresponse^2) works. Try it.
> (for every value of A, and every value of phi in (-pi,pi), there
> is a value of A' such that the samples of the function A'cos(wt+phi)
> are ... -A, A, -A, A, .... )
>
>
>> A frequency lower than Fs/2 can be accurately reconstructed. A frequency
>> higher than Fs/2 is pernicious; it contaminates those below by aliasing.
>> Fs/2 itself is borderline; it cannot be accurately reconstructed
>> (although an attempted reconstruction will not exceed the true value),
>
>
> I think this statement between parenthesis is incorrect -- the
> example in my previous paragraph is precisely a counter-example to
> it, right? (unless I did not understand what you mean by "exceed
> the true value"?)
The reconstructed amplitude cannot exceed the amplitude of the sampled
signal.
> My point is, more generally speaking, that the sampling theorem
> specifies that a signal can be exactly and unambiguously reconstructed
> from samples at a rate of Fs if and only if the bandwidth of the
> signal is *less than* Fs/2. So, an example of a signal that
> corresponds to the sampled version of a sinusoid at exactly Fs/2
> is ill-formed, since the process of sampling such signal violates
> the sampling theorem.
That is correct. Such a signal cannot be accurately reconstructed The
second harmonic of reconstruction of a signal at Fs/2 will always be in
phase with the sampling clock and the amplitude may be too small. If the
original signal is A*cos(Fs*t/2) + B*sin(Fs*t/2), then the inaccurate
reconstruction consists of A*cos(Fs*t/2) alone. That's wrong, but not
pernicious.
Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������