Module 4-Digital Signal Processing - Notes
Module 4-Digital Signal Processing - Notes
• To send the signals in a more desirable form so that transmission loss is minimum
• Digital signal processing (DSP) refers to various techniques for improving the accuracy and
reliability of digital communications.
• This involves processing of an input signal, making it suitable for sending from one place to
another, receiving at the other end, reproducing the original signal.
• Digital signal processing (DSP) is the process of analyzing and modifying a signal to optimize
or improve its efficiency or performance.
• It involves applying various mathematical and computational algorithms to analog and digital
signals to produce a signal that's of higher quality than the original signal.
• Amenable to integration
• Power dissipation
1
CLASSIFICATION OF SIGNALS
• Based upon the nature and characteristics in the time domain, the signals may be classified as
A. Continuous time signals
• It is a mathematical function x(t) which is defined continuously in the time domain. For
continuous time signals the independent variable is time t.
• Amplitude of the signal can have any values and it is defined at all points of time. X(t)
B. Discrete-time signals
• A discrete time signal is defined only at certain time-instants.
• For discrete time signals, the amplitude between two time instants is just not defined.
• For discrete time signals, the independent variable is time n. A discrete time signal is
represented by x(n)
Some important Points
2
Energy and Power signals
• “The energy signal is one which has finite energy and zero average power over a time
interval“
• Energy signal: they are non-periodic, finite and its amplitude becomes zero as time tends to
infinity.
• Example: Exponentially decaying signals, pulses, spike signals, transient voltages etc........
2
Ex ( n ) x( n ) finite value
n
n N
2
Ex ( n) x( n) finite value
n N
• 2. A signal that decays exponentially has a finite energy, so, it is also an energy signal.
• The power of an energy signal is 0, because of dividing finite energy by infinite time (or length)
yields negligible value.
Power signal: Periodic signal that exists for infinite time with constant amplitude. Energy of a
power signal is infinite. Example: Sinusoidal, Unit step, etc.......
• Many signals possess infinite energy and have finite average power.
1 n N
2
P limN x( n ) finite value
2N 1 n N
3
• EXERCISE: Predict whether the following signals are Energy or Power signals?
• For every given frequency f of a signal, xa(t) is periodic, if, xa(t + T) = xa(t) Where period T
can have any arbitrary value.
• Continuous-time sinusoidal signals with distinct (different) frequencies always remain distinct
and unique under any analog processing .
• Increase in the frequency ‘f’ of the signal merely results in an increase in the rate of oscillation
of the field quantities of the signal.
4
Concept of Frequency in discrete time signals
Consider an analog signals given by xa ( t) A cos( t) where, -<t<+ . For discretizing
above signals can be represented as: xa ( nT ) A cos( 2 fnT ) . For sampling freqeucny fs, T is
given by T=1/fs. Then,
f
xa ( nT ) A cos( 2 n )
fs
f
By letting, Fn , we write,
fs
xa ( nT ) A cos( 2 Fnn)
xa ( n) A cos nn
Where Ωn is called normalized angular frequency.
It is worth to note that typical analog frequency f can assume any value ranging from zero to infinity,
but discrete signal frequency can vary from 0 to a maximum of ½ only which is represented as:
1 1
Fn , mathematically
2 2
And the corresponding normalized angular frequency is given by
• EXERCISE: An analog signal is given as: y=20sin60πt. If the signal is sampled at a rate 120/sec.
Obtain the value of normalized frequency.
5
Properties of Discrete time sinusoidal Signals
1. A discrete time sinusoids is periodic only if its frequency Fn is a rational number. i.e Fn can be
expressed as the ratio of two integer numbers. i.e. x(n) is periodic with period N (N>0) if and
only if x(n+N)=x(n) for all n. Smallest value of N for which x(n) is periodic is called the
fundamental period N0.
Conside the discrete time signal x( n) A cos2 nFn and, x( n N ) A cos2 ( n N )Fn . If the
signal is periodic in N, then, we can write ,
x( n N ) A cos( 2 nFn 2 NFn ) A cos( 2 nFn ) . It means that , 2 NFn 2 .k . Or,
k
Fn .
N
“ A discrete time sinusoids is periodic only if its period N can be expressed as the ratio of two
integers.”
2. For any two Discrete-time sinusoids, whose normalized angular frequencies are separated by an
integer multiple of 2π are identical (indistinguishable).
Which is the same as original signal. It implies for all sinusoidal signals with,
3. The highest rate of oscillation in a discrete-time sinusoid is attained when Ω=π or equivalently
Fn=1/2. (see text book for further illustration).
EXERCISE : Consider two analog sinusoidal signals x1(t)=cos2π10t, and x2(t)=cos2π50t. If they are
sampled at the rate fs=40Hz. A) Obtain the expression for the corresponding discrete time signals. B)
If the signals are sampled at the rate fs = 100 Hz, obtain the corresponding discrete-time signals.
6
FUNDAMENTAL RULES OF DISCRETE TIME SIGNALS
1. A discrete time sinusoids is periodic only if its frequency Fn is a rational number. i.e Fn can
be expressed as the ratio of two integer numbers.
2. Any two Discrete-time sinusoids, whose normalized angular frequencies are separated by an
integer multiple of 2π are identical (indistinguishable).Such signals cannot be reproduced as
unique analog signals.
For Eg - The major freq. content of a speech signal is 3000Hz. In TV signals major frequency
component lies below 5MHz.
Then if we know the max. frequency content of any group of signals, we can specify the sampling rate
necessary to convert all the analog signals to digital signals satisfactorily.
• If we know the highest analog frequency to be processed (fmax), then we can select appropriate
sampling frequency (fs).
• The highest analog frequency in an analog signal set, that can be unambiguously reconstructed
when the signal is sampled at the rate fs is fs/2.
• Any frequency above fs/2 gives identical signals with a corresponding frequency in the range
0<f<fs/2. This is known as aliasing.
To avoid such ambiguities, resulting from aliasing, we must select sampling rate to be sufficiently high.
i.e. we must select sampling frequency to be sufficiently high.
i.e. we must select fs/2 to be greater than fmax. Thus to avoid the problem of aliasing, fs is selected
such that
fs
fs 2 fmax ,or fmax
2
7
EXERCISE: Predict that whether the above analog signals could be distinguishably sampled or
not if sampled at the rate 4Hz?
If the highest frequency contained in an analog signal xa(t) is fmax=B, and the signal is sampled at the
rate fs>2fmax=2B, then xa(t) can be correctly recovered from its sampled values using the interpolation
function
sin 2 Bt
g( t)
2 Bt
n n
x a ( t) x a ( ) . g( t )
fs fs
If the sampling of xa(t) is performed at the min. sampling rate fs=2B, then the reconstruction formula
becomes:
n
n sin 2 B( t 2 B )
x a ( t) x a ( )
2B n
2 B( t )
2B
EXERCISE : An analog signal 𝑥𝑎 (𝑡) = sin(480𝜋𝑡) + 3 sin(720𝜋𝑡) is sampled 600 times per second.
a) What are the frequencies in radian if sampled at 600 samples/s?
b) Determine the Nyquist sampling rate for 𝑥𝑎 (𝑡).
c) What are the frequencies, in radians, in the corresponding discrete time signal x(n) if sampled
at Nyquist rate?
8
Manipulations of Discrete-Time Signals in Systems
Here, we consider some simple modifications or manipulations involving the independent variable x(n)
and the signal amplitude (dependent variable).
1. Delay of Signals
A signal x(n) may be shifted/delayed in time domain by replacing the independent variable n
by n – k units, where k is an integer. If k is a positive integer, the time shift results in a delay of the
signal by k units of time. If k is a negative integer, the time shift results in an advance of the signal
by k units in time. It is represented as follows:
TD x( n),k x( n k)
TD x( n),k x( n k)
TD x( n), k x( n k)
Graphical Illustration:
Answer: The signal x (n - 3) is obtained by delaying x (n) by three units in time. The result is illustrated
in Fig below:
9
Delayed signals by 3units
Answer: The signal x (n +2) is obtained by advancing x (n) by two units in time. The result is
illustrated in Fig below:
Please note that if the signal x(n) is stored on a magnetic tape or on a disk or in the memory of a
computer, it is a simple operation to modify the base by introducing a delay or an advance, whereas, if
the signal is not stored but is being generated by some physical phenomenon in real time, it is not
possible to advance the signal in real time.
In folding, the time base n is replaced with the independent variable –n. The result of this operation is
a folding or a reflection of the signal about the time origin n = o.
Eg: y(n)=x(-n)
10
If folding and delay operations are simultaneously done it is represented as follows:
FD x( n) x( n)
TD FD x( n) ,k x( n k ) x( n k )
To downsample a data sequence x(n) by an integer factor of M, we use the following notation as well:
It is obtained by taking a sample from the data sequence x(n) for every M samples (discarding M – 1
samples for every M samples). Here, the time scaled signal is contracted with respect to the original
one.
11
As an example, let the original sequence with a sampling period T = 0.1 second (sampling rate = 10
samples per sec) is given by
x(n) : 8 7 4 8 9 6 4 2 –2 –5 –7 –7 –6 –4 …
And if we downsample the data sequence by a factor of 3, (m=3) we can obtain the down sampled
sequence as
y(m) : 8 8 4 –5 –6 … ,
This means that, if we multiply the time variable by a factor of 2, then we will get our output signal
contracted by a factor of 2 along the time axis. Thus, it can be concluded that the multiplication of the
signal by a factor of ‘m’ leads to the compression of the signal by an equivalent factor. In effect, it
reduces the sampling frequency by increasing the sampling period.
A discrete-time system is called static or memoryless if its output at any instant n depends only upon
the input sample at the same time, but not on the past or future samples of the input. In simple terms,
the response at the nth instant depends only on the input at the nth instant.
Eg - y n ax n , y n nx n bx3 n
12
2. Dynamic Memory Systems
The system is said to be dynamic or to have memory, if the output of a system at any time
instant n is completely determined by the input samples in the interval from n - N to n (N > 0), then the
system is said to have memory of duration N.
n
Eg - y( n ) x( n ) ,
n N
y( n ) x( n k )
k 0
The systems described by the following input-output relations are dynamic with system memory
The first two systems are having finite memory and the last system have infinite memory.
Digital systems can be broadly classified in to two categories, time-invariant systems and time-
variant systems. A system is called time-invariant if its input-output characteristics do not change with
time. Suppose that we have a system T in which, when excited by an input signal x (n), it produces an
output signal y (n).
y( n ) T x( n )
Now suppose that the same input signal is delayed by k units of time to yield x (n - k), and again
applied to the same system. If the characteristics of the system do not change with time, the output of
the relaxed system will be y(n - k). That is, the nature of the output will be the same as the response to
x (n), except that it will be delayed by the same k units in time that the input was delayed. This kind of
systems are called time-invariant or shift-invariant systems.
13
• Statement - “A time-invariant system is one where a time delay (or shift) in the input
sequence causes an equivalent time delay in the system's output sequence”
x( n )results in y( n )
x'( n ) x( n k )results in y( n ) y( n k )
Time invariance just states that the parameters of the system itself do not change over time. The inputs
and the outputs may change, but the system property is the same over the time period of interest.
• The principle of superposition states that If the response of a system to a weighted sum of input
signals is equal to the same weighted sum of responses (outputs) of the system then the system is
linear.
• Behaviour of the system should not change with amplitude of the input.
A linear system is one in which the principle of superposition holds. For a system with two inputs x1(t)
and x2(t), the superposition is defined as : T[a1x1(t)+a2x2(t)]=a1T[x1(t)]+a2T[x2(t)] where a1 and a2 are
the weights added to the inputs and T[x(t)]=y(t) is the response of the continuous-time system to the
input x(t).
Thus a linear system is defined as the “one whose response to the sum of the weighted inputs is the
same as the sum of the weighted responses”.
14
5. Causal versus non-causal discrete- time systems
Definition - A system is said to be causal if the output of the system at any time n [i.e., y(n)] depends
only on present and past inputs [i.e., x(n), x(n -1), x(n - 2), .. .], but does not depend on future inputs
[i.e., x(n + 1), x(n + 2),.. .]. In mathematical terms, the output of a causal system satisfies an equation
of the form
Definition (version 2)- A system is causal if the o/p response does not begin before the i/p is applied.
This means that if i/p is applied at the instant t=t0, then for causal systems, o/p will depend on the
values of i/p x(t) for t≤to only.
y( t0 ) T x( t ), for all t t0
If a system does not satisfy this definition, it is called non-causal. Such a system has an output that
depends not only on present and past inputs but also on future inputs.
It is apparent that in real-time signal processing applications we cannot observe future values of the
signal, and hence a non-causal system is physically unrealizable (i.e., it cannot be implemented).
On the other hand, if the signal is recorded so that the processing is done off-line (non-real time), it is
possible to implement a non-causal system, since all values of the signal are available at the time of
processing.
Examples -:
(1) Median Filter: This is a non-causal system in the sense that it takes the past, current and next
samples; then finds the median.
(2) Mean Filter: This is a causal system in the sense that it takes the past and current samples and finds
the mean.
The case (1) cannot be implemented in real time. But it can be implemented when we already have the
data, for instance if you are doing median filtering for a voice signal - only when you have the data
stored in memory can you access samples ahead of time. Thus non-causal.
Case (2) can be implemented in real time, since you just take the mean of the past and current samples,
a form of averaging - actually called an averaging filter.
15
6. Stable versus Unstable systems (BIBO)
A discrete time system is said to be bounded input-bounded output (BIBO) stable if and only if, for
every bounded input, it produces a bounded output.
The condition that the input sequence x(n) and the output sequence y(n) are bounded means that
there exist some finite numbers, say Mx and My, such that
7. Unstable systems
For some bounded input sequence x(n), if the output is unbounded (infinite), the system is classified
as unstable.
16
EXERCISE
1. Explain any three properties of discrete time sinusoids. Define normalized
frequency.
2. Explain the concept of sampling and sampling theorem in DSP.
3. Two signals are given by s1 (t) = cos 40πt and s2 (t) = cos 100πt which are sampled at
the rate fs=40Hz. Obtain the corresponding discrete-time signals and comment
about their aliasing possibilities.
4. What is quantization? What are the possible ways by which quantization error arise
in signals?
5. What is SQNR in a DSP process? Derive SQNR of a signal in terms of its word
length b.
6. An analog signal 𝑥𝑎 (𝑡) = sin(480𝜋𝑡) + 3 sin(720𝜋𝑡) is sampled 600 times per second.
a. What are the frequencies in radian if sampled at 600 samples/s?
b. Determine the Nyquist sampling rate for 𝑥𝑎 (𝑡).
c. What are the frequencies, in radians, in the corresponding discrete time signal x(n) if
sampled at Nyquist rate?
7. Distinguish between time-variant and time-invariant systems. Check the time-
invariance of the following systems.
a. y1(n)=x(2n+1) b. y3(n)=x(n-1)
8. Consider a system, y(n) = y (n - 1) + x(n) and given that y(-1)=0 and x(n)=Cδ(n)
2
where C is a finite constant. Prove that the system is nonlinear and unstable.
9. Explain the process of resolving the following discrete-time signal using impulse
functions. Illustrate graphically.
Time - 0 1 2 3
1
signal 2 1 - 3 1
3
10. Explain the steps involved in the convolution summation of outputs.
11. What are the essential conditions for a system to be linear?
12. Explain the concept of discrete time energy and power signals. How are they being
represented?
17