DSPRelated.com
Forums

Basic Signal Processing Question

Started by Venk...@gmail.com July 20, 2005
Hi,
    I am starting to learn DSP. I have one fundemental question.

I understood the sampling process if the input signal(Fin) is a
sinewave and an impulse train is used as a clock(Fclk), it is
mulitplication in time domain, which is convolution in frequency
domain. The input signal is preserved becuase of the convolution with
the clock signal at DC. (Fin+/-N*Fclk when N=0 we still have Fin)



    But if we use a square wave, which does not have a DC content how
do we still preserve the signal content. How is this different from
up/down sampling??

Thanks for your response.

Venkat.Vijay.Kumar@gmail.com wrote:
> Hi, > I am starting to learn DSP. I have one fundemental question.
Only one? How fortunate!
> I understood the sampling process if the input signal(Fin) is a > sinewave and an impulse train is used as a clock(Fclk), it is > mulitplication in time domain, which is convolution in frequency > domain. The input signal is preserved becuase of the convolution with > the clock signal at DC. (Fin+/-N*Fclk when N=0 we still have Fin) > > > > But if we use a square wave, which does not have a DC content how > do we still preserve the signal content. How is this different from > up/down sampling??
When you write "use a square wave" I wonder if you mean use it for sampling. Don't do that. If you mean sample the square wave, then its lack of a DC component is not a new thing; a sine wave has no DC component either. The problem with sampling a square wave is that it isn't bandlimited, and so aliasing is inevitable. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Hi Jerry,
      Thanks for the response. Looks like I am clear with my question.
Let me clarify.

      I am sampling a sine wave(Fin) and the clock used for sampling is
a square wave(Fclk) (or pulse train with 50% duty cycle.Not an impulse
train). The 50% duty cycle square wave clock do not have any DC
components.

     Now we multiply these two waveforms in time domain, we do not have
the baseband signal!! The only components that I am getting are
Fclk+/-Fin. The output spectrum does not have Fin at all. I know this
is not true in the real world. 

What am I missing.

Venkat.Vijay.Kumar@gmail.com wrote:
> Hi Jerry, > Thanks for the response. Looks like I am clear with my question. > Let me clarify. > > I am sampling a sine wave(Fin) and the clock used for sampling is > a square wave(Fclk) (or pulse train with 50% duty cycle.Not an impulse > train). The 50% duty cycle square wave clock do not have any DC > components. > > Now we multiply these two waveforms in time domain, we do not have > the baseband signal!! The only components that I am getting are > Fclk+/-Fin. The output spectrum does not have Fin at all. I know this > is not true in the real world. > > What am I missing.
The square sampling clock merely defines the sampling instants by its (usually rising) edges. The samples themselves are taken in very short time periods (called the sampling aperture), so short that the signal can change less than one LSB during that time. Sampling consists merely of measuring the average amplitude during that short time and expressing it as a (usually) binary number. The digitized signal is a sequence of those measurements. Sometimes, to make analysis convenient, the sampling operation is expressed as a multiplication by a train of impulses, but that's not what really happens. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry Avins wrote:
> Venkat.Vijay.Kumar@gmail.com wrote: > >> Hi Jerry, >> Thanks for the response. Looks like I am clear with my question. >> Let me clarify. >> >> I am sampling a sine wave(Fin) and the clock used for sampling is >> a square wave(Fclk) (or pulse train with 50% duty cycle.Not an impulse >> train). The 50% duty cycle square wave clock do not have any DC >> components. >> >> Now we multiply these two waveforms in time domain, we do not have >> the baseband signal!! The only components that I am getting are >> Fclk+/-Fin. The output spectrum does not have Fin at all. I know this >> is not true in the real world. >> What am I missing. > > > The square sampling clock merely defines the sampling instants by its > (usually rising) edges. The samples themselves are taken in very short > time periods (called the sampling aperture), so short that the signal > can change less than one LSB during that time. Sampling consists merely > of measuring the average amplitude during that short time and expressing > it as a (usually) binary number. The digitized signal is a sequence of > those measurements. Sometimes, to make analysis convenient, the sampling > operation is expressed as a multiplication by a train of impulses, but > that's not what really happens. > > Jerry
Venkat, As you have correctly identified, the DC component of the sampling waveform is responsible for the baseband component in the sampled signal. However, you are incorrect in thinking that multiplying by the usual sampling waveform is in any way similar to multiplying by a square wave. Multiplying be the usual uni-polar sampling waveform measures the signal briefly at regular intervals when the waveform is non-zero, but equally importantly, the signal is NOT sampled during the comparatively long time that the waveform is at zero. In contrast, if you multiply by a square-wave with no DC offset, the output signal is unchanged for an entire half-period, and inverted for the other half-period (when the wave is -1). This has its uses, but not for sampling. The process you describe, of using a square-wave, is called 'frequency-mixing' in the 'real world.' This happens when you apply a radio-frequency signal and a local oscillator to a balanced-mixer circuit, for the purpose of producing Fclk+/-Fin. The absence of a basebamd signal in the output is considered to be an advantage of this method. Regards, John
That is an interesting question,

I thought that impulse sampling is desirable because it provides an
accurate representation of the signal, but that natural sampling (what
the OP describes as sampling with a square wave) also is possible and
also provides a representation of the signal except that natural
sampling  creates sinx/x attenuation to the higher frequencies.  I
think that in practice one cannot achieve ideal impulse sampling
because the aperture cannot be open for an infinitesimal time but must
be open for some short but finite time.

I thought this is completely analogous to what happens in
reconstruction in a DAC.  You can use (in theory) impulse
reconstruction which creates no sinx/x attenuation.  But in practice
most designs use natural sampling reconstruction (the samples persist
for the entire time duration of the sample) and this creates sin x/ x
attenuation which is compensated for elsewhere in the system.

So I thought impulse vs natural sampling analogy applies for both the
sampling process and the reconstruction process.   Another word for the
high frequency attenuation that occurs with natural sampling is
aperture attenuation and it can occur during sampling (capturing the
signal) or during reconstruction.

Is this not true?

thanks for the interesting question.

Mark

"Mark" <makolber@yahoo.com> wrote in message
news:1121866582.325514.102090@z14g2000cwz.googlegroups.com...
> That is an interesting question, > > I thought that impulse sampling is desirable because it provides an > accurate representation of the signal, but that natural sampling (what > the OP describes as sampling with a square wave) also is possible and > also provides a representation of the signal except that natural > sampling creates sinx/x attenuation to the higher frequencies. I > think that in practice one cannot achieve ideal impulse sampling > because the aperture cannot be open for an infinitesimal time but must > be open for some short but finite time. > > I thought this is completely analogous to what happens in > reconstruction in a DAC. You can use (in theory) impulse > reconstruction which creates no sinx/x attenuation. But in practice > most designs use natural sampling reconstruction (the samples persist > for the entire time duration of the sample) and this creates sin x/ x > attenuation which is compensated for elsewhere in the system.
Mark You are confusing the DAC process from the ADC process... The ADC *samples* a signal to create discrete signals, while the DAC creates a continuous signal from a discrete signal. The 2 operations are quite a bit different and the zero order hold of a DAC is not what i'd call 'natural sampling'. The OP might also be a little confused with the term 'clock' and sampling since a clock tends to be a nice square wave in circuit terms...however the model for sampling involves impulses. Despite feeding a square wave as a clock to an ADC, the ADC doesn't use square waves in it's actual 'sampling' of the input analog signal. Cheers Bhaskar
> > So I thought impulse vs natural sampling analogy applies for both the > sampling process and the reconstruction process. Another word for the > high frequency attenuation that occurs with natural sampling is > aperture attenuation and it can occur during sampling (capturing the > signal) or during reconstruction. > > Is this not true? > > thanks for the interesting question. > > Mark >
John Monro wrote:

   ...

> Venkat, > > As you have correctly identified, the DC component of the sampling > waveform is responsible for the baseband component in the sampled > signal. However, you are incorrect in thinking that multiplying by the > usual sampling waveform is in any way similar to multiplying by a square > wave.
... John, unless by "DC component, you mean that portion of the signal during which a sample is being taken, I don't know what you mean. If you do mean that, I think you're wrong. Consider a successive-approximation converter clocked by a square wave at 600 KHz. It takes 12 cycles to convert a 10-bit output and two more cycles to sample and hold. It provides a fresh sample every 20 microseconds. The final value in the holding capacitor represents a window in time of no more than a few nanoseconds. For high-speed use, it must be in the picosecond range. The actual clock waveform has no influence on the operation except that a clean waveform with sharp edges is needed to minimize sampling jitter. Maybe there's something I just don't get. If so, please enlighten me. 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;

Bhaskar Thiagarajan wrote:
> "Mark" <makolber@yahoo.com> wrote in message > news:1121866582.325514.102090@z14g2000cwz.googlegroups.com... > > That is an interesting question, > > > > I thought that impulse sampling is desirable because it provides an > > accurate representation of the signal, but that natural sampling (what > > the OP describes as sampling with a square wave) also is possible and > > also provides a representation of the signal except that natural > > sampling creates sinx/x attenuation to the higher frequencies. I > > think that in practice one cannot achieve ideal impulse sampling > > because the aperture cannot be open for an infinitesimal time but must > > be open for some short but finite time. > > > > I thought this is completely analogous to what happens in > > reconstruction in a DAC. You can use (in theory) impulse > > reconstruction which creates no sinx/x attenuation. But in practice > > most designs use natural sampling reconstruction (the samples persist > > for the entire time duration of the sample) and this creates sin x/ x > > attenuation which is compensated for elsewhere in the system. > > Mark > You are confusing the DAC process from the ADC process... > The ADC *samples* a signal to create discrete signals, while the DAC creates > a continuous signal from a discrete signal. > The 2 operations are quite a bit different and the zero order hold of a DAC > is not what i'd call 'natural sampling'. > > The OP might also be a little confused with the term 'clock' and sampling > since a clock tends to be a nice square wave in circuit terms...however the > model for sampling involves impulses. Despite feeding a square wave as a > clock to an ADC, the ADC doesn't use square waves in it's actual 'sampling' > of the input analog signal. > > Cheers > Bhaskar
Hi Bhaskar, My confusion is what you mentioned in your reply, that is about the clock and sampling. I agree with the sampling with impulses would retain the input signal. (Same as Fin and not Fclk+/-Fin) But how does it work with a clock (which is a square wave). What do you mean by "feeding a square wave as a clock to an ADC, the ADC doesn't use square waves in it's actual 'sampling' of the input analog signal." How does the sampling in an ADC work. I am bit confused by your above statement. Can you eloberate?? Thanks for your reply..
> > > > > > So I thought impulse vs natural sampling analogy applies for both the > > sampling process and the reconstruction process. Another word for the > > high frequency attenuation that occurs with natural sampling is > > aperture attenuation and it can occur during sampling (capturing the > > signal) or during reconstruction. > > > > Is this not true? > > > > thanks for the interesting question. > > > > Mark > >
I think we need to separate two aspects of what an A/D does...

1) sample

2) quantize


An analog signal can be sampled without being quantized.  FM stereo
does this.

Sampling can be impulse sampling or natural sampling (full duration) or
anything in between.  True impulse sampling is impossible because a
true impulse is infinitesimal in duration.

Quantization converts the sample to a number.    Since the sample is
not infinitesimal in time, the quantization process has to average or
otherwise take a non-infinitesimal duration analog signal and convert
it to a single number.

Mark