Professional Documents
Culture Documents
Unit-1: Digital Signal Processor Class Notes
Unit-1: Digital Signal Processor Class Notes
UNIT- 1
INTRODUCTION
2
Digital Signal Processor -Class Notes
A digital signal processor (DSP) is an integrated circuit designed for high-speed data
manipulations, and is used in audio, communications, image manipulation, and other data-
acquisition and data-control applications. A signal is any variable that carries information.
Examples of the types of signals of interest are Speech (telephony, radio, and everyday
communication), biomedical signals (EEG brain signals), Sound and music, Video and image,
Radar signals (range and bearing).
Digital signal processing (DSP) is concerned with the digital representation of signals
and the use of digital processors to analyses, modify, or extract information from signals.
Many signals in DSP are derived from analogue signals which have been sampled at
regular intervals and converted into digital form. The key advantages of DSP over analogue
processing are Guaranteed accuracy (determined by the number of bits used), Perfect
reproducibility, No drift in performance due to temperature or age, Takes advantage of
advances in semiconductor technology, Greater edibility (can be reprogrammed
w i t h o u t m o d i f y i n g h a r d w a r e ), S u p e r i o r p e r f o r m a n c e ( linear p h a s e
response possible, and itering algorithms can be made adaptive), Sometimes information may
already be in digital form. There are however (still) some disadvantages, Speed and cost (DSP
design and hardware may be expensive, especially with high bandwidth signals) Finite
word length problems (limited number of bits may cause degradation).
Application areas of DSP are considerable: Image processing (pattern recognition,
robotic vision, image enhancement, facsimile, satellite weather map, animation),
Instrumentation and control (spectrum analysis, position and rate control, noise reduction,
data compression) Speech and audio (speech recognition, speech synthesis, text to Speech,
digital audio, equalization) Military (secure communication, radar processing, sonar
processing, missile guidance).
3
Digital Signal Processor -Class Notes
4
Digital Signal Processor -Class Notes
• If the input and output signals x and p are continuous-time signals, then the
system is called a continuous-time system
1.3.2 Discrete-Time Systems
• If the input and output signals are discrete-time signals or sequences, then the
system is called a discrete-time system
1.3.3 Linear Time-Invariant Systems
• If the system is linear and also time-invariant, then it is called a linear rime-
invariant (LTI) system. H. Stable Systems A system is bounded-
input/bounded-output (BIBO) stable if for any bounded input x defined by the
corresponding output y is also bounded defined by where k , and k, are finite
real constants.
1.3.4 Causal and Non causal Systems
• A system is called causal if its output y ( t ) at an arbitrary time t = t,, depends
on only the input x ( t ) for t It o. That is, the output of a causal system at the
present time depends on only the present and/or past values of the input, not on
its future values. Thus, in a causal system, it is not possible to obtain an output
before an input is applied to the system. A system is called non causal if it is not
causal.
1.3.5 Dynamic recursive time variance system
• A system is said to be static or memory less if its output depends upon the present input
only. The system is said to be dynamic with memory if its output depends upon the
present and past input values.
5
Digital Signal Processor -Class Notes
6
Digital Signal Processor -Class Notes
A signal is referred to as an energy signal, if and only if the total energy of the signal Ex
is finite.
1.4.11. Power of a signal:
• If {x[n]} is a signal whose energy is not finite, we define power of the signal as
An energy signal has a zero power and a power signal has inf
infinite
inite energy. There are
signals which are neither energy signals nor power signals. For example {x[n]} defined
by x[n] = n does not have finite power or energy
u(t) = 0, t < 0
= 1, t ≥ 0
Thee unit impulse function also known as the Dirac Delta Function, was first defined by Dirac as
7
Digital Signal Processor -Class Notes
There are several elementary signals that occur prominently in the study of digital signals and
digital signal processing.
8
Digital Signal Processor -Class Notes
Unit step in terms of unit impulse function having studied the basic signal operations namely
Time Shifting, Time Scaling and Time Inversion it is easy to see that
similarly,
Looking directly at the Unit Step Function we observe that it can be constructed as a sum of
shifted Unit Impulse Functions
The unit function can also be expressed as a running sum of the Unit Impulse Function
9
Digital Signal Processor -Class Notes
We see that the running sum is 0 for n < 0 and equal to 1 for n >= 0 thus defining the Unit Step
Function u[n].
Sifting property
The delta function is non-zero only at the origin so it follows the signal is the same as .
More generally
It is important to understand the above expression. It means the product of a given signal
x[n] with the shifted Unit Impulse Function is equal to the time shifted Unit Impulse Function
multiplied by x[k]. Thus the signal is 0 at time not equal to k and at time k the amplitude is x[k].
So we see that the unit impulse sequence can be used to obtain the value of the signal at any time
k. This is called the Sampling Property of the Unit Impulse Function. This property will be used
in the discussion of LTI systems. For example consider the product . It gives
.
10
Digital Signal Processor -Class Notes
Likewise, the product x[n] u[n] i.e. the product of the signal u[n] with x[n] truncates the signal
for n < 0 since u[n] = 0 for n <0
Similarly, the product x[n] u[n-1] will truncate the signal for n < 1.
11
Digital Signal Processor -Class Notes
12
Digital Signal Processor -Class Notes
and
The general discrete time complex exponential can be written in terms of real exponential and
sinusiodal signals.
13
Digital Signal Processor -Class Notes
Thus for |α| = 1 , the real and imaginary parts of a complex exponential sequence are sinusoidal.
|α| < 1, they correspond to sinusoidal sequence multiplied by a decaying exponential,
|α| > 1 , they correspond to sinusoidal sequence multiplied by a growing exponential.
14
Digital Signal Processor -Class Notes
where is the operation of shifting the sequence right by n0 unit. The terms are defined by
y[n] = x[n - n0]. We will use short notation {x[n - n0]} to denote shift by n0.
Figure
Figure1.14 Shifting {x[n]}
{x[n-2]}
15
Digital Signal Processor -Class Notes
{x [n+1]}
1.5.5 Reflection
Let {x[n]} be the original sequence, and {y[n]} be reflected sequence, then y[n] is defined by
y[n] = x[-n]
{x[n]}
When we have complex valued signals, sometimes we reflect and do the complex
conjugation, ie, y[n] is defined by y[n] = x*[-n], where * denotes complex conjugation. This
sequence will be denoted by {x*[-n]}.
.
16
Digital Signal Processor -Class Notes
17
Digital Signal Processor -Class Notes
We can combine many of these operations in one step, for example {y[n]} may be defined as
y[n] = 2x [3-n]
A signal was defined as a mapping from a set of the independent variable (domain) to the
set of the dependent variable (co-domain).
domain). A system is also a mapping, but across signals, or
across mappings . That is, the domain set and the coco-domain set for a systemtem are both sets of
signals, and corresponding to each signal in the domain set, there exists a unique signal in the co
co-
domain set.
In signals and systems terminology, we say; corresponding to every possible input signal,
a system “produces” an output signal.
In that sense, realize that a system, as a mapping is one step hierarchically higher than a
signal. While the correspondence for a signal is from one element of one set to a unique element
of another, the correspondence
espondence for a system is from one whole mapping from a set of mappings
to a unique mapping in another set of mappings!
Examples of systems are all around us. The speakers that go with your computer can be
looked at as systems whose input is voltage puls pulses
es from the CPU and output is music (audio
signal). A spring may be looked as a system with the input , say, the longitudinal force on it as a
function of time, and output signal being its elongation as a function of time. The independent
variable for the input and output signal of a system need not even be the same.
18
Digital Signal Processor -Class Notes
As these examples may have made evident, we look at many physical ob objects/devices
jects/devices as
systems, by identifying some variation associated with them as the input signal and some other
variation associated with them as the output signal (the relationship between these, that
essentially defines the system depends on the laws or rules that govern the system) . Thus a
capacitance with voltage (as a function of time) considered as the input signal and current
considered as the output signal iss not the same system as a capacitance with, say charge
considered as the input signal and voltage considered as the output signal. Why?
The mappings that define the system are different in these two cases.
The system description specifies the transformation of the input signal to the output
signal. In certain cases, a system has a closed form description. E.g. the continuous
continuous-time
time system
with description y(t) = x(t) + x(t-1);; where x(t) is the input signal and y(t) is the output signal.
Not all systems have such a closed form description. Just as certain "pathological" functions can
only be specified by tabulating the value of the dependent variable against all values of the
independent variable; some systems can only be described by tabulating the output signal against
all possible input signals.
19
Digital Signal Processor -Class Notes
explicit description, it is clear to see the relationship between the input and the output. e.g. y(t) =
{ x(t) } 2 + x(t-5).
In case the system has an Implicit description, it is harder to see the input-output
output
relationship. An example of an Implicit description is y(t) - y(t-1) x(t) = 1.. So when the input is
provided, we are not directly able to calculate the output at that instant (since, the output at 't't-1'
alsoo needs to be known). Although in this case also, there are methods to obtain the output based
solely on the input, or, to convert this implicit description into an explicit one. The description by
itself however is in the implicit form.
A signal
ignal maps an element in one set to an element in another. A system, on the other
hand maps a whole signal in one set to a signal in another. That is why a system is called a
mapping over mappings. Therefore, the value of the output signal at any instant oof time
(remember "time" is merely symbolic) in general depends on the whole input signal. Thus, even
if the independent variable for the input and output signal are the same (say time t)
The output at, say t = 5 depends on the values of the input signal for all t <= 5.
Henceforth; w shall call systems with both input and output signal being continuous
continuous-time
time as continuous-
time systems , and those with both input and output signal being discrete
discrete-time as discrete-time
discrete systems.
Those that do not fall into either of these classes (i.e. input discrete
discrete-time
time and output continuous-time
continuous and
vice-versa) we shall call systems. hybrid
1.7.1 Memory
20
Digital Signal Processor -Class Notes
By definition, a system that does not have this property is said to have memory.
For a memory less system, changing the input at any instant can ch change the output only at that
instant.. If, in some case, a change in input signals at some instant changes the output at some
other instant, we can be sure that the system has memory.
Examples:
Assume y[n] and y(t) are respectively outputs corresponding to input signals x[n] and x(t)
1.7.2 Linearity
Now we come to one of the most important and revealing properties systems may have -
Linearity. Basically, the principle of linearity is equivalent to the principle of superposition,
superposition i.e. a
system can be said to be linear if, for any two input si signals,
gnals, their linear combination yields as
output the same linear combination of the corresponding output signals.
(It
It is not necessary for the input and output signals to have the same independent variable for
linearity to make sense. The definition for systems with input and/or output signal being discrete-
discrete
time is similar.)
Example of linearity
A capacitor, an inductor, a resistor or any combination of these are all linear systems, if
we consider the voltage applied across them as an input signal, and the current through them as
21
Digital Signal Processor -Class Notes
• Additivity
A system is said to be additive if for any two input signals x1(t) and x2(t),
i.e. the output corresponding to the sum of any two inputs is the sum of the two outputs.
• Homogeneity (Scaling)
i.e. scaling any input signal scales the output signal by the same factor.
To say a system is linear is equivalent to saying the system obeys both additivity and
homogeneity.
This is easy; put both constants equal to 1 in the definition to get additivity; one of them
to 0 to get homogeneity.
22
Digital Signal Processor -Class Notes
We can prove this by finding examples of systems which are additive but not homogeneous, and
vice versa.
Examples of Linearity
Assume y[n] and y(t) are respectively outputs corresponding to input signals x[n] and x(t)
Consider any two input signals, x1(t) and x2(t), with corresponding outputs y1(t) and y2(t).
(t)
= t (a.x1(t) + b.x2(t))
= t.a.x1(t) + t.b.x2(t),, which is the same linear combination of y1(t) and y2(t).
Hence proved.
See for yourself that the system is neither additive, nor homogenous.
Show for yourself that systems with the following descriptions are linear:
23
Digital Signal Processor -Class Notes
This is another important property applicable to systems with the same independent
variable for the input and output signal. We shall first define the property for continuous time
systems and the definition for discrete time systems will follow naturally.
Say, for a system, the input signal x(t) gives rise to an output signal y(t). If the input
signal x(t - t0) gives rise to output y(t - t0), for every t0, and every possible input signal, we
say the system is shift invariant.
In other words, for a shift invariant system, shifting the input signal shifts the output signal by
the same offset.
24
Digital Signal Processor -Class Notes
Note this is not to be expected from every system. x(t) and x(t - t0) are different (related by a
shift, but different) input signals and a system, which simply maps one set of signals to another,
need not at all map x(t) and x(t - t0) to output signal als
also shift by t0
A system that does not satisfy this property is said to be shift variant.
1.7.4 Stability
Let us learn about one more important system property known as stability. Most of us are
familiar with the word stability, which intuitively means resistance to change or displacement.
Broadly speaking a stable system is a one in which small inputs lead to predictable responses that
do not diverge, i.e. are bounded. To get the qualitative idea let us consider the following physical
example.
Example
Statement
Examples
25
Digital Signal Processor -Class Notes
Consider systems with the following descriptions. y(t) is the output signal corresponding to the
input signal x(t).
BIBO Stable system : In a BIBO stable system, every bounded input is assured to give a
bounded output. An unbounded input can give us eit
either
her a bounded or an unbounded output, i.e.
nothing can be said for sure.
BIBO Unstable system:: In a BIBO unstable system, there exists at least one bounded input for
which output is unbounded. Again, nothing can be said about the system's response to an
unbounded input.
1.7 CAUSALITY
Causality refers to cause and effect relationship (the effect follows the cause). In a causal
system, the value of the output signal at any instant depends only on "past" and "present" values
of the input signal (i.e. only on values of the input signal at "instants" less than or equal to that
"instant"). Such a system is often referred to as being non-anticipative,, as the system output does
not anticipate future values of the input (remember again the reference to time is merely
symbolic). As you might have realized, causality as a property is relevant only for systems
whose input and output signals have the same independent variable.. Further, this independent
26
Digital Signal Processor -Class Notes
variable must be ordered (it makes no sense to talk of "past" and "future" when the independent
variable is not ordered).
Definition
Let x1(t) and x2(t) be two input signals to a system and y 1(t) and y2(t) be their respective
outputs.
This of course is only another way of stating what we said before: for any t0 : y( t0) depends only
on values of x(t) for t <= t0
27
Digital Signal Processor -Class Notes
The two input signals in the figure above are identical to the point t = t0, and the system being a
causal system, their corresponding outputs are also identical till the point t = t0.
Assume y[n]
n] and y(t) are respectively the outputs corresponding to input signals x[n] and x(t)
System with description y[n] = x[n-1] 1] + x[n] is clearly causal, as output "at" n depends on only
values of the input "at instants" less than or equal to n ( in this case n and n-1 ).
But system with description y[n] = x[n+1] is not causal as output at n depends
epends on input one
instant later.
Now that we have defined a few system properties, let us see how powerful inferences can be
drawn about systems having one or more of these properties.
Theorem
Proof:
28
Digital Signal Processor -Class Notes
Theorem:
Statement : If a causal system is either additive or homogeneous ,then y(t) can not be non zero
before x(t) is non-zero .
Proof:
We have to show that the system response y(t) = 0 for all t less than or equal to t0.
Since the system is either additive or homogeneous the response to the zero input signal is the
zero output signal. The zero input signal and x(t) are identical for all t less than or equal to t0.
Hence, from causality, their output signals are identical ffor all t less than or equal to t0.
29
Digital Signal Processor -Class Notes
1.8.2 Correlation
30
Digital Signal Processor -Class Notes
many. In order to be able to represent each number from such a continuous range, we
would need an infinite number of digits - something we don’t have. Instead, we must
represent our numbers with a finite number of digits, that is: after discrediting the time-
variable, we now have to discrete the amplitude-variable as well. This discretization of
the amplitude values is called quantization.
• Assume, our sequence takes on values in the range between −1... + 1. Now assume that
we must represent each number from this range with just two decimal digits: one before
and one after the point. Our possible amplitude values are therefore: −1.0,−0.9, . . . ,−0.1,
0.0, 0.1, . . . , 0.9, 1.0. These are exactly 21 distinct levels for the amplitude and we will
denote this number of quantization levels with Nq. Each level is a step of 0.1 higher than
its predecessor
1.9.3 Quantization Error
• When forcing an arbitrary signal value x to its closest quantization level xq, this xq value
can be seen as
x plus some error. We will denote that error as eq (for quantization error)
• The quantization error is restricted to the range −q/2... + q/2 - we will never make an
error larger than half of the quantization step size. When the signal to be sampled has no
specific relationship to the Sampling process, we can assume that this quantization error
(now treated as a discrete time signal eq [n] will manifest itself as additive white noise
with equal probability for all error values in the range.
1.9.4 Quantization digital signals - sampling and quantization
• To reiterate, this equation can be used to calculate the SNR between an unit amplitude
sinusoid and the quantization error that is made when we quantize the sinusoid with a
quantization step size of q. In the discussion above, we used a step size of 0.1 - this was
only for easy presentation of the principles.
• Computers do not represent numbers using decimal digits, instead they use binary digits -
better known as bits. With b bits, we can represent 2b distinct numbers. Because we want
those numbers to represent the range between −1 and 1, we could represent 2b−1
quantization levels below zero and 2b−1 above zero - however, we have not yet
31
Digital Signal Processor -Class Notes
represented the zero level itself. To do so, we ’steal’ one binary pattern from the positive
range - now that can only represent 2b−1 − 1 strictly positive levels.
1.10 NYQUIST RATE
• Nyquist sampling rate states that, the minimum sampling rate is equal to twice the highest
audio input.
1.10 ALIASING EFFECT
• When produce the sequence x(n) by sampling xa ( t) to ensure that all the information’s in
the original signals is retained in the samples . There will be no information loss if can
exactly recover the continuous time signal from the samples.
32