0% found this document useful (0 votes)
165 views6 pages

Discrete-Time Signal Basics

This document discusses discrete-time signals. It begins by defining discrete-time signals as signals with values defined at discrete time points indexed by integers. Common ways to represent discrete-time signals include graphical plots, functional expressions, tables and sequences. Sampling of continuous-time signals is described as a process that results in discrete-time signals. Important discrete-time signals discussed include the unit step, unit ramp, unit impulse, and sinusoid. MATLAB examples are provided to generate and plot various discrete-time signals.

Uploaded by

1232023
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
165 views6 pages

Discrete-Time Signal Basics

This document discusses discrete-time signals. It begins by defining discrete-time signals as signals with values defined at discrete time points indexed by integers. Common ways to represent discrete-time signals include graphical plots, functional expressions, tables and sequences. Sampling of continuous-time signals is described as a process that results in discrete-time signals. Important discrete-time signals discussed include the unit step, unit ramp, unit impulse, and sinusoid. MATLAB examples are provided to generate and plot various discrete-time signals.

Uploaded by

1232023
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Dr.

Qadri Hamarsheh

Outline
 Discrete-Time Signals-Introduction.
 Plotting discrete-time signals.
 Sampling Process.
 Discrete-Time Signal Representations
 Important D-T Signals
 Digital Signals

Discrete-Time Signals-Introduction
The time variable t is said to be a discrete-time variable if t takes on only the
discrete values t  t n for some range of integer values of n .
For example: t  t n  n for n  0,1,2,...,
Discrete-time signal: is a signal that is a function of the discrete-time variable
t n ; in other words, a discrete-time signal has defined values only at the discrete-
time points t  t n ; so, a discrete time signal is a sequence of numbers indexed by
integers.
Example: x[n]  n  ...,3,2,1,0,1,2,3,..., brackets indicates D-T signal,
parenthesis indicates C-T signal.
Plotting discrete-time signals
A stem plot emphasizes that the signal does not exist in-between integer n
values. Sometimes we plot with line segments connecting the dots.
Matlab example1:
x[n] is given by:
x[3]  2, x[2]  1, x[1]  3, x[0]  5, x[1]  2, x[2]  1, x[3]  7
with x[n]  0 for all other n .
A plot of this signal (see Figure 2_1) can be generated by the following Matlab
commands (see Chapter2_1.m):
% script Chapter 2_1.m
% Plot a discrete-time signal using Matlab
% we need two vectors to plot one-dimensional signal
% the first vector defines the horizontal axes:
% samples points to calculate the signal values.
% the second one defines the values of the signal
% at samples points (vertical axes)

n = -3:3; %first vector


%x[n]=0 for all other n.
x = [2,-1,-3,5,2,-1,7]; %second vector
stem(n,x,'filled');
xlabel('Time Samples: n');
1
Dr. Qadri Hamarsheh
ylabel('x[n]: Signal values');
title('Discrete-Time Signal');
axis([-4 4 -4 8]);

Figure 2_1
Sampling Process
one of the most common ways in which D-T signal arise is in sampling the C-T
signals.
We can describe the sampling process as a switch that closes briefly every T
seconds (as shown in figure 2_2) , the output of the switch can be viewed as a D-T
signal that is a function of the discrete time points t  t n , where
n  ...,2,1,0,1,2,...,

C-T Signal D-T Signal

Switch
Figure 2_2: Sampling Process

The resulting D-T signal is called the sampled version of the original C-T
signal, and T is called the sampling interval.
Sampling methods:
 Uniform Sampling ( T - constant)
 Nonuniform Sampling ( T - variable)
By definition of the sampling process, the value of x[n] for any integer value of n
is given by
x[n]  x(t ) t  nT  x(nT )
1
is called sampling frequency or sampling rate ( Fs ) in samples/seconds.
T
Important Question: How fast should we sample a specific signal?
We should sample a specific signal with sampling rate that is slightly more than
twice the highest frequency in this signal.
Example: CD audio is sampled at 44100 samples per second
1
T   22.69  sec, because the humans can't hear frequencies above
44100
approximately 20 kHz.
2
Dr. Qadri Hamarsheh
Discrete-Time Signal Representations
 Graphical Representation: as shown in figures 2_1.
 Functional Representation, such as
2 n  1,4 
 
x[n]   3 n  2,3 
0 otherwise 

 Tabular Representation, such as
n … -2 -1 0 1 2 3 4 …
x[n] … 2 -1 5 7 4 -5 1 …
 Sequence Representation, such as
An infinite-duration signal or sequence with the time origin ( n  0 ) indicated by
the symbol  is represented as:
 
x[n]  ...,0,0,0,3, 6,3,1,1,5,...

 
A sequence x[n] which is zero for n  0 , can be represented as
x[n]  0,1,4,0,0,3,...

Matlab example 2:
% script Chapter 2_2.m
% Plot a discrete-time signal
% x[n]=3*exp(-0.3n)sin(2n/3)(n-3)^2

n = 0:20; %x[n]=0 for all other n.


x = 3*exp(-0.3*n).*sin(2/3*n).*(n-3).^2;
stem(n,x,'filled');
xlabel('n');
ylabel('x[n]');
title('D-T Signal: x[n]=3exp(-0.3n)sin(2n/3)(n-3)^2');
axis auto;

Figure 2_3

3
Dr. Qadri Hamarsheh
Important D-T Signals
 Much of what we learned about C-T signals carries over to D-T signals.
1. D-T Unit Step signal
D-T unit step signal u[n] which is defined by
1, n  0,1,2,3,...
u[n]  
0 n  1,2,...
D-T step signal can be obtained by sampling the C-T step u(t ) (sampled
version of u(t ) ), the sketch of this signal is shown in figure 2_4 and the Matlab
code to generate unit step signal is written in Chapter 2_3.m
%Script Chapter2_3.m
function unitstep(np)
% Generates and plots x[n] = u[n];
% ------------------------------------------
% UNITSTEP (NP)
%np – points' count
if np < 0
error('argument np must satisfy np > 0')
end
n = [0:np];
x = [ones(1,np+1)];
stem(n,x,'filled');
xlabel('n');
ylabel('x[n]');
title('D-T Unit Step Signal')
axis ([-1 np+1 0 2]);
grid;

Figure 2_4
2. D-T Unit Ramp signal
D-T unit ramp signal r[n] which is defined by
n n  0,1,2,...
r[n]  
0 n  1,2,...
See figure 2_5a
4
Dr. Qadri Hamarsheh
If the unit ramp r (t )  t  u(t ) is sampled, the result is given by
r[n]  r (t ) t  nT  r (nT )
See figure 2_5b
These two signals in figure 2_5 are not the same. Unless the sampling interval T
is equal to 1.
r[n] r[n]
4 4T
3 3T
2 2T
1 T

1 2 3 4 n 1 2 3 4 n

Figure 2_5a Figure 2_5b

Figure 2_5: D-T Unit-Ramp Signal

3. Unit Pulse (D-T Impulse )


There is no sampled version of the unit impulse  (t ) since  (0) is not defined.
The unit-impulse signal, defined by
1, n0
 [n]  
0, n0
See figure 2_6.
 [n]
1

1 2 3 4 n

Figure 2_6: D-T Unit-Impulse Signal

Sifting property for D-T Delta function


Note:
 [n] works inside summation , the same way  (t ) works inside integral
 

  [n]  1     (t )dt  1


Compare

n   
 

 x[n]   [n  n0 ]  x[n0 ]    x( t )   ( t  t 0 )dt  x( t 0 )


Compare

n   
Any sequence can be expressed as:

x[n]   x[k ]   [n  k ]
k  
4. Periodic D-T signals (D-T Sinusoid)
A discrete signal x[n] is periodic if there exists a positive integer r such that
x[n  r ]  x[n] , for all integer n .

5
Dr. Qadri Hamarsheh
D-T sinusoid given by:
x[n]  A cosn   
-use upper case omega for frequency of D-T signals.
  D-T frequency in radians per unit time T
what is the unit for  ?
n   must be in radians.
 is "how many radians jump for each sample ",  is in radians /sample
 is the phase in radians.
The signal is periodic with period r if
A cos(n  r )     A cosn   
Recall that cosine function repeats every 2 radians, so that
A cosn     A cosn  2q    for all integer q , so
2q
r  2q    (Fundamental period).
r
5. D-T Rectangular Pulse
Let S be a positive odd integer. D-T rectangular pulse signal PS [n] of length S
defined by
 ( S  1) ( S  1)
1 n ,...,1,0,1,...,
PS [n]   2 2

0 all other n
A graphical representation of this signal is illustrated in figure 2-7.
PS [n]

( S  1) -2 -1 1 2 3 ( S  1) n

2 2
Figure 2_7: D-T Rectangular Signal

Digital Signals
A digital signal x[n] is a discrete-time signal whose values belong to the finite
set: a1 , a 2 ,...,a N , at each time instant t n , we have
x(t n )  x[n]  a j , for some j , where 1  j  N .
 A practical ADC not only gives a D-T signal but also one that is "Digital".
 Binary signal is a digital signal whose values are equal to 1 or 0:
x[n]  0 or 1, for n  ...,2,1,0,1,2,...
 The sampled unit-step function and unit-pulse function are examples
of binary signals.

You might also like