The Art of Signal Sampling and Aliasing:
"What we see is not what it is!"***(Set "Full Screen" view and 1024 X 768 resolution)

Review the paper with several sample outputs on this issue. Return to Prof. M. Kostic home page. Access log
See also: The Art of Signal Sampling... "Interactive Simulation with a LabVIEW™ Virtual Instrument Including Magnitude Change, Phase Shift and Aliasing: "What we see is not what it is - PART II!"

Click to enlarge FrontPanel output sample

Click to PLAY MOVIE

FrontPanel output sample

Click on the left
icon to:

Play Movie

Experiment with an Interactive Demonstration:
Specify any Signal and Sampling Frequencies Below
(see NOTE 2):
To see the whole movie frame/graphics, set your display resolution to 1024X768 pixels and enlarge your browser to full screen.
Type data  for SIGNAL frequency and
SAMPLING frequency in boxes below, and click Submit Query button below.
SIGNAL frequency (in Hz): (Suggested value: 100, so that SAMPLING frequency values
will be per 100 or % of SIGNAL frequency or any value if you like.)
Do not use small values since formatting does not allow decimals to be seen!
SAMPLING frequency (in Hz): Not absolute values, but SIGNAL to SAMPLING frequency ratio is important only!
(Try 50, 110, 190, 200, 210, 300, 450, etc.
or experiment with any values, see below! )

                                                                          

The length/time of sampling may be set arbitrarily as number of SIGNAL's periods/cycles (default 20).

NOTE 1: Use REFRESH/RELOAD and navigation BACK/FORWARD buttons in your browser to navigate.

The input and output values and plot are clearly presented in the front panel of the developed virtual instrument, see Front Panel output sample. The arbitrary input values are: signal and sampling frequencies or sampling-to-signal frequency RATIO, number of signal's cycles/periods as well as the magnitude ratio and the phase lag. The output values are: (1) sampling frequency if the sampling to signal frequency ratio is given, (2) the Nyquist frequency, see NOTE 4 for definition, (3) the frequency ratio if the sampling frequency is given, (4) aliasing to signal frequency ratio, (5) the aliasing frequency, (6) total number of sampled points, and (7) number of sampled points per signal period or cycle; the latter should be equal to the sampling to signal frequency ratio.

NOTE 2: The above frequency values may be arbitrary. What is really important is the SAMPLING to SIGNAL frequency RATIO, not their absolute values (You may put SIGNAL freq. to 1 and any value for SAMPLING freq. will be the RATIO value also). If SIGNAL freq. is any integer multiple of SAMPLING freq., a zero (0) aliasing will result (You may put SAMPLING freq. to 1 and any integer value for SIGNAL freq. to verify this). Small ratio departure from zero aliasing will result in small aliasing frequency. The sampling at double signal frequency (SAMPLING/SIGNAL=200/100=2 ratio) is known as the critical value for aliasing, see NOTE 4 for definition of the Nyquist frequency. Around this value (i.g. RATIO=1.9 or 2.1 or similar), the so called "beat wave" interference occurs and it is interesting to try these. For a full "experience" it is the best to observe the results for the RATIO values from 0 to 2.2 in small steps and to 5 or 10 in larger steps. This could be done elegantly with actual continuous rotation of the RATIO knob on the virtual LabVIEW instrument, or putting it in the Auto RUN mode, see the Front-Panel (Sorry, cannot be done over the Internet yet!). For getting a realistic sampling of a SIGNAL, the SAMPLING frequency should be much more than double (Nyquist rule), more like 5 or 10 times the SIGNAL frequency. Actually, the RATIO value "physically" means the number of sampling points per cycle (or period) of the (real) SIGNAL, so the more the better.

NOTE 3: The PNG Query Form works faster with newer browsers (which support new PNG graphic format). With some (older) browsers there may be a "small" problem with the PNG graphics format. After submitting the Query, depending on the system setup, it may prompt to save resulting output file or to save it in TEMP directory without a prompt, but does not display it (does NOT support PNG - Portable Network Graphics format) in the browser. You may save the PNG file (about 25 KB, much smaller than the corresponding 125 KB JPG file) and display it in your application which supports PNG format (like Corel PHOTO-PAINT). You may have to change the file type to PNG in order to work. You may copy the corresponding URL address string in the Address-Bar, like:
http://http://www.kostic.niu.edu:88/cgi-bin/alias-cgi.vi?signl_f=100&sampl_f=190 
The 100 and 190 values in the URL address string above are for the SIGNAL and SAMPLING frequency values, respectively. You may change/edit these values in the Address-Bar arbitrarily and REFRESH to get a new resulting screen in MS-IE.

NOTE 4: Nyquist frequency may be defined in different ways, namely:

  1. Nyquist frequency defined as maximum signal frequency that could be reliably measured to avoid aliasing, which is solely based on the sampling frequency, i.e. equal to one half of it (used in here). Only signals with smaller than this Nyquist frequency will be sampled reliably, while higher frequency signals will "fold back," i.e. appear as a smaller aliasing frequency signals.
  2. Nyquist frequency defined as minimum required sampling frequency for a given signal frequency to avoid aliasing. It is based on (maximum) signal frequency that could be reliably measured with that minimum sampling frequency. Thus, the sampling frequency has to be larger than this Nyquist frequency. Sometimes half of this value is defined as the Nyquist frequency (to equal the above definition 1) so then the sampling frequency has to be larger than twice this Nyquist frequency.

The above definitions represent the same phenomenon, i.e. the same critical frequency for aliasing, critical sampling twice the signal frequency, but are based on two different references: (1) the sampling frequency (so the Nyquist frequency is maximum signal frequency to be measured without aliasing, i.e. a half of the sampling frequency), and (2) based on a signal frequency (so the Nyquist frequency is the minimum sampling frequency required to avoid aliasing), thus the latter being twice the former.

New Page 2

Professor M. Kostic's Web Site: www.kostic.niu.edu *Usage Policy & © Copyright by M. Kostic