You are on page 1of 30

DISCRETE TIME SIGNALS AND SYSTEMS

 In this chapter, we consider discrete signals defined only at discrete instants of


time.
 In DSP, discrete signals are used by “sampling” continuous-time signals, i.e.
by converting them into sequences of numbers. This is so because computers
can only operate on numbers.

Amplitude

f(t)
f(nT)

-2T -T T 2T 3T
0

 Sampling is typically performed using an Analog-to-Digital Converter (A/D


or ADC) that samples a voltage signal and converts each sample into a binary
number.
Discrete Time Signals 1
Timing signal
from computer

f(t) Analog-to-digital f(nT)


converter Data to
computer

 A discrete signal is denoted as x[n], where n is an integer number. This signal


represents a continuous signal, x(nT) at time, nT, where T is the sampling
time.

A/D computer
f (t) f [n] Digital g[n]
Sampler
f (nT) processor

Discrete Time Signals 2


 A discrete signal can have a continuous amplitude in the sense that its
amplitude can assume the values
- < x[n] < +
 In the case where the discrete signal assumes only discrete amplitudes (e.g. 0
and 5 Volts), this - discrete-time discrete amplitude - signal is also called a
digital signal sometimes.
 As an example, if the signal out of an A/D converter is represented by eight
bits, its amplitude can assume only 28 or 256 different values.
 Discrete signals are important for engineers who use them to perform DSP,
which is much more versatile than ASP. In addition, discrete signals are used in
communication and control systems.

DISCRETE-TIME SIGNALS AND SYSTEMS


Discrete Signals and Discrete Systems
Suppose that we want to represent an integration using a digital computer:

y( t )   0 x ( )d
t
1
Discrete Time Signals 3
y( t )   0 x ( )d
t
Euler‘s rule approximates the area
under the curve x(t) by the sum of the
rectangular areas shown
x(t)
Using Euler’s rule, and given that:

y( nT )  y( t ) t  nT  y[ n] …

(n-1)T nT (n+1)T t

We could write: y[n]  y[n  1]  Tx[n  1] area

An equation of this type is called:


Difference Equation.
Developing this difference equation we get:
n 1
y[ n]  Tx[0]  Tx[1]    Tx[ n  1]  T  x[ k ] 2
k 0

Discrete Time Signals 4


Comparing equations and  we could see that there is a relationship between
integration in the continuous time and summation in the discrete time.
n 1
y( t )   0 x( )d 1
t
y[ n]  T  x[ k ] 2
k 0

Unit Step and Unit Impulse Functions


Discrete u[n u[n-n0]
Unit Step ]
1

… … … … …
-2 -1 -1 0 1 n0 -1 n0 n0 +1 n
0 1 2 3 n

Discrete δ[n] δ[n-n0]


Unit Impulse

… … … … …
-2 -1 0 1 2 n -1 0 1 n0 -1 n0 n0 +1 n
Discrete Time Signals 5
1 n  n0 1 n  n0
Note that: u[n  n0 ]   and:  [n  n0 ]  
0 n  n0 0 n  n0

 [n]  u[n]  u[n  1]

Equivalent Operations (See Table 9.1)

Continuous Time Discrete Time


n

 x[k ]
t

1.  x( ) d ------------------------------------
k  

dx(t )
2. --------------------------------------------- x[ n ]  x[ n  1]
dt

3. x ( t )  ( t )  x ( 0 ) ( t ) ------- x[n] [n]  x[0] [n] Where  (t ) is the


du (t )
continuous-time unit impulse
4.  (t )  ---------------------------------  [ n ]  u[ n ]  u[ n  1] response
dt

Discrete Time Signals 6


Continuous-Time Singularities
A singularity functions is a function related to the impulse function

Unit Step Function


u(t-t0)
We note:

1 t  t0 1
u (t  t 0 )  
0 t  t0
0 t0 t
t
Some properties: u (at  t 0 )  u (t  0 )
a
u (t  t0 )  [u (t  t0 )]k k 0

The step function is often used to switch functions on and off, i.e.
cos t u (t ), 12u (t )
Continuous Time Signals 7
 T T
t 1  t 
Associated function: rect ( )   2 2
T 0 elsewhere

t  t0  T T
1 t0   t  t0 
and: rect ( ) 2 2
T 0 elsewhere

It is possible t T T
rect ( )  u( t  )  u( t  )
to show that: T 2 2
t T T
rect ( )  u(  t )  u(   t )
T 2 2
t T T
rect ( )  u( t  )  u(  t )
T 2 2

Continuous Time Signals 8


rect(t/T) rect(t/T)
u(t +T/ 2)
1 1

-T/2 0 T/2 -T/2 0 T/2


t t
-1

- u(t-T/2)

u(T/2-t) rect(t/T) rect(t/T)


1 u(T/2-t) u(T/2+t)
1

-T/2 0 T/2
t -T/2 0 T/2
t
-1

- u(-T/2-t)

Continuous Time Signals 9


The rect function is useful in extracting part of a signal:
t 
x(t )  cos t rect
2

Example 2.9 – P. 49 – Half-wave rectified signal.

Unit Impulse Function

In a restricted sense, the unit


impulse function is the derivative
of the unit step function.

Continuous Time Signals 10


f(t)
Note that f(t) approaches u(t) 1
as   0.

0 t0 t0 + ε
t

The derivative, g(t), of f(t) could be


sketched as:
g
(
t
)
1

0 t
0 t+ε
0
t

Continuous Time Signals 11


The impulse function,  (t-t0), is defined as:

 ( t  t 0 )  lim
 0
g ( t )
Interestingly, however, we note that the area under g(t) is independent of  and is
equal to 1!

The impulse function is therefore defined


 ( t  t 0 )  0, t  t0

more by its properties than by its values:

 ( t  t 0 )dt  1



 f ( t ) ( t  t )dt  f ( t )
 0 0

Sifting Property
f ( t ) ( t  t 0 )  f ( t 0 ) ( t  t 0 )
for f(t) continuous at t = t0

When sampling of a continuous function is based on the impulse function it is


called ideal sampling
Continuous Time Signals 12
 (t- t0)
Additionally, the impulse function is represented by:

t
0 t0

Properties of the Unit Impulse Function (Table 2.3)



1 .   
f ( t )  ( t  t 0 ) dt  f ( t 0 ), f ( t ) c o n t i n u o u s a t t = t 0

2 .   
f ( t  t 0 )  ( t ) dt  f (  t 0 ), f ( t ) c o n t i n u o u s a t t = - t 0

3 . f ( t )  ( t  t 0 )  f ( t 0 )  ( t  t 0 ), f ( t ) c o n t i n u o u s a t t = t 0

d
4 .  (t  t0)  u (t  t0)
dt

1 , t  t0
u ( t  t 0 )    (  t 0 ) d   
t
5 .
0 , t  t 0

 1  t0
6 .     ( at  t 0 ) dt    ( t  ) dt
| a |  a
Continuous Time Signals 13
Example 2.10 – P. 53

 

 f (t ) (t )  f ( 0)  2  f (t  1) (t )  f (1)  3


f(t) 4 4
f(t-1)
1
δ(t) 1 δ(t)
-2 0 2 -1 0 1 2 3
t t



 f (t ) (t  1)  f (1)  1  f (t  1) (t  1)  f (0)  2




f(t) 4 4
f(t-1)
1
δ(t-1) 1 δ(t-1)

-1 0 1 2 3
-2 -1 0 1 2 t t
Continuous Time Signals 14
Main Message: The integral of the unit impulse function and another continuous
function is equal to the value of this function at the point where the impulse
“occurs”, regardless of the relative positions of the two functions.

Unit Ramp Function u(t-t 0)

Another singularity function


is the unit ramp function 0
defined as the integral of the t0 t
unit step function
[t-t 0] u(t-t 0)
t
f (t )   u (  t0 )d 1
0
t
  d  
t
0 t0 t 0+1 t
t0 t0

 [t  t0 ]u (t  t0 )
Continuous Time Signals 15
Amplitude Transformations

A – Amplitude Reversal
x(t) y(t)= -x(t)
1 1

-1 1 2 t -1 1 2 t

-1 -1

B – Amplitude Scaling

0.5x(t) 2x(t)

0.5 2

-1 1 2 t -1 1 2 t

-0.5 -2

Continuous Time Signals 16


C – Amplitude Shifting
x(t) + 1
2

-1 1 2 t

x(t) - 1

-1 1 2 t

-1

-2

Continuous Time Signals 17


Time Transformations
A – Time Reversal
x( ) y ( t )  x ( )    t  x ( t)
1 1

Consider
y(1)=x(-1)
-1 1 2  -1 1 t Y(2)=x(-2)

-1 -1

B – Time Scaling
y(t)=x(2t)
1 y(t)=x ( 0.5 t)
1

- 0.5
-1 0 1 -2 2 4
0 t

-1 -1

Continuous Time Signals 18


C – Time Shifting
y(t) = x(t+1)
y(t) = x(t-2)
1 1

0 1 2 3 4 -2 -1 0 1
t t

-1 -1

Time Transformations – General Approach

To plot the signal y(t) = x(at+b):


 On the plot of x(t) replace t by 
 Sketch a t-axis directly below the -axis using:

 b
  at  b  t  
a a
 Identify the amplitude corresponding to each t point and draw y(t) on the t-axis.
Continuous Time Signals 19
Time Transformations – Example (2.1 P. 29)
 Draw y(t) = x(1 – t/2)
x(t) This transformation has reversal, scaling, and shifting.
y(t)=x(1 – t/2)
1


-1 0 1 2 t -2 0 2 4

4 2 0 -2 t = 2 -2

Time Transformations – Intuitive Approach


x ( t )  y ( at  b )

 Time reversal if a is negative


 Time scaling by 1/|a|
 Time shifting by |b/a| to the left if a and b are of the same sign, or to the right
otherwise.
Continuous Time Signals 20
Amplitude and Time Transformations
Examples (2.2 & 2.3 – P. 30)
x (t) Draw 3x (1 -t/ 2) -1
1 -1
Amplifier

x(t) 3x(t) 3x(t)-1


3 +
-1 0 1 2
t

3x (  )-1
2
3x (1 -t/ 2) -1
2
1
1
-1 1 2 
-1 -2 0 2 t
4 2 0 -2 t = 2 -2  -1

Continuous Time Signals 21


Transformation of Discrete-Time Signals

Discrete signals designate sampled signals, where n denotes nT, with T the
sampling period.

A – Amplitude Reversal

x[n]

3 -x[n]
2
1
… … … …
-4 -3 -2 -1 0 1 2 3 n -4 -3 -2 -1 0 1 2 3 n
-1
… -2 …
-3

Continuous Time Signals 22


B – Amplitude Scaling

2 x [n]
0.5 x[n]

6 1.5
4 1
2 0.5
… … … …
-4 -3 -2 -1 0 1 2 3 n -4 -3 -2 -1 0 1 2 3 n

C – Amplitude Shifting

x [n]+1 x [n]-1

3 2
2
… 1 1 … 0
-4 -3 -2 -1 0 1 2 3 n
-4 -3 -2 -1 0 1 2 3 n …
… -1 -1
Continuous Time Signals 23
Time Transformations

A – Time Reversal

x[m]

3
y[n ]  x[m ] m   n
2
1  x[ n ]
… …
3
-4 -3 -2 -1 0 1 2 3 m 2
1
… …
4 3 2 1 0 -1 -2 -3 n=-m
-3 -2 -1 0 1 2 3 4 m
-2 -1 0 1
n=m/2

-12 -9 -6 -3 0 3 6 9 n=3m

Continuous Time Signals 24


B – Time Scaling

y[n]=x[2n]
3
2

… …
-2 -1 0 1 2
n

y [ n ] = x [ n / 3]

3
2
1

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

Continuous Time Signals 25


C – Time Shifting

y[n]=x[n-2] y[n]=x[n+1]

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

Amplitude transformations - as well as time reversal and shifting - of discrete


signals, are similar in nature to corresponding transformations of continuous
signals.

However, with time scaling, f[an], signal information is lost due to time
contraction, when a is an integer greater than 1.

When a = 1/k, where k is an integer greater than 1, signal information is missing


due to time expansion, and is usually obtained via interpolation or extrapolation.
Continuous Time Signals 26
Example 9.2 – P. 455

x[m]
Draw x[2-n]

2
… 1 …
-2 -1 0 1 2 3 m

4 3 2 1 0 -1 n=2-m

x[2-n]
2
1
… …
-1 0 1 2 3 4 n

Continuous Time Signals 27


Examples 9.3 and 9.4 – P. 456 and 458
x[n]
1- Draw y(n) = 3 - 2x(n)
y[n]
2. Draw y(n) = 3 - 2x(2-n)
2 -1
1 … 1

3
-2 -1 0 1 2 3 n

y[m]=3-2x[m]
3
2

… 1 …
-1 0 2
-2 1 3 m
-1

4 3 2 1 0 -1 n=2-m

y[n]=3-2x[2-n]
3
2

… 1 …
0 2 3
-1 1 4 n
-1

Continuous Time Signals 28


MATLAB Routine P. 460

% This MATLAB program performs the time and amplitude


% transformation for
% Example 9.4.
% Establish vectors of sufficient length for both x(n) and n.
n=[-10:10];
x=zeros(1,length(n));
% Enter nonzero values for x(n).
x(10)=2; x(11)=1; x(13)=2;
% Plot x(n).
figure(1),stem(n(1,5:17) ,x(1,5:17), 'fill' ) ,grid , xlabel('n') , ylabel('x(n)')
for k = 3:21
xt(k)=3-2*x(13-n(k));
end
figure(2), stem(n(1,5:17), xt(1,5:17), 'fill'), grid, xlabel('n'), ylabel ('xt(n)');

The “stem” function plots the data of a discrete sequence

Continuous Time Signals 29


About Time Transformations 1
f(t) f(-t)

t t
a -a

f(t-a) f(t+a)

t t
a 2a -a

f(-t-a) = f(-(t+a)) f(-t+a)= f(-(t-a))

t t
-2a -a a

Continuous Time Signals 30

You might also like