Digital Signals
A one-dimensional digital signal is a sequence of data, represented as a vector in an array-oriented language like IDL. The term digital actually describes two different properties:
In this discussion, we assume that the signal is sampled at a time interval. The concepts and techniques presented here apply equally well to any type of signal—the independent variable may represent time, space, or any abstract quantity.
The following IDL commands create a simulated digital signal u(k), sampled at an interval delt. This simulated signal will be used in examples throughout this section. The simulated signal contains 1024 time samples, with a sampling interval of 0.02 seconds. The signal contains a DC component and components at 2.8, 6.5, and 11.0 cycles per second.
Enter the following commands at the IDL prompt to create the simulated signal:
N = 1024 ; number of samples delt = 0.02 ; sampling interval ; Simulated signal. u = -0.3 $ + 1.0 * SIN(2 * !PI * 2.8 * delt * FINDGEN(N)) $ + 1.0 * SIN(2 * !PI * 6.25 * delt * FINDGEN(N)) $ + 1.0 * SIN(2 * !PI * 11.0 * delt * FINDGEN(N))
Example Code
Alternately, type @sigprc01 at the IDL prompt to run the sigprc01batch file that creates the signal. See Running the Example Code if IDL does not find the batch file.
Because the signal is digital, the conventional way to display it is with a histogram (or step) plot. To create a histogram plot, set the PSYM keyword to the PLOT routine equal to 10. A section of the example signal u(k) is plotted in the figure below.
Note
When the number of sampled data points is large, the steps in the histogram plot are too small to see. In such cases you should not plot in histogram mode.
Example Code
Type @sigprc02 at the IDL prompt to run the batch file that creates this display. The source code is located in sigprc02, in the examples/doc/signal directory. See Running the Example Code if IDL does not find the batch file.
