You are on page 1of 11

Digital Signal Processing

Lecture 2

Dr. Muayad

3rd year

1
Discrete –Time Signals
2.1 Discrete time signals
The discrete time signal is a function of an independent variable
that is an integer. It is graphically represented as Figure (2-1). It is
important to note that a discrete time signal is not defined at instants
between two successive samples. Also it is incorrect to think that x(n) is
equal to zero if n is not an integer.

Figure (2-1) Graphical representation of a discrete time signal

A discrete-time signal is an indexed sequence of real or complex


numbers. A discrete-time signal may be complex-valued. A complex
signal may be expressed either in term of its real and imaginary parts
z (n)  a(n)  jb(n)  Re{z (n)}  j Im{ z (n)} … (2.1)
or in polar form in terms of its magnitude and phase
z (n)  z (n) exp[ j arg{z (n)}] …(2.2)
The magnitude may be derived from the real and imaginary parts as
2
z (n)  Re 2 {z (n)}  Im 2 {z (n)} … (2.3)
Im{ z (n)}
Whereas the phase may be found arg{z (n)}  tan 1
Re{z (n)}

2
There are some alternative representation of the discrete time signal that
are often more convenient to use. These are
1. Functional representation, such as
1 for n  1,3
 
x(n)   4 for n  2  … (2.4)
 0 otherwise
 

2. Tabular representation , such as

n … -2 -1 0 1 2 3 …..
x(n) … 0 0 0 1 4 1 ….
…..
3. Sequence representation
An infinite-duration signal or sequence with the time origin (n=0)
indicated by the symbol ↑is represented as
x(n)  ,0,0,1,4,1,8,3,0,0, …. (2.5)
A finite-duration sequence can be represented as
x(n)  3,1,2,5,0,3 … (2.6)
The signal in equation (2.6) consists of six samples or point (in
time), so it is called six-point sequence

2.2 Some elementary discrete time signals


There are number of basic signals that appear and play an important role.
These are
1. The unit sample sequence is denoted as δ(n) and is defined as
1 n  0 
 ( n)    … (2.7)
0 n  0
The unit sample sequence is a signal that is a zero everywhere,
except at n=0 where its value is unity. This signal is sometimes
referred as unit impulse. The graphical representation of δ(n) is
shown in Figure (2-2).

3
Figure (2-2) The graphical representation of unit sample signal

2. Unit step signal- it is denoted as u(n) and is defined as


1 n0
u ( n)   … (2.8)
0 n0

Figure (2-3) illustrate the unit step signal

Figure (2-3) The graphical representation of unit step signal

3. Unit ramp signal :-it is denoted as r(n)and is defined as


n n  0 
r ( n)    … (2.9)
0 n  0

4. Exponential function: - an exponential sequence is defined by


x ( n)  a n … (2.10)
Where a may be a real or complex number.
For real function
a  e w then x(n)  e wn …(2.11)
the real exponential signal is illustrated in Figure (2-4).
While the complex exponential
a  e jw … (2.12)
In this case

4
x(n)  e jwn  cos(wn)  j sin( wn) … (2.13)
one component of complex exponential signal is illustrated in
Figure (2-5).

Figure (2-4) The graphical representation of real exponential signal

Figure (2-5) The graphical representation of sinusoidal component of complex


exponential signal

2.3 Signal Manipulations


2.3.1 Transformation of the independent variable (time)
The manipulations of signals are compositions of a few basic signal
transformations which include shifting, reversal, and scaling,
1. Shifting This is the transformation defined by f (n) = n - no. If y(n) =
x(n - no), x(n) is shifted to the right by no samples if no is positive

(this is referred to as a delay), and it is shifted to the left by no


samples if no is negative (referred to as an advance).
2. Reversal This transformation is given by f (n) = - n and simply
involves "flipping" the signal x(n) with respect to the index n.

5
3. Time Scaling This transformation is defined by
f (n) = Mn or
f (n) = n/ N
where M,N are positive integers.
In the case of f (n) = Mn, the sequence x(Mn) is formed by taking
every Mth sample of x(n).
With f (n) = n/N the sequence y(n) =x(n/N) is
 n
 x( ) n  0,  N ,  2 N ,...
y ( n)   N …(2.14)

 0 otherwise

Example 2.1:- Sketch the unit step signal u(n  2)

Solution: -
The function u(n  2) is unit step shifted by two to the positive side as
shown in Figure (2-6)

u(n-2)
1

0.8

0.6

0.4

0.2

0
0 1 2 3 4 5 6
n

Figure (2-6) The signal u(n-2) of Example 2.1

6
Example 2.2: Find the mathematical expression for the signal shown in
Figure (2-7)
x(n)
1

0.8

0.6

0.4

0.2

0
-4 -3 -2 -1 0 1 2 3 4 5
n

Figure (2-7) The signal of example 2.2


Solution: - This signal is a rectangular function; it can be obtained by
subtracting two step signals with the same amplitude as
 x(n)  u(n  3)  u(n  5)

2.3.2 Amplitude modification of discrete time signal


Amplitude modifications include addition, multiplication and
scaling of discrete time signals.
Amplitude scaling of a signal by a constant A is a accomplished by
multiplying the value of each signal sample by A as
y(n)=Ax(n) -∞<n<∞ …(2.15)
The sum of two signal x1(n),x2(n) is a signal y(n),whose value at any instant
is equal to the sum of the values of these two signals at that instant
y(n)= x1(n)+x2(n) -∞<n<∞ …(2.16)
The product of two signals is similarly defined on a sample-to-sample
basis as
y(n)= x1(n).x2(n) -∞<n<∞ …(2.17)

7
H.w : For the signal shown below ,sketch the following signals
a. X(n-2)
b. X(n+3).δ(n-2)
c. X(n-1)+u(-n+1)

2.4 Classification of discrete time signal


2.4.1 Even and Odd signals:-
A real-valued signal is said to be even if for all n
x(n) = x(-n) …(2.18)
Whereas a signal is said to be odd if for all n
x(n) = -x(-n) …(2.19)
Any signal x(n) may be decomposed into a sum of its even part xe(n) and
its odd part xo(n), as
X(n)=xe(n)+xo(n) …(2.20)
To find the even part of x(n)
1
xe (n)  [ x(n)  x(n)] … (2.21)
2
Whereas to find the odd part of x(n)
1
xo (n)  [ x(n)  x(n)] … (2.22)
2

8
Example 2.3: - Find the even and odd parts of the following signal:

Solution: - The even part of a signal x(n) is given by

With x(n) = u(n), we have

Therefore, the even part of the unit step is a sequence that has a constant
value of for all n except at n = 0, where it has a value of 1.

The odd part of a signal x(n) is given by the difference

With x(n) = u(n), this becomes

2.4.2 Periodic and Aperiodic Sequences


A discrete-time signal may always be classified as either being
periodic or aperiodic. A signal x(n) is said to be periodic if and only if
x(n)=x(n+N) for all n. … (2.23)
The smallest value of N for which equation (2.23) holds is called the
fundamental period. If there is no value that satisfies (2.23), the signal is
called nonperiodic or aperiodic.
We have already observed that the sinusoidal signal of the form
x(n)  A sin(2f 0 t ) … (2.24)
is periodic when f0 is a rational number , that is ,if f0 can be expressed as
k
f0  … (2.25)
N
Where k and n are integers

9
Rational function (ratio of two integers), cancels the common factor such
that K & N are relatively prime. Then the fundamental period of a sinusoid
is equal to N
For example
31
f1  implies that N1  30
60

30
Where is f2  result in N2  2
60

If x1(n) is a sequence that is periodic with a period N1, and x2(n) is


another sequence that is periodic with a period N2, the sum
x(n)=x1(n)+x2(n) will always be periodic and the fundamental period is

Where gcd(N1, N2) means the greatest common divisor of N1 and N2.
The same is true for the product; that is will be periodic with a period N.
Example 2.4: Determine if the following signal is periodic or not then
n
find its period x(n)  cos
4

Solution:-
n 
x(n)  cos w
4 4
w 1 k
f    rational function 
2 8 N

 The signal is periodic


N=fundamental period =8 sample /period

This signal repeated itself after 8 samples

10
Homework:-
1. Represent the unit step function using impulse function
2. Represent the impulse function using unit step function
3. Represent the ramp function using unit step function
4. Sketch the following signal x(n)  exp(0.2n)

5. Sketch the following signal x(n)   (n  2)   (n  2)  u(n)

6. Find the mathematical expression for the signals shown in Figure


(2-8)

x(n)
8

0
-6 -5 -4 -3 -2 -1 0 1 2 3
n

Figure (2-8) The signal for Homework.6

11

You might also like