02-21-2020 01:32 AM
Hi,
I am trying to measure analog input using NI myRIO.
here input AI0 in signal and simulated output signal AO0 wired loop.
but the problem I observe is
when
1) freq is 1,11,21,31 Hz then the graph shows a proper sine wave.
2) freq 10,20,30 Hz its show single line.
3) freq is between 31 to 40 i.g 32,33,35 Hz its shows something like a triangular wave.
suggest to me how can I program change for the proper measurement of sine wale from external fun gen.
during 30hz to change 40hz
during low freq
02-21-2020 02:34 AM
02-22-2020 11:42 AM
Hi Govinda,
What this means is that you're looking at the effects of undersampling.
The Nyquist Frequency is half of your sampling rate, and is the highest frequency you can sample without experiencing "aliasing", in which the result you see doesn't agree with what you expect.
You can read in more detail about the Nyquist–Shannon sampling theorem that Gerd referred to.
Here is an image (from wikipedia's Aliasing page) that shows the effect:
Here the low sampling rate results in you observing the yellow rather than cyan curve.
The suggestion is to sample more quickly (at least twice as fast as the frequencies of interest), and ideally to use an analog filter to remove/reduce higher-frequency inputs.
02-22-2020 12:30 PM - edited 02-22-2020 12:33 PM
As has been mentioned, all you are measuring are alias frequencies.
From a forum perspective, your pictures of front panel and diagram are useless, because a diagram containing mostly express VIs and dynamic data that hide all important information behind a facade. Fortunately, you are only sampling a single point, so we can guess from the 50ms wait that you are only taking 20 samples per second (not really accurate because it is software timed!), but which is of course nowhere near sufficient for anything above 10Hz.
I would recommend to use lowerlevel hardware timed continuous input/output and maybe even isolate the AI and AI into independent loops. Have a look at the shipping examples.