DSP [email protected] (1)
DSP [email protected] (1)
First of all we will try to look into the formal definitions of the terms 'signals'.
Then we talk of signal processing in brief, about the classification of signals and some properties of
signals
What is a Signal?
Anything which carries information is a signal. e.g. human voice, chirping of birds, smoke signals, gestures
Many of our body functions are regulated by chemical signals, blind people use sense of touch. Bees
communicate by their dancing pattern.
Modern high-
a transmitting antenna, variation of
Thus, we see that there is an almost endless variety of signals and a large number of ways in which
signals are carried from one place to another place.
A signal is a real (or complex) valued function of one or more real variable(s).
When the function depends on a single variable, the signal is said to be one-dimensional and when the
function depends on two or more variables, the signal is said to be multidimensional.
Examples of a one-dimensional signal: A speech signal, daily maximum temperature, annual rainfall at a
place
An example of a two-dimensional signal: An image is a two-dimensional signal, vertical and horizontal
coordinates representing the two dimensions.
Four Dimensions: Our physical world is four dimensional (three spatial and one temporal).
Processing means operating in some fashion on a signal to extract some useful information e.g. we use our
ears as input device and then auditory pathways in the brain to extract the information. The signal is processed
by a system. In the example mentioned above the system is biological in nature.
Uses analog circuit elements such as resistors, capacitors, transistors, diodes etc
Based on natural ability of the analog system to solve differential equations that describe a
physical system
The solutions are obtained in real time...
The word digital in digital signal processing means that the processing is done either by a digital hardware or
by a digital computer.
Flexibility: Same hardware can be used to do various kind of signal processing operation,
while in the case of analog signal processing one has to design a system for each kind of
operation
Repeatability: The same signal processing operation can be repeated again and again giving
same results, while in analog systems there may be parameter variation due to change in
temperature or supply voltage.
The choice of choosing between analog or digital signal processing depends on the application. One has
to compare design time, size and the cost of the implementation.
Classification of signals
We use the term signal to mean a real or complex valued function of real variable(s) and denote
the signal by x(t).
The variable t is called independent variable and the value x of t as dependent variable.
When t takes a values in a countable set the signal is called a discrete time signal. For example,
-1, 0 ,1,...}
For convenience of presentation we use the notation x[n] to denote discrete time signal.
When both the dependent and independent variables take values in countable sets
(two sets can be quite different) the signal is called Digital Signal.
When both the dependent and independent variable take value in continuous set interval, the
signal is called an Analog Signal.
Notation:
When we write x(t) it has two meanings. One is value of x at time t and the other is the pairs (x (t), t)
allowable value of t. By signal we mean the second interpretation
where I is the
set in which t takes the value.
Notation for discrete time signal
Similarly, for discrete time signal we will use the notation {x(t)}, where {x(t)} is short for
}.
Note that in {x(t)} and {x[n]} are dummy variables i.e. {x[n]} and {x[t]} refer to the same signal.
Some books use the notation x [.] to denote {x[n]} and x[n] to denote value of x at time n.
{x(t)} refers to the whole waveform, while x[n] refers to a particular value.
Most of the books do not make this distinction clean and use x[n] to denote signal and x[n0] to
denote a particular value.
When we use digital computers to do processing, we are doing digital signal processing. But most of
the theory is for discrete time signal processing where dependent variable generally is continuous.
This is because of the mathematical simplicity of discrete time signal processing. Digital Signal
Processing tries to implement this as closely as possible. Thus, what we study is mostly discrete time
signal processing and what is really implemented is digital signal processing.
The world of science and engineering is filled with signals such as images from remote space probes,
voltages generated by the heart and brain and countless other applications.
What is DSP?
Digital signal processing is used in a wide variety of applications. It is hard to. Get exact definition of
DSP.
Let us first look at the dictionary meanings of these words:
Digital: Operating by the use of discrete signals to represent data in the form of numbers.
Signal: A variable parameter by which information is conveyed through an electronic circuit.
Processing: To perform operations on data according to programmed instructions. This leads-to a
simple definition of DSP.
Definition of DSP: DSP is defined as changing or analyzing information which is measured as discrete
sequences of numbers.
System:
System is associated with signals.
System is nothing but physical device that performs an operation on a signal.
As shown in Figure, when we apply an input signal to the system, the system will process the signal
and we get the expected response. This phenomenon is called as signal processing
7. Reconstruction filter:
Output signal of DAC is analog that means it is a continuous signal: But it may contain high frequency
components. Such high frequency components are unwanted. To remove these components;
reconstruction filter is used.
Advantages of Digital over Analog Signal Processing :
1.Versatility :
Digital systems can be reprogrammed for other applications (where programmable DSP chips are
used). Moreover, digital systems can be ported to different hardware.
2. Repeatability:
Digital systems can be easily duplicated. These systems do not depend upon. Component tolerances and
temperature.
3. Simplicity:
It is easy to built any digital system as compared to an analog one.
4. Accuracy:
To design analog system; analog components like. Resistors, capacitors and inductors are used. The
tolerance of these components reduce accuracy of analog system. While in case of DSP; much better
accuracy is obtained.
5. Remote processing:
Analog signals are difficult to store because of problems like noise and distortion. While digital signal
can be easily stored on storage media like magnetic tapes, disks etc. Thus compared to analog signals;
digital signals can be easily transposed. So remote processing of digital signal can be done easily.
6. Implementation of algorithms:
The mathematical processing algorithms can be easily implemented in case of digital signal processing.
But such algorithms are difficult to implement in case of analog signals.
7. Easy up gradations:
Because of the use of software, digital signal processing systems can be easily upgraded compared to
analog system.
8. Compatibility:
In case of digital systems; generally all applications needs standard hardware. Thus operation of DSP
system is mainly dependent on software. Hence universal compatibility is possible compared to analog
systems.
1. System complexity:
The digital signal processing system, makes use of converters, like ADC and DAC. This increases the
system complexity compared to analog systems. Similarly in many applications; the time required for
this conversion is more.
2. Bandwidth limitation:
In case of DSP system; if input signal is having wide bandwidth then it demands for high-speed ADC.
This is because, to avoid aliasing effect, the sampling rate should be at least twice the bandwidth. Thus
such signals require fast digital signal processors. But always there is a practical limitation in the speed
of processors and ADC.
3. Power Consumption:
A typical digital signal processing chip contains more than 4 lakh transistors. Thus power dissipation is
more in DSP systems compared to analog systems. For small applications digital signal processing
systems are expensive compared to analog systems.
Comparison between Digital and Analog Signal Processing:
The table below shows comparison between digital and analog signal processing.
Applications of DSP
The main applications of DSP are audio signal processing, audio compression, digital image processing, video
compression, speech processing, speech recognition, digital communications, digital
synthesizers, radar, sonar, financial signal processing, seismology and biomedicine.
Specific examples are speech compression and transmission in digital mobile phones, room correction of
sound in hi-fi and sound reinforcement applications, weather forecasting, economic forecasting, seismic data
processing, analysis and control of industrial processes, medical imaging such as CAT scans
and MRI, MP3 compression, computer graphics, image manipulation, hi -
fi loudspeaker crossovers and equalization, and audio effects for use with electric guitar amplifiers.
Any periodic function can be expressed in a Fourier series representation. The discrete-time Fourier transform
(DTFT) X -time sequence x(n) is a periodic continuous
cannot be processed by a digital system. For processing by a digital system it should be converted into
discrete form. The DFT converts hus, DFT allows
us to perform frequency analysis on a digital computer.
The DFT of a discrete-time signal x(n) is a finite duration discrete frequency sequence. The DFT sequence is
denoted by X(k). The DFT is obtained by sampling one period of the Fourier transform X( ) of the signal
x(n) at a finite number of frequency points. This sampling is conventionally performed at N equally spaced
points in the period 2 or at
k = 2 k/N; 0 k N 1. We can say that DFT is used for transforming discrete-time sequence x(n) of finite
length into discrete frequency sequence X(k) of finite length.
The DFT is important for two reasons. First it allows us to determine the frequency content of a signal that is
to perform spectral analysis. The second application of the DFT is to perform filtering operation in the
frequency domain.
Let x(n) be a discrete-time sequence with Fourier transform X( ), then the DFT of x(n) denoted by X(k) is
defined as:
The DFT of x(n) is a sequence consisting of N samples of X(k). The DFT sequence starts at k = 0,
corresponding to = 0, but does not include k = N corresponding to =2
). Generally, the DFT is defined along with number of samples and is called N-point
DFT. The number of samples N for a finite duration sequence x(n) of length L should be such that N L.
The DTFT is nothing but the Z-transform evaluated along the unit circle centred at the origin of the z-plane.
The DFT is nothing but the Z-transform evaluated at a finite number of equally spaced points on the unit
circle centred at the origin of the z-plane.
To calculate the DFT of a sequence, it is not necessary to compute its Fourier transform, since the DFT can be
directly computed.
The sampled discrete-time Fourier transform (DTFT) of a finite length, discrete-time signal is known as the
discrete Fourier transform (DFT). The DFT contains a finite number of samples, equal to the number of
samples N in the given signal. Computationally efficient algorithms for implementing the DFT go by the
generic name of fast Fourier transforms (FFTs). This chapter describes the DFT and its properties, and its
relationship to DTFT. The chapter concludes with a discussion of FFF algorithms for computing DFT and its
inverse.
Definition of DFT
- I . The DTFT of
this signal is
The equation is known as N Point DFT analysis equation. The figure below shows the Fourier transform of a
discrete time signal and its DFT samples.
Also, it is very common to represent the DFT operation for a sequence x(n) of length N by DFT x(n). As a
consequence of this equation, we can rewrite the equation of DFT as
EXAMPLE 1 Compute the DFT of each of the following finite length sequences considered to be of length
N:
(a) x(n) = (n)
(b) x(n n n0), where 0 < n0 < N
(c) x(n) = an n N 1
(d) x(n) = {1 for even
0 for odd}
EXAMPLE 2 (a) Find the 4-point DFT of x(n) = {1, 1, 2, 2} directly.
(b) Find the IDFT of X(k) = {4, 2, 0, 4} directly.
Solution:
(a) Given sequence is x(n) = {1, 1, 2, 2}. Here the DFT X(k) to be found is N = 4-point and length of the
sequence L = 4. So no padding of zeros is required.
We know that the DFT {x(n)} is given by
EXAMPLE 3 (a) Find the 4-point DFT of x(n) = {1, 2, 3, 2}.
(b) Find the IDFT of X(k) = {1, 0, 1, 0}.
COMPARISION BETWEEN DTFT AND DFT
DFT is a sampled version of DTFT, where the frequency term is sampled. But we know that DTFT
is obtained by using the sampled form of input signal x(t). So, we find that DFT is obtained by the
double sampling of x(t).
DFT gives only positive frequency values, whereas DTFT can give both positive and negative
frequency values.
DTFT and DFT coincide at intervals of = 2 k/N, where k = 0, 1, ,N 1.
To get more accurate values of DFT, number of samples N must be very high but when N is very high,
the required computation time will also be very high.
The first set of N DFT equations in N unknowns may be expressed in matrix form as:
X = WN x
Here X and x are N x1 matrices, and WN is an N x N square matrix called the DFT matrix.
The full matrix form is described by
USING THE DFT TO FIND THE IDFT
Both the DFT and IDFT are matrix operations and there is an inherent symmetry in the DFT and IDFT
relations. In fact, we can obtain the IDFT by finding the DFT of the conjugate sequence and then conjugating
the results and dividing by N, Mathematically,
This result involves the conjugate symmetry and duality of the DFT and IDFT and suggests that the DFT
algorithm itself can also be used to find the IDFT. In practice, this is indeed what is done.
Problem 1.
Find the 4-point DFT of the following by using Linearity Property.
x (n) = cos ( n) + sin ( n)
Sol:
Problem 1
For x1(n) and x2(n) given below, compute x1(n) O x2(n). Take N = 3
x1(n) = (1, 1, 1) and x2(n) = ( 1, -2, 2)
Problem 2
Find the 4-point circular convolution of the sequences,
x1(n) = (1, 2, 3, 1) and x2(n) = ( 4, 3, 2, 2) using the time domain approach and verify the result
using frequency domain approach.
Linear Filtering of Long Data Sequences:
In real time applications; the input data sequence is very long. It is not possible to do the calculations for such
long data sequences. This is because the digital computer has limited memory. So long input data sequence is
broken into small length sequences (blocks). The computation of each block is done separately. Then all
processed blocks are fitted one after other to get the final output. There are two methods to do such
computation. These are as follows:
(1) Overlap save method
(2) Overlap add method
The 'N' point DFT of h ( n ) is H ( k ). Similarly 'N' point DFT of each block is computed separately and it is
stored in the memory. Let the DFT of mth input block be Xm ( k ). Now the corresponding output is obtained
by taking multiplication of H ( k ) and Xm ( k ). Let this output be Ym(k).
Observe each input block x1 ( n ), x2 ( n) .... Here each input block consists of initial 'M -1 samples taken from
the previous block. That means there is overlap of sequences. While the last 'L' samples of each block are the
actual input samples.
Now because of the circular shift of OFF and because of the overlapping of input data blocks; there is aliasing
in the initial 'M 1 samples in the corresponding output block. To avoid this first 'M l' samples of ym ( n )
are discarded That means after computing time domain sequences; initial 'M 1' samples are discarded. Then
each block is fitted one after other to obtain the final output. The overlap save method is described as shown
in Fig. above.
Sr
OVERLAP SAVE METHOD OVERLAP ADD METHOD
No
1 In this method, L samples of the current segment In this method L samples from input sequence
and (M-1) samples of the previous segment forms and padding M-1 zeros forms data block of size
the input data block. N.
2 Initial M-1 samples of output sequence are
There will be no aliasing in output data blocks.
discarded which occurs due to aliasing effect.
3 Last M-1 samples of current output block must
To avoid loss of data due to aliasing last M-1
be added to the first M-1 samples of next output
samples of each data record are saved.
block. Hence called as overlap add method.
Text Book:
1 Introduction to Digital Signal Processing Jhonny R. Jhonson Pearson 1st Edition, 2016.
Reference Books:
2. Digital Signal Processing A.Nagoor Kani McGraw Hill 2nd Edition, 2012
5 Digital Signal Processing Tarun Kumar Rawat Oxford 1st Edition, 2015