11-03-2009 12:09 PM
Hi all,
Its pretty fundamental question, i am sure there are hundreads of articles available on my question but never understood clearly.
My question is if i want to generate an analog output sine waveform of say 5Hz, what is the sample clock rate and number of samples? I am using 16 bit USB6229 card.
Can somebody explain in numerics?????
By default in many application which use few hertz generation of waveforms i can see 1000Samples/sec and corresponding sample number is1000, but why do we need such high sample clock rate???
11-03-2009 05:20 PM - edited 11-03-2009 05:21 PM
Hello Viswa,
Here how it works,
Say, the 1 period of Sine wave has 1000 sample points, i.e. 1 period = 1000pts
if you have sample rate of 1000Hz which means it will take 1 sec to output 1000pts. That means the freq of the signal generated is 1Hz
Hence you can come up with the equation that Frequency of signal = (sample rate)/(# of Points)
which means if you increase your sample rate to say10KHz, the frequency of the signal generated will be 10K/1000 = 10Hz.
There is another way to change the freq od generated signal, which is to change #of points.
For example 1 period of sine wave consists of 100 points instead of 1000 and we keep the sample rate to be 1000Hz
Hence the freq of signal generated is again 1000/100 = 10Hz.
I am sure this will make the concept more clear.
Cheers
NI-khil
11-03-2009 06:09 PM
Hi NI-khil,
Still i am not clear about the concept, by te way thanks for quick reply.
Say if i want to generate 1Hz sine wave form according to Nyquist criteria i can choose any clock rate greater than 2Hz. But why particularly 1000Hz????
If i understood your explanation correctly, it is like this the generated waveform frequency is nothing but the ratio of clock rate to number of samples. Is it right?
So there no hard and fast rule about choosing clock rate above Nyquist frequency???????????
11-04-2009 10:54 AM
Hi Again,
Well, you are right about the nyquist criteria, but that is true only if you are interested in the freqency part of the signal. You can use less number of points to generate your signal but it will affect the resolution. Think about drawing circle in digital domain, and relate the # of pixels to # of points. higher pixel counts you will have finer circle and vice versa. So it totally depends on what quality of signal you want to generate. you can have two point signal and if you select 2Hz smapling rate sure you will get 1Hz signal but the shape of that will not be sine, it will be more like triangle waveform.
Hope that make is better.
Cheers
NI-khil