Digital Signal Processing/Discrete Data

From testwiki
Revision as of 17:20, 20 May 2007 by 59.93.203.23 (talk) (Two Types of Discrete)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:DSP Page

Continuous data is something that most people are familiar with. If we have a continuous function, we can find the value of that function at any point. However, discrete functions and discrete data only exist at certain points.

Sets and Series

Discrete data is displayed in sets as such:

X[n] = [1 2 3& 4 5 6]

We will be using the "&" symbol to denote the data item that occurs at point zero. Now, by filling in values for n, we can select different values from our series:

X[0] = 3
X[-2] = 1
X[3] = 6

We can move the zero point anywhere in the set that we want. It is also important to note that we can pad a series with zeros on either side, so long as we keep track of the zero-point:

X[n] = [0 0 0 0 1 2 3& 4 5 6] = [1 2 3& 4 5 6]

In fact, we assume that any point in our series without an explicit value is equal to zero. So if we have the same set:

X[n] = [1 2 3& 4 5 6]

We know that every value outside of our given range is zero:

X[100] = 0
X[-100] = 0

Two Types of Discrete

Data can be discrete in magnitude, discrete in time, or both. Here are some examples:

Discrete in Time
Discrete-in-time values only exist at certain points in time. If we try to take the value of a discrete-in-time data set at a point where there is no data, our result will be zero. The image below shows a waveform that is discrete in time. Notice that while it is discrete in time, the magnitude of each sample is not quantized, and it may take any magnitude value.
Discrete in Value
Discrete-in-value series can only have certain values. For instance, we can say that a certain computer device can only handle integers, and no decimals. The image below shows a signal that is discrete in magnitude, but is not discrete in time. This waveform is defined at any time t, but it may only take certain magnitude values. This produces a "staircase" effect.

Stem Plots

Discrete data is frequently represented with a stem plot. Stem plots mark data points with dots, and draw a line between the t-axis (the horizontal axis) and the dot:

F[n] = [5& 4 3 2 1]

Template:-

About the Notation

The notation that is being used in this wikibook, to denote the zero point of a discrete set was chosen arbitrarily. Textbooks on the subject will frequently use arrows, periods, or underscores to denote the zero position of a set. Here are some examples:

            |
            v
Y[n] = [1 2 3 4 5]
            .
Y[n] = [1 2 3 4 5]
            _
Y[n] = [1 2 3 4 5]

All of these things are too tricky to write in wikibooks, so we have decided to use an ampersand (&) to denote the zeropoint. The ampersand is not used for any other purpose in this book, so hopefully we can avoid some confusion.

Sampling

Sampling is the process of converting continuous data into discrete data. The sampling process takes a snapshot of the value of a given input signal, rounds if necessary (for discrete-in-value systems), and outputs the discrete data. A common example of a sampler is an Analog to Digital Converter (ADC).

Let's say we have a function based on time (t). We will call this continuous-time function f(t):

f(t)=2tu(t)

Where u(t) is the unit step function. Now, if we want to sample this function, mathematically, we can plug in discrete values for t, and read the output. We will denote our sampled output as F[n]:

F[n] = 0 : n < 0
F[1] = f(1) = 2
F[2] = f(2) = 4
F[100] = f(100) = 200

This means that our output series for F[n] is the following:

F[n] = [0& 2 4 6 8 10 12 ...]

Reconstruction

We digitize (sample) our signal, we do some magical digital signal processing on that signal, and then what do we do with the results? Frequently, we want to convert that digital result back into an analog signal. The problem is that the sampling process loses alot of data. Specifically, all the data between the discrete data points is lost, and if the sampler rounds the value, then a small amount of error is built into the system that can never be recovered. A common example of a reconstructor is a Digital to Analog Converter (DAC).

Interpolation

When converting a digital signal into an analog signal, frequently a process called Interpolation is used to make the analog signal better. Interpolation essentially "connects the dots" between discrete data points, and the reconstructor then outputs an analog waveform with the dots connected. We will show the process below:

We start out with an uninterpolated stem plot:

We connect the points in our stem plot with straight lines (dotted lines):

We draw new points on that line, mid way between our existing lines (dashed lines):