Digital Signal Processing Prof. T. K. Basu Department of Electrical Engineering Indian Institute of Technology, Kharagpur
Digital Signal Processing Prof. T. K. Basu Department of Electrical Engineering Indian Institute of Technology, Kharagpur
Prof. T. K. Basu
Department of Electrical Engineering
Indian Institute of Technology, Kharagpur
Lecture - 1
Discrete Time Signal and system
Welcome to the lecture series on digital signal processing. Before we start, I would like to give
you the references, for text books; that we shall be following most of the most of the time,
excuse me.
Digital Signal Processing, a computer based approach by S K Mitra; this is TMH publication, it
is available in the market, second edition I shall be following. Then Discrete Time Signal
Processing by Oppenhein and Schaffer, this is PHI. Then Digital Signal Processing - a practical
approach, second edition; this is Pearson Education Publication, Pearson Education Asia, this is
by Emmanuel C Ifeachor and Barrie W Jervis. These are the three main text books that I shall be
following.
1
(Refer Slide Time: 03:20)
There are some more books which I which I shall give you for reference, you can follow that.
Digital Signal Processing, there all available in the library. System analysis system analysis and
Design, this is Cambridge University Press, Paulo S R Diniz Paulo S R Diniz, Eduardo A B da
Silva and Serigo, sorry Sergio L Netto. Then you can also follow the book by Proakis; it is a very
common book available in the market and Manolakis, Eastern Economy publication, it is
available in the market.
Then there are also books by Antonio Andreas, then Johnson and Johnson there are many more
in the market. So, we shall concentrate mostly on the first two and occasionally, the third book.
2
(Refer Slide Time: 06:03)
Okay, let us start with some elementary definitions about signals, all right. What do you mean by
a signal? What is a signal? It is a variable. It is a variable that is dependent on some independent
variable; it may be time or space, may be it is a function of time or space or both, okay. Now, for
example; we have varieties of signals, it may be the speed of a motor, it may be the torque of a
motor, if it is varying with time or it may be flow of a liquid in a chemical process.
Or it may be the intensity of light, especially in images; for example, where we deal with the
intensity of the light, the illumination level at different points of an image. Then it can be
pressure, it can be current voltage and so on. There can be so many of varieties of signals that we
deal with. There all converted, into electrical signals through different transducers, okay. Even
the high voltage, for example when you measure high voltage; you step down the voltage to P T
or the high current, you step down through C T and then rectify and you get a digital signal.
So, signals can be anything like torque, speed, intensity. The intensity can be of light; intensity of
vibration, mechanical vibration, I will just show you some typical signals. Then pressure,
current, voltage and so on. This all converted to electrical signals through transducers. Now, we
use these signals, we use these signals for a communication between a man and man or man with
machine or machine to machine. Man to man signal communication, need not be need not be
3
always a recordable signal; it can be even through eyes, you make certain gestures or may be
movement of your hands, all right. When people are not able to speak, they used to make
gestures and communicate. So, man to man communication; though signals not necessary all the
signals will be very easily recordable through a transducer, all right, you can record the image.
But when you make gestures; facial gesture all right and then recording that you know, you
change your eyebrows or your eye balls and you communicate, that is also possible.
Well, we will take the normal signals; the normal signals that will be very easily available
through a transducer in the form of an electrical signal. Speech is one side signal, where we
communicate, okay. So, I will show you some typical signals.
Say, this is an English sentence; Bishop moves to King Knight Five, this is the signal, okay.
Now, the signal is changing very fast with a split of time. So, unless you blow it up, unless you
expand these, you will be able to make out anything from the signal. Now, only some parts of
this very signal we are showing here, for example; this is Bishop that spot all right.
4
(Refer Slide Time: 10:32)
Then before bishop, Bishop the word ends, up; you see this is P. Then moves, if it is moves m, it
is like this, h m.
5
(Refer Slide Time: 10:57)
So, you can see how long it takes though when you hear the signal is spoken, in a fraction of a
second. But if you take the record and expand it, it is like this. Similarly, you can have the
vibration of a machine. Vibration of a machine, for example; we conduct an induction machine,
all right.
6
This is single phasing, when you have single phasing of an induction machine; the there will be
some noise, the some kind of a vibration it is not uniform motion. So, this is a type of signal that
you get, in a vibration.
And this these are the different frequencies, that will be present in a signal.
7
(Refer Slide Time: 11:54)
Then, if you have an unbalanced machine; on the rotor shaft all right, unbalancing in the rotor
shaft then this is the kind of vibration that you get. See, these vibration patterns and these
vibration patterns, these are different all right. So, you can record from the vibration pattern; if
you can record it properly whether there is a single phasing or there is a, I mean the type of
abnormality you can, analyse from different vibration signals.
Then loosely bolted base; induction machine, the bolt has been loosened and we find the signal is
of a different type and so on. You can record similarly, many other signals. This was just an
example. Man to machine communication; you give a command may be through a computer or
sometimes even an oral command, that can be translated like the speech signal, that I have given
you. So, you can give an oral signal, that can be converted to a command and machine can be
switched on, off or any executive order can be given. Machine to machine communication also,
we give signals may be through a computer, okay.
8
machine communication. So, with this much of brief idea about, signals let us see; what are the
different types of signals, that we come across or that we deal with in systems.
If, we define X t has a signal in the time domain. So, this is the signal X t, this is a continuous
domain signal; that is it is a continuous function of the variable, t. If, I discretize it; that is if I
measure the value the function, at regular intervals of time then the same function will be
observing, only at discrete times. So, these are the values recorded. So, this will be n T, only at
multiples of T, T is the sampling time. Only at multiples of T, will be having the values;
remained you, these recorded values you have nothing in between, it is not defined, okay.
It can be treated as, a continuous signal; it can be treated as a continuous signal, like this, it is an
impulse of this kind and then it is zero then again at impulse, an impulse like this again zero ,that
again at two T it is an impulse and so on. It could have been treated as a continuous function;
where it is a delta function then it is zero then it is delta function again of some magnitude. So,
these are scaled delta functions; I hope you know, what a delta function is, you have studied in
signals and systems, signals and networks.
9
So, it can be treated as that also; that is in these intervals it can be treated as zero, but it is not
really zero, it is not defined. Somebody may interpolate between these two values and assume
some values in-between that is also possible, okay. We will discuss these later on, when I come
to filters. Now, if I describe, discretize only in the time domain, this is discrete time signal, okay.
Now, how much is this value? If we are recording it, if we are recording it through a digital
device then there is a limitation; there has to be somewhere, you have to stop for for recording
the value, okay.
You can have a sixteen bit or a thirty-two bit memory, you cannot have an infinite memory
space; and hence this has to be truncated somewhere, if the value say 5.625 units, say so many
volt voltage or may be any other unit. Now, if I have just one decimal place of storage capacity
then, it has to be recorded only as 5.6, so there will be a truncation. These two will be truncated
or it may be rounded off, it may be five say 5.675. If there is a truncation, it will be 5.6, if it is
rounding off then it will be 5.7, okay.
But, I will not allow you to go, beyond one decimal place of accuracy then there will be only
certain discrete steps. So, this is at intervals of point one. So, I can have either five point six or
five point seven or five point five, but nothing in-between.
10
(Refer Slide Time: 17:44)
So, the values of the signal; therefore in such a case, will appear like this. May be, at this point it
is here, at this point it is here. So, these are the levels. So, even though the signal was continuous
and you are measuring these values, at regular intervals of time but we are we have; the recorded
value only up to these levels, there is nothing in-between. It will not fall here or there. So, like
this I just check in arbitrarily these values, may be like this and so on, okay.
So, these are digitized, these are discrete in the time domain and also in the magnitude domain.
So, this is known as a digital signal; that is you have discretization both in the independent
variable and dependent variable. Now, we can have another type of signal and extension of this,
till the next reading comes, we will treat the value of the function to remain constant at this point,
okay. Then when the new value comes here, then this is again assumed to remain constant of this
point; then this value has come, so it will remain constant like this.
So, these amplitudes were recorded and their value of the signal is assumed to be remaining
constant up to this. So this becomes a continuous time signal. Earlier, we are assuming these to
be either zero or just not defined or interpolating, okay. Now, this is a continuous time function
but at definite levels, okay. It is a box car signal that is the sample values; I put on a whole
circuit, so with a whole circuit, you get an output like this, sample and hold all right. So, this is
11
quite often, this is the signal that we use in our normal signal processing all right, because
whenever we sample a signal; that is a duration for which the sample is allowed to remain
constant, that that that sampling is done over a certain period, okay and the value of the function
is remaining constant at that point, it is this type of signal that we use.
Again, when we represent a signal; say if it is only time dependent, we write as X t, if it is in the
discrete domain, so this is the analogue signal which we are sampling only, at regular intervals of
time. So, this is a value of this this, very function X t or X a t, to distinguish it from the discrete
function; we are writing X analogue.
12
(Refer Slide Time: 22:26)
We can also have the variable in space, okay; we can write s in space. So X in space means;
suppose you create a an artificially, you create an explosion here then there are signals go inside,
say underground exposure then the signals will be transmitted in all possible directions, all right.
So, it will have X Y Z three different directions, and also with time it is changing, so what kind
of variable it will be? It will dependent on four such, if I call that signal as whether s, signal as s
then it is a function of X Y Z and t, okay.
So, in all your geophysical, geo-physical seismic studies; for example, you get this kind of signal
all right. Tsunami, you know we have seen any of the web sites, okay; the pictures that have
been taken, all right. We can see, the studies are made; geophysical studies are made with x y z
and t, all these four variables. Again in say colour TV, you are having signals with red
components all right, red green and blue components.
So, signal s will have r g and b three components and all of them red component is again a
function of; suppose, in the point here is illuminated with certain amount of intensity of light of
the red component, basically these are called pixels. Each pixel is consisting of three elements
red, green, blue all right. And each component will have different levels of intensity that is how
13
you get a colour image of different shades. Now, that will be dependent on each element will be
dependent on, x y z, x and y, it because it is a two dimensional picture, so x and y. So s r will be
a function of x y. In a TV every time see, when I am moving my hand, so the picture frame is
changing; so, it is also dependent on time. How, this particular point intensity is changing, if I
move my hand, see my finger tip is changing its position, all right. So, every point will have also
this variable.
Now, in signal processing we have useful information, we call it signal or signals; it can be
multi-channel signal also. Then it gets mixed with noise which is not wanted, unwanted noise
and what you getting, this is a received signal. That is corrupted, noise corrupted signal you are
receiving, all right.
Now, our main aim is to get hold of the useful information all right by some kind of a
processing. Now, signal processing is basically consisting of noise removal exercise; since the
noise noise the knowledge about noise is not known, you may have just statistical information
14
about noise, so the total removal of the noise is also not possible, all right. Noise can be random,
it can be a random phenomenon.
So, apart from this noise removal, we also try to enhance certain features of the signal, all right.
Enhancement of some features, you would like to see; say for example, in high frequency zone
of a signal what is the component, all right what is the component distribution, that means what
are the different high frequency components beyond a certain level or what are the low
frequency components?
We want to suppress the low frequency part, the signal may contain for example; my voice as it
is the normal voice, even without noise theoretically suppose, no noise is present then as you are
hearing, you want to see what will be the high frequency component of my voice, all right or the
low frequency component of my voice. Then you want to segregate, you want to suppress certain
component, certain components and enhance certain parts or even in an image sometimes; we try
to enhance the image, the quality of the image; we try to see which is soothing to the eyes, all
right, so that can be also an exercise.
And then separation, you would like to see; if it is possible to separate, separate the high
frequency components from the low frequency components, segregate the two, okay. For
example, in musical signals, we have to differentiate between say different instruments, the voice
of the singer and so on. You would like to, filter out as far as possible certain particular
instruments. So, certain bands of frequencies are to be suppressed, how it I mean how soothing
the sound will be to the ear. You may like certain instruments, particular instruments to be
enhanced.
15
(Refer Slide Time: 30:06)
Now, there are different fields of application. Anything that you think of in modern day,
technological society will have application of D S P; you cannot imagine anything without D S
P, the application of DSP. See you can have acoustics, vibration, as I was showing you speech,
data communication, solar/radar. Then seismology, we use for oil exploration, earth quake, okay.
16
Then biomedical; it is known to all of you, it is widely applied in bio-medical systems, EEG,
ECG then there are many other application, where we take biomedical signals and use the
techniques of D S P.
Robotics, Instrumentation, as I was telling you, flew measurement, pressure measurement and so
on. Instrumentation and control, Image processing, satellite; it may be satellite weather mapping,
it may be any image enhancement, sharpening and so on, animation and so on. Then consumer
electronics, in consumer electronics; nowadays everything is based on D S P, always
synthesisers then you know, you have music mixer.
What are the advantages of D S P? It is for fast processing, fast processing of data. You can use a
very fast computer; you can have parallel processing architecture, which is not possible in an
analogue signal. So for fast processing, nowadays we have very fast computers with a very good
memory size and parallel processing architecture; all used effectively, you can reduce the time of
conversion and even control diffusions.
Then the most, important advantage is exact reproduction repeatability that means under say, at
different times at different points of time, you conduct the experiment; you will get a same result
all right. Their time tested and there is no ageing effect. The data is stored, it is a mathematical
data, one is written as one all right.
Whereas, within a physical component with any analogue system, there can be always chances of
noise creping in okay and the system will not be giving identically, there will be effect of aging
temperature and so on on the components. So, that is the repeatability is good then you have easy
parameter adjustment.
17
(Refer Slide Time: 35:39)
You can always change the parameter; say a particular constant, it changed from two to three all
right. You can again do the experiment; you can try to see how the signal behaves or how it is
processed in no time, you can keep on playing with any of the parameters with an analogue
device. Change the parameter is not so easy all the time, so parameter adjustment is very flexible
system, it is very easy.
Then, guaranteed accuracy. It is determined by the number of bits, okay. Then the lastly, small
size and cost, small size and reduced cost, low cost. So, the network space equally is also with
the advancement in VLS design, the DSP chips should be available in the market, at so small in
size whether they can be used in all gazettes very effectively.
The disadvantages are not much; people are working on it, to reduce this design time, speed and
cost for large band width signal. And finite word length, because of the finite word length, errors
keep on accumulating, so you have to be careful about that. Now, let us now let us come to some
of the standard signals.
18
(Refer Slide Time: 38:28)
We shall be referring, to the sampling time as capital T. We shall be dealing with time varying
signals; we are not going to discuss about space varying signal but the treatment is identical
okay. 1 by T will be the sampling frequency when you say, we are sampling at a at the rate of
one kilo hertz; that means the sampling time is one by thousandth of a second point, zero zero
one second.
19
One of the most important signals is an impulse; in the analogue domain an impulse is defined, it
is written as delta t. It is defined as a function; it is a function whose value is from minus infinite
to plus infinite if you take, is 1. The function exists only at t equal to 0 and before and after this,
it is all zero. So, at this point the function, the value of the function is infinity but the integral is
finite, when it is 1 it is a unit impulse, okay.
In the discrete domain, in the discrete domain it is a little simplified. We write this as delta n in
the discrete domain. And the value of the function delta n, when you say delta n that means; the
value of the function is of unit strength, there is always a sampling time associated, okay with
sorry with a sampling time, there is always duration for sampling. It is not zero. There is a small
duration, finite duration and hence the impact can be very easily quantified.
Suppose, this time we define as, some T on then it is a magnitude sample value, multiplied by T
on. Sampled value, suppose this is x sampled multiplied by T on, that will be finite when that
value is 1, I call it delta n, okay. It is as good, as defining in terms of this integral, okay. But
there is no assumption like, d t tending to zero, f tending to infinite and the integral is unity; so
that is not required, because you will always have some duration of the signal. So T on, if that is
fixed then this is also fixed.
20
(Refer Slide Time: 42:23)
So, henceforth we shall be writing delta n, will be defining this function as 0 when n is not equal
to 0, and equal to 1 when n is equal to 0. That is at T is equal to 0, corresponding to that in the
discrete domain it will be n equal to 0, at n is equal to zero it is having an impact of unit
magnitude and rest of the time, it is all zero it is just non-existent.
So symbolically, it will look like this delta n, it is denoted as 1, 0, 0, 0, 0 and so on. We shall be
showing, a unit impulse or unit sample sequence. This is unit sample or unit impulse okay. Then
we defined unit step; U n as equal to 1, very similar to unit step in the continuous domain that is
before n is equal to 0, the function is 0 after n is equal to zero including n is equal to zero; it is of
magnitude 1, this is just the sample version of a unit step in the continuous domain.
So, unit step in the discrete domain is defined like this, okay. One second, let us come back to
unit sample. If we consider a delay; that is if this is started after one interval then it will look like
this, 0, 0, 0 and 1 again 0, 0, 0 and so on, if it is delayed by one step. And this delayed function;
will be delta n minus 1, okay.
21
(Refer Slide Time: 45:23)
So in general, delta n minus capital N will be a function like this; 0, 0, 0, 0 and so on. After
capital N interval, it is of magnitude 1, again 0, 0 and so on, okay. This is of the magnitude of the
function. So, if there is a delay by N steps, we shall denote like this; the function appears after N
th interval, okay. So, a unit step a unit step which is written like this, can be conceived as a
summation of this delta plus this delta n minus 1 plus this is delta n minus two and so on.
So, u n is nothing but delta n plus delta n minus 1 plus delta n minus 2 and so on, up to infinity. I
can write this as sigma, delta n minus K, K starting from 0 to infinity, okay. This is precisely,
you get in case of a continuous function; where u t is nothing but integral of delta t, in the
positive region of time, is it not? If you integrate an impulse unit impulse, you get unit step in the
continuous domain. Exactly, similar similarly here, submitted this operation; submitted functions
delta functions will give you, unit step in the discrete domain.
Conversely if you differentiate, if you differentiate a unit step in the continuous domain, you get
a delta function, all right. So, if you take a differencing operation just opposite of an aggregate of
a submission, if you take a differencing operation on a unit step, you get a delta function.
22
(Refer Slide Time: 48:12)
So, u n similarly a delay by n step will look like, 0, 1, two, 3 after n and so on. This is unit step,
shifted by n steps, all right. This is u n minus N. So, what will be u? n minus 1, it will be starting
from interval one, this is 0, 0, 0 and 1, 1, 1 and so on, okay. So, if I take u n minus u n minus 1,
what do I get? It will be a delta function, is it all right? I just subtracted from this, a function like
this, so this point on what; we all getting cancelled. So, at this point only this will remain. So, I
get a delta function okay.
23
Then we define a periodic sequence, very similar to our continuous domain functions. x n, if it is
equal to x n some plus K N, where K is an integer 0, 1, 2, 3 and so on; that means if the value of
the function is repeated after every capital N capital intervals, then it is a periodic function. So,
in discrete domain, we define the periodic sequence as the one, which obeys this relationship and
capital N is the period, okay.
24
Now, you define an exponential sequence, excuse me. Suppose in the continuous domain we
have x t, is equal to A into e to the power alpha t. And we are taking sample values of t; that is t
is equal to n T, therefore x n is nothing but A into e to the power alpha into n T. You can write
this as A into e to the power alpha into T; since alpha and T both are constant, I can take this as a
constant C, C to the power n; some constant to the power n, what is it? It is a G P series, you
know.
So, you get value of the function, if C is less than 1, it will look like this; starting with a
magnitude A, it will be A into C A into C square, okay and so on. It will gradually diminish, if C
is greater than 1. This is first C less than 1, if C is greater than 1; it will keep on increasing, A
into C, A C square and so on, it will keep on increasing, okay. When a C greater than one? When
is this greater than one; when alpha T is positive, when alpha T, T is negative that is e to the
power minus three, then it will be diminishing, okay.
So, an exponential sequence will be given like this; if C is negative, we are talked about the
value of C greater than or less than one, if it is negative then A into say C is minus two, so it will
be A into minus two, A two minus two square. So, alternatively it will be minus and plus, so
what it will look like?
25
(Refer Slide Time: 53:35)
It will be A, it may be exponentially going up or coming down; but it is alternately positive and
negative, it may be gradually diminishing or it may be increasing, okay, that we will see later on.
Yes, there is a question whether C can be negative or not, all right. We will see, under what
situation we get C negative, all right. Okay, I think we should stop here for today, we will
continue with this in the next class. Thank you very much.
26