Professional Documents
Culture Documents
Historical Background:
Digital Signal Processing is distinguished from other areas in
computer science by the unique type of data it uses: signals. In
most cases, these signals originate as sensory data from the real
world: seismic vibrations, visual images, sound waves, etc. DSP is
the mathematics, the algorithms, and the techniques used to
manipulate these signals after they have been converted into a
digital form. This includes a wide variety of goals, such as:
enhancement of visual images, recognition and generation of
speech, compression of data for storage and transmission, etc.
Suppose we attach an analog-to-digital converter to a computer
and use it to acquire a chunk of real world data. DSP answers the
question: What next?
The roots of DSP are in the 1960s and 1970s when digital
computers first became available. Computers were expensive
during this era, and DSP was limited to only a few critical
applications. Pioneering efforts were made in four key areas: radar
& sonar, where national security was at risk; oil exploration, where
large amounts of money could be made; space exploration, where
the data are irreplaceable; and medical imaging, where lives could
be saved. The personal computer revolution of the 1980s and
1990s caused DSP to explode with new applications. Rather than
being motivated by military and government needs, DSP was
suddenly driven by the commercial marketplace. Anyone who
thought they could make money in the rapidly expanding field was
suddenly a DSP vender.
Applications of DSP:
1
Vidyalankar : B.E. DSP
4
Module 1 : Discrete Time Signal
Advantages of DSP
5
Vidyalankar : B.E. DSP
4
Module 1 : Discrete Time Signal
Signal
A signal is defined as any physical quantity that varies with time,
space or another
independent variable.
System
A system is defined as a physical device that performs an
operation on a signal.
Signal Processing:
System is characterized by the type of operation that performs
on the signal. Such operations are referred to as signal
processing.
5
Vidyalankar : B.E. DSP
x(t)
t
(t = nT)
n n
0 1 2 3 4 5 6 7
T 2T3 4T . . . .
T .
Solved Examples
Q.1 Consider an Analog Signal xa(t) = 3 cos 100 t
1. Determine minimum required sampling rate to avoid aliasing.
2. Suppose the signal is sampled at the rate F s = 200 Hz what is
the discrete time signal obtained after sampling.
3. Suppose that the signal is sampled at the rate F s = 75 Hz
what is the discrete time signal obtained after sampling.
(A) 1. Since x(t) = A cos mt
m = 100 2 fm = 100 fm = 50 Hz
4
Module 1 : Discrete Time Signal
3. If Fs = 75 Hz T = 1/Fs = 1/75
1
x (n T) = 3 cos 100 nT = 3 cos 100 n
75
4
= 3 cos n
3
2
= 3cos 2 n
3
2
= 3cos n
3
5
Vidyalankar : B.E. DSP
2 2 2
= 3cos n 5sin2 n + 10cos n
5 5 5
2 4
= 13cos n 5sin n
5 5
DT_Signal
1. Functional Representation
4 for n=1,3
x(n)= -2 for n =2
0 elsewhere
4
Module 1 : Discrete Time Signal
n -3 -2 -1 0 1 2 3 4 5
x(n) 0 0 0 0 0 4 -2 4 0
3. Sequence Representation
X(n) = {0 , 4 , -2 , 4 , 0 ,}
n=0
Standard DT Signal
3. Unit Ramp
A discrete time unit ramp function is denoted as Ur (n) and it is
defined as
5
Vidyalankar : B.E. DSP
4. Exponential x(n) = an
0<a<1
1/a2
1/
a 1 a
a2
n
. . . 2 1 0 1 2. . .
.
5. Sinusoidal x(n) = A sin n
n
3 2 1 0 1 2 3 4 5
2. x(n) = 2, 3, 1, 4, 2, 1, 5
x(n) = 2(n + 3) + 3(n + 2) + 1(n + 1) + 4 (n)
2 (n 1) + 1( n 2) + 5 (n 3)
3.
x
1
(n)
n
0 1 2 3
4
Module 1 : Discrete Time Signal
x(n) = (n) + (n 1) + (n 2) + (n 3) or
x(n) = U(n) U(n 4)
Relation between Impulse, Step and Ramp sequences are
U(n) = (n) + (n 1) + . +(n )
r(n) = (n 1) + 2(n 2) + + (n )
(n) = U(n) U (n 1)
r(n) = n U(n)
Signal Manipulations:
3. Folding: This operation will convert the signal into its mirror image.
x(n) x(n)
Example: x(n) = 2, 2,1 x(n) = 1, 2, 2
3
2 Solved Examples
1
Q.3 If x(n) = 1, 2, 3, perform
n following operation.
0 1 22. x(2 n)
1. x(n/2) 3. x(n 1) 4. x(n + 1)
5. x(1 n) 6. X(1, n)
(A) x(n) 3 3 3
2 1 2
1 1
n n n
0 2 4 0 1 0 1 2 3
3 3 3
2 2 2 5
1 1 1
n n n
1 0 1
1
Vidyalankar : B.E. DSP
(6) x(1n)
3
2
1
n
3 1
2
Q.4 A discrete time signal is given by
x(n) = 2, 2, 1, 2, 2
Sketch the following signals
1. x(n 2) 2. x(n + 2) 3. x(3 n) 4. x(n)
(n)
(A) Signal x(n)
2 2 2 2
1
n
2 0 1 2
1
1. To sketch x(n 2) shift the Signal Right by 2 units.
2 2 2 2
1
n
0 1 2 3 4
1
n
4 2 1 0
3
4
Module 1 : Discrete Time Signal
2 2 2 2
1
n
1 0 1 2 3
4. x(n) (n) = 1, 2, 2
2 2
Multiply the Signal by unit step function.
1
n
0 1 2
4 +
2
1/2 1 2
n
2 0 1 2 n
1 0
8
y(n
)
= 4 4
1/2 1
n 5
2 0 1 2
1
Vidyalankar : B.E. DSP
CLASSIFICATION OF SIGNALS
Periodic and Non-Periodic Signals
Periodic Signal: A signal which repeats itself after a fixed time period is
known as periodic signal. Mathematically it is expressed as x(n) = x(n
N) where N is the period of the signal.
Example : If x(n) = 2, 1, 1, 2, 1, 1, 2, 1, 1, ..
Since the signal is repeating after every 3 samples the signal is
periodic with period 3.
Non-Periodic Signal: A signal is not repeating any time interval then the
signal is known as Non-Periodic Signal Mathematically it is expressed
x(n) x(n N)
Example: x(n) = 1, 2, 3, 2, 1, 4 or x(n) = Exponential Signal
4
Module 1 : Discrete Time Signal
Solved Example
Q.6 Show that the following signal are periodic or not.
1. x(n) = cos (0.1 n)
2. x(n) = 4 cos 4 n
3. x(n) = sin 3 n
n n
4. x(n) = cos cos
8 8
(A) 1. x(n) = cos (0.1 n)
0.1 1 K
Here w = 0.1 2 f = 0.1 or f = = =
2 20 N
Which is ratio of two integers. Hence signal is periodic with
period N = 20
2. x(n) = 4 cos 4 n
Here w = 4 2 f = 4 or f = 1/2 = K/N
Hence signal is periodic with period N = 2.
3. x(n) = sin 3n
Here w = 3 2 f = 3 or f = 3/2 K/N
Hence signal is non-periodic.
1 n
4. x(n) = cos cos
8 8
Here w1 = 1/8and w2 = /8
1
f1 = and f2 = 1/16
16
Here f1 is n of periodic and f 2 is periodic. Since the signal is
multiplication of these two. So it is a non-periodic signal.
5
Vidyalankar : B.E. DSP
If signal is neither even nor odd then the signal Even and Odd
components can be calculated by formulas.
x(n) + x(n) x(n) x(n)
xeven(n) = , xodd(n) =
2 2
Solved Examples
Q.7 Find Even and Odd Components of the signal x(n) = 1, 2, 2.
(A) From given x(n) prepare its minor image x (n) is x(n) = 1, 2, 2
x(n) = 2, 2, 1
x(n 2 2 x(n) 2 2
) 1 1
n n
0 1 2 2 1 0
x(n) + x(n)
Even part is calculated as follows xe(n) =
2
0+ 2
at n = 2 xe(n) = = 1
2
0+ 2
at n = 1 xe(n) = = 1 1 1 1 1 1
2
1+ 1
at n = 0 xe(n) = = 1 n
2 2 0 2
1
2+ 0 1
at n = 1 xe(n) = = 1
2
2+ 0
at n = 2 xe(n) = = 1
2
x(n) x(n)
Odd part is calculated as follows x0(n) =
2
0 2 1 1
at n = 2 x0(n) = = 1
2
0 2 n
at n = 1 x0(n) = = 1 2 0 1 2
2
1
2 2 1 1
at n = 0 x0(n) = = 0
0
2 0
at n = 1 x0(n) = = 1
2
2 0
at n = 2 x0(n) = = 1
2
x(n) + x(n)
Xe(n) =
2
0+ 1 1
at n = 3 xe(n) = =
2 2
0+ 1 1
at n = 2 xe(n) = = xe(n)
2 2
0+ 1 1 1
at n = 1 xe(n) = =
2 2
1+ 1
at n = 0 xe(n) = = 1 1/ 1/ 1/ 1/ 1/ 1/
2
2 2 2 2 2 2
1+ 0 1
at n = 1 xe(n) = = n
2 2
3 1 1 2 3
0
1+ 0 1 2
at n = 2 xe(n) = =
2 2
1+ 0 1
at n = 3 xe(n) = =
2 2
x( n) x(n)
x0 (n) =
2
0 1 1
at n = 3 x0(n) = =
2 2
0 1 1
n = 2 x0(n) = =
2 2
0 1 1
n = 1 x0(n) = =
2 2
1 1
n =0 x0(n) = =0
2
1 0 1
n =1 x0(n) = =
2 2
1 0 1
n =2 x0(n) = =
2 2
1 0 1
n =3 x0(n) = =
2 2
2 1 x
0 1 2 3
5
n = n= 0
= (1)2 + (2)2 + (3)2 + (4)2 = 1 + 4 + 9 + 16 =
30 J
4
Module 1 : Discrete Time Signal
Example
x(n) = U(n) find average power of the signal.
1 N 1 2 1
Pav = lim
N 2N + 1
U (n) = Nlim
2N +1
[1+ 1+ ....,0toNTimes]
n= 0
1 1+ 1/ N 1
= lim N+ 1 = lim =
N 2N + 1 N 2 + 1/ N 2
Energy Power
1. Two signals having finite non- The signal having finite non-zero
zero energy is called Energy power is called Power Signal.
Signal.
2. Energy Signals are generally Non- Power Signals are generally
Periodic periodic.
3. Energy signals can Exist over Power signals can exist over
finite time. infinite time.
4. Power of an Energy Signal is Energy of a power signal is
zero infinite.
Energy_and_power of dt signal
5
Vidyalankar : B.E. DSP
Solved Examples
Q.10 Determine whether the given signals is Energy/Power.
n
1
x(n) =
(n)
2
(A) Since signal is non-periodic it can be Energy Signal.
2n n
1 1
E = x2(n) =
2
=
4
n = n= 0 n= 0
1
Since an = 1 + a + a2 + . a =
1 a
.
n= 0
1 4
E = =
1 1 / 4 3
4
Module 1 : Discrete Time Signal
E = x2(n) = n2 U2 (n) = n2
n = n = n= 0
= 0 + 1 + 2 + 3 + . =
2 2 2 2 2
Sr STATIC DYNAMIC
No (Dynamicity property)
1 Static systems are those systems Dynamic systems output
whose output at any instance of depends upon past or future
time depends at most on input samples of input.
sample at same time.
2 Static systems are memory less They have memories for
systems. memorize all samples.
It is very easy to find out that given system is static or dynamic. Just
check that output of the system solely depends upon present input
only, not dependent upon past or future.
5
Vidyalankar : B.E. DSP
It is very easy to find out that given system is Shift Invariant or Shift
Variant.
Suppose if the system produces output y(n) by taking input x(n)
x(n) y(n)
x(n-k) y(n-k)
Sr LINEAR NON-LINEAR
No (Linearity Property)
1 A System is linear if it satisfies A System is Non-linear if it
superposition theorem. does not satisfies
superposition theorem.
2 Let x1(n) and x2(n) are two input
sequences, then the system is said to
be linear if and only if T[a1x1(n) +
a2x2(n)]=a1T[x1(n)]+a2T[x2(n)]
a1
x1(n)
SYSTEM
y(n)= T[a1x1[n] = a1x1(n)+
a2x2(n) ]
x2(n)
a2
SYSTEM
4 ANALOG
SYSTEM
Module 1 : Discrete Time Signal
x1(n) a1
x2(n a2 SYSTEM
y(n)=T[a1x1(n)+a2x2(n)]
Sr CAUSAL NON-CAUSAL
No (Causality Property)
1 A System is causal if output of A System is Non causal if
system at any time depends only output of system at any time
past and present inputs. depends on future inputs.
2 In Causal systems the output is In Non-Causal System the
the function of x(n), x(n-1), x(n-2) output is the function of
.. and so on. future inputs also. X(n+1)
x(n+2) .. and so on
3 Example Real time DSP Systems Offline Systems
5
Vidyalankar : B.E. DSP
2 X(n) Causal
3 X(n) + x(n+3) Non-Causal
4 2 x(n) Causal
5 X(2n) Non-Causal
6 X(n)+ x(n-2) +x(n+2) Non-Causal
Sr STABLE UNSTABLE
No (Stability Property)
1 A System is BIBO stable if every A System is unstable if any
bounded input produces a bounded input produces a
bounded output. unbounded output.
2 The input x(n) is said to bounded
if there exists some finite number
Mx such that |x(n)| Mx <
The output y(n) is said to
bounded if there exists some
finite number My such that |y(n)|
My <
It is very easy to find out that given system is stable or unstable. Just
check that by providing input signal check that output should not rise
to .
The condition for stability is given by
| h( k ) | <
k= -
Linear Convolution
4
Module 1 : Discrete Time Signal
3 h(n 3
2 2 2 ) 2
x(n h(n
) 1 ) 1 1
n n n
0 1 2 0 1 2 2 1 0
2
y(0) = x(n)h(n) = x(n)h(n) = 2
n = n= 2
y(1) = x(n)h(1 n) = 4 + 2 = 6 h(1
n = n) 3
2
1
n
1 0 1
5
Vidyalankar : B.E. DSP
y(2) = x(n)h(2 n) = 6 + 4 + 1 = 11
h(2
n = n) 3
2
1
n
0 1 2
y(3) = x(n)h(3 n) = 6 + 2 = 8 h(3
n =
n) 3
2
1
n
1 2 3
y(4) = x(n) h(4 n) =3 h(4
n =
n) 3
2
1
n
Convolution Graph 2 3 4
11
8
y(k)
6
3
2
k
0 1 2 3 4
4
Module 1 : Discrete Time Signal
h(1n
y(k) = x(n)h(k n)
n = 4)
2
y(1) = x(n)h(1 n) =1 1
n =
n
3 2 1
y(0) = x(n)h(0 n) = 2+2=4 h(1n)
n =
4
2
1
y(1) = x(n)h(1 n) = 4 + 4 + 3 = 11 n
n =
1 0 1
y(2) = x(n)h(2 n) = 8 + 6 + 1 = 15 h(2n)
n =
4
2
1
n
0 1 2
y(3) = x(n)h(3 n) = 12 + 2 = 14 h(3n)
n =
4
2
1
n
1 2 3
y(4) = x(n) h(4 n) =4
h(4n)
n=
4
2
1
n
2 3 4
y(k 15
) 14
1 bk
bk k+ 1 b2k + 1
k+ 1
= a = a =
1 1 bk + 1 ak + 1
b b
Circular Convolution
Convolution between two periodic signals is known as Circular or
Periodic convolution. In circular convolution, total no. of convolution to
be calculated equal to order of period N.
N 1
y(k) = x(n)h(k n) = x(n) N h(n)
n= 0
Method:
4
Module 1 : Discrete Time Signal
Solved Example
Q.16 Two periodic signals
x(n) = 1, 2, 3, 4 and h(n) = 1, 1, 2, 2
find circular convolution between the signals.
3 1
(A) y(k) = x(n) h(k n) since period N = 4
n= 0 4
3 3 1 1
y(0) = x(n) h(n) 2
n= 0
2
= 1.1 + 2.2 + 3.2 + 4.1
= 1 + 4 + 6 + 4 = 15 2
3
y(1) = x(n) h(1 n) 2
n= 0
4
= 1.1 + 2.1 + 3.2 + 4.2
3 1 1
= 1 + 2 + 6 + 8 = 17 2
2
1
3 2
y(2) = x(n) h(2 n) 4
n= 0
1 3 1
= 1.2 + 2.1 + 3.1 + 4.2 2
2
1 5
Vidyalankar : B.E. DSP
= 2 + 2 + 3 + 8 = 15
3
y(3) = x(n) h(3 n) 1
n= 0
= 1.2 + 2.2 + 3.1 + 4.1 4
= 2 + 4 + 3 + 4 = 13 1 3 1
2
2
2
Let x(n) and h(n) are periodic sequences with period 4. Then the
3
circular convolution is represented by y(k) = x(n) h(k n)
n= 0
3
For k = 0 y (0) = x(n) h( n)
n= 0
=
x(0) h(0) + x(1) h(1) + x(2) h(2) + x(3) h(3)
Since N = 4 h(n) = h(4 + n)
h(1) = h(4 1) = h(3)
h(2) = h(4 2) = h(2)
h(3) = h(4 3) = h(1)
y(0) = x(0) h(0) + x(1) h(3) + x(2) h(2) + x(3) h(1) (1)
3
For k = 1 y(1) = x(n) h(1 n)
n= 0
= x(0) h(1) + x(1) h(0) + x(2) h(1) + x(3) h(2)
y(1) = x(0) h(1) + x(1) h(0) + x(2) h(3) + x(3) h(2) (2)
3
For k = 2 y(2) = x(n) h(2 n)
n= 0
= x(0) h(2) + x(1) h(1) + x(2) h(0) + x(3) h(1)
y(2) = x(0) h(2) + x(1) h(1) + x(2) h(0) + x(3) h(3) (3)
3
For k = 3 y(3) = x(n) h(3 n)
n= 0
= x(0) h(3) + x(1) h(2) + x(2) h(1) + x(3) h(0) (4)
4
Module 1 : Discrete Time Signal
y(0) h(0)
h(3) h(2) h(1) x(0)
y(1)
h(1) h(0) h(3) h(2)x(1)
=
y(2)
h(2) h(1) h(0) h(3) x(2)
y(3) h(3)
h(2) h(1) h(0) x(3)
Solved Example
Q.17 x(n) = 1, 2, 3, 4 and h(n) = 1, 1, 2, 2 find x(n) N h(n)
y(0)
1 2 2 1 1
1.1+ 2.2 + 2.3 + 1.4 = 15
y(1)
1 1 2 2
2 1.1+ 1.2 + 2.3 + 2.4 = 17
(A) = =
y(2) 2 1 1 2 3 2.1+ 1.2 + 1.3 + 2.4 = 15
y(3) 2 2 1 1 4 2.1+ 2.2 + 1.3 + 1.4 = 13
y(0) 2 0 0 1
1 2 + 0 + 0 + 0 = 2
y(1) 1 2 0
0
2
1+ 4 + 0 + 0 = 5
= =
y(2) 0 1 2 0
3
0 + 2 + 6 + 0 = 8
y(3) 0 0 1 2
0 0 + 0 + 3 + 0 = 3
y(n) = 2, 5, 8, 3
The answer can be cross checked by Linear Convolution.
Correlation
5
Vidyalankar : B.E. DSP
x, n (k) = x(n) x(n k) or x(n+ k) x(n)
n = n =
If the signals are generated by different sources then the correlation is
known as Cross- Correlation and it can be expressed by
mathematical expression.
x, h (k) = x(n)h(n k)
n =
Solved Examples
Q.19 Determine AutoCorrelation of the sequence
x(n) = 1, 2, 3, 4.
(A) xx (k) = x(n) x(n k)
n =
3
xx(0) = x(n) x(n)
n= 0
= 0 + 0 + 0 + 4.1 = 4
3
xx (1) = x(n) x(n+ 1)
n= 0
4
Module 1 : Discrete Time Signal
3
xx (3) = x(n) x(n+ 3)
n= 0
2
xh(1) = x(n) h(n 1)
n= 0
= x(0) h (1) + x(1) h(0) + x(2) h(1)
= 0 + 1.1 + 1.2 = 3
2
xh(2) = x(n) h(n 2)
n= 0
= x(0) h(2) + x(1) h(1) + x(2) h(0)
= 0 + 0 + 1.3 = 1.3
2
xh(1) = x(n) h(n + 1)
n= 0
= x(0) h(1) + x(1) h(2) + x(2) h(3)
= 2.2 + 1.3 + 0 = 4 + 3 = 7
2
x(2) = x(n) h(n + 2)
n= 0
= x(0) h(2) + x(1) h(3) + x(2) h(4)
5
Vidyalankar : B.E. DSP
= 2.3 + 0 + 0 = 6
xh(k) = 6, 7, 7, 3, 3
4
Module 1 : Discrete Time Signal
General Questions
n
(i) x(n + 2) (ii) x(2n 2) (iii) x + 1
2
n
2
(iv) x (v) x(3 3n)
2
6. x(n) = 3, 2, 1,1
,1,2,3
5
Vidyalankar : B.E. DSP
4
Module 1 : Discrete Time Signal
Exam Questions
5. For the given causal sequences x(n) = {8, 9, 2, 3} and h(n) = {4, 3, 6}
find the cross correlation. [May-16]
ii.
5
Vidyalankar : B.E. DSP
4
Module 1 : Discrete Time Signal
14. Check the periodicity of the following signals and if periodic, find
their fundamental period [May-17]
a.
b.
5
Vidyalankar : B.E. DSP
Answer:
1. B 6. C
2. C 7. A
3. C 8. B
4. B 9. A
4
Module 1 : Discrete Time Signal
5. D 10. B