Notes Digital Signal Processing Unit 1
Notes Digital Signal Processing Unit 1
INTRODUCTION
A SIGNAL is defined as any physical quantity that changes with time, distance, speed, position, pressure,
temperature or some other quantity. A SIGNAL is physical quantity that consists of many sinusoidal of different
amplitudes and frequencies.
Ex x (t) = 10t
X (t) = 5x2+20xy+30y
A System is a physical device that performs an operations or processing on a signal. Ex Filter or Amplifier.
CLASSIFICATION OF SIGNAL PROCESSING
1) ASP (Analog signal Processing): If the input signal given to the system is analog then system does analog signal
processing. Example: Resistor, capacitor or Inductor, OP-AMP etc.
2) DSP (Digital signal Processing): If the input signal given to the system is digital then system does digital signal
processing. Example: Digital Computer, Digital Logic Circuits etc. The devices called as ADC (analog to digital
Converter) converts Analog signal into digital and DAC (Digital to Analog Converter) does vice-versa.
Analog Analog
DIGITAL
Signal ADC DAC Signal
SYSTEM
Most of the signals generated are analog in nature. Hence these signals are converted to digital form by the analog
to digital converter. Thus AD Converter generates an array of samples and gives it to the digital signal processor.
This array of samples or sequence of samples is the digital equivalent of input analog signal. The DSP performs
signal processing operations like filtering, multiplication, transformation or amplification etc operations over this
digital signal. The digital output signal from the DSP is given to the DAC.
ADVANTAGES OF DSP OVER ASP
1. Physical size of analog systems is quite large while digital processors are more compact and light in weight.
2. Analog systems are less accurate because of component tolerance ex R, L, C and active components. Digital
components are less sensitive to the environmental changes, noise and disturbances.
3. Digital systems are most flexible as software programs & control programs can be easily modified.
4. Digital signal can be stores on digital hard disk, floppy disk or magnetic tapes. Hence becomes transportable.
Thus easy and lasting storage capacity.
5. Digital processing can be done offline.
6. Mathematical signal processing algorithm can be routinely implemented on digital signal processing systems.
Digital controllers are capable of performing complex computation with constant accuracy at high speed.
7. Digital signal processing systems are upgradeable since that are software controlled.
8. Possibility of sharing DSP processor between several tasks.
Page no: 1
9. The cost of microprocessors, controllers and DSP processors are continuously going down. For some complex
control functions, it is not practically feasible to construct analog controllers.
10. Single chip microprocessors, controllers and DSP processors are more versatile and powerful.
Disadvantages of DSP over ASP
1. Additional complexity (A/D & D/A Converters)
2. Limit in frequency. High speed AD converters are difficult to achieve in practice. In high frequency applications
DSP are not preferred.
CLASSIFICATION OF SIGNALS
1. Single channel and Multi-channel signals
2. Single dimensional and Multi-dimensional signals
3. Continuous time and Discrete time signals.
4. Continuous valued and discrete valued signals.
5. Analog and digital signals.
6. Deterministic and Random signals
7. Periodic signal and Non-periodic signal
8. Symmetrical(even) and Anti-Symmetrical(odd) signal
9. Energy and Power signal
1) Single channel and Multi-channel signals
If signal is generated from single sensor or source it is called as single channel signal. If the signals are generated
from multiple sensors or multiple sources or multiple signals are generated from same source called as Multi-
channel signal. Example ECG signals. Multi-channel signal will be the vector sum of signals generated from multiple
sources.
2) Single Dimensional (1-D) and Multi-Dimensional signals (M-D)
If signal is a function of one independent variable it is called as single dimensional signal like speech signal and if
signal is function of M independent variables called as Multi-dimensional signals. Gray scale level of image or
Intensity at particular pixel on black and white TV is examples of M-D signals.
Page no: 2
3) Continuous valued and Discrete Valued signals.
E=∑∞
𝑛=−∞| 𝑛 |
3) Sequence Representation
X(n) = { 0 , 4 , -2 , 4 , 0 ,……}
n=0
STANDARD SIGNAL SEQUENCES
1) Unit sample signal (Unit impulse signal)
δ n = 1 n=0
0 n=0 i.e. δ (n)={1}
2) Unit step signal
u (n) = 1 n
0 n<0
3) Unit ramp signal
u (n) = n n
0 n<0
4) Exponential signal
X (n) = a n = (re j Ø ) n = r n e j Ø n = r n (cos Øn + j sin Øn)
5) Sinusoidal waveform
Page no: 4
X (n) = A Sin wn
OPERATIONS ON DISCRETE TIME SIGNALS
1) Shifting: signal x (n) can be shifted in time. We can delay the sequence or advance the sequence. This is done by
replacing integer n by n-k where k is integer. If k is positive signal is delayed in time by k samples (Arrow get shifted
on left hand side) and if k is negative signal is advanced in time k samples (Arrow get shifted on right hand side)
X(n) = { 1, -1 , 0 , 4 , - , , ,……}
n=0
Delayed by 2 samples : X(n-2)= { 1, -1 , 0 , 4 , - , , ,……}
n=0
Advanced by 2 samples : X(n+2) = { 1, -1 , 0 , 4 , - , , ,……}
n=0
2) Folding / Reflection: It is folding of signal about time origin n=0. In this case replace n by –n.
Original signal:
X (n) = { 1, -1 , 0 , 4 , -2 , 4 , 0}
n=0
Folded signal:
X (-n) = { 0 , 4 , -2 , 4 , 0 , -1 , 1}
n=0
3) Addition: Given signals are x1(n) and x2(n), which produces output y(n) where y(n) = x1(n)+ x2(n). Adder
generates the output sequence which is the sum of input sequences.
4) Scaling: Amplitude scaling can be done by multiplying signal with some constant. Suppose original signal is x(n).
Then output signal is A x (n)
5) Multiplication: The product of two signals is defined as y(n) = x1(n) * x2(n).
SYMBOLS USED IN DISCRETE TIME SYSTEM
1. Unit delay
Z-1
x(n) y(n) = x(n-1)
2. Unit advance
Z+1
Page no: 5
x2 (n) y (n) =x1(n)+x2(n)
4. Multiplication
x1(n)
×
y(n) =x1(n)*x2(n)
x2 (n)
5. Scaling (constant multiplier)
A
X (n) y(n) = A x(n)
CLASSIFICATION OF DISCRETE TIME SYSTEMS
1) STATIC v/s DYNAMIC
Sr. STATIC DYNAMIC
No (Dynamicity property)
1 Static systems are those systems whose output at any Dynamic systems output
instance of time depends at most on input sample at same depends upon past or future
time. samples of input.
2 Static systems are memory less systems. They have memories for
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.
Sr. System [y(n)] Static / Dynamic Remark
No
1 x(n) Static As System depends on present value only
2 x(n-2) Dynamic As System depends on past value hence needs
memory for storage
3 x2(n) Static As System depends on present value only
4 x(n2) Dynamic As System depends on future values also
5 n x(n) + x2(n) Static As System depends on present value only
6 x(n)+ x(n-2) +x(n+2) Dynamic As System depends on past and future values
also
2) TIME INVARIANT v/s TIME VARIANT SYSTEMS
Sr TIME INVARIANT (TIV) / TIME VARIANT SYSTEMS /
No SHIFT INVARIANT SHIFT VARIANT SYSTEMS
(Shift Invariance property)
1 A System is time invariant if its input output A System is time variant if its input output
characteristic does not change with shift of characteristic changes with time.
time.
2 Linear TIV systems can be uniquely No Mathematical analysis can be performed.
characterized by Impulse response, frequency
response or transfer function.
3 a. Thermal Noise in Electronic components a. Rainfall per month
b. Printing documents by a printer b. Noise Effect
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)
If we delay same input by k units x(n-k) and apply it to same systems, the system produces output y(n-k)
Page no: 6
x(n-k) y(n-k)
3) LINEAR v/s NON-LINEAR SYSTEMS
Sr. LINEAR NON-LINEAR
No (Linearity Property)
1 A System is linear if it satisfies superposition theorem. A System is Non-linear if it
does not satisfy
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)]
x1(n)
SYSTEM
y(n)= T[a 1x1[n] + a2x2(n) ]
x2(n)
x1(n) SYSTEM
a1
y(n)=T[a1x1(n)+a2x2(n)]
SYSTEM
x2(n) a2
Hence T [ a1 x1(n) + a2 x2(n) ] = T [ a1 x1(n) ] + T [ a2 x2(n) ]
It is very easy to find out that given system is linear or Non-Linear.
Response to the system to the sum of signal = sum of individual responses of the system.
Page no: 7
It is very easy to find out that given system is causal or non-causal. Just check that output of the system depends
upon present or past inputs only, not dependent upon future.
Sr. System [y(n)] Causal /Non- Remark
No Causal
1 x(n) + x(n-3) Causal Output of system depends on past and present values
2 X(n) Causal Output of system does not depend future value
3 X(n) + x(n+3) Non-Causal Output of system at any time depends on future inputs.
4 2 x(n) Causal Output of system does not depend future value
5 X(2n) Non-Causal Output of system depend future value
6 X(n)+ x(n-2) Non-Causal Output of system depend future value
+x(n+2)
5) STABLE v/s UNSTABLE SYSTEMS
Sr. STABLE UNSTABLE
No (Stability Property)
1 A System is BIBO stable if every bounded input A System is unstable if any bounded input
produces a bounded output. produces a unbounded output.
2 The input x(n) is said to bounded if there exists
some finite number M x su h that | n | Mx <
∞
The output y(n) is said to bounded if there
exists some finite number My su h that | n |
My < ∞
STABILITY FOR LTI SYSTEM
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
∑∞
𝑘=−∞|ℎ 𝑘 |<∞
Page no: 8
we get for decomposed input signal, we simply add it & this will provide us total response of the system to any
given input signal.
3. Convolution involves folding, shifting, multiplication and summation operations.
4. If there are M number of samples in x(n) and N number of samples in h(n) then the maximum number of
samples in y(n) is equals to M+n-1.
Linear Convolution states that
y(n) = x(n) * h(n)
y(n)= ∑∞
𝑘=−∞ 𝑘 ℎ 𝑛−𝑘
y(-1) = h1 x1
y(0) = h2 x1 + h1 x2
y(1) = h1 x3 + h2x2 + h3 x1 …………
PROPERTIES OF LINEAR CONVOLUTION
x(n) = Excitation Input signal
y(n) = Output Response
Page no: 9
h(n) = Unit sample response
1. Commutative Law: (Commutative Property of Convolution)
x(n) * h(n) = h(n) * x(n)
X(n) Response = y(n) = x(n) *h(n)
Unit Sample
Response =h(n)
The output of causal system at n= n0 depends upon the inputs for n< n0 Hence
h (-1)=h(-2)=h(-3)=0
Thus LSI system is causal if and only if
h (n) =0 for n<0
This is the necessary and sufficient condition for causality of the system.
Linear convolution of the causal LSI system is given by
y(n)= ∑𝑛𝑘= 𝑘 ℎ 𝑛−𝑘
Page no: 10
Linear convolution is given by
y(n)= ∑∞
𝑘=−∞ 𝑘 ℎ 𝑛−𝑘
The absolute values of total sum is always less than or equal to sum of the absolute values of individually terms.
Hence
|y n | |∑∞𝑘=−∞ 𝑘 ℎ 𝑛−𝑘 |
|y n | ∑∞
𝑘=−∞| 𝑘 ||ℎ 𝑛 − 𝑘 |
The input x(n) is said to bounded if there exists some finite number M x su h that | n | Mx < ∞. Hen e ounded
input x(n) produces bounded output y(n) in the LSI system only if
∑∞
𝑘=−∞|ℎ 𝑘 | < ∞
With this condition satisfied, the system will be stable. The above equation states that the LSI system is stable if its
unit sample response is absolutely sum able. This is necessary and sufficient condition for the stability of LSI system.
DIFFERENCE EQUATION
Sr. Finite Impulse Response (FIR) Infinite Impulse Response (IIR)
No
1 FIR has an impulse response that is zero outside of some finite IIR has an impulse response on infinite
time interval. time interval.
2 Convolution formula changes to Convolution formula changes to
y(n)= ∑∞
𝑛=−∞ 𝑘 ℎ 𝑛−𝑘
y(n)= ∑𝑀
𝑛=−𝑀 𝑘 ℎ 𝑛−𝑘
For causal IIR systems limits changes to
For causal FIR systems limits changes to 0 to M. to ∞.
3 The FIR system has limited span which views only most recent The IIR system has unlimited span.
M input signal samples forming output called as
Windowing .
4 FIR has limited or finite memory requirements. IIR System requires infinite memory.
5 Realization of FIR system is generally based on Convolution Realization of IIR system is generally
Sum Method. based on Difference Method.
Discrete time systems have one more type of classification.
1. Recursive Systems
2. Non-Recursive Systems
Sr. Recursive Systems Non-Recursive systems
No
1 In Recursive systems, the output depends upon past, In Non-Recursive systems, the
present, future value of inputs as well as past output. output depends only upon past,
present or future values of inputs.
2 Recursive Systems has feedback from output to input. No Feedback.
3 Examples y(n) = x(n) + y(n-2) Y(n) = x(n) + x(n-1)
First order Difference Equation
Page no: 11
y(n) = x(n) + a y(n-1)
Where y (n) = Output Response of the recursive system
X (n) = Input signal
a= Scaling factor
y (n-1) = Unit delay to output.
Now we will start at n=0
n=0 y (0) = x(0) + a y(-1) ….
n=1 y (1) = x(1) + a y(0) ….
= x (1) + a [ x (0) + a y(-1) ]
= y (-1) + a x (0) + x (1) ….
Hence
Y(n)= 𝑛+
y(-1)+∑𝑛𝑘= 𝑘
x(n-k) 𝑛 0
Determine
(i)Zero input response
(ii) Zero state response
(iii) Total response of the system
Sol. The given equation can be written as
𝜆𝑛− 𝜆 − + =0
𝜆 − 𝜆+ =
Multiplying by 2
𝜆 − 𝜆+ =
𝜆 − 𝜆−𝜆+ =
𝜆 𝜆− − 𝜆− =
𝜆=1,
Hence
𝑛 𝑛
ℎ 𝑛 =𝐶 +𝐶 ----(2)
− =𝐶 /
(5)-(6)
y(0)-y(1)= 𝐶 /
- =𝐶 /
𝐶 =−
𝐶 = -𝐶 = − − =2
𝑛 𝑛 𝑛
So ℎ 𝑛 = − ℎ 𝑛 = − ----(7)
For n
Above equation can be written as
𝑛−
𝑘−𝑘 +𝑘 − =0
𝑘−𝑘 +𝑘 − =
6 8 6
Multiplying by 16
k-6k+8k-1=0
3k=1
k=
𝑛
Hence 𝑝 𝑛 = u(n) -----(9)
Forced response
𝑛 𝑛 = ℎ 𝑛 + 𝑝 𝑛 -----(10)
𝑛 𝑛 = ℎ 𝑛 + 𝑝 𝑛
𝑛 𝑛
= 𝐶 +𝐶 + ------(11)
x(0)= =1
= ------(15)
= 𝐶 +𝐶 + ---(12)
=𝐶 + 𝐶 + *
=𝐶 + 𝐶 + ----(13)
Eq. (12)-(13)
y(0)-y(1)= 𝐶 + ---(14)
Page no: 14
−
y(0)-y(1)= ------(15)
𝐶 =-1
=𝐶 − +
𝐶 =3- = ---(17)
𝑛 𝑛
= - +
Q.2 Determine the range of values ‘a’ and ‘b’ for which the LTI system with impulse response
𝑛
,𝑛
h(n)={ 𝑛
,𝑛 <
is stable .
Solution
The condition of stability is
∞
∑ |ℎ 𝑘 | < ∞
𝑘=−∞
∑∞ ∞ 𝑛 | ∑−
𝑛=−∞|ℎ 𝑛 | =∑𝑛= | + 𝑛=−∞| 𝑛 |
The first summation can be written as
∑∞
𝑛= |
𝑛|
=1+| |+| |+| |+……
This is the standard geometric series and converges to if | | <1. If | | >1, the series does not converge and it
−| |
∑∞
𝑛= |
𝑛|
= if | | <1
−| |
Page no: 15
∑−
𝑛=−∞|
𝑛 | =∑−
𝑛=−∞ | 𝑛
|
=| |+| +
| | |
+…
| |
[ + | |+| +
| | |
+…]
The part inside the brackets, is the geometric series and it converges to if | |
< i.e. | | >
−|𝑏 |
∑−
𝑛=−∞|
𝑛 |= . if | | >
| | −|𝑏 |
∑∞
𝑛=−∞|ℎ 𝑛 | = + if | | < >| |
−| | | |−
Thus the geometric series converges if | | < > | | Or system will be stable if | | < > | |.
Page no: 16