0% found this document useful (0 votes)
376 views100 pages

Slide 2 Discrete Time Signals

Digital Signal Processing is a course of computer science and engineering department in all countries. This is the 2nd chapter.

Uploaded by

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

Slide 2 Discrete Time Signals

Digital Signal Processing is a course of computer science and engineering department in all countries. This is the 2nd chapter.

Uploaded by

musa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 100

Discrete Time Signal

Abu saleh Musa Miah


Assistant Professor,
Dept. of CSE, BAUST, Bangladesh
email: [email protected], tel: +8801734264899
web: www.baust.edu.bd/cse
Continuous
tc=0:0.0001:1
xc=A*sin(2*pi*F*tc)

Discrete
n=0:1/8:1
0 0.125 0.250 0.375 0.50 0.62 0.750 0.8750 1

xn=A*sin(2*pi*F*n)

x(n)=0,3.5,5,3.53,0,-3.53,-5,
-3.5 0

n= 0 1 2 3 4 5 6 7 8
x[n]=[0 3.5 5 3.5 0 -3.5 -5 -3.5 0 ]
DISCRETE-TIME SIGNALS

 Discrete-time signal x(n) is a function of an independent variable/integer.


 Graphically represented as in Fig.
 Discrete-time signal is not defined at instants between two successive
samples.
 Incorrect to think that x(n) is equal to zero if n is not an integer.
 Simply, the signal x(n) is not defined for no integer values of n.

Figure 2.1 Graphical representation of a discrete-time signal.


Representation Digital Signal
 Besides Fig. 2.1
 Alternative representations often more convenient to use.
 These are

Functional representation :

  X(n ) =

+n

Tabular representation :

  𝑛 … … … . − 2 − 1 0 12 3 4 5 … …
𝑥 (𝑛) … … … 0 0 0 1 4 1 10 … …
Representation Digital Signal
Sequence representation :
 An infinite duration signal with a time origin (n=0) indicated by the
symbol ↑ is represented as
X(n)={………..0,0,1,4,1,1,1,4…..}

A sequence x(n) which is 0 for n<0 can be represented as


}

Graphical representation :
+n

The time origin for the sequence x(n) is


understood to be the left most point in the
sequence where x(n) is 0 for n<0.

For finite representation n={0,1,4,1,1,1,4 }


which is a 7-point sequence.
Some Elementary Discrete-Time Signals

Unite sample sequence or Unit Impulse Function

 The unite sample sequence is


denoted by and is defined as

The unit sample sequence is a


signal that is zero every where
except at n=0, where its value is
unity (1). This is sometimes called
a unit impulse ..

Example: Determine the following:


a) δ[0]
b) δ[3]
c) δ[-2]

a. 1 b. 0 c. 0
Scaled Unit Impulse Function
Example: Draw the following signal:

x[n] = 4δ[n]
Scaled Unit Impulse Function
Example: Draw the following signal:

x[n] = -2δ[n]
Shifted Unit Impulse Function
Example: Draw the following signals:

a) x[n] = δ[n - 2]

b) x[n] = δ[n + 2]
Shifted Unit Impulse Function
Example: Draw the following signal:

x[n] = δ[n - 3]

n=3
δ[3 - 3]
δ[0]
Unit Impulse Function
Example: write a function to describe the signal
in the figure.

x[n] = δ[n] + δ[n-1] + δ[n-2] + δ[n-3] + δ[n-4]


11
Unit Impulse Function
Example: write a function to describe the signal
in the figure.

x[n] = 4δ[n] - 2δ[n-1] + 3δ[n-2] - δ[n-3]


12
Unit Impulse Function
1, k  0
k  
0, k  0
Matlab Code
Unit impulse sequence
k1 = -5;
k2 = 10; 1
k = k1:k2;
0.8

x = (k==0); k
0.6

stem(k, x) 0.4

xlabel('k') 0.2
ylabel('\delta_k')
title('Unit impulse sequence') 0
axis([k1 k2 -0.1 1.1]) -5 0 5 10
k
Some Elementary Discrete-Time Signals

Unit step signal?

 Theunit step signal is denoted by


and is defined as,

The signal is zero for each n< 0


and elsewhere it has a unity value.
Unit Step Function
Example: Determine the values of the following
a) u[-1], b) u[0], c) u[1]

Answers

b) u[-1] = 0
c) u[0] = 1
d) u[1] = 1
Scaled Unit Step Function
Example: Draw the signal x[n] = 3u[n]
Shifted Unit Step Function
Example: Draw the signal x[n] = u[n - 2], and x[n] =
u[n + 2]
Unit Step Function
Example: Draw the signal x[n] = u[-n]
Unit Step Function
Example: Draw the signal x[n] = u[n - 3]
Unit Step Function
Example: Draw the signal x[n] = u[3 - n]
Unit Step Function
Example: Draw the signal
x[n] = u[n] + 2u[n - 2]
Unit Step Function
Example: Draw the signal
x[n] = u[n] - u[n - 3]
Unit Step Function
Example: A digital signal is described as x[n] = 4(u[n]
- u[n - 1]).
Write the function that describes x[n-3].

Answer

Substituting n = (n – 3) gives

x[n-3] = 4(u[n-3] - u[n - 4])


Unit Step Function
1, k  0
uk  
0, k  0
Matlab Code
Unit step sequence
k1 = -5;
1
k2 = 10;
k = k1:k2; 0.8

x = (k>=0); 0.6
uk

stem(k, x) 0.4

0.2
xlabel('k')
ylabel('u_k')
0
title('Unit step sequence')
axis([k1 k2 -0.1 1.1]) -5 0 5 10
k
Connection b/w Impulse and Step Functions

  

25
Connection b/w Impulse and Step Functions

Example: write a function to describe the signal in the


figure.

Unit Impulse Function


x[n] = 2δ[n] + δ[n-1] - 4δ[n-2] - 4δ[n-3] -4δ[n-4] -
……….
Unit Step Function
x[n] = 2u[n] – 6u[n-2]
26
Unit Ramp Function

 The unit-ramp function is defined as

27
Some Elementary Discrete-Time Signals

Unit ramp signal?


 The unit ramp signal is denoted by and is defined as,

Signal zero for each n< 0


and elsewhere n.
Some Elementary Discrete-Time Signals

Exponential signals ?
 The exponential signal is the sequence of the form
X(n)=
If the parameter is a real, then x(n) is a real signal.

when the If the parameter is a complex , it can be expressed as

then we can express x(n) as,


x(n)=

For the graphical representation of complex signal real and


imaginary parts are separately plotted.
Some Elementary Discrete-Time Signals

Exponential signals ?

Figure 2.5 Graphical representation of exponential signals.


Complex Exponential Function
 A digital signal of the form

x[n] = Aejβn

is called a complex exponential function.

 For all n, samples of this signal lie in the complex


plane on a circle with radius A.

 By Euler’s identity, a complex exponential may be


expressed as a rectangular-form complex number
eβn= cosβn + jsinβn
31
Complex Exponential Sequence
The general form of a complex exponential
sequence has the form

32
Complex Exponential Function
  

33
Sinusoidal Sequence
The sinusoidal functions take the form

x[n] = Asin(nW + q) or x[n] = Acos(nW + q) for all n with real A.

where W is a digital frequency in radians and q is a phase shift.


Sinusoidal Sequence
Example: plot of x[n] = 3sin(nπ/8)
Phase Shifting a Digital Sinusoid
Example: Plot the following signals

x1[n] = sin(n2π/9)

x2[n] = sin(n2π/9 - 3π/5)

36
Periodicity of Digital Sinusoidal Sequence

• Compared to analog counterpart, digital sine and


cosine signals are not always periodic sequences.

• These functions are periodic only when 2p/W is a ratio


of integers N/M.

• When 2p/W = N/M, N is the number of samples in the


digital period, and M is the number of analog cycles
that elapse while N samples are collected.

• An analog frequency f in Hz is related to its


corresponding digital frequency W in radians through
the equation
Periodicity of Digital Sinusoidal Sequence

Example: Repeating and non-repeating digital sinusoids.


Periodicity of Digital Sinusoidal Sequence

Example: A digital signal is defined as x[n] = cos(2n)


• Is this a digital sequence periodic?
• Find the first eight elements in the sequence.

Solution
W = 2,
2p/W = π, this number is irrational and cannot be expressed in term of
ratio of two integers. Therefore this digital sequence is not periodic.
Periodicity of Digital Sinusoidal Sequence

Example: A digital signal is defined as x[n] = cos(n4π/5)


• Is this a digital sequence periodic?
• Find the first eight elements in the sequence.

Solution
W = 4π/5,
2p/W = 5/2, this number is rational and can be expressed in term of ratio
of two integers N/M. Therefore this digital sequence is periodic. Where N =
5 means sequence repeats every 5 samples, and M = 2 means these 5
samples are collected over 2 complete cycles of the analog signal being
sampled.
Notation for Digital Signals
 A stream of digital codes is presented to a digital signal
processor for processing.

 It is not convenient, however, to represent a digital signal


using these codes.

 Instead, it is more helpful to represent it using the


quantization levels for each sample.

 A digital signal x is given the notation x[n] to indicate that


it has values only where samples are taken.

 The integer n marks the number of the sample, taken at


the time t = nTS, where TS is the sampling interval.
41
Signal Amplitude and Magnitude :

 Amplitude: Amplitude of a variable is the


measure of how far and in what direction, that
variable differs from zero. It can be positive or
negative. Amplitude: +A or -A.

Prof. Dr. A K M Akhtar Hossain,


CSE, RU.
Amplitude & Magnitude of a signal
Magnitude

 Itis the measure of how far, regardless of direction


from zero.
 Magnitude is the absolute value and always positive

 Magnitude:

A
Classification of Discrete-Time Signals
we classify discrete-time signals according to a number of
different characteristics.

 Energy signals & power signals.


 Periodic and aperiodic signals
 Symmetric(EVEN) and Asymmetric (ODD) Signal

 
ENERGY SIGNAL :
The energy of a signal x(n) is denoted as E or defined as ,
E
The energy of a signal can be finite or infinite. The signal x(n) is called energy signal if
its energy is finite.
Many signals having infinite energy have a finite average power, the average power of a
discrete signal is determined by.
POWER SIGNAL
the average power of a discrete signal is determined by.
𝑵
  𝟏 𝟐
𝑷 ≡ 𝒍𝒊𝒎 ∑ | 𝒙( 𝒏)|
𝒏 → ∞ (𝟐 𝑵 +𝟏) 𝒏=− 𝑵

We define the energy of a signal in the finite interval -N 5 n 5


N as

 Then the signal energy comes,


 
  1
The average power of signal x(n) is 𝑃 ≡ 𝑙𝑖𝑚 𝐸𝑁
𝑛→∞ (2 𝑁 +1)

If E is finite, P = 0 and if E is infinite the average power of the signal can


be finite or infinite. If the signal average power P is finite and nonzero
then the signal is called a power signal.

Determine the power and energy of unit step sequence


POWER SIGNAL
 
=

The unit step sequence is a power signal having an


infinite energy.
Periodic & A Non-periodic Signals
 Periodic Signal:
Some signals repeat themselves over fixed intervals of time.
Such signals are said to be periodic.
A signal is said to be periodic if it repeats itself after a fixed
period T, i.e.
 x(t) = x(t + T) for continuos
 x(n) = x(n + N) for discrete

The smallest value of N for which (2.1.20) holds is called the


(fundamental) period
periodic signal and aperiodic signal
 
 The energy of a periodic the interval) on finite values
over is finite is x(n) takes finite values over the period.
 however energy of the period is infinite.the average
power of the periodic signal is finite and is equal to the
average power over a signal period.
periodic signal and aperiodic signal
 
thus x(n) a periodic signal with N fundamental period have
the average power P,

As periodic signal always have a finite power so it is a


power signal. On the other hand energy of the period is
infinite.
Aperiodic (non- periodic) signal:
x(n + N) # x(n) for all n

If the above equation is not satisfied, the signal is


called aperiodic (non- periodic) signal.
Some signals repeat themselves over not fixed
intervals of time. Such signals are said to be
aperiodic or non-periodic signal.
Discuss symmetric(even) signal and
asymmetric(odd) signal?
Symmetric(even) signal :-
a real valued signal is said to be symmetric(even) signal if
x(-n)= x(n) ……(i) for all n
the even component of a signal is given by ,

  1
𝑥 𝑒 ( 𝑛 ) = [ 𝑥 ( 𝑛 )+ 𝑥 (−𝑛)]
2
Discuss symmetric(even) signal and
asymmetric(odd) signal?
Asymmetric(0dd) signal :-

A real valued signal is said to be asymmetric (odd) signal


if x(-n)= -x(n) ……(i) for all n
the even component of a signal is given by
  1
𝑥 𝑜 ( 𝑛 )= [ 𝑥 ( 𝑛 ) − 𝑥(− 𝑛)]
2
For odd signal x(0) = 0

Any arbitrary signal can be represented as the sum


 

of two signal component ,one of which is even and


other odd.
x(n) = + .
Notation for Digital Signals
 A digital signal x[n] may be modified by time
shifts and resampling.

For Example
 Signal x[n-2], shifts x[n] two steps to the right
 Signal x[n+3], shifts x[n] three steps to the left
 Signal x[2n], selects every other sample from x[n]
 Signal x[3n], selects every third sample

54
Notation for Digital Signals
Example: Find the Following:
a) x[0] = 0.25
b) x[5] = 0.5

55
Notation for Digital Signals
Example: Find the Following:
a) x[0] = 0.25
b) x[5] = 0.5
c) x[n-1]

Signal x[n-1] is found by shifting


the sample values of signal x[n] by
1 steps towards right.

56
Notation for Digital Signals
Example: Find the Following:
a) x[0] = 0.25
b) x[5] = 0.5
c) x[n-1]
d) x[n-2]

Signal x[n-2] is found by shifting


the sample values of signal x[n] by
2 steps towards right.

57
Notation for Digital Signals
Example: Find the Following:
a) x[0] = 0.25
b) x[5] = 0.5
c) x[n-1]
d) x[n-2]
e) x[2n]

Signal x[2n] selects alternate


sample from the signal x[n].

58
Notation for Digital Signals
Example: Find the Following:
a) x[0] = 0.25
b) x[5] = 0.5
c) x[n-1]
d) x[n-2]
e) x[2n]
f) x[3n]

Signal x[3n] selects every third


sample from the signal x[n].

59
Transformation of the independent variable (time).

x(n) shifted in time replacing variable n by n - k.

k is an integer.
If k positive integer, shift delay signal by k units.
 If k negative integer, time shift an advance the signal by k units in
time.

Example:2.1.2

signal x(n) is graphically illustrated in Fig. 2.9a.


Show a graphical representation of the signals x(n - 3) and x(n + 2).
Transformation of the independent variable
A signal x ( n ) is graphically illustrated in Fig. 2.9a. Show a graphical
representation of the signals x(n - 3) and x( n+2)

Solution The signal


x ( n- 3) is obtained by
delaying x ( n ) by three
units in time.
The result is illustrated
in Fig. 2.9b.

On the other hand,


the signal x ( n + 2) is
obtained by
advancing x ( n ) by two
units in time
Transformation of the independent variable
(time).

Example 2.1.3
Show the graphica1 representation of the signal x ( - n ) and x ( - n + 2 ) .
where x ( n ) is the signal illustrated in Fig. 2.10a.
Transformation of the independent variable
(time).
Time Scaling Or Down-sampling

A third modification of the independent variable involves replacing n by pn,


where p is an integer. We refer to this time-base modification as time scaling or down-
sampling.

Example Show the graphical representation of the signal y(n) = x(2n) , where x(n) is
the signal illustrated in Fig. 2.11a.

Addition, multiplication,and scaling of sequences.


Composite Functions
  

64
Composite Functions
Example: Draw a signal x[n] = e-2nu[n]
 First draw two basic signals (e-2n, u[n]) and then multiply as shown
in the figure.
 The u[n] has the effect of turning on the other function at n = 0.
 The u[n] is zero for n < 0, so x[n] is also for n < 0.
 The u[n] has a value of 1 for n ≥ 0, so x[n] is the same as e-2n for n
≥ 0.

65
Composite Functions
Example: Draw a signal x[n] = 3sin(nπ/5 - 1)u[n]
First draw two basic signals and then multiply
as shown in the figure.

66
Generation of Digital Signals
Example:

Solution
a)

67
Generation of Digital Signals
b) The first five sample values for part (1) are
calculated and plotted in the Figure.

68
Generation of Digital Signals
b) The first eight sample values for part (2) are
calculated and plotted in the Figure.

69
System

 A system is a mathematical model of a physical


process that relates the input signal to the
output signal.
 Let x and y be the input and output signals,
respectively, of a system. Then the system is viewed
as a transformation (or mapping) of x into y. This
transformation is represented
 By where T is the operator representing some well-
defined rule by which x is transformed into y.

Prof. Dr. A K M Akhtar Hossain,


CSE, RU.
Discuss discrete time system
 A discrete time system is a device or algorithm that operates on a
discrete-time signal, called the input or excitation, according to
some well-defined rule and prescribed procedure ,to produce
another discrete-time signal called output or response.

 Discrete-Time System is a mathematical operation that performs on


a given input signal x[n] and convert its corresponding output signal
y[n].
 The output of a system:

y[n]  T {x[n]}
x[n] T{.} y[n]

 Figure-2 Discrete -Time System

 Where, T denotes the transformation operator. x(n) = input signal,


 y(n)= output signal
  
Discuss the input output discretion of DTS
 
The input=output discretion of DTS consists of mathematical expression or a
rule , which explicitly defines the relations between the input and output
signal ,the internal structure has no deal with this.

It is like

Find the response of the following system to the input,


Feedback System

 When the output of the first system is the input


of second system and output of the second
system is added to the input of the first system,
then this type of connection of systems is called
feedback system. Figure 2.37, where the output
of system-1 is the input to system-2, while the
output of system-2 is fed back and added to the
system-1.
Example:

 Using the basic blocks, sketch the block


diagram representation of the discrete-time
system described by the input-output
relation
 1 1 1
y (n)  y (n  1)  x(n)  x(n  1)
4 2 2
 Where, x(n) is the input and y(n) is the output
of the system.

Prof. Dr. A K M Akhtar Hossain,


CSE, RU.
Prof. Dr. A K M Akhtar Hossain,
CSE, RU.
Classification of Discrete -Time System:

 Linear System:or Non-Linear System:


 Time-Invariant System (Shift – Invariant System):
 Time-Variant System:
 Static or Memoryless System:
 Dynamic System:
 Causal System
 Non-causal System
 Stable System vs unstabel
 Linear time-invariant (LTI) system/Convolution
System

Prof. Dr. A K M Akhtar Hossain,


CSE, RU.
Linear System:

If the input are scaled by constants factor c1 and c2 then output


sequence scaled factor same.

Prof. Dr. A K M Akhtar Hossain,


CSE, RU.
Linear System

A linear system is one that satisfies the response of the system to a weighted
sum of signals (inputs) be equal to the corresponding weighted sum of the
responses (outputs) of the system to each of the individual input signals.

 A system is linear if and only if


   T[ a1x1(n) + a2 x2(n)] = a1T[x1(n)] + a2T[x2(n)]
[Additivity]
  Where,
 x1(n) and x2(n) are inputs.
 a1 and a2 are the constants.
 T is the operator.

   T[ a1x1(n)] = a1T[x1(n)] = a1 y1(n) [Scaling]

  Where, y1(n) = T[x1(n)]

79
Linear System

Example: A digital amplifier is represented by


𝑦(𝑛) = 10𝑥(𝑛), the input is multiplied by 10 to
generate the output.

80
Linear System

81
Linear System

If a system produces a nonzero output with a zero input, then the system is
called non-linear system

Example:
y1(n) = Ax1(n) + B
Where, x1(n) is the input, y1(n) is the output,
A and B are the constants.

82
Time-Invariant System

 A system is called time-invariant system if


its input-output characteristics do not
change with time.
 Example:

83
Time-Invariant System

84
Time-Invariant System

Example: Determine whether the linear system


y(𝑛) = 2𝑥(𝑛) − 5 is time invariant.

85
Time-Invariant System

Example: Determine whether the linear system


y(𝑛) = 2𝑥(3𝑛) is time invariant.

The system is not time invariant. 86


Time-Variant System

A system is called time-variant system if its input-output characteristics


change with time.

Example 1:

Mn=1
n0=2
y(mn) = x(mn)

Example 2:

Delay the input the output is


y1(mn) = x(mn-n0

87
Static or Memoryless System:
   discrete – time system is called Static or Memoryless
A
system if the output y[n] at every value of n depends
only on the input x[n] at the same value of n. but not on
past or future samples of the input
 If the output of a system at time n is completely determined by the input samples in the interval from n
– N to n (N>0), the system is said to have memory of duration N.
 If N = 0. the system is static.
 If 0 < N <,the system is said to have finite memory.
 Whereas if , the system is said to have infinite memory.
 Example

 are both static or memoryless. Note that there is no need to store any of the past inputs or outputs in
order to compute the present output

Abu Saleh Musa Miah, BAUST.


Dynamic System:
 A discrete – time system is called dynamic
system if the output y[n] depends on present
x[n] and past inputs x[n-1].
 y(n) = ax(n) + bx[n-1] where, a and b are the
constants.

 are dynamic systems or systems with memory. The systems described by (2.2.9) and (2.2.10) have finite memory,
whereas the system described by (2.2.11) has infinite memory

Prof. Dr. A K M Akhtar Hossain,


CSE, RU.
Causal System
 A system is said to be causal if the output of the
system at any time n [i.e. y(n)] depends only on
present and past inputs [i.e. x(n), x(n-1), x(n-2),
x(n-3), .....]. but does not depend on future
inputs
 The output y(n) = F[x(n), x(n-1), x(n-2), x(n-
3), .....]
 Where, F[.] is the arbitrary function.
  Explanation:

y(n) = x(n) + x(n-1)


Where,
 x(n) is the present input
 x(n-1) is the past inputs
 y(n) is the output.
Causal System

91
Causal System

ample: Determine whether the following systems are causal or

ution

Causal
Non-causal

92
Non Causal System
• A system is said to be non-causal if the output of
the system at any time n [i.e. y(n)] depends on
present , past inputs and future inputs [i.e. x(n),
x(n-1), x(n-2), x(n-3), .... and x(n+1), x(n+2),
x(n+3), ...... .].

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


Non Causal System
• The output y(n) = F[x(n), x(n-1), x(n-2), x(n-3), ...,
x(n+1), x(n+2), x(n+3), ...... .]
• Where, F[.] is the arbitrary function.
• Explanation:
• y(n) = x(n) + x(n-1) + x(n+1)
• where x(n) is the present input
• x(n-1) is the past inputs
• x(n+1) is the future inputs
• y(n) is the output.
Prof. Dr. A K M Akhtar Hossain, CSE, RU.
Determine if the systems described by the following input-
output equations are causal
or noncausal.

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


Stable System
Stability (in the sense of bounded-input
bounded-output BIBO)
A system is stable if and only if every bounded
input produces a bounded output.

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


Stable System

• The conditions that the input sequence x(n) and


the output sequence y(n) are bounded is
translated mathematically to mean that there exist
some finite numbers, like Mx and My, such that
– ‫׀‬x(n)‫ ≤׀‬Mx < ∞
– ‫׀‬y(n)‫ ≤׀‬My < ∞ for all n.
• If. for some bounded input sequence . X (n) . the
outpur rs unbounded (infinite), the system is
classified as unstable
Prof. Dr. A K M Akhtar Hossain, CSE, RU.
Stable System

Prof. Dr. A K M Akhtar Hossain, CSE, RU.


Unstable
• A system generating an unbounded(infinite) output for a bound

• Unstable systems usually exhibit erratic and extreme behavior


and cause overflow in any practical implementation.
• Here, we define mathematically what we mean by a stable
system,and later, in Section 2.3.6.
• we explore the implications of this definition for linear,
• time-invariant systems input is termed as unstable system.
• LINEAR TIME-INVARIANT SYSTEMS

You might also like