i want to ask a qe. in signal sampling ( A/D )

i really couldn't *imagine* how could i take a wave and sampling it . then restoring it without *any* lose if i took Ws > 2*Wm !!!

i know it is something related to the properties ( which i can imagine ) of *most* signal which is, any wave could be represented by a group of sin and cos.

i know what the laws say. but i used to imagine things and not to trust laws :))

i have searched the net . but all are specking & explaining sampling in frequency domain .

i really will be glad if you guide me to a website or a book that explain sampling in time domain.

I am really very curious to *imagine* how this magic is done, I can't sleep.

to Moderator: Is this is the right place to post this here, if not plz move it to the correct place.

thanks alot for your time.

i really couldn't *imagine* how could i take a wave and sampling it . then restoring it without *any* lose if i took Ws > 2*Wm !!!

i know it is something related to the properties ( which i can imagine ) of *most* signal which is, any wave could be represented by a group of sin and cos.

i know what the laws say. but i used to imagine things and not to trust laws :))

i have searched the net . but all are specking & explaining sampling in frequency domain .

i really will be glad if you guide me to a website or a book that explain sampling in time domain.

I am really very curious to *imagine* how this magic is done, I can't sleep.

to Moderator: Is this is the right place to post this here, if not plz move it to the correct place.

thanks alot for your time.

Do a search on FIR filter tutorials. Usually they have the background theory (smapling theory) to lead you into the filter tutorial.

hi,

i'm not sure if i can help you, but what does sampling mean? do you want to put a signal into its pieces (sine and cosine)? you told us that you already know that a signal is always represented by sine and cosine waves..

you know, my physics teacher has coded a program in asm that analyzes a short wave file (in german this is called "Fourier Analyse") and shows how much difference sine waves take part in the signal. dunno if this is what you need, but if you're interested i could ask him for the source.

bye,

-NOP-

i'm not sure if i can help you, but what does sampling mean? do you want to put a signal into its pieces (sine and cosine)? you told us that you already know that a signal is always represented by sine and cosine waves..

you know, my physics teacher has coded a program in asm that analyzes a short wave file (in german this is called "Fourier Analyse") and shows how much difference sine waves take part in the signal. dunno if this is what you need, but if you're interested i could ask him for the source.

bye,

-NOP-

You mention of Nyquist Frequency (Ws > 2*Wm)

This is easy to understand.. but kinda hard to write, so here is a picture:

This is easy to understand.. but kinda hard to write, so here is a picture:

Thing here to note is multiples of the Nyquist sample rate give straight lines: This is cause they are aliased into 0 (zero) hz!!! Or D.C.

(( The more important theory governing all this is call the Z-Transform, and the Unit Circle @ SampleRate ~~ Hint hint: Good google keywords here ;) ))

For every case, the input is a 2khz sine wave.

The Actual frequency of the samed wave has a period of 3000uS, which is 333.33hz. This can be measured and verified, but can also be calculated as:

333.33hz = 2.0 khz - 1.667khz

This phenomina is also observed in the "car tire" effect. When driving on a highway, and you see a car beside you, its tires sometimes looks to be moving

In this case, the RED line would be your eyes, and the BLUE line is the car tire.

Moving on:

0 hz = 2.0khz - 2.0khz !!! (makes sence to me ;)

380hz = abs( 2.0khz - 2.38khz)!

This checks out again..

2khz = abs( 2khz - 4khz)

So why dont you see a full 2khz wave?? Answer is because of the PHASE of the sampled data relative to the input data. Here the phase is 1/500 * 360 degrees (very small amplitude!). Since we are sampling at the same rate as the signal, we get a very low amplitude 2khz signal!. If we delayed the phase by 90 degrees, you would get a a FULL AMPLITUDE, triangle wave at 2khz (since the sample points would be at 90 and 270 degrees).

Well there is your tutorial...

:alright:

NaN

(( The more important theory governing all this is call the Z-Transform, and the Unit Circle @ SampleRate ~~ Hint hint: Good google keywords here ;) ))

For every case, the input is a 2khz sine wave.

**@ 600uS**sampling (1.667khz) the 'sampled' wave is actuall a lower frequency sine wave! This is called ALAISING, the faster wave is viewed as a slower one, or alaised.The Actual frequency of the samed wave has a period of 3000uS, which is 333.33hz. This can be measured and verified, but can also be calculated as:

**AliasedFreq = Absolute ( InputFrequency - SampleFrequency )**333.33hz = 2.0 khz - 1.667khz

This phenomina is also observed in the "car tire" effect. When driving on a highway, and you see a car beside you, its tires sometimes looks to be moving

**slowly**. In fact your eyes are what is slow, not the tire. Your eyes are seing the "frames" at a slower rate, and your brain puts the images together at a slower alaised result!!! The tire has made many full 360 degree revolutions before your eye samples another picture!! The human eye samples somewhere between 30->40 hz. A tire spins a LOT faster than this at 100km/hr ;)In this case, the RED line would be your eyes, and the BLUE line is the car tire.

Moving on:

**@500uS**you see a straight line.0 hz = 2.0khz - 2.0khz !!! (makes sence to me ;)

**@420uS**you get a faster Alaised result: measured period = 2650uS, or 377hz (close to 380hz).380hz = abs( 2.0khz - 2.38khz)!

This checks out again..

**@250uS**you get 2.0 times, or at the Nyquist point.2khz = abs( 2khz - 4khz)

So why dont you see a full 2khz wave?? Answer is because of the PHASE of the sampled data relative to the input data. Here the phase is 1/500 * 360 degrees (very small amplitude!). Since we are sampling at the same rate as the signal, we get a very low amplitude 2khz signal!. If we delayed the phase by 90 degrees, you would get a a FULL AMPLITUDE, triangle wave at 2khz (since the sample points would be at 90 and 270 degrees).

**@200us,**we are still getting a 2khz sampled data, but the amplitudes are still a bit erratic, because the samples are still pretty far apart, relative to the 2khz input wave. This is still 2khz tho!**@50us,**we get a nice reproduction of the input sine wave, as we get LOTS of samples thru out the wave to reproduce 2khz nicely!Well there is your tutorial...

:alright:

NaN

There is an ebook !

And it is absolutely free !

visit:

www.dspguide.com

and download it.

The book has about 700 pages.

And it is absolutely free !

visit:

www.dspguide.com

and download it.

The book has about 700 pages.

thanks all for tring to help me.

& thanks

i have another notice on sampling .

lets say we have

X = Sin(t)

which mean

i will take two samples or more in each period.

according to the sampling theory.

but lets say by luck i took my sampling at every zero

i.e. at Sin(0) , sin(Pi/2) , sin(Pi) .... etc

after sampling i will have an array of Zeros , right ??

Thanks Nan for the example :alright:

but this mean that when i sample their is some loss right ??

they teach us here in the fac that their is no loss.

& thanks

**NOP-erator**for your offer. but i already proved this to myself using matlab.i have another notice on sampling .

lets say we have

X = Sin(t)

which mean

i will take two samples or more in each period.

according to the sampling theory.

but lets say by luck i took my sampling at every zero

i.e. at Sin(0) , sin(Pi/2) , sin(Pi) .... etc

after sampling i will have an array of Zeros , right ??

Thanks Nan for the example :alright:

but this mean that when i sample their is some loss right ??

they teach us here in the fac that their is no loss.

Yup...

You would be sampling at EXACTLY 2*Wm (not greater than). And this case is shown above in the 4'th window down (4Khz sampling).

The only difference here is i started my sampling at position #1, not 0, so i get a very small ripple:

+/- sin( 2*pi*1/500 ) = Amplitude of the ripple

:nan:

PS: There is *always* data loss when converting from analog to digital. Analog by definition is INFINITE precision, in both TIME and AMPLITUDE. Our mortal machine (no matter what company) *CAN NOT* sample

This is the trade off for things like MP3's: what bit rate do you want for sound quality (sample rate, and max high freq selection), as well as how many bits you want to reserve to store each sample! No point have a very high sample rate if your storing each sample in 2 bits! (00, 01, 10, 11) Doesnt leave alot of room for recreating a

You would be sampling at EXACTLY 2*Wm (not greater than). And this case is shown above in the 4'th window down (4Khz sampling).

The only difference here is i started my sampling at position #1, not 0, so i get a very small ripple:

+/- sin( 2*pi*1/500 ) = Amplitude of the ripple

:nan:

PS: There is *always* data loss when converting from analog to digital. Analog by definition is INFINITE precision, in both TIME and AMPLITUDE. Our mortal machine (no matter what company) *CAN NOT* sample

__all__the data for__all__time.This is the trade off for things like MP3's: what bit rate do you want for sound quality (sample rate, and max high freq selection), as well as how many bits you want to reserve to store each sample! No point have a very high sample rate if your storing each sample in 2 bits! (00, 01, 10, 11) Doesnt leave alot of room for recreating a

__smooth__wave form! ;)Thanks a lot Nan.:alright:

now it make some sence to me.

in fact what was confusing me so much the word they said.

"no data loss"

thanks a lot.

i may now re-read from another view.

thanks alot

now it make some sence to me.

in fact what was confusing me so much the word they said.

"no data loss"

thanks a lot.

i may now re-read from another view.

thanks alot

I have just found this *great* site .

http://www.jhu.edu/~signals/index.html

hope it may help any.

and thanks for all who helped me here.

http://www.jhu.edu/~signals/index.html

hope it may help any.

and thanks for all who helped me here.

Thats a great link :)

It covers about 80% of what i like to practice in, with electronics. (Im a true

Thanks for sharing!

:alright:

NaN

It covers about 80% of what i like to practice in, with electronics. (Im a true

*Control Freak*). Those applets would have been nice when i was learing that stuff the first time around ;)Thanks for sharing!

:alright:

NaN