Sampling Basis, DSP question

Thread Starter

Amine azzouz

Joined Oct 21, 2017
13
Hello everyone,

I m kind of doing some 'exercises' about sampling (DSP, been a while.. ), & got stuck in this question ;

Sampling.png

I think that after sampling, will be only 0.5 & 3 Khz frequencies left, and the other will be ' lost ' since it doesn't respect the sampling theorem.

is it 0.5 & 3 Khz ? or other ?


Many thanks !
 

MrChips

Joined Oct 2, 2009
34,628
No. You need to learn about the sampling theorem and aliasing.

What is your Nyquist frequency?
All frequencies above the Nyquist frequency will be aliased to a lower frequency.
 

Thread Starter

Amine azzouz

Joined Oct 21, 2017
13
That's what I am trying to do, to learn again about sampling and all what comes with. But...

Nyquist frequency, is half of the highest frequency we have in the signal, so 3.5Khz here.
But why do we need the Nyquist frequency here ? We already have sampling frequency, which doesn't respect the sampling theorem.
I don't get the 'aliased to a lower frequency', like, aliasing , means the signal takes on a false presentation due to being sampled at insufficient frequency, but.. practically, here ? how is that ?

Thanks,
 

MrChips

Joined Oct 2, 2009
34,628
Wrong again.

The Nyquist frequency is half the sampling frequency.

I will give you a hint.
If you sample at 8ksps, an input signal at 4kHz results in a 4kHz signal.
What would a 8kHz signal look like sampled at 8ksps.
What would a 9kHz signal look like sampled at 8ksps.
 

MrChips

Joined Oct 2, 2009
34,628
Ah okey..

A 9KHz and 8KHz, sampled at 8ksps, would both result in a 8KHz signal, which is aliasing (...?)
Both wrong answer.

Draw this on a piece of paper.
Draw a sine wave at any frequency.
Take equally spaced samples at the same frequency, i.e. period = 1/f
 

bertus

Joined Apr 5, 2008
22,882
Hello,

Did you see this picture?

Sampling data.png

The bottom graph will show you the original signal and recontructed signal when the sampling frequency is to low.

Bertus
 

Thread Starter

Amine azzouz

Joined Oct 21, 2017
13
Yes, more the sampling frequency is low, more the reconstruction is 'difficult', since it can be 'interpreted' in many different ways.

But still can't relate that to my question
 

Thread Starter

Amine azzouz

Joined Oct 21, 2017
13
well...
I ve been trying to get this sampling thing... from the morning till now.. I m really not getting it

I know the results, I just wasn't able to attend the course. And maybe that's why I don't get how it's done

For instance,
If we sample a signal , f=600 Hz ,in, at fs= 1 KHz, we won't get any signal higher than 500Hz, why we get 400Hz out ?
No idea
 

bertus

Joined Apr 5, 2008
22,882
Hello,

Have a look again:

Sampling data Aliased.png

The dotted signal is the input, the striped signal is the output of the filter, as it will not pass the dotted signal.

Bertus
 

Thread Starter

Amine azzouz

Joined Oct 21, 2017
13
hey,

What do you mean with 'will not pass the dotted signal' ?
Or rather, this is general, how aliasing can occur.
I can't relate that to one single frequency, or four, like I thought the answer will be really simpler
( sorry if it's obvious & I am not getting that... )
 

Jony130

Joined Feb 17, 2009
5,593
All frequency above Fs/2 will be "seen" at the output as a low-frequency signal.
For example if Fs = 8kHz and Fsin = 7kHz the alias frequency (seen at the output) is 1kHz.
 

nsaspook

Joined Aug 27, 2009
16,250
A common analogy to aliasing in signals and systems are the wheels (rotation like sine-wave amplitude samples changes over time) on cars that seem to slow, stop or run backwards on camera systems that sample images at a fixed frame rate as the car changes speed. The brains visual system much like a digital system generates a new continuous signal signal from the stream of samples of the original. You can also see this aliasing in light that strobes like some fluorescent lamps with the naked eye.


The common way to eliminate the output alias frequencies is to the filter out signals above the Nyquist frequency before the ADC samples the input signals.
https://www.maximintegrated.com/en/app-notes/index.mvp/id/928
 
Last edited:

crutschow

Joined Mar 14, 2008
38,316
Let's use an example sampling rate of 10kHz (100μs period) and a sinewave signal of 8kHz (125μs period) to make the numbers easy to work with.

So the 8 kHz signal is only being sampled at slightly over 1 sample per cycle , with each sample displaced in time (and position on the sinewave) by 25μs.
This means the complete sinewave is sampled in 5 cycles of the sinewave.
Thus the sampled data looks like a complete sinewave every 5 samples, or 500μs period for the apparent (aliased) sampled sinewave.

The sampled data thus looks like a 1/500μs = 2kHz sinewave (the aliased difference frequency between the sample rate and the signal as has been previously stated).
 
Last edited:
Hi Amine Azzouz
Writing the equations can be helpful. Consider Crutschow's example. You have a sine, vin, at 8kHz:
vin=sin(2* \pi * 8kHz*t)​
when you sample at 10kHz, you are substituting t=nT_{s}=n/(10kHz), where n is the sample index, then
vin=sin(2* \pi * 8kHz* (n/10kHz) )​
This can be simplified to
vin=sin(2 * \pi * (8/10) * n)= sin (2 * \pi * ( (10-2)/10 ) * n) = sin ((2 * \pi * n) - (2* \pi * (2/10) * n) ) = sin (-2 * \pi * (2/10) * n)​
The samples that we obtain from an 8kHz signal are the same as the samples that we would get for a lower frequency signal at 2kHz.
 

Thread Starter

Amine azzouz

Joined Oct 21, 2017
13
Thank you very much all, really appreciated !

Let's use an example sampling rate of 10kHz (100μs period) and a sinewave signal of 8kHz (125μs period) to make the numbers easy to work with.

So the 8 kHz signal is only being sampled at slightly over 1 sample per cycle , with each sample displaced in time (and position on the sinewave) by 25μs.
This means the complete sinewave is sampled in 5 cycles of the sinewave.
Thus the sampled data looks like a complete sinewave every 5 samples, or 500μs period for the apparent (aliased) sampled sinewave.

The sampled data thus looks like a 1/500μs = 2kHz sinewave (the aliased difference frequency between the sample rate and the signal as has been previously stated).
Now I see it, thanks for your time and effort to make it clear to me :)
 

MrChips

Joined Oct 2, 2009
34,628
Plot a graph of input signal frequency on the x-axis and reconstructed frequency on the y-axis.

At 0Hz input, the output is 0Hz.
At 1kHz input, the output is 1kHz.
Keep doing this knowing that at 8kHz input, the output is 0kHz.
Keep doing this until you get to 32kHz input.

Now, understand why these zones are called Nyquist zones.
 
Top